/* =============================================================
   PANELPULSE — TACTILE NEO-COMIC DESIGN SYSTEM
   Phase 2: Comprehensive Production-Grade Stylesheet
   Covers All 4 SPA Views, Navigation, Modals & Components
============================================================= */

/* ─────────────────────────────────────────────────────────────
   01. DESIGN TOKENS (CSS VARIABLES)
───────────────────────────────────────────────────────────── */
:root {
  /* Ink Contours */
  --ink: #111827;
  --ink-soft: #1f2937;
  --ink-muted: #374151;
  --ink-border: 3px solid var(--ink);
  --ink-border-sm: 2px solid var(--ink);
  --ink-border-lg: 4px solid var(--ink);

  /* Comic Color Palette */
  --pop-yellow: #facc15;
  --pop-yellow-hover: #eab308;
  --pop-yellow-lite: #fef08a;
  --pop-coral: #f43f5e;
  --pop-coral-hover: #e11d48;
  --pop-coral-lite: #fda4af;
  --pop-purple: #8b5cf6;
  --pop-purple-hover: #7c3aed;
  --pop-purple-lite: #c4b5fd;
  --pop-cyan: #06b6d4;
  --pop-cyan-hover: #0891b2;
  --pop-cyan-lite: #a5f3fc;
  --pop-green: #10b981;
  --pop-green-lite: #a7f3d0;
  --pop-orange: #f97316;

  /* Surfaces (Dark Mode Default) */
  --bg-void: #0a0c12;
  --bg-base: #0f111a;
  --bg-surface: #171b26;
  --bg-surface-raised: #1f2433;
  --bg-overlay: #282f42;
  --bg-glass: rgba(23, 27, 38, 0.88);

  /* Text Colors */
  --text-primary: #f9fafb;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --text-inverse: #111827;

  /* Typography */
  --font-display: 'Bangers', cursive, Impact, sans-serif;
  --font-ui: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Tactile Neo-Comic Shadows (Clay + Hard Drop) */
  --shadow-sm: 2px 2px 0px var(--ink);
  --shadow-md: 4px 4px 0px var(--ink);
  --shadow-lg: 6px 6px 0px var(--ink);
  --shadow-xl: 8px 8px 0px var(--ink);
  --shadow-clay-yellow: inset 2px 2px 4px rgba(255,255,255,0.4), inset -2px -2px 4px rgba(0,0,0,0.25), 4px 4px 0px var(--ink);
  --shadow-clay-coral: inset 2px 2px 4px rgba(255,255,255,0.35), inset -2px -2px 4px rgba(0,0,0,0.3), 4px 4px 0px var(--ink);
  --shadow-clay-surface: inset 1px 1px 2px rgba(255,255,255,0.1), inset -1px -1px 2px rgba(0,0,0,0.4), 4px 4px 0px var(--ink);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --radius-blob: 255px 15px 225px 15px/15px 225px 15px 255px;

  /* Golden Ratio (phi = 1.618) Proportions & Fibonacci Scale */
  --phi: 1.618;
  --phi-major: 61.8%;
  --phi-minor: 38.2%;
  --phi-xs: 5px;
  --phi-sm: 8px;
  --phi-md: 13px;
  --phi-lg: 21px;
  --phi-xl: 34px;
  --phi-2xl: 55px;
  --phi-3xl: 89px;

  /* Layout Constants */
  --header-height: 76px;
  --max-width: 1440px;
}

[data-theme="light"] {
  --bg-void: #f1f5f9;
  --bg-base: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-raised: #f1f5f9;
  --bg-overlay: #e2e8f0;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --text-primary: #111827;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  /* Risograph Halftone Pattern Overlay */
  background-image: radial-gradient(var(--ink-muted) 1px, transparent 1px);
  background-size: 24px 24px;
}

body.no-scroll {
  overflow: hidden;
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
  user-select: none;
}

ul, ol {
  list-style: none;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--pop-yellow);
  color: var(--ink);
  font-weight: 800;
  padding: 10px 20px;
  border: var(--ink-border);
  box-shadow: var(--shadow-md);
  z-index: 10000;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 20px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ─────────────────────────────────────────────────────────────
   03. BUTTONS & CONTROLS DESIGN SYSTEM
───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-md);
  border: var(--ink-border);
  box-shadow: var(--shadow-md);
  transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}

.btn:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-sm);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: var(--shadow-sm) !important;
}

.btn--primary {
  background: var(--pop-yellow);
  color: var(--ink);
}
.btn--primary:hover {
  background: var(--pop-yellow-hover);
}

.btn--coral {
  background: var(--pop-coral);
  color: #fff;
}
.btn--coral:hover {
  background: var(--pop-coral-hover);
}

.btn--ghost {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
}
.btn--ghost:hover {
  background: var(--bg-overlay);
}

.btn--sm {
  padding: 6px 14px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.btn--sm:hover {
  box-shadow: var(--shadow-md);
}

.btn--full-width {
  width: 100%;
}

/* Inputs & Form Controls */
.studio-input, .select-input, .studio-textarea, .comment-textarea, .search-input {
  background: var(--bg-surface);
  color: var(--text-primary);
  border: var(--ink-border-sm);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.studio-input:focus, .select-input:focus, .studio-textarea:focus, .comment-textarea:focus, .search-input:focus {
  border-color: var(--pop-yellow);
  box-shadow: var(--shadow-md), 0 0 0 2px var(--pop-yellow-lite);
}

.select-input {
  cursor: pointer;
}

.select-input--compact {
  padding: 6px 10px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.char-counter {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: var(--font-ui);
  text-align: right;
  margin-top: 4px;
  display: block;
}

.char-counter-warning {
  color: var(--pop-coral);
  font-weight: 700;
  font-size: 0.78rem;
  margin-left: 8px;
}

/* ─────────────────────────────────────────────────────────────
   04. GLOBAL HEADER & MEGA NAVIGATION
───────────────────────────────────────────────────────────── */
#global-header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--ink-border);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

#global-header.header--hidden {
  transform: translateY(-100%);
}

.nav-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 24px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--pop-yellow);
  color: var(--ink);
  border: var(--ink-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transform: rotate(-3deg);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-logo:hover .logo-icon {
  transform: rotate(4deg) scale(1.08);
}

.logo-wordmark {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 1px;
  line-height: 1;
}

.logo-panel,
.logo-komi {
  color: var(--pop-yellow);
  text-shadow: 2px 2px 0px var(--ink);
}

.logo-pulse,
.logo-crew {
  color: var(--pop-coral);
  text-shadow: 2px 2px 0px var(--ink);
}

.logo-tagline {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: none;
}
@media (min-width: 1200px) {
  .logo-tagline { display: block; }
}

/* Nav Links */
.primary-nav-links {
  display: none;
  align-items: center;
  gap: 8px;
}
@media (min-width: 900px) {
  .primary-nav-links { display: flex; }
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: all 0.15s ease;
}

.nav-link:hover, .nav-dropdown-trigger[aria-expanded="true"] {
  color: var(--text-primary);
  background: var(--bg-surface-raised);
  border-color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.nav-link--studio {
  background: rgba(250, 204, 21, 0.15);
  color: var(--pop-yellow);
  border: 2px solid var(--pop-yellow);
}
.nav-link--studio:hover {
  background: var(--pop-yellow);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.nav-badge {
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  background: var(--pop-coral);
  color: #fff;
  border: 1px solid var(--ink);
}

/* Mega Menu Dropdowns */
.mega-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 480px;
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  padding: 20px;
  z-index: 1100;
  animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.mega-dropdown--genres {
  min-width: 420px;
}

@keyframes dropdownFade {
  from { opacity: 0; transform: translateY(-8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.mega-dropdown-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
}

.mega-col-heading {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--pop-yellow);
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.mega-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.mega-link:hover {
  background: var(--bg-surface-raised);
}

.mega-link-icon {
  font-size: 1.3rem;
}

.mega-link-body strong {
  display: block;
  font-size: 0.9rem;
  color: var(--text-primary);
}
.mega-link-body span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Genre Pills Grid */
.genre-grid-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.genre-pill-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s, background 0.15s;
}
.genre-pill-link:hover {
  background: var(--pop-yellow);
  color: var(--ink);
  transform: translate(-1px, -1px);
}

/* Style Showcase List */
.style-showcase-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.style-showcase-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  transition: transform 0.15s;
}
.style-showcase-link:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--pop-yellow);
}

.style-info strong {
  display: block;
  font-size: 0.9rem;
}
.style-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Featured Card in Mega Menu */
.mega-featured-card {
  width: 180px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.mega-featured-thumb img {
  width: 100%;
  height: 100px;
  object-fit: cover;
}
.mega-featured-body {
  padding: 10px;
}
.mega-featured-badge {
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--pop-coral);
  text-transform: uppercase;
}
.mega-featured-title {
  font-size: 0.85rem;
  font-weight: 800;
  margin: 2px 0;
}
.mega-featured-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.mega-featured-cta {
  display: block;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--pop-yellow);
}

/* Nav Quick Actions */
.nav-quick-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--bg-surface);
  border: var(--ink-border-sm);
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  font-size: 0.88rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}
.nav-search-trigger:hover {
  border-color: var(--pop-yellow);
  color: var(--text-primary);
}
.search-kbd {
  font-size: 0.7rem;
  background: var(--bg-surface-raised);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--ink-muted);
  color: var(--text-secondary);
}

.nav-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, background 0.15s;
}
.nav-icon-btn:hover {
  transform: translate(-1px, -1px);
  background: var(--bg-surface-raised);
}

.nav-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: var(--pop-coral);
  border-radius: 50%;
  border: 1px solid var(--ink);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--pop-coral);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
}

/* User Profile Pill */
.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--bg-surface);
  border: var(--ink-border-sm);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}
.profile-avatar img {
  border-radius: 50%;
  border: 2px solid var(--ink);
}
.profile-username {
  font-weight: 700;
  font-size: 0.85rem;
  display: none;
}
@media (min-width: 1100px) {
  .profile-username { display: inline; }
}
.profile-tier-badge {
  font-size: 0.65rem;
  font-weight: 800;
  background: var(--pop-yellow);
  color: var(--ink);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  display: none;
}
@media (min-width: 1200px) {
  .profile-tier-badge { display: inline-block; }
}

.profile-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 200px;
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 1100;
}
.profile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.profile-menu-item:hover {
  background: var(--bg-surface-raised);
}
.menu-divider {
  height: 2px;
  background: var(--ink);
  margin: 6px 0;
}

/* Mobile Menu Trigger */
.mobile-menu-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: var(--bg-surface);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 900px) {
  .mobile-menu-btn { display: none; }
}
.hamburger-bar {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
}

/* ─────────────────────────────────────────────────────────────
   05. VIEW 1 — LANDING & DISCOVERY FEED
───────────────────────────────────────────────────────────── */
.app-view {
  display: block;
}
.app-view[hidden] {
  display: none !important;
}

/* Hero Section */
.hero-section {
  position: relative;
  max-width: var(--max-width);
  margin: 24px auto 40px;
  padding: 0 24px;
}

.hero-comic-feature {
  position: relative;
  background: var(--bg-surface);
  border: var(--ink-border-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  min-height: 480px;
  display: grid;
  grid-template-columns: 1fr;
  padding: 40px;
}
@media (min-width: 1024px) {
  .hero-comic-feature {
    grid-template-columns: 1.4fr 0.8fr;
    padding: 60px;
    align-items: center;
  }
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
}
.hero-backdrop-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15,17,26,0.95) 0%, rgba(15,17,26,0.8) 50%, rgba(15,17,26,0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
}

.hero-rank-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pop-coral);
  color: #fff;
  border: var(--ink-border-sm);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
}
.hero-rank-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
}
.hero-trend-tag {
  font-weight: 800;
  font-size: 0.78rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-identity {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.hero-genre-tag {
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
}
.hero-ai-badge {
  background: var(--pop-yellow);
  color: var(--ink);
  border: var(--ink-border-sm);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 4px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 0.95;
  color: #ffffff;
  text-shadow: 4px 4px 0px var(--ink);
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

.hero-synopsis {
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
}

.hero-creator-credit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-style: normal;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}
.hero-creator-avatar {
  border-radius: 50%;
  border: 2px solid var(--ink);
}
.hero-creator-name {
  color: var(--pop-yellow);
  font-weight: 700;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.hero-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.9rem;
}
.hero-status-pill {
  background: var(--pop-green);
  color: var(--ink);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 900;
  border: 1px solid var(--ink);
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn--hero-primary {
  background: var(--pop-yellow);
  color: var(--ink);
  padding: 14px 28px;
  font-size: 1.05rem;
}
.btn--hero-secondary {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
  padding: 14px 24px;
}
.btn--hero-ghost {
  background: transparent;
  color: var(--text-primary);
  border: var(--ink-border-sm);
  padding: 14px 20px;
}

/* Secondary Picks (Right Column) */
.hero-secondary-picks {
  position: relative;
  z-index: 1;
  display: none;
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-md);
}
@media (min-width: 1024px) {
  .hero-secondary-picks { display: block; }
}

.hero-secondary-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--pop-yellow);
  margin-bottom: 14px;
  text-transform: uppercase;
}

