/* =========================================================
   坨坨大作战 — visual system
   ========================================================= */

:root {
  --paper: #f5efe3;
  --paper-deep: #eadfcd;
  --cream: #fff8e8;
  --white: #fffdf7;
  --ink: #122b25;
  --ink-soft: #49605a;
  --stage: #103a31;
  --stage-deep: #09261f;
  --lime: #d9ff63;
  --yellow: #ffd84d;
  --orange: #ff7042;
  --orange-deep: #c7451d;
  --mint: #88e3c1;
  --red: #e95640;

  --font-body: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --font-display: "Arial Black", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  --target-size: clamp(76px, 12.6vmin, 122px);
  --radius-arena: clamp(22px, 2.3vw, 32px);
}

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

html {
  height: 100%;
  background: var(--paper);
}

body {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-body);
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 7% -4%, rgba(255, 112, 66, 0.2), transparent 25rem),
    radial-gradient(circle at 100% 4%, rgba(217, 255, 99, 0.26), transparent 29rem),
    radial-gradient(circle at 34% 118%, rgba(136, 227, 193, 0.2), transparent 32rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
  background-image: radial-gradient(rgba(18, 43, 37, 0.1) 0.65px, transparent 0.65px);
  background-size: 8px 8px;
  mask-image: linear-gradient(105deg, #000 0%, rgba(0, 0, 0, 0.2) 55%, #000 100%);
}

button {
  font: inherit;
}

svg {
  display: block;
}

.shell {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.2vh, 13px);
  width: 100%;
  height: 100dvh;
  padding:
    max(14px, env(safe-area-inset-top))
    clamp(14px, 2vw, 26px)
    max(10px, env(safe-area-inset-bottom));
}

/* =========================================================
   Top bar
   ========================================================= */

.topbar {
  position: relative;
  z-index: 5;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}

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

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: clamp(46px, 5.2vw, 62px);
  aspect-ratio: 1;
  border: 2px solid var(--ink);
  border-radius: clamp(13px, 1.6vw, 18px);
  color: var(--cream);
  background: var(--orange);
  box-shadow: 0 4px 0 var(--ink);
  font-family: var(--font-display);
  font-size: clamp(23px, 2.7vw, 34px);
  font-weight: 900;
  line-height: 1;
  transform: rotate(-5deg);
  text-shadow: 0 2px 0 rgba(104, 28, 3, 0.22);
}

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

.brand-copy h1 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(23px, 2.65vw, 34px);
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1.06;
  white-space: nowrap;
}

.brand-copy p {
  margin: 4px 0 0;
  color: rgba(18, 43, 37, 0.55);
  font-family: var(--font-mono);
  font-size: clamp(8px, 0.72vw, 10px);
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  white-space: nowrap;
}

.brand-copy p span {
  color: var(--orange);
}

