/* ─────────────────────────────────────────────────
   Sunday Service Shenzhen · Editorial Web Design
   Cream × Black · Playfair Italic
───────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@1,400;1,700;1,900&family=Inter:wght@400;500;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f5f0e4;
  --ink: #1a0a28;
  --card: #e8e2d4;
  --subtle: #6a5a48;
  --dim: #a79984;
  --accent: #a8501a;
  --edge: rgba(26,10,40,0.12);
  --edge-soft: rgba(26,10,40,0.06);

  --serif: "Playfair Display", "Noto Serif SC", Georgia, serif;
  --sans: "Inter", -apple-system, "PingFang SC", "Helvetica Neue", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, monospace;
}

html, body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { position: relative; overflow-x: hidden; }

/* ── PAGE-BG (looping video + poster fallback) ── */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: #080424;
}
.page-bg img,
.page-bg video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 1;
  image-rendering: -webkit-optimize-contrast;
}
.page-bg img { z-index: 0; }
.page-bg video { z-index: 1; }

/* (grain / noise overlay removed by user request) */
.page-grain-DISABLED {
  position: fixed;
  inset: -10px;
  z-index: 1;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.05  0 0 0 0 0.15  0 0 0 0.9 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  animation: grainShift 1.4s steps(6) infinite;
}
@keyframes grainShift {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2%, 1%); }
  40% { transform: translate(1.5%, -2%); }
  60% { transform: translate(-1%, 2%); }
  80% { transform: translate(2%, -0.5%); }
}

/* Ensure content sits above background layers */
.nav, .hero, .section, .section-countdown, .footer, .container, .dash { position: relative; z-index: 2; }

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

