/* ═══════════════════════════════════════════════════════════
   DECADESDAILY — main.css
   Dark Navy Theme matching mockup design
   ═══════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ── */
:root {
  --bg:              #0b1120;
  --bg2:             #0f1829;
  --panel:           #0e1d35;
  --panel-border:    rgba(255,255,255,0.07);
  --card-bg:         #0d1b30;
  --card-border:     rgba(255,255,255,0.09);
  --card-green-bg:   rgba(26,158,92,0.12);
  --card-green-bdr:  #1a9e5c;
  --card-red-bg:     rgba(214,60,60,0.12);
  --card-red-bdr:    #d63c3c;

  --amber:           #e8950d;
  --amber-light:     #ffc94d;
  --amber-pale:      rgba(232,149,13,0.12);
  --amber-glow:      rgba(232,149,13,0.35);

  --teal:            #0b7c8a;
  --teal-light:      rgba(11,124,138,0.18);

  --green:           #1a9e5c;
  --green-pale:      rgba(26,158,92,0.12);
  --red:             #d63c3c;
  --red-pale:        rgba(214,60,60,0.12);

  --white:           #ffffff;
  --text:            #dce8f8;
  --text-mid:        #8a9abf;
  --text-muted:      #4a5a7a;
  --dark:            #0b1120;

  --badge-bg:        #1a2744;
  --shadow:          0 2px 16px rgba(0,0,0,0.35);
  --shadow-lg:       0 8px 40px rgba(0,0,0,0.5);
  --shadow-card:     0 1px 4px rgba(0,0,0,0.4);
}

/* ── RESET ── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { scroll-behavior:smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Source Serif 4', Georgia, serif;
  min-height: 100vh;
  overflow-x: hidden;
  padding-bottom: 80px; /* room for mobile tab bar */
}

/* ── FONT SIZES ── */
html.fs-0{font-size:12px;} html.fs-1{font-size:13px;} html.fs-2{font-size:15px;}
html.fs-3{font-size:17px;} html.fs-4{font-size:20px;} html.fs-5{font-size:24px;}
html.fs-6{font-size:30px;}

/* ══════════════════════════════════════════════
   PAGE HERO (desktop) — large DECADES branding
   ══════════════════════════════════════════════ */
.page-hero {
  display: none;
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}
@media(min-width:769px) {
  .page-hero { display: block; }
  body { padding-bottom: 0; }
}
.page-hero-logo {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 900;
  color: var(--white);
  letter-spacing: 0.06em;
  line-height: 1;
}
.page-hero-logo .a-wrap {
  display: inline-block;
  position: relative;
  color: var(--amber);
}
.page-hero-logo .a-rule {
  display: block;
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--amber);
  border-radius: 2px;
  box-shadow: 0 0 12px var(--amber-glow);
}
.page-hero-sub {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.5em;
  color: var(--text-mid);
  text-transform: uppercase;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
.page-hero-sub::before,.page-hero-sub::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber));
}
.page-hero-sub::after { background: linear-gradient(90deg, var(--amber), transparent); }

/* ══════════════════════════════════════════════
   MOBILE TOP BAR
   ══════════════════════════════════════════════ */
.mobile-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--panel);
  border-bottom: 1px solid var(--panel-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
@media(min-width:769px) { .mobile-top-bar { display: none; } }
.mob-hamburger, .mob-stats-btn {
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 4px;
  transition: background 0.2s;
  line-height: 1;
}
.mob-hamburger:hover, .mob-stats-btn:hover { background: var(--amber-pale); }
.mob-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: 0.06em;
  text-align: center;
  line-height: 1.1;
}
.mob-brand .a-wrap { color: var(--amber); display: inline-block; position: relative; }
.mob-brand .a-rule {
  display: block;
  position: absolute;
  bottom: 1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--amber);
  border-radius: 1px;
}
.mob-brand-sub {
  font-family: 'Cinzel', serif;
  font-size: 0.5rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.mob-brand-sub::before,.mob-brand-sub::after {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--amber);
  opacity: 0.5;
}

/* ══════════════════════════════════════════════
   GAME PANEL WRAPPER
   ══════════════════════════════════════════════ */
.game-panel-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1rem 1rem;
}
@media(min-width:769px) { .game-panel-wrap { padding: 0 1.5rem 2rem; } }

.game-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* ── PANEL NAV (desktop only) ── */
.panel-nav {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.4rem;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(0,0,0,0.15);
}
@media(min-width:769px) { .panel-nav { display: flex; } }