.hero-secondary-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-secondary-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, border-color 0.15s;
}
.hero-secondary-card:hover {
  transform: translate(-2px, -2px);
  border-color: var(--pop-yellow);
}

.hero-secondary-thumb {
  position: relative;
  width: 50px;
  height: 65px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--ink);
}
.hero-secondary-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-secondary-rank {
  position: absolute;
  top: 2px;
  left: 2px;
  background: var(--pop-coral);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 3px;
  border: 1px solid var(--ink);
}

.hero-secondary-info strong {
  display: block;
  font-size: 0.9rem;
}
.hero-secondary-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.hero-scroll-cue {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 16px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  animation: bounceCue 2s infinite;
}
@keyframes bounceCue {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* ─────────────────────────────────────────────────────────────
   06. FILTER BAR & COMIC GRID
───────────────────────────────────────────────────────────── */
.discovery-filter-bar {
  max-width: var(--max-width);
  margin: 0 auto 32px;
  padding: 0 24px;
}

.filter-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
}

.filter-tabs-scroll-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}
.filter-tabs-scroll-wrapper::-webkit-scrollbar {
  display: none;
}

.filter-tab {
  padding: 6px 14px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.filter-tab:hover {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
}
.filter-tab--active {
  background: var(--pop-yellow);
  color: var(--ink);
  border: var(--ink-border-sm);
  box-shadow: var(--shadow-sm);
}

.filter-bar-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.filter-sort-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Section Header */
.landing-section {
  max-width: var(--max-width);
  margin: 0 auto 60px;
  padding: 0 24px;
}

.landing-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.landing-section-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 2px 2px 0px var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.landing-section-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.section-see-all-link {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--pop-yellow);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s;
}
.section-see-all-link:hover {
  transform: translateX(4px);
}

/* Comic Grid Layout */
.comic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}

.comic-card-wrapper {
  list-style: none;
}

.comic-card {
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  height: 100%;
}
.comic-card:hover {
  transform: translate(-4px, -4px);
  box-shadow: var(--shadow-xl);
}

.comic-card-cover {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg-surface-raised);
}
.comic-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.comic-card:hover .comic-card-cover img {
  transform: scale(1.04);
}

.comic-card-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 40%, rgba(0,0,0,0.8) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
}

.card-rank-badge {
  background: var(--pop-coral);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  border: var(--ink-border-sm);
  box-shadow: var(--shadow-sm);
  align-self: flex-start;
}

.card-ai-badge {
  background: var(--pop-yellow);
  color: var(--ink);
  font-weight: 900;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: var(--ink-border-sm);
  align-self: flex-end;
}

.card-quick-read-btn {
  background: var(--pop-yellow);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.85rem;
  text-align: center;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: var(--ink-border-sm);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.2s;
}
.comic-card:hover .card-quick-read-btn {
  opacity: 1;
  transform: translateY(0);
}

.comic-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.comic-card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.comic-tag {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--bg-surface-raised);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--ink-muted);
}
.comic-tag--cyberpunk { background: rgba(6,182,212,0.2); color: var(--pop-cyan); border-color: var(--pop-cyan); }
.comic-tag--fantasy { background: rgba(139,92,246,0.2); color: var(--pop-purple-lite); border-color: var(--pop-purple); }
.comic-tag--romance { background: rgba(244,63,94,0.2); color: var(--pop-coral-lite); border-color: var(--pop-coral); }
.comic-tag--horror { background: rgba(239,68,68,0.2); color: #fca5a5; border-color: #ef4444; }

.comic-card-title {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 4px;
}
.comic-card-title a:hover {
  color: var(--pop-yellow);
}

.comic-card-creator {
  font-style: normal;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.comic-card-creator a {
  color: var(--pop-yellow);
  font-weight: 600;
}

.comic-card-synopsis {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex-grow: 1;
}

.comic-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ink-muted);
  padding-top: 10px;
  margin-top: auto;
}

.comic-card-stats {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}
.comic-stat {
  display: flex;
  align-items: center;
  gap: 3px;
}

.comic-card-actions {
  display: flex;
  gap: 6px;
}
.card-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: 6px;
  box-shadow: 1px 1px 0px var(--ink);
  transition: all 0.15s;
}
.card-action-btn:hover {
  transform: translate(-1px, -1px);
  background: var(--pop-yellow);
  color: var(--ink);
}
.bookmark-btn--active {
  background: var(--pop-coral) !important;
  color: #fff !important;
}

/* ─────────────────────────────────────────────────────────────
   07. AI STUDIO SPOTLIGHT & CAROUSEL
───────────────────────────────────────────────────────────── */
.studio-callout-banner {
  background: linear-gradient(135deg, var(--bg-surface-raised) 0%, rgba(250,204,21,0.1) 100%);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
}
.studio-callout-content {
  display: flex;
  align-items: center;
  gap: 16px;
}
.studio-callout-icon {
  font-size: 2.2rem;
}
.studio-callout-text strong {
  display: block;
  font-size: 1.1rem;
  font-family: var(--font-ui);
}
.studio-callout-text span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.spotlight-scroll-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.spotlight-comic-list {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 10px 4px 20px;
  scrollbar-width: none;
  width: 100%;
}
.spotlight-comic-list::-webkit-scrollbar {
  display: none;
}

.spotlight-card-wrapper {
  flex: 0 0 320px;
  scroll-snap-align: start;
}

.spotlight-card {
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.spotlight-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: var(--shadow-lg);
}

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

.spotlight-card-body {
  padding: 16px;
}

.spotlight-card-tags {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.spotlight-ai-tag {
  background: var(--pop-yellow);
  color: var(--ink);
  font-weight: 900;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 4px;
}
.spotlight-genre-tag {
  background: var(--bg-surface-raised);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--ink-muted);
}

.spotlight-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.spotlight-creator {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.spotlight-creator a {
  color: var(--pop-yellow);
}

.spotlight-card-stats {
  display: flex;
  gap: 12px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.spotlight-card-actions {
  display: flex;
  gap: 8px;
}

.spotlight-scroll-btn {
  position: absolute;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pop-yellow);
  color: var(--ink);
  border: var(--ink-border);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}
.spotlight-scroll-btn:hover {
  transform: scale(1.1);
}
.spotlight-scroll-btn--prev { left: -20px; }
.spotlight-scroll-btn--next { right: -20px; }
.spotlight-scroll-btn:disabled { display: none; }

/* Landing CTA Section */
.landing-cta-section {
  max-width: var(--max-width);
  margin: 0 auto 80px;
  padding: 0 24px;
}
.landing-cta-inner {
  background: linear-gradient(135deg, #1f2433 0%, #171b26 100%);
  border: var(--ink-border-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.landing-cta-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  color: var(--pop-yellow);
  text-shadow: 3px 3px 0px var(--ink);
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.landing-cta-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 28px;
}
.landing-cta-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}
.btn--cta-primary {
  background: var(--pop-yellow);
  color: var(--ink);
  padding: 14px 32px;
  font-size: 1.1rem;
}

/* ─────────────────────────────────────────────────────────────
   08. VIEW 2 — BROWSE LIBRARY
───────────────────────────────────────────────────────────── */
.browse-layout {
  max-width: var(--max-width);
  margin: 24px auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 1024px) {
  .browse-layout {
    grid-template-columns: 280px 1fr;
  }
}

.browse-sidebar {
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
  height: fit-content;
}

.browse-sidebar--hidden {
  display: none !important;
}

.browse-sidebar-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--pop-yellow);
  margin-bottom: 8px;
}

.sidebar-filter-reset {
  font-size: 0.8rem;
  color: var(--pop-coral);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.sidebar-filter-reset:hover {
  text-decoration: underline;
}

.filter-fieldset {
  border: none;
  border-top: 1px solid var(--ink-muted);
  padding: 16px 0;
  margin-bottom: 8px;
}

.filter-legend {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.filter-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.filter-checkbox {
  accent-color: var(--pop-yellow);
  width: 16px;
  height: 16px;
}

.rating-range-control {
  padding: 8px 0;
}
.range-input {
  width: 100%;
  accent-color: var(--pop-yellow);
}
.rating-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Browse Main */
.browse-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: var(--ink-border);
}

.browse-results-heading {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: #fff;
}
.browse-result-count {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text-muted);
  font-weight: normal;
}

.browse-toolbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-toggle-group {
  display: flex;
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.view-toggle-btn {
  padding: 6px 10px;
  background: var(--bg-surface);
  color: var(--text-muted);
  display: flex;
  align-items: center;
}
.view-toggle-btn--active {
  background: var(--pop-yellow);
  color: var(--ink);
}

.active-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.active-filter-tag {
  background: var(--pop-yellow);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 6px;
}
.remove-filter-tag {
  font-weight: 900;
  cursor: pointer;
}

.comic-grid--list-view {
  grid-template-columns: 1fr !important;
}
.comic-grid--list-view .comic-card {
  flex-direction: row;
  height: 200px;
}
.comic-grid--list-view .comic-card-cover {
  width: 150px;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.browse-load-more-wrapper {
  text-align: center;
  margin-top: 40px;
}

/* ─────────────────────────────────────────────────────────────
   09. VIEW 3 — COMIC READER
───────────────────────────────────────────────────────────── */
.reader-layout {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  min-height: calc(100vh - var(--header-height));
  display: flex;
}

/* Reader Chapter Sidebar */
.reader-sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: 320px;
  background: var(--bg-surface);
  border-right: var(--ink-border);
  box-shadow: var(--shadow-xl);
  z-index: 900;
  overflow-y: auto;
  padding: 24px;
}
.reader-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--ink-muted);
}
.reader-sidebar-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--pop-yellow);
}

.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chapter-list-link {
  display: block;
  padding: 10px 14px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}
.chapter-list-link:hover, .chapter-list-item--active .chapter-list-link {
  background: var(--pop-yellow);
  color: var(--ink);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-sm);
}
.chapter-list-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  display: block;
}
.chapter-list-title {
  font-size: 0.85rem;
  font-weight: 700;
  display: block;
}
.chapter-list-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.chapter-list-item--active .chapter-list-meta {
  color: var(--ink);
}

/* Reader Main */
.reader-main {
  flex-grow: 1;
  padding: 20px 24px 80px;
  max-width: 900px;
  margin: 0 auto;
}

.reader-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.reader-topbar-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
}

.reader-breadcrumb {
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  gap: 6px;
  align-items: center;
}
.reader-chapter-breadcrumb {
  color: var(--pop-yellow);
}

.reader-view-controls {
  display: flex;
  gap: 4px;
}
.reader-mode-btn {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  background: var(--bg-surface-raised);
  border: 1px solid var(--ink-muted);
}
.reader-mode-btn--active {
  background: var(--pop-yellow);
  color: var(--ink);
  border: var(--ink-border-sm);
}

.reader-settings-panel {
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.reader-bg-swatches {
  display: flex;
  gap: 8px;
}
.reader-bg-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--ink);
}
.reader-bg-swatch--black { background: #000; }
.reader-bg-swatch--dark { background: #161a24; }
.reader-bg-swatch--sepia { background: #fbf0d9; }
.reader-bg-swatch--white { background: #fff; }
.reader-bg-swatch--active { outline: 3px solid var(--pop-yellow); }

/* Reader Canvas & Frame */
.reader-canvas-area {
  position: relative;
  margin: 0 auto 32px;
  background: #000;
  border: var(--ink-border-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  overflow: auto;
  max-height: 88vh;
}
.reader-page-frame {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 400px;
}
.reader-page-frame img {
  width: 100%;
  height: auto;
  max-height: 85vh;
  object-fit: contain;
  transition: transform 0.2s;
  transform-origin: top center;
}
.reader-page-label {
  padding: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 700;
}

.reader-page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 16px;
  background: var(--bg-surface);
  border-top: var(--ink-border);
}
.reader-nav-btn {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--pop-yellow);
  color: var(--ink);
  border: var(--ink-border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.reader-page-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}
.page-jump-input {
  width: 48px;
  text-align: center;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: 4px;
  padding: 4px;
}

/* Chapter End CTA */
.chapter-end-cta {
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  margin-bottom: 40px;
}
.chapter-end-message {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--pop-yellow);
  margin-bottom: 16px;
}
.chapter-end-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* Comments & Reactions */
.reader-comments-section {
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.reader-comments-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.reader-comments-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--pop-yellow);
}

.reaction-picker-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink-muted);
}
.reaction-btn {
  padding: 6px 12px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.1s;
}
.reaction-btn:hover {
  transform: translate(-1px, -1px);
}
.reaction-btn--active {
  background: var(--pop-yellow);
  color: var(--ink);
}

