:root {
  --font-display: "STKaiti", "KaiTi", "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --font-body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  --ink: #1b0505;
  --red-950: #2b0707;
  --red-900: #3b0909;
  --red-850: #4b0b0b;
  --red-800: #5b0e0e;
  --red-700: #781414;
  --red-600: #9c1c18;
  --red-500: #bd2a23;
  --rose-50: #fff9ec;
  --rose-100: #ffefcb;
  --rose-200: #ffd58f;
  --rose-300: #f4b45a;
  --rose-400: #dc8735;
  --plum-950: #240504;
  --plum-900: #350806;
  --plum-800: #4b0c08;
  --champagne: #f5dba7;
  --gold-50: #fffaf0;
  --gold-100: #fff2cf;
  --gold-200: #f6e0a6;
  --gold-300: #ecc878;
  --gold-400: #d9a94e;
  --gold-500: #b8802f;
  --paper: #fff4e2;
  --paper-soft: rgba(255, 244, 226, 0.76);
  --paper-faint: rgba(255, 244, 226, 0.52);
  --line: rgba(240, 200, 152, 0.22);
  --line-strong: rgba(248, 214, 168, 0.46);
  --shadow-deep: 0 32px 88px rgba(18, 1, 12, 0.54);
  --shadow-soft: 0 16px 44px rgba(20, 2, 14, 0.3);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);
  --app-width: 1080px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  background:
    radial-gradient(1100px 700px at 50% -190px, #b52b1f 0%, rgba(118, 20, 14, 0.88) 38%, transparent 74%),
    radial-gradient(720px 620px at 102% 12%, rgba(190, 84, 33, 0.42) 0%, transparent 68%),
    radial-gradient(860px 680px at 108% 96%, rgba(105, 18, 12, 0.86) 0%, transparent 66%),
    radial-gradient(700px 540px at -10% 68%, rgba(130, 31, 19, 0.58) 0%, transparent 68%),
    linear-gradient(180deg, #2a0705 0%, #220505 46%, #130302 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.modal-open {
  overflow: hidden;
}

::selection {
  color: #2c0d05;
  background: var(--rose-200);
}

button,
input,
textarea {
  font: inherit;
}

button,
.option,
.btn {
  touch-action: manipulation;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

:focus-visible {
  outline: 2px solid var(--gold-200);
  outline-offset: 4px;
}

/* main 会在每次路由切换后通过 JS 聚焦，属于程序性焦点，不应显示整页描边。 */
.app:focus,
.app:focus-visible {
  outline: none;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 10px 16px;
  color: #351007;
  background: var(--gold-200);
  border-radius: 999px;
  text-decoration: none;
  transition: top 160ms ease;
}

.skip-link:focus {
  top: 14px;
}

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

/* ---------------- Ambient scene ---------------- */

.scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
}

.scene__glow--one {
  width: 440px;
  height: 440px;
  left: -170px;
  top: 18%;
  background: radial-gradient(circle, rgba(211, 82, 102, 0.52), transparent 68%);
}

.scene__glow--two {
  width: 540px;
  height: 540px;
  right: -230px;
  top: 48%;
  background: radial-gradient(circle, rgba(203, 121, 91, 0.38), transparent 70%);
}

.scene__aurora {
  position: absolute;
  width: 92vw;
  height: 66vh;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.3;
  mix-blend-mode: screen;
  animation: aurora-drift 26s ease-in-out infinite alternate;
}

.scene__aurora--rose {
  top: -18%;
  left: -26%;
  background: radial-gradient(ellipse, rgba(235, 92, 38, 0.45), transparent 67%);
}

.scene__aurora--gold {
  top: 8%;
  right: -34%;
  background: radial-gradient(ellipse, rgba(231, 185, 119, 0.38), transparent 68%);
  animation-delay: -11s;
  animation-duration: 32s;
}

.year-watermark {
  position: absolute;
  left: 50%;
  top: 9%;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(150px, 30vw, 430px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.02em;
  white-space: nowrap;
  -webkit-text-stroke: 1px rgba(250, 216, 172, 0.09);
  opacity: 0.72;
  transform: translateX(-50%);
  user-select: none;
}

.stars {
  position: absolute;
  inset: 0;
}

.star {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: #fff7eb;
  box-shadow: 0 0 7px rgba(255, 240, 215, 0.7);
  opacity: 0;
  animation: star-twinkle var(--duration) ease-in-out infinite;
  animation-delay: var(--delay);
}

.star--rose {
  background: var(--rose-200);
  box-shadow: 0 0 9px rgba(255, 213, 143, 0.85);
}

.shooting-star {
  position: absolute;
  top: 16%;
  left: 58%;
  width: 142px;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 241, 207, 0.82), transparent);
  filter: drop-shadow(0 0 6px rgba(255, 217, 201, 0.65));
  opacity: 0;
  transform-origin: left center;
  animation: shooting 12s ease-in-out infinite;
  animation-delay: 4.5s;
}

.shooting-star--two {
  top: 34%;
  left: 19%;
  width: 96px;
  animation-duration: 16s;
  animation-delay: 10s;
}

.bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.2;
  background: radial-gradient(circle at 35% 32%, rgba(255, 243, 212, 0.9), rgba(245, 180, 92, 0.28) 48%, transparent 72%);
  animation: bokeh-float 22s ease-in-out infinite alternate;
}

.bokeh--one {
  width: 120px;
  height: 120px;
  left: 18%;
  top: 58%;
}

.bokeh--two {
  width: 72px;
  height: 72px;
  right: 12%;
  top: 38%;
  animation-delay: -7s;
  animation-duration: 27s;
}

.bokeh--three {
  width: 168px;
  height: 168px;
  left: 71%;
  top: 74%;
  opacity: 0.13;
  animation-delay: -13s;
  animation-duration: 31s;
}

.scene__embers {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene__embers span {
  position: absolute;
  bottom: -12px;
  left: var(--ember-x, 50%);
  width: var(--ember-size, 3px);
  height: var(--ember-size, 3px);
  border-radius: 50%;
  opacity: 0;
  background: #ffd58f;
  box-shadow:
    0 0 8px rgba(255, 196, 110, 0.75),
    0 0 18px rgba(244, 129, 54, 0.28);
  animation: ember-rise var(--ember-duration, 12s) linear infinite;
  animation-delay: var(--ember-delay, 0s);
}

.scene__embers span:nth-child(1) {
  --ember-x: 12%;
  --ember-size: 2px;
  --ember-duration: 13s;
  --ember-delay: -3s;
}

.scene__embers span:nth-child(2) {
  --ember-x: 27%;
  --ember-size: 3px;
  --ember-duration: 17s;
  --ember-delay: -11s;
}

.scene__embers span:nth-child(3) {
  --ember-x: 46%;
  --ember-size: 2px;
  --ember-duration: 15s;
  --ember-delay: -7s;
}

.scene__embers span:nth-child(4) {
  --ember-x: 63%;
  --ember-size: 4px;
  --ember-duration: 19s;
  --ember-delay: -13s;
}

.scene__embers span:nth-child(5) {
  --ember-x: 78%;
  --ember-size: 2px;
  --ember-duration: 14s;
  --ember-delay: -5s;
}

.scene__embers span:nth-child(6) {
  --ember-x: 91%;
  --ember-size: 3px;
  --ember-duration: 18s;
  --ember-delay: -16s;
}

@keyframes ember-rise {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.6);
  }
  12% {
    opacity: 0.72;
  }
  72% {
    opacity: 0.45;
  }
  100% {
    opacity: 0;
    transform: translate3d(26px, -92vh, 0) scale(1.1);
  }
}

@keyframes aurora-drift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(0.96);
  }
  to {
    transform: translate3d(5%, 4%, 0) scale(1.08);
  }
}

@keyframes star-twinkle {
  0%,
  100% {
    opacity: 0.07;
    transform: scale(0.66);
  }
  48% {
    opacity: var(--opacity);
    transform: scale(1.22);
  }
}

@keyframes shooting {
  0%,
  86% {
    opacity: 0;
    transform: rotate(21deg) translate3d(0, 0, 0) scaleX(0.2);
  }
  88% {
    opacity: 0.92;
  }
  96% {
    opacity: 0.48;
  }
  100% {
    opacity: 0;
    transform: rotate(21deg) translate3d(220px, 84px, 0) scaleX(1);
  }
}

@keyframes bokeh-float {
  0% {
    transform: translate3d(0, 0, 0) scale(0.92);
  }
  100% {
    transform: translate3d(18px, -30px, 0) scale(1.1);
  }
}

.scene__grain {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.78' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.62'/%3E%3C/svg%3E");
}

.lantern {
  position: absolute;
  top: -18px;
  width: 64px;
  transform-origin: 50% 0;
  animation: lantern-sway 8s ease-in-out infinite;
  opacity: 0.9;
}

.lantern--left {
  left: clamp(18px, 5vw, 88px);
}

.lantern--right {
  right: clamp(18px, 5vw, 88px);
  animation-delay: -3.8s;
}

.lantern__rope {
  display: block;
  width: 1px;
  height: 82px;
  margin: 0 auto;
  background: linear-gradient(180deg, transparent, rgba(231, 195, 112, 0.72));
}

