:root {
  color-scheme: dark;
  --ink: #fff4db;
  --muted: #c7bbd0;
  --primary: #efc56e;
  --primary-deep: #d8953d;
  --primary-soft: rgba(239, 197, 110, 0.13);
  --ice: #73dcff;
  --ice-soft: rgba(115, 220, 255, 0.12);
  --wine: #7b2049;
  --surface: rgba(56, 27, 65, 0.66);
  --surface-deep: rgba(26, 15, 43, 0.84);
  --border: rgba(244, 204, 124, 0.19);
  --card: rgba(15, 10, 33, 0.91);
  --correct: #73d9ad;
  --correct-soft: rgba(55, 175, 129, 0.16);
  --homophone: #f1b84c;
  --homophone-soft: rgba(220, 151, 35, 0.17);
  --wrong: #ff7486;
  --wrong-soft: rgba(220, 72, 96, 0.17);
  --shadow: 0 30px 90px rgba(4, 3, 15, 0.56), 0 5px 24px rgba(4, 3, 15, 0.35);
  --mobile-hero-height: clamp(330px, 42svh, 440px);
  font-family:
    "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: #0b0717;
}

body {
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  overflow-x: hidden;
  background:
    radial-gradient(circle at 78% 18%, rgba(113, 30, 75, 0.2), transparent 34%),
    #0b0717;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
}

.background {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: #0b0717;
}

.background::before {
  position: absolute;
  inset: 0;
  content: "";
  background-image: url("./assets/theme/anniversary-background-desktop.327f1f7656.webp");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: 100% auto;
  -webkit-mask-image: linear-gradient(180deg, #000 0 42%, rgba(0, 0, 0, 0.92) 50%, transparent 68%);
  mask-image: linear-gradient(180deg, #000 0 42%, rgba(0, 0, 0, 0.92) 50%, transparent 68%);
}

.background::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 3, 15, 0.01) 0 48%, rgba(8, 5, 20, 0.17) 68%, rgba(7, 4, 18, 0.46) 100%),
    linear-gradient(180deg, transparent 0 38%, rgba(11, 7, 23, 0.48) 49%, #0b0717 58%, #0b0717 100%);
}

.scene-logo {
  position: fixed;
  top: clamp(28px, 4vw, 58px);
  left: clamp(30px, 4vw, 66px);
  z-index: 1;
  display: block;
  width: min(15vw, 220px);
  height: auto;
  border: 1px solid rgba(244, 204, 124, 0.15);
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(4, 2, 14, 0.42);
}

.desktop-atmosphere {
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 1;
  width: min(70vw, 1260px);
  height: 59vh;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 17% 74%, rgba(124, 24, 64, 0.27), transparent 48%),
    radial-gradient(ellipse at 52% 3%, rgba(80, 196, 235, 0.1), transparent 34%),
    linear-gradient(132deg, transparent 25%, rgba(128, 31, 70, 0.09) 45%, transparent 61%);
  -webkit-mask-image: linear-gradient(90deg, #000 0 72%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0 72%, transparent 100%);
}

.desktop-atmosphere::before,
.desktop-atmosphere::after {
  position: absolute;
  inset: 0;
  content: "";
}