/* ── NAV ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245,240,228,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge-soft);
}
.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 14px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.nav-brand img {
  height: 44px;
  width: auto;
  display: block;
}
.nav-brand-text {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  line-height: 1.3;
}
.nav-brand-text b { font-weight: 700; display: block; }
.nav-brand-text span { color: var(--subtle); font-size: 10px; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--subtle);
}
.nav-links a:hover { color: var(--ink); }
.nav-cta {
  background: var(--ink); color: var(--bg);
  padding: 10px 18px; border-radius: 999px;
  font-size: 12px; letter-spacing: 0.08em; font-weight: 600;
  font-family: var(--sans);
}
.nav-cta:hover { opacity: 0.88; }

/* ── HERO ── */
.hero {
  padding: 120px 40px 100px;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
}
.hero-text { position: relative; z-index: 2; max-width: 880px; }
.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--subtle);
  margin-bottom: 40px;
  display: flex; gap: 20px; align-items: center;
}
.hero-eyebrow::after {
  content: ""; flex: 1; max-width: 80px;
  height: 1px; background: var(--ink); opacity: 0.4;
}
.hero-display {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(72px, 14vw, 220px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-shadow: 0 2px 40px rgba(245,240,228,0.6);
}
.hero-display .line2 { display: block; padding-left: 0.2em; }
.hero-meta {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.hero-tag {
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  max-width: 420px;
}
.hero-date {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--subtle);
  padding-top: 20px;
  border-top: 1px solid var(--edge);
  max-width: 420px;
}
.hero-date b { color: var(--ink); font-size: 22px; display: block; margin-bottom: 6px; letter-spacing: 0.04em; font-family: var(--serif); font-style: italic; font-weight: 700; }

.hero-visual { display: none; }

/* ── HOME HERO (title + countdown + CTA, absolutely positioned
   to dodge the deer (upper) and crown (lower) in the background) ── */
.home-hero {
  position: relative;
  z-index: 2;
  max-width: 1400px;
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  min-height: 640px;
  padding: 0 40px;
  text-align: center;
}
.home-title {
  position: absolute;
  top: 5vh;
  left: 20px;
  right: 20px;
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(22px, 5vw, 72px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  text-shadow: 0 4px 60px rgba(0,0,40,0.55), 0 2px 4px rgba(0,0,0,0.35);
}
.home-countdown {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  width: calc(100% - 80px);
  max-width: 680px;
}
/* Home page = white text on deep-blue deer bg */
.home-hero .cd-cell {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  color: #fff;
  text-align: center;
}
.home-hero .cd-cell::before { display: none; }
.home-hero .cd-num {
  color: #fff;
  font-size: clamp(32px, 4.8vw, 64px);
  text-shadow: 0 2px 30px rgba(0,0,40,0.5), 0 1px 3px rgba(0,0,0,0.4);
}
.home-hero .cd-lbl {
  color: #fff;
  opacity: 1;
  text-shadow: 0 1px 6px rgba(0,0,30,0.5);
}
.home-hero .cd-cta {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 11vh;
  background: #fff;
  color: #1a0a28;
  box-shadow: 0 20px 50px rgba(0,0,30,0.3);
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
/* Keep the button anchored — hover applies a soft gradient, no positional shift, no dark inversion */
.home-hero .cd-cta:hover {
  transform: translateX(-50%);
  opacity: 1;
  background: linear-gradient(135deg, #ffffff 0%, #e8dcf5 50%, #c9bce8 100%);
  color: #1a0a28;
  box-shadow: 0 28px 60px rgba(0,0,30,0.45), 0 0 30px rgba(200,180,240,0.35);
}
.home-hero .cd-cta:active {
  transform: translateX(-50%);
  background: linear-gradient(135deg, #f3ecff 0%, #c9bce8 100%);
}
.home-hero .cd-cta.sold,
.home-hero .cd-cta.sold:hover {
  background: rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7);
  transform: translateX(-50%);
  box-shadow: none;
}
.home-hero .cd-meta {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 5vh;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,30,0.5);
}
.home-hero .cd-meta b { color: #fff; font-weight: 700; }
.home-hero .cd-meta b.low { color: #ffb060; }

/* ── COUNTDOWN ── */
.section-countdown {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px 100px;
  border-top: 1px solid var(--edge-soft);
}
.countdown-wrap { max-width: 1100px; margin: 0 auto; text-align: center; }
.countdown-tag {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.32em;
  color: var(--subtle);
  margin-bottom: 14px;
}
.countdown-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 40px;
}
.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 44px;
}
.cd-cell {
  background: var(--ink);
  color: var(--bg);
  border-radius: 6px;
  padding: 36px 18px 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(26,10,40,0.18);
}
.cd-cell::before {
  content: "";
  position: absolute;
  top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245,240,228,0.55), transparent);
}
.cd-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  transition: transform .15s ease-out;
}
.cd-num.tick { transform: scale(1.06); }
.cd-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  opacity: 0.55;
  margin-top: 8px;
}
.cd-cta {
  display: inline-block;
  background: var(--ink);
  color: var(--bg);
  padding: 16px 44px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  transition: opacity .15s, transform .15s;
  box-shadow: 0 20px 50px rgba(26,10,40,0.2);
}
.cd-cta:hover { opacity: 0.9; transform: translateY(-2px); }
.cd-cta.sold { background: var(--dim); pointer-events: none; }
.cd-meta {
  margin-top: 22px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--subtle);
}
.cd-meta b { color: var(--ink); font-weight: 700; font-size: 14px; }
.cd-meta b.low { color: var(--accent); }

/* ── SECTION ── */
.section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 80px 40px;
  border-top: 1px solid var(--edge-soft);
}
.section-head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 48px;
}
.section-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--subtle);
}
.section-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.section-lead {
  font-size: 19px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 680px;
  margin-bottom: 40px;
}