.comment-input-wrapper {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}
.comment-avatar {
  border-radius: 50%;
  border: 2px solid var(--ink);
  flex-shrink: 0;
}
.comment-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.comment-card {
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.comment-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.comment-author-name {
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--pop-yellow);
}
.comment-timestamp {
  font-size: 0.72rem;
  color: var(--text-muted);
}
.comment-body {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 10px;
}
.comment-card-footer {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 700;
}

/* ─────────────────────────────────────────────────────────────
   10. VIEW 4 — AI SCRIPT-TO-COMIC STUDIO
───────────────────────────────────────────────────────────── */
.studio-layout {
  max-width: var(--max-width);
  margin: 24px auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 1024px) {
  .studio-layout {
    grid-template-columns: 440px 1fr;
  }
}

.studio-panel {
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 24px;
}

.studio-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: var(--ink-border);
}

.studio-panel-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--pop-yellow);
  display: flex;
  align-items: center;
  gap: 8px;
}

.studio-mode-tabs {
  display: flex;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.studio-mode-tab {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--text-muted);
}
.studio-mode-tab--active {
  background: var(--pop-yellow);
  color: var(--ink);
}

.studio-fieldset {
  border: none;
  margin-bottom: 20px;
}
.studio-legend {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.studio-form-row--two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.studio-form-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.studio-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.studio-script-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.studio-script-helper-btn {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--pop-yellow);
  background: var(--bg-surface-raised);
  border: 1px solid var(--ink-muted);
  padding: 4px 8px;
  border-radius: 4px;
}

.script-format-guide {
  background: var(--bg-void);
  border: 1px solid var(--ink-muted);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 10px;
  font-size: 0.75rem;
}
.guide-code {
  color: var(--pop-cyan-lite);
  font-family: monospace;
}

/* Art Style Selector Cards */
.art-style-selector {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}
.art-style-radio {
  display: none;
}
.art-style-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 4px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}
.art-style-card--selected, .art-style-radio:checked + .art-style-card {
  border-color: var(--pop-yellow);
  background: rgba(250, 204, 21, 0.15);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-sm);
}
.art-style-name {
  font-size: 0.7rem;
  font-weight: 800;
  margin-top: 4px;
}

/* AI Engine Selector */
.ai-engine-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ai-engine-radio {
  display: none;
}
.ai-engine-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 6px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.ai-engine-radio:checked + .ai-engine-card {
  border-color: var(--pop-yellow);
  background: rgba(250, 204, 21, 0.15);
}
.ai-engine-name {
  font-size: 0.75rem;
  font-weight: 800;
  margin: 2px 0;
}
.ai-engine-badge {
  font-size: 0.65rem;
  font-weight: 900;
  padding: 1px 4px;
  border-radius: 3px;
}
.ai-engine-badge--free { background: var(--pop-green); color: var(--ink); }
.ai-engine-badge--pro { background: var(--pop-coral); color: #fff; }

.studio-advanced-options {
  border: 1px solid var(--ink-muted);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 20px;
}
.studio-advanced-summary {
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.studio-advanced-inner {
  margin-top: 12px;
}

/* Generate CTA */
.btn--generate {
  width: 100%;
  padding: 16px;
  font-size: 1.15rem;
  background: var(--pop-yellow);
  color: var(--ink);
  border: var(--ink-border);
  box-shadow: var(--shadow-md);
  font-family: var(--font-display);
  letter-spacing: 1px;
}
.btn--generate:hover {
  background: var(--pop-yellow-hover);
  box-shadow: var(--shadow-lg);
}

/* Studio Right Output Stage */
.studio-output-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: var(--ink-border);
}

.studio-output-actions {
  display: flex;
  gap: 8px;
}

.studio-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 480px;
  background: var(--bg-void);
  border: 2px dashed var(--ink-muted);
  border-radius: var(--radius-md);
  padding: 40px;
}
.empty-state-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: #fff;
  margin: 16px 0 8px;
}
.empty-state-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 420px;
  margin-bottom: 24px;
}

/* Generation Progress */
.studio-generation-status {
  background: var(--bg-surface-raised);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.generation-progress-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-grow: 1;
}
.generation-stage {
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--pop-yellow);
}
.generation-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 5px;
  accent-color: var(--pop-yellow);
  margin: 8px 0;
}
.generation-step-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Fabric Studio Canvas Wrapper */
.studio-fabric-wrapper {
  background: #000;
  border: var(--ink-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
}

.speech-bubble-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-top: 12px;
}
.bubble-toolbar-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.bubble-tool-btn {
  padding: 4px 8px;
  background: var(--bg-surface);
  border: 1px solid var(--ink-muted);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}
.bubble-tool-btn--active {
  background: var(--pop-yellow);
  color: var(--ink);
  border-color: var(--ink);
}

/* ─────────────────────────────────────────────────────────────
   11. OVERLAYS, MODALS & GLOBAL PANELS
───────────────────────────────────────────────────────────── */
.global-overlay-backdrop, .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1200;
}

/* search-overlay-backdrop is a child of .search-overlay — keep it passive */
.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: transparent;
  cursor: default;
}

/* ── SEARCH OVERLAY — complete rewrite to fix z-index/blur stacking ── */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  justify-content: center;
  padding: 80px 24px 24px;
  /* The blur+dim lives on the overlay itself, NOT on a child div */
  background: rgba(10, 12, 18, 0.80);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.search-overlay[hidden] {
  display: none !important;
}

/* The inner backdrop div is now purely decorative / click-to-close — no z-index fighting */
.search-overlay-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  /* transparent — visual blur is now on .search-overlay */
  background: transparent;
}

.search-overlay-container {
  position: relative;
  z-index: 2;          /* above the backdrop div */
  width: 100%;
  max-width: 640px;
  background: var(--bg-surface);
  border: var(--ink-border-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl), 0 0 0 1px rgba(250,204,21,0.15);
  padding: 24px;
  height: fit-content;
  max-height: 80vh;
  overflow-y: auto;
  align-self: flex-start;   /* don't stretch vertically */
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-muted);
}
.search-input {
  padding-left: 44px;
  padding-right: 60px;
  font-size: 1.1rem;
}
.search-close-kbd {
  position: absolute;
  right: 14px;
  font-size: 0.7rem;
  background: var(--bg-surface-raised);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--ink-muted);
  color: var(--text-muted);
}

.search-genre-quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.search-quick-tag {
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--bg-surface-raised);
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink-muted);
}
.search-quick-tag:hover {
  background: var(--pop-yellow);
  color: var(--ink);
}

.search-result-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.search-result-item {
  padding: 10px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.search-result-item:hover {
  background: var(--pop-yellow);
  color: var(--ink);
}
.search-result-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.search-overlay-close-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1400;    /* above everything in the search overlay */
  font-size: 1.5rem;
  color: #fff;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  transition: background 0.15s;
}
.search-overlay-close-btn:hover {
  background: rgba(255,255,255,0.25);
}

/* Slide-over Panels (Bookmarks & Notifications) */
.slide-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 360px;
  background: var(--bg-surface);
  border-left: var(--ink-border);
  box-shadow: var(--shadow-xl);
  z-index: 1300;
  padding: 24px;
  overflow-y: auto;
}
.slide-panel[hidden] {
  display: none !important;
}

.slide-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: var(--ink-border);
}
.slide-panel-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--pop-yellow);
}

.bookmarks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bookmark-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
}

.notifications-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.notification-item {
  padding: 12px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  display: flex;
  gap: 10px;
}
.notification-item--unread {
  border-color: var(--pop-coral);
}

/* Publish Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal[hidden] {
  display: none !important;
}

.modal-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 560px;
  background: var(--bg-surface);
  border: var(--ink-border-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 28px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: var(--ink-border);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--pop-yellow);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: var(--bg-surface);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.9rem;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.toast--visible {
  transform: translateY(0);
  opacity: 1;
}
.toast--hiding {
  transform: translateY(20px);
  opacity: 0;
}
.toast--success { border-color: var(--pop-green); }
.toast--error { border-color: var(--pop-coral); }
.toast--warning { border-color: var(--pop-yellow); }

/* ─────────────────────────────────────────────────────────────
   12. GLOBAL FOOTER
───────────────────────────────────────────────────────────── */
#global-footer {
  background: var(--bg-void);
  border-top: var(--ink-border-lg);
  padding: 60px 24px 30px;
  position: relative;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1.5fr repeat(3, 1fr) 1.5fr;
  }
}

.footer-brand-logo {
  display: inline-block;
  margin-bottom: 12px;
}
.footer-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
}
.footer-social-links {
  display: flex;
  gap: 10px;
}
.footer-social-link {
  width: 36px;
  height: 36px;
  background: var(--bg-surface);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}
.footer-social-link:hover {
  background: var(--pop-yellow);
  color: var(--ink);
}

.footer-col-heading {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--pop-yellow);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.footer-link {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 2;
  transition: color 0.15s;
}
.footer-link:hover {
  color: var(--pop-yellow);
}

.footer-newsletter-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.newsletter-input-group {
  display: flex;
  gap: 8px;
}

.footer-bottom-bar {
  max-width: var(--max-width);
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid var(--ink-muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.footer-legal-links {
  display: flex;
  gap: 16px;
}

/* ─────────────────────────────────────────────────────────────
   13. MOBILE DRAWER & RESPONSIVE POLISH
───────────────────────────────────────────────────────────── */
.mobile-nav-drawer {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-surface);
  border-bottom: var(--ink-border);
  box-shadow: var(--shadow-xl);
  z-index: 999;
  padding: 24px;
  overflow-y: auto;
}
.mobile-nav-drawer[hidden] {
  display: none !important;
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mobile-nav-link {
  font-family: var(--font-ui);
  font-size: 1.1rem;
  font-weight: 800;
  padding: 10px 14px;
  background: var(--bg-surface-raised);
  border: var(--ink-border-sm);
  border-radius: var(--radius-sm);
  display: block;
}
.mobile-nav-details summary {
  list-style: none;
  cursor: pointer;
}
.mobile-nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 0 10px 20px;
}
.mobile-nav-submenu a {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* Animations */
.animate--on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease-out, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.animate--visible {
  opacity: 1;
  transform: translateY(0);
}

/* Reader speech bubble overlay */
.speech-bubble-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.speech-bubble-layer canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ─────────────────────────────────────────────────────────────
   14. TACTILE NEO-COMIC REFINEMENTS & ADMIN DASHBOARD
───────────────────────────────────────────────────────────── */

/* Enhanced Tactile Neo-Comic Button Outlines & Active States */
.btn, .filter-tab, .reaction-btn, .bubble-tool-btn, .admin-tab-btn {
  border: 3.5px solid var(--ink) !important;
  box-shadow: 4px 4px 0px var(--ink);
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.12s ease, background-color 0.15s ease;
}

.btn:hover, .filter-tab:hover, .reaction-btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--ink);
}

.btn:active, .filter-tab:active, .reaction-btn:active, .admin-tab-btn:active {
  transform: translate(3px, 3px) scale(0.98) !important;
  box-shadow: 1px 1px 0px var(--ink) !important;
}

/* Nav Badge for Admin */
.nav-link--admin {
  background: rgba(139, 92, 246, 0.15);
  color: var(--pop-purple-lite);
  border: 2px solid var(--pop-purple);
}
.nav-link--admin:hover {
  background: var(--pop-purple);
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.nav-badge--admin {
  background: var(--pop-purple);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
}

/* Admin Container */
.app-view--admin {
  min-height: calc(100vh - var(--header-height));
  padding-bottom: 80px;
}

.admin-wrapper {
  max-width: var(--max-width);
  margin: 28px auto 0;
  padding: 0 24px;
}

/* Admin Header Banner */
.admin-header-banner {
  background: linear-gradient(135deg, var(--bg-surface-raised) 0%, rgba(139,92,246,0.15) 100%);
  border: 3.5px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 6px 6px 0px var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 28px;
}

.admin-badge-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.admin-badge-pill {
  background: var(--pop-purple);
  color: #fff;
  font-weight: 900;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0px var(--ink);
  text-transform: uppercase;
}
.admin-status-online {
  color: var(--pop-green);
  font-weight: 800;
  font-size: 0.8rem;
}

.admin-main-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  letter-spacing: 1px;
  color: #fff;
  text-shadow: 3px 3px 0px var(--ink);
  line-height: 1;
  margin-bottom: 8px;
}
.admin-main-subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  max-width: 680px;
}

