/* ==========================================================================
   NICCOLÒ MACHIAVELLI - THE PRINCE
   Renaissance Aristocratic Theme & Responsive Mobile Design
   ========================================================================== */

:root {
  --primary: #9E1B1B;            /* Imperial Florentine Crimson */
  --primary-light: #C0392B;      /* Warm Medici Red */
  --primary-dark: #660B0B;       /* Deep Renaissance Wine */
  
  --gold: #D4AF37;               /* Florentine Leaf Gold */
  --gold-glow: #F3CA65;          /* Warm Amber Luster */
  --gold-muted: #9E7D2B;         /* Antique Bronze */
  
  --bg-dark: #121013;            /* Rich Velvet Shadow */
  --surface-dark: #1C181E;       /* Renaissance Dark Stone */
  --surface-elevated: #28222C;   /* Elevated Card Surface */
  --border-dark: #38303E;        /* Subtle Gold-tinged Border */
  
  --text-primary: #F7F4EB;       /* Warm Marble Cream */
  --text-secondary: #B8B2A6;     /* Tuscan Sand */
  --text-muted: #857E74;         /* Soft Aged Ink */
  
  --highlight-direct: #D4AF37;   /* Gold query match */
  --highlight-related: #E67E22;  /* Terracotta concept match */
  
  --font-serif: 'Cinzel', 'Cinzel Decorative', 'Georgia', serif;
  --font-body: 'Lora', 'Georgia', serif;
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.25);
  
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Global Utilities */
.hidden {
  display: none !important;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100%;
  background-color: #0A080B;
  color: var(--text-primary);
  font-family: var(--font-sans);
  overflow: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* Simulated Phone Wrapper (Responsive on Desktop, native fullscreen on Mobile) */
/* Simulated Phone Wrapper (Optimized for Mobile, Centered Aspect-Ratio on Laptop/Tablet) */
.phone-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  background: radial-gradient(circle at 50% 20%, #201824 0%, #0A080B 100%);
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

.phone-bezel {
  position: relative;
  /* Lock to phone aspect ratio 9 : 19.5 on desktop, laptops, and tablets */
  height: min(calc(100dvh - 32px), 880px);
  width: calc(min(calc(100dvh - 32px), 880px) * (9 / 19.5));
  max-width: min(430px, calc(100dvw - 32px));
  background-color: #000000;
  border-radius: 48px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(198, 40, 40, 0.25), inset 0 0 0 3px #28222c;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.phone-screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background-color: var(--bg-dark);
}

/* True Mobile Phone Screen - edge to edge */
@media (max-width: 480px) {
  .phone-wrapper {
    padding: 0;
  }
  .phone-bezel {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }
}

/* App Header */
.app-header {
  position: relative;
  z-index: 30;
  height: 56px;
  background-color: rgba(28, 24, 30, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.app-header.hidden {
  display: none;
}

.header-action-btn {
  background: transparent;
  border: none;
  color: var(--gold);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.header-action-btn:hover {
  background-color: rgba(212, 175, 55, 0.12);
}

.header-title {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Main Content Views */
.app-main-content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.app-view {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

.app-view.active {
  display: flex;
  opacity: 1;
}

.view-scrollable {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px 16px 80px 16px;
  -webkit-overflow-scrolling: touch;
}

/* Sideload Banner */
.sideload-banner {
  background: linear-gradient(135deg, #660B0B 0%, #9E1B1B 50%, #B8860B 100%);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 15px rgba(158, 27, 27, 0.4);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.sideload-info h4 {
  font-family: var(--font-serif);
  font-size: 13px;
  letter-spacing: 1px;
  color: #FFF;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sideload-info p {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

.btn-sideload {
  background-color: #FFF;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn-sideload:hover {
  transform: translateY(-2px);
  background-color: #FFF8E7;
}

/* Hero Portrait Card */
.hero-card {
  position: relative;
  width: 100%;
  height: 220px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

.hero-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.6s ease;
}

.hero-card:hover img {
  transform: scale(1.04);
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 16, 19, 0) 0%, rgba(18, 16, 19, 0.4) 50%, rgba(18, 16, 19, 0.95) 100%);
}

.hero-badge-container {
  position: absolute;
  bottom: 16px;
  left: 18px;
  right: 18px;
}

.hero-tag {
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 4px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 800;
  color: #FFF;
  letter-spacing: 1.5px;
  line-height: 1.1;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}

.hero-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Florentine Divider */
.renaissance-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 16px 0 20px 0;
}

.renaissance-divider::before,
.renaissance-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-muted), transparent);
}

.renaissance-divider svg {
  color: var(--gold);
  opacity: 0.8;
}

/* Cards (Daily Maxim, Passage Cards) */
.maxim-card {
  background-color: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
}

.maxim-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.card-tag {
  font-family: var(--font-serif);
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--gold);
  font-weight: 700;
}

.card-ref {
  font-family: var(--font-sans);
  font-size: 11px;
  color: var(--text-muted);
}

.card-media {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card-body {
  padding: 18px 20px;
}

.passage-quote {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  font-style: italic;
  position: relative;
}

.card-actions {
  display: flex;
  gap: 10px;
  padding: 0 20px 18px 20px;
}

.btn {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #FFF;
  box-shadow: 0 4px 12px rgba(158, 27, 27, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.4);
}

.btn-outline:hover {
  background-color: rgba(212, 175, 55, 0.1);
  border-color: var(--gold);
}

/* Browse Books Grid */
.view-heading {
  margin-bottom: 18px;
}

.view-heading h2 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-primary);
}

.view-heading p {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

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

.book-card {
  background-color: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.book-card:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
}

.book-card-thumb {
  width: 100%;
  height: 110px;
  overflow: hidden;
  position: relative;
}

.book-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: rgba(18, 16, 19, 0.85);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold);
  font-family: var(--font-serif);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.book-card-meta {
  padding: 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.book-card-title {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.25;
}

.book-card-subtitle {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

/* Book Detail View */
.book-detail-banner {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  position: relative;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.book-detail-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-detail-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(18, 16, 19, 0.95) 100%);
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.book-detail-banner-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 700;
  color: #FFF;
}

/* Chapter Controls & Toolbar */
.chapter-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}

.chapter-quick-actions {
  display: flex;
  gap: 8px;
}

.btn-pill-small {
  background-color: var(--surface-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-pill-small:hover {
  border-color: var(--gold);
  color: var(--gold);
  background-color: rgba(212, 175, 55, 0.1);
}

/* Quick Jump Horizontal Scroll Bar */
.section-jump-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.section-jump-bar::-webkit-scrollbar {
  display: none;
}

.jump-badge {
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-dark);
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.jump-badge:hover,
.jump-badge.active {
  border-color: var(--gold);
  color: var(--gold);
  background-color: rgba(212, 175, 55, 0.15);
}

/* Expandable / Collapsible Passage Card */
.passage-item-card {
  background-color: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}

.passage-item-card:hover {
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.passage-item-card.collapsed .passage-item-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-secondary);
}

.passage-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.passage-sec-tag {
  font-family: var(--font-serif);
  font-size: 11px;
  color: var(--gold);
  letter-spacing: 1px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.passage-card-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.card-action-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 5px;
  border-radius: 4px;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-action-icon:hover {
  color: var(--gold);
  background-color: rgba(212, 175, 55, 0.1);
}

.card-action-icon.expand-toggle {
  transition: transform 0.25s ease;
}

.passage-item-card.collapsed .expand-toggle {
  transform: rotate(-90deg);
}

.passage-item-text {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-primary);
  transition: max-height 0.3s ease;
}

.passage-card-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  gap: 12px;
}

.btn-read-focus {
  background: transparent;
  border: none;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.5px;
}

.btn-read-focus:hover {
  color: #FFF;
}

/* Dedicated Focus Reader Modal */
.reader-modal {
  position: absolute;
  inset: 0;
  background-color: var(--bg-dark);
  z-index: 120;
  display: flex;
  flex-direction: column;
}

.reader-header {
  height: 56px;
  background-color: var(--surface-dark);
  border-bottom: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.reader-title-info {
  display: flex;
  flex-direction: column;
}

.reader-chapter-title {
  font-family: var(--font-serif);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

.reader-sec-count {
  font-size: 10px;
  color: var(--text-muted);
}

.reader-font-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reader-font-btn {
  background: var(--surface-elevated);
  border: 1px solid var(--border-dark);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.reader-font-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.reader-body-scrollable {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px 30px 20px;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
}

.reader-quote-container {
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
}

.reader-quote-container::before {
  content: '“';
  position: absolute;
  top: 4px;
  left: 14px;
  font-family: var(--font-serif);
  font-size: 52px;
  color: rgba(212, 175, 55, 0.15);
  line-height: 1;
  pointer-events: none;
}

.reader-text {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  position: relative;
  z-index: 2;
}

/* Reader Nav Bottom Bar */
.reader-bottom-nav {
  background-color: var(--surface-dark);
  border-top: 1px solid var(--border-dark);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.btn-reader-nav {
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-dark);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-reader-nav:hover:not(:disabled) {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-reader-nav:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Search View */
.search-bar-wrap {
  position: relative;
  margin-bottom: 14px;
}

.search-input-box {
  width: 100%;
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-pill);
  padding: 12px 42px 12px 44px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font-sans);
  outline: none;
  transition: var(--transition);
}

.search-input-box:focus {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.search-icon-left {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gold);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Search Chips */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.concept-chip {
  background-color: var(--surface-dark);
  border: 1px solid var(--border-dark);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.concept-chip:hover,
.concept-chip.active {
  background-color: rgba(212, 175, 55, 0.15);
  border-color: var(--gold);
  color: var(--gold);
}

/* Term Highlighting */
.highlight-direct {
  background-color: rgba(212, 175, 55, 0.28);
  color: #FFF;
  border-bottom: 2px solid var(--gold);
  padding: 1px 3px;
  border-radius: 2px;
  font-weight: 600;
}

.highlight-related {
  background-color: rgba(230, 126, 34, 0.25);
  color: #FFF;
  border-bottom: 2px solid #E67E22;
  padding: 1px 3px;
  border-radius: 2px;
}

/* Settings View */
.settings-card {
  background-color: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.settings-row.border-top {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 14px;
  margin-top: 14px;
}

.settings-text h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.settings-text p {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #38303E;
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--primary);
}

input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.time-trigger-btn {
  background-color: var(--surface-elevated);
  border: 1px solid var(--border-dark);
  color: var(--gold);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
}

.time-trigger-btn:hover {
  border-color: var(--gold);
}

/* Bottom Navigation */
.app-bottom-nav {
  height: 64px;
  background-color: var(--surface-dark);
  border-top: 1px solid var(--border-dark);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 40;
  position: relative;
}

.nav-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
  padding: 6px 16px;
  border-radius: 8px;
}

.nav-tab span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.nav-tab.active {
  color: var(--gold);
}

.nav-tab.active svg {
  color: var(--gold);
}

/* Toast */
.toast-notice {
  position: absolute;
  bottom: 74px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background-color: rgba(28, 24, 30, 0.95);
  border: 1px solid var(--gold);
  color: #FFF;
  font-size: 12px;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  white-space: nowrap;
}

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

/* Modals */
.modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
  padding: 20px;
}

.modal-overlay.hidden {
  display: none;
}

.modal-dialog {
  background-color: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 320px;
  box-shadow: var(--shadow-md);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 12px;
}

.modal-body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.modal-btns {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}


/* Classical Scroll Ecosystem Return Ribbon */
.cs-hub-header-bar {
  background: rgba(10, 10, 14, 0.95);
  border-bottom: 1px solid rgba(212, 175, 55, 0.25);
  padding: 6px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cs-hub-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #D4AF37;
  text-decoration: none;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: opacity 0.2s;
}
.cs-hub-back-link:hover {
  opacity: 0.8;
}


.cs-hub-motto {
  font-size: 10px;
  font-style: italic;
  color: rgba(212, 175, 55, 0.7);
  letter-spacing: 0.3px;
  display: none;
}
@media (min-width: 380px) {
  .cs-hub-motto {
    display: inline-block;
  }
}

.cs-manifesto-card {
  background: var(--surface-dark, #18171e) !important;
  border-left: 3px solid var(--gold, #d4af37) !important;
}
.manifesto-tag {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--gold, #d4af37);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.cs-manifesto-card h3 {
  font-style: italic;
  font-size: 13px;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.4;
}
.cs-manifesto-card p {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary, #b0aab9);
}