.panel-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 900;
  font-size: 1rem;
  color: var(--white);
  letter-spacing: 0.06em;
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.panel-brand .a-wrap { color: var(--amber); display: inline-block; position: relative; }
.panel-brand .a-rule {
  display: block;
  position: absolute;
  bottom: 1px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--amber);
  border-radius: 1px;
}
.panel-brand-sub {
  font-family: 'Cinzel', serif;
  font-size: 0.45rem;
  letter-spacing: 0.35em;
  color: var(--text-muted);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.25rem;
}
.panel-brand-sub::before,.panel-brand-sub::after {
  content: '';
  display: block;
  width: 14px;
  height: 1px;
  background: var(--amber);
  opacity: 0.5;
}

.panel-nav-links {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.panel-nav-btn {
  background: none;
  border: none;
  color: var(--text-mid);
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.4rem 0.7rem;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.panel-nav-btn:hover { background: var(--amber-pale); color: var(--amber); }
.panel-nav-icon-btn {
  background: none;
  border: 1px solid var(--panel-border);
  color: var(--text-mid);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.panel-nav-icon-btn:hover { background: var(--amber-pale); color: var(--amber); border-color: var(--amber); }

/* ── PANEL BODY — two-column on desktop ── */
.panel-body {
  display: flex;
  min-height: 500px;
}

/* ── CATEGORY SIDEBAR IMAGE (desktop) ── */
.panel-sidebar {
  display: none;
  width: 220px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  border-right: 1px solid var(--panel-border);
}
@media(min-width:769px) { .panel-sidebar { display: block; } }
.panel-sidebar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transition: opacity 0.8s ease;
}
.panel-sidebar-img.loaded { opacity: 1; }
.panel-sidebar-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, #0d2a4a 0%, #071528 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.panel-sidebar-placeholder span { font-size: 3rem; opacity: 0.3; }

/* ── PANEL MAIN — game content ── */
.panel-main {
  flex: 1;
  padding: 1.4rem 1.4rem 1.8rem;
  min-width: 0;
}

/* ── PAST MODE BAR ── */
.past-mode-bar {
  display: none;
  background: var(--teal);
  padding: 0.45rem 1.4rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -1.4rem -1.4rem 1.2rem;
}
.past-mode-bar.show { display: flex; }
.past-mode-label {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: white;
}
.past-mode-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: white;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.4);
  border-radius: 3px;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.past-mode-btn:hover { background: rgba(255,255,255,0.35); }

/* ── LOADING / ERROR ── */
.loading-state {
  text-align: center;
  padding: 3rem 1rem;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  text-transform: uppercase;
}
.loading-spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error-state {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
  background: var(--red-pale);
  border: 2px solid var(--red);
  border-radius: 6px;
  margin: 1rem 0;
  font-style: italic;
  color: var(--red);
  font-size: 0.95rem;
}
.error-state.show { display: block; }

/* ── THEME SECTION ── */
.theme-section {
  display: none;
  margin-bottom: 1rem;
}
.theme-section.show { display: block; }
.theme-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 0.2rem;
}
.theme-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 0.15rem;
}
.theme-meta {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── ATTEMPT BAR ── */
.attempt-bar {
  display: none;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.attempt-bar.show { display: flex; }
.attempt-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mid);
}
.attempt-dots { display: flex; gap: 0.4rem; align-items: center; }
.adot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  border: 2px solid rgba(255,255,255,0.2);
  transition: background 0.3s, border-color 0.3s;
}
.adot.current  { background: var(--amber); border-color: var(--amber); box-shadow: 0 0 8px var(--amber-glow); }
.adot.used     { background: var(--text-muted); border-color: var(--text-muted); }
.adot.won      { background: var(--green); border-color: var(--green); }
.adot.lost     { background: var(--red); border-color: var(--red); }

/* ── INSTRUCTIONS ── */
.instructions {
  display: none;
  font-size: 0.92rem;
  color: var(--text-mid);
  margin-bottom: 1rem;
  line-height: 1.5;
}
.instructions.show { display: block; }
.instructions strong { color: var(--white); }
.instructions .inst-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

/* ── SORT AREA ── */
.sort-area {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

/* ══════════════════════════════════════════════
   EVENT CARDS — dark theme
   ══════════════════════════════════════════════ */
.event-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  cursor: grab;
  touch-action: none;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s, border-color 0.3s, background 0.3s;
  min-height: 0;
  position: relative;
}
.event-card:active { cursor: grabbing; }
.event-card.drag-lifting {
  box-shadow: 0 12px 32px rgba(0,0,0,0.6) !important;
  cursor: grabbing;
  border-color: var(--teal) !important;
  z-index: 50;
  position: relative;
}
.event-card.drag-shifting {
  transition: transform 0.14s ease, box-shadow 0.15s, border-color 0.3s, background 0.3s;
}
.event-card.correct {
  border-color: var(--green);
  background: var(--card-green-bg);
}
.event-card.incorrect {
  border-color: var(--red);
  background: var(--card-red-bg);
}
.event-card.hint-locked {
  border-color: var(--green);
  background: var(--card-green-bg);
  cursor: default;
}
.event-card.hint-locked:active { cursor: default; }

