@font-face { font-family: "Alibaba PuHuiTi"; src: url("/fonts/alibaba-puhuiti-regular-site.woff2?v=20260906") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alibaba PuHuiTi"; src: url("/fonts/alibaba-puhuiti-medium-site.woff2?v=20260906") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alibaba PuHuiTi"; src: url("/fonts/alibaba-puhuiti-semibold-site.woff2?v=20260906") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "QianTu HouHei"; src: url("/fonts/qiantu-houhei-site.woff2?v=20260906") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  color-scheme: light;
  --runner-ink: #101820;
  --runner-ink-soft: #344149;
  --runner-smoke: #68747d;
  --runner-mist: #f1f4f4;
  --runner-white: #fff;
  --runner-line: rgba(16, 24, 32, 0.16);
  --runner-jade: #39d477;
  --runner-jade-dark: #15834c;
  --runner-sun: #ffc542;
  --runner-danger: #f16b58;
  --runner-ease: cubic-bezier(0.16, 1, 0.3, 1);
  font-family: "Alibaba PuHuiTi", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--runner-white); }
body { min-width: 320px; margin: 0; color: var(--runner-ink); background: var(--runner-white); -webkit-font-smoothing: antialiased; }
body.runner-page { overscroll-behavior-y: none; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; font: inherit; }
::selection { color: var(--runner-white); background: var(--runner-ink); }

.runner-header {
  width: min(1400px, calc(100% - 48px));
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--runner-line);
}
.runner-brand { width: 118px; height: 48px; display: grid; place-items: center; }
.runner-brand img { display: block; width: 100%; height: 100%; object-fit: contain; }
.runner-back {
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--runner-line);
  border-radius: 12px;
  color: var(--runner-ink);
  background: var(--runner-white);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms var(--runner-ease);
}

