:root {
  --shell: #efe8d8;
  --bg-2: #e6dcc6;
  --card: #fbf8ef;
  --card-2: #efe7d4;
  --line: #d7cbb0;
  --ink: #2d3442;
  --ink-soft: #6e7384;
  --amber: #f7941d;
  --amber-deep: #cc6f06;
  --teal: #1f9e90;
  --teal-deep: #137a6d;
  --gold: #f2b733;
  --red: #e0463c;
  --good: #2f9e5b;
  --font-pixel: ui-monospace, "DejaVu Sans Mono", "Courier New", monospace;
  --font-cjk: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  --notch: polygon(0 6px, 6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px));
  --heart: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 6'%3E%3Cg fill='%23000'%3E%3Crect x='1' width='2' height='1'/%3E%3Crect x='4' width='2' height='1'/%3E%3Crect y='1' width='7' height='1'/%3E%3Crect y='2' width='7' height='1'/%3E%3Crect x='1' y='3' width='5' height='1'/%3E%3Crect x='2' y='4' width='3' height='1'/%3E%3Crect x='3' y='5' width='1' height='1'/%3E%3C/g%3E%3C/svg%3E");
  font-family: var(--font-cjk);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg-2);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
}

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

.px {
  font-family: var(--font-pixel);
  font-weight: 700;
  letter-spacing: 1px;
}

/* 切角像素面板：街机/8-bit 标志性轮廓 */
.mode-btn,
.arcade-btn,
.crt,
.crt-screen,
.grade-badge,
.scoreboard,
.hud,
.feedback,
.score-chip,
.search-field,
.answer-option,
.reveal-item {
  clip-path: var(--notch);
}

.phone-shell {
  position: relative;
  width: min(100vw, 440px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(150% 50% at 50% -6%, rgba(247, 148, 29, 0.16), transparent 60%),
    repeating-linear-gradient(0deg, rgba(45, 52, 66, 0.03) 0 1px, transparent 1px 8px),
    repeating-linear-gradient(90deg, rgba(45, 52, 66, 0.03) 0 1px, transparent 1px 8px),
    var(--shell);
}

.app-main,
.screen {
  position: relative;
  z-index: 1;
}

.screen {
  display: none;
  height: 100dvh;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  padding: max(18px, env(safe-area-inset-top)) 16px max(14px, env(safe-area-inset-bottom));
}

.screen.is-active {
  display: flex;
  animation: screen-in 200ms steps(3, end);
}

@keyframes screen-in {
  from {
    opacity: 0;
  }
}

.is-hidden {
  display: none !important;
}

/* ---------------- 首页 ---------------- */

.home-screen {
  position: relative;
  padding: 0;
  gap: 0;
  overflow: hidden;
}

.home-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.home-veil {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(239, 232, 216, 0.82) 0%,
    rgba(239, 232, 216, 0.52) 24%,
    rgba(239, 232, 216, 0.52) 44%,
    rgba(239, 232, 216, 0.86) 66%,
    var(--shell) 100%
  );
}

.home-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: max(22px, env(safe-area-inset-top)) 18px max(16px, env(safe-area-inset-bottom));
}

.menu {
  margin-top: auto;
  display: grid;
  gap: 12px;
}

.play-btn {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 14px;
  text-align: left;
  border: 2px solid var(--ink);
  clip-path: var(--notch);
  transition: transform 60ms steps(2), filter 60ms steps(2);
}

.play-main {
  padding: 18px;
  color: #34230a;
  background: var(--amber);
  filter: drop-shadow(0 7px 0 var(--amber-deep)) drop-shadow(0 9px 0 rgba(45, 52, 66, 0.16));
}

.play-sub {
  padding: 14px 18px;
  color: var(--ink);
  background: var(--card);
  filter: drop-shadow(0 6px 0 var(--ink));
}

.play-main:active {
  transform: translateY(6px);
  filter: drop-shadow(0 1px 0 var(--amber-deep));
}

.play-sub:active {
  transform: translateY(5px);
  filter: drop-shadow(0 1px 0 var(--ink));
}

.play-btn.is-disabled {
  opacity: 0.5;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  background: var(--ink);
  clip-path: var(--hex);
}

.play-sub .play-icon {
  background: var(--teal);
}