/* Number badge */
.card-position {
  width: 28px;
  height: 28px;
  min-width: 28px;
  background: var(--badge-bg);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--amber);
  flex-shrink: 0;
}
.hint-locked .card-position {
  background: rgba(26,158,92,0.2);
  color: var(--green);
}

/* Card text */
.card-text {
  flex: 1;
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.4;
  min-width: 0;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* Year (hidden until full solve) */
.card-year {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--amber-light);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.5s;
  min-width: 2.6rem;
  text-align: right;
}
.card-year.visible { opacity: 1; }

/* Correct/wrong indicator */
.card-indicator {
  font-size: 0.95rem;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.4s;
  width: 1.2rem;
  text-align: center;
}
.card-indicator.visible { opacity: 1; }

/* ── DRAG HANDLE — 3×3 dot grid, RIGHT side ── */
.card-handle {
  display: grid;
  grid-template-columns: repeat(3, 6px);
  grid-template-rows: repeat(3, 6px);
  gap: 3px;
  flex-shrink: 0;
  opacity: 0.4;
  cursor: grab;
  padding: 4px;
  touch-action: none;
  order: 10; /* push to right */
}
.card-handle span {
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #d0d4e8, #2a3060);
  box-shadow: 0 2px 3px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.3);
}
.card-handle:hover { opacity: 0.85; }
.card-handle:hover span {
  background: radial-gradient(circle at 30% 30%, #e8ecff, #4a5290);
  box-shadow: 0 2px 4px rgba(0,0,0,0.55), inset 0 1px 2px rgba(255,255,255,0.4);
}

/* Lock icon for locked cards */
.card-lock-icon {
  font-size: 0.95rem;
  flex-shrink: 0;
  color: var(--green);
  opacity: 0.85;
  order: 10;
  width: 28px;
  text-align: center;
}

/* Touch — card body scrolls, handle drags */
@media(hover:none),(pointer:coarse) {
  .event-card { touch-action: pan-y; }
  .card-handle { opacity: 0.55; }
}

/* ── ALL CORRECT MESSAGE ── */
.all-correct-msg {
  text-align: center;
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-mid);
  padding: 0.4rem 0 0.6rem;
  display: none;
}
.all-correct-msg.show { display: block; }

/* ── SUBMIT BUTTON ── */
.btn-submit {
  display: none;
  width: 100%;
  padding: 0.95rem;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(135deg, #1a2a4a, var(--teal));
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-bottom: 0.8rem;
  box-shadow: var(--shadow);
}
.btn-submit.show { display: block; }
.btn-submit:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.3; cursor: default; transform: none; }

/* ── VIEW RESULTS BUTTON ── */
.btn-view-results {
  display: none;
  width: 100%;
  padding: 1rem;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--green);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  margin-bottom: 0.8rem;
  box-shadow: 0 4px 16px rgba(26,158,92,0.35);
}
.btn-view-results.show { display: block; }
.btn-view-results:hover { opacity: 0.88; transform: translateY(-1px); }

/* ── RESULT REVIEW BACK ── */
.btn-review-back {
  display: none;
  width: 100%;
  padding: 0.7rem;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  background: transparent;
  border: 2px solid var(--teal);
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 1rem;
  transition: background 0.2s;
}
.btn-review-back:hover { background: var(--teal-light); }
.btn-review-back.show { display: block; }

/* ── PAST RETURN WRAP ── */
#pastReturnWrap {
  text-align: center;
  padding: 0.6rem 0 0.2rem;
  border-top: 1px solid var(--panel-border);
  margin-top: 0.5rem;
}
#pastReturnLabel {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}

/* ── PLAYED BANNER ── */
.played-banner {
  display: none;
  background: var(--teal-light);
  border: 1px solid rgba(11,124,138,0.4);
  border-radius: 6px;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.2rem;
  text-align: center;
  font-style: italic;
  color: var(--teal);
  font-size: 0.92rem;
}
.played-banner.show { display: block; }
.played-timer {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  display: block;
  margin-top: 0.3rem;
}
.played-timer span {
  font-family: 'Playfair Display', serif;
  font-size: 0.95rem;
  font-weight: 700;
}

/* ══════════════════════════════════════════════
   RESULT PANEL — dark themed
   ══════════════════════════════════════════════ */