.hud {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.hud-card {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 52px;
  padding: 7px 13px;
  border: 1.5px solid rgba(18, 43, 37, 0.16);
  border-radius: 16px;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: 0 3px 0 rgba(18, 43, 37, 0.09);
}

.hud-label {
  color: rgba(18, 43, 37, 0.48);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.timer-card {
  min-width: 142px;
  justify-content: center;
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: 0 3px 0 rgba(18, 43, 37, 0.3);
}

.timer-card .hud-label {
  color: rgba(255, 248, 232, 0.54);
}

.timer-digits {
  min-width: 5ch;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  text-align: right;
}

.hud-unit {
  color: rgba(255, 248, 232, 0.56);
  font-size: 10px;
  font-weight: 700;
}

.progress-card {
  padding-right: 14px;
}

.progress-count {
  display: flex;
  align-items: baseline;
  color: rgba(18, 43, 37, 0.4);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.progress-count b {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  transition: color 0.2s ease;
}

.progress-count b.is-bumping {
  animation: counter-bump 0.35s cubic-bezier(0.2, 1.6, 0.4, 1);
  color: var(--orange);
}

.progress-dots {
  display: flex;
  gap: 4px;
  margin-left: 3px;
}

.progress-dots i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(18, 43, 37, 0.13);
  box-shadow: inset 0 0 0 1px rgba(18, 43, 37, 0.08);
  transition: transform 0.28s cubic-bezier(0.2, 1.5, 0.4, 1), background 0.2s ease;
}

.progress-dots i.is-hit {
  background: var(--orange);
  box-shadow: 0 0 0 2px rgba(255, 112, 66, 0.16);
  transform: scale(1.14);
}

.icon-btn {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1.5px solid rgba(18, 43, 37, 0.17);
  border-radius: 16px;
  color: var(--ink);
  background: rgba(255, 253, 247, 0.82);
  box-shadow: 0 3px 0 rgba(18, 43, 37, 0.1);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.icon-btn:hover {
  background: var(--white);
  box-shadow: 0 5px 0 rgba(18, 43, 37, 0.11);
  transform: translateY(-2px);
}

.icon-btn:active {
  box-shadow: 0 1px 0 rgba(18, 43, 37, 0.12);
  transform: translateY(2px);
}

.icon-btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

.icon-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.sound-btn .icon-sound-off {
  display: none;
}

.sound-btn[aria-pressed="false"] .icon-sound-on {
  display: none;
}

.sound-btn[aria-pressed="false"] .icon-sound-off {
  display: block;
}

/* =========================================================
   Arena
   ========================================================= */

.arena {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--radius-arena);
  background:
    radial-gradient(ellipse at 84% 9%, rgba(217, 255, 99, 0.14), transparent 37%),
    radial-gradient(ellipse at 13% 94%, rgba(255, 112, 66, 0.13), transparent 35%),
    linear-gradient(145deg, #174c41 0%, #103a31 47%, #092820 100%);
  box-shadow:
    inset 0 0 0 1px rgba(255, 248, 232, 0.13),
    inset 0 -35px 90px rgba(0, 0, 0, 0.12),
    0 18px 45px rgba(18, 43, 37, 0.22);
  touch-action: none;
}

.arena::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image: radial-gradient(rgba(255, 248, 232, 0.32) 0.8px, transparent 0.8px);
  background-size: 23px 23px;
  mask-image: linear-gradient(180deg, #000, transparent 76%);
}

.arena::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 130px rgba(0, 0, 0, 0.19),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.arena.is-impact {
  animation: arena-impact 0.22s ease-out;
}

/* 点中卓卓时的红色闪屏：只动 opacity，走合成层，不重绘整个场地 */
.arena-flash {
  position: absolute;
  inset: 0;
  z-index: 30;
  border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(255, 90, 60, 0) 34%, rgba(255, 90, 60, 0.5) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  will-change: opacity;
}

.arena-flash.is-on {
  opacity: 1;
  transition-duration: 0.05s;
}

.arena-deco {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.chalk-char {
  position: absolute;
  bottom: -20%;
  left: -1%;
  color: transparent;
  font-family: var(--font-display);
  font-size: clamp(220px, 31vw, 440px);
  font-weight: 900;
  line-height: 1;
  -webkit-text-stroke: 1.5px rgba(255, 248, 232, 0.075);
  transform: rotate(-8deg);
  user-select: none;
}

.chalk-word {
  position: absolute;
  top: 11%;
  right: clamp(20px, 3vw, 40px);
  color: rgba(255, 248, 232, 0.13);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.24em;
  line-height: 1;
  writing-mode: vertical-rl;
}

.chalk-ring {
  position: absolute;
  border: 1.5px solid rgba(255, 248, 232, 0.09);
  border-radius: 50%;
}

.ring-one {
  top: 15%;
  right: 8%;
  width: clamp(110px, 15vw, 220px);
  aspect-ratio: 1;
  transform: rotate(9deg);
}

.ring-one::before {
  content: "";
  position: absolute;
  inset: 16%;
  border: 1px dashed rgba(255, 248, 232, 0.09);
  border-radius: 50%;
}

.ring-two {
  bottom: 19%;
  left: 18%;
  width: clamp(48px, 6vw, 88px);
  aspect-ratio: 1;
  border-style: dashed;
}

.chalk-cross {
  position: absolute;
  color: rgba(255, 248, 232, 0.15);
  font-family: var(--font-mono);
  font-size: clamp(20px, 2.2vw, 32px);
  font-weight: 300;
  line-height: 1;
}

.cross-one {
  top: 11%;
  left: 42%;
  transform: rotate(11deg);
}

.cross-two {
  right: 23%;
  bottom: 14%;
  transform: rotate(-7deg);
}

.chalk-swoosh {
  position: absolute;
  right: 11%;
  bottom: 7%;
  width: clamp(100px, 14vw, 210px);
  height: 34px;
  border-top: 2px solid rgba(255, 248, 232, 0.08);
  border-radius: 50%;
  transform: rotate(-4deg);
}

.arena-meta {
  position: absolute;
  top: clamp(15px, 2.2vw, 26px);
  left: clamp(16px, 2.4vw, 30px);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 248, 232, 0.35);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  pointer-events: none;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 248, 232, 0.14);
  border-radius: 999px;
  color: rgba(255, 248, 232, 0.64);
  background: rgba(255, 248, 232, 0.05);
}

.live-pill i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(217, 255, 99, 0.12);
  animation: live-pulse 1.8s ease-in-out infinite;
}

.arena-meta-text {
  opacity: 0.72;
}

/* =========================================================
   Targets
   ========================================================= */

.targets-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.fx-layer {
  position: absolute;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  pointer-events: none;
}

.target {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--target-size);
  height: var(--target-size);
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  cursor: crosshair;
  pointer-events: auto;
  transform-origin: center;
  will-change: transform;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  animation: target-appear 0.42s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.target-inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: clamp(5px, 0.7vmin, 7px);
  border-radius: clamp(17px, 2.2vmin, 24px);
  background: linear-gradient(145deg, #fffdf7 0%, #f1e4d0 100%);
  box-shadow:
    0 5px 0 rgba(4, 18, 15, 0.62),
    0 18px 32px rgba(0, 0, 0, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.18s cubic-bezier(0.2, 1.4, 0.4, 1), box-shadow 0.18s ease;
}

.target-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.34), transparent 28% 78%, rgba(0, 0, 0, 0.05));
}