.lantern__cap {
  display: block;
  width: 30px;
  height: 7px;
  margin: 0 auto -1px;
  border: 1px solid rgba(255, 232, 170, 0.58);
  border-radius: 3px;
  background: linear-gradient(180deg, #dfb45e, #8c591e);
}

.lantern__body {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 72px;
  margin: 0 auto;
  border: 1px solid rgba(248, 212, 132, 0.5);
  border-radius: 46% 46% 42% 42%;
  color: #f9e4ad;
  background:
    radial-gradient(ellipse at 36% 28%, rgba(255, 176, 119, 0.38), transparent 38%),
    linear-gradient(90deg, #6f0f0f 0%, #b72620 24%, #ce3b2d 50%, #9f1d19 76%, #5c0d0d 100%);
  box-shadow:
    inset 0 0 22px rgba(53, 0, 0, 0.56),
    0 8px 26px rgba(126, 23, 17, 0.38);
  animation: lantern-glow 5.8s ease-in-out infinite;
}

.lantern--right .lantern__body {
  animation-delay: -2.6s;
}

.lantern__body::before,
.lantern__body::after {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: rgba(255, 226, 160, 0.25);
}

.lantern__body::before {
  left: 17px;
}

.lantern__body::after {
  right: 17px;
}

.lantern__body b {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  text-shadow: 0 2px 10px rgba(62, 4, 0, 0.65);
}

.lantern__tassel {
  display: block;
  width: 1px;
  height: 32px;
  margin: 0 auto;
  background: linear-gradient(180deg, var(--gold-300), rgba(217, 169, 78, 0));
  box-shadow: 5px 0 0 rgba(217, 169, 78, 0.32), -5px 0 0 rgba(217, 169, 78, 0.32);
}

.vertical-verse {
  position: absolute;
  right: clamp(18px, 3.2vw, 48px);
  top: 38%;
  display: flex;
  gap: 16px;
  writing-mode: vertical-rl;
  color: rgba(242, 207, 131, 0.22);
  font-family: var(--font-display);
  font-size: clamp(16px, 2vw, 23px);
  letter-spacing: 0.48em;
  user-select: none;
}

.snow {
  position: absolute;
  inset: 0;
}

.snowflake {
  position: absolute;
  top: -12vh;
  left: var(--x);
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  background: rgba(255, 248, 230, 0.8);
  box-shadow: 0 0 8px rgba(255, 244, 220, 0.5);
  opacity: var(--opacity);
  animation: snowfall var(--duration) linear infinite;
  animation-delay: var(--delay);
  will-change: transform;
}

@keyframes snowfall {
  0% {
    transform: translate3d(0, -10vh, 0);
  }
  48% {
    transform: translate3d(18px, 52vh, 0);
  }
  100% {
    transform: translate3d(-12px, 112vh, 0);
  }
}

@keyframes lantern-sway {
  0%,
  100% {
    transform: rotate(-2.2deg);
  }
  50% {
    transform: rotate(2.2deg);
  }
}

@keyframes lantern-glow {
  0%,
  100% {
    filter: drop-shadow(0 0 9px rgba(255, 135, 74, 0.08));
  }
  50% {
    filter: drop-shadow(0 0 22px rgba(255, 135, 74, 0.26));
  }
}

.fx-canvas {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pointer-glow {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle, rgba(255, 203, 124, 0.13), rgba(207, 79, 31, 0.06) 42%, transparent 70%);
  filter: blur(10px);
  mix-blend-mode: screen;
  transition: opacity 380ms ease;
  will-change: transform;
}

.pointer-glow.is-active {
  opacity: 1;
}

@media (hover: none), (pointer: coarse) {
  .pointer-glow {
    display: none;
  }
}

/* ---------------- Header / footer ---------------- */

.site-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(var(--app-width), 100%);
  margin: 0 auto;
  padding: calc(20px + env(safe-area-inset-top)) clamp(18px, 5vw, 40px) 6px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand__seal {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-strong);
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1;
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(244, 179, 90, 0.26), transparent 55%),
    rgba(56, 9, 5, 0.62);
  box-shadow: inset 0 0 0 3px rgba(20, 2, 14, 0.28);
}

.brand__name {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand__name b {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.16em;
  color: var(--gold-100);
}

.brand__name small {
  font-size: 10px;
  line-height: 1.25;
  letter-spacing: 0.2em;
  color: var(--paper-faint);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

#bgm {
  display: none;
}

.music-toggle {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper-soft);
  background: rgba(42, 5, 5, 0.46);
  font-size: 10px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.music-toggle:hover {
  color: var(--gold-200);
  border-color: var(--line-strong);
}

.music-toggle:active {
  transform: scale(0.96);
}

.music-toggle__bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  width: 16px;
  height: 15px;
}

.music-toggle__bars i {
  display: block;
  width: 2px;
  height: 5px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.55;
  transform-origin: bottom;
  animation: music-bar 900ms ease-in-out infinite;
  animation-play-state: paused;
}

.music-toggle.is-playing {
  color: var(--gold-200);
  border-color: rgba(236, 200, 120, 0.4);
  background: rgba(83, 16, 10, 0.46);
}

.music-toggle.is-playing .music-toggle__bars i {
  opacity: 1;
  animation-play-state: running;
}

.music-toggle__bars i:nth-child(1) {
  animation-delay: -120ms;
}

.music-toggle__bars i:nth-child(2) {
  animation-delay: -540ms;
}

.music-toggle__bars i:nth-child(3) {
  animation-delay: -260ms;
}

.music-toggle__bars i:nth-child(4) {
  animation-delay: -700ms;
}

@keyframes music-bar {
  0%,
  100% {
    height: 4px;
  }
  50% {
    height: 14px;
  }
}

.identity-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  max-width: 170px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper-soft);
  background: rgba(42, 5, 5, 0.46);
  font-size: 13px;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.identity-chip:hover {
  border-color: var(--line-strong);
  background: rgba(68, 11, 11, 0.68);
}

.identity-chip:active {
  transform: scale(0.97);
}

.identity-chip__dot {
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold-300);
  box-shadow: 0 0 9px rgba(236, 200, 120, 0.72);
}

.identity-chip svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

#identity-nickname {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}



/* ---------------- Layout ---------------- */

.app {
  position: relative;
  z-index: 5;
  width: min(var(--app-width), 100%);
  min-height: calc(100vh - 190px);
  min-height: calc(100svh - 190px);
  margin: 0 auto;
  padding: clamp(22px, 4.5vw, 56px) clamp(18px, 5vw, 40px) 72px;
}

.route-enter {
  animation: route-in 520ms var(--ease-out) both;
}

/* fixed 底部操作栏不能放在带 transform 的祖先里，否则会以页面为定位参照。 */
.wizard-page.route-enter {
  animation: wizard-route-in 420ms var(--ease-out) both;
}

@keyframes wizard-route-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes route-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.boot-screen {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 16px;
  min-height: 48vh;
  color: var(--paper-faint);
  font-size: 13px;
  letter-spacing: 0.18em;
}

.boot-screen__seal {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 27px;
  animation: breathe 2.4s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1);
  }
}

.loading-page {
  display: grid;
  place-items: center;
  min-height: 46vh;
  text-align: center;
}

.loading-mark {
  display: grid;
  place-items: center;
  gap: 14px;
  color: var(--paper-faint);
  font-size: 13px;
  letter-spacing: 0.16em;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(236, 200, 120, 0.26);
  border-top-color: var(--gold-300);
  border-radius: 50%;
  animation: spin 820ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------- Common atoms ---------------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-300);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-400));
}

.eyebrow--center::after {
  content: "";
  width: 30px;
  height: 1px;
  background: linear-gradient(90deg, var(--gold-400), transparent);
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.035em;
}

.gold-text {
  color: var(--gold-200);
}

.muted {
  color: var(--paper-soft);
}

.btn {
  --btn-min: 50px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: var(--btn-min);
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.04em;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 180ms var(--ease-out),
    box-shadow 200ms ease,
    border-color 200ms ease,
    background 200ms ease;
}

.btn:active {
  transform: scale(0.965);
}

.btn[disabled] {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.btn--gold {
  color: #3b1206;
  background: linear-gradient(132deg, #fff6df 0%, #f2d58f 34%, #e7ad62 66%, #f7dfa0 100%);
  box-shadow:
    0 12px 30px rgba(177, 119, 31, 0.26),
    0 0 28px rgba(244, 179, 90, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn--gold::after {
  content: "";
  position: absolute;
  top: -40%;
  bottom: -40%;
  left: -60%;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.56), transparent);
  transform: skewX(-22deg);
  transition: left 600ms var(--ease-out);
}

.btn--gold:hover::after {
  left: 130%;
}

.btn--gold:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 34px rgba(177, 119, 31, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.btn--outline {
  color: var(--gold-100);
  border-color: var(--line-strong);
  background: rgba(55, 8, 30, 0.38);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.btn--outline:hover {
  border-color: rgba(246, 224, 166, 0.7);
  background: rgba(78, 12, 12, 0.56);
}

.btn--ghost {
  color: var(--paper-soft);
  background: transparent;
}

.btn--ghost:hover {
  color: var(--gold-100);
}

.btn--small {
  --btn-min: 38px;
  padding: 0 14px;
  font-size: 12.5px;
  font-weight: 500;
}

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

.btn--danger {
  color: #ffc2b6;
  border-color: rgba(255, 136, 115, 0.26);
  background: rgba(96, 18, 16, 0.38);
}

.btn svg,
.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.icon--sm {
  width: 15px;
  height: 15px;
}

.icon--lg {
  width: 22px;
  height: 22px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 0;
  border: 0;
  color: var(--gold-200);
  background: transparent;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.text-link:hover {
  color: var(--gold-100);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  border: 0;
  color: var(--paper-faint);
  background: transparent;
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
  transition: color 180ms ease, transform 180ms ease;
}

.back-link:hover {
  color: var(--gold-200);
  transform: translateX(-2px);
}

.back-link:active {
  transform: translateX(-1px) scale(0.98);
}

.panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(111, 18, 17, 0.44), rgba(38, 6, 6, 0.58)),
    rgba(43, 7, 7, 0.58);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.divider {
  width: 100%;
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--line-strong), transparent);
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(236, 200, 120, 0.2);
  border-radius: 999px;
  color: rgba(246, 224, 166, 0.82);
  background: rgba(236, 200, 120, 0.05);
  font-size: 10.5px;
  letter-spacing: 0.07em;
}

/* ---------------- Home ---------------- */

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  align-items: center;
  gap: clamp(24px, 4vw, 54px);
  min-height: clamp(390px, 55vh, 580px);
  padding: clamp(18px, 3vw, 34px) 0 clamp(34px, 5vw, 66px);
}

.home-hero__copy {
  position: relative;
  z-index: 2;
}

.hero-title {
  margin: 18px 0 20px;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 7.8vw, 6.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0.02em;
}

.hero-title span {
  display: block;
}

.hero-title .hero-title__gold {
  padding-bottom: 0.08em;
  color: var(--gold-200);
  background: linear-gradient(100deg, #fff9ec 2%, #f8dda0 26%, #e8a44f 54%, #f0c995 78%, #fbe9be 98%);
  background-size: 180% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 10px 42px rgba(230, 155, 151, 0.16);
}

@keyframes hero-shimmer {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero-lede {
  max-width: 33em;
  color: var(--paper-soft);
  font-size: clamp(14px, 1.5vw, 16px);
  line-height: 1.9;
}

.hero-lede br {
  display: block;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 24px;
  color: var(--paper-faint);
  font-size: 11.5px;
  letter-spacing: 0.06em;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-meta span::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold-400);
}

.hero-seal {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  justify-self: center;
  width: clamp(142px, 17vw, 206px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 213, 143, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 207, 160, 0.14), transparent 38%),
    radial-gradient(circle at 66% 74%, rgba(244, 179, 90, 0.12), transparent 46%),
    rgba(61, 10, 32, 0.3);
  transform: rotate(-5deg);
  box-shadow:
    inset 0 0 0 10px rgba(255, 213, 143, 0.035),
    0 24px 62px rgba(22, 2, 15, 0.36),
    0 0 60px rgba(244, 179, 90, 0.1);
}

.hero-seal::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px dashed rgba(248, 214, 168, 0.26);
  border-radius: 50%;
}