.play-copy strong {
  display: block;
  font-weight: 900;
  letter-spacing: 1px;
}

.play-main .play-copy strong {
  font-size: 26px;
}

.play-sub .play-copy strong {
  font-size: 20px;
}

.play-copy small {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 700;
}

.play-main .play-copy small {
  color: #80500c;
}

.play-sub .play-copy small {
  color: var(--ink-soft);
}

.profile-hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
  background: var(--card);
  border: 2px solid var(--ink);
  clip-path: var(--notch);
}

.profile-hud div {
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 10px 6px;
  border-right: 2px solid var(--line);
  text-align: center;
}

.profile-hud div:last-child {
  border-right: 0;
}

.profile-hud span {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}

.profile-hud strong {
  font-size: 19px;
  color: var(--ink);
}

.skin-stream {
  position: absolute;
  inset: -20px;
  display: flex;
  gap: 10px;
  padding: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 0.78;
  filter: blur(3px) saturate(0.78) sepia(0.22) brightness(1.04);
  -webkit-mask: linear-gradient(180deg, transparent, #000 7%, #000 66%, transparent);
  mask: linear-gradient(180deg, transparent, #000 7%, #000 66%, transparent);
}

.stream-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: stream-up 46s linear infinite;
  will-change: transform;
}

.stream-col-alt {
  animation-duration: 62s;
  animation-direction: reverse;
}

.stream-col img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

@keyframes stream-up {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-50%);
  }
}

.marquee {
  padding: 6px 0 0;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.hex-emblem {
  width: 26px;
  height: 28px;
  background: var(--amber);
  clip-path: var(--hex);
  position: relative;
}

.hex-emblem::after {
  content: "";
  position: absolute;
  inset: 6px;
  background: var(--shell);
  clip-path: var(--hex);
}

.brand-code {
  font-size: 8.5px;
  color: var(--amber-deep);
  letter-spacing: 1.5px;
}

.logo {
  font-family: var(--font-cjk);
  font-size: 62px;
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: 2px;
  color: var(--ink);
  text-shadow: 2px 2px 0 var(--amber), 4px 4px 0 var(--amber-deep);
}

.subtitle {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.title-rule {
  margin-top: 12px;
  width: 132px;
  height: 5px;
  background: linear-gradient(90deg, var(--amber) 0 46%, var(--teal) 46% 64%, var(--ink) 64% 100%);
}

.mode-list {
  display: grid;
  gap: 14px;
}

.mode-btn {
  position: relative;
  display: grid;
  grid-template-columns: 50px 1fr 22px;
  align-items: center;
  gap: 14px;
  padding: 16px 14px;
  text-align: left;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  filter: drop-shadow(5px 5px 0 var(--amber-deep));
  transition: transform 60ms steps(2), filter 60ms steps(2);
}

.mode-1 {
  background: #fff7ec;
}

.mode-2 {
  background: #edf9f6;
  filter: drop-shadow(5px 5px 0 var(--teal-deep));
}

.mode-btn:active {
  transform: translate(4px, 4px);
  filter: drop-shadow(1px 1px 0 var(--amber-deep));
}

.mode-2:active {
  filter: drop-shadow(1px 1px 0 var(--teal-deep));
}

.mode-btn.is-disabled {
  opacity: 0.45;
}

.mode-no {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  font-size: 15px;
  color: #fff;
  background: var(--amber);
  clip-path: var(--hex);
}

.mode-2 .mode-no {
  background: var(--teal);
}

.mode-copy strong {
  display: block;
  margin-bottom: 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
}

.mode-copy small {
  color: var(--ink-soft);
  font-size: 12.5px;
  font-weight: 700;
}

.mode-arrow {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: #fff;
  background: var(--amber);
  font-size: 13px;
  font-weight: 900;
}

.mode-2 .mode-arrow {
  background: var(--teal);
}

.scoreboard {
  border: 2px solid var(--ink);
  background: var(--card);
}

.sb-title {
  display: block;
  padding: 7px 10px;
  font-size: 9px;
  letter-spacing: 2px;
  color: #fff;
  background: var(--amber);
}

.sb-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.sb-row div {
  display: grid;
  gap: 7px;
  justify-items: center;
  padding: 12px 8px;
  border-right: 2px solid var(--line);
  text-align: center;
}

.sb-row div:last-child {
  border-right: 0;
}

.sb-row span {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}

.sb-row strong {
  font-size: 20px;
  color: var(--ink);
}

.home-foot {
  margin-top: 9px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}

/* 玩法说明按钮 + 引导卡 */
.help-btn {
  position: absolute;
  top: 2px;
  right: 0;
  z-index: 3;
  width: 34px;
  height: 36px;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--ink);
  clip-path: var(--hex);
  font-size: 16px;
  font-weight: 900;
}

.tutorial {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(45, 52, 66, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.tutorial[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.tut-card {
  display: flex;
  width: 100%;
  max-width: 360px;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 18px;
  text-align: center;
  background: var(--card);
  border: 2px solid var(--ink);
  clip-path: var(--notch);
  filter: drop-shadow(0 7px 0 var(--amber-deep));
}

.tut-kicker {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--amber-deep);
}

.tut-card h2 {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 2px;
}

.tut-desc {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.6;
  color: var(--ink);
}

.tut-demo {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  width: 100%;
}

.tut-demo figure {
  margin: 0;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--line);
}

.tut-demo img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: contain;
  background: #fff;
}

.tut-demo figcaption {
  display: grid;
  gap: 1px;
  padding: 4px 2px;
  text-align: center;
  background: var(--card-2);
}

.tut-demo figcaption b {
  font-size: 10px;
  font-weight: 900;
  color: var(--ink);
}

.tut-demo figcaption i {
  font-style: normal;
  font-size: 9px;
  color: var(--amber-deep);
}

.tut-answer {
  font-size: 13px;
  font-weight: 900;
  color: var(--amber-deep);
}

.tut-how {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink-soft);
}