.desktop-atmosphere::before {
  opacity: 0.68;
  background:
    radial-gradient(circle at 6% 26%, rgba(255, 215, 132, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle at 13% 58%, rgba(255, 202, 105, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 21% 17%, rgba(255, 225, 160, 0.72) 0 1px, transparent 2px),
    radial-gradient(circle at 28% 76%, rgba(255, 198, 100, 0.66) 0 1px, transparent 2px),
    radial-gradient(circle at 36% 40%, rgba(255, 222, 148, 0.8) 0 1px, transparent 2px),
    radial-gradient(circle at 45% 63%, rgba(255, 196, 91, 0.58) 0 1px, transparent 2px),
    radial-gradient(circle at 54% 22%, rgba(122, 222, 255, 0.7) 0 1px, transparent 2px),
    radial-gradient(circle at 60% 78%, rgba(255, 213, 126, 0.56) 0 1px, transparent 2px);
  filter: drop-shadow(0 0 5px rgba(255, 191, 84, 0.58));
}

.desktop-atmosphere::after {
  opacity: 0.62;
  background:
    linear-gradient(128deg, transparent 0 27%, rgba(149, 42, 80, 0.12) 27.5%, transparent 30%),
    linear-gradient(139deg, transparent 0 44%, rgba(95, 190, 224, 0.07) 44.4%, transparent 47%),
    linear-gradient(151deg, transparent 0 60%, rgba(149, 42, 80, 0.09) 60.5%, transparent 63%);
  filter: blur(0.7px);
}

.desktop-signature {
  position: fixed;
  bottom: clamp(66px, 9vh, 108px);
  left: clamp(62px, 6vw, 118px);
  z-index: 1;
  display: grid;
  width: min(38vw, 470px);
  gap: 8px;
  pointer-events: none;
  text-shadow: 0 4px 22px rgba(3, 2, 12, 0.75);
}

.desktop-signature::before {
  width: min(190px, 42%);
  height: 1px;
  margin-bottom: 4px;
  background: linear-gradient(90deg, rgba(239, 197, 110, 0.72), transparent);
  content: "";
}

.signature-kicker {
  color: rgba(239, 197, 110, 0.78);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.4em;
}

.desktop-signature strong {
  color: rgba(255, 239, 207, 0.34);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(25px, 2.35vw, 38px);
  font-weight: 500;
  letter-spacing: 0.1em;
}

.signature-meta {
  color: rgba(198, 184, 206, 0.52);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.25em;
}

.app-shell {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: calc(100vh - 44px);
  min-height: calc(100svh - 44px);
  align-items: center;
  justify-content: flex-end;
  padding: clamp(22px, 4vw, 64px);
}

.site-icp-footer {
  position: relative;
  z-index: 2;
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 8px 18px calc(12px + env(safe-area-inset-bottom));
  color: rgba(211, 199, 219, 0.68);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.site-icp-footer a {
  color: inherit;
  text-decoration: none;
}

.site-icp-footer a:hover,
.site-icp-footer a:focus-visible {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.game-card {
  position: relative;
  width: min(100%, 510px);
  min-height: 620px;
  padding: 28px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 30px;
  background:
    radial-gradient(circle at 78% 0, rgba(123, 32, 73, 0.24), transparent 32%),
    linear-gradient(155deg, rgba(29, 16, 48, 0.96), var(--card));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.12);
  -webkit-backdrop-filter: blur(24px) saturate(1.12);
  animation: card-in 380ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.game-card::before {
  position: absolute;
  inset: 0 22px auto;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 224, 160, 0.58), transparent);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

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

.header-copy {
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(244, 204, 124, 0.23);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(239, 197, 110, 0.18), rgba(115, 220, 255, 0.1));
  box-shadow: inset 0 1px 0 rgba(255, 237, 199, 0.16);
  font-size: 22px;
}

.card-logo {
  display: none;
  width: 108px;
  height: auto;
  flex: 0 0 auto;
  border: 1px solid rgba(244, 204, 124, 0.15);
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(3, 2, 11, 0.3);
}

.eyebrow,
.mini-title {
  margin: 0;
}

.eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.mini-title {
  margin-top: 4px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 850;
}

.project-credit {
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
  margin-left: auto;
  color: #a99eb4;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
  text-align: right;
}

.start-content {
  padding-top: 30px;
}

.soft-badge,
.word-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(239, 197, 110, 0.22);
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary-soft), var(--ice-soft));
  color: #f5cf81;
  font-size: 13px;
  font-weight: 800;
}

.soft-badge {
  padding: 8px 12px;
}

h1,
h2,
p {
  overflow-wrap: anywhere;
}