.target img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: clamp(12px, 1.5vmin, 18px);
  object-fit: cover;
  background: #d8cdbd;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.target-tag {
  position: absolute;
  bottom: -9px;
  left: 50%;
  z-index: 2;
  padding: 2px 8px;
  border: 1.5px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 2px 0 var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(8px, 0.78vmin, 10px);
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.3;
  white-space: nowrap;
  transform: translateX(-50%) rotate(-2deg);
  pointer-events: none;
}

.target-pin {
  position: absolute;
  top: -7px;
  right: -7px;
  z-index: 3;
  display: grid;
  place-items: center;
  width: clamp(19px, 2.3vmin, 24px);
  height: clamp(19px, 2.3vmin, 24px);
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--orange);
  box-shadow: 0 2px 0 var(--ink);
  font-family: var(--font-mono);
  font-size: clamp(8px, 0.9vmin, 10px);
  font-weight: 900;
  line-height: 1;
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .target:hover .target-inner {
    box-shadow:
      0 7px 0 rgba(4, 18, 15, 0.62),
      0 25px 38px rgba(0, 0, 0, 0.32),
      inset 0 0 0 1px rgba(255, 255, 255, 0.86);
    transform: rotate(0deg) scale(1.055);
  }
}

.target:active .target-inner {
  transform: rotate(0deg) scale(0.94);
}

.target:focus-visible .target-inner {
  box-shadow:
    0 0 0 4px var(--lime),
    0 0 0 7px var(--ink),
    0 18px 32px rgba(0, 0, 0, 0.3);
  transform: rotate(0deg) scale(1.04);
}

.target.is-hit {
  pointer-events: none;
}

.target.is-hit .target-inner {
  animation: target-pop 0.28s cubic-bezier(0.3, 0.1, 0.3, 1) forwards;
}

/* 卓卓：会扣分的干扰项，红色描边 + 虚线光环 */
.target.is-zhuozhuo .target-inner {
  background: linear-gradient(145deg, #fff4ef 0%, #ffd6ca 100%);
  box-shadow:
    0 5px 0 rgba(120, 22, 6, 0.6),
    0 18px 32px rgba(255, 90, 60, 0.3),
    inset 0 0 0 1px rgba(255, 255, 255, 0.86);
}

.target.is-zhuozhuo .target-inner::before {
  content: "";
  position: absolute;
  inset: -7px;
  border: 2px dashed rgba(255, 90, 60, 0.8);
  border-radius: inherit;
  animation: zhuozhuo-ring 2.4s linear infinite;
  pointer-events: none;
}

.target.is-zhuozhuo .target-tag {
  color: #fff8f4;
  background: #ff5a3c;
  box-shadow: 0 2px 0 #7c1c0a;
}

.target.is-zhuozhuo .target-pin {
  color: #fff8f4;
  background: #ff5a3c;
  box-shadow: 0 2px 0 #7c1c0a;
  animation: zhuozhuo-pulse 1.1s ease-in-out infinite;
}

.target.is-penalty {
  pointer-events: none;
  animation: penalty-fade 0.36s ease-in forwards;
}

.target.is-penalty .target-inner {
  animation: target-shake 0.36s ease-in-out;
}

.target.is-leaving {
  pointer-events: none;
}

.target.is-leaving .target-inner {
  animation: zhuozhuo-leave 0.4s ease-in forwards;
}

/* =========================================================
   Hint + loading
   ========================================================= */

.hint {
  position: absolute;
  bottom: clamp(16px, 3.4vh, 28px);
  left: 50%;
  z-index: 6;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 8px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  background: var(--cream);
  box-shadow: 0 4px 0 rgba(4, 18, 15, 0.5);
  font-size: clamp(11px, 1.05vw, 13px);
  font-weight: 800;
  letter-spacing: 0.01em;
  line-height: 1.25;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.hint-reticle {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
}

.hint-reticle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: round;
  stroke-width: 1.6;
}

.hint-reticle .hint-dot {
  fill: var(--orange);
  stroke: none;
}

.hint.is-hidden {
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 10px);
}