.result-panel {
  display: none;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--panel-border);
  border-top: 3px solid var(--amber);
  border-radius: 8px;
  padding: 1.6rem 1.4rem;
  text-align: center;
}
.result-panel.show {
  display: block;
  animation: resultSlideUp 0.5s cubic-bezier(0.22,1,0.36,1) forwards;
}
@keyframes resultSlideUp {
  from { opacity:0; transform:translateY(24px); }
  to   { opacity:1; transform:translateY(0); }
}
.result-emoji { font-size: 2.4rem; margin-bottom: 0.4rem; }
.result-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 0.3rem;
}
.result-sub {
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-mid);
  margin-bottom: 1rem;
}
.attempt-history { margin-bottom: 1rem; }
.attempt-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.attempt-row-label {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  min-width: 4.5rem;
  text-align: right;
}
.attempt-row-dots { font-size: 1.2rem; letter-spacing: 0.1rem; }
.attempt-row-result { font-size: 0.8rem; margin-left: 0.3rem; color: var(--text-mid); }

.streak-result {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.2rem;
  padding: 0.45rem 0.9rem;
  background: var(--amber-pale);
  border-radius: 4px;
  display: inline-block;
}
.result-btns {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-share {
  padding: 0.65rem 1.4rem;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--amber);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-share:hover { opacity: 0.85; }
.btn-games {
  padding: 0.65rem 1.4rem;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-mid);
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  text-decoration: none;
  display: inline-block;
}
.btn-games:hover { border-color: var(--text-mid); color: var(--white); }
.btn-back-today {
  display: block;
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.85rem;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--teal);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-back-today:hover { opacity: 0.85; }
.share-toast {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  text-align: center;
  min-height: 1.2rem;
  margin-top: 0.3rem;
  transition: opacity 0.3s;
}

/* Countdown */
.next-puzzle-wrap {
  text-align: center;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--panel-border);
}
.next-puzzle-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.timer-countdown {
  font-family: 'Playfair Display', serif;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.08em;
  display: block;
}

/* ══════════════════════════════════════════════
   COMMUNITY STATS BAR
   ══════════════════════════════════════════════ */
.community-bar {
  background: rgba(0,0,0,0.2);
  border-top: 1px solid var(--panel-border);
  padding: 0.45rem 1.4rem;
  display: none;
  justify-content: center;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}
.community-bar.show { display: flex; }
.community-label {
  font-family: 'Cinzel', serif;
  font-size: 0.57rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.community-divider { color: var(--panel-border); font-size: 0.7rem; }
.community-item {
  font-family: 'Cinzel', serif;
  font-size: 0.57rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.community-num {
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--amber);
  margin-left: 0.25rem;
}

/* ══════════════════════════════════════════════
   FEATURES ROW (desktop, below game panel)
   ══════════════════════════════════════════════ */
.features-row {
  display: none;
  justify-content: space-around;
  padding: 1.4rem 1rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
@media(min-width:769px) { .features-row { display: flex; } }
.feat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  min-width: 100px;
}
.feat-icon { font-size: 1.5rem; color: var(--amber); }
.feat-label {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ══════════════════════════════════════════════
   MOBILE BOTTOM TAB BAR
   ══════════════════════════════════════════════ */
.bottom-tab-bar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--panel);
  border-top: 1px solid var(--panel-border);
  z-index: 200;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
@media(min-width:769px) { .bottom-tab-bar { display: none; } }
.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: 'Cinzel', serif;
  font-size: 0.45rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.55rem 0.2rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  transition: color 0.2s;
}
.tab-btn:hover, .tab-btn.active { color: var(--amber); }
.tab-btn.active .tab-icon { color: var(--amber); }
.tab-icon { font-size: 1.1rem; line-height: 1; }

/* ══════════════════════════════════════════════
   STATS PANEL (mobile inline, desktop in modal)
   ══════════════════════════════════════════════ */
.stats-panel-inline {
  display: none;
  background: rgba(0,0,0,0.15);
  border-top: 1px solid var(--panel-border);
  padding: 0.65rem 1rem;
  justify-content: center;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}
.stats-panel-inline.show { display: flex; }
.stats-label {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 1rem;
  white-space: nowrap;
}
.stats-tiers { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; }
.stat-tier {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  border-right: 1px solid var(--panel-border);
  white-space: nowrap;
}
.stat-tier:last-child { border-right: none; }
.stat-tier-emoji { font-size: 0.82rem; line-height: 1; }
.stat-tier-label { font-family: 'Cinzel', serif; font-size: 0.52rem; letter-spacing: 0.08em; color: var(--text-muted); }
.stat-tier-count { font-family: 'Playfair Display', serif; font-size: 0.95rem; font-weight: 700; color: var(--white); min-width: 1.1rem; text-align: center; }
.stat-tier.highlight .stat-tier-count { color: var(--amber-light); }
.stat-tier.highlight .stat-tier-label { color: var(--amber-light); }

