/* ==========================================================================
   Bookiry Design System - Components & Interactive Animations
   Style: Clean Light, Tactile Buttons, Warm Reading Cards, Zero Overflow
   Language: English-First Global Edition
   Mobile Standard: Zero Horizontal Overflow Guaranteed (360px ~ 412px safe)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Global Header & Navigation (Zero Overflow Responsive)
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: 64px;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  min-width: 0;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-brand);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-icon-wrap {
  width: 34px;
  height: 34px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 1;
  min-width: 0;
}

/* Rounded Rectangle Navigation Buttons */
.btn-nav {
  min-height: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-nav:hover {
  background: var(--bg-surface);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-nav-primary {
  background: var(--text-primary);
  color: #FFFFFF;
  border-color: var(--text-primary);
}

.btn-nav-desktop-only {
  display: inline-flex;
}

.btn-nav-primary {
  background: var(--text-primary);
  color: #FFFFFF;
  border-color: var(--text-primary);
  font-weight: 700;
  padding: 0 14px;
  flex-shrink: 0;
}

.btn-nav-primary:hover {
  background: #1E293B;
  color: #FFFFFF;
}

@media (max-width: 640px) {
  .site-header {
    height: 52px;
  }
  .header-inner {
    padding: 0 10px;
    gap: 6px;
    justify-content: space-between;
  }
  .brand-logo {
    font-size: 1rem;
    gap: 6px;
    flex-shrink: 0;
  }
  .brand-icon-wrap {
    width: 24px;
    height: 24px;
  }
  .nav-menu {
    gap: 5px;
    flex-shrink: 0;
    align-items: center;
  }
  /* Ultra-compact button styling on mobile */
  .btn-nav {
    padding: 0 7px;
    font-size: 0.78rem;
    min-height: 32px;
    height: 32px;
  }
  .btn-google-nav {
    padding: 0 8px;
    font-size: 0.76rem;
    min-height: 32px;
    height: 32px;
    gap: 4px;
  }
  /* Compact Circular Login Status Badge on Mobile: Never overflow */
  .user-profile-badge {
    padding: 3px 6px 3px 3px !important;
    gap: 4px;
    background: #ECFDF5 !important;
    border: 1.5px solid #10B981 !important;
    border-radius: var(--radius-full);
    display: inline-flex !important;
    align-items: center;
    cursor: pointer;
  }
  .user-avatar-circle {
    width: 24px;
    height: 24px;
    font-size: 0.72rem;
    background: #10B981 !important;
  }
  .user-email-text {
    display: none !important; /* Hide email on mobile to leave plenty of room for Settings gear */
  }
  .btn-logout-mini {
    font-size: 1.05rem;
    padding: 0 2px;
    color: #059669;
    line-height: 1;
  }
  .btn-settings-nav {
    padding: 0 8px !important;
    min-height: 32px;
    height: 32px;
    font-size: 1rem;
    flex-shrink: 0;
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
  }

  /* Reading Sanctuary Top Bar: Mobile 2-Tier Stack */
  .sanctuary-top-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    margin-bottom: 16px !important;
  }
  .sanctuary-top-bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  /* Action pills: 2x2 Clean Grid on Mobile, Zero Overflow */
  .active-actions-bar {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .btn-action-pill {
    min-height: 36px !important;
    height: 36px !important;
    padding: 0 10px !important;
    font-size: 0.78rem !important;
    justify-content: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 380px) {
  .header-inner {
    padding: 0 6px;
    gap: 3px;
  }
  .brand-logo span {
    display: none; /* Show only bunny icon on ultra-narrow phones */
  }
}

/* --------------------------------------------------------------------------
   2. Hero Section: Compass Bunny (Centered Normal-Flow Bubble, Zero Blowout)
   -------------------------------------------------------------------------- */
.hero-section {
  padding: 36px 0 32px;
  text-align: center;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

/* Bunny Stage with Centered Thought Bubble Above */
.bunny-stage-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0 auto 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Thought bubble sits safely above the bunny, wrapping cleanly */
.bunny-thought-bubble {
  max-width: min(88vw, 360px);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-sm);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-align: center;
  word-break: break-word;
  overflow-wrap: break-word;
  margin-bottom: 12px;
  animation: float-bubble 3s ease-in-out infinite;
  box-sizing: border-box;
}

.bunny-stage {
  width: 120px;
  height: 120px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
}

.bunny-halo {
  position: absolute;
  width: 110px;
  height: 110px;
  background: radial-gradient(circle, rgba(49, 130, 246, 0.15) 0%, rgba(248, 250, 252, 0) 70%);
  border-radius: 50%;
  animation: halo-pulse 3.5s ease-in-out infinite;
  pointer-events: none;
}

.bunny-svg-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  animation: bunny-breathe 3s ease-in-out infinite alternate;
  filter: drop-shadow(0 6px 14px rgba(15, 23, 42, 0.08));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bunny-stage:hover .bunny-svg-wrap,
.bunny-stage:active .bunny-svg-wrap {
  transform: scale(1.08) translateY(-4px);
}

/* Compass Needle Rotation */
.compass-needle {
  transform-origin: 60px 84px;
  animation: needle-orient 4s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
}

@keyframes bunny-breathe {
  0% { transform: translateY(0) scale(1); }
  100% { transform: translateY(-5px) scale(1.02); }
}

@keyframes halo-pulse {
  0%, 100% { transform: scale(0.9); opacity: 0.5; }
  50% { transform: scale(1.15); opacity: 0.85; }
}

@keyframes needle-orient {
  0% { transform: rotate(-15deg); }
  25% { transform: rotate(20deg); }
  50% { transform: rotate(-5deg); }
  75% { transform: rotate(35deg); }
  100% { transform: rotate(-15deg); }
}

@keyframes float-bubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Hero Typography */
.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--accent-blue-subtle);
  color: var(--accent-blue);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-pill);
  margin-bottom: 12px;
  letter-spacing: 0.02em;
  max-width: 90vw;
  box-sizing: border-box;
}