.admin-header-actions {
  display: flex;
  gap: 12px;
}

/* Quick Stats Grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.admin-stat-card {
  background: var(--bg-surface);
  border: 3.5px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 4px 4px 0px var(--ink);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.15s ease;
}
.admin-stat-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--ink);
}

.admin-stat-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  border: 3px solid var(--ink);
  box-shadow: 3px 3px 0px var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.admin-stat-icon--yellow { background: var(--pop-yellow); color: var(--ink); }
.admin-stat-icon--coral  { background: var(--pop-coral); color: #fff; }
.admin-stat-icon--cyan   { background: var(--pop-cyan); color: var(--ink); }
.admin-stat-icon--purple { background: var(--pop-purple); color: #fff; }

.admin-stat-info {
  display: flex;
  flex-direction: column;
}
.admin-stat-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.admin-stat-value {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--text-primary);
  line-height: 1.1;
  margin: 2px 0;
}
.admin-stat-trend {
  font-size: 0.75rem;
  font-weight: 800;
}
.admin-trend--up { color: var(--pop-green); }
.admin-stat-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Admin Tabs Navigation */
.admin-tabs-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 24px;
  scrollbar-width: none;
}
.admin-tabs-nav::-webkit-scrollbar { display: none; }

.admin-tab-btn {
  padding: 10px 18px;
  background: var(--bg-surface);
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--text-secondary);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 4px 4px 0px var(--ink);
  cursor: pointer;
}
.admin-tab-btn:hover {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
}
.admin-tab-btn--active {
  background: var(--pop-yellow) !important;
  color: var(--ink) !important;
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--ink) !important;
}

/* Admin Subpanels & Cards */
.admin-subpanel[hidden] {
  display: none !important;
}

.admin-card {
  background: var(--bg-surface);
  border: 3.5px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: 6px 6px 0px var(--ink);
  margin-bottom: 32px;
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink);
}

.admin-card-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--pop-yellow);
  letter-spacing: 0.5px;
}
.admin-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Admin Table */
.admin-table-responsive {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}
.admin-table th {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 14px;
  text-align: left;
}
.admin-table tbody tr {
  background: var(--bg-surface-raised);
  transition: transform 0.15s ease;
}
.admin-table tbody tr:hover {
  transform: scale(1.005);
}
.admin-table td {
  padding: 12px 14px;
  border-top: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  font-size: 0.9rem;
  vertical-align: middle;
}
.admin-table td:first-child {
  border-left: 3px solid var(--ink);
  border-top-left-radius: var(--radius-sm);
  border-bottom-left-radius: var(--radius-sm);
}
.admin-table td:last-child {
  border-right: 3px solid var(--ink);
  border-top-right-radius: var(--radius-sm);
  border-bottom-right-radius: var(--radius-sm);
}

.admin-table-cover-img {
  width: 44px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--ink);
}

.admin-status-toggle-btn {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 900;
  border: 2px solid var(--ink);
  box-shadow: 2px 2px 0px var(--ink);
  cursor: pointer;
  text-transform: uppercase;
  transition: transform 0.1s;
}
.admin-status--published { background: var(--pop-green); color: var(--ink); }
.admin-status--draft     { background: var(--bg-overlay); color: var(--text-secondary); }
.admin-status--featured  { background: var(--pop-coral); color: #fff; }

.admin-table-action-group {
  display: flex;
  gap: 6px;
}

/* Hero Spotlight Manager */
.admin-grid-2col {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}
@media (min-width: 1024px) {
  .admin-grid-2col {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.hero-selector-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.hero-select-radio-card {
  display: block;
  cursor: pointer;
}
.hero-radio-input {
  display: none;
}
.hero-radio-card-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-surface-raised);
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 3px 3px 0px var(--ink);
  transition: all 0.15s ease;
}
.hero-radio-input:checked + .hero-radio-card-body {
  background: rgba(250, 204, 21, 0.15);
  border-color: var(--pop-yellow);
  box-shadow: 5px 5px 0px var(--ink);
  transform: translate(-2px, -2px);
}
.hero-radio-thumb {
  width: 48px;
  height: 64px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid var(--ink);
  flex-shrink: 0;
}
.hero-radio-meta {
  flex-grow: 1;
}
.hero-radio-meta strong {
  display: block;
  font-size: 0.95rem;
}
.hero-radio-meta span {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.hero-current-badge {
  background: var(--pop-coral);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--ink);
}

.admin-card--preview {
  background: linear-gradient(135deg, var(--bg-surface) 0%, #1a1e2b 100%);
}
.admin-preview-header {
  margin-bottom: 16px;
}
.admin-preview-label {
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 0.75rem;
  color: var(--pop-yellow);
  letter-spacing: 1px;
}

.hero-live-preview-box {
  background: var(--bg-surface-raised);
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: 4px 4px 0px var(--ink);
}
.hero-preview-badge {
  display: inline-block;
  background: var(--pop-coral);
  color: #fff;
  font-weight: 900;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  margin-bottom: 12px;
}
.hero-preview-title {
  font-family: var(--font-display);
  font-size: 2rem;
  color: #fff;
  text-shadow: 2px 2px 0px var(--ink);
  margin-bottom: 8px;
}
.hero-preview-synopsis {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}
.hero-preview-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 16px;
}
.hero-preview-actions {
  display: flex;
  gap: 8px;
}

/* Comic Uploader & Dropzone */
.admin-form-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 16px;
}
.studio-form-row--three-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.admin-genre-checkbox-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.genre-toggle-pill input {
  display: none;
}
.genre-toggle-pill span {
  display: inline-block;
  padding: 6px 12px;
  background: var(--bg-surface-raised);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 800;
  box-shadow: 2px 2px 0px var(--ink);
  cursor: pointer;
  transition: all 0.12s;
}
.genre-toggle-pill input:checked + span {
  background: var(--pop-yellow);
  color: var(--ink);
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--ink);
}

.admin-dropzone {
  border: 3px dashed var(--ink-muted);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  background: var(--bg-void);
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-dropzone:hover, .admin-dropzone:focus {
  border-color: var(--pop-yellow);
  background: rgba(250, 204, 21, 0.05);
}
.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.dropzone-icon {
  font-size: 2rem;
}
.dropzone-content strong {
  font-size: 0.9rem;
}
.dropzone-content span {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.dropzone-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.dropzone-preview img {
  max-height: 100px;
  border-radius: 4px;
  border: 2px solid var(--ink);
}
.panels-batch-count {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--pop-yellow);
}

.admin-form-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* Taxonomy Manager */
.taxonomy-columns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 16px;
}
.taxonomy-col {
  background: var(--bg-surface-raised);
  border: 3px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: 4px 4px 0px var(--ink);
}
.taxonomy-col-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--pop-yellow);
  margin-bottom: 14px;
}
.taxonomy-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 80px;
}
.tax-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--bg-surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.8rem;
  box-shadow: 2px 2px 0px var(--ink);
}
.tax-del-btn {
  font-size: 0.7rem;
  color: var(--pop-coral);
  cursor: pointer;
}
.tax-add-group {
  display: flex;
  gap: 8px;
}

/* ─────────────────────────────────────────────────────────────
   15. AUTHENTICATION MODAL & HEADER USER/GUEST STATES
───────────────────────────────────────────────────────────── */
.nav-guest-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-modal-container {
  max-width: 440px;
  background: var(--bg-surface);
  border: 3.5px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 8px 8px 0px var(--ink);
  padding: 24px;
}

.auth-tabs {
  display: flex;
  background: var(--bg-surface-raised);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 4px;
}
.auth-tab-btn {
  padding: 6px 14px;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
  background: none;
}
.auth-tab-btn--active {
  background: var(--pop-yellow);
  color: var(--ink);
  box-shadow: 2px 2px 0px var(--ink);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}

.auth-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 4px;
}
.auth-forgot-link {
  color: var(--pop-yellow);
  font-weight: 700;
}
.auth-forgot-link:hover {
  text-decoration: underline;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 18px 0 12px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--ink-muted);
}
.auth-divider span {
  padding: 0 10px;
}

.auth-social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.auth-social-btn {
  font-size: 0.85rem;
  padding: 8px 12px;
}

/* Fix hidden specificity override for auth nav containers */
.nav-guest-actions[hidden],
.user-profile-pill-wrapper[hidden],
#nav-auth-guest[hidden],
#nav-auth-user[hidden] {
  display: none !important;
}

/* ─────────────────────────────────────────────────────────────
   16. STANDALONE LOGIN & SIGNUP PAGES (SPLIT-SCREEN)
───────────────────────────────────────────────────────────── */
.auth-page-body {
  min-height: 100vh;
  background-color: var(--bg-void);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-page-container {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  width: 100%;
}
@media (min-width: 1024px) {
  .auth-page-container {
    grid-template-columns: 1.1fr 1fr;
  }
}

/* Left Hero Showcase */
.auth-hero-side {
  position: relative;
  display: none;
  background: var(--bg-base);
  overflow: hidden;
  padding: 48px;
  flex-direction: column;
  justify-content: space-between;
}
@media (min-width: 1024px) {
  .auth-hero-side {
    display: flex;
  }
}

.auth-hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.auth-hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}
.auth-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,12,18,0.92) 0%, rgba(15,17,26,0.85) 100%);
}

.auth-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  max-width: 540px;
}

.auth-brand-logo {
  margin-bottom: 40px;
}

.auth-hero-quote-card {
  background: var(--bg-surface);
  border: 3.5px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 8px 8px 0px var(--ink);
  margin-bottom: 32px;
}
.auth-quote-badge {
  display: inline-block;
  background: var(--pop-coral);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 2px solid var(--ink);
  margin-bottom: 16px;
}
.auth-quote-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1.2;
  color: #fff;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}
.auth-quote-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.auth-author-avatar {
  border-radius: 50%;
  border: 2px solid var(--ink);
}
.auth-quote-author strong {
  display: block;
  font-size: 0.95rem;
  color: var(--pop-yellow);
}
.auth-quote-author span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.auth-perks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-perks-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Right Form Side */
.auth-form-side {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg-surface-raised);
}

.auth-card-box {
  width: 100%;
  max-width: 480px;
  background: var(--bg-surface);
  border: 3.5px solid var(--ink);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: 8px 8px 0px var(--ink);
}

.auth-card-header {
  margin-bottom: 24px;
}

.auth-nav-toggle-tabs {
  display: flex;
  background: var(--bg-surface-raised);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  padding: 4px;
  gap: 4px;
  margin-bottom: 20px;
}
.auth-toggle-link {
  flex: 1;
  text-align: center;
  padding: 8px;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.9rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: all 0.15s ease;
}
.auth-toggle-link--active {
  background: var(--pop-yellow);
  color: var(--ink);
  box-shadow: 2px 2px 0px var(--ink);
}

.auth-card-title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  color: #fff;
  text-shadow: 3px 3px 0px var(--ink);
  line-height: 1;
  margin-bottom: 6px;
}
.auth-card-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.demo-account-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(250, 204, 21, 0.12);
  border: 2px dashed var(--pop-yellow);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 20px;
}
.demo-banner-label {
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 0.72rem;
  color: var(--pop-yellow);
  letter-spacing: 0.5px;
}
.demo-login-pill {
  font-size: 0.78rem !important;
  padding: 4px 10px !important;
}

.standalone-auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-toggle-btn {
  position: absolute;
  right: 12px;
  cursor: pointer;
  font-size: 1.1rem;
  background: none;
  border: none;
}

.auth-remember-row {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
}

.btn--auth-submit {
  padding: 14px;
  font-size: 1.05rem;
  margin-top: 4px;
}

.auth-social-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  font-size: 0.9rem;
}

.auth-card-footer {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 2px solid var(--ink);
  text-align: center;
  font-size: 0.9rem;
}
.auth-inline-link {
  color: var(--pop-yellow);
  font-weight: 800;
}
.auth-inline-link:hover {
  text-decoration: underline;
}
.auth-legal-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 10px;
}
.auth-legal-sub a {
  color: var(--text-secondary);
}