.loading-screen {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% 38%, rgba(217, 255, 99, 0.08), transparent 30%),
    var(--stage);
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.loading-screen.is-gone {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-mark {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border: 2.5px solid var(--cream);
  border-radius: 25px;
  color: var(--cream);
  background: var(--orange);
  box-shadow: 0 7px 0 rgba(0, 0, 0, 0.28);
  font-family: var(--font-display);
  font-size: 43px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-6deg);
  animation: loading-bob 1.4s ease-in-out infinite;
}

.loading-screen p {
  margin: 6px 0 0;
  color: rgba(255, 248, 232, 0.76);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.loading-line {
  width: 118px;
  height: 3px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 248, 232, 0.14);
}

.loading-line i {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: var(--lime);
  animation: loading-sweep 1.1s ease-in-out infinite alternate;
}

/* =========================================================
   Hit effects + confetti
   ========================================================= */

.spark {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--s, 8px);
  height: var(--s, 8px);
  border-radius: var(--r, 50%);
  background: var(--c, var(--lime));
  box-shadow: 0 0 0 1px rgba(18, 43, 37, 0.1);
  pointer-events: none;
  will-change: transform, opacity;
  animation: spark-fly var(--life, 0.55s) cubic-bezier(0.16, 0.8, 0.3, 1) forwards;
}

.float-score {
  position: absolute;
  top: 0;
  left: 0;
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: clamp(16px, 2vw, 24px);
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 0 var(--ink), 0 0 16px rgba(217, 255, 99, 0.45);
  pointer-events: none;
  will-change: transform, opacity;
  animation: score-float 0.72s ease-out forwards;
}

.float-score.is-negative {
  color: #ff5a3c;
  text-shadow: 0 2px 0 #7c1c0a, 0 0 18px rgba(255, 90, 60, 0.55);
}

.confetti-layer {
  position: absolute;
  inset: 0;
  z-index: 50;
  overflow: hidden;
  pointer-events: none;
}

.confetti {
  position: absolute;
  top: -24px;
  left: var(--x);
  width: var(--w);
  height: var(--h);
  border-radius: var(--br, 2px);
  background: var(--c);
  opacity: 0;
  will-change: transform, opacity;
  animation: confetti-fall var(--duration) var(--delay) cubic-bezier(0.16, 0.65, 0.35, 1) forwards;
}

/* =========================================================
   Start screen
   ========================================================= */

.start-overlay {
  position: absolute;
  inset: 0;
  z-index: 35;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: clamp(14px, 3vw, 28px);
  background: rgba(4, 20, 16, 0.58);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  backdrop-filter: blur(8px) saturate(0.85);
  -webkit-backdrop-filter: blur(8px) saturate(0.85);
}

.start-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.start-card {
  position: relative;
  width: min(540px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: clamp(22px, 3.2vw, 34px);
  border: 2.5px solid var(--ink);
  border-radius: 28px;
  background:
    radial-gradient(circle at 95% 2%, rgba(217, 255, 99, 0.3), transparent 32%),
    radial-gradient(circle at 0% 100%, rgba(255, 112, 66, 0.12), transparent 28%),
    var(--cream);
  box-shadow:
    0 10px 0 rgba(4, 20, 16, 0.72),
    0 34px 80px rgba(0, 0, 0, 0.38);
  text-align: center;
  transform: translateY(26px) rotate(-1deg) scale(0.95);
  transition: transform 0.48s cubic-bezier(0.18, 0.9, 0.26, 1.12);
  scrollbar-width: thin;
}

.start-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  width: 29%;
  height: 7px;
  border-radius: 0 0 999px 999px;
  background: var(--orange);
}

.start-overlay.is-open .start-card {
  transform: translateY(0) rotate(-0.45deg) scale(1);
}

.start-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 2px;
  text-align: left;
}

.start-topline .win-stamp {
  margin-top: -8px;
}

.start-photos {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: clamp(10px, 2vh, 17px) 0 clamp(12px, 2vh, 18px);
  padding-left: 10px;
}

.start-photos img {
  width: clamp(50px, 5vw, 64px);
  aspect-ratio: 1;
  margin-left: -10px;
  border: 2px solid var(--cream);
  border-radius: 16px;
  object-fit: cover;
  box-shadow:
    0 3px 0 var(--ink),
    0 8px 18px rgba(0, 0, 0, 0.2);
  transform: rotate(var(--tilt)) translateY(var(--offset));
}

.start-photos img:nth-child(1) {
  --tilt: -8deg;
  --offset: 3px;
}

.start-photos img:nth-child(2) {
  --tilt: 5deg;
  --offset: -4px;
}

.start-photos img:nth-child(3) {
  --tilt: -3deg;
  --offset: 4px;
}

.start-photos img:nth-child(4) {
  --tilt: 7deg;
  --offset: -2px;
}