.hero-seal__orbit {
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 213, 143, 0.16);
  border-radius: 50%;
  animation: seal-orbit 32s linear infinite;
}

.hero-seal__orbit::before,
.hero-seal__orbit::after {
  content: "✦";
  position: absolute;
  color: rgba(255, 241, 207, 0.8);
  font-size: 8px;
  line-height: 1;
}

.hero-seal__orbit::before {
  top: -4px;
  left: 50%;
}

.hero-seal__orbit::after {
  right: 6%;
  bottom: 18%;
  color: rgba(255, 213, 143, 0.7);
}

.hero-seal__year {
  position: relative;
  z-index: 1;
  color: var(--gold-100);
  font-family: var(--font-display);
  font-size: clamp(31px, 4.1vw, 47px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.03em;
  background: linear-gradient(125deg, #fff9e8 4%, #f7d792 42%, #e8a44f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 8px 24px rgba(245, 180, 92, 0.16);
}

.hero-seal__caption {
  position: absolute;
  bottom: 22%;
  color: rgba(255, 241, 207, 0.52);
  font-size: 8.5px;
  letter-spacing: 0.24em;
}

.hero-seal__spark {
  position: absolute;
  top: 19%;
  right: 23%;
  color: var(--gold-200);
  font-size: 12px;
  line-height: 1;
  opacity: 0.75;
  text-shadow: 0 0 14px rgba(255, 213, 143, 0.7);
  animation: spark-glow 3.8s ease-in-out infinite;
}

.hero-seal__words {
  display: none;
}

@keyframes seal-orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes spark-glow {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.9;
    transform: scale(1.08);
  }
}

.eyebrow__dot {
  color: var(--rose-300);
  font-size: 9px;
  line-height: 1;
  text-shadow: 0 0 10px rgba(255, 213, 143, 0.7);
}

.hero-reveal {
  opacity: 0;
  animation: hero-reveal 850ms var(--ease-out) both;
}

.hero-reveal--1 {
  animation-delay: 80ms;
}

.hero-reveal--2 {
  animation-delay: 160ms;
}

.hero-reveal--3 {
  animation-delay: 250ms;
}

.hero-title .hero-title__gold.hero-reveal {
  animation:
    hero-reveal 850ms var(--ease-out) 250ms both,
    hero-shimmer 11s ease-in-out 1100ms infinite;
}

.hero-reveal--4 {
  animation-delay: 350ms;
}

.hero-reveal--5 {
  animation-delay: 440ms;
}

.hero-reveal--6 {
  animation-delay: 530ms;
}

.hero-reveal--7 {
  animation-delay: 620ms;
}

@keyframes hero-reveal {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.hero-countdown-wrap {
  margin-top: 22px;
}

.countdown {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px 13px;
  width: fit-content;
  max-width: 100%;
  min-height: 45px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 213, 143, 0.18);
  border-radius: 15px;
  background:
    linear-gradient(120deg, rgba(244, 179, 90, 0.08), transparent 46%),
    rgba(44, 7, 22, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.countdown__label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 243, 212, 0.6);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.countdown__label i {
  color: var(--rose-300);
  font-style: normal;
  font-size: 9px;
  text-shadow: 0 0 9px rgba(255, 213, 143, 0.65);
}

.countdown__units {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.countdown__unit {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
}

.countdown__unit b {
  display: inline-block;
  min-width: 2ch;
  color: var(--gold-100);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 16px rgba(246, 215, 146, 0.15);
}

.countdown__unit small {
  color: rgba(255, 243, 212, 0.44);
  font-size: 8.5px;
  letter-spacing: 0;
}

.countdown__colon {
  color: rgba(255, 243, 212, 0.24);
  font-size: 14px;
  transform: translateY(-1px);
  animation: colon-breathe 1.6s step-end infinite;
}

@keyframes colon-breathe {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.9;
  }
}

.countdown__unit--seconds b.is-tick {
  animation: digit-pop 360ms var(--ease-spring);
}

.countdown--arrived {
  border-color: rgba(255, 213, 143, 0.34);
}

.countdown__arrived {
  color: var(--gold-100);
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.08em;
}

@keyframes digit-pop {
  0% {
    transform: translateY(3px) scale(0.92);
    opacity: 0.5;
  }
  100% {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.home-section {
  position: relative;
  padding: clamp(32px, 5vw, 54px) 0;
  border-top: 1px solid rgba(236, 200, 120, 0.14);
}

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

.section-head h2 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(27px, 4vw, 38px);
  font-weight: 600;
  line-height: 1.25;
}

.section-head p {
  max-width: 34em;
  color: var(--paper-faint);
  font-size: 12.5px;
}

.section-kicker {
  color: var(--gold-400);
  font-size: 10.5px;
  letter-spacing: 0.28em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding: 25px 22px 10px 0;
}

.step + .step {
  padding-left: 25px;
  border-left: 1px solid var(--line);
}

.step__num {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1;
  background: rgba(236, 200, 120, 0.045);
}

.step h3 {
  margin-bottom: 5px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.step p {
  color: var(--paper-faint);
  font-size: 12.5px;
  line-height: 1.72;
}

.category-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 7px 15px 7px 8px;
  border: 1px solid rgba(255, 213, 143, 0.16);
  border-radius: 999px;
  background: rgba(50, 7, 4, 0.42);
  color: var(--paper-soft);
  font-size: 12px;
}

.category-chip__seal {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(236, 200, 120, 0.34);
  border-radius: 50%;
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 17px;
  background: rgba(126, 23, 19, 0.3);
}

.category-chip strong {
  color: var(--gold-100);
  font-weight: 600;
}

.category-chip small {
  margin-left: 5px;
  color: var(--paper-faint);
  font-size: 10.5px;
}

.my-list {
  display: grid;
  gap: 10px;
}

.quiz-ticket {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 213, 143, 0.16);
  border-left: 2px solid var(--gold-400);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255, 213, 143, 0.06), transparent 42%),
    rgba(55, 8, 30, 0.46);
  text-decoration: none;
  transition: transform 180ms var(--ease-out), border-color 180ms ease, background 180ms ease;
}

.quiz-ticket:hover {
  transform: translateX(3px);
  border-color: rgba(236, 200, 120, 0.36);
  background:
    linear-gradient(90deg, rgba(236, 200, 120, 0.08), transparent 42%),
    rgba(69, 10, 10, 0.56);
}

.quiz-ticket__seal {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 20px;
}

.quiz-ticket__main {
  min-width: 0;
}

.quiz-ticket__title {
  display: block;
  overflow: hidden;
  color: var(--gold-100);
  font-size: 14.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quiz-ticket__meta {
  display: block;
  margin-top: 3px;
  color: var(--paper-faint);
  font-size: 11.5px;
}

.quiz-ticket__arrow {
  color: var(--gold-300);
  font-size: 18px;
}

.empty-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px;
  border: 1px dashed rgba(236, 200, 120, 0.26);
  border-radius: 16px;
  background: rgba(56, 8, 8, 0.28);
}

.empty-invite p {
  color: var(--paper-soft);
  font-size: 13px;
}

.closing-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid rgba(255, 213, 143, 0.22);
  border-radius: 20px;
  background:
    radial-gradient(500px 180px at 80% 20%, rgba(255, 213, 143, 0.12), transparent 65%),
    linear-gradient(120deg, rgba(124, 22, 15, 0.58), rgba(45, 7, 5, 0.74));
  overflow: hidden;
}

.closing-cta h2 {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: clamp(25px, 3.8vw, 34px);
  font-weight: 600;
}

.closing-cta p {
  margin-top: 6px;
  color: var(--paper-faint);
  font-size: 12.5px;
}

/* ---------------- Quiz invitation ---------------- */

.quiz-page,
.result-page,
.board-page,
.editor-page {
  width: min(780px, 100%);
  margin: 0 auto;
}

.quiz-page__top,
.result-page__top,
.board-page__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.quiz-page__top-meta {
  color: var(--paper-faint);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

.invite-card {
  position: relative;
  padding: clamp(28px, 6vw, 56px) clamp(22px, 5vw, 48px);
  border: 1px solid rgba(255, 213, 143, 0.3);
  border-radius: 26px;
  background:
    linear-gradient(155deg, rgba(137, 26, 18, 0.6), rgba(45, 7, 5, 0.86) 58%),
    radial-gradient(560px 280px at 50% 0, rgba(244, 179, 90, 0.18), transparent 72%);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  text-align: center;
}

.invite-card::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(236, 200, 120, 0.16);
  border-radius: 18px;
  pointer-events: none;
}

.invite-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(236, 200, 120, 0.08) 50%, transparent 50.2%) top / 100% 28px no-repeat,
    radial-gradient(circle at 50% -12%, rgba(255, 225, 160, 0.16), transparent 58%);
}

.invite-card__inner {
  position: relative;
  z-index: 1;
}

.invite-card__year {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  margin-bottom: 16px;
  padding: 0 10px;
  border: 1px solid rgba(255, 213, 143, 0.22);
  border-radius: 999px;
  color: rgba(255, 241, 207, 0.66);
  background: rgba(244, 179, 90, 0.055);
  font-size: 9.5px;
  letter-spacing: 0.18em;
}

.creator-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--paper-faint);
  font-size: 12px;
  letter-spacing: 0.06em;
}

.avatar-seal {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 29px;
  line-height: 1;
  background:
    radial-gradient(circle at 36% 26%, rgba(255, 212, 135, 0.18), transparent 44%),
    rgba(87, 13, 12, 0.72);
  box-shadow: inset 0 0 0 6px rgba(236, 200, 120, 0.035);
}

.creator-line strong {
  color: var(--gold-100);
  font-weight: 600;
}

.quiz-title {
  max-width: 17em;
  margin: 8px auto 14px;
  font-family: var(--font-display);
  font-size: clamp(31px, 6.5vw, 48px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.03em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.quiz-subtitle {
  max-width: 30em;
  margin: 0 auto;
  color: var(--paper-faint);
  font-size: 13px;
  line-height: 1.8;
}

.quiz-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 22px 0 26px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(236, 200, 120, 0.18);
  border-radius: 999px;
  color: var(--paper-soft);
  background: rgba(37, 5, 5, 0.26);
  font-size: 11px;
}

.meta-pill b {
  color: var(--gold-200);
  font-weight: 600;
}

.invite-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.invite-actions .btn {
  min-width: 150px;
}

.invite-rule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 18px;
  margin-top: 22px;
  color: var(--paper-faint);
  font-size: 11px;
}

.invite-rule span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.invite-rule b {
  color: var(--gold-200);
  font-weight: 600;
}

.owner-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding: 13px 16px;
  border: 1px dashed rgba(255, 213, 143, 0.26);
  border-radius: 12px;
  background: rgba(55, 8, 5, 0.3);
}

.owner-bar__text {
  font-size: 11.5px;
  color: var(--paper-faint);
}