/* Role Selector Grid for Signup */
.auth-role-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.auth-role-card {
  cursor: pointer;
}
.auth-role-radio {
  display: none;
}
.auth-role-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 8px;
  background: var(--bg-surface-raised);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 2px 2px 0px var(--ink);
  transition: all 0.15s ease;
}
.auth-role-box strong {
  font-size: 0.88rem;
  margin: 4px 0 2px;
}
.auth-role-box span:not(.auth-role-icon) {
  font-size: 0.7rem;
  color: var(--text-muted);
  line-height: 1.2;
}
.auth-role-icon {
  font-size: 1.5rem;
}
.auth-role-radio:checked + .auth-role-box {
  background: rgba(250, 204, 21, 0.15);
  border-color: var(--pop-yellow);
  box-shadow: 4px 4px 0px var(--ink);
  transform: translate(-2px, -2px);
}

/* ─────────────────────────────────────────────────────────────
   17. CINEMA GUIDED VIEW, AUDIO PLAYER, VAULT & TIP JAR
───────────────────────────────────────────────────────────── */
.reader-audio-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
@media (min-width: 768px) {
  .reader-audio-tools {
    margin-top: 0;
    margin-left: auto;
  }
}

.reader-audio-btn, .reader-tts-btn, .reader-tip-btn {
  font-size: 0.82rem !important;
  padding: 6px 12px !important;
}

.reader-mode-btn--cinema {
  background: var(--pop-purple) !important;
  color: #fff !important;
}
.reader-mode-btn--cinema:hover {
  background: var(--pop-purple-lite) !important;
}

/* Guided Cinema Mode */
[data-mode="guided"] .reader-page-wrapper {
  max-width: 900px;
  overflow: hidden;
  border: 4px solid var(--pop-yellow);
  box-shadow: 0 0 30px rgba(250, 204, 21, 0.4), 8px 8px 0px var(--ink);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-mode="guided"] .reader-page-image {
  transform-origin: center center;
  transition: transform 0.5s ease-in-out;
}

/* Character Vault in AI Studio */
.character-vault-section {
  background: rgba(250, 204, 21, 0.08);
  border: 2px dashed var(--pop-yellow);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 16px;
}
.character-vault-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.vault-label {
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 0.72rem;
  color: var(--pop-yellow);
  letter-spacing: 0.5px;
}
.vault-badge {
  background: var(--bg-surface-raised);
  border: 1px solid var(--ink);
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
}
.character-vault-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.vault-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-pill);
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.8rem;
  color: var(--text-primary);
  box-shadow: 2px 2px 0px var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.vault-chip:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0px var(--ink);
  border-color: var(--pop-yellow);
  background: var(--bg-surface-raised);
}
.vault-chip:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0px var(--ink);
}

/* Tip Modal */
.tip-modal-container {
  max-width: 460px;
}
.tip-creator-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface-raised);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 14px;
}
.tip-avatar {
  border-radius: 50%;
  border: 2px solid var(--ink);
}
.tip-creator-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.tip-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 16px;
}

.tip-amounts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.tip-amount-card {
  cursor: pointer;
}
.tip-amount-radio {
  display: none;
}
.tip-amount-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px;
  background: var(--bg-surface-raised);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 3px 3px 0px var(--ink);
  transition: all 0.15s ease;
}
.tip-coins-val {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--pop-yellow);
  line-height: 1;
}
.tip-fiat-val {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}
.tip-popular-tag {
  position: absolute;
  top: -8px;
  right: 6px;
  background: var(--pop-coral);
  color: #fff;
  font-family: var(--font-ui);
  font-weight: 900;
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
}
.tip-amount-radio:checked + .tip-amount-box {
  background: rgba(255, 107, 107, 0.15);
  border-color: var(--pop-coral);
  box-shadow: 5px 5px 0px var(--ink);
  transform: translate(-2px, -2px);
}

/* Confetti Canvas */
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 99999;
}

/* ─────────────────────────────────────────────────────────────
   18. READING RESUME BANNER
───────────────────────────────────────────────────────────── */
.reading-resume-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.25), rgba(247, 230, 0, 0.1));
  border: 2.5px solid var(--pop-purple-lite);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3), 4px 4px 0px var(--ink);
  animation: slideDownFade 0.3s ease-out;
}
.reading-resume-banner[hidden] {
  display: none !important;
}
@keyframes slideDownFade {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.resume-banner-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.resume-banner-thumb {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--ink);
  flex-shrink: 0;
}
.resume-banner-text {
  min-width: 0;
}
.resume-banner-tag {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--pop-yellow);
  letter-spacing: 0.06em;
  display: block;
}
.resume-banner-title {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0 0;
}
.resume-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────
   19. PROFILE & CREATOR STUDIO DASHBOARD MODAL
───────────────────────────────────────────────────────────── */
.profile-modal-container {
  max-width: 780px;
  width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.profile-modal-header {
  padding: 24px 28px 16px;
  border-bottom: var(--ink-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-raised);
}
.profile-modal-nav {
  display: flex;
  gap: 6px;
  padding: 0 28px;
  background: var(--bg-surface-raised);
  border-bottom: var(--ink-border);
  overflow-x: auto;
}
.profile-tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.profile-tab-btn:hover {
  color: var(--text-primary);
}
.profile-tab-btn--active {
  color: var(--pop-yellow);
  border-bottom-color: var(--pop-yellow);
}
.profile-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex: 1;
}
.profile-tab-panel[hidden] {
  display: none !important;
}

/* Profile Overview Card */
.profile-hero-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px;
  background: var(--bg-surface-raised);
  border: var(--ink-border);
  border-radius: var(--radius-lg);
  box-shadow: 4px 4px 0px var(--ink);
  margin-bottom: 24px;
}
.profile-hero-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.profile-hero-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-pill);
  border: 3px solid var(--ink);
  object-fit: cover;
}
.profile-hero-info {
  flex: 1;
  min-width: 0;
}
.profile-hero-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-hero-name {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--text-primary);
}
.profile-hero-tag {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.profile-hero-bio {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.4;
  margin: 6px 0 0;
}

/* Profile Stats Grid */
.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.profile-stat-box {
  background: var(--bg-surface-raised);
  border: var(--ink-border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  text-align: center;
  box-shadow: 3px 3px 0px var(--ink);
}
.profile-stat-val {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--pop-yellow);
}
.profile-stat-lbl {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* Wallet Card */
.profile-wallet-hero {
  background: linear-gradient(135deg, rgba(247, 230, 0, 0.15), rgba(124, 58, 237, 0.15));
  border: 2.5px solid var(--pop-yellow);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  box-shadow: 4px 4px 0px var(--ink);
  margin-bottom: 24px;
}
.profile-wallet-balance {
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--pop-yellow);
  margin: 8px 0;
}
.topup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.topup-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 10px;
  background: var(--bg-surface);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 3px 3px 0px var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.topup-btn:hover {
  border-color: var(--pop-yellow);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px var(--ink);
}
.topup-coins {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--pop-yellow);
}
.topup-price {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Comic / Bookmark cards inside profile */
.profile-comic-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.profile-comic-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-surface-raised);
  border: var(--ink-border);
  border-radius: var(--radius-md);
}
.profile-comic-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.profile-comic-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1.5px solid var(--ink);
}

/* ─────────────────────────────────────────────────────────────
   20. STUDIO EXPORT SUITE MODAL
───────────────────────────────────────────────────────────── */
.export-modal-container {
  max-width: 640px;
  width: 95vw;
}
.export-options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 18px 0 24px;
}
.export-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  background: var(--bg-surface-raised);
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 4px 4px 0px var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
}
.export-card:hover {
  border-color: var(--pop-yellow);
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0px var(--ink);
}
.export-card-icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.export-card-title {
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.export-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
  flex: 1;
}
.export-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.65rem;
  font-weight: 900;
  background: var(--pop-purple);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--ink);
}

/* =============================================================
   21. MOBILE-FIRST RESPONSIVE SUITE & GOLDEN RATIO DESIGN SYSTEM
   Strictly scoped to (max-width: 768px) and (max-width: 480px).
   DESKTOP / WINDOWS VIEW (> 768px) REMAINS 100% UNTOUCHED AND INTACT.
   ============================================================= */

