@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("inter-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: Inter;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
* { box-sizing: border-box; text-decoration: none; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  color: #ffffff;
  font-family: Inter, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  background: #0d0d0d url("veil.jpg") center top / cover no-repeat fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(13, 13, 13, 0.88);
  pointer-events: none;
  z-index: 0;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; display: block; }
::spelling-error, ::grammar-error { text-decoration: none; background: transparent; }
:focus { outline: none; }
:focus-visible { box-shadow: 0 0 0 2px #e8b84b; }
.splash {
  position: fixed;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  background: #0a0a0a url("veil.jpg") center / cover no-repeat;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}
.splash.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-in { text-align: center; }
.splash img { width: 112px; height: auto; margin: 0 auto; }
.splash strong {
  display: block;
  margin-top: 14px;
  color: #e8b84b;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.rule {
  display: block;
  width: 72px;
  height: 2px;
  margin: 14px auto 0;
  background: #e8b84b;
}
.gate, .lobby { position: relative; z-index: 1; }
.gate.is-out, .lobby.is-out { display: none; }
.gate {
  min-height: 100vh;
  padding: 28px 16px 48px;
  background: #0d0d0d url("haze.jpg") center / cover no-repeat fixed;
}
.rail {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  width: min(520px, 100%);
  margin: 0 auto 18px;
  padding: 0;
  list-style: none;
}
.rail li {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  padding: 8px 4px;
  border: 2px solid transparent;
  border-radius: 50px;
}
.rail li.is-on { color: #121212; background: #FFD700; border-color: #FFD700; }
.rail li.is-done { color: #e8b84b; border-color: rgba(232, 184, 75, 0.45); }
.gate-card {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 22px 16px 26px;
  background: rgba(18, 18, 18, 0.9);
  border: 1px solid rgba(232, 184, 75, 0.18);
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.stage { display: none; }
.stage.is-live { display: block; }
.kicker {
  margin: 0 0 6px;
  color: #e8b84b;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
h1, h2, p { margin: 0; }
h1 { font-size: 29px; line-height: 1.2; font-weight: 700; }
h2 { font-size: 26px; line-height: 1.25; font-weight: 700; }
.lead { margin-top: 10px; color: rgba(255, 255, 255, 0.75); }
.pair { display: flex; justify-content: center; gap: 14px; margin: 22px 0; }
.flip {
  width: calc(50% - 8px);
  max-width: 168px;
  aspect-ratio: 3 / 4.1;
  padding: 0;
  border: 0;
  background: transparent;
}
.flip-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.55s ease;
}
.flip.is-open .flip-inner { transform: rotateY(180deg); }
.flip-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border-radius: 16px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.flip-back {
  background: #161616 url("veil.jpg") center / cover;
  border: 2px solid rgba(232, 184, 75, 0.45);
  box-shadow: inset 0 0 0 8px rgba(10, 10, 10, 0.45);
}
.flip-back em {
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e8b84b;
}
.flip-front {
  background: #121212;
  border: 2px solid #FFD700;
  transform: rotateY(180deg);
}
.flip-front img { width: 72%; height: auto; }
.flip-front b { font-size: 14px; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0 8px; }
.choices button, .opt {
  min-height: 52px;
  padding: 12px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: #161616;
  color: #ffffff;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.choices button.is-good, .opt.is-good { border-color: #FFD700; }
.choices button.is-bad, .opt.is-bad { border-color: #6B21A8; color: rgba(255, 255, 255, 0.75); }
.choices-two { grid-template-columns: 1fr 1fr; }
.hint { min-height: 24px; margin: 8px 0 14px; color: rgba(255, 255, 255, 0.75); }
.hint.is-bad { color: #d8c4f0; }
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: min(100%, 320px);
  margin: 18px auto;
}
.cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #121212;
  overflow: hidden;
}
.cell.gold {
  background: linear-gradient(160deg, #2a2208, #121212 72%);
  box-shadow: inset 0 0 0 2px rgba(255, 215, 0, 0.55);
}
.cell.purple {
  background: linear-gradient(160deg, #3b1468, #121212 72%);
  box-shadow: inset 0 0 0 2px #6B21A8;
}
.cell img { width: 70%; height: 70%; object-fit: contain; }
.cell.is-hit { box-shadow: inset 0 0 0 2px #FFD700, 0 0 16px rgba(255, 215, 0, 0.45); }
.is-spinning .cell img { animation: tumble 0.7s linear; }
@keyframes tumble {
  50% { transform: translateY(6px) scale(0.88); opacity: 0.35; }
}
.seal-lg { width: 116px; height: auto; margin: 8px auto 16px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 50px;
  padding: 10px 16px;
  font-weight: 600;
  background: transparent;
}
.btn-gold { background: #e8b84b; color: #000000; }
.btn-gold:hover { background: #d7a73d; }
.btn-line { border-color: #ffffff; color: #ffffff; background: transparent; }
.btn-line:hover { background: rgba(255, 255, 255, 0.06); }
.btn-wide { width: 100%; margin-top: 8px; }
.btn:disabled { opacity: 0.4; cursor: default; }
.stage .btn-wide + .btn-wide { margin-top: 10px; }
.lobby { width: min(560px, 100%); margin: 0 auto; min-height: 100vh; }
.bar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 71px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(232, 184, 75, 0.18);
}
.brand { display: flex; align-items: center; gap: 8px; min-width: 0; color: #e8b84b; }
.brand img { width: 40px; height: 40px; object-fit: contain; }
.brand span { font-weight: 700; letter-spacing: 0.04em; white-space: nowrap; }
.bar-actions { display: flex; gap: 8px; }
.bar .btn { padding: 8px 12px; font-size: 13px; }
.hero { padding: 28px 16px 8px; }
.points { margin-bottom: 8px; color: #e8b84b; font-weight: 600; }
.hero .btn-wide { margin-top: 18px; }
.panel, .foot { padding: 8px 16px 0; }
.day {
  margin: 18px 16px 0;
  padding: 16px;
  background: #161616;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid transparent;
}
.day.is-done { border-color: #FFD700; }
.pips { display: flex; gap: 8px; margin: 12px 0; }
.pip {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid rgba(255, 215, 0, 0.35);
  background: #121212;
}
.pip.is-on { background: #e8b84b; border-color: #FFD700; }
.soft { margin-top: 6px; color: rgba(255, 255, 255, 0.55); font-size: 14px; }
.carousel {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 18px 16px 8px;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar { display: none; }
.crown-card {
  flex: 0 0 min(78%, 280px);
  scroll-snap-align: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 96px;
  padding: 14px 14px 14px 16px;
  text-align: left;
  color: #ffffff;
  background: #161616;
  border: 2px solid transparent;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.crown-card strong, .crown-card em { display: block; }
.crown-card strong { font-size: 20px; font-weight: 700; }
.crown-card em { margin-top: 2px; font-style: normal; color: rgba(255, 255, 255, 0.55); }
.crown-card img { width: 72px; height: 72px; object-fit: contain; flex: none; }
.crown-card.is-on { border-color: #FFD700; box-shadow: 0 0 0 1px #FFD700, 0 2px 12px rgba(0, 0, 0, 0.3); }
.panel { padding-bottom: 12px; }
.panel h2 { margin: 8px 0 12px; }
.notes, .board-list, .stack { display: grid; gap: 12px; }
.note {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: #161616;
  border: 2px solid transparent;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.note.is-pin { border-color: #FFD700; }
.tag {
  display: inline-block;
  margin-bottom: 6px;
  color: #e8b84b;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.note p { color: rgba(255, 255, 255, 0.75); }
.pin {
  width: 44px;
  height: 44px;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: #121212;
  color: rgba(255, 255, 255, 0.55);
}
.pin svg { width: 20px; height: 20px; fill: currentColor; margin: 0 auto; }
.pin.is-on { color: #FFD700; }
.entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 16px;
  text-align: left;
  color: #ffffff;
  background: #161616;
  border: 2px solid transparent;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.entry.is-on { border-color: #FFD700; }
.entry b, .entry small { display: block; }
.entry small { color: rgba(255, 255, 255, 0.55); font-size: 14px; }
.back {
  margin-bottom: 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #e8b84b;
  font-weight: 600;
}
.lives { display: flex; gap: 8px; margin: 12px 0; }
.life { width: 14px; height: 14px; border-radius: 50%; background: #e8b84b; }
.life.is-off { background: #121212; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2); }
.answer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 0 14px;
  background: #121212;
  border: 2px solid transparent;
  border-radius: 16px;
}
.answer.is-got { border-color: #FFD700; }
.answer.is-miss { color: rgba(255, 255, 255, 0.55); }
.answer b { color: #e8b84b; }
.guess {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.guess input {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border: 2px solid rgba(232, 184, 75, 0.18);
  border-radius: 50px;
  background: #121212;
  color: #ffffff;
}
.guess input:-webkit-autofill {
  -webkit-text-fill-color: #ffffff;
  box-shadow: 0 0 0 1000px #121212 inset;
}
.guess .btn { flex: none; }
.is-shake { animation: shake 0.35s linear; }
@keyframes shake {
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.meter {
  height: 8px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 50px;
  background: #121212;
}
.meter span {
  display: block;
  height: 100%;
  border-radius: 50px;
  background: linear-gradient(90deg, #6B21A8, #FFD700);
}
.opts { display: grid; gap: 10px; margin: 14px 0; }
.quiz, .reel-wrap, .board { width: min(460px, 100%); }
.score { margin: 8px 0; font-size: 40px; font-weight: 700; color: #FFD700; }
.reel-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; color: rgba(255, 255, 255, 0.75); }
.gain { min-height: 24px; margin-top: 8px; color: #FFD700; font-weight: 700; }
.foot { padding: 28px 16px 36px; color: rgba(255, 255, 255, 0.55); font-size: 14px; }
#daybox, #carousel, #panel { scroll-margin-top: 88px; }
@media (max-width: 360px) {
  .brand span { font-size: 13px; }
  .bar .btn { padding: 7px 10px; }
  h1 { font-size: 26px; }
}
@media (min-width: 880px) {
  .lobby { width: min(920px, calc(100% - 32px)); }
  .hero h1 { font-size: 40px; }
  .carousel { display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible; }
  .crown-card { flex: none; width: auto; }
  .notes { grid-template-columns: 1fr 1fr; }
  .panel .quiz, .panel .reel-wrap, .panel .board, .panel .board-list { margin-left: auto; margin-right: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .flip-inner, .splash { transition: none; }
  .is-spinning .cell img, .is-shake { animation: none; }
}