.start-photos img:nth-child(5) {
  --tilt: -5deg;
  --offset: 3px;
}

.start-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(38px, 4.8vw, 54px);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 1;
}

.start-sub {
  margin: 11px 0 0;
  color: rgba(18, 43, 37, 0.6);
  font-size: clamp(12px, 1.1vw, 14px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.7;
}

.start-rules {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: clamp(14px, 2.2vh, 20px) 0;
}

.start-warning {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0 0;
  padding: 9px 12px;
  border: 1px dashed rgba(255, 90, 60, 0.55);
  border-radius: 12px;
  color: #8c2c17;
  background: rgba(255, 90, 60, 0.08);
  font-size: clamp(10.5px, 0.95vw, 12px);
  font-weight: 700;
  line-height: 1.55;
  text-align: left;
}

.start-warning b {
  color: #d8381a;
  font-weight: 900;
}

.start-warning-face {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 2px solid #ff5a3c;
  border-radius: 50%;
  background: #ffd6ca;
  overflow: hidden;
}

.start-warning-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.start-rule.is-danger {
  color: #d8381a;
  border-color: rgba(255, 90, 60, 0.35);
  background: rgba(255, 90, 60, 0.1);
}

.start-rule.is-danger b {
  color: #ff5a3c;
}

.start-rule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(18, 43, 37, 0.09);
  border-radius: 999px;
  color: rgba(18, 43, 37, 0.64);
  background: rgba(18, 43, 37, 0.055);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.start-rule b {
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 900;
}

.start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: min(280px, 100%);
  height: 54px;
  padding: 0 24px;
  border: 2.5px solid var(--ink);
  border-radius: 15px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 5px 0 var(--ink);
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.start-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.start-btn:hover {
  background: var(--lime);
  box-shadow: 0 7px 0 var(--ink);
  transform: translateY(-2px);
}

.start-btn:active {
  box-shadow: 0 1px 0 var(--ink);
  transform: translateY(4px);
}

.start-btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

.start-note {
  margin: 12px 0 0;
  color: rgba(18, 43, 37, 0.48);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.45;
}

/* =========================================================
   Win screen
   ========================================================= */

.win-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: clamp(14px, 3vw, 28px);
  background: rgba(4, 20, 16, 0.62);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.34s ease, visibility 0.34s ease;
  backdrop-filter: blur(8px) saturate(0.8);
  -webkit-backdrop-filter: blur(8px) saturate(0.8);
}

.win-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.win-card {
  position: relative;
  width: min(520px, 100%);
  max-height: 100%;
  overflow: auto;
  padding: clamp(22px, 3.3vw, 38px);
  border: 2.5px solid var(--ink);
  border-radius: 28px;
  background:
    radial-gradient(circle at 100% 0%, rgba(217, 255, 99, 0.25), transparent 36%),
    var(--cream);
  box-shadow:
    0 10px 0 rgba(4, 20, 16, 0.72),
    0 34px 80px rgba(0, 0, 0, 0.38);
  text-align: center;
  transform: translateY(28px) rotate(-1deg) scale(0.94);
  transition: transform 0.48s cubic-bezier(0.18, 0.9, 0.26, 1.12);
  scrollbar-width: thin;
}

.win-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12%;
  width: 29%;
  height: 7px;
  border-radius: 0 0 999px 999px;
  background: var(--orange);
}

.win-overlay.is-open .win-card {
  transform: translateY(0) rotate(-0.55deg) scale(1);
}

.win-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(8px, 1.5vh, 16px);
  text-align: left;
}

.win-kicker {
  padding-top: 10px;
  color: rgba(18, 43, 37, 0.48);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.3;
}

.win-stamp {
  display: flex;
  flex: 0 0 auto;
  align-items: baseline;
  justify-content: center;
  width: 59px;
  height: 59px;
  margin-top: -9px;
  border: 2.5px solid var(--ink);
  border-radius: 50%;
  color: var(--cream);
  background: var(--orange);
  box-shadow: 0 3px 0 var(--ink);
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 900;
  line-height: 59px;
  transform: rotate(8deg);
}

.win-stamp small {
  margin-left: 1px;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1;
}

.win-title {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(38px, 5.2vw, 57px);
  font-weight: 900;
  letter-spacing: -0.075em;
  line-height: 1.02;
}

.win-title span {
  display: inline-block;
  margin-top: 9px;
  padding: 2px 13px 6px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  background: var(--lime);
  box-shadow: 4px 4px 0 var(--ink);
  line-height: 1.05;
  transform: rotate(-1.4deg);
}

.win-sub {
  margin: 13px 0 0;
  color: rgba(18, 43, 37, 0.56);
  font-size: clamp(11px, 1.1vw, 13px);
  font-weight: 700;
  letter-spacing: 0.03em;
}