.owner-bar__text strong {
  display: block;
  margin-bottom: 2px;
  color: var(--gold-200);
  font-size: 12.5px;
  font-weight: 600;
}

.owner-bar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.already-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 213, 143, 0.24);
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(255, 213, 143, 0.08), transparent),
    rgba(58, 8, 5, 0.42);
}

.already-banner p {
  color: var(--paper-soft);
  font-size: 12px;
}

.already-banner strong {
  color: var(--gold-200);
}

.rank-preview {
  margin-top: 22px;
  border: 1px solid rgba(255, 213, 143, 0.16);
  border-radius: 16px;
  background: rgba(39, 6, 4, 0.38);
  overflow: hidden;
}

.rank-preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(236, 200, 120, 0.12);
}

.rank-preview__head h2 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}

.mini-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-top: 1px solid rgba(236, 200, 120, 0.08);
}

.mini-row:first-of-type {
  border-top: 0;
}

.mini-row__rank {
  color: var(--gold-300);
  font-family: var(--font-display);
  font-size: 16px;
  text-align: center;
}

.mini-row__name {
  overflow: hidden;
  color: var(--paper-soft);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-row__score {
  color: var(--gold-200);
  font-size: 13px;
  font-weight: 600;
}

.rank-preview__empty {
  padding: 20px 16px;
  color: var(--paper-faint);
  font-size: 12px;
  text-align: center;
}

/* ---------------- Answering ---------------- */

.play-page {
  width: min(720px, 100%);
  margin: 0 auto;
}

.play-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.play-dashboard {
  position: relative;
  margin-bottom: 20px;
}

.play-score {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--paper-faint);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.play-score b {
  display: inline-block;
  min-width: 1.2em;
  color: var(--gold-100);
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  text-shadow: 0 0 18px rgba(255, 213, 143, 0.18);
}

.play-score b.is-bumping {
  animation: score-bump 420ms var(--ease-spring);
}

@keyframes score-bump {
  0% {
    transform: scale(0.7);
    color: var(--gold-300);
  }
  55% {
    transform: scale(1.24);
    color: #fff5da;
  }
  100% {
    transform: scale(1);
  }
}

.play-progress {
  margin-bottom: 14px;
}

.play-progress .progress-track {
  overflow: visible;
}

.progress-star {
  position: absolute;
  top: 50%;
  left: 0;
  z-index: 2;
  color: var(--gold-100);
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 0 8px rgba(255, 226, 172, 0.8);
  transform: translate(-50%, -50%);
  transition: left 460ms var(--ease-out);
  animation: progress-star-glow 2.4s ease-in-out infinite;
}

@keyframes progress-star-glow {
  0%,
  100% {
    text-shadow: 0 0 8px rgba(255, 226, 172, 0.7);
  }
  50% {
    text-shadow:
      0 0 10px rgba(255, 242, 204, 0.98),
      0 0 22px rgba(244, 179, 90, 0.58);
  }
}

.play-dots {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.play-dot {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 213, 143, 0.13);
  transition: background 200ms ease, transform 200ms ease;
}

.play-dot.is-done {
  background: rgba(244, 179, 90, 0.7);
}

.play-dot.is-current {
  background: var(--gold-100);
  box-shadow: 0 0 8px rgba(255, 226, 172, 0.55);
  transform: scaleY(1.5);
}

.progress-track {
  position: relative;
  height: 3px;
  border-radius: 999px;
  background: rgba(236, 200, 120, 0.14);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #c18c37, #f6e0a6);
  box-shadow: 0 0 12px rgba(246, 224, 166, 0.4);
  transition: width 460ms var(--ease-out);
}

.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 9px;
  color: var(--paper-faint);
  font-size: 10.5px;
  letter-spacing: 0.08em;
}

.progress-meta b {
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
}

.question-card {
  position: relative;
  padding: clamp(22px, 5vw, 38px);
  border: 1px solid rgba(255, 213, 143, 0.22);
  border-radius: 22px;
  background:
    linear-gradient(160deg, rgba(123, 24, 16, 0.58), rgba(41, 6, 4, 0.86)),
    radial-gradient(420px 220px at 90% 0, rgba(255, 213, 143, 0.1), transparent 70%);
  box-shadow: var(--shadow-deep);
}

.question-card::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  bottom: 12px;
  border: 1px solid rgba(236, 200, 120, 0.1);
  border-radius: 16px;
  pointer-events: none;
}

.question-card__inner {
  position: relative;
  z-index: 1;
}

.question-enter {
  animation: question-in 360ms var(--ease-out) both;
}

@keyframes question-in {
  from {
    opacity: 0;
    transform: translate3d(14px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.question-category {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--gold-400);
  font-size: 10.5px;
  letter-spacing: 0.18em;
}

.question-category::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--gold-400);
}

.question-text {
  margin: 14px 0 26px;
  font-family: var(--font-display);
  font-size: clamp(23px, 4.6vw, 34px);
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: 0.02em;
  text-wrap: balance;
}

.pair-hint {
  margin: -12px 0 18px;
  color: var(--paper-faint);
  font-size: 10.5px;
  line-height: 1.7;
}

.options {
  display: grid;
  gap: 10px;
}

.option {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 58px;
  padding: 11px 15px;
  border: 1px solid rgba(255, 213, 143, 0.17);
  border-radius: 12px;
  color: var(--paper);
  background: rgba(25, 4, 3, 0.28);
  text-align: left;
  cursor: pointer;
  transition:
    transform 160ms var(--ease-out),
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease;
}

.options .option {
  animation: option-rise 360ms var(--ease-out) both;
}

.options .option:nth-child(2) {
  animation-delay: 45ms;
}

.options .option:nth-child(3) {
  animation-delay: 90ms;
}

.options .option:nth-child(4) {
  animation-delay: 135ms;
}

@keyframes option-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 8px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.option:hover {
  border-color: rgba(246, 224, 166, 0.42);
  background: rgba(94, 15, 14, 0.34);
}

.option:active {
  transform: scale(0.985);
}

.option__letter {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(236, 200, 120, 0.3);
  border-radius: 8px;
  color: var(--gold-300);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1;
  transition: border-color 180ms ease, color 180ms ease, background 180ms ease;
}

.option__text {
  font-size: 14.5px;
  line-height: 1.55;
}

.option.is-selected {
  border-color: rgba(255, 226, 212, 0.76);
  color: #361006;
  background: linear-gradient(132deg, #fff3e3, #f4d39b 44%, #e7b05a 70%, #e5b768);
  box-shadow:
    0 9px 26px rgba(183, 125, 37, 0.2),
    0 0 24px rgba(244, 179, 90, 0.16);
}

.option.is-selected .option__letter {
  border-color: rgba(60, 18, 5, 0.22);
  color: #3d1306;
  background: rgba(255, 255, 255, 0.28);
}

.option.is-selected .option__text {
  font-weight: 600;
}

.option.is-locked {
  cursor: default;
}

.option.is-pending {
  opacity: 0.68;
}

.option.is-correct {
  border-color: rgba(196, 224, 152, 0.68);
  color: #253a16;
  background: linear-gradient(132deg, #fff6d7, #d8e6b4 48%, #b8d392);
  box-shadow:
    0 9px 26px rgba(91, 124, 50, 0.16),
    0 0 22px rgba(196, 224, 152, 0.18);
}

.option.is-correct .option__letter {
  border-color: rgba(48, 71, 24, 0.22);
  color: #2d4618;
  background: rgba(255, 255, 255, 0.3);
}

.option.is-correct .option__text {
  font-weight: 600;
}

.option.is-wrong {
  border-color: rgba(255, 142, 114, 0.48);
  color: #ffd9cc;
  background: rgba(125, 27, 17, 0.4);
  animation: wrong-shake 360ms ease;
}

.option.is-wrong .option__letter {
  border-color: rgba(255, 162, 134, 0.4);
  color: #ffc3b0;
  background: rgba(255, 126, 96, 0.1);
}

@keyframes wrong-shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  55% {
    transform: translateX(4px);
  }
  78% {
    transform: translateX(-2px);
  }
}

.feedback {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(255, 213, 143, 0.2);
  border-radius: 14px;
  background: rgba(45, 7, 4, 0.6);
}

.feedback.feedback-enter {
  animation: feedback-in 360ms var(--ease-spring) both;
}

@keyframes feedback-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.feedback--correct {
  border-color: rgba(196, 224, 152, 0.38);
  background:
    linear-gradient(120deg, rgba(196, 224, 152, 0.1), transparent 60%),
    rgba(45, 59, 25, 0.38);
}

.feedback--wrong {
  border-color: rgba(255, 142, 114, 0.28);
  background:
    linear-gradient(120deg, rgba(255, 142, 114, 0.08), transparent 60%),
    rgba(66, 13, 8, 0.46);
}

.feedback__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 226, 172, 0.36);
  border-radius: 50%;
  color: var(--gold-100);
  background: rgba(255, 226, 172, 0.08);
  font-family: var(--font-display);
  font-size: 20px;
}

.feedback--correct .feedback__icon {
  border-color: rgba(196, 224, 152, 0.45);
  color: #e6f2cd;
  background: rgba(196, 224, 152, 0.1);
}

.feedback--wrong .feedback__icon {
  border-color: rgba(255, 162, 134, 0.38);
  color: #ffc3b0;
  background: rgba(255, 142, 114, 0.09);
}

.feedback__body {
  min-width: 0;
}

.feedback__body h2 {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 600;
  line-height: 1.35;
}

.feedback__body > p {
  margin-top: 4px;
  color: var(--paper-soft);
  font-size: 11.5px;
  line-height: 1.7;
}

.feedback__body > p b,
.feedback__body > p strong {
  color: var(--gold-100);
  font-weight: 600;
}

.feedback__surpassed {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gold-200) !important;
}

.feedback__surpassed svg {
  width: 13px;
  height: 13px;
  flex: none;
}

.feedback__next-note {
  color: var(--paper-faint) !important;
}

.feedback__button {
  margin-top: 12px;
}

.play-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.play-actions .btn--gold {
  min-width: 155px;
}

.play-hint {
  margin-top: 18px;
  color: var(--paper-faint);
  font-size: 10.5px;
  text-align: center;
  letter-spacing: 0.06em;
}

.submitting-layer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(23, 2, 2, 0.72);
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.submitting-card {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 28px 36px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(56, 8, 5, 0.94);
  text-align: center;
}

.submitting-card p {
  color: var(--paper-soft);
  font-size: 13px;
}

.submitting-card small {
  color: var(--paper-faint);
  font-size: 10.5px;
}

/* ---------------- Result ---------------- */