/* ══════════════════════════════════════════════
   FONT SIZE BAR (desktop only)
   ══════════════════════════════════════════════ */
.font-bar {
  display: none;
  background: rgba(0,0,0,0.15);
  border-top: 1px solid var(--panel-border);
  padding: 0.4rem 1.4rem;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}
@media(min-width:769px) { .font-bar { display: flex; } }
.font-bar-btn {
  background: none;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 0.25rem 0.65rem;
  cursor: pointer;
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
  font-size: 0.9rem;
  line-height: 1.2;
}
.font-bar-btn-lg { font-size: 1.2rem; }
.font-bar-btn:hover { border-color: var(--amber); background: var(--amber-pale); }
.font-bar-pips { display: flex; align-items: center; gap: 5px; }
.font-size-pip {
  width: 9px; height: 9px; border-radius: 50%;
  background: rgba(255,255,255,0.15);
  transition: background 0.2s, transform 0.2s;
}
.font-size-pip.active { background: var(--amber); transform: scale(1.35); }

/* ══════════════════════════════════════════════
   PAST PUZZLE CALENDAR MODAL
   ══════════════════════════════════════════════ */
.past-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  z-index: 600;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  backdrop-filter: blur(4px);
}
.past-modal-overlay.show { display: flex; }
.past-modal-box {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-top: 4px solid var(--teal);
  border-radius: 10px;
  padding: 1.4rem;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  max-height: 92vh;
  overflow-y: auto;
  position: relative;
}
.past-modal-x {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.past-modal-x:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.past-modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 0.2rem;
}
.past-modal-sub {
  font-style: italic;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
}
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.7rem;
}
.cal-month {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  font-weight: 700;
}
.cal-nav-btn {
  background: none;
  border: 1px solid var(--panel-border);
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-mid);
  transition: background 0.2s;
}
.cal-nav-btn:hover { background: var(--teal-light); border-color: var(--teal); }
.cal-nav-btn:disabled { opacity: 0.3; cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 4px; }
.cal-day-label {
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: center;
  padding: 0.3rem 0;
}
.cal-cell {
  aspect-ratio: 1;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  position: relative;
  border: 2px solid transparent;
  color: var(--text);
}
.cal-cell:active { transform: scale(0.94); }
.cal-cell.empty { background: transparent; cursor: default; border: none; }
.cal-cell.future { background: rgba(255,255,255,0.03); color: var(--text-muted); cursor: default; border: none; }
.cal-cell.today { background: var(--teal-light); border-color: var(--teal); color: var(--teal); cursor: default; }
.cal-cell.solved { background: var(--green-pale); border-color: var(--green); color: var(--green); }
.cal-cell.solved:hover { box-shadow: 0 3px 12px rgba(26,158,92,0.3); transform: scale(1.06); }
.cal-cell.failed { background: var(--red-pale); border-color: var(--red); color: var(--red); }
.cal-cell.failed:hover { box-shadow: 0 3px 12px rgba(214,60,60,0.3); transform: scale(1.06); }
.cal-cell.out-of-range { background: rgba(255,255,255,0.02); color: var(--text-muted); cursor: default; border: none; }
.cal-cell.unsolved { background: var(--amber-pale); border-color: rgba(232,149,13,0.4); color: var(--amber); }
.cal-cell.unsolved:hover { box-shadow: 0 3px 12px rgba(232,149,13,0.25); transform: scale(1.06); }
.cal-dot { position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; }
.cal-cell.solved .cal-dot { background: var(--green); }
.cal-cell.failed .cal-dot { background: var(--red); }
.cal-cell.unsolved .cal-dot { background: var(--amber); }
.cal-legend {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  margin-top: 0.9rem;
  flex-wrap: wrap;
}
.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-family: 'Cinzel', serif;
  font-size: 0.52rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.cal-legend-dot { width: 12px; height: 12px; border-radius: 3px; border: 2px solid; }
.cal-legend-dot.solved { background: var(--green-pale); border-color: var(--green); }
.cal-legend-dot.failed { background: var(--red-pale); border-color: var(--red); }
.cal-legend-dot.unsolved { background: var(--amber-pale); border-color: rgba(232,149,13,0.5); }
.cal-legend-dot.today { background: var(--teal-light); border-color: var(--teal); }
.cal-legend-dot.future { background: rgba(255,255,255,0.03); border-color: rgba(255,255,255,0.1); }