/* ── EVENT GRID ── */
.two-col {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: start;
}
.event-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}
.event-item {
  padding: 26px 0;
  border-bottom: 1px solid var(--edge-soft);
}
.event-item:nth-last-child(-n+2) { border-bottom: none; }
.event-item:nth-child(odd) { padding-right: 30px; border-right: 1px solid var(--edge-soft); }
.event-item:nth-child(even) { padding-left: 30px; }
.event-lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: var(--subtle);
  margin-bottom: 8px;
}
.event-val {
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.3;
}

/* ── REMAINING BOX ── */
.remaining {
  background: var(--ink);
  color: var(--bg);
  padding: 56px 44px;
  border-radius: 4px;
  position: sticky; top: 100px;
}
.remaining-lbl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  opacity: 0.6;
  margin-bottom: 24px;
}
.remaining-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  font-size: 160px;
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
}
.remaining-num.low { color: #e8a56a; }
.remaining-total {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  opacity: 0.5;
  margin-bottom: 36px;
}
.remaining-cta {
  display: block;
  background: var(--bg);
  color: var(--ink);
  padding: 20px;
  text-align: center;
  border-radius: 2px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.06em;
  transition: opacity .15s;
}
.remaining-cta:hover { opacity: 0.85; }
.remaining-sold-out {
  padding: 20px; text-align: center; font-size: 15px; opacity: 0.6;
  border: 1px solid rgba(245,240,228,0.3); border-radius: 2px;
}
.remaining-note {
  margin-top: 20px;
  font-size: 12px;
  opacity: 0.55;
  line-height: 1.6;
}

/* ── MERCH ── */
.merch {
  background: var(--card);
  border: 1px solid var(--edge);
  padding: 40px;
  border-radius: 4px;
}
.merch-head {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--ink);
  margin-bottom: 18px;
}
.merch-title {
  font-family: var(--serif); font-style: italic;
  font-size: 36px; font-weight: 700; line-height: 1.1;
  margin-bottom: 14px;
}
.merch-body { font-size: 15px; color: var(--subtle); line-height: 1.7; max-width: 600px; }

/* ── FOOTER ── */
.footer {
  max-width: 1400px; margin: 0 auto;
  padding: 60px 40px 40px;
  border-top: 1px solid var(--edge-soft);
  display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap;
}
.footer-brand {
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: 32px; line-height: 1;
}
.footer-meta {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.16em; color: var(--subtle); line-height: 1.8;
  text-align: right;
}

/* ── FORM PAGE ── */
.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 80px 40px 120px;
}
.page-tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.28em;
  color: var(--subtle);
  margin-bottom: 24px;
}
.page-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(56px, 10vw, 120px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.page-sub {
  font-size: 17px;
  color: var(--subtle);
  margin-bottom: 56px;
}

.form-block {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: 8px 32px;
  margin-bottom: 28px;
}
.field { padding: 22px 0; border-bottom: 1px solid var(--edge-soft); }
.field:last-child { border-bottom: none; }
.field-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--subtle);
  display: block;
  margin-bottom: 10px;
}
.field-input {
  width: 100%;
  font-size: 22px;
  color: var(--ink);
  background: transparent;
  border: none;
  padding: 0;
  outline: none;
  font-family: inherit;
  font-weight: 500;
}
.field-input::placeholder { color: var(--dim); font-weight: 400; }

.count-row { display: flex; align-items: center; gap: 20px; }
.count-btn {
  width: 44px; height: 44px;
  background: var(--bg);
  border: 1px solid var(--edge);
  border-radius: 2px;
  font-size: 22px;
  color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; user-select: none;
  transition: background .15s;
}
.count-btn:hover { background: #eadfc3; }
.count-num {
  font-family: var(--mono);
  font-size: 32px;
  font-weight: 600;
  min-width: 44px;
  text-align: center;
}
.count-hint {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--subtle);
}