@media (max-width: 768px) {
  :root {
    --header-height: 58px;
    --phi-xs: 5px;
    --phi-sm: 8px;
    --phi-md: 13px;
    --phi-lg: 21px;
    --phi-xl: 34px;
    --phi-2xl: 55px;
  }

  /* Safe Area Insets for Modern Mobile Notches */
  body {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    overflow-x: hidden;
  }

  /* ─────────────────────────────────────────────────────────────
     HEADER & MOBILE NAVIGATION
  ───────────────────────────────────────────────────────────── */
  .site-header {
    height: 58px;
    padding: 0 var(--phi-md);
  }
  .header-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--phi-sm);
  }
  .logo-brand {
    gap: var(--phi-xs);
    font-size: 1.35rem;
  }
  .logo-icon svg {
    width: 24px;
    height: 24px;
  }
  .logo-tagline {
    display: none !important;
  }

  .primary-nav-links {
    display: none !important;
  }

  .nav-quick-actions {
    display: flex;
    align-items: center;
    gap: var(--phi-xs);
  }

  /* Compact Mobile Search Trigger */
  .nav-search-bar {
    margin: 0;
  }
  .nav-search-trigger {
    width: 40px;
    height: 40px;
    min-width: 40px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
  }
  .search-trigger-label,
  .search-kbd {
    display: none !important;
  }

  /* Compact Action Buttons */
  #bookmarks-trigger,
  #notifications-trigger,
  #theme-toggle {
    width: 38px;
    height: 38px;
    min-width: 38px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
  }

  /* Nav Create CTA: Icon on Mobile */
  .btn--create-cta {
    padding: 6px 10px;
    font-size: 0.78rem;
    gap: 4px;
    min-height: 38px;
  }

  /* User Profile Pill: Avatar Only on Mobile */
  .user-profile-pill {
    padding: 2px 4px;
    border-radius: var(--radius-pill);
    gap: 0;
  }
  .profile-username,
  .profile-tier-badge,
  .profile-chevron {
    display: none !important;
  }
  .profile-avatar img {
    width: 28px;
    height: 28px;
  }

  /* Mobile Hamburger Trigger */
  .mobile-menu-btn {
    display: flex !important;
    width: 42px;
    height: 42px;
    min-width: 42px;
    padding: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    border-radius: var(--radius-sm);
    cursor: pointer;
  }

  /* Mobile Nav Drawer: Fullscreen Sliding Sheet */
  .mobile-nav-drawer {
    top: 58px;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: var(--phi-lg) var(--phi-md) calc(var(--phi-2xl) + env(safe-area-inset-bottom, 20px));
    background: var(--bg-surface);
    border-top: var(--ink-border);
    box-shadow: var(--shadow-xl);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-nav-list {
    display: flex;
    flex-direction: column;
    gap: var(--phi-sm);
  }
  .mobile-nav-link {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: var(--phi-md) var(--phi-lg);
    font-size: 1.05rem;
    font-weight: 800;
    border-radius: var(--radius-md);
    border: var(--ink-border-sm);
    background: var(--bg-surface-raised);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--text-primary);
  }
  .mobile-nav-details summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: var(--phi-md) var(--phi-lg);
    font-size: 1.05rem;
    font-weight: 800;
    border-radius: var(--radius-md);
    border: var(--ink-border-sm);
    background: var(--bg-surface-raised);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
  }
  .mobile-nav-submenu {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--phi-xs);
    padding: var(--phi-sm) var(--phi-xs);
  }
  .mobile-nav-submenu a {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: var(--phi-xs) var(--phi-sm);
    background: var(--bg-base);
    border-radius: var(--radius-sm);
    border: 1px solid var(--ink-muted);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-decoration: none;
  }

  /* ─────────────────────────────────────────────────────────────
     LANDING & DISCOVERY VIEW
  ───────────────────────────────────────────────────────────── */
  .hero-section {
    padding: var(--phi-lg) var(--phi-md);
    flex-direction: column;
    gap: var(--phi-lg);
    text-align: center;
  }
  .hero-content {
    max-width: 100%;
  }
  .hero-badge-pill {
    margin: 0 auto var(--phi-sm);
  }
  .hero-title {
    font-size: clamp(1.9rem, 7.5vw, 2.5rem);
    line-height: 1.12;
    margin-bottom: var(--phi-sm);
  }
  .hero-tagline-emphasis {
    font-size: 1rem;
    margin-bottom: var(--phi-sm);
  }
  .hero-desc {
    font-size: 0.92rem;
    line-height: 1.45;
    margin-bottom: var(--phi-md);
  }
  .hero-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: var(--phi-sm);
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 48px;
    font-size: 1rem;
  }
  .hero-stat-pills {
    justify-content: center;
    gap: var(--phi-xs);
    flex-wrap: wrap;
    margin-top: var(--phi-md);
  }
  .hero-stat-pill {
    font-size: 0.75rem;
    padding: 4px 10px;
  }

  /* Resume Reading Banner */
  .resume-reading-banner {
    margin: var(--phi-md) var(--phi-md) var(--phi-lg);
    padding: var(--phi-md);
    border-radius: var(--radius-md);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--phi-sm);
  }
  .resume-banner-content {
    width: 100%;
    gap: var(--phi-sm);
  }
  .resume-banner-thumb {
    width: 48px;
    height: 78px;
    aspect-ratio: 1 / 1.618;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
  }
  .resume-banner-info {
    flex: 1;
  }
  .resume-banner-actions {
    width: 100%;
    justify-content: stretch;
  }
  .resume-banner-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }

  /* Spotlight Carousel */
  .spotlight-section {
    padding: var(--phi-lg) var(--phi-md);
  }
  .spotlight-carousel {
    position: relative;
  }
  .spotlight-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: var(--phi-md);
    padding: var(--phi-xs) 0;
    scrollbar-width: none;
  }
  .spotlight-track::-webkit-scrollbar {
    display: none;
  }
  .spotlight-card {
    width: calc(86vw - var(--phi-md)) !important;
    min-width: calc(86vw - var(--phi-md)) !important;
    max-width: 360px;
    flex-shrink: 0;
    scroll-snap-align: center;
    border-radius: var(--radius-md);
  }
  .spotlight-nav-btn {
    display: none;
  }

  /* Filter Tabs Bar: Horizontal Touch Pill Strip */
  .filter-tabs-wrapper {
    padding: 0 var(--phi-md);
    margin-bottom: var(--phi-md);
    position: relative;
  }
  .filter-tab-bar {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: var(--phi-sm);
    padding-bottom: var(--phi-xs);
    scrollbar-width: none;
  }
  .filter-tab-bar::-webkit-scrollbar {
    display: none;
  }
  .filter-tab {
    flex-shrink: 0;
    min-height: 42px;
    padding: var(--phi-xs) var(--phi-md);
    font-size: 0.85rem;
    white-space: nowrap;
    scroll-snap-align: start;
    border-radius: var(--radius-pill);
  }

  /* ─────────────────────────────────────────────────────────────
     GOLDEN RATIO COMIC CARDS GRID (1 : 1.618 ASPECT RATIO)
  ───────────────────────────────────────────────────────────── */
  .comic-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--phi-md) !important;
    padding: 0 var(--phi-md);
  }
  .comic-card-wrapper {
    list-style: none;
    margin: 0;
  }
  .comic-card {
    border-radius: var(--radius-md);
    box-shadow: 3px 3px 0px var(--ink);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
  }
  /* Strict Golden Rectangle for Comic Cover */
  .comic-card-cover {
    position: relative;
    aspect-ratio: 1 / 1.618 !important;
    overflow: hidden;
    width: 100%;
    background: var(--bg-surface-raised);
  }
  .comic-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    display: block;
  }
  .comic-card-cover-overlay {
    padding: var(--phi-xs);
  }
  .card-rank-badge {
    font-size: 0.75rem;
    padding: 2px 6px;
  }
  .card-ai-badge {
    font-size: 0.7rem;
    padding: 2px 6px;
  }
  .card-quick-read-btn {
    display: none; /* Hidden on touch devices; tap card to read */
  }

  .comic-card-body {
    padding: var(--phi-sm) var(--phi-xs);
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    gap: var(--phi-xs);
  }
  .comic-card-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
  }
  .comic-tag {
    font-size: 0.65rem;
    padding: 2px 6px;
  }
  .comic-card-title {
    font-size: 0.92rem;
    line-height: 1.25;
    margin: 2px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .comic-card-creator {
    font-size: 0.72rem;
    color: var(--text-muted);
  }
  .comic-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 4px;
    gap: 4px;
  }
  .comic-card-stats {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7rem;
  }
  .card-action-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* List View fallback on Mobile */
  .comic-grid--list-view {
    grid-template-columns: 1fr !important;
  }
  .comic-grid--list-view .comic-card {
    flex-direction: row;
    height: 140px;
  }
  .comic-grid--list-view .comic-card-cover {
    width: 90px;
    aspect-ratio: 1 / 1.618 !important;
    flex-shrink: 0;
  }

  /* ─────────────────────────────────────────────────────────────
     BROWSE VIEW & MOBILE FILTER BOTTOM-SHEET
  ───────────────────────────────────────────────────────────── */
  .browse-layout {
    display: flex;
    flex-direction: column;
    gap: var(--phi-lg);
    padding: 0 var(--phi-md);
    margin: var(--phi-md) auto var(--phi-2xl);
  }

  /* Mobile Browse Filter Toolbar */
  .browse-results-count-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--phi-sm);
    padding-bottom: var(--phi-sm);
  }
  .browse-toolbar-right {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
    gap: var(--phi-sm);
    flex-wrap: wrap;
  }
  .browse-sort-select {
    min-height: 44px;
    font-size: 0.88rem;
    padding: 6px var(--phi-sm);
    flex: 1;
    border: var(--ink-border-sm);
    border-radius: var(--radius-sm);
  }
  .sidebar-toggle-btn {
    display: inline-flex !important;
    min-height: 44px;
    align-items: center;
    gap: var(--phi-xs);
    font-weight: 800;
    font-size: 0.88rem;
    padding: 6px var(--phi-md);
  }
  .view-toggle-btn {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  /* Off-Canvas Slide-Up Filter Drawer for Mobile */
  .browse-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    z-index: 1500;
    background: var(--bg-surface);
    border: var(--ink-border-lg);
    border-bottom: none;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.6);
    padding: var(--phi-lg) var(--phi-md) calc(var(--phi-2xl) + env(safe-area-inset-bottom, 20px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .browse-sidebar--hidden {
    display: none !important;
  }
  .filter-checkbox-list label {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: var(--phi-sm);
    font-size: 0.92rem;
  }

  /* ─────────────────────────────────────────────────────────────
     READER VIEW & ERGONOMIC FLOATING CONTROLS
  ───────────────────────────────────────────────────────────── */
  .reader-layout {
    flex-direction: column;
    min-height: auto;
  }
  .reader-main {
    padding: var(--phi-sm) var(--phi-xs) calc(88px + env(safe-area-inset-bottom, 20px));
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* 2-Row Ergonomic Reader Topbar */
  .reader-topbar {
    display: flex;
    flex-direction: column;
    gap: var(--phi-sm);
    padding: var(--phi-sm) var(--phi-md);
    margin-bottom: var(--phi-md);
    border-radius: var(--radius-md);
  }
  .reader-topbar > :first-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  #chapter-list-toggle-btn {
    min-height: 38px;
    padding: 4px 10px;
    font-size: 0.8rem;
  }
  .reader-breadcrumb {
    font-size: 0.82rem;
    max-width: 48vw;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .reader-topbar-actions {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .reader-topbar-actions .reader-topbar-btn {
    min-height: 36px;
    padding: 4px 8px;
    font-size: 0.75rem;
    gap: 4px;
  }

  /* Row 2: Centered Mode Pills */
  .reader-view-controls {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 4px;
    overflow-x: auto;
  }
  .reader-mode-btn {
    flex: 1;
    min-height: 38px;
    padding: 6px 8px;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
    text-align: center;
    justify-content: center;
  }

  /* Reader Chapters Drawer */
  .reader-sidebar {
    width: 85vw;
    max-width: 320px;
    z-index: 1600;
  }

  /* Reader Canvas: Touch Friendly & Proportional */
  .reader-canvas-area {
    margin: 0 auto var(--phi-lg);
    border-width: 2.5px;
    border-radius: var(--radius-sm);
    max-height: 78vh;
    width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  .reader-page-frame {
    min-height: 320px;
  }
  .reader-page-frame img {
    max-height: 75vh;
    width: 100%;
    object-fit: contain;
  }

  /* Floating Bottom Ergonomic Page Navigation */
  .reader-page-nav {
    position: fixed;
    bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 28px);
    max-width: 380px;
    z-index: 1000;
    background: var(--bg-surface);
    border: var(--ink-border);
    border-radius: var(--radius-pill);
    box-shadow: 0 6px 20px rgba(0,0,0,0.55), 3px 3px 0px var(--ink);
    padding: var(--phi-xs) var(--phi-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--phi-sm);
  }
  .reader-nav-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: var(--radius-pill);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .reader-page-indicator {
    font-size: 0.88rem;
    gap: var(--phi-xs);
  }
  .page-jump-input {
    width: 44px;
    height: 36px;
    font-size: 0.9rem;
    padding: 2px;
  }

  /* Reaction Strip: Touch Scroll */
  .reaction-picker-bar {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: var(--phi-sm);
    padding: var(--phi-xs) 0;
    scrollbar-width: none;
  }
  .reaction-picker-bar::-webkit-scrollbar {
    display: none;
  }
  .reaction-btn {
    flex-shrink: 0;
    min-height: 42px;
    padding: 6px var(--phi-md);
    font-size: 0.85rem;
    scroll-snap-align: start;
    border-radius: var(--radius-pill);
  }

  /* Comments on Mobile */
  .reader-comments-section {
    padding: var(--phi-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--phi-2xl);
  }
  .comment-input-wrapper {
    gap: var(--phi-xs);
  }
  .comment-avatar {
    width: 32px;
    height: 32px;
  }

  /* ─────────────────────────────────────────────────────────────
     AI SCRIPT-TO-COMIC STUDIO (MOBILE REFLOW)
  ───────────────────────────────────────────────────────────── */
  .studio-layout {
    grid-template-columns: 1fr !important;
    gap: var(--phi-lg);
    padding: 0 var(--phi-md);
    margin: var(--phi-md) auto var(--phi-2xl);
  }
  .studio-panel {
    padding: var(--phi-md);
    border-radius: var(--radius-md);
  }
  .studio-panel-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--phi-sm);
  }
  .studio-panel-title {
    font-size: 1.4rem;
  }

  /* Character Vault Chips Strip */
  .character-vault-chips {
    display: flex;
    overflow-x: auto;
    gap: var(--phi-sm);
    padding: var(--phi-xs) 0;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .character-vault-chips::-webkit-scrollbar {
    display: none;
  }
  .vault-chip {
    flex-shrink: 0;
    min-height: 44px;
    padding: var(--phi-xs) var(--phi-md);
    scroll-snap-align: start;
  }

  /* Fabric Canvas Responsive Wrapper */
  .studio-fabric-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
    border-width: 2.5px;
  }
  .studio-fabric-wrapper canvas {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Speech Bubble Toolbar: Touch Grid */
  .speech-bubble-toolbar {
    display: flex;
    flex-direction: column;
    gap: var(--phi-sm);
    padding: var(--phi-sm);
    border-radius: var(--radius-sm);
  }
  .bubble-toolbar-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--phi-xs);
    width: 100%;
  }
  .bubble-tool-btn {
    min-height: 38px;
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
  }

  /* ─────────────────────────────────────────────────────────────
     MODALS & OVERLAYS (CARD & BOTTOM-SHEET ON MOBILE)
  ───────────────────────────────────────────────────────────── */
  .modal-container,
  .auth-modal-container,
  .profile-modal-container,
  .export-modal-container,
  .tip-modal-container,
  .search-overlay-container {
    width: calc(100vw - 28px) !important;
    max-width: 480px !important;
    max-height: 90vh !important;
    padding: var(--phi-lg) var(--phi-md) !important;
    border-radius: var(--radius-lg) !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    margin: auto;
  }

  /* Form Elements: min 16px font-size to prevent iOS Safari auto-zoom */
  .input,
  .textarea,
  .select-input,
  .auth-input,
  .search-input {
    font-size: 16px !important;
    min-height: 44px;
  }

  .profile-stats-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--phi-sm);
  }
  .export-options-grid {
    grid-template-columns: 1fr !important;
    gap: var(--phi-sm);
  }
}

/* ─────────────────────────────────────────────────────────────
   ULTRA-COMPACT MOBILE DEVICES (e.g. iPhone SE, <= 480px)
───────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
  :root {
    --header-height: 56px;
  }
  .site-header {
    height: 56px;
    padding: 0 var(--phi-sm);
  }
  .logo-brand {
    font-size: 1.25rem;
  }
  .hero-title {
    font-size: 1.8rem;
  }
  .hero-tagline-emphasis {
    font-size: 0.92rem;
  }
  .comic-grid {
    gap: 10px !important;
    padding: 0 var(--phi-sm);
  }
  .comic-card-title {
    font-size: 0.85rem;
  }
  .comic-card-creator {
    font-size: 0.68rem;
  }
  .comic-card-stats {
    font-size: 0.65rem;
  }
  .reader-breadcrumb {
    max-width: 38vw;
    font-size: 0.75rem;
  }
  .reader-page-nav {
    max-width: 340px;
    width: calc(100% - 20px);
  }
}



/* ═══════════════════════════════════════════════════════
   BUG-FIX PATCH — 2026-11 (Professional Review Pass)
   All rules below are additive overrides. Desktop-safe.
═══════════════════════════════════════════════════════ */