.result-hero {
  position: relative;
  padding: clamp(30px, 6vw, 54px) clamp(20px, 4vw, 36px) clamp(26px, 4vw, 38px);
  border: 1px solid rgba(255, 213, 143, 0.28);
  border-radius: 26px;
  background:
    radial-gradient(460px 260px at 50% 0, rgba(255, 218, 176, 0.12), transparent 70%),
    radial-gradient(360px 240px at 92% 100%, rgba(244, 179, 90, 0.12), transparent 70%),
    linear-gradient(155deg, rgba(126, 23, 16, 0.58), rgba(39, 6, 24, 0.86));
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  text-align: center;
}

.result-hero::before {
  content: "";
  position: absolute;
  inset: 11px;
  border: 1px solid rgba(248, 214, 168, 0.14);
  border-radius: 18px;
  pointer-events: none;
}

.result-hero__year {
  position: absolute;
  top: -0.1em;
  right: -0.08em;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(120px, 24vw, 250px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  -webkit-text-stroke: 1px rgba(255, 225, 208, 0.07);
  opacity: 0.8;
  user-select: none;
}

.result-hero__inner {
  position: relative;
  z-index: 1;
}

.result-seal {
  display: inline-grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin-bottom: 12px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 21px;
  transform: rotate(-7deg);
}

.score-plaque {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 6px;
}

.score-number {
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: clamp(5.8rem, 18vw, 9.2rem);
  font-weight: 600;
  line-height: 0.88;
  letter-spacing: -0.04em;
  text-shadow: 0 8px 32px rgba(221, 166, 72, 0.28);
}

.score-unit {
  color: var(--paper-faint);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.score-label {
  color: var(--paper-faint);
  font-size: 10.5px;
  letter-spacing: 0.3em;
}

.result-title {
  margin-top: 18px;
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 38px);
  font-weight: 600;
  line-height: 1.3;
}

.result-sub {
  margin-top: 7px;
  color: var(--paper-soft);
  font-size: 13px;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 26px auto 0;
  max-width: 430px;
  border-top: 1px solid rgba(236, 200, 120, 0.15);
  border-bottom: 1px solid rgba(236, 200, 120, 0.15);
}

.stat {
  padding: 13px 8px;
}

.stat + .stat {
  border-left: 1px solid rgba(236, 200, 120, 0.15);
}

.stat__value {
  color: var(--gold-100);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.2;
}

.stat__label {
  margin-top: 2px;
  color: var(--paper-faint);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.result-note {
  margin-top: 18px;
  color: var(--paper-faint);
  font-size: 10.5px;
}

.review {
  margin-top: 22px;
  border: 1px solid rgba(236, 200, 120, 0.18);
  border-radius: 16px;
  background: rgba(41, 6, 6, 0.44);
  overflow: hidden;
}

.review summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 19px;
  color: var(--gold-100);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.review summary::-webkit-details-marker {
  display: none;
}

.review summary::after {
  content: "＋";
  color: var(--gold-400);
  font-size: 16px;
  font-weight: 400;
  transition: transform 200ms ease;
}

.review[open] summary::after {
  content: "－";
}

.review-list {
  padding: 0 19px 7px;
}

.review-item {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 10px;
  padding: 15px 0;
  border-top: 1px solid rgba(236, 200, 120, 0.1);
}

.review-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
}

.review-item--correct .review-mark {
  color: #1e3d19;
  background: #b9d49d;
}

.review-item--wrong .review-mark {
  color: #4b0d08;
  background: #f0a08e;
}

.review-q {
  color: var(--paper);
  font-size: 13px;
  line-height: 1.65;
}

.review-answer {
  margin-top: 5px;
  color: var(--paper-faint);
  font-size: 11.5px;
  line-height: 1.65;
}

.review-answer b {
  color: var(--gold-200);
  font-weight: 500;
}

.review-answer .is-wrong {
  color: #f3a997;
}

.review-note {
  margin-top: 5px;
  padding: 7px 9px;
  border-left: 2px solid rgba(236, 200, 120, 0.28);
  color: var(--paper-faint);
  background: rgba(236, 200, 120, 0.03);
  font-size: 11px;
  line-height: 1.65;
}

/* ---------------- Leaderboard ---------------- */

.board-head {
  margin-bottom: 26px;
  text-align: center;
}

.board-head h1 {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(34px, 6vw, 50px);
  font-weight: 600;
  line-height: 1.25;
}

.board-head p {
  margin-top: 6px;
  color: var(--paper-faint);
  font-size: 12.5px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  margin-top: 12px;
  padding: 0 11px;
  border: 1px solid rgba(236, 200, 120, 0.16);
  border-radius: 999px;
  color: var(--paper-faint);
  background: rgba(45, 7, 7, 0.38);
  font-size: 10.5px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d9b96e;
  box-shadow: 0 0 0 rgba(217, 185, 110, 0.42);
  animation: live-pulse 2.2s ease-out infinite;
}

@keyframes live-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(217, 185, 110, 0.34);
  }
  68% {
    box-shadow: 0 0 0 7px rgba(217, 185, 110, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(217, 185, 110, 0);
  }
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  margin: 8px 0 18px;
}

.podium__item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 8px 0;
  text-align: center;
}

.podium__item--first {
  padding-top: 0;
}

.podium__crown {
  height: 20px;
  margin-bottom: 2px;
  color: var(--gold-300);
  font-size: 17px;
  line-height: 1;
}

.podium__avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(236, 200, 120, 0.38);
  border-radius: 50%;
  color: var(--gold-100);
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 220, 155, 0.18), transparent 46%),
    rgba(90, 14, 13, 0.82);
  font-family: var(--font-display);
  font-size: 27px;
  box-shadow: inset 0 0 0 5px rgba(236, 200, 120, 0.04);
}

.podium__item--first .podium__avatar {
  width: 78px;
  height: 78px;
  border-color: rgba(255, 232, 173, 0.72);
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 237, 186, 0.28), transparent 46%),
    linear-gradient(145deg, #a36a24, #5b1010 70%);
  box-shadow:
    inset 0 0 0 5px rgba(255, 233, 173, 0.08),
    0 14px 34px rgba(174, 119, 33, 0.18);
}

.podium__name {
  width: 100%;
  margin-top: 9px;
  overflow: hidden;
  color: var(--paper);
  font-size: 12.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.podium__score {
  margin-top: 2px;
  color: var(--gold-200);
  font-size: 11.5px;
}

.podium__base {
  width: 100%;
  margin-top: 10px;
  padding: 7px 4px;
  border: 1px solid rgba(236, 200, 120, 0.12);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  color: var(--paper-faint);
  background: linear-gradient(180deg, rgba(110, 18, 16, 0.4), rgba(54, 8, 8, 0.2));
  font-family: var(--font-display);
  font-size: 14px;
}

.podium__item--first .podium__base {
  padding-top: 11px;
  color: var(--gold-200);
  background: linear-gradient(180deg, rgba(171, 111, 34, 0.28), rgba(69, 9, 9, 0.22));
}

.podium--one {
  grid-template-columns: minmax(0, 240px);
  justify-content: center;
}

.podium--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(520px, 100%);
  margin-right: auto;
  margin-left: auto;
}

.board-list {
  border: 1px solid rgba(255, 213, 143, 0.18);
  border-radius: 16px;
  background: rgba(40, 6, 4, 0.48);
  overflow: hidden;
}

.board-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 14px 17px;
  border-top: 1px solid rgba(255, 213, 143, 0.09);
  transition: background 180ms ease;
}

.board-row:first-child {
  border-top: 0;
}

.board-row.is-you {
  background:
    linear-gradient(90deg, rgba(255, 213, 143, 0.14), transparent 52%),
    rgba(86, 13, 6, 0.5);
  box-shadow: inset 2px 0 0 var(--gold-400);
}

.board-rank {
  color: var(--gold-300);
  font-family: var(--font-display);
  font-size: 19px;
  line-height: 1;
  text-align: center;
}

.board-person {
  min-width: 0;
}

.board-name {
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: var(--paper);
  font-size: 13.5px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.you-tag {
  flex: none;
  padding: 1px 6px;
  border: 1px solid rgba(236, 200, 120, 0.34);
  border-radius: 999px;
  color: var(--gold-200);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.board-sub {
  margin-top: 2px;
  color: var(--paper-faint);
  font-size: 10.5px;
}

.board-score {
  text-align: right;
}

.board-score strong {
  display: block;
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
}

.board-score span {
  color: var(--paper-faint);
  font-size: 9.5px;
}

.board-empty {
  padding: 34px 22px;
  color: var(--paper-faint);
  font-size: 12.5px;
  text-align: center;
}

.board-note {
  margin-top: 12px;
  color: var(--paper-faint);
  font-size: 10.5px;
  text-align: center;
}

.board-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}

.board-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(236, 200, 120, 0.22);
  border-radius: 12px;
  background: rgba(61, 9, 8, 0.4);
}

.board-invite p {
  color: var(--paper-soft);
  font-size: 12px;
}

/* ---------------- Editor ---------------- */

.editor-head {
  margin-bottom: 24px;
}

.editor-head h1 {
  margin: 8px 0 6px;
  font-family: var(--font-display);
  font-size: clamp(30px, 5vw, 42px);
  font-weight: 600;
  line-height: 1.3;
}

.editor-head p {
  color: var(--paper-faint);
  font-size: 12.5px;
}

.editor-form {
  display: grid;
  gap: 22px;
}

.field {
  display: grid;
  gap: 7px;
}

.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--gold-100);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.field__label small {
  color: var(--paper-faint);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.field__hint {
  color: var(--paper-faint);
  font-size: 10.5px;
  line-height: 1.7;
}

.input,
.textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(236, 200, 120, 0.22);
  border-radius: 11px;
  color: var(--paper);
  background: rgba(26, 4, 4, 0.38);
  outline: none;
  font-size: 16px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.input::placeholder,
.textarea::placeholder {
  color: rgba(255, 244, 220, 0.3);
}

.input:focus,
.textarea:focus {
  border-color: rgba(246, 224, 166, 0.62);
  background: rgba(42, 6, 6, 0.56);
  box-shadow: 0 0 0 3px rgba(236, 200, 120, 0.07);
}

.textarea {
  min-height: 94px;
  resize: vertical;
  line-height: 1.65;
}

.editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.editor-toolbar__count {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--paper-faint);
  font-size: 11px;
}

.editor-toolbar__count b {
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.draft-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid rgba(236, 200, 120, 0.1);
}

.draft-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 12px;
  padding: 21px 0;
  border-bottom: 1px solid rgba(236, 200, 120, 0.12);
}

.draft-item__index {
  padding-top: 2px;
  color: rgba(236, 200, 120, 0.66);
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1;
}

.draft-item__body {
  min-width: 0;
}

.draft-item__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
}

.draft-q {
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(17px, 2.6vw, 20px);
  font-weight: 600;
  line-height: 1.55;
  word-break: break-word;
}

.draft-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 10px;
}