.hero-title {
  font-size: clamp(1.6rem, 5vw, 2.7rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 12px;
  word-break: break-word;
  overflow-wrap: break-word;
  padding: 0 8px;
}

.hero-desc {
  font-size: clamp(0.92rem, 2.5vw, 1.12rem);
  color: var(--text-muted);
  max-width: 580px;
  margin: 0 auto 28px;
  line-height: 1.55;
  word-break: break-word;
  overflow-wrap: break-word;
  padding: 0 12px;
}

/* --------------------------------------------------------------------------
   3. Search Bar & Reading Lens Chips (Responsive Elastic)
   -------------------------------------------------------------------------- */
.search-card-container {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 0 4px;
  position: relative;
}

.search-box {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 6px 8px 6px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  transition: all 0.2s ease;
}

.search-box:focus-within {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-float);
  transform: translateY(-2px);
}

/* Amazon-Style Live Book Search Autocomplete Dropdown */
.search-autocomplete-dropdown {
  position: absolute;
  top: 56px;
  left: 4px;
  right: 4px;
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-md);
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.16);
  z-index: 1000;
  max-height: 380px;
  overflow-y: auto;
  box-sizing: border-box;
  animation: slide-up-fade 0.15s ease-out;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #F1F5F9;
  cursor: pointer;
  transition: background 0.12s ease;
  text-align: left;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
  background: #F8FAFC;
}

.autocomplete-cover-thumb {
  width: 36px;
  height: 50px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  background: #E2E8F0;
}

