:root {
  color-scheme: light;
  --ink: #153633;
  --muted: #46605a;
  --accent: #116b61;
  --line: #d6e7df;
  --panel: #fff;
  --mint: #baf1dd;
  --pink: #ffc7dd;
  --yellow: #ffdc97;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  font-family: "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  color: var(--ink);
  background: #faf8ef;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 12% 0%, #dff4ea 0, transparent 46%),
              radial-gradient(ellipse at 90% 25%, #fff0de 0, transparent 40%);
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .65; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
[hidden] { display: none !important; }
.site-header { background: #ffffffba; border-bottom: 1px solid var(--line); }
.header-inner, main { width: min(1136px, calc(100% - 64px)); margin: 0 auto; }
.header-inner { min-height: 61px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font: 800 13px var(--mono); letter-spacing: .08em; }
.brand-mark {
  position: relative;
  width: 25px;
  height: 24px;
  border: 1px solid #237a6e;
  border-radius: 8px;
  background: #a4dfc9;
  box-shadow: 0 2px 0 #237a6e;
  transform: rotate(-11deg);
}
.brand-mark::before, .mascot::before {
  content: "";
  position: absolute;
  left: 35%;
  top: 40%;
  width: 3px;
  height: 4px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 5px 0 var(--ink);
}
.brand-mark::after { content: ""; position: absolute; top: 66%; left: 46%; width: 5px; height: 2px; border-bottom: 1px solid var(--ink); border-radius: 50%; }
.rank-link { color: var(--accent); border: 1px solid var(--line); background: #fff; border-radius: 100px; padding: 8px 14px; font-size: 12px; font-weight: 750; white-space: nowrap; }
.rank-link:hover, .refresh:hover { background: #e7f6ef; }
.rank-link span { margin-left: 5px; }
main { padding: 24px 0 40px; }
.intro {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: 230px;
  overflow: hidden;
  margin-bottom: 20px;
  padding: 25px clamp(20px, 4vw, 47px) 28px;
  border: 1px solid #c8e5d8;
  border-radius: 30px;
  background: linear-gradient(110deg, #fff9f1 3%, #f2faed 42%, #cceee1 86%);
  box-shadow: 0 8px 21px #16493b14;
}
.intro::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 0 0 50%;
  background: radial-gradient(circle, #28887a60 1px, transparent 1.3px) 0 0 / 15px 15px;
  mask-image: linear-gradient(104deg, transparent 8%, #000 50%);
}
.intro-copy { position: relative; z-index: 1; }
.studio {
  display: inline-block;
  margin-bottom: 9px;
  color: #46665a;
  font: 700 11px var(--mono);
  letter-spacing: .08em;
}
.intro h1 { margin: 0 0 9px; font-size: clamp(33px, 5.9vw, 70px); font-weight: 900; line-height: 1.1; letter-spacing: -.085em; }
.intro h1 span { color: var(--accent); }
.intro p { margin: 0 0 19px; color: var(--muted); font-size: clamp(12px, 1.45vw, 15px); font-weight: 650; line-height: 1.6; }
.intro p strong { color: var(--accent); font-weight: 850; }
.intro p .vertical-emphasis { color: #ae2c49; font-size: 1.2em; }
.play-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 10px 15px;
  border: 1px solid #084e49;
  border-radius: 100px;
  background: #116d62;
  box-shadow: 0 4px #084842;
  color: #fff;
  font-size: 13px;
  font-weight: 850;
}
.play-link:hover { background: #1a7b6f; }
.play-link:active { transform: translateY(2px); box-shadow: 0 2px #084842; }
.play-link span:first-child { color: #ffdfaa; font-size: 10px; }
.play-link span:last-child { margin-left: 3px; color: #d9f7e8; }
.mascots {
  position: absolute;
  right: 4%;
  top: 50%;
  width: 355px;
  height: 202px;
  transform: translateY(-50%);
  transform-origin: right center;
  pointer-events: none;
}
.orbit {
  position: absolute;
  top: 24px;
  left: 28px;
  width: 299px;
  height: 151px;
  border: 1px dashed #4c9989;
  border-radius: 50%;
  background: radial-gradient(ellipse, #def5e8 0, #e6f8ee65 63%, transparent 72%);
  transform: rotate(-16deg);
}
.mascot {
  position: absolute;
  display: block;
  width: 90px;
  height: 72px;
  border: 2px solid #255c53;
  border-radius: 22px;
  box-shadow: inset 0 5px #ffffff88, 0 6px #408575, 0 10px 14px #174b3e2c;
  transform: rotate(var(--tilt)) scale(var(--scale, 1));
  animation: bob 4s ease-in-out infinite;
}
.mascot::before { width: 7px; height: 9px; box-shadow: 20px 0 var(--ink); }
.mascot i { position: absolute; left: 45%; top: 59%; width: 13px; height: 8px; border-bottom: 2px solid var(--ink); border-radius: 50%; }
.mascot i::before, .mascot i::after {
  content: "";
  position: absolute;
  top: 0;
  width: 8px;
  height: 4px;
  border-radius: 50%;
  background: #b6505855;
}
.mascot i::before { left: -15px; }
.mascot i::after { right: -17px; }
.mascot-pink { left: 125px; top: 17px; background: var(--pink); --tilt: -11deg; }
.mascot-mint { left: 37px; top: 70px; background: var(--mint); --tilt: -16deg; --scale: .83; animation-delay: -.9s; }
.mascot-yellow { left: 231px; top: 58px; background: var(--yellow); --tilt: 15deg; --scale: .85; animation-delay: -1.8s; }
.spark { position: absolute; color: #23796f; font-size: 31px; line-height: 1; font-style: normal; }
.spark-top { top: 13px; right: 28px; }
.spark-bottom { bottom: 33px; left: 43px; font-size: 22px; }
.hero-paddle {
  position: absolute;
  width: 107px;
  height: 15px;
  bottom: 13px;
  left: 152px;
  transform: rotate(-14deg);
  border: 2px solid #255c53;
  border-radius: 99px;
  background: linear-gradient(90deg, #a9efd9 42%, #ffdfaa 42% 58%, #a9efd9 58%);
  box-shadow: 0 3px #408575;
}
.hero-ball {
  position: absolute;
  width: 17px;
  height: 17px;
  left: 174px;
  bottom: 42px;
  border: 2px solid #347868;
  border-radius: 50%;
  background: #fff0bd;
  box-shadow: inset 0 2px #fff8, 0 0 0 4px #fff2bc7a;
}
@keyframes bob {
  0%, 100% { transform: rotate(var(--tilt)) scale(var(--scale, 1)); }
  50% { transform: translateY(-6px) rotate(var(--tilt)) scale(var(--scale, 1)); }
}
@media (prefers-reduced-motion: reduce) { .mascot { animation: none; } }
.layout { display: grid; grid-template-columns: minmax(0, 2.48fr) minmax(265px, 1fr); gap: 20px; align-items: start; }
.machine, .ranking { background: var(--panel); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 9px 27px #16493b13; }
.machine { padding: 0 10px; scroll-margin-top: 12px; }
.hud { display: grid; grid-template-columns: 1fr 1fr 1fr; align-items: center; padding: 13px 13px 12px; gap: 8px; }
.hud small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 11px; font-weight: 750; }
.hud strong { display: block; font: 750 clamp(18px, 3vw, 25px) var(--mono); color: var(--accent); white-space: nowrap; }
.hud > div:nth-child(2) { text-align: center; }
.hud > div:last-child { text-align: right; }
.ball-count { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-size: 13px; font-weight: 750; }
.ball-count i { width: 11px; height: 11px; border: 1px solid #984b63; border-radius: 50%; background: var(--pink); box-shadow: inset 0 2px #fff9; }
.playfield {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: radial-gradient(circle at 1px 1px, #a7e0ca3d 1px, transparent 1.4px) 0 0 / 19px 19px,
              radial-gradient(ellipse at 50% 0%, #225850, #142f32 83%);
}
.playfield canvas { display: block; width: 100%; aspect-ratio: 8 / 5; touch-action: none; }
.launch-hint {
  position: absolute;
  top: 52%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 8px 14px;
  border-radius: 24px;
  background: #fffdf5;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  pointer-events: none;
}
.overlay { position: absolute; inset: 0; display: grid; place-items: center; overflow: auto; padding: 8px; background: #0e2a2a47; }
.overlay-card {
  width: min(322px, 99%);
  margin: auto;
  padding: 19px 20px 22px;
  border: 1px solid #fff;
  border-radius: 22px;
  background: #fffdf5f7;
  box-shadow: 0 8px 25px #0b292a55;
  text-align: center;
}
.eyebrow { margin: 0; color: var(--accent); font: 800 10px var(--mono); letter-spacing: .16em; }
.overlay h2 { margin: 5px 0 7px; font-size: clamp(21px, 4vw, 31px); font-weight: 850; line-height: 1.18; letter-spacing: -.045em; overflow-wrap: anywhere; }
.overlay #detail { margin: 0 0 13px; color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.5; }
.overlay button {
  padding: 8px 18px;
  border: 1px solid #26786b;
  border-radius: 100px;
  background: #b9edda;
  box-shadow: 0 3px #26786b;
  color: #153c35;
  font-size: 13px;
  font-weight: 800;
}
.overlay button:hover { background: #d1f5e8; }
.overlay button:active { transform: translateY(2px); box-shadow: 0 1px #26786b; }
.status { margin: 12px 0 0; color: var(--muted); font-size: 11px; }
.status:empty, .ranking-status:empty { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.stage-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 0 12px; padding: 0; border: 0; }
.stage-picker label { position: relative; cursor: pointer; }
.stage-picker input { position: absolute; opacity: 0; }
.stage-picker label span {
  display: block;
  padding: 5px 3px;
  border: 1px solid #cfe5dc;
  border-radius: 10px;
  background: #fff;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
}
.stage-picker small { display: block; font-size: 9px; font-weight: 650; }
.stage-picker input:checked + span { background: #d3f2e4; border-color: #237a6e; }
.stage-picker input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.stage-picker label:has(input:disabled) { cursor: default; }
.stage-picker input:disabled + span { border-style: dashed; background: #f0f4ee; color: #536462; }
.extra-challenge { margin: -3px 0 11px; color: var(--accent); font-size: 11px; line-height: 1.45; }
.extra-challenge p { margin: 0; color: var(--muted); }
.extra-challenge strong { display: block; margin-top: 2px; }
.ranking-stage { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; color: var(--muted); font-size: 11px; font-weight: 750; }
.ranking-stage select { padding: 4px 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--accent); }
form { margin: 0 0 10px; }
form label { display: block; margin-bottom: 3px; text-align: left; color: var(--muted); font-size: 11px; font-weight: 650; }
.submit-row { display: flex; gap: 6px; }
.submit-row input { width: 100%; min-width: 0; padding: 6px 9px; border: 1px solid #91bbae; border-radius: 9px; background: white; color: var(--ink); font-size: 16px; }
.submit-row button { white-space: nowrap; }
.controls { display: flex; align-items: center; gap: 9px; min-height: 45px; padding: 6px 8px; flex-wrap: wrap; color: var(--muted); font-size: 11px; font-weight: 650; }
.keys { display: inline-flex; gap: 3px; }
kbd { min-width: 17px; padding: 0 3px; border: 1px solid #cfe5dc; border-radius: 4px; background: #ebf8f0; color: #135b52; text-align: center; }
.refresh { padding: 5px 10px; border: 1px solid var(--line); border-radius: 50px; background: #fff; color: var(--accent); font-size: 11px; font-weight: 750; }
.touch-controls { display: none; }
@media (any-pointer: coarse) {
  .controls .keys, .desktop-controls { display: none; }
  .controls:not(:has(.touch-controls:not([hidden]))) { display: none; }
  .touch-controls { display: grid; justify-items: end; gap: 6px; margin: 3px 0 3px auto; }
  .touch-controls label { display: flex; align-items: center; gap: 5px; }
  .touch-controls select { padding: 5px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--accent); font-size: 16px; }
  .touch-settings { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
  .machine { --trackpad-height: clamp(174px, 28dvh, 202px); }
  .touch-controls:has(.trackpad:not([hidden])) { width: 100%; }
  .trackpad {
    display: grid;
    place-content: center;
    gap: 6px;
    width: 100%;
    min-height: var(--trackpad-height);
    padding: 12px;
    border: 2px dashed #83b9a9;
    border-radius: 18px;
    background: #eaf8f1;
    color: var(--accent);
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
  }
  .trackpad span { font-size: 23px; }
  .touch-controls:has(.dual-sticks:not([hidden])) { width: 100%; }
  .sound-toggle { border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--accent); font-size: 11px; padding: 6px; }
  .dual-sticks { display: flex; justify-content: space-between; gap: 12px; width: 100%; text-align: center; }
  .dual-sticks > div { width: 104px; font-weight: 800; color: var(--accent); }
  .axis-stick { position: relative; isolation: isolate; height: 154px; display: grid; place-items: center; margin-top: 4px; border: 2px solid #aed5ca; border-radius: 26px; background: #eaf8f1; touch-action: none; user-select: none; -webkit-touch-callout: none; }
  .axis-buttons { height: 154px; margin-top: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; align-content: center; touch-action: none; user-select: none; -webkit-touch-callout: none; }
  .axis-buttons-vertical { grid-template-columns: 1fr; gap: 8px; }
  .axis-buttons button { min-width: 0; min-height: 58px; padding: 0; border: 1px solid #26786b; border-radius: 13px; background: #d3f2e4; color: #135b52; font-size: 24px; font-weight: 850; box-shadow: 0 2px #26786b; touch-action: none; }
  .axis-stick::before { content: ""; position: absolute; z-index: -1; border-radius: 99px; background: #c3e3d5; }
  #vertical-stick::before { width: 9px; top: 20px; bottom: 20px; }
  #horizontal-stick::before { height: 9px; left: 11px; right: 11px; }
  .axis-arrow { position: absolute; color: #135b52; font-size: 17px; line-height: 1; pointer-events: none; }
  #vertical-stick .axis-first { top: 5px; } #vertical-stick .axis-last { bottom: 5px; }
  #horizontal-stick .axis-first { left: 4px; } #horizontal-stick .axis-last { right: 4px; }
  .axis-stick .joystick-knob { width: 40px; height: 40px; }
  .direction-pad, .joystick { width: 204px; height: 204px; touch-action: none; user-select: none; -webkit-touch-callout: none; }
  .direction-pad { position: relative; }
  .direction-pad button {
    position: absolute;
    width: 52px;
    height: 52px;
    border: 1px solid #26786b;
    border-radius: 12px;
    background: #d3f2e4;
    color: #135b52;
    font-size: 18px;
    box-shadow: 0 2px #26786b;
    transform: translate(-50%, -50%);
    touch-action: none;
  }
  .direction-arrow {
    display: inline-block;
    width: .55em;
    height: .55em;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(45deg);
    pointer-events: none;
  }
  .axis-buttons [data-direction="90"] span { transform: rotate(135deg); }
  .axis-buttons [data-direction="180"] span { transform: rotate(225deg); }
  .axis-buttons [data-direction="270"] span { transform: rotate(315deg); }
  :is(.direction-pad, .axis-buttons, .axis-stick, .joystick),
  :is(.direction-pad, .axis-buttons, .axis-stick, .joystick) * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  .touch-controls button[data-held] { background: #116d62; color: white; box-shadow: none; }
  .direction-pad button:nth-child(1) { left: 86.00%; top: 50.00%; }
  .direction-pad button:nth-child(1) span { transform: rotate(45deg); }
  .direction-pad button:nth-child(2) { left: 75.46%; top: 75.46%; }
  .direction-pad button:nth-child(2) span { transform: rotate(90deg); }
  .direction-pad button:nth-child(3) { left: 50.00%; top: 86.00%; }
  .direction-pad button:nth-child(3) span { transform: rotate(135deg); }
  .direction-pad button:nth-child(4) { left: 24.54%; top: 75.46%; }
  .direction-pad button:nth-child(4) span { transform: rotate(180deg); }
  .direction-pad button:nth-child(5) { left: 14.00%; top: 50.00%; }
  .direction-pad button:nth-child(5) span { transform: rotate(225deg); }
  .direction-pad button:nth-child(6) { left: 24.54%; top: 24.54%; }
  .direction-pad button:nth-child(6) span { transform: rotate(270deg); }
  .direction-pad button:nth-child(7) { left: 50.00%; top: 14.00%; }
  .direction-pad button:nth-child(7) span { transform: rotate(315deg); }
  .direction-pad button:nth-child(8) { left: 75.46%; top: 24.54%; }
  .direction-pad button:nth-child(8) span { transform: rotate(360deg); }
  .joystick {
    display: grid;
    place-items: center;
    border: 2px solid #aed5ca;
    border-radius: 50%;
    background: radial-gradient(circle, #f5fcf7 17%, #d3f2e4 18%, #d3f2e4 43%, #eaf8f1 44%);
    box-shadow: inset 0 3px 10px #135b5222;
  }
  .joystick-knob { width: 56px; height: 56px; border: 2px solid #084842; border-radius: 50%; background: #277b6a; box-shadow: 0 3px #084842; pointer-events: none; }
}
html.touch-scroll-locked { overflow: hidden; overscroll-behavior: none; touch-action: none; }
html.touch-scroll-locked body { position: fixed; inset: var(--locked-top) 0 auto; width: 100%; overflow: hidden; overscroll-behavior: none; touch-action: none; }
@media (any-pointer: coarse) {
  .machine.touch-playing .playfield {
    max-width: min(100%, max(190px, calc((100dvh - 310px) * 1.6)));
    margin-inline: auto;
  }
}
@media (any-pointer: coarse) and (orientation: portrait) {
  .machine.touch-playing:has(.trackpad:not([hidden])) .playfield {
    max-width: min(100%, max(190px, calc((100dvh - var(--trackpad-height) - 119px) * 1.6)));
  }
}
@media (any-pointer: coarse) and (orientation: landscape) and (max-height: 560px) {
  .machine.touch-playing { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 8px; }
  .machine.touch-playing .hud { grid-column: 1 / -1; }
  .machine.touch-playing .playfield { width: 100%; max-width: max(190px, calc((100dvh - 74px) * 1.6)); }
  .machine.touch-playing .controls { padding-inline: 0; }
  .machine.touch-playing .touch-controls:has(.trackpad:not([hidden])) { width: 220px; }
  .trackpad { min-height: min(var(--trackpad-height), calc(100dvh - 120px)); }
  .machine.touch-playing:has(.dual-sticks:not([hidden])) { grid-template-columns: 104px minmax(0, 1fr) 104px; }
  .machine.touch-playing:has(.dual-sticks:not([hidden])) :is(.controls, .touch-controls, .dual-sticks) { display: contents; }
  .machine.touch-playing:has(.dual-sticks:not([hidden])) .playfield { grid-area: 2 / 2; max-width: max(190px, calc((100dvh - 112px) * 1.6)); }
  .machine.touch-playing .dual-sticks:not([hidden]) > div:first-child { grid-area: 2 / 1; }
  .machine.touch-playing .dual-sticks:not([hidden]) > div:last-child { grid-area: 2 / 3; }
  .machine.touch-playing:has(.dual-sticks:not([hidden])) .touch-settings { grid-area: 3 / 1 / 4 / -1; padding: 5px 0; }

}
.ranking { padding: 18px; scroll-margin-top: 12px; }
.rank-heading { display: flex; align-items: center; gap: 10px; padding-bottom: 13px; }
.rank-icon { flex: 0 0 39px; display: grid; place-items: center; height: 39px; background: #fff2cc; border: 1px solid #f5dfa0; color: #8b5b24; border-radius: 13px; font-size: 19px; }
.rank-heading h2 { margin: 0 0 2px; font-size: 19px; font-weight: 850; letter-spacing: -.035em; }
.rank-heading p { margin: 0; color: var(--muted); font-size: 11px; font-weight: 650; }
.table-wrap { max-height: 414px; overflow: auto; border-radius: 9px; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; font-size: 12px; }
thead { position: sticky; top: 0; background: #e8f5ed; }
th, td { padding: 8px 6px; overflow-wrap: anywhere; }
th { color: var(--muted); font-size: 10px; }
td { border-bottom: 1px solid #e4eee7; }
th:first-child { width: 36px; }
th:last-child { width: 76px; }
th:last-child, td:last-child { text-align: right; }
td:last-child { color: #135b52; font: 750 12px var(--mono); }
.own { background: #e2f7ee; }
.ranking-status { margin: 11px 0 0; padding: 15px 8px; border: 1px dashed #c0ded0; border-radius: 11px; color: var(--muted); font-size: 11px; text-align: center; }
.refresh { margin-top: 11px; }
.refresh span { margin-right: 2px; font-size: 15px; vertical-align: -1px; }
@media (max-width: 850px) {
  .header-inner, main { width: calc(100% - 38px); }
  .layout { grid-template-columns: 1fr; gap: 16px; }
  .mascots { right: 1%; transform: translateY(-50%) scale(.63); }
}
@media (max-width: 560px) {
  .header-inner, main { width: calc(100% - 22px); }
  .header-inner { min-height: 53px; }
  .brand { gap: 7px; font-size: 10px; }
  .brand-mark { transform: rotate(-11deg) scale(.8); }
  .rank-link { padding: 6px 9px; font-size: 10px; }
  main { padding: 14px 0 26px; }
  .intro { min-height: 174px; padding: 14px 14px 16px; margin-bottom: 13px; border-radius: 20px; }
  .intro h1 { font-size: clamp(25px, 7.8vw, 39px); margin-bottom: 6px; }
  .intro p { max-width: 70%; margin-bottom: 11px; font-size: 11px; }
  .studio { margin-bottom: 5px; font-size: 10px; }
  .play-link { padding: 7px 10px; gap: 6px; font-size: 11px; }
  .mascots { right: 1px; top: auto; bottom: 4px; transform: scale(.34); transform-origin: right bottom; }
  .machine { padding: 0 6px; border-radius: 18px; }
  .hud { padding: 8px 7px; }
  .playfield { border-radius: 12px; }
  .overlay { padding: 4px; }
  .overlay-card { padding: 9px 9px 12px; border-radius: 15px; width: min(270px, 94%); }
  .overlay h2 { margin: 3px 0; }
  .overlay #detail { margin-bottom: 6px; font-size: 11px; }
  .overlay button { padding: 4px 11px; font-size: 12px; }
  .status { margin-top: 7px; }
  .stage-picker { margin-bottom: 7px; }
  .extra-challenge { margin-bottom: 7px; font-size: 10px; }
  .controls { padding: 5px 3px; gap: 5px; font-size: 10px; min-height: 39px; }
  .ranking { border-radius: 18px; padding: 13px; }
}

.stats { max-width: 760px; }
.stats > p { color: var(--muted); line-height: 1.65; }
.stats > p a { color: var(--accent); text-decoration: underline; }
.stats-section { margin-top: 18px; }
.stats-section h2 { margin: 0 0 10px; font-size: 18px; }
.stats-section th:first-child { width: 37%; }
.stats-section tbody th { font-size: 12px; }
.stats-section :is(td, th):not(:first-child) { text-align: right; }