.start-content h1 {
  margin: 20px 0 14px;
  color: var(--ink);
  font-size: clamp(32px, 7vw, 46px);
  line-height: 1.18;
  letter-spacing: -0.035em;
}

.start-content h1 span {
  background: linear-gradient(90deg, #ffe1a1, var(--primary), var(--ice));
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.lead {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.mode-grid {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.mode-button {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  width: 100%;
  min-height: 76px;
  align-items: center;
  gap: 14px;
  padding: 12px 18px 12px 12px;
  border: 1px solid var(--border);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(68, 31, 70, 0.69), rgba(31, 19, 49, 0.76));
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.mode-button:hover,
.mode-button:focus-visible {
  z-index: 1;
  border-color: rgba(244, 204, 124, 0.52);
  box-shadow: 0 12px 30px rgba(5, 3, 15, 0.32), 0 0 0 3px rgba(239, 197, 110, 0.08);
  transform: translateY(-2px);
  outline: none;
}

.mode-button--primary {
  border-color: rgba(255, 224, 158, 0.52);
  background: linear-gradient(135deg, #f2d184, #d9953d);
  color: #2b1530;
  box-shadow: 0 14px 30px rgba(190, 118, 42, 0.22);
}

.mode-number {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: rgba(239, 197, 110, 0.11);
  color: var(--primary);
  font-size: 19px;
  font-weight: 900;
}

.mode-button--primary .mode-number {
  background: rgba(52, 23, 42, 0.13);
  color: #371b32;
}

.mode-copy {
  display: grid;
  gap: 4px;
}

.mode-copy strong {
  font-size: 16px;
}

.mode-copy small {
  color: var(--muted);
  font-size: 12px;
}

.mode-button--primary .mode-copy small {
  color: rgba(48, 22, 45, 0.68);
}

.button-arrow {
  font-size: 22px;
}

.start-note {
  margin: 20px 0 0;
  color: #a99eb4;
  font-size: 12px;
  text-align: center;
}

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
}

.status-row > div:first-child {
  display: grid;
  gap: 4px;
}

.status-row strong {
  font-size: 15px;
}

.status-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.score-pill {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid rgba(239, 197, 110, 0.16);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

.score-pill span {
  font-size: 11px;
}

.score-pill strong {
  font-size: 18px;
}

.progress-track {
  height: 6px;
  margin-top: 13px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.09);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary-deep), var(--primary), var(--ice));
  box-shadow: 0 0 16px rgba(115, 220, 255, 0.26);
  transition: width 280ms ease;
}

.question-content,
.reveal-content,
.summary-content {
  text-align: center;
}

.question-content {
  padding-top: 34px;
}

.question-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.emoji-clue {
  display: grid;
  min-height: 132px;
  margin: 18px 0;
  place-items: center;
  border: 1px solid rgba(244, 204, 124, 0.17);
  border-radius: 26px;
  background:
    radial-gradient(circle at 32% 22%, rgba(115, 220, 255, 0.09), transparent 36%),
    linear-gradient(145deg, rgba(75, 31, 73, 0.76), rgba(25, 17, 44, 0.86));
  box-shadow: inset 0 1px 0 rgba(255, 233, 184, 0.1), 0 14px 30px rgba(4, 2, 13, 0.24);
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: clamp(42px, 10vw, 62px);
  letter-spacing: 0.08em;
}

.word-hint {
  padding: 9px 14px;
}

.answer-form {
  margin-top: 32px;
  text-align: left;
}

.answer-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.answer-rule {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: #c9bdcf;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.5;
}

.answer-rule span {
  display: grid;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(239, 197, 110, 0.28);
  border-radius: 50%;
  background: rgba(239, 197, 110, 0.11);
  color: var(--primary);
  font-size: 10px;
  font-weight: 900;
}

.answer-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.answer-row input {
  width: 100%;
  min-width: 0;
  height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(244, 204, 124, 0.2);
  border-radius: 15px;
  background: rgba(17, 11, 33, 0.72);
  color: var(--ink);
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.answer-row input:focus {
  border-color: rgba(115, 220, 255, 0.7);
  box-shadow: 0 0 0 4px rgba(115, 220, 255, 0.11);
}

.answer-row input[aria-invalid="true"] {
  border-color: var(--wrong);
}

.answer-row input::placeholder {
  color: #847990;
}

.primary-button,
.secondary-button {
  min-height: 52px;
  border-radius: 15px;
  cursor: pointer;
  font-weight: 850;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.primary-button {
  padding: 0 20px;
  border: 1px solid rgba(255, 226, 164, 0.45);
  background: linear-gradient(135deg, #f2d184, #d9963e);
  color: #2b1530;
  box-shadow: 0 12px 24px rgba(190, 118, 42, 0.2);
}

.primary-button:hover,
.primary-button:focus-visible,
.secondary-button:hover,
.secondary-button:focus-visible {
  outline: none;
  transform: translateY(-1px);
}

.primary-button:focus-visible,
.secondary-button:focus-visible {
  box-shadow: 0 0 0 4px rgba(115, 220, 255, 0.13);
}

.primary-button:active,
.secondary-button:active,
.mode-button:active {
  transform: translateY(1px);
}

.input-error {
  margin: 8px 3px 0;
  color: var(--wrong);
  font-size: 12px;
  font-weight: 700;
}

.reveal-content {
  padding-top: 20px;
}

.result-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border: 1px solid rgba(115, 217, 173, 0.18);
  border-radius: 999px;
  background: var(--correct-soft);
  color: var(--correct);
  font-size: 13px;
  font-weight: 800;
}

.is-wrong .result-chip {
  border-color: rgba(255, 116, 134, 0.2);
  background: var(--wrong-soft);
  color: var(--wrong);
}

.is-homophone .result-chip {
  border-color: rgba(241, 184, 76, 0.2);
  background: var(--homophone-soft);
  color: var(--homophone);
}

.result-chip span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: #211229;
  font-size: 13px;
  font-weight: 900;
}

.is-correct .result-chip span {
  background: var(--correct);
}

.is-homophone .result-chip span {
  background: var(--homophone);
}

.is-wrong .result-chip span {
  background: var(--wrong);
}

.result-chip > strong {
  margin-left: 2px;
  font-size: 14px;
}

.reveal-hero {
  display: grid;
  justify-items: center;
  margin: 13px 0 12px;
}

.reveal-emoji {
  z-index: 1;
  min-height: 0;
  margin-bottom: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(244, 204, 124, 0.19);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(79, 35, 75, 0.9), rgba(29, 19, 48, 0.92));
  box-shadow: 0 8px 18px rgba(4, 2, 13, 0.24);
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.2;
  letter-spacing: 0;
}

.avatar-frame {
  position: relative;
  width: 152px;
  height: 152px;
  margin: 0 auto;
  padding: 6px;
  border-radius: 40px;
  background: linear-gradient(145deg, #f3d58d, #73304f 45%, #77ddff);
  box-shadow: 0 18px 38px rgba(3, 2, 13, 0.42), 0 0 24px rgba(115, 220, 255, 0.12);
}

.avatar-frame::before {
  position: absolute;
  inset: -5px;
  z-index: -1;
  border-radius: 44px;
  background: linear-gradient(145deg, rgba(244, 204, 124, 0.56), rgba(115, 220, 255, 0.34));
  content: "";
  opacity: 0.62;
}

.avatar-frame img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  border-radius: 34px;
  background: linear-gradient(145deg, #30213f, #160d26);
  color: var(--primary);
  font-size: 48px;
}

.avatar-fallback[hidden] {
  display: none;
}

.answer-label {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.reveal-content h2 {
  margin: 6px 0 8px;
  color: #ffe4a7;
  font-size: 32px;
}

.answer-message {
  min-height: 24px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.answer-message strong {
  color: var(--ink);
}

.is-homophone .answer-message span {
  color: var(--homophone);
  font-size: 12px;
  font-weight: 700;
}

.primary-button--wide {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.summary-content {
  padding-top: 30px;
}

.summary-sparkles {
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 22px;
}

.summary-content h1 {
  margin: 8px 0 20px;
  color: #ffe4a7;
  font-size: 34px;
}

.score-total {
  display: inline-grid;
  min-width: 190px;
  gap: 3px;
  margin: 0 auto;
  padding: 12px 28px 14px;
  border: 1px solid rgba(239, 197, 110, 0.22);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(71, 33, 72, 0.6), rgba(28, 17, 47, 0.78));
  box-shadow: 0 14px 30px rgba(3, 2, 13, 0.24);
}

.score-total > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.score-total-value {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
}

.score-total strong {
  color: #ffe4a7;
  font-size: 48px;
  line-height: 1;
}

.score-total small {
  color: var(--muted);
  font-size: 16px;
  font-weight: 700;
}

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

.metric-card {
  display: grid;
  gap: 3px;
  padding: 10px 5px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: rgba(56, 27, 65, 0.47);
}

.metric-card > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.metric-card > strong {
  color: var(--ink);
  font-size: 20px;
}

.metric-card > small {
  color: #9f93aa;
  font-size: 9px;
}

.metric-card--primary {
  border-color: rgba(239, 197, 110, 0.28);
  background: var(--primary-soft);
}

.metric-card--primary > strong {
  color: var(--primary);
}

.result-counts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 10px;
}

.count-item {
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
}

.count-item--exact {
  background: var(--correct-soft);
  color: var(--correct);
}

.count-item--homophone {
  background: var(--homophone-soft);
  color: var(--homophone);
}

.count-item--wrong {
  background: var(--wrong-soft);
  color: var(--wrong);
}

.summary-message {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.leaderboard-entry-button,
.leaderboard-back-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-weight: 800;
}

.leaderboard-entry-button {
  width: 100%;
  margin-top: 15px;
  padding: 11px 16px;
  border: 1px solid rgba(244, 204, 124, 0.18);
  border-radius: 15px;
  background: rgba(58, 29, 67, 0.36);
}

.leaderboard-entry-button:hover,
.leaderboard-entry-button:focus-visible,
.leaderboard-back-button:hover,
.leaderboard-back-button:focus-visible {
  color: #ffe6ab;
}

.mode-button:disabled,
.leaderboard-entry-button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.start-api-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 116, 134, 0.22);
  border-radius: 13px;
  background: var(--wrong-soft);
  color: #ff9eaa;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
}

.leaderboard-eligibility {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid rgba(115, 220, 255, 0.17);
  border-radius: 14px;
  background: var(--ice-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.leaderboard-eligibility > div {
  display: grid;
  gap: 2px;
}

.leaderboard-eligibility strong {
  color: var(--ink);
  font-size: 12px;
}

.leaderboard-eligibility > div span {
  font-size: 10px;
  line-height: 1.5;
}

.leaderboard-eligibility--zero {
  border-color: rgba(255, 116, 134, 0.2);
  background: var(--wrong-soft);
}

.leaderboard-eligibility--zero strong {
  color: #ff9eaa;
}

.leaderboard-eligibility--saved {
  border-color: rgba(115, 217, 173, 0.2);
  background: var(--correct-soft);
}

.leaderboard-eligibility--saved strong {
  color: var(--correct);
}

.score-submit-panel {
  margin-top: 18px;
  padding: 15px;
  border: 1px solid rgba(239, 197, 110, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(115, 220, 255, 0.08), transparent 38%),
    rgba(48, 25, 61, 0.54);
  text-align: left;
}

.score-submit-heading {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.score-submit-heading > span {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: var(--primary-soft);
}

.score-submit-heading h2 {
  margin: 0;
  color: #ffe4a7;
  font-size: 15px;
}

.score-submit-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.score-loss-warning {
  display: grid;
  gap: 3px;
  margin: 12px 0 0;
  padding: 10px 11px;
  border: 1px solid rgba(241, 184, 76, 0.24);
  border-radius: 12px;
  background: var(--homophone-soft);
  color: #d7c7a4;
  font-size: 10px;
  line-height: 1.55;
}

.score-loss-warning strong {
  color: #ffd77f;
  font-size: 11px;
}

#score-submit-form {
  margin-top: 12px;
}

#score-submit-form > label:first-child {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.nickname-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.nickname-row input {
  width: 100%;
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid rgba(244, 204, 124, 0.18);
  border-radius: 12px;
  outline: none;
  background: rgba(14, 10, 29, 0.72);
  color: var(--ink);
}

.nickname-row input:focus {
  border-color: rgba(115, 220, 255, 0.56);
  box-shadow: 0 0 0 3px rgba(115, 220, 255, 0.1);
}

.nickname-row input:disabled,
.nickname-row button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.nickname-row .primary-button {
  min-width: 96px;
  padding: 10px 14px;
}

.nickname-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  line-height: 1.4;
}

.nickname-confirm input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--primary-deep);
}