/* ══════════════════════════════════════════════
   MODALS — dark themed
   ══════════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 2rem 1.8rem;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  border-top: 5px solid var(--amber);
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
}
.modal-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 0.4rem;
}
.modal-sub {
  font-style: italic;
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
  line-height: 1.6;
}
.modal-rule {
  height: 1px;
  background: linear-gradient(90deg,transparent,var(--amber),transparent);
  margin: 1.2rem 0;
}
.modal-section-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}
.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 0.2rem;
}
.modal-close:hover { color: var(--white); }

/* Privacy modal scroll fix */
#privacyModal { align-items: flex-start; overflow-y: auto; }
#privacyModal .modal-box { max-height: none; overflow-y: visible; margin: 1.5rem auto; }

/* How to play steps */
.how-steps { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.4rem; }
.how-step { display: flex; gap: 0.9rem; align-items: flex-start; }
.how-step-num {
  width: 26px; height: 26px; min-width: 26px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--white);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}
.how-step-text { font-size: 0.9rem; color: var(--text-mid); line-height: 1.5; }
.how-step-text strong { color: var(--text); }

/* Difficulty options */
.diff-options { display: flex; flex-direction: column; gap: 0.7rem; margin-bottom: 1.5rem; }
.diff-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  border: 2px solid var(--panel-border);
  border-radius: 6px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: rgba(255,255,255,0.02);
}
.diff-option:hover { border-color: var(--amber); background: var(--amber-pale); }
.diff-option.selected { border-color: var(--amber); background: var(--amber-pale); }
.diff-option input { display: none; }
.diff-option-icon { font-size: 1.4rem; flex-shrink: 0; }
.diff-option-name {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.15rem;
}
.diff-option-desc { font-size: 0.82rem; color: var(--text-muted); }

/* Pending notice */
.pending-notice {
  background: var(--teal-light);
  border: 1px solid rgba(11,124,138,0.4);
  border-radius: 4px;
  padding: 0.7rem 1rem;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--teal);
  margin-bottom: 1rem;
  display: none;
}
.pending-notice.show { display: block; }

/* Modal buttons */
.modal-btn {
  width: 100%;
  padding: 0.95rem;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  background: linear-gradient(135deg, var(--dark), var(--teal));
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 0.5rem;
}
.modal-btn:hover { opacity: 0.88; }
.modal-btn-outline {
  width: 100%;
  padding: 0.8rem;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-mid);
  background: transparent;
  border: 1px solid var(--panel-border);
  border-radius: 5px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  margin-top: 0.5rem;
}
.modal-btn-outline:hover { border-color: var(--text-mid); color: var(--white); }

/* Danger button */
.btn-danger {
  width: 100%;
  padding: 0.8rem;
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
  background: transparent;
  border: 1px solid rgba(214,60,60,0.4);
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  margin-top: 0.5rem;
}
.btn-danger:hover { background: var(--red-pale); border-color: var(--red); }
.confirm-panel {
  display: none;
  background: var(--red-pale);
  border: 1px solid rgba(214,60,60,0.4);
  border-radius: 6px;
  padding: 1.1rem 1.2rem;
  margin-top: 0.9rem;
  animation: fadeUp 0.3s ease forwards;
}
.confirm-panel.show { display: block; }
.confirm-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 700; color: var(--red); margin-bottom: 0.4rem; }
.confirm-text { font-size: 0.86rem; color: var(--text-mid); line-height: 1.55; margin-bottom: 1rem; }
.confirm-text strong { color: var(--text); }
.confirm-btns { display: flex; gap: 0.6rem; }
.btn-confirm-yes {
  flex: 1; padding: 0.7rem;
  font-family: 'Cinzel', serif; font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--white); background: var(--red); border: none; border-radius: 4px; cursor: pointer;
  transition: opacity 0.2s;
}
.btn-confirm-yes:hover { opacity: 0.85; }
.btn-confirm-cancel {
  flex: 1; padding: 0.7rem;
  font-family: 'Cinzel', serif; font-size: 0.65rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-mid); background: transparent; border: 1px solid var(--panel-border); border-radius: 4px; cursor: pointer;
  transition: border-color 0.2s;
}
.btn-confirm-cancel:hover { border-color: var(--text-mid); }

/* ══════════════════════════════════════════════
   RESULT SPLASH OVERLAY
   ══════════════════════════════════════════════ */