/* ── 1. THEME TOGGLE: show correct icon (moon dark / sun light) ── */
.theme-icon--sun  { display: none; }
.theme-icon--moon { display: block; }
[data-theme="light"] .theme-icon--sun  { display: block; }
[data-theme="light"] .theme-icon--moon { display: none; }

/* Keep the toggle button from overflowing its container */
#theme-toggle {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  min-width: 40px;
  overflow: visible;
}
#theme-toggle svg {
  pointer-events: none;
  flex-shrink: 0;
}

/* ── 2. LIGHT MODE — full contrast overrides ── */
/* Yellow headings become dark in light mode so they stay readable */
[data-theme="light"] .hero-title,
[data-theme="light"] .landing-section-title,
[data-theme="light"] .studio-panel-title,
[data-theme="light"] .modal-title,
[data-theme="light"] .reader-sidebar-title,
[data-theme="light"] .reader-comments-title,
[data-theme="light"] .section-heading,
[data-theme="light"] .browse-heading,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3 {
  color: #111827 !important;
  text-shadow: none !important;
}

/* Footer headings yellow → dark text */
[data-theme="light"] .footer-col-heading {
  color: #111827;
}

/* Footer links legible */
[data-theme="light"] .footer-link,
[data-theme="light"] .footer-legal-link,
[data-theme="light"] .footer-tagline {
  color: #334155;
}
[data-theme="light"] .footer-link:hover,
[data-theme="light"] .footer-legal-link:hover {
  color: #111827;
}

/* Nav / header area */
[data-theme="light"] .nav-inner,
[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.95);
}
[data-theme="light"] .nav-wordmark .logo-komi,
[data-theme="light"] .nav-wordmark .logo-crew {
  color: #111827;
}

/* Body halftone dot on light bg */
[data-theme="light"] body {
  background-image: radial-gradient(#c8d0db 1px, transparent 1px);
}

/* Hero area in light mode — keep it legible without hard-coded white text */
[data-theme="light"] .hero-section,
[data-theme="light"] .hero-content {
  color: #111827;
}
[data-theme="light"] .hero-synopsis,
[data-theme="light"] .hero-meta,
[data-theme="light"] .hero-creator {
  color: #334155;
}

/* Slide panels */
[data-theme="light"] .slide-panel,
[data-theme="light"] .notifications-panel {
  background: #ffffff;
  color: #111827;
  border-color: #cbd5e1;
}

/* Cards */
[data-theme="light"] .comic-card {
  background: #ffffff;
}
[data-theme="light"] .comic-card-title {
  color: #111827;
}
[data-theme="light"] .comic-card-creator,
[data-theme="light"] .comic-card-stats,
[data-theme="light"] .comic-card-desc {
  color: #334155;
}

/* Studio panels */
[data-theme="light"] .studio-panel,
[data-theme="light"] .studio-panel--input,
[data-theme="light"] .studio-panel--output {
  background: #ffffff;
  color: #111827;
}
[data-theme="light"] .studio-textarea,
[data-theme="light"] .studio-input {
  background: #f8fafc;
  color: #111827;
  border-color: #cbd5e1;
}
[data-theme="light"] .studio-label,
[data-theme="light"] .studio-hint {
  color: #334155;
}

/* Reader */
[data-theme="light"] .reader-topbar {
  background: rgba(255, 255, 255, 0.95);
  color: #111827;
}
[data-theme="light"] .reader-breadcrumb {
  color: #334155;
}

/* Toast stays dark for contrast regardless of mode */
.toast { color: #fff; }

/* Search overlay */
[data-theme="light"] .search-overlay-container {
  background: #ffffff;
}
[data-theme="light"] .search-input {
  background: #f1f5f9;
  color: #111827;
}
[data-theme="light"] .search-category-pill {
  background: #e2e8f0;
  color: #334155;
}
[data-theme="light"] .search-category-pill:hover,
[data-theme="light"] .search-category-pill--active {
  background: #facc15;
  color: #111827;
}

/* ── 3. NOTIFICATIONS — dismiss button + actions layout ── */
.notification-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.notification-dismiss-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}
.notification-dismiss-btn:hover {
  background: var(--pop-coral, #f87171);
  color: #fff;
}

.notification-mark-read-btn {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: var(--pop-coral, #f87171);
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}
.notification-mark-read-btn:hover {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
}
.notification-item:not(.notification-item--unread) .notification-mark-read-btn {
  color: var(--text-muted);
  opacity: 0.5;
  pointer-events: none;
}

/* Ensure article inside notification-item is a flex row */
.notification-item > article {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
}
.notification-item .notification-body {
  flex: 1;
  min-width: 0;
}

/* ── 4. STUDIO tabs — ensure they're clickable (belt-and-suspenders) ── */
.studio-mode-tab {
  position: relative;
  z-index: 1;
}

/* ── 5. SEARCH TRIGGER — ensure it's a visible, clickable pill ── */
.nav-search-trigger {
  position: relative;
  z-index: 1;
}

/* ── 6. FOOTER social link — ensure emoji centered & visible ── */
.footer-social-link {
  font-size: 1.1rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s;
}
.footer-social-link:hover {
  transform: translate(-1px, -1px);
}

/* ── 7. Light mode: footer bottom bar text ── */
[data-theme="light"] .footer-copyright {
  color: #334155;
}
[data-theme="light"] .footer-bottom-bar {
  border-color: #cbd5e1;
}
[data-theme="light"] .global-footer,
[data-theme="light"] #global-footer {
  background: #f1f5f9;
  color: #334155;
}

/* ── 8. Reader settings panel — fix z-index so it's always on top ── */
.reader-settings-panel {
  z-index: 600;
}

/* ── 9. Light mode: mega-menu / dropdown text ── */
[data-theme="light"] .mega-menu,
[data-theme="light"] .nav-dropdown {
  background: #ffffff;
  color: #111827;
}
[data-theme="light"] .mega-menu-link,
[data-theme="light"] .nav-dropdown-link {
  color: #334155;
}
[data-theme="light"] .mega-menu-link:hover,
[data-theme="light"] .nav-dropdown-link:hover {
  color: #111827;
  background: #f1f5f9;
}
/* END BUG-FIX PATCH */

/* ── SEARCH OVERLAY — additional contrast & usability fixes ── */
/* Ensure hidden studio elements and general [hidden] elements are strictly hidden */
[hidden],
#studio-generation-status[hidden],
.studio-generation-status[hidden],
#studio-empty-state[hidden],
.studio-empty-state[hidden],
#studio-panels-output[hidden],
.studio-panels-output[hidden] {
  display: none !important;
}

#studio-generation-status:not([hidden]) {
  display: flex !important;
}

#studio-panels-output:not([hidden]) {
  display: block !important;
}

/* Make sure input is fully opaque and usable */
.search-overlay-container {
  /* Override any inherited opacity/blur */
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
  color: var(--text-primary);
}

.search-input {
  background: var(--bg-surface-raised) !important;
  color: var(--text-primary) !important;
  border: var(--ink-border-sm) !important;
  font-size: 1.1rem;
  width: 100%;
}
.search-input:focus {
  outline: 2px solid var(--pop-yellow);
  outline-offset: 2px;
}
.search-input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

/* Quick tag pills */
.search-quick-tag {
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  user-select: none;
}

/* Result items */
.search-result-item a,
.search-result-title {
  color: var(--text-primary);
}
.search-result-item:hover .search-result-meta {
  color: var(--ink);
}