.draft-option {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(236, 200, 120, 0.12);
  border-radius: 6px;
  color: var(--paper-faint);
  font-size: 10.5px;
  line-height: 1.5;
}

.draft-option b {
  color: var(--gold-400);
  font-weight: 600;
}

.draft-option--correct {
  border-color: rgba(236, 200, 120, 0.4);
  color: var(--gold-100);
  background: rgba(236, 200, 120, 0.08);
}

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-top: 13px;
}

.draft-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 32px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: var(--paper-faint);
  background: transparent;
  font-size: 10.5px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.draft-btn:hover {
  color: var(--gold-100);
  border-color: rgba(236, 200, 120, 0.2);
  background: rgba(236, 200, 120, 0.05);
}

.draft-btn--danger:hover {
  color: #ffb8a8;
  border-color: rgba(255, 140, 118, 0.24);
  background: rgba(139, 28, 20, 0.16);
}

.draft-btn svg {
  width: 13px;
  height: 13px;
}

.draft-btn[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}

.editor-empty {
  padding: 36px 20px;
  border: 1px dashed rgba(236, 200, 120, 0.24);
  border-radius: 14px;
  color: var(--paper-faint);
  font-size: 12px;
  text-align: center;
}

.save-dock {
  position: sticky;
  bottom: 0;
  z-index: 30;
  margin: 28px calc(clamp(18px, 5vw, 40px) * -1) -72px;
  padding: 13px clamp(18px, 5vw, 40px) calc(15px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(32, 5, 5, 0), rgba(26, 4, 4, 0.9) 24%, rgba(22, 3, 3, 0.98));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.save-dock__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(780px, 100%);
  margin: 0 auto;
}

.save-dock__hint {
  color: var(--paper-faint);
  font-size: 10.5px;
  line-height: 1.6;
}

.save-dock__hint b {
  color: var(--gold-200);
  font-weight: 500;
}

.save-dock .btn {
  flex: none;
  min-width: 180px;
}

.form-error {
  padding: 11px 13px;
  border: 1px solid rgba(255, 137, 116, 0.28);
  border-radius: 9px;
  color: #ffc0b3;
  background: rgba(122, 26, 18, 0.16);
  font-size: 11.5px;
}

.editor-notice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: -4px 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(236, 200, 120, 0.24);
  border-radius: 10px;
  color: var(--paper-soft);
  background: rgba(236, 200, 120, 0.055);
  font-size: 11px;
  line-height: 1.75;
}

.editor-notice svg {
  flex: none;
  margin-top: 2px;
  color: var(--gold-300);
}

.editor-notice b {
  color: var(--gold-200);
  font-weight: 600;
}



/* ---------------- Nickname step ---------------- */

.name-step-wrap {
  display: grid;
  place-items: center;
  min-height: 48vh;
  padding: 8px 0 24px;
}

.name-step {
  position: relative;
  width: min(500px, 100%);
  padding: clamp(28px, 6vw, 46px) clamp(20px, 5vw, 38px);
  border: 1px solid rgba(255, 213, 143, 0.3);
  border-radius: 24px;
  background:
    radial-gradient(400px 220px at 50% 0, rgba(244, 179, 90, 0.12), transparent 68%),
    linear-gradient(155deg, rgba(127, 25, 16, 0.62), rgba(43, 7, 5, 0.9));
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  text-align: center;
}

.name-step::before {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 213, 143, 0.13);
  border-radius: 16px;
  pointer-events: none;
}

.name-step__year {
  position: absolute;
  top: -0.15em;
  right: -0.04em;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(110px, 22vw, 190px);
  font-weight: 600;
  line-height: 1;
  -webkit-text-stroke: 1px rgba(255, 231, 188, 0.08);
  pointer-events: none;
  user-select: none;
}

.name-step > * {
  position: relative;
  z-index: 1;
}

.name-step h1 {
  margin: 12px auto 8px;
  font-family: var(--font-display);
  font-size: clamp(31px, 6vw, 42px);
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.name-step > p:not(.name-step__error):not(.name-step__hint) {
  max-width: 25em;
  margin: 0 auto 20px;
  color: var(--paper-soft);
  font-size: 12.5px;
  line-height: 1.85;
}

.name-step__field {
  position: relative;
  margin-bottom: 10px;
}

.name-step__field input {
  width: 100%;
  height: 54px;
  padding: 0 50px 0 16px;
  border: 1px solid rgba(255, 213, 143, 0.32);
  border-radius: 12px;
  color: var(--paper);
  background: rgba(25, 4, 3, 0.46);
  outline: none;
  font-size: 16px;
  text-align: center;
  letter-spacing: 0.04em;
}

.name-step__field input:focus {
  border-color: rgba(255, 226, 172, 0.7);
  box-shadow: 0 0 0 3px rgba(244, 179, 90, 0.1);
}

.name-step__field input::placeholder {
  color: rgba(255, 244, 226, 0.3);
}

.name-step__field span {
  position: absolute;
  right: 14px;
  top: 50%;
  color: var(--paper-faint);
  font-size: 10px;
  transform: translateY(-50%);
}

.name-step__locked {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  margin-bottom: 12px;
  padding: 0 14px;
  border: 1px solid rgba(255, 213, 143, 0.28);
  border-radius: 12px;
  color: var(--gold-100);
  background: rgba(244, 179, 90, 0.07);
  font-size: 15px;
}

.name-step__locked small {
  color: var(--paper-faint);
  font-size: 9.5px;
}

.name-step__error {
  min-height: 18px;
  margin: 2px 0 8px;
  color: #ffb59f;
  font-size: 10.5px;
  line-height: 1.65;
}

.name-step .btn {
  margin-top: 4px;
}

.name-step__hint {
  display: block;
  margin: 13px auto 4px !important;
  color: var(--gold-200) !important;
  font-size: 10.5px !important;
  line-height: 1.7;
}

.name-step__note {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--paper-faint);
  font-size: 9.5px;
}

.name-step__note svg {
  width: 12px;
  height: 12px;
}

/* ---------------- Quiz wizard ---------------- */

.wizard-page {
  width: min(760px, 100%);
  margin: 0 auto;
}

.wizard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.wizard-year {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(255, 213, 143, 0.18);
  border-radius: 999px;
  color: var(--gold-200);
  background: rgba(244, 179, 90, 0.055);
  font-size: 9.5px;
  letter-spacing: 0.14em;
}

.wizard-head {
  margin-bottom: 20px;
}

.wizard-head h1 {
  margin: 8px 0 7px;
  font-family: var(--font-display);
  font-size: clamp(31px, 5.4vw, 44px);
  font-weight: 600;
  line-height: 1.28;
  overflow-wrap: anywhere;
}

.wizard-head p {
  color: var(--paper-faint);
  font-size: 12px;
  line-height: 1.8;
}

.wizard-progress {
  margin-bottom: 20px;
}

.wizard-progress .progress-track {
  overflow: visible;
}

.wizard-dots {
  display: flex;
  gap: 5px;
  margin-top: 10px;
}

.wizard-dot {
  flex: 1;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 226, 172, 0.13);
  transition: background 180ms ease, transform 180ms ease;
}

.wizard-dot.is-done {
  background: rgba(244, 179, 90, 0.58);
}

.wizard-dot.is-current {
  background: var(--gold-100);
  box-shadow: 0 0 8px rgba(255, 226, 172, 0.45);
  transform: scaleY(1.8);
}

.wizard-card {
  margin-top: 0;
}

.wizard-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reroll-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid rgba(255, 213, 143, 0.24);
  border-radius: 999px;
  color: var(--gold-200);
  background: rgba(244, 179, 90, 0.06);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.reroll-btn:hover {
  color: var(--gold-100);
  border-color: rgba(255, 213, 143, 0.48);
  background: rgba(244, 179, 90, 0.12);
}

.reroll-btn:active {
  transform: rotate(-8deg) scale(0.96);
}

.reroll-btn svg {
  width: 13px;
  height: 13px;
}

.wizard-question-title {
  margin-top: 12px;
  font-size: clamp(23px, 3.7vw, 32px);
}

.wizard-hint {
  margin: -14px 0 20px;
  color: var(--paper-faint);
  font-size: 10.5px;
  line-height: 1.7;
}

.wizard-actions {
  margin-top: 20px;
}

.wizard-review {
  border: 1px solid rgba(255, 213, 143, 0.18);
  border-radius: 18px;
  background: rgba(47, 7, 5, 0.5);
  overflow: hidden;
}

.wizard-review__head {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255, 213, 143, 0.11);
}

.wizard-review__head h2 {
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 600;
}

.wizard-review__head p {
  margin-top: 3px;
  color: var(--paper-faint);
  font-size: 10.5px;
}

.wizard-review__item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border-top: 1px solid rgba(255, 213, 143, 0.08);
}

.wizard-review__item:first-of-type {
  border-top: 0;
}

.wizard-review__number {
  color: rgba(244, 179, 90, 0.6);
  font-family: var(--font-display);
  font-size: 16px;
}

.wizard-review__body p {
  color: var(--paper);
  font-size: 12.5px;
  line-height: 1.6;
}

.wizard-review__body span {
  display: block;
  margin-top: 2px;
  color: var(--gold-200);
  font-size: 10.5px;
}

.wizard-review__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.wizard-save-note {
  margin-top: 9px;
  color: var(--paper-faint);
  font-size: 10px;
  text-align: right;
}

/* ---------------- Modal ---------------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(18, 2, 2, 0.78);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  animation: fade-in 180ms ease both;
}

.modal-backdrop--gate {
  padding: 18px;
  background:
    radial-gradient(700px 500px at 50% 0, rgba(153, 33, 26, 0.48), transparent 70%),
    rgba(20, 2, 2, 0.9);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal {
  position: relative;
  width: min(470px, 100%);
  max-height: min(86vh, 780px);
  max-height: min(86svh, 780px);
  border: 1px solid rgba(255, 213, 143, 0.3);
  border-radius: 18px;
  background:
    linear-gradient(155deg, rgba(96, 16, 10, 0.93), rgba(31, 5, 4, 0.98) 68%),
    var(--plum-900);
  box-shadow: 0 30px 90px rgba(8, 0, 10, 0.66);
  overflow: hidden;
  animation: modal-in 260ms var(--ease-spring) both;
}

.modal--wide {
  width: min(720px, 100%);
}

.modal--sheet {
  width: min(720px, 100%);
  height: min(88vh, 840px);
  height: min(88svh, 840px);
  max-height: 88vh;
  max-height: 88svh;
  display: flex;
  flex-direction: column;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(236, 200, 120, 0.12);
}

.modal__title {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
}

.modal__subtitle {
  margin-top: 3px;
  color: var(--paper-faint);
  font-size: 10.5px;
  line-height: 1.65;
}

.modal__close {
  display: grid;
  place-items: center;
  flex: none;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(236, 200, 120, 0.2);
  border-radius: 50%;
  color: var(--paper-faint);
  background: rgba(36, 5, 5, 0.32);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease;
}

.modal__close:hover {
  color: var(--gold-100);
  border-color: rgba(236, 200, 120, 0.48);
}

.modal__body {
  padding: 20px 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal--sheet .modal__body {
  flex: 1;
  padding: 0;
  overflow: hidden;
}

.modal-backdrop--gate .modal__body {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 22px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(236, 200, 120, 0.12);
}

.modal__foot--stack {
  align-items: stretch;
  flex-direction: column;
}

.modal__foot--stack .btn {
  width: 100%;
}

.modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

/* Identity gate */

