/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: #2C2722;
  background: #faf6ee;
  display: flex;
  flex-direction: column;
  max-width: 480px;
  margin: 0 auto;
  position: relative;
}

/* ===== HEADER ===== */
.app-header {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 56px;
  background: #faf6ee;
  border-bottom: 1px solid #EAE0CA;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 20px;
}

.header-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #2C2722;
  letter-spacing: 0.01em;
}

.admin-btn {
  background: none;
  border: 1px solid #EAE0CA;
  border-radius: 20px;
  padding: 5px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #6E655A;
  cursor: pointer;
}

.admin-btn:hover {
  border-color: #BE8A33;
  color: #BE8A33;
}

/* ===== MAIN CONTENT ===== */
.main-content {
  position: fixed;
  top: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  bottom: 64px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.main-content.admin-mode {
  bottom: 0;
}

/* ===== SCREENS ===== */
.screen {
  display: none;
  min-height: 100%;
}

.screen.active {
  display: block;
}

.screen-body {
  padding: 20px 20px 32px;
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  height: 64px;
  background: #FFFBF1;
  border-top: 1px solid #EAE0CA;
  display: flex;
  align-items: stretch;
  z-index: 100;
}

.bottom-nav.hidden {
  display: none;
}

.nav-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  padding-bottom: 4px;
  color: #6E655A;
}

.nav-tab.active {
  color: #BE8A33;
}

.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 2px;
  background: #BE8A33;
  border-radius: 2px 2px 0 0;
}

.nav-icon {
  font-size: 1.1rem;
  line-height: 1;
}

.nav-label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

/* ===== HOME SCREEN ===== */
.banner-placeholder {
  width: 100%;
  height: 158px;
  background: #355E5A;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.banner-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.welcome-text {
  font-size: 0.9rem;
  color: #6E655A;
  margin-bottom: 20px;
  margin-top: 4px;
}

/* Current book card */
.current-book-card {
  display: flex;
  gap: 16px;
  background: #FFFBF1;
  border: 1px solid #EAE0CA;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 24px;
}

.book-spine-home {
  width: 48px;
  min-width: 48px;
  height: 112px;
  background: #355E5A;
  border-radius: 4px;
}

.book-info {
  flex: 1;
}

.book-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #BE8A33;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 6px;
}

.book-title-home {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
  color: #2C2722;
  margin-bottom: 4px;
}

.book-author-home {
  font-size: 0.8rem;
  color: #6E655A;
  margin-bottom: 10px;
}

.book-premise {
  font-size: 0.82rem;
  color: #6E655A;
  line-height: 1.55;
  font-style: italic;
}

/* Section block */
.section-block {
  margin-bottom: 24px;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: #2C2722;
}

.see-all-btn {
  background: none;
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  color: #BE8A33;
  cursor: pointer;
  padding: 0;
}

/* Questions preview */
.questions-preview {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.question-pill {
  background: #FFFBF1;
  border: 1px solid #EAE0CA;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.q-num {
  font-family: 'Playfair Display', serif;
  font-size: 0.75rem;
  font-weight: 600;
  color: #BE8A33;
  min-width: 24px;
  padding-top: 1px;
  letter-spacing: 0.03em;
}

.q-text {
  font-size: 0.82rem;
  line-height: 1.55;
  color: #2C2722;
}

/* Info row */
.info-row {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.info-card {
  flex: 1;
  background: #FFFBF1;
  border: 1px solid #EAE0CA;
  border-radius: 10px;
  padding: 14px;
}

.info-card-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6E655A;
  margin-bottom: 6px;
}

.info-card-value {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: #2C2722;
  margin-bottom: 2px;
}

.info-card-sub {
  font-size: 0.78rem;
  color: #6E655A;
}

/* Rate button */
.rate-book-btn {
  width: 100%;
  padding: 15px;
  background: #BE8A33;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.01em;
}

.rate-book-btn:hover {
  background: #a87929;
}

/* ===== RATINGS SCREEN ===== */
.ratings-book-header {
  margin-bottom: 24px;
}

.ratings-book-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  color: #2C2722;
  margin-bottom: 4px;
}

.ratings-book-author {
  font-size: 0.85rem;
  color: #6E655A;
  margin-bottom: 12px;
}

.ratings-prompt {
  font-size: 1rem;
  font-weight: 500;
  color: #2C2722;
}

/* Progress dots */
.progress-dots {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
}

.dot {
  width: 28px;
  height: 6px;
  border-radius: 3px;
  background: #d9cdb8;
}

.dot.filled {
  background: #BE8A33;
}

/* Dimension cards */
.dimension-card {
  background: #FFFBF1;
  border: 1px solid #EAE0CA;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
}

.dim-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2C2722;
  margin-bottom: 12px;
}