.autocomplete-cover-fallback {
  width: 36px;
  height: 50px;
  border-radius: 4px;
  background: linear-gradient(135deg, #3182F6 0%, #1D4ED8 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.autocomplete-info {
  flex-grow: 1;
  overflow: hidden;
  min-width: 0;
}

.autocomplete-title {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.autocomplete-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.autocomplete-author {
  color: #3182F6;
  font-weight: 600;
}

.autocomplete-loading,
.autocomplete-empty {
  padding: 14px 18px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
}

.shelf-book-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.active-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 6px;
}

.search-icon {
  color: var(--text-light);
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  min-width: 0;
  flex: 1;
  font-size: 0.98rem;
  color: var(--text-primary);
  font-weight: 500;
  background: transparent;
}

.search-input::placeholder {
  color: var(--text-light);
  font-size: 0.9rem;
}

.btn-search {
  min-height: 42px;
  height: 42px;
  padding: 0 16px;
  background: var(--accent-blue);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn-search:hover {
  background: var(--accent-blue-hover);
}

.btn-search:active {
  transform: scale(0.97);
}

@media (max-width: 480px) {
  .search-box {
    padding: 6px 6px 6px 10px;
    gap: 6px;
  }
  .btn-search {
    padding: 0 12px;
    font-size: 0.85rem;
  }
}

@media (max-width: 380px) {
  .btn-search-text {
    display: none;
  }
  .btn-search {
    padding: 0 12px;
    width: 42px;
    justify-content: center;
  }
}

/* 3 Reading Lenses Selector */
.direction-chips-wrap {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.direction-chip-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  width: 100%;
  text-align: center;
  margin-bottom: 2px;
}

.btn-direction-chip {
  min-height: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-direction-chip:hover {
  border-color: var(--border-focus);
  color: var(--accent-blue);
  background: var(--accent-blue-subtle);
}

.btn-direction-chip.active {
  background: var(--text-primary);
  color: #FFFFFF;
  border-color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Dynamic Custom Intent Input Bar */
.custom-intent-input-wrap {
  margin-top: 12px;
  width: 100%;
  animation: fadeInCustomIntent 0.2s ease-out;
}

@keyframes fadeInCustomIntent {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.custom-intent-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface);
  border: 1.5px solid #F59E0B;
  border-radius: var(--radius-md);
  padding: 8px 12px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.12);
  transition: all 0.2s ease;
}

.custom-intent-inner:focus-within {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.custom-intent-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

.custom-intent-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.92rem;
  color: var(--text-primary);
  font-family: inherit;
}

.custom-intent-input::placeholder {
  color: #94A3B8;
  font-size: 0.86rem;
}

/* Recommendation Chips */
.popular-books-wrap {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.8rem;
  width: 100%;
  box-sizing: border-box;
}

.popular-label {
  color: var(--text-light);
  font-weight: 500;
  margin-right: 2px;
}

.popular-item {
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.popular-item:hover {
  color: var(--accent-blue);
  background: var(--bg-surface);
}

/* --------------------------------------------------------------------------
   3.5. Focused Reading Sanctuary View (Clean Dedicated Reading Room)
   -------------------------------------------------------------------------- */
.section-reading-sanctuary {
  padding: 28px 0 64px;
  background: var(--bg-canvas);
  min-height: calc(100vh - 64px);
  width: 100%;
  box-sizing: border-box;
  animation: slide-up-fade 0.3s ease forwards;
}

.sanctuary-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-back-home:hover {
  background: var(--bg-surface-soft);
  color: var(--accent-blue);
  border-color: #CBD5E1;
}

.sanctuary-guide-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.active-book-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-md);
  box-sizing: border-box;
  width: 100%;
}

@media (max-width: 540px) {
  .active-book-card {
    padding: 20px 16px;
    border-radius: var(--radius-lg);
  }
}

.active-book-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.active-cover-wrap {
  width: 68px;
  height: 98px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.active-meta-wrap {
  flex: 1;
  min-width: 200px;
}

.active-status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.active-reading-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #059669;
  background: #ECFDF5;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  background: #10B981;
  border-radius: 50%;
  animation: pulse-ring 1.5s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.active-compass-tag {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: var(--accent-blue-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
}

.active-book-title {
  font-size: clamp(1.3rem, 3.8vw, 1.85rem);
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 4px;
  word-break: break-word;
}

.active-book-author {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.active-actions-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.btn-action-pill {
  min-height: 38px;
  height: 38px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-action-pill:hover {
  background: var(--bg-surface-soft);
  color: var(--accent-blue);
  border-color: #CBD5E1;
}

/* 4 Catalytic Prompts Grid */
.prompts-grid-4 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

@media (min-width: 680px) {
  .prompts-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.prompt-box {
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  border-left: 4px solid var(--accent-blue);
  box-sizing: border-box;
}

.prompt-box-spark { border-left-color: #3182F6; }
.prompt-box-lens  { border-left-color: #10B981; }
.prompt-box-quest { border-left-color: #8B5CF6; }
.prompt-box-echo  { border-left-color: #F59E0B; }

.prompt-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 4px;
}

.prompt-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.02em;
}

.prompt-subtext {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.prompt-content {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-style: italic;
  word-break: break-word;
}

.spark-reminder-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: #FFFFFF;
  border: 1px dashed var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  line-height: 1.45;
}

/* Timeline Section (Append-Only Event Log) */
.reflections-timeline-section {
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

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

.timeline-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.timeline-count {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-subtle);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}

.timeline-empty {
  text-align: center;
  padding: 18px 14px;
  background: var(--bg-surface-soft);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.5;
  border: 1px dashed var(--border-subtle);
}

.timeline-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  animation: slide-up-fade 0.25s ease forwards;
}

.timeline-time-badge {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-surface-soft);
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  margin-top: 4px;
}

.timeline-bubble {
  flex: 1;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  word-break: break-word;
  position: relative;
}

.timeline-bubble-delete {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 0.72rem;
  color: var(--text-light);
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
}

.timeline-bubble-delete:hover {
  color: #EF4444;
}

/* Timeline Input Bar (Spacious & Comfortable) */
.timeline-input-bar {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.timeline-input-bar:focus-within {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.12);
}

.timeline-textarea {
  width: 100%;
  min-height: 84px;
  resize: vertical;
  font-size: 0.92rem;
  background: transparent;
  color: var(--text-primary);
  line-height: 1.6;
  border: none;
  outline: none;
  padding: 2px 0;
  font-family: inherit;
  box-sizing: border-box;
}

.timeline-textarea::placeholder {
  color: #94A3B8;
  font-size: 0.88rem;
  line-height: 1.5;
}

.timeline-input-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.btn-timeline-mic {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-timeline-mic:hover {
  background: #EFF6FF;
  color: var(--accent-blue);
  border-color: var(--accent-blue);
  transform: scale(1.04);
}

.btn-timeline-mic.recording {
  background: #FEE2E2;
  color: #EF4444;
  border-color: #EF4444;
  animation: mic-pulse 1s infinite alternate;
}

.btn-timeline-add {
  min-height: 42px;
  height: 42px;
  padding: 0 20px;
  background: var(--text-primary);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-timeline-add:hover {
  background: #1E293B;
  transform: translateY(-1px);
}

.btn-timeline-add:active {
  transform: scale(0.98);
}

/* Finish Book Milestone Zone (Separated to Prevent Accidental Clicks) */
.finish-milestone-zone {
  margin-top: 36px;
  padding-top: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.milestone-divider {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin-bottom: 4px;
}

.milestone-divider::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--border-subtle);
  z-index: 1;
}

.milestone-divider span {
  position: relative;
  z-index: 2;
  background: var(--bg-surface);
  padding: 0 14px;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
}

.btn-finish-book {
  min-height: 44px;
  padding: 0 24px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-finish-book:hover {
  background: #0F172A;
  color: #FFFFFF;
  border-color: #0F172A;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-finish-book:active {
  transform: scale(0.98);
}

/* --------------------------------------------------------------------------
   4. Section: Reading Lenses Carousel & Expandable Cards
   -------------------------------------------------------------------------- */
.section-reading-direction {
  padding: 44px 0 48px;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.section-head {
  text-align: center;
  margin-bottom: 28px;
  padding: 0 12px;
  box-sizing: border-box;
}

.section-badge {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-blue);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}

.section-title {
  font-size: clamp(1.35rem, 4vw, 1.95rem);
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  word-break: break-word;
}

.section-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
  line-height: 1.5;
  word-break: break-word;
}

/* Carousel Container (Clipped & Smoothly Scrollable) */
.direction-cards-carousel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 16px 20px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  scrollbar-width: none;
}

.direction-cards-carousel::-webkit-scrollbar {
  display: none;
}

.direction-card {
  flex: 0 0 min(82vw, 310px);
  width: min(82vw, 310px);
  max-width: min(82vw, 310px);
  scroll-snap-align: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  position: relative;
  cursor: pointer;
  user-select: none;
  box-sizing: border-box;
  min-width: 0;
}

.direction-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.direction-card.expanded {
  border-color: var(--accent-blue);
  box-shadow: var(--shadow-lg);
}

.card-icon-badge {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 14px;
  flex-shrink: 0;
}

.badge-healing { background: #ECFDF5; color: #10B981; }
.badge-growth  { background: #EFF6FF; color: #3182F6; }
.badge-fiction { background: #F5F3FF; color: #8B5CF6; }
.badge-custom  { background: #FEF3C7; color: #D97706; }

.direction-card-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  word-break: break-word;
}

.direction-card-subtitle {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
  word-break: break-word;
}

.direction-card-core {
  background: var(--bg-surface-soft);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  border-left: 3px solid var(--accent-blue);
  word-break: break-word;
}

.direction-card.badge-healing-card .direction-card-core { border-left-color: var(--accent-emerald); }
.direction-card.badge-fiction-card .direction-card-core { border-left-color: var(--accent-purple); }
.direction-card.badge-custom-card .direction-card-core  { border-left-color: var(--accent-amber); }

/* Accordion Details */
.direction-card-expandable {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: all 0.35s ease;
  box-sizing: border-box;
}

.direction-card.expanded .direction-card-expandable {
  max-height: 320px;
  opacity: 1;
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed var(--border-subtle);
}

.expandable-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
}

.sample-question-item {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  gap: 6px;
  line-height: 1.45;
  word-break: break-word;
}

.sample-question-item span {
  color: var(--accent-blue);
  font-weight: 700;
  flex-shrink: 0;
}

.card-expand-hint {
  margin-top: auto;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.direction-card.expanded .card-expand-hint {
  color: var(--accent-blue);
}

/* --------------------------------------------------------------------------
   5. Interactive Synthesis Simulator (Zero Overflow)
   -------------------------------------------------------------------------- */
.section-synthesis-flow {
  padding: 48px 0;
  background: #FFFFFF;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.synthesis-card-wrapper {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 24px 20px;
  box-shadow: var(--shadow-md);
  box-sizing: border-box;
  width: 100%;
}

@media (max-width: 480px) {
  .synthesis-card-wrapper {
    padding: 18px 14px;
    border-radius: var(--radius-lg);
  }
}

.step-indicator-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  position: relative;
  width: 100%;
  box-sizing: border-box;
}

.step-indicator-bar::after {
  content: '';
  position: absolute;
  top: 15px;
  left: 15px;
  right: 15px;
  height: 2px;
  background: var(--border-subtle);
  z-index: 1;
}

.step-node {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.step-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 2px solid var(--border-subtle);
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.82rem;
  transition: all 0.2s ease;
}

.step-node.active .step-circle {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.15);
}

.step-title {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.step-node.active .step-title {
  color: var(--text-primary);
  font-weight: 700;
}

/* Simulator Box */
.demo-inquiry-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 16px;
  box-sizing: border-box;
  width: 100%;
}

.demo-inquiry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.demo-badges-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.demo-book-badge {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.demo-compass-badge {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-emerald);
  background: var(--accent-emerald-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.demo-preview-pill {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-light);
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.demo-question-text {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.45;
  margin-bottom: 14px;
  word-break: break-word;
}

/* Memo Input Container */
.memo-input-container {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-canvas);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  transition: border-color 0.2s;
}

.memo-input-container:focus-within {
  border-color: var(--accent-blue);
}

.memo-textarea {
  width: 100%;
  min-width: 0;
  flex: 1;
  min-height: 44px;
  resize: none;
  font-size: 0.92rem;
  background: transparent;
  color: var(--text-primary);
  line-height: 1.4;
  box-sizing: border-box;
}

.memo-textarea::placeholder {
  color: var(--text-light);
  font-size: 0.85rem;
}

.btn-mic {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.btn-mic:hover {
  background: var(--accent-blue-subtle);
  color: var(--accent-blue);
  border-color: var(--accent-blue);
}

.btn-mic.recording {
  background: #FEE2E2;
  color: #EF4444;
  border-color: #EF4444;
  animation: mic-pulse 1s infinite alternate;
}

.action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-synthesize {
  min-height: 44px;
  height: 44px;
  padding: 0 18px;
  background: var(--text-primary);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-synthesize:hover {
  background: #1E293B;
}

.btn-synthesize:active {
  transform: scale(0.98);
}

/* Result Card */
.synthesis-result-card {
  display: none;
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-top: 16px;
  box-shadow: var(--shadow-lg);
  box-sizing: border-box;
  width: 100%;
  animation: slide-up-fade 0.4s ease forwards;
}

@keyframes slide-up-fade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
  gap: 6px;
}

.result-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  word-break: break-word;
}

.result-quote {
  font-family: var(--font-serif);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #F1F5F9;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent-blue);
  font-style: italic;
  word-break: break-word;
}

.result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.result-tag {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 2px 7px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-muted);
}

/* Recap Pathway Banner */
.recap-preview-banner {
  margin-top: 20px;
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
}

@media (max-width: 560px) {
  .recap-preview-banner {
    flex-direction: column;
    text-align: center;
  }
}

.recap-text h4 {
  font-size: 0.98rem;
  font-weight: 700;
  margin-bottom: 4px;
  word-break: break-word;
}

.recap-text p {
  font-size: 0.82rem;
  color: #94A3B8;
  line-height: 1.4;
  word-break: break-word;
}

.btn-recap-sample {
  min-height: 38px;
  height: 38px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}

.btn-recap-sample:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* --------------------------------------------------------------------------
   6. Section: Library Archive Cards (Responsive Grid & Protected Layout)
   -------------------------------------------------------------------------- */
.section-books-archive {
  padding: 44px 0 60px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.archive-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

@media (min-width: 680px) {
  .archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .archive-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Single Book Card */
.book-archive-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.book-archive-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

/* Meta Header */
.book-meta-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.book-cover-frame {
  width: 64px;
  height: 92px;
  flex-shrink: 0;
  background: #E2E8F0;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.book-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6px 2px;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.cover-bg-1 { background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%); }
.cover-bg-2 { background: linear-gradient(135deg, #10B981 0%, #047857 100%); }
.cover-bg-3 { background: linear-gradient(135deg, #8B5CF6 0%, #6D28D9 100%); }

.book-text-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.book-lens-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  margin-bottom: 4px;
  white-space: nowrap;
}

.lens-healing { background: #ECFDF5; color: #059669; }
.lens-growth  { background: #EFF6FF; color: #2563EB; }
.lens-fiction { background: #F5F3FF; color: #7C3AED; }

.book-title-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 2px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.book-author-publisher {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.35;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  word-break: break-word;
}

.meta-divider {
  color: var(--border-subtle);
}

/* Reader Thought Quote */
.reader-thought-quote {
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  border-left: 3px solid #94A3B8;
  font-style: italic;
  font-family: var(--font-serif);
  word-break: break-word;
  overflow-wrap: break-word;
  box-sizing: border-box;
  width: 100%;
}

.reader-thought-quote.quote-healing { border-left-color: var(--accent-emerald); }
.reader-thought-quote.quote-growth  { border-left-color: var(--accent-blue); }
.reader-thought-quote.quote-fiction { border-left-color: var(--accent-purple); }

.quote-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-style: normal;
  font-family: var(--font-sans);
  letter-spacing: 0.04em;
}

.card-footer-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.75rem;
  color: var(--text-light);
}

.btn-card-action {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  border-radius: var(--radius-xs);
  transition: all 0.15s;
}

.btn-card-action:hover {
  background: var(--bg-surface-soft);
  color: var(--accent-blue);
}

/* --------------------------------------------------------------------------
   7. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  padding: 32px 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  text-align: center;
  color: var(--text-light);
  font-size: 0.82rem;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.footer-copy {
  margin-top: 6px;
  font-size: 0.75rem;
  line-height: 1.45;
  padding: 0 12px;
}

/* --------------------------------------------------------------------------
   7.5. Dedicated Reading Sanctuary (Full-Page Transition View)
   -------------------------------------------------------------------------- */
.reading-sanctuary-view {
  min-height: calc(100vh - 64px);
  padding: 24px 0 64px;
  background: var(--bg-canvas);
  animation: fadeInSanctuary 0.25s ease-out;
}

@keyframes fadeInSanctuary {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.sanctuary-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.sanctuary-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

/* Minimal Back Link (Replaces bulky button) */
.btn-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  padding: 6px 4px;
  transition: all 0.15s ease;
}

.btn-back-link:hover {
  color: var(--accent-blue);
  transform: translateX(-3px);
}

.btn-back-link:active {
  transform: scale(0.97);
}

.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-back-home:hover {
  background: var(--bg-surface-soft);
  color: var(--accent-blue);
  border-color: #CBD5E1;
  transform: translateX(-2px);
}

.btn-back-home:active {
  transform: scale(0.97);
}

.sanctuary-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #10B981;
  background: #ECFDF5;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  border: 1px solid #A7F3D0;
}

/* --------------------------------------------------------------------------
   7.8. My Personal Library & Live Recap Dashboard (View B)
   -------------------------------------------------------------------------- */
.library-view {
  min-height: calc(100vh - 64px);
  padding: 32px 0 64px;
  background: var(--bg-canvas);
  animation: fadeInSanctuary 0.25s ease-out;
}

.library-container {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.library-top-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.library-title-group h1 {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.library-title-group p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.btn-explore-books {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--text-primary);
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  border: none;
}

.btn-explore-books:hover {
  background: #1E293B;
  transform: translateY(-1px);
}

/* Live Recap Metric Cards Grid (365-Day Real-Time) */
.live-recap-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}

.recap-banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.recap-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.recap-badge-tag {
  font-size: 0.74rem;
  color: var(--text-light);
  background: var(--bg-surface-soft);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.recap-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.recap-metric-card {
  background: var(--bg-surface-soft);
  border-radius: var(--radius-md);
  padding: 14px;
  border: 1px solid var(--border-subtle);
}

.metric-number {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Library Shelves */
.library-shelf-section {
  margin-bottom: 36px;
}

.shelf-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.shelf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.shelf-book-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.shelf-book-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: #CBD5E1;
}

.shelf-book-top {
  display: flex;
  gap: 12px;
}

.shelf-book-cover {
  width: 52px;
  height: 72px;
  border-radius: var(--radius-xs);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 800;
  color: #FFFFFF;
  text-align: center;
  padding: 4px;
  box-shadow: var(--shadow-sm);
}

.shelf-book-meta {
  flex: 1;
  min-width: 0;
}

.shelf-meta-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.btn-shelf-delete {
  background: transparent;
  border: none;
  color: #94A3B8;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  flex-shrink: 0;
  margin-top: -2px;
}

.btn-shelf-delete:hover {
  color: #EF4444;
  background: #FEE2E2;
  transform: scale(1.1);
}

.shelf-book-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.shelf-book-author {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shelf-compass-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  color: #10B981;
  background: #ECFDF5;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.shelf-book-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
}

.shelf-thought-count {
  color: var(--text-muted);
  font-weight: 600;
}

.shelf-action-link {
  color: var(--accent-blue);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.shelf-empty-box {
  background: var(--bg-surface-soft);
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   7.9. Google Auth & Gated Freemium System (Blur & Lock)
   -------------------------------------------------------------------------- */
/* Header Google Auth */
.btn-google-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-weight: 700;
  transition: all 0.15s ease;
}

.btn-google-nav:hover {
  background: var(--bg-surface-soft);
  border-color: #CBD5E1;
  box-shadow: var(--shadow-sm);
}

.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-surface-soft);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 4px 10px 4px 4px;
}

.user-avatar-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4285F4 0%, #34A853 100%);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-email-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-logout-mini {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.btn-logout-mini:hover {
  color: #EF4444;
}

/* Prompt Box Locked & Blurred State */
.prompt-box.prompt-locked {
  position: relative;
  overflow: hidden;
}

.prompt-box.prompt-locked .prompt-content {
  filter: blur(5px);
  user-select: none;
  pointer-events: none;
  opacity: 0.7;
}

.prompt-box.prompt-locked::after {
  content: '🔒 Locked · Google Drive Sync';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  pointer-events: none;
}

/* Sparks Gate Banner */
.sparks-gate-banner {
  background: linear-gradient(135deg, #EFF6FF 0%, #F8FAFC 100%);
  border: 1.5px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  box-shadow: 0 4px 12px rgba(49, 130, 246, 0.08);
}

.gate-banner-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: #1E3A8A;
  margin-bottom: 2px;
}

.gate-banner-desc {
  font-size: 0.82rem;
  color: #3B82F6;
  line-height: 1.45;
}

.btn-gate-google {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: var(--text-primary);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.btn-gate-google:hover {
  background: #F8FAFC;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: #94A3B8;
}

/* Library View Gate Overlay */
.library-container {
  position: relative;
}

.library-locked .live-recap-banner,
.library-locked .library-shelf-section {
  filter: blur(7px);
  pointer-events: none;
  user-select: none;
  opacity: 0.45;
}

.library-gate-overlay {
  position: absolute;
  top: 90px;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 30px;
  z-index: 20;
}

.library-gate-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 34px 26px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-float);
  animation: slide-up-fade 0.25s ease-out;
}

.gate-lock-icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.gate-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.gate-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 22px;
}

.btn-gate-google-large {
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius-md);
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  color: var(--text-primary);
  font-size: 0.94rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  margin-bottom: 12px;
}

.btn-gate-google-large:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.gate-security-note {
  font-size: 0.75rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* OAuth Modal Styles */
.auth-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInModal 0.2s ease;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 100%;
  padding: 28px;
  box-shadow: var(--shadow-float);
  box-sizing: border-box;
}

.auth-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.google-logo-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-auth-modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  line-height: 1;
}

.btn-auth-modal-close:hover {
  color: var(--text-primary);
}

.auth-modal-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-modal-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.permission-scope-box {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.scope-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.scope-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.scope-name {
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.scope-detail code {
  background: #E2E8F0;
  padding: 1px 4px;
  border-radius: 4px;
  font-family: monospace;
}

.btn-confirm-google-auth {
  width: 100%;
  min-height: 46px;
  background: #4285F4;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.btn-confirm-google-auth:hover {
  background: #3367D6;
  transform: translateY(-1px);
}

.auth-modal-security {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-light);
  margin-top: 14px;
}

/* --------------------------------------------------------------------------
   8. Print Stylesheet (Clean 1-Page Reading Guide / PDF Export)
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .site-footer,
  .search-card-container,
  .btn-mic,
  .action-row,
  .btn-recap-sample,
  .btn-card-action {
    display: none !important;
  }
  
  body, html {
    background: #FFFFFF !important;
    color: #000000 !important;
    font-size: 11pt;
  }
  
  .direction-cards-carousel {
    display: block !important;
    overflow: visible !important;
  }
  
  .direction-card {
    page-break-inside: avoid;
    margin-bottom: 14px;
    border: 1px solid #CCCCCC !important;
    box-shadow: none !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  
  .direction-card-expandable {
    max-height: none !important;
    opacity: 1 !important;
    display: block !important;
    border-top: 1px solid #EEEEEE !important;
  }
  
  .card-expand-hint {
    display: none !important;
  }
}

/* ==========================================================================
   9. Global Footer Styles (Mobile Readability & Generous Touch Targets)
   ========================================================================== */
.site-footer {
  background: #F8FAFC;
  border-top: 1px solid #E2E8F0;
  padding: 44px 0 36px 0;
  margin-top: 48px;
  width: 100%;
  box-sizing: border-box;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.footer-brand-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 520px;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-primary);
}

.brand-icon-wrap.mini {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(49, 130, 246, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-tagline {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 0;
  word-break: keep-all;
}

.footer-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 6px 0;
}

.footer-nav-link {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.footer-nav-link:hover {
  color: var(--accent-blue);
  background: #F1F5F9;
}

.footer-nav-link.footer-nav-highlight {
  color: #1D4ED8;
  font-weight: 700;
  background: #EFF6FF;
  border-color: #BFDBFE;
}

.footer-nav-link.footer-nav-highlight:hover {
  background: #DBEAFE;
}

.footer-bottom-copy {
  font-size: 0.78rem;
  color: var(--text-light);
  line-height: 1.4;
  margin-top: 4px;
}

/* ==========================================================================
   10. Dedicated Pricing & Membership View (#pricingView)
   ========================================================================== */
.pricing-view {
  width: 100%;
  animation: slide-up-fade 0.3s ease forwards;
}

.pricing-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 60px 20px;
  box-sizing: border-box;
}

.pricing-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.pricing-badge-tag {
  font-size: 0.8rem;
  font-weight: 700;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.pricing-header-center {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 40px auto;
}

.pricing-main-title {
  font-size: 2.1rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  line-height: 1.25;
  margin-bottom: 12px;
}

.pricing-main-subtitle {
  font-size: 0.96rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
  word-break: keep-all;
}

/* Monthly / Annual Billing Toggle Switch */
.pricing-toggle-wrap {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.pricing-toggle {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  padding: 4px;
  border-radius: var(--radius-full);
  gap: 4px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-toggle-option {
  min-height: 42px;
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  color: #64748B;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.btn-toggle-option:hover {
  color: var(--text-primary);
}

.btn-toggle-option.active {
  background: #FFFFFF;
  color: #0F172A;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.toggle-save-badge {
  font-size: 0.68rem;
  font-weight: 800;
  background: #ECFDF5;
  color: #059669;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid #A7F3D0;
  letter-spacing: 0.02em;
}

@media (max-width: 480px) {
  .pricing-toggle {
    width: 100%;
    box-sizing: border-box;
  }
  .btn-toggle-option {
    flex: 1;
    justify-content: center;
    padding: 8px 8px;
    font-size: 0.8rem;
    gap: 4px;
  }
  .toggle-save-badge {
    padding: 1px 5px;
    font-size: 0.65rem;
  }
}

.pricing-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 40px;
  align-items: stretch;
}

.pricing-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 30px 22px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.pricing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pricing-card-featured {
  border-color: #3182F6;
  box-shadow: 0 10px 30px rgba(49, 130, 246, 0.12);
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

.featured-ribbon {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #3182F6;
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(49, 130, 246, 0.3);
}

.plan-badge {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.plan-badge-blue {
  color: #3182F6;
}

.plan-badge-gold {
  color: #D97706;
}

.plan-price-wrap {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}

.plan-price {
  font-size: 2.3rem;
  font-weight: 850;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1;
}

.plan-period {
  font-size: 0.84rem;
  color: var(--text-muted);
  font-weight: 600;
}

.plan-description {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 20px 0;
  min-height: 42px;
  word-break: keep-all;
}

.plan-features-list {
  list-style: none;
  padding: 0;
  margin: 0 0 26px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex-grow: 1;
}

.plan-features-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-primary);
  line-height: 1.45;
  word-break: keep-all;
}

.plan-features-list li.disabled {
  color: var(--text-light);
  text-decoration: line-through;
  opacity: 0.65;
}

.check-icon {
  color: #10B981;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.cross-icon {
  color: #CBD5E1;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  line-height: 1.2;
}

.btn-plan-action {
  width: 100%;
  min-height: 46px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.btn-plan-outline {
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  color: var(--text-primary);
}

.btn-plan-outline:hover {
  background: #F8FAFC;
  border-color: #94A3B8;
}

.btn-plan-secondary {
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  color: #1D4ED8;
}

.btn-plan-secondary:hover {
  background: #DBEAFE;
}

.btn-plan-primary {
  background: #3182F6;
  border: 1px solid #2563EB;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(49, 130, 246, 0.3);
}

.btn-plan-primary:hover {
  background: #2563EB;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(49, 130, 246, 0.4);
}

.guarantee-text {
  text-align: center;
  font-size: 0.74rem;
  color: var(--text-light);
  margin-top: 10px;
}

/* License Key Card */
.license-activation-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 48px;
  box-shadow: var(--shadow-sm);
}

.license-card-left {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 500px;
}

.license-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.license-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.license-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  word-break: keep-all;
}

.license-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  flex-grow: 1;
  max-width: 440px;
}

.license-input {
  flex: 1;
  min-width: 220px;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-family: monospace;
  box-sizing: border-box;
}

.license-input:focus {
  outline: none;
  border-color: #3182F6;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.15);
}

.btn-license-activate {
  min-height: 44px;
  padding: 0 18px;
  background: #0F172A;
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-license-activate:hover {
  background: #334155;
}

/* FAQ Section */
.pricing-faq-section {
  max-width: 900px;
  margin: 0 auto;
}

.faq-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  text-align: center;
  color: var(--text-primary);
  margin-bottom: 26px;
  letter-spacing: -0.02em;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.faq-item {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.faq-q {
  font-size: 0.92rem;
  font-weight: 750;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.4;
  word-break: keep-all;
}

.faq-a {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin: 0;
  word-break: keep-all;
}

.faq-a code {
  background: #F1F5F9;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: monospace;
}

/* Responsive adjustments for Pricing and Footer */
@media (max-width: 860px) {
  .pricing-cards-grid {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .faq-grid {
    grid-template-columns: 1fr;
  }

  .pricing-main-title {
    font-size: 1.65rem;
  }

  .license-activation-card {
    flex-direction: column;
    align-items: stretch;
  }

  .license-form {
    max-width: 100%;
  }

  .license-input {
    width: 100%;
  }

  .btn-license-activate {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Settings Modal, Cloud Sync & AI Sparks Enhancements
   -------------------------------------------------------------------------- */
.btn-settings-nav {
  padding: 0 10px;
  font-size: 1rem;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.btn-settings-nav:hover {
  background: var(--bg-hover);
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.settings-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.settings-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.settings-link-hint {
  font-size: 0.76rem;
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 600;
}

.settings-link-hint:hover {
  text-decoration: underline;
}

.settings-input {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-family: inherit;
  border: 1px solid #CBD5E1;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-primary);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.settings-input:focus {
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.15);
}

.settings-hint {
  font-size: 0.74rem;
  color: var(--text-light);
  line-height: 1.45;
  margin: 0;
}

/* Drive Sync Pills */
.btn-drive-sync-pill {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: var(--text-secondary);
}

.btn-drive-sync-pill:hover {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
}

.btn-drive-sync-pill.synced {
  border-color: #10B981;
  color: #059669;
  background: #ECFDF5;
}

.btn-drive-sync-pill.syncing {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: #EFF6FF;
}

.btn-drive-link-pill {
  background: #F8FAFC;
  border: 1px solid #94A3B8;
  color: var(--accent-blue);
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-drive-link-pill:hover {
  background: #EFF6FF;
  border-color: var(--accent-blue);
}

/* AI Sparks Generation Banner */
.ai-sparks-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 100%);
  border: 1px solid #BFDBFE;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 20px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #1E40AF;
  box-shadow: 0 2px 8px rgba(49, 130, 246, 0.08);
  animation: fadeInBanner 0.3s ease;
  transition: all 0.2s ease;
  word-break: keep-all;
}

.ai-sparks-banner:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(49, 130, 246, 0.12);
}

.btn-banner-settings {
  display: inline-flex;
  align-items: center;
  background: var(--accent-blue);
  color: #FFFFFF;
  border: none;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

.btn-banner-settings:hover {
  background: #2563EB;
}

.ai-spark-spin {
  font-size: 1.2rem;
  display: inline-block;
  animation: pulseSpin 2s infinite ease-in-out;
  flex-shrink: 0;
}

@keyframes pulseSpin {
  0% { transform: scale(1) rotate(0deg); opacity: 0.8; }
  50% { transform: scale(1.25) rotate(15deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 0.8; }
}

@keyframes fadeInBanner {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}