.gate {
  position: relative;
  width: min(440px, 100%);
  text-align: center;
}

.gate__year {
  position: absolute;
  top: -2px;
  right: 0;
  color: rgba(255, 213, 143, 0.48);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.22em;
}

.gate__seal {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  border: 1px solid rgba(255, 213, 143, 0.38);
  border-radius: 50%;
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 32px;
  background:
    radial-gradient(circle at 36% 28%, rgba(255, 222, 154, 0.18), transparent 46%),
    radial-gradient(circle at 70% 75%, rgba(244, 179, 90, 0.16), transparent 52%),
    rgba(88, 14, 7, 0.68);
  box-shadow:
    inset 0 0 0 7px rgba(255, 213, 143, 0.035),
    0 0 32px rgba(244, 179, 90, 0.1);
}

.gate h2 {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 38px);
  font-weight: 600;
  line-height: 1.3;
}

.gate p {
  margin: 8px auto 20px;
  max-width: 26em;
  color: var(--paper-soft);
  font-size: 12.5px;
  line-height: 1.8;
}

.gate__field {
  position: relative;
  margin-bottom: 12px;
}

.gate__field input {
  width: 100%;
  height: 54px;
  padding: 0 44px 0 16px;
  border: 1px solid rgba(236, 200, 120, 0.3);
  border-radius: 12px;
  color: var(--paper);
  background: rgba(21, 3, 3, 0.46);
  outline: none;
  font-size: 16px;
  text-align: center;
  letter-spacing: 0.06em;
}

.gate__field input:focus {
  border-color: rgba(246, 224, 166, 0.68);
  box-shadow: 0 0 0 3px rgba(236, 200, 120, 0.07);
}

.gate__field input::placeholder {
  color: rgba(255, 244, 220, 0.3);
  letter-spacing: 0.02em;
}

.gate__counter {
  position: absolute;
  right: 14px;
  top: 50%;
  color: var(--paper-faint);
  font-size: 10px;
  transform: translateY(-50%);
}

.gate__privacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--paper-faint);
  font-size: 10px;
}

.gate__privacy svg {
  width: 12px;
  height: 12px;
}

.gate__error {
  min-height: 18px;
  margin-top: 8px;
  color: #ffb8a8;
  font-size: 10.5px;
}

/* Share */

.share-box {
  display: grid;
  gap: 12px;
}

.share-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 6px 6px 12px;
  border: 1px solid rgba(236, 200, 120, 0.26);
  border-radius: 10px;
  background: rgba(19, 3, 3, 0.4);
}

.share-link input {
  flex: 1;
  min-width: 0;
  border: 0;
  color: var(--paper-soft);
  background: transparent;
  outline: none;
  font-size: 12px;
  line-height: 1.5;
}

.share-link .btn {
  flex: none;
}

.share-note {
  color: var(--paper-faint);
  font-size: 10.5px;
  line-height: 1.75;
}

.share-warning {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(236, 177, 96, 0.28);
  border-radius: 9px;
  color: #f3c98f;
  background: rgba(164, 79, 26, 0.14);
  font-size: 10px;
  line-height: 1.65;
}

.share-warning svg {
  flex: none;
  width: 13px;
  height: 13px;
  margin-top: 2px;
}

.share-note b {
  color: var(--gold-200);
  font-weight: 500;
}

.share-preview {
  padding: 15px;
  border: 1px dashed rgba(236, 200, 120, 0.22);
  border-radius: 12px;
  background: rgba(56, 8, 8, 0.26);
  text-align: center;
}

.share-preview__small {
  display: block;
  color: var(--paper-faint);
  font-size: 9.5px;
  letter-spacing: 0.16em;
}

.share-preview strong + .share-preview__small {
  margin-top: 5px;
}

.share-preview strong {
  display: block;
  margin-top: 5px;
  color: var(--gold-100);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
}

/* How to play */

.how-list {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.how-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  color: var(--paper-soft);
  font-size: 12.5px;
  line-height: 1.7;
}

.how-list b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
}

.how-list strong {
  color: var(--gold-100);
  font-weight: 600;
}

/* Picker */

.picker {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.picker__top {
  padding: 17px 20px 0;
  border-bottom: 1px solid rgba(236, 200, 120, 0.1);
}

.picker__search {
  position: relative;
  margin-bottom: 12px;
}

.picker__search input {
  width: 100%;
  height: 44px;
  padding: 0 14px 0 38px;
  border: 1px solid rgba(236, 200, 120, 0.2);
  border-radius: 10px;
  color: var(--paper);
  background: rgba(23, 3, 3, 0.36);
  outline: none;
  font-size: 16px;
}

.picker__search input:focus {
  border-color: rgba(246, 224, 166, 0.55);
}

.picker__search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--paper-faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.picker__tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding-bottom: 12px;
  scrollbar-width: none;
}

.picker__tabs::-webkit-scrollbar {
  display: none;
}

.picker-tab {
  flex: none;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid rgba(236, 200, 120, 0.14);
  border-radius: 999px;
  color: var(--paper-faint);
  background: transparent;
  font-size: 10.5px;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}

.picker-tab.is-active {
  color: #381106;
  border-color: transparent;
  background: var(--gold-200);
  font-weight: 600;
}

.picker__list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 20px 16px;
}

.picker-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid rgba(236, 200, 120, 0.09);
  color: var(--paper);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.picker-item:hover {
  color: var(--gold-100);
}

.picker-item__check {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border: 1px solid rgba(236, 200, 120, 0.3);
  border-radius: 5px;
  color: #361006;
  font-size: 11px;
  line-height: 1;
}

.picker-item.is-selected .picker-item__check {
  border-color: var(--gold-300);
  background: var(--gold-300);
}

.picker-item.is-disabled {
  opacity: 0.46;
  cursor: default;
}

.picker-item__body {
  min-width: 0;
}

.picker-item__q {
  color: inherit;
  font-size: 13px;
  line-height: 1.55;
}

.picker-item__meta {
  margin-top: 4px;
  color: var(--paper-faint);
  font-size: 10px;
}

.picker__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(236, 200, 120, 0.12);
  background: rgba(29, 4, 4, 0.72);
}

.picker__count {
  color: var(--paper-faint);
  font-size: 11px;
}

.picker__count b {
  color: var(--gold-200);
  font-size: 16px;
}

.picker-empty {
  padding: 40px 20px;
  color: var(--paper-faint);
  font-size: 12px;
  text-align: center;
}

/* Question editor */

.q-editor {
  display: grid;
  gap: 16px;
}

.q-editor__options {
  display: grid;
  gap: 8px;
}

.option-edit {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.option-edit__letter {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(236, 200, 120, 0.26);
  border-radius: 8px;
  color: var(--gold-200);
  background: rgba(236, 200, 120, 0.04);
  font-family: var(--font-display);
  font-size: 16px;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.option-edit.is-correct .option-edit__letter {
  color: #351006;
  border-color: transparent;
  background: var(--gold-300);
}

.option-edit__field {
  position: relative;
}

.option-edit__field input {
  width: 100%;
  height: 42px;
  padding: 0 34px 0 12px;
  border: 1px solid rgba(236, 200, 120, 0.18);
  border-radius: 9px;
  color: var(--paper);
  background: rgba(23, 3, 3, 0.36);
  outline: none;
  font-size: 16px;
}

.option-edit__field input:focus {
  border-color: rgba(246, 224, 166, 0.55);
}

.option-edit__mark {
  position: absolute;
  right: 10px;
  top: 50%;
  color: var(--gold-300);
  font-size: 9px;
  letter-spacing: 0.08em;
  transform: translateY(-50%);
}

.answer-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--paper-faint);
  font-size: 10.5px;
}

.answer-tip svg {
  width: 13px;
  height: 13px;
  color: var(--gold-400);
}

/* Interactive festive particles */

.spark-particle {
  position: fixed;
  z-index: 92;
  color: var(--gold-300);
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 0 12px rgba(255, 213, 143, 0.75);
  animation: spark-float 1050ms var(--ease-out) both;
  animation-delay: var(--delay, 0ms);
  will-change: transform, opacity;
}

@keyframes spark-float {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 0, 0) scale(0.55);
  }
  18% {
    opacity: 0.95;
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--dx, 0px)), -58px, 0) scale(1.3) rotate(var(--rot, 0deg));
  }
}

.confetti-piece {
  position: fixed;
  z-index: 93;
  width: var(--w, 6px);
  height: var(--h, 10px);
  border-radius: 1px;
  background: var(--color, var(--gold-300));
  pointer-events: none;
  opacity: 0;
  animation: confetti-burst var(--duration, 1400ms) cubic-bezier(0.15, 0.72, 0.28, 1) both;
  animation-delay: var(--delay, 0ms);
  will-change: transform, opacity;
}

.confetti-piece--round {
  border-radius: 50%;
}

@keyframes confetti-burst {
  0% {
    opacity: 1;
    transform: translate3d(-50%, 0, 0) rotate(0deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(-50% + var(--dx, 0px)), var(--dy, 160px), 0) rotate(var(--rot, 240deg)) scale(0.72);
  }
}

.confetti-piece--rain {
  animation-name: confetti-fall;
  animation-timing-function: linear;
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -20px, 0) rotate(0deg);
  }
  8% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift, 30px), 112vh, 0) rotate(var(--rot, 420deg));
  }
}

/* Toast */

.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 140;
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(360px, calc(100% - 32px));
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 15px;
  border: 1px solid rgba(255, 213, 143, 0.34);
  border-radius: 999px;
  color: var(--gold-50);
  background: rgba(38, 5, 24, 0.94);
  box-shadow: 0 14px 36px rgba(4, 0, 12, 0.42);
  font-size: 11.5px;
  line-height: 1.5;
  animation: toast-in 260ms var(--ease-out) both;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.toast--success {
  border-color: rgba(186, 214, 151, 0.4);
}

.toast--error {
  border-color: rgba(255, 137, 116, 0.44);
}

.toast.is-leaving {
  animation: toast-out 220ms ease both;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}

/* Error / not found */