/* ── BUTTONS ── */
.btn {
  display: block; width: 100%;
  background: var(--ink); color: var(--bg);
  padding: 22px 28px;
  border-radius: 4px;
  border: none; cursor: pointer;
  font-family: var(--sans);
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  transition: opacity .15s;
}
.btn:hover { opacity: 0.88; }
.btn:disabled { background: var(--dim); cursor: not-allowed; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--edge);
}
.btn-ghost:hover { background: var(--card); opacity: 1; }
.btn-inline { display: inline-block; width: auto; padding: 14px 26px; font-size: 13px; }

/* ── SUCCESS PAGE ── */
.success-check {
  font-family: var(--serif); font-style: italic;
  font-size: 80px; line-height: 1; margin-bottom: 24px;
}
.qrcard {
  background: #fff;
  border-radius: 6px;
  padding: 40px;
  border: 1px solid var(--edge);
  box-shadow: 0 20px 60px rgba(26,10,40,0.08);
  text-align: center;
  margin-bottom: 32px;
  display: flex; flex-direction: column; align-items: center;
}
.qrimg { width: 300px; height: 300px; margin-bottom: 20px; background: #f5f7fb; border-radius: 4px; }
.qrno {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 6px;
}
.qrhint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--subtle);
}

.info-card {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: 8px 30px;
  margin-bottom: 28px;
}
.info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--edge-soft);
  gap: 20px;
}
.info-row:last-child { border-bottom: none; }
.info-lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--subtle); }
.info-val { font-size: 16px; font-weight: 500; color: var(--ink); text-align: right; }
.info-val.mono { font-family: var(--mono); letter-spacing: 0.04em; }

/* ── ADMIN / CHECKIN DASHBOARD ── */
.dash {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 40px 120px;
}
.dash-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 30px;
  margin-bottom: 48px; flex-wrap: wrap;
}
.dash-title {
  font-family: var(--serif); font-style: italic; font-weight: 900;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 1; letter-spacing: -0.02em;
}
.dash-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; color: var(--subtle); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: 28px 24px;
}
.stat-num {
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: 56px; line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.stat-num .of { font-size: 20px; color: var(--subtle); font-weight: 400; }
.stat-lbl {
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.2em; color: var(--subtle);
  margin-top: 14px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: 0 28px;
  margin-bottom: 24px;
}
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--edge-soft);
}
.panel-title {
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.2em; color: var(--subtle);
}
.panel-action {
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; color: var(--ink);
  cursor: pointer; background: none; border: none; padding: 0;
}
.panel-action:hover { opacity: 0.6; }