.submit-feedback {
  min-height: 17px;
  margin: 7px 0 0;
  color: var(--wrong);
  font-size: 10px;
  font-weight: 700;
}

.summary-actions {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.secondary-button {
  border: 1px solid rgba(244, 204, 124, 0.24);
  background: rgba(58, 29, 67, 0.56);
  color: var(--primary);
}

.game-card--leaderboard {
  min-height: 620px;
}

.leaderboard-content {
  padding-top: 22px;
}

.leaderboard-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.leaderboard-title-row h1 {
  margin: 6px 0 0;
  color: #ffe4a7;
  font-size: 29px;
}

.leaderboard-total {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid rgba(115, 220, 255, 0.18);
  border-radius: 999px;
  background: var(--ice-soft);
  color: var(--ice);
  font-size: 10px;
  font-weight: 800;
}

.leaderboard-notice {
  margin: 15px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(115, 217, 173, 0.2);
  border-radius: 13px;
  background: var(--correct-soft);
  color: var(--correct);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.6;
}

.leaderboard-table-wrap {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(244, 204, 124, 0.15);
  border-radius: 17px;
  background: rgba(18, 12, 34, 0.58);
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.leaderboard-table th,
.leaderboard-table td {
  padding: 11px 8px;
  border-bottom: 1px solid rgba(244, 204, 124, 0.1);
  text-align: left;
}

.leaderboard-table th {
  background: rgba(82, 38, 77, 0.45);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.leaderboard-table th:nth-child(1),
.leaderboard-table td:nth-child(1) {
  width: 55px;
  text-align: center;
}

.leaderboard-table th:nth-child(3),
.leaderboard-table td:nth-child(3) {
  width: 68px;
  text-align: center;
}

.leaderboard-table th:nth-child(4),
.leaderboard-table td:nth-child(4) {
  width: 128px;
}

.leaderboard-table tbody tr:last-child td {
  border-bottom: 0;
}

.leaderboard-table tbody tr {
  transition: background 160ms ease;
}

.leaderboard-table tbody tr:hover {
  background: rgba(115, 220, 255, 0.05);
}

.leaderboard-table tbody tr.is-current-player {
  background: linear-gradient(90deg, rgba(239, 197, 110, 0.13), rgba(115, 220, 255, 0.07));
  box-shadow: inset 3px 0 var(--primary);
}

.rank-number {
  color: var(--primary);
  font-size: 15px;
  font-weight: 900;
}

.rank-nickname {
  display: inline-block;
  max-width: calc(100% - 30px);
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.score-exit-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  overflow-y: auto;
  padding: 24px;
  place-items: center;
  background: rgba(5, 3, 14, 0.76);
  backdrop-filter: blur(6px);
}

.score-exit-dialog {
  width: min(100%, 380px);
  padding: 24px;
  border: 1px solid rgba(241, 184, 76, 0.32);
  border-radius: 20px;
  background:
    radial-gradient(circle at 100% 0, rgba(123, 32, 73, 0.22), transparent 38%),
    #1b102d;
  box-shadow: 0 24px 70px rgba(3, 2, 12, 0.62);
  text-align: center;
}

.score-exit-icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin: 0 auto 12px;
  place-items: center;
  border-radius: 50%;
  background: var(--homophone-soft);
  color: #ffd77f;
  font-size: 22px;
  font-weight: 900;
}

.score-exit-dialog h2 {
  margin: 0;
  color: #ffe4a7;
  font-size: 21px;
}

.score-exit-dialog p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.score-exit-actions {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

.score-exit-actions button {
  min-height: 46px;
  border-radius: 13px;
}

.current-player-tag {
  display: inline-grid;
  width: 21px;
  height: 21px;
  margin-left: 4px;
  place-items: center;
  border-radius: 999px;
  background: var(--primary);
  color: #2b1832;
  font-size: 9px;
  font-weight: 900;
  vertical-align: middle;
}

.leaderboard-table td:nth-child(3) strong {
  color: #ffe4a7;
  font-size: 17px;
}

.leaderboard-table time {
  color: var(--muted);
  font-size: 10px;
}

.leaderboard-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.leaderboard-pagination span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.leaderboard-pagination button {
  min-height: 38px;
  border-radius: 12px;
  cursor: pointer;
}

.leaderboard-pagination button:disabled {
  cursor: default;
  opacity: 0.38;
}

.leaderboard-back-button {
  width: 100%;
  margin-top: 14px;
  padding: 10px;
  font-size: 12px;
}

.leaderboard-loading,
.leaderboard-error,
.leaderboard-empty {
  display: grid;
  min-height: 260px;
  margin-top: 18px;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px solid rgba(244, 204, 124, 0.14);
  border-radius: 17px;
  background: rgba(18, 12, 34, 0.5);
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.leaderboard-loading > span {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(239, 197, 110, 0.18);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: leaderboard-spin 700ms linear infinite;
}

.leaderboard-error > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--wrong-soft);
  color: var(--wrong);
  font-weight: 900;
}

.leaderboard-error p {
  margin: 0;
}

.leaderboard-error .secondary-button {
  padding: 9px 18px;
  border-radius: 11px;
  cursor: pointer;
}

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

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.99);
  }
}