.result-box {
  width: min(330px, 100%);
  margin: clamp(16px, 2.6vh, 24px) auto clamp(14px, 2.2vh, 20px);
  padding: clamp(12px, 1.8vh, 17px) 18px;
  border: 1.5px solid rgba(18, 43, 37, 0.14);
  border-radius: 19px;
  background: rgba(255, 253, 247, 0.8);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.result-label {
  display: block;
  color: rgba(18, 43, 37, 0.5);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  line-height: 1.4;
}

.result-time {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 2px;
  color: var(--orange);
}

.result-time strong {
  font-family: var(--font-mono);
  font-size: clamp(40px, 5.8vw, 52px);
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.075em;
  line-height: 1.12;
}

.result-time span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.result-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 10px 0 8px;
}

.result-stat {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 5px 12px;
  border: 1px solid rgba(18, 43, 37, 0.07);
  border-radius: 999px;
  background: rgba(18, 43, 37, 0.055);
}

.result-stat-label {
  color: rgba(18, 43, 37, 0.52);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1.2;
}

.result-stat-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 16px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  line-height: 1;
}

.result-stat-value small {
  color: rgba(18, 43, 37, 0.5);
  font-size: 10px;
  font-weight: 700;
}

.result-best {
  display: block;
  color: rgba(18, 43, 37, 0.52);
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.5;
}

.replay-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 30px;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 5px 0 var(--ink);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.replay-btn svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transition: transform 0.16s ease;
}

.replay-btn:hover {
  background: var(--lime);
  box-shadow: 0 7px 0 var(--ink);
  transform: translateY(-2px);
}

.replay-btn:hover svg {
  transform: translateX(3px);
}

.replay-btn:active {
  box-shadow: 0 1px 0 var(--ink);
  transform: translateY(4px);
}

.replay-btn:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 6px;
  color: rgba(18, 43, 37, 0.48);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.footer-tip {
  display: flex;
  align-items: center;
  gap: 7px;
}

.footer-tip i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.best-line b {
  color: var(--ink);
  font-weight: 800;
}

.footer-icp {
  color: inherit;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.footer-icp:hover,
.footer-icp:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}

.best-line.is-record b {
  color: var(--orange);
}

/* =========================================================
   Utilities + motion
   ========================================================= */

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

.noscript {
  position: fixed;
  inset: 20px;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  border-radius: 20px;
  color: var(--cream);
  background: var(--stage);
  font-size: 16px;
  text-align: center;
}

@keyframes target-appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes target-pop {
  0% {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
  28% {
    opacity: 1;
    transform: rotate(3deg) scale(1.14);
  }
  100% {
    opacity: 0;
    transform: rotate(-14deg) scale(0.22);
  }
}

@keyframes zhuozhuo-ring {
  to {
    transform: rotate(360deg);
  }
}

@keyframes zhuozhuo-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.14);
  }
}

@keyframes target-shake {
  0%,
  100% {
    transform: rotate(var(--tilt, 0deg));
  }
  18% {
    transform: rotate(calc(var(--tilt, 0deg) - 7deg)) scale(1.04);
  }
  38% {
    transform: rotate(calc(var(--tilt, 0deg) + 6deg)) scale(1.02);
  }
  58% {
    transform: rotate(calc(var(--tilt, 0deg) - 4deg));
  }
  78% {
    transform: rotate(calc(var(--tilt, 0deg) + 3deg));
  }
}

@keyframes zhuozhuo-leave {
  to {
    opacity: 0;
    transform: rotate(var(--tilt, 0deg)) scale(0.5);
  }
}

@keyframes penalty-fade {
  to {
    opacity: 0;
  }
}

@keyframes counter-bump {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  45% {
    transform: translateY(-4px) scale(1.2);
  }
}

@keyframes live-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

@keyframes arena-impact {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  30% {
    transform: translate3d(-3px, 2px, 0) rotate(-0.1deg);
  }
  64% {
    transform: translate3d(2px, -2px, 0) rotate(0.08deg);
  }
}

@keyframes spark-fly {
  0% {
    opacity: 1;
    transform: translate3d(var(--x0), var(--y0), 0) scale(1) rotate(0deg);
  }
  72% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--x0) + var(--dx)), calc(var(--y0) + var(--dy)), 0) scale(0.35) rotate(var(--spin));
  }
}

@keyframes score-float {
  0% {
    opacity: 0;
    transform: translate3d(-50%, 0, 0) scale(0.6) rotate(-4deg);
  }
  22% {
    opacity: 1;
    transform: translate3d(-50%, -12px, 0) scale(1.1) rotate(2deg);
  }
  100% {
    opacity: 0;
    transform: translate3d(-50%, -62px, 0) scale(0.88) rotate(-2deg);
  }
}