.tut-card .arcade-btn {
  width: 100%;
  margin-top: 4px;
}

/* ---------------- 对局 ---------------- */

.game-screen {
  gap: 10px;
}

.game-top {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
}

.hex-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 46px;
  color: #fff;
  background: var(--ink);
  clip-path: var(--hex);
}

.hex-btn span {
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
}

.gt-title {
  min-width: 0;
}

.gt-title h2 {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 1px;
}

.gt-title span {
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
}

.score-chip {
  display: grid;
  justify-items: center;
  gap: 3px;
  min-width: 80px;
  padding: 7px 12px;
  color: #fff;
  background: var(--amber);
  border: 2px solid var(--ink);
}

.score-chip span {
  font-size: 10px;
  font-weight: 800;
}

.score-chip strong {
  font-size: 17px;
}

.hud {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 2px solid var(--ink);
  background: var(--card);
}

.hud-cell {
  display: grid;
  gap: 8px;
  justify-items: center;
  align-content: center;
  min-height: 54px;
  padding: 8px;
  border-right: 2px solid var(--line);
  text-align: center;
}

.hud-cell:last-child {
  border-right: 0;
}

.hud-cell span {
  font-size: 10.5px;
  font-weight: 800;
  color: var(--ink-soft);
}

.hud-cell strong {
  font-size: 16px;
  color: var(--teal-deep);
}

.life-pips {
  display: flex;
  gap: 5px;
  min-height: 14px;
  align-items: center;
}

.pip {
  width: 14px;
  height: 12px;
  background: var(--red);
  -webkit-mask: var(--heart) no-repeat center / contain;
  mask: var(--heart) no-repeat center / contain;
}

.pip:not(.is-on) {
  background: #cbbfa4;
}

.crt {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  flex-direction: column;
  gap: 7px;
  padding: 8px;
  background: var(--card);
  border: 2px solid var(--ink);
  filter: drop-shadow(5px 5px 0 var(--amber-deep));
}

.crt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stage-name {
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--amber-deep);
}

.stage-counter {
  font-size: 10px;
  color: var(--ink-soft);
}

.crt-screen {
  position: relative;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.crt-screen img {
  position: absolute;
  top: 5px;
  left: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  object-fit: contain;
}

.crt-screen img.flash {
  animation: art-in 280ms steps(5, end);
}

@keyframes art-in {
  from {
    opacity: 0;
    transform: scale(1.06);
  }
}

.crt-glass {
  display: none;
}

.crt-screen::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -42%;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.16), transparent);
  animation: crt-scan 3.4s linear infinite;
}