.emoji-scale {
  display: flex;
  gap: 6px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.emoji-btn {
  flex: 1;
  font-size: 1.6rem;
  padding: 10px 4px;
  background: #faf6ee;
  border: 1.5px solid #EAE0CA;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-btn:hover {
  border-color: #BE8A33;
  transform: translateY(-2px);
}

.emoji-btn.selected {
  background: #BE8A33;
  border-color: #BE8A33;
  box-shadow: 0 4px 12px rgba(200, 130, 58, 0.3);
  transform: translateY(-2px);
}

.scale-labels {
  display: flex;
  justify-content: space-between;
}

.scale-labels span {
  font-size: 0.7rem;
  color: #6E655A;
  font-weight: 500;
}

/* Submit button */
.submit-rating-btn {
  width: 100%;
  padding: 15px;
  background: #BE8A33;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}

.submit-rating-btn:disabled {
  background: #d9cdb8;
  color: #a09588;
  cursor: not-allowed;
}

.submit-rating-btn:not(:disabled):hover {
  background: #a87929;
}

/* Thank you state */
.rating-thankyou {
  text-align: center;
  padding: 60px 20px;
}

.thankyou-icon {
  width: 56px;
  height: 56px;
  background: #BE8A33;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 20px;
}

.thankyou-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #2C2722;
  margin-bottom: 10px;
}

.thankyou-body {
  font-size: 0.9rem;
  color: #6E655A;
  line-height: 1.6;
  margin-bottom: 32px;
}

.back-home-btn {
  background: none;
  border: 1px solid #EAE0CA;
  border-radius: 10px;
  padding: 12px 28px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  color: #6E655A;
  cursor: pointer;
}

.back-home-btn:hover {
  border-color: #BE8A33;
  color: #BE8A33;
}

/* ===== QUESTIONS SCREEN ===== */
.page-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: #2C2722;
  margin-bottom: 10px;
}

.questions-intro {
  font-size: 0.85rem;
  color: #6E655A;
  line-height: 1.6;
  margin-bottom: 24px;
  font-style: italic;
}

.question-card {
  background: #FFFBF1;
  border: 1px solid #EAE0CA;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 12px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.q-number-large {
  font-family: 'Playfair Display', serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: #BE8A33;
  min-width: 24px;
  letter-spacing: 0.03em;
  padding-top: 2px;
}

.q-body {
  font-size: 0.88rem;
  line-height: 1.65;
  color: #2C2722;
}

.questions-credit {
  font-size: 0.82rem;
  color: #6E655A;
  font-style: italic;
  margin-top: 4px;
  padding-left: 4px;
}

/* ===== HOSTING SCREEN ===== */
.next-host-hero {
  background: #355E5A;
  border-radius: 12px;
  padding: 28px 24px;
  margin-bottom: 28px;
  color: #fff;
}

.next-host-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: rgba(255,255,255,0.65);
  margin-bottom: 8px;
}

.next-host-name {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 6px;
}

.next-host-date {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
}

/* Hosting timeline */
.hosting-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #EAE0CA;
  position: relative;
}

.timeline-row:last-child {
  border-bottom: none;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #BE8A33;
  min-width: 8px;
}

.timeline-month {
  font-size: 0.82rem;
  color: #6E655A;
  min-width: 72px;
}

.timeline-host {
  font-size: 0.88rem;
  font-weight: 500;
  color: #2C2722;
}

/* ===== RECS SCREEN ===== */
.recs-subtitle {
  font-size: 0.85rem;
  color: #6E655A;
  line-height: 1.55;
  margin-bottom: 20px;
  font-style: italic;
}

.recs-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-card {
  display: flex;
  gap: 14px;
  background: #FFFBF1;
  border: 1px solid #EAE0CA;
  border-radius: 10px;
  padding: 14px;
  align-items: center;
}

.rec-spine {
  width: 36px;
  min-width: 36px;
  height: 72px;
  border-radius: 3px;
}

.rec-info {
  flex: 1;
}

.rec-title {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #2C2722;
  margin-bottom: 3px;
}

.rec-meta {
  font-size: 0.78rem;
  color: #6E655A;
  margin-bottom: 5px;
}

.rec-by {
  font-size: 0.74rem;
  color: #BE8A33;
  font-weight: 500;
}

/* ===== ADMIN SCREEN ===== */
#screenAdmin {
  display: none;
  background: #faf6ee;
  min-height: 100%;
}

#screenAdmin.active {
  display: block;
}

.admin-header {
  background: #2C2722;
  padding: 0 20px;
  height: 56px;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 10;
}

.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.admin-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
}

.member-view-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 5px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
}

.member-view-btn:hover {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}

.admin-status-bar {
  background: #FFFBF1;
  border-bottom: 1px solid #EAE0CA;
  display: flex;
  align-items: stretch;
  padding: 0 4px;
}