@keyframes confetti-fall {
  0% {
    opacity: 0;
    transform: translate3d(0, -20px, 0) rotate(0deg);
  }
  8% {
    opacity: 1;
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--drift), calc(100vh + 60px), 0) rotate(var(--rot));
  }
}

@keyframes loading-bob {
  0%,
  100% {
    transform: rotate(-6deg) translateY(0);
  }
  50% {
    transform: rotate(3deg) translateY(-7px);
  }
}

@keyframes loading-sweep {
  from {
    transform: translateX(-10%);
  }
  to {
    transform: translateX(150%);
  }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 900px) {
  .hud-card {
    height: 48px;
    padding: 6px 11px;
  }

  .timer-card {
    min-width: 126px;
  }

  .timer-digits {
    font-size: 20px;
  }

  .icon-btn {
    width: 48px;
    height: 48px;
  }

  .progress-dots {
    display: none;
  }
}

@media (max-width: 700px) {
  .shell {
    gap: 8px;
    padding:
      max(10px, env(safe-area-inset-top))
      10px
      max(8px, env(safe-area-inset-bottom));
  }

  .topbar {
    gap: 8px;
  }

  .brand {
    flex: 1 1 auto;
    gap: 8px;
  }

  .brand-mark {
    width: 40px;
    border-radius: 13px;
    box-shadow: 0 3px 0 var(--ink);
    font-size: 21px;
  }

  .brand-copy h1 {
    font-size: 19px;
    letter-spacing: -0.055em;
  }

  .brand-copy p {
    display: none;
  }

  .hud {
    gap: 5px;
  }

  .hud-card {
    height: 40px;
    padding: 5px 9px;
    border-radius: 12px;
    box-shadow: 0 2px 0 rgba(18, 43, 37, 0.1);
  }

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

  .timer-card {
    min-width: 84px;
    gap: 4px;
  }

  .timer-digits {
    min-width: 5ch;
    font-size: 18px;
  }

  .hud-unit {
    font-size: 9px;
  }

  .progress-card {
    gap: 3px;
    padding: 5px 8px;
  }

  .progress-count {
    font-size: 11px;
  }

  .progress-count b {
    font-size: 17px;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 2px 0 rgba(18, 43, 37, 0.1);
  }

  .icon-btn svg {
    width: 18px;
    height: 18px;
  }

  .arena {
    border-radius: 22px;
  }

  .arena-meta {
    top: 13px;
    left: 14px;
    font-size: 8px;
  }

  .arena-meta-text {
    display: none;
  }

  .hint {
    bottom: 14px;
    max-width: calc(100% - 24px);
    padding: 6px 13px 6px 7px;
    font-size: 11px;
  }

  .hint-reticle {
    width: 25px;
    height: 25px;
  }

  .hint-reticle svg {
    width: 17px;
    height: 17px;
  }

  .site-footer {
    font-size: 8.5px;
    padding: 0 3px;
  }

  .win-overlay {
    padding: 12px;
  }

  .win-card {
    padding: 22px 20px 24px;
    border-radius: 23px;
  }

  .win-title {
    font-size: clamp(34px, 10vw, 48px);
  }

  .win-title span {
    margin-top: 7px;
    padding: 2px 10px 5px;
    border-radius: 11px;
    box-shadow: 3px 3px 0 var(--ink);
  }

  .result-box {
    margin: 14px auto 13px;
  }

  .replay-btn {
    height: 48px;
    padding: 0 25px;
  }

  .start-overlay {
    padding: 12px;
  }

  .start-card {
    padding: 20px 18px 22px;
    border-radius: 23px;
  }

  .start-photos {
    margin: 8px 0 12px;
  }

  .start-photos img {
    width: clamp(44px, 12vw, 52px);
    margin-left: -8px;
    border-radius: 14px;
  }

  .start-title {
    font-size: clamp(34px, 10vw, 44px);
  }

  .start-sub {
    margin-top: 8px;
    font-size: 11.5px;
    line-height: 1.55;
  }

  .start-rules {
    gap: 5px;
    margin: 12px 0;
  }

  .start-rule {
    padding: 5px 8px;
    font-size: 9px;
  }

  .start-rule b {
    font-size: 8px;
  }

  .start-btn {
    height: 48px;
    font-size: 15px;
  }

  .start-note {
    margin-top: 10px;
    font-size: 9px;
  }
}