@keyframes crt-scan {
  0% {
    top: -42%;
  }
  100% {
    top: 100%;
  }
}

.stage-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.stage-step {
  display: grid;
  gap: 3px;
  justify-items: center;
  padding: 6px 3px;
  background: var(--card-2);
  border: 2px solid var(--line);
  color: var(--ink-soft);
}

.stage-step i {
  font-style: normal;
  font-family: var(--font-pixel);
  font-size: 8px;
}

.stage-step b {
  font-size: 11px;
  font-weight: 900;
}

.stage-step.is-passed {
  color: var(--teal-deep);
  border-color: var(--teal);
}

.stage-step.is-active {
  color: #fff;
  background: var(--amber);
  border-color: var(--ink);
}

.feedback {
  display: grid;
  place-items: center;
  min-height: 44px;
  padding: 8px 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--line);
}

.feedback[data-type="good"] {
  color: #fff;
  background: var(--good);
  border-color: var(--ink);
}

.feedback[data-type="bad"] {
  color: #fff;
  background: var(--red);
  border-color: var(--ink);
}

/* 动效 */
.feedback.in {
  animation: feed-in 240ms ease;
}

@keyframes feed-in {
  from {
    opacity: 0.15;
    transform: translateY(5px);
  }
}

.pop {
  animation: pop 320ms cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

@keyframes pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.3);
  }
  100% {
    transform: scale(1);
  }
}

.shake {
  animation: shake 340ms ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-3px);
  }
  40% {
    transform: translateX(3px);
  }
  60% {
    transform: translateX(-2px);
  }
  80% {
    transform: translateX(2px);
  }
}

.drop {
  animation: drop-flash 380ms ease;
}

@keyframes drop-flash {
  0% {
    transform: translateY(-3px);
    color: var(--red);
  }
  100% {
    transform: translateY(0);
  }
}

.stage-step.is-active {
  animation: step-pulse 1.6s ease-in-out infinite;
}

@keyframes step-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(247, 148, 29, 0));
  }
  50% {
    filter: drop-shadow(0 0 5px rgba(247, 148, 29, 0.7));
  }
}

/* 动作按钮 */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.actions.two {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
}

.arcade-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 14px;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
  white-space: nowrap;
  border: 2px solid var(--ink);
  transition: transform 60ms steps(2), filter 60ms steps(2);
}

.arcade-btn.primary {
  color: #fff;
  background: var(--amber);
  filter: drop-shadow(0 6px 0 var(--amber-deep));
}

.arcade-btn.secondary {
  color: var(--ink);
  background: var(--card);
  filter: drop-shadow(0 6px 0 var(--ink));
}

.arcade-btn.quiet {
  color: var(--ink-soft);
  background: transparent;
  border-color: var(--line);
}

.arcade-btn.primary:active {
  transform: translateY(5px);
  filter: drop-shadow(0 1px 0 var(--amber-deep));
}

.arcade-btn.secondary:active {
  transform: translateY(5px);
  filter: drop-shadow(0 1px 0 var(--ink));
}

.arcade-btn.quiet:active {
  transform: translate(2px, 2px);
}

.arcade-btn:disabled {
  opacity: 0.4;
}

.actions #guessButton {
  flex: 1 0 100%;
}

.actions #revealButton,
.actions #skipButton {
  flex: 1 1 0;
}

/* ---------------- 单题结算 ---------------- */

.round-screen,
.summary-screen {
  justify-content: center;
  gap: 18px;
  overflow-y: auto;
}

.result-head,
.summary-head {
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.kicker {
  padding: 7px 16px;
  font-size: 11px;
  letter-spacing: 2px;
  color: #fff;
  background: var(--amber);
}

.round-screen[data-result="good"] .kicker {
  background: var(--good);
}

.round-screen[data-result="miss"] .kicker {
  background: var(--red);
}

.result-head h2,
.summary-head h2 {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.1;
  overflow-wrap: anywhere;
}

.result-head p {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-soft);
}

.reveal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.reveal-item {
  overflow: hidden;
  background: var(--card);
  border: 2px solid var(--ink);
}

.reveal-item img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--card-2);
}

.reveal-item.is-hidden-stage img {
  opacity: 0.32;
}

.reveal-item figcaption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px;
  border-top: 2px solid var(--line);
}