.result-splash-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 800;
  align-items: center;
  justify-content: center;
  background: rgba(11,17,32,0.15);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: backdrop-filter 0.5s ease;
}
.result-splash-overlay.show { display: flex; }
.result-splash-overlay.unblurring {
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  background: transparent;
}
.result-splash-symbol {
  font-size: clamp(7rem, 28vw, 14rem);
  line-height: 1;
  filter: drop-shadow(0 6px 32px rgba(0,0,0,0.4));
  animation: splashPop 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes splashPop { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.result-splash-card {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  max-width: min(92vw, 440px);
  width: 100%;
  animation: splashCardIn 0.45s cubic-bezier(0.22,1,0.36,1) forwards;
  position: relative;
}
.result-splash-card.show { display: flex; }
@keyframes splashCardIn { from { opacity:0; transform:scale(0.92) translateY(20px); } to { opacity:1; transform:scale(1) translateY(0); } }
@keyframes splashCardOut { from { opacity:1; transform:translateY(0); } to { opacity:0; transform:translateY(40px); } }
.result-splash-card.hiding { animation: splashCardOut 0.4s ease forwards; }
.result-splash-img { width: 100%; border-radius: 10px; box-shadow: 0 16px 48px rgba(0,0,0,0.5); display: block; }
.result-splash-x {
  position: absolute; top: -14px; right: -14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--panel); color: var(--white); border: 1px solid var(--panel-border);
  font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4); z-index: 2; line-height: 1;
}
.result-splash-x:hover { background: var(--red); border-color: var(--red); }
.result-splash-actions { display: flex; gap: 0.8rem; width: 100%; }
.result-splash-share-btn {
  flex: 1; padding: 0.9rem;
  font-family: 'Cinzel', serif; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
  background: var(--amber); color: white; border: none; border-radius: 6px;
  cursor: pointer; transition: opacity 0.2s;
}
.result-splash-share-btn:hover { opacity: 0.88; }
.result-splash-toast {
  font-family: 'Cinzel', serif; font-size: 0.68rem; letter-spacing: 0.15em;
  color: rgba(255,255,255,0.85); text-align: center; min-height: 1.2rem;
}

/* ══════════════════════════════════════════════
   RETURN SPLASH
   ══════════════════════════════════════════════ */
.splash-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 400;
  overflow-y: auto;
}
.splash-overlay.show { display: block; }
.splash-top-bar {
  height: 6px;
  background: linear-gradient(90deg, var(--amber), var(--teal));
  position: fixed;
  top: 0; left: 0; right: 0; z-index: 401;
}
.splash-inner {
  max-width: 520px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  text-align: center;
}
.splash-theme-label {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  margin-top: 2.5rem;
}
.splash-puzzle-meta {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
}
.splash-theme {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
}
.splash-emoji { font-size: 3.5rem; margin-bottom: 0.5rem; display: block; }
.splash-title {
  font-family: 'Playfair Display', serif;
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: 0.3rem;
}
.splash-sub { font-style: italic; font-size: 1.1rem; color: var(--text-mid); margin-bottom: 1.5rem; }
.splash-dots { margin: 0 auto 1.5rem; display: flex; flex-direction: column; gap: 0.55rem; align-items: center; }
.splash-dot-row { display: flex; gap: 8px; align-items: center; }
.splash-dot {
  width: 18px; height: 18px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.15);
  flex-shrink: 0;
}
.splash-dot.correct { background: var(--amber); border-color: var(--amber); }
.splash-dot.wrong { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.2); }
.splash-dot-result { font-family: 'Cinzel', serif; font-size: 0.75rem; color: var(--text-muted); margin-left: 6px; }
.splash-dot-result.win { color: var(--green); font-weight: 700; }
.splash-streak {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--amber-pale);
  border: 1px solid rgba(232,149,13,0.4);
  border-radius: 20px;
  padding: 0.5rem 1.2rem;
  margin-bottom: 1.8rem;
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}
.splash-streak-num { font-family: 'Playfair Display', serif; font-size: 1.3rem; font-weight: 900; }
.splash-btns { display: flex; flex-direction: column; gap: 0.7rem; max-width: 360px; margin: 0 auto 1.5rem; }
.splash-btn-primary {
  padding: 1.1rem;
  font-family: 'Cinzel', serif; font-size: 0.88rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--white); background: var(--amber); border: none; border-radius: 5px; cursor: pointer;
  transition: opacity 0.2s;
}
.splash-btn-primary:hover { opacity: 0.88; }
.splash-btn-secondary {
  padding: 1rem;
  font-family: 'Cinzel', serif; font-size: 0.82rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-mid); background: transparent; border: 1px solid var(--panel-border); border-radius: 5px;
  cursor: pointer; transition: border-color 0.2s; text-decoration: none; display: block;
}
.splash-btn-secondary:hover { border-color: var(--text); color: var(--white); }
.splash-share-feedback { text-align: center; margin-top: 0.7rem; font-style: italic; font-size: 0.85rem; color: var(--green); min-height: 1.2rem; }
.splash-timer-label { font-family: 'Cinzel', serif; font-size: 0.75rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 0.3rem; }
.splash-timer { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 700; color: var(--teal); }

/* ══════════════════════════════════════════════
   INTRO SPLASH
   ══════════════════════════════════════════════ */