@media (max-width: 380px) {
  .brand-mark {
    width: 34px;
    border-radius: 11px;
    font-size: 18px;
    box-shadow: 0 2px 0 var(--ink);
  }

  .brand-copy h1 {
    font-size: 16px;
  }

  .hud {
    gap: 4px;
  }

  .timer-card {
    min-width: 0;
    padding: 5px 7px;
  }

  .timer-digits {
    font-size: 16px;
    min-width: 5ch;
  }

  .hud-unit {
    display: none;
  }

  .progress-card {
    padding: 5px 7px;
  }

  .progress-count {
    font-size: 10px;
  }

  .progress-count b {
    font-size: 15px;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .icon-btn svg {
    width: 16px;
    height: 16px;
  }

  .hint {
    font-size: 10px;
  }

  .site-footer {
    font-size: 7.5px;
  }

  .start-card {
    padding: 17px 14px 18px;
  }

  .start-title {
    font-size: 32px;
  }

  .start-photos img {
    width: 42px;
    margin-left: -9px;
  }

  .start-rules {
    gap: 4px;
    margin: 10px 0;
  }

  .start-rule {
    padding: 4px 7px;
    font-size: 8.5px;
  }

  .start-btn {
    height: 44px;
    font-size: 14px;
  }

  .start-note {
    font-size: 8px;
  }
}

@media (min-width: 701px) and (max-height: 680px) {
  .shell {
    gap: 7px;
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: max(6px, env(safe-area-inset-bottom));
  }

  .brand-mark {
    width: 42px;
    border-radius: 13px;
    font-size: 23px;
  }

  .brand-copy h1 {
    font-size: 22px;
  }

  .brand-copy p {
    display: none;
  }

  .hud-card,
  .icon-btn {
    height: 42px;
  }

  .icon-btn {
    width: 42px;
  }

  .site-footer {
    display: none;
  }

  .win-card {
    padding-top: 20px;
    padding-bottom: 22px;
  }

  .win-title {
    font-size: clamp(34px, 4.6vw, 46px);
  }

  .result-box {
    margin-top: 12px;
    margin-bottom: 12px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .replay-btn {
    height: 46px;
  }
}

@media (max-height: 540px) {
  .shell {
    gap: 6px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .brand-mark {
    width: 34px;
    border-radius: 10px;
    font-size: 18px;
  }

  .brand-copy h1 {
    font-size: 17px;
  }

  .hud-card {
    height: 36px;
    padding: 4px 8px;
  }

  .timer-card {
    min-width: 86px;
  }

  .timer-digits {
    font-size: 16px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
  }

  .arena-meta,
  .hint {
    display: none;
  }

  .win-overlay {
    padding: 8px;
  }

  .start-overlay {
    padding: 8px;
  }

  .start-card {
    width: min(620px, 100%);
    max-height: calc(100% - 8px);
    padding: 14px 24px 16px;
    border-radius: 18px;
  }

  .start-topline {
    margin-bottom: 2px;
  }

  .start-topline .win-stamp {
    width: 44px;
    height: 44px;
    font-size: 19px;
    line-height: 44px;
  }

  .start-topline .win-kicker {
    padding-top: 5px;
  }

  .start-photos,
  .start-sub {
    display: none;
  }

  .start-title {
    font-size: 30px;
  }

  .start-rules {
    margin: 7px 0;
  }

  .start-rule {
    padding: 3px 8px;
    font-size: 8px;
  }

  .start-rule b {
    font-size: 7px;
  }

  .start-btn {
    height: 38px;
    border-width: 2px;
    box-shadow: 0 3px 0 var(--ink);
    font-size: 13px;
  }

  .start-note {
    margin-top: 6px;
    font-size: 8px;
  }

  .win-card {
    width: min(620px, 100%);
    max-height: calc(100% - 8px);
    padding: 14px 26px 16px;
    border-radius: 18px;
  }

  .win-topline {
    margin-bottom: 4px;
  }

  .win-stamp {
    width: 44px;
    height: 44px;
    font-size: 19px;
    line-height: 44px;
  }

  .win-kicker {
    padding-top: 5px;
  }

  .win-title {
    font-size: 30px;
  }

  .win-title span {
    margin-top: 4px;
    padding: 1px 9px 3px;
    border-width: 2px;
    box-shadow: 2px 2px 0 var(--ink);
  }

  .win-sub {
    display: none;
  }

  .result-box {
    margin: 8px auto;
    padding: 6px 14px;
  }

  .result-time strong {
    font-size: 32px;
  }

  .result-stats {
    margin: 5px 0 4px;
  }

  .result-stat {
    min-height: 23px;
    padding: 3px 8px;
  }

  .result-stat-label,
  .result-stat-value small {
    font-size: 8px;
  }

  .result-stat-value {
    font-size: 13px;
  }

  .result-label,
  .result-best {
    font-size: 8px;
  }

  .replay-btn {
    height: 38px;
    border-width: 2px;
    box-shadow: 0 3px 0 var(--ink);
    font-size: 13px;
  }

  .confetti {
    display: none;
  }
}

@media (max-width: 700px) and (max-height: 680px) {
  .site-footer {
    display: none;
  }
}

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

  .loading-mark {
    animation: none;
  }
}