.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.tbl thead th {
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.2em; color: var(--subtle);
  text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--edge);
}
.tbl tbody td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--edge-soft);
}
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .mono { font-family: var(--mono); font-size: 12px; }
.tbl .ok { color: #4a7a3a; font-weight: 700; }
.tbl .nope { color: var(--dim); }

.empty {
  text-align: center; padding: 40px 0;
  color: var(--subtle); font-size: 13px;
}
.loading { text-align: center; color: var(--subtle); font-size: 13px; padding: 60px 0; }

/* ── RESULT ── */
.result {
  border-radius: 4px;
  padding: 28px 24px;
  margin-bottom: 24px;
  border: 1px solid;
  text-align: center;
}
.result.ok { background: #e8f0de; border-color: #4a7a3a; }
.result.dup { background: #f5ebd0; border-color: #a0751a; }
.result.err { background: #f5dde0; border-color: #a03040; }
.result-mark {
  font-family: var(--serif); font-style: italic;
  font-size: 48px; line-height: 1; margin-bottom: 8px;
}
.result.ok  .result-mark { color: #4a7a3a; }
.result.dup .result-mark { color: #a0751a; }
.result.err .result-mark { color: #a03040; }
.result-title { font-size: 22px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.result-msg { font-size: 14px; color: var(--subtle); }

/* ── WINNER ── */
.winner {
  background: var(--ink); color: var(--bg);
  padding: 18px 22px; border-radius: 4px;
  display: flex; gap: 16px; align-items: center;
  margin-bottom: 8px;
}
.winner-idx { font-family: var(--mono); font-size: 12px; opacity: 0.5; min-width: 28px; }
.winner-name { font-weight: 700; font-size: 17px; flex: 1; }
.winner-phone { font-family: var(--mono); font-size: 12px; opacity: 0.55; }

/* ── SCANNER ── */
.scan-box {
  background: var(--ink); color: var(--bg);
  border-radius: 4px;
  padding: 60px 30px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 24px;
}
.scan-box.active { padding: 0; overflow: hidden; background: #000; }
.scan-icon { font-family: var(--serif); font-style: italic; font-size: 48px; line-height: 1; margin-bottom: 12px; }
.scan-main { font-size: 17px; font-weight: 700; letter-spacing: 0.06em; }
.scan-sub { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; opacity: 0.6; margin-top: 8px; }
#qr-reader { width: 100% !important; }
#qr-reader__scan_region img { display: none !important; }

/* ── GATE ── */
.gate {
  max-width: 440px; margin: 80px auto;
  background: var(--card);
  border: 1px solid var(--edge);
  border-radius: 4px;
  padding: 40px;
}
.gate-title {
  font-family: var(--serif); font-style: italic; font-weight: 700;
  font-size: 32px; margin-bottom: 10px;
}
.gate-body { font-size: 14px; color: var(--subtle); margin-bottom: 24px; }
.gate input {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid var(--edge);
  border-radius: 4px;
  font-size: 16px;
  background: var(--bg);
  color: var(--ink);
  font-family: inherit;
  margin-bottom: 14px;
  outline: none;
}
.gate input:focus { border-color: var(--ink); }

/* ── TOAST ── */
.toast {
  position: fixed;
  top: 80px; left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--bg);
  padding: 14px 22px;
  border-radius: 4px;
  font-size: 14px;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(4px); }

.nav-back {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--subtle);
  margin-bottom: 30px;
}
.nav-back:hover { color: var(--ink); }

.note { font-size: 12px; color: var(--subtle); margin-top: 10px; line-height: 1.7; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .nav-inner { padding: 12px 16px; }
  .nav-brand img { height: 32px; }
  .nav-brand-text { font-size: 10px; letter-spacing: 0.22em; }
  .nav-brand-text span { font-size: 9px; }
  .hero {
    padding: 80px 20px 60px;
    min-height: 60vh;
  }
  .page-bg img { width: 100%; opacity: 1; }
  .home-hero { padding: 0 16px; min-height: 100dvh; height: 100dvh; }
  .home-title { left: 8px; right: 8px; top: 6vh; font-size: clamp(22px, 7vw, 42px); }
  .home-countdown { gap: 6px; width: calc(100% - 24px); top: 48%; max-width: 420px; }
  .home-hero .cd-num { font-size: clamp(28px, 7vw, 44px); }
  .home-hero .cd-lbl { font-size: 9px; letter-spacing: 0.2em; }
  .home-hero .cd-cta { bottom: 13vh; padding: 14px 40px; font-size: 14px; white-space: nowrap; display: inline-block; width: auto; }
  .home-hero .cd-meta { left: 16px; right: 16px; bottom: 6vh; font-size: 12px; line-height: 1.6; }
  .section-countdown { padding: 40px 20px 60px; }
  .countdown-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .cd-cell { padding: 22px 6px 14px; border-radius: 4px; }
  .cd-lbl { font-size: 8px; letter-spacing: 0.18em; margin-top: 10px; }
  /* Inner page CTAs go full-width, home CTA stays pill (re-asserted above) */
  .cd-cta { display: block; width: 100%; padding: 18px 20px; }
  .hero-meta { grid-template-columns: 1fr; gap: 24px; }
  .hero-date { text-align: left; }
  .section { padding: 50px 20px; }
  .section-head { flex-direction: column; gap: 10px; margin-bottom: 30px; }
  .two-col { grid-template-columns: 1fr; gap: 30px; }
  .event-list { grid-template-columns: 1fr; }
  .event-item:nth-child(odd) { padding-right: 0; border-right: none; }
  .event-item:nth-child(even) { padding-left: 0; }
  .event-item { border-bottom: 1px solid var(--edge-soft); padding: 22px 0; }
  .event-item:last-child { border-bottom: none; }
  .remaining { position: static; padding: 40px 28px; }
  .remaining-num { font-size: 120px; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat { padding: 20px 16px; }
  .stat-num { font-size: clamp(32px, 8vw, 44px) !important; }
  .dash { padding: 30px 16px 80px; }
  .container { padding: 40px 16px 80px; }
  .footer { padding: 40px 20px; flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-meta { text-align: left; }
  .tbl { font-size: 12px; }
  .tbl thead th, .tbl tbody td { padding: 8px 6px; }
  /* Mobile nav: keep links visible, just shrink them */
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 12px; letter-spacing: 0.12em; }
  /* Home scroll sections on mobile */
  .home-sections { padding: 60px 16px 80px; }
  .home-section { margin-bottom: 80px; }
  .home-section-title { font-size: clamp(38px, 11vw, 64px); margin-bottom: 20px; }
  .home-section-body { font-size: 15px; line-height: 1.75; }
  .merch-photo { max-width: 100%; border-radius: 10px; }
  /* Page headings and form fields */
  .page-title { font-size: clamp(42px, 13vw, 84px) !important; }
  .page-sub { font-size: 14px; line-height: 1.7; }
  .field-input { font-size: 16px; /* avoids iOS zoom */ }
  .dash-title { font-size: clamp(36px, 11vw, 56px); }
  .dash-head { flex-direction: column; gap: 8px; }
  .panel { padding: 18px 16px; }
  .panel-head { flex-direction: column; gap: 8px; align-items: flex-start; }
  .qrimg { max-width: 260px; }
  .qrcard { padding: 18px; }
  .result { padding: 22px 18px; }
  .gate { padding: 32px 20px; }
  .scan-box { padding: 26px 20px; }
  /* Stack the admin action buttons */
  .dash [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* Extra-small screens (iPhone SE etc.) */
@media (max-width: 380px) {
  .home-title { font-size: clamp(18px, 6vw, 26px); }
  .home-hero .cd-num { font-size: 24px; }
  .home-hero .cd-meta { font-size: 11px; }
  .home-hero .cd-cta { padding: 12px 32px; font-size: 13px; }
}

/* ─────────────────────────────────────────────────
   WHITE-ON-BLUE THEME OVERRIDES (all inner pages)
   Keeps homepage .home-hero scoped rules untouched.
───────────────────────────────────────────────── */

html, body {
  background: transparent;
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

/* ── NAV: dark glass ── */
.nav {
  background: rgba(8, 4, 36, 0.42);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.nav-brand { color: #fff; }
.nav-brand-text b { color: #fff; }
.nav-brand-text span { color: rgba(255,255,255,0.6); }
.nav-links a { color: rgba(255,255,255,0.75); }
.nav-links a:hover { color: #fff; }
.nav-cta { background: #fff; color: #1a0a28; }

/* ── PAGE HEADERS ── */
.page-tag { color: rgba(255,255,255,0.75); }
.page-title {
  color: #fff;
  text-shadow: 0 4px 40px rgba(0,0,30,0.5), 0 2px 4px rgba(0,0,0,0.25);
}
.page-sub { color: rgba(255,255,255,0.82); }

/* ── CARDS → GLASS (replaces cream cards) ── */
.form-block,
.info-card,
.panel,
.stat,
.gate {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(22px) saturate(1.1);
  -webkit-backdrop-filter: blur(22px) saturate(1.1);
  box-shadow: 0 20px 60px rgba(0,0,30,0.25);
  border-radius: 8px;
}

/* ── FORM ── */
.field { border-bottom-color: rgba(255,255,255,0.12); }
.field-label { color: rgba(255,255,255,0.7); }
.field-input { color: #fff; background: transparent; }
.field-input::placeholder { color: rgba(255,255,255,0.38); }

.count-btn {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
}
.count-btn:hover { background: rgba(255,255,255,0.16); }
.count-hint { color: rgba(255,255,255,0.6); }
.count-num { color: #fff; }

/* ── BUTTONS (inverse: white bg, ink text) ── */
.btn {
  background: #fff;
  color: #1a0a28;
  box-shadow: 0 16px 40px rgba(0,0,30,0.3);
  border-radius: 999px;
}
.btn:hover { opacity: 0.92; }
.btn:disabled { background: rgba(255,255,255,0.35); color: rgba(26,10,40,0.5); box-shadow: none; }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: none;
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* ── SUCCESS PAGE ── */
.success-check { color: #fff; }
.qrcard {
  background: #fff;
  border: none;
  box-shadow: 0 30px 80px rgba(0,0,30,0.4);
  border-radius: 12px;
}
.qrno { color: #1a0a28; }
.qrhint { color: #6a5a48; }
.info-row { border-bottom-color: rgba(255,255,255,0.12); }
.info-lbl { color: rgba(255,255,255,0.65); }
.info-val { color: #fff; }

/* ── DASHBOARD ── */
.dash-title {
  color: #fff;
  text-shadow: 0 4px 40px rgba(0,0,30,0.45);
}
.dash-meta { color: rgba(255,255,255,0.65); }
.dash-meta a { color: #fff !important; }

.stat {
  padding: 26px 24px;
}
.stat-num {
  color: #fff;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: -0.015em;
}
.stat-num .of { color: rgba(255,255,255,0.5); font-style: italic; }
.stat-lbl { color: rgba(255,255,255,0.65); }

.panel { padding: 0 28px; }
.panel-head { border-bottom-color: rgba(255,255,255,0.14); }
.panel-title { color: rgba(255,255,255,0.7); }
.panel-action { color: #fff; }

.tbl thead th {
  color: rgba(255,255,255,0.6);
  border-bottom-color: rgba(255,255,255,0.22);
}
.tbl tbody td {
  color: #fff;
  border-bottom-color: rgba(255,255,255,0.08);
}
.tbl .mono { color: rgba(255,255,255,0.9); }
.tbl .ok { color: #9ad26a; }
.tbl .nope { color: rgba(255,255,255,0.3); }

.empty { color: rgba(255,255,255,0.55); }
.loading { color: rgba(255,255,255,0.7); }

/* ── GATE ── */
.gate-title { color: #fff; }
.gate-body { color: rgba(255,255,255,0.7); }
.gate input {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
}
.gate input::placeholder { color: rgba(255,255,255,0.4); }
.gate input:focus { border-color: #fff; background: rgba(255,255,255,0.14); }

/* ── RESULT BOXES ── */
.result { backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-radius: 8px; }
.result.ok  { background: rgba(120,200,110,0.16); border-color: rgba(160,230,140,0.55); }
.result.dup { background: rgba(230,170,70,0.16);  border-color: rgba(240,200,110,0.55); }
.result.err { background: rgba(240,110,130,0.18); border-color: rgba(255,150,170,0.55); }
.result.ok  .result-mark { color: #b8e09c; }
.result.dup .result-mark { color: #f0cb70; }
.result.err .result-mark { color: #ff9ba5; }
.result-title { color: #fff; }
.result-msg { color: rgba(255,255,255,0.78); }

/* ── SCAN BOX ── */
.scan-box {
  background: rgba(255,255,255,0.06);
  color: #fff;
  border: 1px dashed rgba(255,255,255,0.28);
  border-radius: 8px;
}
.scan-box:hover { background: rgba(255,255,255,0.12); }
.scan-box.active { background: #000; border-style: solid; border-color: rgba(255,255,255,0.2); }
.scan-sub { opacity: 0.7; }

/* ── NOTES / MISC ── */
.note { color: rgba(255,255,255,0.62); }
.nav-back { color: rgba(255,255,255,0.7); }
.nav-back:hover { color: #fff; }

/* ── NUMBER TYPOGRAPHY — consistent, tabular everywhere ── */
.mono,
.stat-num,
.qrno,
.qrno *,
.count-num,
.cd-num,
.info-val.mono,
.tbl .mono,
.winner-idx,
.winner-phone,
.dash-meta {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
  letter-spacing: 0.02em;
}

/* Unify the big stat number style with homepage countdown */
.stat-num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(44px, 5vw, 60px);
}

/* Improve mono readability on blue */
.mono, .tbl .mono {
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 12.5px;
  font-weight: 500;
}
.tbl { font-size: 14px; }

/* Winner panel — keep dark, but lift on blue */
.winner {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
}

/* ─────────────────────────────────────────────────
   HOMEPAGE · 演出介绍 + 周边抽奖 (scroll area)
───────────────────────────────────────────────── */
.scroll-hint {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 20px;
  opacity: 0.55;
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 50%;
  animation: hintBob 2.2s ease-in-out infinite;
  text-decoration: none;
}
.scroll-hint:hover { opacity: 1; }
@keyframes hintBob {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

.home-sections {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px 80px;
  color: #fff;
  text-align: center;
}
.home-section {
  padding: 100px 0;
  border-top: 1px solid #fff;
}
.home-section:last-child {
  border-bottom: 1px solid #fff;
}

.home-section-title {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 900;
  font-size: clamp(44px, 7.5vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: #fff;
  text-shadow: 0 4px 60px rgba(0,0,40,0.45), 0 2px 4px rgba(0,0,0,0.25);
  margin: 0 0 36px;
  text-align: center;
}
.home-section-title em {
  font-style: italic;
  opacity: 1;
  color: #fff;
}

.home-section-body {
  font-size: 17px;
  line-height: 1.85;
  color: #fff;
  max-width: 640px;
  margin: 0 auto 28px;
  text-align: center;
}
.home-section-body:last-child { margin-bottom: 0; }
.home-section-body b { font-weight: 700; color: #fff; }

/* Detail grid (date / time / venue / duration) */
.home-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  max-width: 720px;
  margin: 44px auto 0;
  padding: 28px 0 4px;
  border-top: 1px solid #fff;
}
.home-detail-grid > div {
  padding: 0 8px;
  text-align: center;
}
.home-detail-grid dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.24em;
  color: #fff;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.home-detail-grid dd {
  font-size: 15px;
  color: #fff;
  font-weight: 600;
  margin: 0;
  line-height: 1.5;
}

/* Raffle bullet list */
.home-rules {
  list-style: none;
  padding: 0;
  margin: 36px auto 0;
  max-width: 600px;
  text-align: left;
  color: #fff;
}
.home-rules li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  font-size: 15px;
  line-height: 1.65;
}
.home-rules li:last-child { border-bottom: none; }
.home-rules li::before {
  content: attr(data-n);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: #fff;
  opacity: 1;
  padding-top: 2px;
}

.merch-photo {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 44px auto 0;
  border-radius: 14px;
  box-shadow: 0 40px 80px rgba(0,0,30,0.45), 0 0 0 1px rgba(255,255,255,0.15);
}

@media (max-width: 700px) {
  .home-sections { padding: 0 16px 60px; max-width: 100%; }
  .home-section { padding: 70px 0; }
  .home-detail-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 14px; padding: 24px 0 4px; }
  .home-detail-grid dd { font-size: 14px; }
  .home-rules { margin-top: 28px; }
  .home-rules li { font-size: 14px; padding: 12px 0; grid-template-columns: 24px 1fr; gap: 8px; }
  .merch-photo { margin-top: 32px; border-radius: 10px; }
}

