* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; background: #090b12; }
body {
  color: #f8fafc;
  font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", sans-serif;
  overscroll-behavior: none;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; }
button:focus-visible { outline: 2px solid #facc15; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

#game {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: calc(14px + var(--sk-safe-top, env(safe-area-inset-top)))
    calc(18px + var(--sk-safe-right, env(safe-area-inset-right)))
    calc(12px + var(--sk-safe-bottom, env(safe-area-inset-bottom)))
    calc(18px + var(--sk-safe-left, env(safe-area-inset-left)));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 4%, rgba(185, 28, 28, 0.24), transparent 34%),
    radial-gradient(circle at 5% 52%, rgba(34, 197, 94, 0.08), transparent 36%),
    #090b12;
}
#game::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image: repeating-linear-gradient(115deg, transparent 0, transparent 18px, rgba(255,255,255,0.025) 19px, transparent 20px);
}
.topbar, .scorebar, .status, .stage, .hint, .footer { position: relative; z-index: 1; }
.topbar { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-kicker { display: block; color: #f87171; font-size: 9px; font-weight: 800; letter-spacing: 2px; }
h1 { margin: 2px 0 0; font-size: 24px; line-height: 1.1; letter-spacing: 1px; }
.top-actions { display: flex; gap: 7px; }
.text-btn, .close-btn {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.78);
  color: #e2e8f0;
  padding: 8px 11px;
  font-size: 12px;
  cursor: pointer;
}
.text-btn:active, .close-btn:active { transform: scale(0.96); }
.text-btn.muted { color: #64748b; }
.volume-panel {
  position: fixed;
  z-index: 45;
  top: calc(62px + var(--sk-safe-top, env(safe-area-inset-top)));
  right: max(18px, calc((100vw - 484px) / 2));
  width: min(310px, calc(100vw - 36px));
  padding: 13px 14px;
  border: 1px solid rgba(244,241,232,0.34);
  border-left: 3px solid #c91f2c;
  background: rgba(9,9,9,0.98);
  box-shadow: 7px 7px 0 rgba(0,0,0,0.42);
  color: #f4f1e8;
}
.volume-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; color: #aaa69d; font-family: Impact, Haettenschweiler, sans-serif; font-size: 10px; letter-spacing: 1.8px; }
.volume-heading button { padding: 2px 0 2px 8px; border: 0; background: transparent; color: #aaa69d; font-size: 10px; cursor: pointer; }
.volume-control { display: grid; grid-template-columns: 20px 1fr 42px; align-items: center; gap: 10px; }
.volume-control svg { width: 20px; height: 20px; color: #f4f1e8; }
.volume-control output { color: #f4f1e8; font-family: Impact, Haettenschweiler, sans-serif; font-size: 18px; text-align: right; }
#volumeSlider { width: 100%; height: 24px; margin: 0; accent-color: #c91f2c; background: transparent; cursor: pointer; -webkit-appearance: none; appearance: none; }
#volumeSlider::-webkit-slider-runnable-track { height: 4px; background: #4b4742; }
#volumeSlider::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -7px; border: 2px solid #090909; border-radius: 0; background: #f4f1e8; box-shadow: 0 0 0 1px #c91f2c; -webkit-appearance: none; }
#volumeSlider::-moz-range-track { height: 4px; background: #4b4742; }
#volumeSlider::-moz-range-thumb { width: 16px; height: 16px; border: 2px solid #090909; border-radius: 0; background: #f4f1e8; box-shadow: 0 0 0 1px #c91f2c; }
.volume-mute { width: 100%; margin-top: 9px; padding: 7px 10px; border: 1px solid rgba(244,241,232,0.18); background: #1b1b1b; color: #d6d2ca; font-size: 11px; cursor: pointer; }
.volume-mute:hover, .volume-mute:focus-visible { border-color: #c91f2c; }
.scorebar { width: 100%; display: flex; justify-content: space-between; gap: 10px; }
.score-chip {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid rgba(248, 113, 113, 0.18);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.7);
  color: #cbd5e1;
  text-align: center;
  font-size: 14px;
}
.score-chip strong { color: #4ade80; font-size: 21px; margin: 0 3px; }
.score-chip.best strong { color: #facc15; }
.status { min-height: 25px; text-align: center; font-weight: 750; font-size: 17px; }
.stage {
  width: min(100%, 430px);
  flex: 0 0 auto;
  border-radius: 16px;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
.aspect {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 85%;
  overflow: hidden;
  border: 1px solid rgba(248, 250, 252, 0.22);
  border-radius: 16px;
  background: #11151f;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.42);
}
#stageImg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.zones { position: absolute; inset: 0; }
.zone {
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 10px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.75), inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  transition: background-color 50ms linear, border-color 50ms linear;
}
.zone-tag {
  position: absolute;
  left: 50%;
  top: 5px;
  transform: translateX(-50%);
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
/* 「自己」与其余目标共用 .zone 样式；仅保留语义类名供玩法与测试识别。 */
.zone.lit {
  border: 3px solid #22c55e;
  background: rgba(34, 197, 94, 0.28);
  box-shadow: 0 0 38px rgba(34, 197, 94, 0.78), inset 0 0 34px rgba(34, 197, 94, 0.34);
  animation: target-pulse 180ms ease-out;
}
.zone.lit .zone-tag { background: #15803d; border-color: #86efac; }
@keyframes target-pulse { from { transform: scale(0.96); } to { transform: scale(1); } }
.start-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  overflow-x: hidden;
  overflow-y: auto;
  background: #090909;
  color: #f4f1e8;
  touch-action: manipulation;
}
.start-shell {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background:
    repeating-linear-gradient(112deg, transparent 0, transparent 22px, rgba(244,241,232,0.018) 23px, transparent 24px),
    #090909;
}
.start-visual {
  position: relative;
  height: clamp(220px, 38vh, 340px);
  overflow: hidden;
  background: #181818;
}
.start-visual::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 7px;
  background: #c91f2c;
  transform: skewY(-1.5deg) translateY(3px);
  transform-origin: left;
}
.start-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 43% 50%;
  pointer-events: none;
  animation: start-visual-in 600ms cubic-bezier(.2,.8,.2,1) both;
}
.start-visual-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(9,9,9,0.3) 0%, transparent 24%, transparent 52%, rgba(9,9,9,0.2) 70%, #090909 100%);
}
.start-issue {
  position: absolute;
  top: calc(70px + var(--sk-safe-top, env(safe-area-inset-top)));
  left: calc(22px + var(--sk-safe-left, env(safe-area-inset-left)));
  padding: 5px 8px;
  background: rgba(9,9,9,0.82);
  color: #f4f1e8;
  font-family: Impact, Haettenschweiler, sans-serif;
  font-size: 11px;
  letter-spacing: 1.8px;
}
.start-vertical {
  position: absolute;
  top: calc(112px + var(--sk-safe-top, env(safe-area-inset-top)));
  right: calc(18px + var(--sk-safe-right, env(safe-area-inset-right)));
  padding: 10px 7px;
  background: #c91f2c;
  color: #fff;
  font-family: "Noto Serif SC", "Source Han Serif SC", SimSun, serif;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 4px;
  writing-mode: vertical-rl;
  box-shadow: 4px 4px 0 rgba(9,9,9,0.8);
}
.start-reaction {
  position: absolute;
  top: calc(120px + var(--sk-safe-top, env(safe-area-inset-top)));
  right: calc(58px + var(--sk-safe-right, env(safe-area-inset-right)));
  color: #090909;
  font-family: "Noto Serif SC", "Source Han Serif SC", SimSun, serif;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 3px;
  writing-mode: vertical-rl;
  -webkit-text-stroke: 1.5px #f4f1e8;
  paint-order: stroke fill;
  text-shadow: 2px 2px 0 rgba(9,9,9,0.55);
  transform: rotate(-4deg);
  transform-origin: center;
}
.start-utilities {
  position: absolute;
  z-index: 3;
  top: calc(14px + var(--sk-safe-top, env(safe-area-inset-top)));
  left: calc(18px + var(--sk-safe-left, env(safe-area-inset-left)));
  right: calc(18px + var(--sk-safe-right, env(safe-area-inset-right)));
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.start-utility {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid rgba(244,241,232,0.38);
  border-radius: 2px;
  background: rgba(9,9,9,0.82);
  color: #f4f1e8;
  font-size: 11px;
  cursor: pointer;
}
.start-utility svg { width: 16px; height: 16px; }
.start-utility.muted { color: #aaa69d; }
.start-utility:active { background: #c91f2c; }
.start-copy {
  position: relative;
  z-index: 2;
  margin-top: -72px;
  padding: 0 calc(24px + var(--sk-safe-right, env(safe-area-inset-right))) 0 calc(24px + var(--sk-safe-left, env(safe-area-inset-left)));
  animation: start-copy-in 500ms 100ms cubic-bezier(.2,.8,.2,1) both;
}
.start-eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #f4f1e8;
  font-family: Impact, Haettenschweiler, sans-serif;
  font-size: 12px;
  letter-spacing: 3px;
}
.start-eyebrow span { width: 32px; height: 4px; background: #c91f2c; transform: skewX(-24deg); }
.start-copy h2 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 8px 0 0;
  font-family: "Noto Serif SC", "Source Han Serif SC", SimSun, serif;
  font-size: 58px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -4px;
  transform: skewX(-4deg);
  transform-origin: left center;
  text-shadow: 3px 3px 0 #090909;
}
.start-copy h2 strong { color: #c91f2c; font-size: 1.12em; font-weight: 900; }
.start-tagline-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}
.start-tagline { min-width: 0; margin: 0; color: #aaa69d; font-size: 13px; font-weight: 700; letter-spacing: 3px; }
.back-list {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid rgba(244,241,232,0.38);
  border-radius: 0;
  background: rgba(9,9,9,0.62);
  color: #f4f1e8;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1px;
  white-space: nowrap;
  cursor: pointer;
  transform: skewX(-4deg);
  transition: border-color 120ms ease-out, background-color 120ms ease-out, transform 120ms ease-out;
}
.back-list svg { width: 15px; height: 15px; }
.back-list:active { border-color: #c91f2c; background: #c91f2c; transform: skewX(-4deg) translateY(2px); }
.back-list:focus-visible { outline: 2px solid #f4f1e8; outline-offset: 3px; }
.start-brief {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  gap: 18px;
  width: 100%;
  margin-top: 20px;
  padding: 12px 0 12px 14px;
  border: 0;
  border-left: 3px solid #c91f2c;
  border-top: 1px solid rgba(244,241,232,0.12);
  border-bottom: 1px solid rgba(244,241,232,0.12);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 120ms ease-out, transform 120ms ease-out;
}
.start-brief:active { background: rgba(201,31,44,0.12); transform: translateY(2px); }
.start-brief:focus-visible { outline: 2px solid #f4f1e8; outline-offset: 3px; }
.start-limit { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.difficulty-clock {
  position: relative;
  width: 94px;
  height: 56px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(244,241,232,0.22);
  background: #050505;
  box-shadow: inset 0 1px 0 rgba(244,241,232,0.08), inset 0 -8px 16px rgba(0,0,0,0.5);
  perspective: 240px;
}
.difficulty-clock::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: rgba(244,241,232,0.22);
  box-shadow: 0 1px 0 #000;
  pointer-events: none;
}
.difficulty-clock strong {
  display: block;
  width: 100%;
  color: #f4f1e8;
  font-family: Impact, Haettenschweiler, sans-serif;
  font-size: 46px;
  font-weight: 400;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  transform-origin: center;
  will-change: transform, opacity;
}
.difficulty-clock.is-flipping strong { animation: difficulty-flip-tick var(--flip-duration, 70ms) cubic-bezier(.4,0,.2,1); }
.start-brief.is-spinning .difficulty-clock { border-color: rgba(201,31,44,0.82); }
.start-brief[aria-disabled="true"] { cursor: wait; }
.start-limit > span:last-child { color: #c91f2c; font-size: 10px; font-weight: 900; line-height: 1.45; }
.start-limit b { font: inherit; }
.start-difficulty-copy { display: block; margin: 0; color: #f4f1e8; font-size: 12px; font-weight: 700; line-height: 1.7; }
@keyframes difficulty-flip-tick {
  0% { transform: rotateX(0deg); opacity: 1; }
  45% { transform: rotateX(-82deg); opacity: 0.42; }
  55% { transform: rotateX(82deg); opacity: 0.42; }
  100% { transform: rotateX(0deg); opacity: 1; }
}
.start-brief small { color: #aaa69d; font-size: 10px; font-weight: 400; }
.start-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 18px; }
.start-actions > * { min-width: 0; }
.start-follow {
  width: calc(100% - 8px);
  min-height: 34px;
  margin: -3px 0 0 8px;
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-left: 2px solid #fb7299;
  background: rgba(251,114,153,0.07);
  color: #e9bbc9;
  text-align: left;
  cursor: pointer;
}
.start-follow svg { flex: 0 0 auto; width: 16px; height: 16px; }
.start-follow span { flex: 1; min-width: 0; font-size: 10px; font-weight: 700; }
.start-follow small { flex: 0 0 auto; color: #aaa69d; font-size: 9px; white-space: nowrap; }
.start-follow.is-complete { border-left-color: #777269; color: #aaa69d; background: transparent; }
.start-follow:disabled { cursor: default; opacity: 0.78; }
.support-button {
  position: relative;
  width: 100%;
  min-height: 68px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 0;
  clip-path: polygon(0 0, 97% 0, 100% 18%, 100% 100%, 3% 100%, 0 82%);
  background: #fb7299;
  color: #241117;
  text-align: left;
  cursor: pointer;
}
.support-step {
  align-self: stretch;
  min-width: 31px;
  padding-right: 11px;
  display: flex;
  align-items: center;
  border-right: 1px solid rgba(36,17,23,0.28);
  font-family: Impact, Haettenschweiler, sans-serif;
  font-size: 28px;
  line-height: 1;
}
.support-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.support-copy b { font-size: 17px; font-weight: 900; letter-spacing: 1px; }
.support-copy small { overflow: hidden; color: rgba(36,17,23,0.72); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.support-actions { display: flex; gap: 7px; }
.support-actions svg { width: 18px; height: 18px; }
.support-arrow { flex: 0 0 auto; width: 20px; height: 20px; }
.support-button:active { background: #ff91b0; transform: translateY(2px); }
.support-button:disabled { opacity: 0.66; cursor: wait; }
.support-button.is-complete { background: #33292d; color: #e9bbc9; box-shadow: inset 0 0 0 1px #9e6073; }
.support-button.is-complete .support-step { border-color: rgba(233,187,201,0.26); }
.support-button.is-complete .support-copy small { color: #bda5ad; }
.support-button.is-complete .support-actions { opacity: 0.55; }
.support-button.is-author .support-actions, .support-button.is-author .support-arrow { display: none; }
.support-button.is-author:disabled { cursor: default; }
.start-button {
  width: 100%;
  min-height: 60px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid #c91f2c;
  clip-path: polygon(0 0, 97% 0, 100% 20%, 100% 100%, 3% 100%, 0 80%);
  background: rgba(201,31,44,0.07);
  color: #f4f1e8;
  text-align: left;
  cursor: pointer;
}
.start-button .start-step { color: #c91f2c; font-family: Impact, Haettenschweiler, sans-serif; font-size: 24px; }
.start-button > span:not(.start-step) { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.start-button b { font-size: 18px; letter-spacing: 2px; }
.start-button small { color: #aaa69d; font-family: Impact, Haettenschweiler, sans-serif; font-size: 9px; letter-spacing: 2.4px; }
.start-button svg { width: 25px; height: 25px; color: #c91f2c; transition: transform 120ms ease-out; }
.start-button:active { background: #c91f2c; transform: translateY(2px); }
.start-button:active svg, .start-button:active .start-step { color: #fff; transform: translateX(3px); }
.start-brief { margin-top: 16px; }
.start-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; color: #aaa69d; font-size: 11px; }
.start-meta b { color: #f4f1e8; font-family: Impact, Haettenschweiler, sans-serif; font-size: 18px; font-weight: 400; }
.start-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding: 24px calc(24px + var(--sk-safe-right, env(safe-area-inset-right))) calc(16px + var(--sk-safe-bottom, env(safe-area-inset-bottom))) calc(24px + var(--sk-safe-left, env(safe-area-inset-left)));
  color: #66635d;
  font-family: Impact, Haettenschweiler, sans-serif;
  font-size: 9px;
  letter-spacing: 1.4px;
}
@keyframes start-visual-in { from { transform: scale(1.035); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes start-copy-in { from { transform: translateY(16px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.hint { min-height: 34px; margin: 0; color: #94a3b8; text-align: center; font-size: 12px; line-height: 1.5; }
.footer {
  width: 100%;
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #475569;
  font-size: 9px;
  letter-spacing: 0.4px;
}
.footer .real { color: #4ade80; }

.end-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 18px
    calc(16px + var(--sk-safe-right, env(safe-area-inset-right)))
    calc(22px + var(--sk-safe-bottom, env(safe-area-inset-bottom)))
    calc(16px + var(--sk-safe-left, env(safe-area-inset-left)));
  background: rgba(2, 6, 23, 0.22);
}
.end-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100dvh - 44px);
  overflow-y: auto;
  padding: 18px;
  border: 1px solid rgba(244,241,232,0.2);
  border-top: 4px solid #c91f2c;
  border-radius: 2px;
  background: rgba(9, 9, 9, 0.97);
  box-shadow: 9px 9px 0 rgba(0,0,0,0.38);
  color: #f4f1e8;
  text-align: left;
}
.end-kicker { display: flex; justify-content: space-between; gap: 12px; color: #aaa69d; font-family: Impact, Haettenschweiler, sans-serif; font-size: 9px; letter-spacing: 1.7px; }
.end-kicker span { color: #fb7299; }
.end-kicker b { font-weight: 400; }
.end-title { margin-top: 8px; font-family: "Noto Serif SC", "Source Han Serif SC", SimSun, serif; font-size: 25px; font-weight: 900; line-height: 1.25; }
.end-title.win { color: #f4f1e8; }
.end-title.lose { color: #f4f1e8; }
.end-sub { margin: 7px 0 12px; color: #aaa69d; font-size: 12px; line-height: 1.65; }
.end-sub b { color: #f4f1e8; }
.end-score {
  min-height: 68px;
  margin-bottom: 14px;
  padding: 8px 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
  border-top: 1px solid rgba(244,241,232,0.14);
  border-bottom: 1px solid rgba(244,241,232,0.14);
}
.end-score > span { color: #aaa69d; font-size: 11px; font-weight: 700; letter-spacing: 1px; }
.end-score > strong { color: #c91f2c; font-family: Impact, Haettenschweiler, sans-serif; font-size: 54px; font-weight: 400; line-height: 1; }
.end-score > small { margin-left: auto; display: flex; align-items: center; gap: 7px; color: #aaa69d; font-size: 11px; }
.end-score em { width: 1px; height: 13px; background: rgba(244,241,232,0.22); }
.end-score small b { color: #f4f1e8; font-family: Impact, Haettenschweiler, sans-serif; font-size: 22px; font-weight: 400; }
.end-btns { display: grid; gap: 9px; }
.support-end { min-height: 58px; padding-top: 9px; padding-bottom: 9px; }
.support-end .support-copy b { font-size: 15px; }
.support-end .support-actions { display: none; }
.rewind-gate { padding: 10px 11px; border: 1px solid rgba(240,201,74,0.24); background: #12110d; }
.rewind-gate.is-unlocked { border-color: rgba(240,201,74,0.58); }
.rewind-gate-head { display: flex; justify-content: space-between; gap: 10px; color: #aaa69d; font-family: Impact, Haettenschweiler, sans-serif; font-size: 9px; letter-spacing: 1.4px; }
.rewind-gate-head b { color: #f0c94a; font-weight: 400; }
.unlock-checks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; }
.unlock-checks span { position: relative; padding: 5px 3px 5px 14px; border: 1px solid #34312a; color: #777269; font-size: 9px; font-weight: 700; text-align: center; white-space: nowrap; }
.unlock-checks span::before { content: ""; position: absolute; left: 5px; top: 50%; width: 4px; height: 4px; transform: translateY(-50%); background: #5a554a; }
.unlock-checks span.is-met { border-color: rgba(240,201,74,0.44); color: #f0c94a; }
.unlock-checks span.is-met::before { background: #f0c94a; box-shadow: 0 0 7px rgba(240,201,74,0.42); }
.follow-button { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid rgba(251,114,153,0.42) !important; background: rgba(251,114,153,0.08) !important; color: #fb9db8 !important; }
.follow-button span { font-size: 11px; }
.follow-button small { color: #aaa69d; font-size: 9px; font-weight: 400; text-align: right; }
.follow-button.is-complete { border-color: rgba(244,241,232,0.14) !important; background: #191919 !important; color: #aaa69d !important; }
.end-btns button, .button-row button {
  width: 100%;
  border: 0;
  border-radius: 2px;
  padding: 11px 13px;
  font-weight: 800;
  cursor: pointer;
}
.primary { background: #c91f2c; color: #fff; }
.primary:active { background: #e12836; }
.primary.rewind { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f0c94a; color: #18181b; text-align: left; }
.primary.rewind small { font-size: 10px; font-weight: 700; text-align: right; }
.primary.rewind:disabled { border: 1px dashed #514b38; background: #201f1a; color: #777269; }
.primary.rewind.is-unlocked { border: 0; background: #f0c94a; color: #18181b; cursor: pointer; }
.secondary { background: #242428; color: #d6d2ca; }
.button-row { display: flex; gap: 9px; }

.modal { position: fixed; inset: 0; z-index: 30; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(5px); }
.rank-panel {
  position: relative;
  width: min(100%, 430px);
  max-height: min(76vh, 680px);
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(148,163,184,0.28);
  border-radius: 20px;
  background: #0f1420;
  box-shadow: 0 25px 90px rgba(0,0,0,0.6);
}
.rank-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.rank-head h2 { margin: 3px 0 0; font-size: 22px; }
.rank-difficulty-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 17px;
  padding: 4px;
  border: 1px solid rgba(244,241,232,0.16);
  background: #090909;
  transform: skewX(-2deg);
}
.rank-difficulty-tabs button {
  min-width: 0;
  min-height: 52px;
  padding: 6px 3px;
  border: 1px solid rgba(244,241,232,0.18);
  border-radius: 0;
  background: transparent;
  color: #aaa69d;
  font: inherit;
  cursor: pointer;
  transition: border-color 120ms ease-out, background-color 120ms ease-out, color 120ms ease-out;
}
.rank-difficulty-tabs button strong {
  display: block;
  color: #f4f1e8;
  font-family: Impact, Haettenschweiler, sans-serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}
.rank-difficulty-tabs button span { display: block; margin-top: 4px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.rank-difficulty-tabs button.is-active { border-color: #c91f2c; background: #c91f2c; color: #f4f1e8; }
.rank-difficulty-tabs button.is-active strong { color: #fff; }
.rank-difficulty-tabs button:active { transform: translateY(1px); }
.rank-difficulty-tabs button:focus-visible { outline: 2px solid #f0c94a; outline-offset: 2px; }
.rank-difficulty-note { margin: 8px 0 0; color: #aaa69d; font-size: 10px; line-height: 1.6; text-align: left; }
.my-rank { margin: 12px 0 10px; color: #facc15; font-size: 13px; min-height: 20px; }
.rank-list { display: flex; flex-direction: column; gap: 7px; }
.rank-row {
  display: grid;
  grid-template-columns: 32px 36px 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px 10px;
  border-radius: 11px;
  background: rgba(30, 41, 59, 0.62);
}
.rank-number { color: #94a3b8; text-align: center; font-weight: 800; }
.rank-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: #1e293b; }
.rank-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e2e8f0; font-size: 13px; }
.rank-score { color: #4ade80; font-weight: 900; }
.rank-empty { padding: 30px 12px; color: #94a3b8; text-align: center; font-size: 13px; line-height: 1.8; }
.rank-note { margin: 14px 0 0; color: #475569; text-align: center; font-size: 10px; }

@media (max-height: 720px) {
  #game { gap: 8px; padding-top: calc(9px + var(--sk-safe-top, env(safe-area-inset-top))); }
  h1 { font-size: 20px; }
  .stage { width: min(82vw, 350px); }
  .score-chip { padding: 6px 12px; }
  .status { font-size: 15px; min-height: 22px; }
  .hint { min-height: 28px; }
  .start-visual { height: 255px; }
  .start-copy { margin-top: -54px; }
  .start-copy h2 { font-size: 48px; }
  .start-tagline { margin-top: 7px; }
  .start-brief { margin-top: 12px; padding-top: 8px; padding-bottom: 8px; }
  .start-limit strong { font-size: 39px; }
  .start-actions { margin-top: 13px; gap: 8px; }
  .support-button { min-height: 58px; padding-top: 8px; padding-bottom: 8px; }
  .support-copy b { font-size: 15px; }
  .start-button { min-height: 54px; }
  .start-meta { margin-top: 10px; }
  .start-footer { margin-top: auto; padding-top: 14px; }
  .end-panel { padding: 14px; }
  .end-title { font-size: 22px; }
  .end-score { min-height: 58px; margin-bottom: 10px; }
  .end-score > strong { font-size: 46px; }
  .end-btns { gap: 7px; }
}
@media (max-width: 360px) {
  .start-copy h2 { font-size: 50px; }
  .start-brief { gap: 12px; }
  .start-difficulty-copy { font-size: 11px; }
  .support-button { gap: 8px; padding-left: 11px; padding-right: 11px; }
  .support-step { min-width: 27px; padding-right: 8px; font-size: 24px; }
  .support-actions { gap: 4px; }
  .support-actions svg { width: 15px; height: 15px; }
  .support-copy b { font-size: 15px; }
  .support-copy small { font-size: 9px; }
}
@media (min-width: 700px) {
  #game, .start-shell { border-left: 1px solid #1e293b; border-right: 1px solid #1e293b; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
