/* ============================================================
   UPCOMIC — design tokens
   Flat dark red/gold, horizontal nav, mobile bottom tabs
   ============================================================ */
:root {
  --bg: #0c0a0d;
  --panel: #171315;
  --panel-2: #1e181b;
  --line: #2c2226;
  --red: #e0212f;
  --red-bright: #ff3b47;
  --gold: #f0b93a;
  --gold-bright: #ffd166;
  --text-hi: #f5f0f0;
  --text-mid: #ab9a9c;
  --text-dim: #7a6a6c;
  --danger: #e0524a;

  --font-display: 'Oswald', 'Arial Narrow', sans-serif;
  --font-wordmark: 'Archivo Black', 'Oswald', sans-serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-hi);
  font-family: var(--font-body);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 0;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0 0 0.5em;
  color: var(--text-hi);
}

.container { max-width: 1320px; margin: 0 auto; padding: 0 28px; }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ============================================================
   Top nav
   ============================================================ */
header.topnav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(12, 10, 13, 0.92);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(8px);
}
.wordmark { font-family: var(--font-wordmark); font-size: 22px; letter-spacing: 0.01em; }
.wordmark .up { color: #fff; }
.wordmark .comic { color: var(--red-bright); }

nav.main-links { display: flex; gap: 26px; }
nav.main-links a {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.05em;
  color: var(--text-mid); text-transform: uppercase;
}
nav.main-links a.active, nav.main-links a:hover { color: #fff; }

.header-right { display: flex; align-items: center; gap: 18px; }
.search-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 9px 16px;
}
.search-pill input { background: none; border: none; outline: none; color: var(--text-hi); font-size: 13px; width: 150px; }
.search-pill svg { flex-shrink: 0; color: var(--text-dim); }

.login-link { font-family: var(--font-mono); font-size: 12px; color: var(--text-mid); text-transform: uppercase; }
.login-link:hover { color: #fff; }

.vip-btn {
  display: flex; align-items: center; gap: 7px;
  background: linear-gradient(135deg, var(--red-bright), var(--red));
  color: #fff; font-family: var(--font-mono); font-size: 12px; font-weight: 700; text-transform: uppercase;
  padding: 10px 18px; border-radius: var(--radius-sm); letter-spacing: 0.04em;
}
.vip-btn:hover { box-shadow: 0 6px 20px rgba(224, 33, 47, 0.4); }

.hamburger-icon { display: none; align-items: center; justify-content: center; width: 34px; height: 34px; cursor: pointer; color: #fff; }

.mobile-nav-panel {
  display: none;
  position: fixed; top: 0; right: 0; bottom: 0; width: 78%; max-width: 300px; z-index: 90;
  background: var(--panel); border-left: 1px solid var(--line);
  padding: 20px; flex-direction: column; gap: 4px;
  transform: translateX(100%); transition: transform 0.25s ease;
}
.mobile-nav-toggle { display: none; }
.mobile-nav-toggle:checked ~ .mobile-nav-panel { transform: translateX(0); }
.mobile-nav-panel a, .mobile-nav-panel button {
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  color: var(--text-hi); padding: 13px 14px; border-radius: var(--radius-sm);
  text-align: left; background: none; border: none; width: 100%; cursor: pointer;
}
.mobile-nav-panel a:hover, .mobile-nav-panel button:hover { background: var(--panel-2); }
.mobile-nav-panel a.vip-item { color: var(--gold-bright); }
.mobile-nav-close { align-self: flex-end; color: var(--text-mid); margin-bottom: 10px; cursor: pointer; }
.mobile-nav-backdrop {
  display: none; position: fixed; inset: 0; z-index: 85; background: rgba(0,0,0,0.5);
}
.mobile-nav-toggle:checked ~ .mobile-nav-backdrop { display: block; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase;
  padding: 13px 24px; border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer;
  font-weight: 700; transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { box-shadow: 0 8px 22px rgba(224, 33, 47, 0.4); }
.btn-outline { border-color: var(--text-mid); color: #fff; background: none; }
.btn-outline:hover { border-color: #fff; }
.btn-gold { background: linear-gradient(135deg, var(--gold-bright), var(--gold)); color: #241a0d; }
.btn-gold:hover { box-shadow: 0 8px 22px rgba(240, 185, 58, 0.35); }
.btn-ghost { background: var(--panel); border-color: var(--line); color: var(--text-hi); }
.btn-ghost:hover { border-color: var(--text-mid); }
.btn-block { width: 100%; }
.btn-small { padding: 9px 15px; font-size: 11px; }

/* ============================================================
   Hero carousel
   ============================================================ */
.hero {
  position: relative;
  margin: 20px 28px 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 420px;
  display: flex; align-items: center;
}
.hero-slide {
  position: absolute; inset: 0;
  display: none;
  background-size: cover; background-position: center 25%;
}
.hero-slide.active { display: block; }
.hero-slide::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(12,7,9,0.94) 20%, rgba(12,7,9,0.5) 60%, rgba(12,7,9,0.15) 100%);
}
.hero-slide:not([style*="background-image"]) { background: linear-gradient(120deg, #2a0d14, #150a10); }

.hero-content { position: relative; z-index: 2; padding: 48px 56px; max-width: 560px; }
.hero-tag {
  display: inline-block; background: rgba(224, 33, 47, 0.18); border: 1px solid rgba(224, 33, 47, 0.5);
  color: var(--red-bright); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em;
  padding: 5px 12px; border-radius: 5px; margin-bottom: 16px; text-transform: uppercase;
}
.hero-content h1 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.03; margin: 0 0 16px; text-transform: uppercase; }
.hero-meta { font-family: var(--font-mono); font-size: 13px; color: var(--gold-bright); margin-bottom: 12px; }
.hero-content p.blurb {
  color: var(--text-mid); font-size: 15px; margin-bottom: 24px; max-width: 50ch;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,0,0,0.45); border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center; color: #fff; cursor: pointer;
}
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-arrow:hover { background: rgba(224,33,47,0.6); }

.hero-dots { position: absolute; bottom: 18px; left: 56px; z-index: 3; display: flex; gap: 7px; }
.hero-dot { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,0.3); border: none; cursor: pointer; padding: 0; }
.hero-dot.active { background: var(--red-bright); width: 20px; border-radius: 999px; transition: width 0.2s; }

.hero-empty { min-height: 280px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--text-dim); padding: 40px; background: var(--panel); }

/* ============================================================
   Sections (Trending / Latest Updates / Browse)
   ============================================================ */
.section { margin: 40px 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-head h2 {
  font-family: var(--font-display); font-size: 17px; text-transform: uppercase; letter-spacing: 0.03em;
  margin: 0; display: flex; align-items: center; gap: 8px;
}
.section-head .view-all { font-family: var(--font-mono); font-size: 12px; color: var(--red-bright); text-transform: uppercase; }

.card-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.card:hover { border-color: var(--red); transform: translateY(-3px); }
.card .cover { aspect-ratio: 3/4; background: linear-gradient(145deg, #3a1720, #1a0e12); position: relative; overflow: hidden; }
.card .cover img { width: 100%; height: 100%; object-fit: cover; }
.card .cover-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-family: var(--font-mono); font-size: 10.5px; text-align: center; padding: 10px; }
.card .badge { position: absolute; top: 8px; left: 8px; font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; }
.badge-hot { background: var(--red); color: #fff; }
.badge-vip { background: var(--gold); color: #241a0d; }
.card .info { padding: 10px 12px; }
.card .info h4 { font-size: 12.5px; margin: 0 0 4px; font-weight: 700; text-transform: none; letter-spacing: 0; font-family: var(--font-body); }
.card .meta { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-dim); }
.card .meta .rating { color: var(--gold-bright); }

.updates-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.update-row { display: flex; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px; align-items: center; }
.update-row .thumb { width: 52px; height: 64px; border-radius: 6px; background: linear-gradient(145deg, #3a1720, #1a0e12); flex-shrink: 0; overflow: hidden; }
.update-row .thumb img { width: 100%; height: 100%; object-fit: cover; }
.update-row .info h4 { font-size: 12.5px; margin: 0 0 3px; font-family: var(--font-body); font-weight: 700; }
.update-row .info p { font-size: 11px; color: var(--text-dim); margin: 0; }
.new-tag { background: var(--red); color: #fff; font-family: var(--font-mono); font-size: 9px; padding: 2px 7px; border-radius: 4px; margin-left: 6px; }

/* Browse controls (sort tabs / filters / grid) */
.browse-controls { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 40px 0 20px; flex-wrap: wrap; }
.sort-tabs { display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 5px; }
.sort-tab { font-family: var(--font-mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; padding: 8px 16px; border-radius: 999px; color: var(--text-dim); }
.sort-tab.active { background: var(--red); color: #fff; }
.filter-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.category-select { padding: 9px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); color: var(--text-hi); font-family: var(--font-body); font-size: 13px; }
.search-box { display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); min-width: 200px; }
.search-box input { background: none; border: none; outline: none; color: var(--text-hi); font-family: var(--font-body); font-size: 13px; width: 100%; }

.comic-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 18px; padding-bottom: 20px; }

.empty-state { text-align: center; padding: 80px 24px; color: var(--text-dim); }
.empty-state h3 { color: var(--text-hi); margin-bottom: 10px; }

/* ============================================================
   VIP section (homepage promo band)
   ============================================================ */
.vip-section {
  margin: 50px 28px; padding: 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(224,33,47,0.1), rgba(240,185,58,0.06));
  border: 1px solid rgba(240,185,58,0.25);
  display: flex; justify-content: space-between; align-items: center; gap: 30px; flex-wrap: wrap;
}
.vip-section .left h2 { font-size: 28px; margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.vip-section .left p { color: var(--text-mid); margin: 0; max-width: 46ch; }
.price-card { background: var(--panel-2); border: 1px solid rgba(240,185,58,0.4); border-radius: var(--radius-md); padding: 22px 32px; text-align: center; min-width: 220px; }
.price-card .label { font-family: var(--font-mono); font-size: 11px; color: var(--gold-bright); text-transform: uppercase; letter-spacing: 0.08em; }
.price-card .amount { font-family: var(--font-display); font-size: 34px; color: #fff; margin: 8px 0; }
.price-card .amount span { font-size: 14px; color: var(--text-dim); }

/* ============================================================
   Comic detail page
   ============================================================ */
.comic-hero { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding: 32px 0; }
@media (max-width: 700px) { .comic-hero { grid-template-columns: 1fr; } }
.comic-hero .cover-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 3/4; background: linear-gradient(145deg, #3a1720, #1a0e12); }
.comic-hero .cover-wrap img { width: 100%; height: 100%; object-fit: cover; }
.mature-tag { position: absolute; top: 10px; left: 10px; background: var(--red); color: #fff; font-family: var(--font-mono); font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 4px; text-transform: uppercase; }
.comic-hero h1 { font-size: 30px; margin-bottom: 8px; text-transform: none; }
.comic-hero .rating-line { font-family: var(--font-mono); color: var(--gold-bright); font-size: 15px; margin-bottom: 12px; }
.genre-line { color: var(--text-mid); font-family: var(--font-mono); font-size: 12.5px; margin-bottom: 14px; }
.comic-hero .desc { color: var(--text-mid); max-width: 62ch; margin-bottom: 22px; }

.stats-row { display: flex; gap: 36px; margin-bottom: 22px; flex-wrap: wrap; }
.stat-block .label { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; color: var(--text-dim); letter-spacing: 0.06em; margin-bottom: 4px; }
.stat-block .value { font-family: var(--font-display); font-size: 17px; color: #fff; }

.comic-actions { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.icon-actions { display: flex; gap: 20px; }
.icon-action { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--text-mid); background: none; border: none; cursor: pointer; }
.icon-action:hover { color: #fff; }
.icon-action.active { color: var(--gold-bright); }

.section-title-row { display: flex; align-items: center; justify-content: space-between; margin: 36px 0 16px; }
.section-title-row h2 { font-size: 17px; margin: 0; }
.section-title-row .sort-toggle { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); display: flex; align-items: center; gap: 6px; }

.chapter-list { list-style: none; margin: 0; padding: 0 0 20px; }
.chapter-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 15px 18px; border-radius: var(--radius-md); background: var(--panel); border: 1px solid var(--line);
  margin-bottom: 10px; transition: border-color 0.15s;
}
.chapter-row:hover { border-color: var(--red); }
.chapter-row .left { display: flex; align-items: center; gap: 14px; }
.chapter-play {
  width: 30px; height: 30px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; color: var(--text-mid); flex-shrink: 0;
}
.chapter-row:hover .chapter-play { color: var(--red-bright); border-color: var(--red); }
.chapter-row h4 { margin: 0 0 2px; font-size: 14.5px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.chapter-sub { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }

.badge { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 4px; }
.badge-free { background: rgba(23,224,214,0.1); color: #4fd8cf; }
.badge-vip-tag { background: var(--gold); color: #241a0d; }
.badge-new { background: var(--red); color: #fff; }

.view-all-chapters { text-align: center; padding: 14px; border-radius: var(--radius-md); background: var(--panel); border: 1px solid var(--line); font-family: var(--font-mono); font-size: 12px; color: var(--text-mid); text-transform: uppercase; letter-spacing: 0.04em; cursor: pointer; }
.view-all-chapters:hover { color: #fff; border-color: var(--text-mid); }

/* ============================================================
   Reader
   ============================================================ */
.reader-bar {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 18px;
  border-radius: var(--radius-md); margin: 20px 0; background: var(--panel); border: 1px solid var(--line);
  flex-wrap: wrap; gap: 12px;
}
.reader-bar .back-link { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; color: var(--text-mid); }
.reader-bar .meta { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.reader-pages { padding: 0 0 30px; display: flex; flex-direction: column; gap: 3px; max-width: 760px; margin: 0 auto; }
.reader-pages img { width: 100%; border-radius: 4px; }
.reader-nav { display: flex; justify-content: space-between; padding: 20px 0 40px; gap: 12px; }

/* ============================================================
   Forms
   ============================================================ */
.form-shell { max-width: 420px; margin: 56px auto; padding: 34px 30px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.form-shell h1 { font-size: 22px; margin-bottom: 6px; text-transform: none; }
.form-shell .sub { color: var(--text-dim); font-size: 13.5px; margin-bottom: 24px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-mid); margin-bottom: 7px; }
input[type="text"], input[type="password"], input[type="number"], textarea, select {
  width: 100%; padding: 12px 14px; background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius-sm); color: var(--text-hi); font-family: var(--font-body); font-size: 14px;
}
input:focus, textarea:focus, select:focus { border-color: var(--red); outline: none; }
textarea { resize: vertical; min-height: 90px; }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; text-transform: none; font-size: 14px; color: var(--text-hi); }
.form-error { background: rgba(224,82,74,0.12); border: 1px solid rgba(224,82,74,0.4); color: #ff9a8c; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 20px; }
.form-success { background: rgba(79,216,207,0.1); border: 1px solid rgba(79,216,207,0.35); color: #8ff0e8; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 20px; }
.form-footer-link { margin-top: 20px; font-size: 13.5px; color: var(--text-dim); text-align: center; }
.form-footer-link a { color: var(--red-bright); }

/* ============================================================
   VIP page (dedicated)
   ============================================================ */
.vip-page { padding: 40px 0 80px; }
.vip-hero { text-align: center; max-width: 640px; margin: 0 auto 40px; }
.vip-hero h1 { font-size: 34px; }
.vip-hero p { color: var(--text-mid); }

.vip-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
@media (max-width: 800px) { .vip-layout { grid-template-columns: 1fr; } }

.benefit-list { display: flex; flex-direction: column; gap: 4px; }
.benefit-item { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border-radius: var(--radius-md); background: var(--panel); border: 1px solid var(--line); margin-bottom: 10px; }
.benefit-item .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--panel-2); display: flex; align-items: center; justify-content: center; color: var(--gold-bright); flex-shrink: 0; }
.benefit-item .text strong { display: block; font-size: 14px; }
.benefit-item .text span { font-size: 12.5px; color: var(--text-dim); }

.vip-price-panel { background: var(--panel); border: 1px solid rgba(240,185,58,0.4); border-radius: var(--radius-lg); padding: 30px; text-align: center; }
.vip-price-panel .label { font-family: var(--font-mono); font-size: 11px; color: var(--gold-bright); text-transform: uppercase; letter-spacing: 0.08em; }
.vip-price-panel .amount { font-family: var(--font-display); font-size: 42px; color: #fff; margin: 10px 0; }
.vip-price-panel .amount span { font-size: 15px; color: var(--text-dim); }

.steps-panel { margin-top: 24px; padding: 24px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--line); }
.steps-panel h3 { font-size: 15px; text-align: center; color: var(--gold-bright); margin-bottom: 20px; }
.steps-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; text-align: center; }
@media (max-width: 700px) { .steps-grid { grid-template-columns: 1fr 1fr; } }
.step-item .num { width: 34px; height: 34px; border-radius: 50%; background: var(--panel-2); border: 1px solid rgba(240,185,58,0.4); color: var(--gold-bright); font-family: var(--font-display); display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.step-item p { font-size: 12.5px; color: var(--text-mid); margin: 0; }

.tg-help-box { margin-top: 24px; padding: 22px; border-radius: var(--radius-lg); background: var(--panel); border: 1px solid var(--line); text-align: center; }
.tg-help-box p { color: var(--text-mid); margin: 0 0 14px; font-size: 13.5px; }
.tg-help-btn { display: inline-flex; align-items: center; gap: 8px; background: #26a5e4; color: #fff; padding: 11px 20px; border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: 13px; font-weight: 700; }

.tg-inline { color: var(--red-bright); text-decoration: underline; text-decoration-color: rgba(224,33,47,0.4); font-weight: 700; }
.tg-inline:hover { text-decoration-color: var(--red-bright); }

/* ============================================================
   Age gate
   ============================================================ */
.age-gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; }
.age-gate-card { max-width: 440px; padding: 40px 32px; }
.age-gate-card .motto { font-family: var(--font-mono); font-size: 11px; color: var(--red-bright); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.age-gate-card p.warn { color: var(--text-mid); font-size: 14px; margin-bottom: 30px; }
.age-gate-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; margin-top: 40px; }
.site-footer .inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--text-dim); }
.site-footer a.tg { color: var(--red-bright); }

.not-found { text-align: center; padding: 90px 24px; color: var(--text-dim); }
.not-found h1 { color: var(--text-hi); margin-bottom: 10px; font-size: 40px; }

/* ============================================================
   Mobile bottom tab bar
   ============================================================ */
.bottom-tabs { display: none; }

/* ============================================================
   Admin
   ============================================================ */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--line); padding: 24px 0; position: sticky; top: 0; height: 100vh; }
.admin-sidebar .brand-mini { display: flex; align-items: center; padding: 0 20px 20px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.admin-sidebar .brand-mini span { font-family: var(--font-wordmark); font-size: 17px; }
.admin-sidebar .brand-mini .up { color: #fff; } .admin-sidebar .brand-mini .comicb { color: var(--red-bright); }
.admin-nav-link { display: block; padding: 11px 20px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-mid); border-left: 2px solid transparent; }
.admin-nav-link:hover { color: #fff; background: var(--panel-2); }
.admin-nav-link.active { color: var(--red-bright); border-left-color: var(--red-bright); background: var(--panel-2); }
.admin-main { flex: 1; padding: 34px 40px; max-width: 1100px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; flex-wrap: wrap; gap: 12px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; margin-bottom: 36px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px; }
.stat-card .n { font-family: var(--font-display); font-size: 26px; color: var(--red-bright); }
.stat-card .label { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; color: var(--text-dim); letter-spacing: 0.05em; }

table.admin-table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
table.admin-table th, table.admin-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--line); font-size: 13px; }
table.admin-table th { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); background: var(--panel-2); }
table.admin-table tr:last-child td { border-bottom: none; }
table.admin-table td.mono { font-family: var(--font-mono); font-size: 12.5px; }
.admin-empty-row td { text-align: center; color: var(--text-dim); padding: 36px; }

.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb-40 { width: 40px; height: 52px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }

.status-pill { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; padding: 3px 9px; border-radius: 4px; }
.status-unused { background: rgba(79,216,207,0.1); color: #4fd8cf; }
.status-active { background: rgba(240,185,58,0.12); color: var(--gold-bright); }
.status-expired { background: rgba(122,106,108,0.15); color: var(--text-dim); }

.code-banner { border-radius: var(--radius-md); padding: 15px 18px; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; background: rgba(240,185,58,0.1); border: 1px solid rgba(240,185,58,0.35); }
.code-banner .code { font-family: var(--font-mono); font-size: 19px; color: var(--gold-bright); letter-spacing: 0.05em; }

.page-thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; margin-top: 14px; }
.page-thumb-grid img { width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }

.hint { font-size: 12px; color: var(--text-dim); margin-top: 6px; }

.checkbox-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-chip { display: flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 999px; cursor: pointer; background: var(--panel-2); border: 1px solid var(--line); font-size: 12px; }
.checkbox-chip input { width: auto; margin: 0; }

.category-tag-row { display: flex; flex-wrap: wrap; gap: 8px; }
.category-tag { display: inline-flex; align-items: center; gap: 8px; padding: 7px 8px 7px 14px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font-size: 12.5px; }
.category-tag .count { color: var(--text-dim); font-family: var(--font-mono); font-size: 10.5px; }
.category-tag button { background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 13px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.category-tag button:hover { color: var(--danger); background: rgba(224,82,74,0.15); }

.inline-form { display: flex; gap: 10px; max-width: 420px; }

/* ============================================================
   Mobile responsive
   ============================================================ */
@media (max-width: 800px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; }
  .admin-main { padding: 24px 18px; }
}

@media (max-width: 700px) {
  header.topnav { padding: 14px 16px; }
  nav.main-links, .search-pill, .login-link { display: none; }
  .hamburger-icon { display: flex; }
  .header-right { gap: 10px; }
  .vip-btn { padding: 8px 12px; font-size: 10px; }
  .wordmark { font-size: 18px; }
  .mobile-nav-panel { display: flex; }

  .hero { margin: 12px 12px 0; min-height: 280px; border-radius: 14px; }
  .hero-content { padding: 26px 22px; }
  .hero-content h1 { font-size: 28px; }
  .hero-content p.blurb { font-size: 13px; margin-bottom: 18px; }
  .hero-arrow { width: 32px; height: 32px; }
  .hero-dots { left: 22px; }
  .btn { padding: 11px 16px; font-size: 11px; }

  .container { padding: 0 16px; }
  .section { margin: 26px 0; }
  .section-head h2 { font-size: 14px; }

  .card-row { display: flex; overflow-x: auto; gap: 12px; scrollbar-width: none; padding-bottom: 4px; }
  .card-row::-webkit-scrollbar { display: none; }
  .card-row .card { min-width: 130px; flex-shrink: 0; }

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

  .comic-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }

  .vip-section { margin: 26px 12px 40px; padding: 26px 20px; flex-direction: column; align-items: stretch; text-align: center; }
  .vip-section .left h2 { font-size: 22px; justify-content: center; }
  .price-card { width: 100%; }

  .comic-actions { flex-direction: column; align-items: stretch; }
  .stats-row { gap: 22px; }

  .bottom-tabs {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
    background: rgba(12,10,13,0.97); border-top: 1px solid var(--line);
    padding: 9px 4px 14px;
  }
  .bottom-tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--text-dim); font-family: var(--font-mono); font-size: 9px; text-transform: uppercase; }
  .bottom-tabs a.active { color: var(--red-bright); }
  .bottom-tabs svg { width: 19px; height: 19px; }
  body.has-bottom-tabs { padding-bottom: 70px; }

  .reader-pages { max-width: 100%; }
}