.state-page {
  display: grid;
  place-items: center;
  min-height: 44vh;
  text-align: center;
}

.state-card {
  width: min(440px, 100%);
  padding: 34px 24px;
  border: 1px solid rgba(236, 200, 120, 0.2);
  border-radius: 18px;
  background: rgba(48, 7, 7, 0.42);
}

.state-card__seal {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--gold-200);
  font-family: var(--font-display);
  font-size: 25px;
}

.state-card h1 {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
}

.state-card p {
  margin: 8px 0 20px;
  color: var(--paper-faint);
  font-size: 12.5px;
  line-height: 1.8;
}

.state-card__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 30px;
  color: var(--paper);
  background: var(--red-950);
  text-align: center;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 900px) {
  .vertical-verse {
    display: none;
  }

  .hero-title {
    font-size: clamp(3rem, 9.5vw, 5.2rem);
  }

  .home-hero {
    grid-template-columns: minmax(0, 1fr) 148px;
  }
}

@media (max-width: 720px) {
  body {
    background-attachment: scroll;
  }

  .scene__aurora {
    animation: none;
    filter: blur(74px);
    opacity: 0.22;
  }

  .bokeh--three {
    display: none;
  }

  .site-header {
    padding-top: calc(15px + env(safe-area-inset-top));
  }

  .share-link input {
    font-size: 16px;
  }

  .app {
    padding-top: 22px;
    padding-bottom: 58px;
  }

  .home-hero {
    display: block;
    min-height: 0;
    padding-top: 28px;
    padding-bottom: 38px;
  }

  .hero-seal {
    position: absolute;
    top: 6px;
    right: -18px;
    width: 88px;
    opacity: 0.4;
    transform: rotate(-8deg);
  }

  .hero-seal__words {
    font-size: 24px;
  }

  .hero-seal::after {
    display: none;
  }

  .hero-title {
    position: relative;
    z-index: 1;
    margin-top: 16px;
    font-size: clamp(2.9rem, 13.8vw, 4.5rem);
  }

  .hero-lede {
    max-width: 26em;
    font-size: 13.5px;
  }

  .hero-lede br {
    display: none;
  }

  .hero-actions .btn {
    flex: 1;
    min-width: 140px;
  }

  .hero-meta {
    gap: 6px 13px;
    font-size: 10.5px;
  }

  .year-watermark {
    top: 7%;
    font-size: 38vw;
    opacity: 0.54;
  }

  .hero-countdown-wrap {
    margin-top: 18px;
  }

  .countdown {
    justify-content: space-between;
    width: 100%;
    gap: 7px;
    min-height: 42px;
    padding: 8px 11px;
  }

  .countdown__label {
    font-size: 9.5px;
  }

  .countdown__unit b {
    font-size: 19px;
  }

  .countdown__colon {
    font-size: 12px;
  }

  .hero-seal__year {
    font-size: 25px;
  }

  .hero-seal__caption {
    font-size: 7.5px;
  }

  .result-hero__year {
    font-size: 34vw;
    opacity: 0.55;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .steps {
    grid-template-columns: 1fr;
    border-top: 0;
  }

  .step {
    padding: 17px 0;
    border-top: 1px solid rgba(236, 200, 120, 0.12);
  }

  .step + .step {
    padding-left: 0;
    border-left: 0;
  }

  .category-cloud {
    flex-wrap: nowrap;
    margin-right: calc(clamp(18px, 5vw, 40px) * -1);
    padding-right: clamp(18px, 5vw, 40px);
    overflow-x: auto;
    scrollbar-width: none;
  }

  .category-cloud::-webkit-scrollbar {
    display: none;
  }

  .category-chip {
    flex: none;
  }

  .closing-cta {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }

  .closing-cta .btn {
    width: 100%;
  }

  .invite-actions {
    flex-direction: column;
  }

  .invite-actions .btn {
    width: 100%;
  }

  .owner-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .owner-bar__actions {
    width: 100%;
  }

  .owner-bar__actions .btn {
    flex: 1;
  }

  .already-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .already-banner .btn {
    width: 100%;
  }

  .play-actions {
    flex-direction: column-reverse;
  }

  .play-actions .btn {
    width: 100%;
  }

  .result-actions {
    flex-direction: column;
  }

  .result-actions .btn {
    width: 100%;
  }

  .board-invite {
    align-items: flex-start;
    flex-direction: column;
  }

  .board-invite .btn {
    width: 100%;
  }

  .board-actions {
    flex-direction: column;
  }

  .board-actions .btn {
    width: 100%;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 88vh;
    max-height: 88svh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 20px 20px 0 0;
    animation-name: sheet-in;
  }

  .modal--sheet {
    width: 100%;
    height: 88vh;
    height: 88svh;
    max-height: 88vh;
    max-height: 88svh;
  }

  @keyframes sheet-in {
    from {
      opacity: 0;
      transform: translateY(28px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .modal__head {
    padding: 18px 18px 13px;
  }

  .name-step {
    padding: 26px 18px 28px;
  }

  .name-step h1 {
    font-size: 31px;
  }

  .name-step__locked {
    flex-wrap: wrap;
    gap: 4px 8px;
    padding: 10px 12px;
  }

  .wizard-head h1 {
    font-size: 31px;
  }

  .wizard-review__head {
    padding: 15px 16px;
  }

  .wizard-review__item {
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 12px 15px;
  }

  .wizard-review__actions {
    flex-direction: column;
  }

  .wizard-review__actions .btn {
    width: 100%;
  }

  .wizard-save-note {
    text-align: center;
  }

  .feedback {
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 10px;
    padding: 15px 13px;
  }

  .feedback__icon {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }

  .feedback__button {
    width: 100%;
  }

  .play-score b {
    font-size: 26px;
  }

  .play-dots {
    gap: 3px;
  }

  .modal__body {
    padding: 18px;
  }

  .modal--sheet .modal__body {
    padding: 0;
  }

  .modal__foot {
    padding-left: 18px;
    padding-right: 18px;
  }

  .picker__top {
    padding-left: 16px;
    padding-right: 16px;
  }

  .picker__list {
    padding-left: 16px;
    padding-right: 16px;
  }

  .picker__foot {
    padding-left: 16px;
    padding-right: 16px;
  }

  .save-dock {
    margin-bottom: -58px;
  }

  .save-dock__hint {
    display: none;
  }

  .save-dock .btn {
    width: 100%;
  }

  .editor-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions .btn {
    flex: 1;
  }

  .draft-item {
    grid-template-columns: 33px minmax(0, 1fr);
    gap: 8px;
  }

  .draft-item__index {
    font-size: 20px;
  }
}

@media (max-width: 380px) {
  .hero-seal {
    display: none;
  }
}

@media (max-width: 520px) {
  .brand__name small {
    display: none;
  }

  .brand__seal {
    width: 38px;
    height: 38px;
    font-size: 22px;
  }

  .header-tools {
    gap: 6px;
  }

  .music-toggle {
    width: 40px;
    padding: 0;
    gap: 0;
  }

  .music-toggle__label {
    display: none;
  }

  .identity-chip {
    max-width: 130px;
    padding: 0 11px;
    font-size: 12px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-meta span:nth-child(3) {
    display: none;
  }

  .empty-invite {
    align-items: flex-start;
    flex-direction: column;
  }

  .empty-invite .btn {
    width: 100%;
  }

  .invite-card {
    padding: 28px 17px 30px;
    border-radius: 20px;
  }

  .invite-card::before {
    inset: 7px;
  }

  .quiz-title {
    font-size: clamp(28px, 8.4vw, 38px);
  }

  .quiz-meta {
    gap: 6px;
  }

  .meta-pill {
    min-height: 27px;
    padding: 0 9px;
    font-size: 10px;
  }

  .question-card {
    padding: 24px 17px 20px;
  }

  .question-card::before {
    inset: 8px;
  }

  .option {
    min-height: 55px;
    padding: 9px 11px;
  }

  .option__text {
    font-size: 13.5px;
  }

  .score-number {
    font-size: clamp(5.2rem, 24vw, 7rem);
  }

  .result-stats {
    margin-top: 21px;
  }

  .podium {
    gap: 4px;
  }

  .podium__avatar {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  .podium__item--first .podium__avatar {
    width: 64px;
    height: 64px;
    font-size: 27px;
  }

  .podium__name {
    font-size: 11.5px;
  }

  .podium__score {
    font-size: 10px;
  }

  .board-row {
    grid-template-columns: 29px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 13px 13px;
  }

  .board-rank {
    font-size: 17px;
  }

  .board-score strong {
    font-size: 20px;
  }

  .quiz-page__top-meta {
    display: none;
  }

  .modal__title {
    font-size: 22px;
  }

  .score-unit {
    font-size: 11px;
  }

  .result-title {
    font-size: 26px;
  }
}

@media (max-width: 720px) {
  .lantern__rope {
    height: 70px;
  }

  .lantern__tassel {
    height: 22px;
  }

  body[data-view="quiz"] .app,
  body[data-view="play"] .app,
  body[data-view="result"] .app,
  body[data-view="rank"] .app,
  body[data-view="editor"] .app {
    padding-top: calc(clamp(22px, 4.5vw, 56px) + 84px);
  }

  .wizard-page {
    padding-bottom: calc(118px + env(safe-area-inset-bottom));
  }

  .wizard-actions {
    position: fixed;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 12px;
    z-index: 45;
    flex-direction: row;
    justify-content: space-between;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid rgba(248, 214, 168, 0.18);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(32, 5, 4, 0.82), rgba(24, 4, 3, 0.98));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
  }

  .wizard-actions .btn {
    width: auto;
    min-width: 0;
  }

  .wizard-actions #wizard-prev {
    flex: 0 0 34%;
  }

  .wizard-actions #wizard-next {
    flex: 1;
    margin-left: 8px;
  }
}

@media (max-width: 520px) {
  .name-step {
    padding: 22px 16px 24px;
  }

  .name-step h1 {
    font-size: 28px;
  }

  .name-step > p:not(.name-step__error):not(.name-step__hint) {
    margin-bottom: 14px;
    font-size: 11.5px;
  }

  .name-step__field input {
    height: 50px;
  }

  .name-step .btn {
    min-height: 48px;
  }

  .wizard-head {
    margin-bottom: 14px;
  }

  .wizard-head h1 {
    font-size: 28px;
  }

  .wizard-question-title {
    font-size: 22px;
  }

  .wizard-progress {
    margin-bottom: 14px;
  }

  .question-card {
    padding-top: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .snow,
  .stars,
  .shooting-star,
  .bokeh,
  .scene__embers,
  .pointer-glow,
  .fx-canvas {
    display: none;
  }

  .hero-reveal,
  .options .option {
    animation-delay: 0ms !important;
  }

  .music-toggle__bars i {
    animation: none !important;
    height: 8px;
  }
}