.status-item {
  flex: 1;
  padding: 12px 14px;
  text-align: center;
}

.status-label {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #6E655A;
  margin-bottom: 3px;
}

.status-value {
  font-size: 0.82rem;
  font-weight: 600;
  color: #2C2722;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-divider {
  width: 1px;
  background: #EAE0CA;
  margin: 10px 0;
}

.admin-body {
  padding: 20px 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-card {
  background: #FFFBF1;
  border: 1px solid #EAE0CA;
  border-radius: 12px;
  padding: 20px;
}

.admin-card-heading {
  font-family: 'Playfair Display', serif;
  font-size: 1rem;
  font-weight: 600;
  color: #2C2722;
  margin-bottom: 14px;
}

.admin-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #6E655A;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}

.admin-select {
  width: 100%;
  padding: 10px 12px;
  background: #faf6ee;
  border: 1px solid #EAE0CA;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: #2C2722;
  margin-bottom: 12px;
  appearance: none;
  cursor: pointer;
}

.admin-select:focus {
  outline: none;
  border-color: #BE8A33;
}

.admin-confirm-btn {
  width: 100%;
  padding: 12px;
  background: #BE8A33;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.admin-confirm-btn:hover {
  background: #a87929;
}

.recent-hosts-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6E655A;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}

.recent-hosts-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.host-chip {
  padding: 4px 12px;
  background: #faf6ee;
  border: 1px solid #EAE0CA;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #6E655A;
  cursor: pointer;
}

.host-chip:hover {
  border-color: #BE8A33;
  color: #BE8A33;
}

.admin-textarea {
  width: 100%;
  padding: 10px 12px;
  background: #faf6ee;
  border: 1px solid #EAE0CA;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.85rem;
  color: #2C2722;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 12px;
  line-height: 1.5;
}

.admin-textarea:focus {
  outline: none;
  border-color: #BE8A33;
}

.admin-publish-btn {
  width: 100%;
  padding: 12px;
  background: #355E3B;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.admin-publish-btn:hover {
  background: #2a4a30;
}

.add-member-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-input {
  flex: 1;
  padding: 10px 12px;
  background: #faf6ee;
  border: 1px solid #EAE0CA;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  color: #2C2722;
}

.admin-input:focus {
  outline: none;
  border-color: #BE8A33;
}

.admin-add-btn {
  padding: 10px 18px;
  background: #BE8A33;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.admin-add-btn:hover {
  background: #a87929;
}

.members-list-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.member-chip {
  padding: 4px 12px;
  background: #faf6ee;
  border: 1px solid #EAE0CA;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #6E655A;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #2C2722;
  color: #fff;
  padding: 11px 22px;
  border-radius: 24px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  max-width: calc(100vw - 40px);
  text-align: center;
}

.toast.admin-toast {
  bottom: 24px;
}

.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Smooth opacity transition */
.toast {
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* ===== HOSTING HERO ADDRESS ===== */
.next-host-address {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
  margin-top: 8px;
  line-height: 1.5;
}

/* ===== REC WHY ===== */
.rec-why {
  font-size: 0.78rem;
  color: #6E655A;
  font-style: italic;
  line-height: 1.5;
  margin-top: 6px;
}

/* ===== PIN MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 39, 34, 0.55);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-overlay.visible {
  display: flex;
}

.modal-box {
  background: #FFFBF1;
  border-radius: 16px;
  padding: 28px 24px;
  width: 100%;
  max-width: 320px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #2C2722;
  margin-bottom: 6px;
}

.modal-sub {
  font-size: 0.82rem;
  color: #6E655A;
  margin-bottom: 18px;
}

.pin-input {
  width: 100%;
  padding: 12px;
  background: #faf6ee;
  border: 1px solid #EAE0CA;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.4em;
  text-align: center;
  color: #2C2722;
}

.pin-input:focus {
  outline: none;
  border-color: #BE8A33;
}

.pin-error {
  font-size: 0.8rem;
  color: #9C3B2E;
  font-weight: 500;
  margin-top: 10px;
  min-height: 1em;
  visibility: hidden;
}

.pin-error.visible {
  visibility: visible;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.modal-cancel-btn,
.modal-submit-btn {
  flex: 1;
  padding: 11px;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.modal-cancel-btn {
  background: none;
  border: 1px solid #EAE0CA;
  color: #6E655A;
}

.modal-cancel-btn:hover {
  border-color: #BE8A33;
  color: #BE8A33;
}

.modal-submit-btn {
  background: #BE8A33;
  border: none;
  color: #fff;
}

.modal-submit-btn:hover {
  background: #a87929;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.modal-box.shake {
  animation: shake 0.4s ease;
}

/* ===== SCROLLBAR ===== */
.main-content::-webkit-scrollbar {
  width: 0;
}