/* Recent search heading and items */
.search-results-heading {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.search-no-results,
.search-no-recents {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 8px 0;
}
.search-recent-item {
  color: var(--text-secondary);
  font-size: 0.88rem;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}
.search-recent-item:hover {
  background: var(--bg-surface-raised);
  color: var(--text-primary);
}
.search-clear-recent-btn {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 8px;
  padding: 2px 8px;
  border: 1px solid var(--ink-muted);
  border-radius: var(--radius-pill);
  transition: color 0.15s;
}
.search-clear-recent-btn:hover {
  color: var(--pop-coral, #f87171);
}

/* Light mode overrides for search panel */
[data-theme="light"] .search-overlay {
  background: rgba(15, 23, 42, 0.60);
}
[data-theme="light"] .search-overlay-container {
  background: #ffffff !important;
  color: #111827 !important;
  border-color: #94a3b8;
}
[data-theme="light"] .search-input {
  background: #f1f5f9 !important;
  color: #111827 !important;
  border-color: #cbd5e1 !important;
}
[data-theme="light"] .search-results-heading {
  color: #334155;
}
[data-theme="light"] .search-result-item {
  background: #f8fafc;
  border-color: #e2e8f0;
}
[data-theme="light"] .search-result-title {
  color: #111827;
}
[data-theme="light"] .search-recent-item {
  color: #334155;
}
/* END SEARCH OVERLAY FIX */

/* ═══════════════════════════════════════════════════════════════
   GOLDEN RATIO (φ = 1.618) NATIVE MOBILE DESIGN SYSTEM
   Strictly scoped to (max-width: 768px) and mobile viewports (375px - 430px)
   DESKTOP / WINDOWS VIEW (> 768px) REMAINS 100% UNTOUCHED AND INTACT.
═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  :root {
    /* Golden Ratio (φ = 1.618) Spatial Scale (Base 8px) */
    --gr-base: 8px;
    --gr-xs: 5px;       /* 8 / 1.618 ≈ 5px */
    --gr-sm: 8px;       /* Base unit */
    --gr-md: 13px;      /* 8 × 1.618 ≈ 13px */
    --gr-lg: 21px;      /* 13 × 1.618 ≈ 21px */
    --gr-xl: 34px;      /* 21 × 1.618 ≈ 34px */
    --gr-2xl: 55px;     /* 34 × 1.618 ≈ 55px */

    /* Golden Ratio Typography Scale (Base 14px) */
    --gr-type-micro: 11px;     /* 14 / 1.272 ≈ 11px */
    --gr-type-body: 14px;      /* 1rem base, line-height: 1.618 = 22.6px */
    --gr-type-subtitle: 16px;  /* Subtitle / Section Lead */
    --gr-type-heading: 23px;   /* 14 × 1.618 ≈ 23px */
    --gr-type-hero: 36px;      /* 22.6 × 1.618 ≈ 36px, line-height: 1.15 */

    /* Golden Ratio Layout Splits */
    --gr-minor: 38.2%;
    --gr-major: 61.8%;

    /* Component Palettes */
    --gr-gold: #ffd60a;
    --gr-dark: #0f1117;
    --gr-card: #131620;
  }

  /* Safe Area Inset Support for Modern Mobile Browsers */
  body {
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 20px)) !important;
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  #main-content {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* ─────────────────────────────────────────────────────────────
     A. TOP NAVIGATION BAR (Declutter & Prioritize — Exactly 4 Items)
  ───────────────────────────────────────────────────────────── */
  #global-header {
    height: 60px !important;
    min-height: 60px !important;
    max-height: 60px !important;
    width: 100% !important;
    max-width: 100vw !important;
    background: #0f1117 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
  }

  .nav-wrapper {
    height: 60px !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 0 !important;
    box-sizing: border-box !important;
  }

  #primary-nav {
    height: 100% !important;
    width: 100% !important;
  }

  .nav-inner {
    height: 60px !important;
    padding: 0 var(--gr-md) !important; /* 13px horizontal padding ensures zero overflow */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 6px !important;
  }

  /* 1. Left: Brand Logo (26px icon + crisp wordmark, no tagline) */
  .brand-logo {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    text-decoration: none !important;
  }
  .logo-icon svg {
    width: 26px !important;
    height: 26px !important;
  }
  .logo-wordmark {
    font-size: 1.25rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.5px !important;
  }
  .logo-tagline {
    display: none !important;
  }

  .primary-nav-links {
    display: none !important;
  }

  /* 2. Right: Search (36x36), CREATE CTA (34px pill), Hamburger (36x36) */
  .nav-quick-actions {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
  }

  .nav-search-bar {
    margin: 0 !important;
  }
  .nav-search-trigger {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: transform 0.1s ease !important;
    flex-shrink: 0 !important;
  }
  .nav-search-trigger:active {
    transform: scale(0.97) !important;
  }
  .search-trigger-label,
  .search-kbd {
    display: none !important;
  }

  #nav-create-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    border-radius: 9999px !important;
    background: var(--gr-gold) !important;
    color: var(--gr-dark) !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(255, 214, 10, 0.35) !important;
    text-decoration: none !important;
    transition: transform 0.1s ease !important;
    flex-shrink: 0 !important;
  }
  #nav-create-btn:active {
    transform: scale(0.97) !important;
  }
  #nav-create-btn svg {
    width: 12px !important;
    height: 12px !important;
  }

  #mobile-menu-trigger {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 4px !important;
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    cursor: pointer !important;
    transition: transform 0.1s ease !important;
    flex-shrink: 0 !important;
  }
  #mobile-menu-trigger:active {
    transform: scale(0.97) !important;
  }
  .hamburger-bar {
    width: 16px !important;
    height: 2px !important;
    background: #ffffff !important;
    border-radius: 2px !important;
  }

  /* Hide overcrowded items from top bar on mobile */
  #bookmarks-trigger,
  #notifications-trigger,
  #theme-toggle,
  #nav-auth-guest,
  #nav-auth-user {
    display: none !important;
  }

  /* ─────────────────────────────────────────────────────────────
     B. MOBILE NAV DRAWER (Full-screen Sheet with Auth & Utilities)
  ───────────────────────────────────────────────────────────── */
  .mobile-nav-drawer {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #0f1117 !important;
    z-index: 99999 !important;
    padding: var(--gr-lg) var(--gr-lg) calc(40px + env(safe-area-inset-bottom, 20px)) !important;
    display: flex !important;
    flex-direction: column !important;
    gap: var(--gr-lg) !important; /* 21px */
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
  }
  .mobile-nav-drawer[hidden] {
    display: none !important;
  }
  .mobile-drawer-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding-bottom: var(--gr-md) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
  }
  .mobile-drawer-brand {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
  }
  .mobile-drawer-close-btn {
    width: 38px !important;
    height: 38px !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    font-size: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: transform 0.1s ease !important;
  }
  .mobile-drawer-close-btn:active {
    transform: scale(0.95) !important;
  }
  .mobile-drawer-auth {
    display: flex !important;
    gap: var(--gr-md) !important; /* 13px */
  }
  .mobile-drawer-auth .btn {
    flex: 1 !important;
    min-height: 48px !important;
    font-size: 14px !important;
    font-weight: 800 !important;
    border-radius: var(--gr-md) !important; /* 13px */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    transition: transform 0.1s ease !important;
  }
  .mobile-drawer-auth .btn:active {
    transform: scale(0.97) !important;
  }
  .mobile-drawer-utilities {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--gr-sm) !important; /* 8px */
  }
  .mobile-drawer-util-btn {
    width: 100% !important;
    min-height: 48px !important;
    padding: 0 var(--gr-md) !important;
    border-radius: var(--gr-md) !important; /* 13px */
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    cursor: pointer !important;
    transition: transform 0.1s ease !important;
  }
  .mobile-drawer-util-btn:active {
    transform: scale(0.98) !important;
  }

  /* ─────────────────────────────────────────────────────────────
     C. FEATURED HERO CARD (Full-Bleed, Golden Ratio 1:1.618, Left-Aligned)
  ───────────────────────────────────────────────────────────── */
  .hero-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 var(--gr-lg) !important; /* 21px outer horizontal padding */
    margin: var(--gr-lg) auto var(--gr-xl) !important; /* 21px top, 34px bottom */
    box-sizing: border-box !important;
    text-align: left !important;
  }

  #hero-dynamic-container {
    width: 100% !important;
    max-width: 100% !important;
  }

  .hero-comic-feature {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 520px !important;
    border-radius: var(--gr-lg) !important; /* 21px border radius */
    border: 1.5px solid rgba(255, 214, 10, 0.25) !important;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55) !important;
    padding: 0 !important;
    position: relative !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    background: var(--gr-card) !important;
    box-sizing: border-box !important;
  }

  .hero-backdrop {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 0 !important;
  }
  .hero-backdrop img {
    width: 100% !important;
    height: 52% !important;
    object-fit: cover !important;
    object-position: top center !important;
    opacity: 0.65 !important;
    display: block !important;
  }
  .hero-backdrop-overlay {
    position: absolute !important;
    inset: 0 !important;
    /* Golden Ratio Gradient: Top 38.2% minor split blends down, bottom 61.8% solid card background */
    background: linear-gradient(
      180deg,
      rgba(19, 22, 32, 0.10) 0%,
      rgba(19, 22, 32, 0.75) 38.2%,
      #131620 61.8%,
      #131620 100%
    ) !important;
  }

  .hero-content {
    position: relative !important;
    z-index: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: var(--gr-lg) !important; /* 21px internal padding */
    text-align: left !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    box-sizing: border-box !important;
  }

  /* Top Badge Row */
  .hero-rank-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #ff3b30 !important;
    color: #ffffff !important;
    font-size: var(--gr-type-micro) !important; /* 11px */
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 6px 12px !important;
    border-radius: 9999px !important;
    margin-bottom: var(--gr-md) !important; /* 13px */
    border: none !important;
    box-shadow: 0 2px 8px rgba(255, 59, 48, 0.35) !important;
  }
  .hero-rank-label {
    font-size: 11px !important;
    font-weight: 900 !important;
    color: #ffffff !important;
  }
  .hero-trend-tag {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
  }

  /* Hero Comic Title */
  .hero-title {
    font-family: var(--font-display) !important;
    font-size: var(--gr-type-hero) !important; /* 36px */
    line-height: 1.15 !important;
    letter-spacing: 0.5px !important;
    color: #ffffff !important;
    text-align: left !important;
    margin: 0 0 var(--gr-md) 0 !important; /* 13px */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8) !important;
  }

  /* Metadata Row */
  .hero-identity {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--gr-sm) !important; /* 8px */
    margin-bottom: var(--gr-md) !important; /* 13px */
    align-items: center !important;
    justify-content: flex-start !important;
  }
  .hero-genre-tag {
    background: rgba(255, 255, 255, 0.10) !important;
    color: #cbd5e1 !important;
    font-size: var(--gr-type-micro) !important; /* 11px */
    font-weight: 700 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
  }
  .hero-ai-badge {
    background: #e23636 !important;
    color: #ffffff !important;
    font-size: var(--gr-type-micro) !important; /* 11px */
    font-weight: 800 !important;
    padding: 4px 10px !important;
    border-radius: 6px !important;
    border: none !important;
  }

  /* Clamped Synopsis: 3 Lines Max at 14px with 1.618 line-height */
  .hero-synopsis {
    font-size: var(--gr-type-body) !important; /* 14px */
    line-height: 1.618 !important; /* 22.6px */
    color: #94a3b8 !important;
    text-align: left !important;
    margin: 0 0 var(--gr-md) 0 !important; /* 13px */
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Author Credit */
  .hero-creator-credit {
    display: flex !important;
    align-items: center !important;
    gap: var(--gr-sm) !important; /* 8px */
    font-size: 12px !important;
    color: #64748b !important;
    margin: 0 0 var(--gr-sm) 0 !important; /* 8px */
  }
  .hero-creator-name {
    color: var(--gr-gold) !important;
    font-weight: 700 !important;
  }
  .hero-chapter-info {
    color: #94a3b8 !important;
  }

  /* Stats Row */
  .hero-stats {
    display: flex !important;
    align-items: center !important;
    gap: var(--gr-md) !important; /* 13px */
    margin-bottom: var(--gr-lg) !important; /* 21px */
    font-size: 12px !important;
    color: #cbd5e1 !important;
    justify-content: flex-start !important;
  }
  .hero-stat {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }
  .hero-status-pill {
    background: rgba(16, 185, 129, 0.15) !important;
    color: #10b981 !important;
    border: 1px solid rgba(16, 185, 129, 0.3) !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    padding: 2px 8px !important;
    border-radius: 9999px !important;
    text-transform: uppercase !important;
  }

  /* Hero CTA Stack: 50px Height Thumb-Friendly */
  .hero-ctas {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: var(--gr-md) !important; /* 13px gap */
    margin-top: 4px !important;
  }
  .hero-ctas .btn {
    width: 100% !important;
    min-height: 50px !important;
    height: 50px !important;
    border-radius: var(--gr-md) !important; /* 13px radius */
    font-size: 15px !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-sizing: border-box !important;
    transition: transform 0.1s ease, filter 0.15s ease !important;
    text-decoration: none !important;
  }
  .hero-ctas .btn:active {
    transform: scale(0.97) !important;
  }
  .btn--hero-primary {
    background: var(--gr-gold) !important;
    color: var(--gr-dark) !important;
    border: none !important;
    box-shadow: 0 4px 14px rgba(255, 214, 10, 0.35) !important;
  }
  .btn--hero-secondary {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
  }

  .hero-secondary-picks {
    display: none !important;
  }

  /* ─────────────────────────────────────────────────────────────
     D. FILTER & SORT BAR (Clean, Non-Clipping, Full-Width)
  ───────────────────────────────────────────────────────────── */
  .discovery-filter-bar {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 var(--gr-md) !important; /* 13px padding */
    margin: var(--gr-lg) auto !important; /* 21px vertical gap */
    box-sizing: border-box !important;
  }
  .filter-bar-inner {
    width: 100% !important;
    background: var(--gr-card) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: var(--gr-md) !important; /* 13px */
    padding: 8px var(--gr-md) !important; /* 13px internal padding */
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    box-sizing: border-box !important;
  }
  .filter-tabs-scroll-wrapper {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1 !important;
    min-width: 0 !important;
  }
  .filter-tabs-scroll-wrapper::-webkit-scrollbar {
    display: none !important;
  }
  .filter-tab {
    flex-shrink: 0 !important;
    height: 32px !important;
    padding: 4px 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    border-radius: 9999px !important;
    white-space: nowrap !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: #94a3b8 !important;
    transition: transform 0.1s ease !important;
  }
  .filter-tab:active {
    transform: scale(0.97) !important;
  }
  .filter-tab--active {
    background: var(--gr-gold) !important;
    color: var(--gr-dark) !important;
    font-weight: 800 !important;
  }

  .filter-bar-sort {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
  }
  .filter-sort-label {
    display: none !important;
  }
  #sort-select {
    height: 34px !important;
    padding: 4px 8px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    cursor: pointer !important;
  }

  /* ─────────────────────────────────────────────────────────────
     E. "TOP PICKS" CATALOG GRID (Golden Proportions & Safe-Area)
  ───────────────────────────────────────────────────────────── */
  .top-picks-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 var(--gr-lg) calc(80px + env(safe-area-inset-bottom, 20px)) !important; /* 21px sides, 80px + safe area bottom */
    margin-bottom: var(--gr-xl) !important; /* 34px */
    box-sizing: border-box !important;
  }
  .landing-section-header {
    display: flex !important;
    align-items: baseline !important;
    justify-content: space-between !important;
    margin-bottom: var(--gr-lg) !important; /* 21px */
    width: 100% !important;
  }
  .landing-section-title {
    font-size: var(--gr-type-heading) !important; /* 23px */
    font-weight: 900 !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    color: #ffffff !important;
  }
  .landing-section-subtitle {
    display: none !important;
  }
  .section-see-all-link {
    font-size: var(--gr-type-body) !important; /* 14px */
    color: var(--gr-gold) !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
  }

  .comic-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    column-gap: var(--gr-md) !important; /* 13px */
    row-gap: var(--gr-lg) !important; /* 21px */
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .comic-card-wrapper {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .comic-card {
    border-radius: var(--gr-md) !important; /* 13px */
    overflow: hidden !important;
    background: var(--gr-card) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    transition: transform 0.15s ease !important;
  }
  .comic-card:active {
    transform: scale(0.98) !important;
  }
  .comic-card-cover {
    aspect-ratio: 1 / 1.5 !important;
    width: 100% !important;
    position: relative !important;
    border-radius: var(--gr-md) var(--gr-md) 0 0 !important;
    overflow: hidden !important;
  }
  .comic-card-cover img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
  }
  .card-rank-badge {
    position: absolute !important;
    top: var(--gr-sm) !important; /* 8px */
    left: var(--gr-sm) !important; /* 8px */
    width: 28px !important;
    height: 28px !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    background: #ff3b30 !important;
    color: #ffffff !important;
    z-index: 2 !important;
  }
  .comic-card-body {
    padding: var(--gr-md) !important; /* 13px */
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }
  .comic-card-title {
    font-size: 14px !important;
    line-height: 1.3 !important;
    font-weight: 800 !important;
    margin: 4px 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }
}
/* ═══════════════════════════════════════════════════════════════
   END GOLDEN RATIO MOBILE REDESIGN
═══════════════════════════════════════════════════════════════ */