@media (max-width: 1099px) {
  .background::before {
    background-image: url("./assets/theme/anniversary-background-mobile.27e5fe9b1c.webp");
    background-position: top center;
    background-size: auto var(--mobile-hero-height);
    -webkit-mask-image: linear-gradient(
      180deg,
      #000 0,
      #000 calc(var(--mobile-hero-height) - 90px),
      transparent calc(var(--mobile-hero-height) + 34px)
    );
    mask-image: linear-gradient(
      180deg,
      #000 0,
      #000 calc(var(--mobile-hero-height) - 90px),
      transparent calc(var(--mobile-hero-height) + 34px)
    );
  }

  .background::after {
    background: linear-gradient(90deg, rgba(7, 4, 17, 0.08), transparent 42%, rgba(7, 4, 17, 0.1));
  }

  .scene-logo {
    display: none;
  }

  .desktop-atmosphere,
  .desktop-signature {
    display: none;
  }

  .app-shell {
    min-height: calc(100svh - 44px);
    align-items: flex-start;
    justify-content: center;
    padding:
      calc(var(--mobile-hero-height) - 22px)
      12px
      max(18px, env(safe-area-inset-bottom));
  }

  .game-card {
    min-height: 0;
    padding: 22px;
    border-radius: 27px;
  }

  .brand-mark {
    display: none;
  }

  .card-logo {
    display: block;
  }

  .card-header {
    padding-bottom: 17px;
  }

  .start-content {
    padding-top: 24px;
  }

  .question-content {
    padding-top: 26px;
  }

  .emoji-clue {
    min-height: 116px;
    margin: 15px 0;
  }

  .answer-form {
    margin-top: 24px;
  }

  .reveal-content {
    padding-top: 17px;
  }

  .summary-content {
    padding-top: 24px;
  }

  .leaderboard-content {
    padding-top: 20px;
  }
}