/* A compact title and optional rules keep the play area in one clear column. */
.runner-layout { width: min(1280px, calc(100% - 48px)); margin: 0 auto; padding: 0 0 56px; }
.runner-breadcrumb { min-height: 58px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; border-bottom: 1px solid var(--runner-line); color: var(--runner-smoke); font-size: 13px; }
.runner-breadcrumb a { min-height: 44px; display: inline-flex; align-items: center; color: inherit; text-decoration: none; }
.runner-breadcrumb a::after { content: "/"; margin-left: 10px; color: var(--runner-smoke); opacity: .5; }
.runner-breadcrumb span { color: #101820; font-weight: 500; }
.runner-titlebar { padding: 28px 0 24px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: end; }
.runner-titlebar h1 { margin: 0; font-family: "QianTu HouHei", "Alibaba PuHuiTi", sans-serif; font-size: clamp(42px, 5.3vw, 68px); font-weight: 800; line-height: 1; }
.runner-titlebar p { max-width: 48em; margin: 14px 0 0; color: var(--runner-smoke); font-size: 15px; line-height: 1.75; }
.runner-title-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.runner-quiet-button { min-height: 46px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--runner-line); border-radius: 12px; color: #101820; background: #fff; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer; }
.runner-quiet-button[aria-expanded="true"] { border-color: #101820; background: #f3f5f6; }
.runner-quiet-button:hover { border-color: #101820; }
.runner-instructions { margin: 0 0 20px; padding: 22px 24px; border: 1px solid var(--runner-line); border-radius: 16px; background: #fff; }
.runner-instructions[hidden] { display: none; }
.runner-instructions-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.runner-instructions-heading h2 { margin: 0; font-size: 22px; }
.runner-instructions-heading .runner-quiet-button { flex-shrink: 0; min-height: 44px; font-size: 12px; }
.runner-instructions > p { max-width: 76em; margin: 16px 0 0; color: var(--runner-ink-soft); font-size: 13px; line-height: 1.75; }
.runner-rules { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.runner-rules p { min-width: 0; margin: 0; padding: 15px 0 0; display: grid; align-content: start; gap: 6px; border-top: 1px solid var(--runner-line); }
.runner-rules strong { font-size: 14px; font-weight: 600; }
.runner-rules span { color: var(--runner-smoke); font-size: 13px; line-height: 1.65; }
.runner-instructions .runner-help { color: var(--runner-smoke); text-align: left; }
.runner-instructions .runner-keyboard-note { display: block; color: var(--runner-smoke); }

.runner-game { min-width: 0; }
.runner-stage {
  position: relative;
  width: 100%;
  height: min(620px, calc(100svh - 190px));
  min-height: 440px;
  overflow: hidden;
  border-radius: 24px;
  background: #07140f;
  box-shadow: 0 30px 76px rgba(16, 24, 32, 0.2);
  isolation: isolate;
  touch-action: none;
}
#runner-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
.runner-stage::after {
  content: "";
  position: absolute;
  z-index: 4;
  inset: -12% -8%;
  opacity: 0;
  background: repeating-linear-gradient(102deg, transparent 0 52px, rgba(255, 255, 255, 0.22) 54px 57px, transparent 59px 116px);
  transform: translateX(12%);
  pointer-events: none;
  transition: opacity 160ms ease;
}
.runner-stage.is-speed-boost::after {
  opacity: 0.58;
  animation: runner-speed-streaks 420ms linear infinite;
}

.runner-live-hud {
  position: absolute;
  z-index: 6;
  top: 14px;
  right: 91px;
  left: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.runner-live-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(8, 20, 15, 0.86);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.runner-live-stats p { min-width: 0; margin: 0; padding: 9px 12px; display: grid; gap: 2px; border-right: 1px solid rgba(255, 255, 255, 0.15); }
.runner-live-stats p:last-child { border-right: 0; }
.runner-live-stats span { color: #b9d2c6; font-size: 10px; font-weight: 600; }
.runner-live-stats strong { color: var(--runner-white); font-size: 19px; font-variant-numeric: tabular-nums; line-height: 1.05; }
.runner-vitals {
  width: min(250px, 34%);
  padding: 10px 12px 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  color: var(--runner-white);
  background: rgba(8, 20, 15, 0.86);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}
.runner-meter-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 10px; }
.runner-meter-line span { color: #cde2d8; font-weight: 600; }
.runner-meter-line strong { font-size: 11px; font-variant-numeric: tabular-nums; }
.runner-stamina { height: 7px; margin-top: 5px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.runner-stamina i { display: block; border-radius: 999px; background: var(--runner-jade); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24); }
.runner-stamina i.is-empty { background: rgba(255, 255, 255, 0.17); box-shadow: none; }
.runner-skill-line { margin-top: 9px; }
.runner-energy { height: 7px; margin-top: 5px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, 0.17); }
.runner-energy i { display: block; width: 100%; height: 100%; background: var(--runner-sun); transform: scaleX(0); transform-origin: left; transition: transform 180ms ease-out; }
.runner-energy.is-ready i { animation: runner-ready-pulse 900ms ease-in-out infinite alternate; }

.runner-pause-button {
  position: absolute;
  z-index: 7;
  top: 14px;
  right: 14px;
  min-width: 66px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 12px;
  color: var(--runner-white);
  background: rgba(8, 20, 15, 0.9);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.runner-message {
  position: absolute;
  z-index: 6;
  left: 50%;
  bottom: 83px;
  max-width: min(76%, 520px);
  margin: 0;
  padding: 8px 13px;
  border-radius: 12px;
  color: var(--runner-ink);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  transform: translateX(-50%);
  pointer-events: none;
}
.runner-message:empty { display: none; }

.runner-touch-controls { position: absolute; z-index: 7; right: 12px; bottom: 12px; left: 12px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.runner-touch-controls button,
.runner-primary,
.runner-secondary {
  min-height: 52px;
  border: 1px solid rgba(16, 24, 32, 0.17);
  border-radius: 12px;
  color: var(--runner-ink);
  background: rgba(255, 255, 255, 0.96);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms var(--runner-ease), border-color 180ms ease, background 180ms ease;
}
.runner-touch-controls button { display: flex; align-items: center; justify-content: center; gap: 7px; }
.runner-touch-controls button span { font-size: 20px; line-height: 1; }
.runner-touch-controls button small { font-size: 12px; font-weight: 600; }
.runner-touch-controls .runner-jump, .runner-primary { border-color: var(--runner-ink); color: var(--runner-white); background: var(--runner-ink); }
.runner-touch-controls button:disabled, .runner-pause-button:disabled, .runner-primary:disabled { cursor: default; opacity: 0.46; }
.runner-touch-controls button:active:not(:disabled), .runner-pause-button:active:not(:disabled), .runner-primary:active:not(:disabled), .runner-secondary:active:not(:disabled) { transform: translateY(1px) scale(0.99); }

.runner-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  padding: clamp(18px, 4vw, 42px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: rgba(226, 234, 229, 0.91);
}
.runner-overlay[hidden] { display: none; }
.runner-overlay-copy { width: min(390px, 72%); padding: 26px; border-radius: 16px; color: var(--runner-ink); background: var(--runner-white); box-shadow: 0 22px 52px rgba(16, 24, 32, 0.18); }
.runner-overlay-copy h2 { margin: 0; font-family: "QianTu HouHei", "Alibaba PuHuiTi", sans-serif; font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; }
.runner-overlay-copy > p { margin: 13px 0 21px; color: var(--runner-ink-soft); font-size: 14px; line-height: 1.65; }
.runner-overlay-copy .runner-best-line { margin-top: -10px; color: var(--runner-smoke); font-size: 12px; }
.runner-primary, .runner-secondary { width: 100%; }
.runner-secondary { margin-top: 8px; background: var(--runner-white); }
.runner-overlay-copy > a { display: block; margin-top: 14px; color: var(--runner-smoke); font-size: 12px; text-align: center; text-underline-offset: 3px; }

.runner-intro-overlay { justify-content: center; background: rgba(230, 238, 232, 0.94); }
.runner-character-panel { width: min(650px, 94%); padding: clamp(18px, 3vw, 28px); }
.runner-intro-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; }
.runner-intro-heading h2 { flex: 0 0 auto; white-space: nowrap; }
.runner-intro-heading p { max-width: 25em; margin: 0; color: var(--runner-smoke); font-size: 12px; line-height: 1.55; text-align: right; }
.runner-character-list { margin-top: 20px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.runner-character {
  min-width: 0;
  min-height: 112px;
  padding: 6px;
  display: grid;
  grid-template-rows: 66px auto;
  gap: 5px;
  border: 1px solid var(--runner-line);
  border-radius: 12px;
  background: var(--runner-mist);
  cursor: pointer;
  transition: transform 180ms var(--runner-ease), border-color 180ms ease, background 180ms ease;
}
.runner-character img {
  width: 100%;
  height: 66px;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  transform: scale(var(--runner-portrait-height, 1));
  transform-origin: center bottom;
}
.runner-character[data-character="junyu"] { --runner-portrait-height: 0.68; }
.runner-character[data-character="yuming"] { --runner-portrait-height: 0.59; }
.runner-character[data-character="yuechuan"] { --runner-portrait-height: 1; }
.runner-character[data-character="funing"] { --runner-portrait-height: 0.88; }
.runner-character[data-character="chayue"] { --runner-portrait-height: 0.77; }
.runner-character[data-character="yaochen"] { --runner-portrait-height: 0.89; }
.runner-character span { min-width: 0; display: grid; gap: 1px; text-align: center; }
.runner-character strong, .runner-character small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.runner-character strong { font-size: 12px; }
.runner-character small { color: var(--runner-smoke); font-size: 9px; }
.runner-character.is-selected { border-color: var(--runner-ink); color: var(--runner-white); background: var(--runner-ink); }
.runner-character.is-selected small { color: #bde8ce; }
.runner-character-readout { min-height: 62px; margin: 12px 0; padding-top: 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 20px; border-top: 1px solid var(--runner-line); }
.runner-character-readout strong { font-size: 14px; }
.runner-character-readout p { margin: 4px 0 0; color: var(--runner-smoke); font-size: 13px; line-height: 1.6; }
.runner-character-readout .runner-model-state { max-width: 24em; margin: 0; font-size: 12px; text-align: right; }
.runner-model-state.is-error { color: #a43631; }
.runner-model-state.is-animated { color: var(--runner-jade-dark); }

.runner-current { min-height: 68px; margin-top: 8px; padding: 4px 14px 4px 8px; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--runner-line); }
.runner-current img { width: 56px; height: 56px; display: block; object-fit: contain; }
.runner-current p { margin: 0; display: grid; gap: 2px; }
.runner-current span { color: var(--runner-smoke); font-size: 10px; }
.runner-current strong { font-size: 14px; }
.runner-current small { color: var(--runner-smoke); font-size: 11px; }
.runner-current .runner-auto-note { padding-left: 20px; border-left: 1px solid var(--runner-line); text-align: right; }
.runner-auto-note strong { color: var(--runner-jade-dark); font-size: 12px; }
.runner-auto-note span { font-size: 10px; }
.runner-help { margin: 11px 4px 0; color: var(--runner-smoke); font-size: 12px; line-height: 1.55; text-align: center; }

.runner-stage.is-hit #runner-canvas { animation: runner-hit 260ms ease-out; }
.runner-stage.is-skill .runner-vitals { border-color: rgba(255, 197, 66, 0.9); box-shadow: 0 10px 34px rgba(255, 197, 66, 0.27); }
:focus-visible { outline: 3px solid var(--runner-ink); outline-offset: 3px; }
.runner-stage :focus-visible { outline-color: var(--runner-white); }
@keyframes runner-hit { 0% { transform: translateX(0); filter: none; } 35% { transform: translateX(-5px); filter: saturate(1.5); } 70% { transform: translateX(4px); } 100% { transform: translateX(0); filter: none; } }
@keyframes runner-ready-pulse { from { filter: brightness(0.92); } to { filter: brightness(1.22); } }
@keyframes runner-speed-streaks { from { transform: translateX(12%); } to { transform: translateX(-12%); } }

@media (hover: hover) and (pointer: fine) {
  .runner-back:hover { border-color: var(--runner-ink); transform: translateY(-1px); }
  .runner-touch-controls button:hover:not(:disabled), .runner-pause-button:hover:not(:disabled), .runner-primary:hover:not(:disabled), .runner-secondary:hover:not(:disabled), .runner-character:hover { transform: translateY(-2px); }
  .runner-touch-controls { right: 14px; left: auto; width: 332px; }
  .runner-touch-controls button { min-height: 46px; }
}

@media (max-width: 1080px) {
  .runner-header { width: min(800px, calc(100% - 32px)); }
}

@media (max-width: 720px) {
  .runner-header { width: calc(100% - 28px); height: 64px; }
  .runner-brand { width: 96px; height: 40px; }
  .runner-back { min-height: 40px; padding: 0 12px; font-size: 12px; }
  .runner-stage { height: auto; min-height: 0; aspect-ratio: 4 / 5; border-radius: 16px; }
  .runner-live-hud { top: 8px; right: 69px; left: 8px; display: grid; grid-template-columns: 1fr; gap: 6px; }
  .runner-live-stats { width: min(264px, 100%); }
  .runner-live-stats p { padding: 7px 9px; }
  .runner-live-stats strong { font-size: 16px; }
  .runner-vitals { width: min(264px, 100%); padding: 7px 9px 8px; }
  .runner-skill-line { margin-top: 6px; }
  .runner-pause-button { top: 8px; right: 8px; min-width: 55px; min-height: 44px; padding: 0 9px; }
  .runner-touch-controls { right: 7px; bottom: max(7px, env(safe-area-inset-bottom)); left: 7px; width: auto; gap: 5px; }
  .runner-touch-controls button { min-height: 50px; padding: 4px; }
  .runner-touch-controls button span { font-size: 18px; }
  .runner-touch-controls button small { font-size: 12px; }
  .runner-message { bottom: 66px; max-width: 84%; font-size: 12px; }
  .runner-overlay { padding: 12px; align-items: center; justify-content: center; }
  .runner-overlay-copy { width: min(360px, 94%); padding: 18px; }
  .runner-overlay-copy h2 { font-size: 30px; }
  .runner-character-panel { width: 100%; max-height: calc(100% - 8px); padding: 14px; overflow-y: auto; }
  .runner-stage:has(#runner-intro:not([hidden])) { height: auto; aspect-ratio: auto; }
  .runner-intro-overlay:not([hidden]) { position: relative; inset: auto; }
  .runner-intro-overlay .runner-character-panel { max-height: none; overflow: visible; }
  .runner-intro-heading { display: block; }
  .runner-intro-heading h2 { white-space: normal; }
  .runner-intro-heading p { margin: 6px 0 0; text-align: left; }
  .runner-character-list { margin-top: 10px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .runner-character { min-height: 78px; grid-template-rows: 40px auto; }
  .runner-character img { height: 40px; }
  .runner-character-readout { min-height: 0; margin-block: 8px; padding-top: 8px; grid-template-columns: 1fr; gap: 3px; }
  .runner-character-readout .runner-model-state { text-align: left; }
  .runner-current { grid-template-columns: 52px minmax(0, 1fr); }
  .runner-current img { width: 52px; height: 52px; }
  .runner-current .runner-auto-note { grid-column: 1 / -1; padding: 8px 0 0; grid-template-columns: auto 1fr; gap: 8px; border-top: 1px solid var(--runner-line); border-left: 0; text-align: left; }
}

@media (max-width: 370px) {
  .runner-live-hud { right: 63px; }
  .runner-live-stats p { padding-inline: 6px; }
  .runner-live-stats strong { font-size: 14px; }
  .runner-pause-button { min-width: 50px; padding: 0 7px; font-size: 12px; }
  .runner-touch-controls button { display: grid; gap: 1px; }
  .runner-character-panel { padding: 16px; }
}


@media (max-width: 720px) {
  .runner-layout { width: calc(100% - 28px); padding-bottom: 40px; }
  .runner-breadcrumb { min-height: 50px; gap: 8px; font-size: 12px; }
  .runner-breadcrumb a::after { margin-left: 8px; }
  .runner-titlebar { padding: 24px 0 20px; grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .runner-titlebar h1 { font-size: clamp(40px, 10.8vw, 56px); }
  .runner-titlebar p { margin-top: 12px; font-size: 14px; line-height: 1.65; }
  .runner-title-actions .runner-quiet-button { min-height: 44px; padding-inline: 16px; font-size: 13px; }
  .runner-instructions { padding: 16px; margin-bottom: 16px; }
  .runner-instructions-heading { gap: 10px; }
  .runner-instructions-heading h2 { font-size: 20px; }
  .runner-instructions-heading .runner-quiet-button { padding-inline: 12px; }
  .runner-rules { grid-template-columns: minmax(0, 1fr); gap: 14px; }
}

@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; }
}
@media (forced-colors: active) {
  .runner-stage, .runner-overlay-copy, .runner-current, .runner-character { border: 1px solid CanvasText; }
  .runner-overlay { background: Canvas; }
}