#introSplash {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.8s ease;
  background: #0f1428;
}
#introSplash.hiding { opacity: 0; pointer-events: none; }
.splash-bg-blur {
  position: absolute;
  inset: -20px;
  background-size: cover;
  background-position: center;
  filter: blur(16px);
  transform: scale(1.1);
  opacity: 0;
  transition: opacity 1.2s ease;
}
.splash-bg-blur.loaded { opacity: 1; }
.splash-dark { position: absolute; inset: 0; background: rgba(8,12,30,0.6); }
.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.8rem;
  padding: 2rem;
  text-align: center;
}
.splash-logo-wrap { animation: splashLogoIn 0.9s cubic-bezier(0.22,1,0.36,1) 0.4s both; opacity: 0; }
@keyframes splashLogoIn { from { opacity:0; transform:translateY(20px); } to { opacity:1; transform:translateY(0); } }
.splash-logo-label {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.45em;
  color: rgba(220,232,248,0.5);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.splash-logo-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(3.8rem, 14vw, 7rem);
  font-weight: 900;
  color: #f0ead8;
  line-height: 0.9;
  letter-spacing: -0.01em;
}
.splash-logo-text span { color: #e8950d; }
.splash-logo-line {
  width: 55%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #e8950d, transparent);
  margin: 0.6rem auto 0;
}
.splash-logo-date {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(220,232,248,0.7);
  margin-top: 0.5rem;
}
.splash-cards {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(300px, 78vw);
  animation: splashCardsIn 0.5s ease 1.1s both;
  opacity: 0;
}
@keyframes splashCardsIn { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }
@keyframes splashCardSlide { from { opacity:0; transform:translateX(-24px); } to { opacity:1; transform:translateX(0); } }
.sp-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  background: rgba(220,232,248,0.07);
  border: 1.5px solid rgba(220,232,248,0.12);
  border-left: 4px solid rgba(232,149,13,0.7);
  border-radius: 5px;
  padding: 0.55rem 0.8rem;
  opacity: 0;
  animation: splashCardSlide 0.5s ease forwards;
}
.sp-card.green {
  border-color: rgba(26,158,92,0.4);
  border-left-color: #1a9e5c;
  background: rgba(26,158,92,0.1);
}
.sp-card-num { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 0.9rem; color: #e8950d; flex-shrink: 0; width: 1rem; text-align: center; }
.sp-card-bar { flex: 1; height: 7px; background: rgba(220,232,248,0.1); border-radius: 4px; overflow: hidden; }
.sp-card-fill { height: 100%; border-radius: 4px; background: rgba(220,232,248,0.35); width: 0; transition: width 0.7s ease; }
.sp-card.green .sp-card-fill { background: rgba(26,158,92,0.65); }
.sp-card-year { font-family: 'Cinzel', serif; font-size: 0.65rem; color: rgba(220,232,248,0.45); flex-shrink: 0; letter-spacing: 0.1em; }
.sp-card.green .sp-card-year { color: rgba(26,158,92,0.9); }
.sp-drag-handle { display: flex; flex-direction: column; gap: 3px; flex-shrink: 0; opacity: 0.4; }
.sp-drag-handle span { display: block; width: 14px; height: 2px; background: rgba(220,232,248,0.9); border-radius: 1px; }
.splash-tagline {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  color: rgba(220,232,248,0.4);
  text-transform: uppercase;
  animation: splashTagIn 0.6s ease 2.4s both;
  opacity: 0;
}
@keyframes splashTagIn { from { opacity:0; } to { opacity:1; } }

/* ══════════════════════════════════════════════
   INLINE SHARE CARD
   ══════════════════════════════════════════════ */
.inline-share-wrap {
  margin: 0.5rem 0 1rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.inline-share-wrap.slide-in { animation: slideDown 0.5s cubic-bezier(0.22,1,0.36,1) forwards; }
@keyframes slideDown { from { opacity:0; transform:translateY(-20px); } to { opacity:1; transform:translateY(0); } }
.inline-share-img { width: 100%; display: block; border-radius: 8px; }
.inline-share-toast {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  text-align: center;
  padding: 0.4rem;
  min-height: 1.3rem;
}

/* ══════════════════════════════════════════════
   FOOTER
   ══════════════════════════════════════════════ */
footer {
  text-align: center;
  padding: 1.2rem;
  border-top: 1px solid var(--panel-border);
  background: rgba(0,0,0,0.15);
}
footer a {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color 0.2s;
  cursor: pointer;
}
footer a:hover { color: var(--amber); }
footer p { font-size: 0.65rem; color: var(--text-muted); margin-top: 0.4rem; }

/* ══════════════════════════════════════════════
/* ══════════════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════════════ */
@keyframes fadeUp { from { opacity:0; transform:translateY(14px); } to { opacity:1; transform:translateY(0); } }