@media (max-width: 430px) {
  .game-card {
    padding: 18px;
    border-radius: 24px;
  }

  .card-header,
  .header-brand {
    gap: 9px;
  }

  .card-logo {
    width: 88px;
  }

  .eyebrow {
    display: none;
  }

  .mini-title {
    margin-top: 0;
    font-size: 14px;
  }

  .project-credit {
    font-size: 8px;
  }

  .start-content {
    padding-top: 21px;
  }

  .start-content h1 {
    margin-top: 16px;
    font-size: clamp(30px, 9vw, 38px);
  }

  .mode-grid {
    margin-top: 21px;
  }

  .mode-button {
    grid-template-columns: 48px 1fr auto;
    gap: 11px;
    padding-right: 14px;
  }

  .mode-number {
    width: 48px;
    height: 48px;
  }

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

  .emoji-clue {
    min-height: 108px;
    margin: 13px 0;
  }

  .answer-row {
    grid-template-columns: 1fr;
  }

  .answer-row .primary-button {
    width: 100%;
  }

  .reveal-content {
    padding-top: 15px;
  }

  .avatar-frame {
    width: 132px;
    height: 132px;
  }

  .reveal-hero {
    margin-top: 11px;
  }

  .reveal-emoji {
    padding: 5px 10px;
    font-size: clamp(22px, 7vw, 30px);
  }

  .summary-content {
    padding-top: 21px;
  }

  .nickname-row {
    grid-template-columns: 1fr;
  }

  .nickname-row .primary-button {
    width: 100%;
  }

  .game-card--leaderboard {
    padding-bottom: 20px;
  }

  .leaderboard-table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .leaderboard-table,
  .leaderboard-table tbody {
    display: grid;
    gap: 8px;
  }

  .leaderboard-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    clip-path: inset(50%);
  }

  .leaderboard-table tr {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 68px;
    align-items: center;
    padding: 10px 10px 8px;
    border: 1px solid rgba(244, 204, 124, 0.14);
    border-radius: 14px;
    background: rgba(18, 12, 34, 0.62);
  }

  .leaderboard-table th,
  .leaderboard-table td,
  .leaderboard-table th:nth-child(1),
  .leaderboard-table td:nth-child(1),
  .leaderboard-table th:nth-child(3),
  .leaderboard-table td:nth-child(3),
  .leaderboard-table th:nth-child(4),
  .leaderboard-table td:nth-child(4) {
    width: auto;
    padding: 0;
    border: 0;
  }

  .leaderboard-table td:nth-child(1) {
    grid-row: 1 / 3;
  }

  .leaderboard-table td:nth-child(2) {
    min-width: 0;
  }

  .leaderboard-table td:nth-child(3) {
    grid-row: 1;
    grid-column: 3;
  }

  .leaderboard-table td:nth-child(4) {
    grid-row: 2;
    grid-column: 2 / 4;
    margin-top: 5px;
  }

  .leaderboard-table td:nth-child(4)::before {
    margin-right: 5px;
    color: #8f839a;
    content: "完成时间";
    font-size: 9px;
  }

  .rank-nickname {
    font-size: 16px;
  }

  .leaderboard-table time {
    font-size: 9px;
  }

  .start-note {
    line-height: 1.6;
  }
}

@media (min-width: 1100px) {
  .app-shell {
    padding-right: max(7vw, 76px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