.reveal-item figcaption i {
  font-style: normal;
  font-family: var(--font-pixel);
  font-size: 8px;
  color: var(--ink-soft);
}

.reveal-item figcaption b {
  font-size: 12.5px;
  font-weight: 900;
  color: var(--ink);
}

/* ---------------- 总结算 ---------------- */

.summary-head {
  gap: 8px;
}

.newrec {
  padding: 5px 14px;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--ink);
  background: var(--gold);
}

.rank-wrap {
  display: grid;
  justify-items: center;
  gap: 6px;
}

.rank-label {
  font-size: 10px;
  letter-spacing: 3px;
  color: var(--ink-soft);
}

.grade-badge {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  font-size: 54px;
  color: #fff;
  background: var(--ink);
  border: 2px solid var(--ink);
  filter: drop-shadow(6px 6px 0 var(--amber-deep));
}

.grade-badge.flash {
  animation: grade-pop 260ms steps(5, end);
}

@keyframes grade-pop {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
}

.grade-badge[data-grade="S"] {
  color: var(--ink);
  background: var(--gold);
}

.grade-badge[data-grade="A"] {
  background: var(--amber);
  filter: drop-shadow(6px 6px 0 var(--teal-deep));
}

.grade-badge[data-grade="B"] {
  background: var(--teal);
}

.grade-badge[data-grade="C"] {
  color: var(--ink-soft);
  background: var(--card);
}

.summary-head h2 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--ink-soft);
}

.summary-score {
  font-size: 44px;
  color: var(--ink);
}

.summary-board {
  width: 100%;
}

/* ---------------- 答案面板 ---------------- */

.sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(45, 52, 66, 0.5);
}

.answer-sheet {
  position: absolute;
  z-index: 51;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: max(16px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
  background: var(--shell);
  transform: translateY(100%);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  pointer-events: none;
  visibility: hidden;
}

.answer-sheet[aria-hidden="false"] {
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sheet-kicker {
  font-size: 9px;
  letter-spacing: 2px;
  color: var(--amber-deep);
}

.sheet-head h2 {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 1px;
}

.search-field {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  min-height: 48px;
  padding: 0 12px;
  background: var(--card);
  border: 2px solid var(--ink);
}

.search-field span {
  font-size: 12px;
  color: var(--amber-deep);
}

.search-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-weight: 700;
}

.search-field input::placeholder {
  color: var(--ink-soft);
}

.answer-results {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-auto-rows: max-content;
  gap: 8px;
  overflow: auto;
  padding-right: 2px;
  -webkit-overflow-scrolling: touch;
}

.answer-option {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  text-align: left;
  color: var(--ink);
  background: var(--card);
  border: 2px solid var(--line);
}

.answer-go {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: #fff;
  background: var(--teal);
  font-size: 15px;
  font-weight: 900;
}

.answer-option:active {
  border-color: var(--amber);
}

.answer-thumb {
  width: 50px;
  height: 50px;
  object-fit: cover;
  background: var(--card-2);
  border: 1px solid var(--line);
}

.answer-text {
  min-width: 0;
}

.answer-option strong {
  display: block;
  overflow: hidden;
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.answer-option small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-soft);
}

.empty-result {
  display: grid;
  place-items: center;
  min-height: 90px;
  font-weight: 800;
  color: var(--ink-soft);
}

.search-hint {
  display: grid;
  place-items: center;
  min-height: 140px;
  padding: 0 16px;
  text-align: center;
  line-height: 1.9;
  font-weight: 700;
  color: var(--ink-soft);
}

/* ---------------- 自适应 ---------------- */

@media (max-width: 360px) {
  .logo {
    font-size: 52px;
  }
  .arcade-btn {
    font-size: 15px;
  }
  .brand-code {
    font-size: 7.5px;
  }
}

@media (min-width: 540px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 16px;
  }
  .phone-shell {
    width: auto;
    height: min(calc(100dvh - 40px), 860px);
    aspect-ratio: 9 / 18;
    max-width: calc(100vw - 32px);
    min-height: 0;
    margin: 0;
    border: 2px solid var(--ink);
    border-radius: 22px;
  }
  .app-main {
    height: 100%;
    min-height: 0;
  }
  .screen {
    height: 100%;
    min-height: 0;
  }
}
