:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #101538;
  color: #f0f4ff;
  --surface: #192451;
  --line: #394d82;
  --accent: #e2fa71;
  --muted: #bdc8ea;
}
* { box-sizing: border-box; }
body { min-width: 0; margin: 0; }
a { color: #dcf58b; text-underline-offset: .2em; }
a:hover { color: #fff7a3; }
button, .button, input, select { font: inherit; }
button, .button, input, select, a { -webkit-tap-highlight-color: transparent; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .62rem 1rem;
  border: 1px solid transparent;
  border-radius: .65rem;
  background: var(--accent);
  color: #131d29;
  font-weight: 750;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
}
button:hover, .button:hover { background: #f1ffae; color: #131d29; }
button:disabled { opacity: .55; cursor: wait; }
button.secondary, .button.secondary { background: #24345f; border-color: #53669a; color: #eff4ff; }
button.secondary:hover, .button.secondary:hover { background: #354a7e; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #f5e675; outline-offset: 3px; }
button[hidden], section[hidden], p[hidden] { display: none; }
input, select {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  border: 1px solid #6474a7;
  border-radius: .5rem;
  background: #121b3e;
  color: #fff;
  padding: .55rem .65rem;
}
input[type=checkbox] { width: 1.15rem; min-height: 1.15rem; margin: .2rem 0 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 6.5vw, 3.65rem); line-height: 1.06; letter-spacing: -.055em; overflow-wrap: anywhere; }
h2 { font-size: 1.2rem; line-height: 1.25; }
h3 { font-size: 1.05rem; }
p { line-height: 1.5; }
.top {
  max-width: 1060px;
  min-height: 64px;
  padding: max(.65rem, env(safe-area-inset-top)) 1rem .65rem;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  border-bottom: 1px solid #41528a;
}
.brand { text-decoration: none; font-size: 1.45rem; font-weight: 900; letter-spacing: -.095em; color: #fff; white-space: nowrap; }
.brand span { color: var(--accent); }
.nav { display: flex; flex-wrap: wrap; justify-content: end; gap: .3rem .9rem; font-size: .9rem; }
.page, .game-layout { width: min(100% - 2rem, 860px); margin: 0 auto; padding-block: clamp(1.7rem, 5vw, 4rem); }
.page { display: grid; gap: 1.15rem; }
.page section:not(.rank) { display: grid; gap: .7rem; }
.narrow { max-width: 530px; }
.feature, .game-row { display: flex; gap: 1rem; align-items: center; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.feature > div + div, .game-row > div:first-child { display: grid; gap: .5rem; justify-items: start; }
.feature-art { min-width: 80px; }
.feature img { width: 100%; max-width: 100px; height: auto; }
.muted { color: var(--muted); font-size: .9rem; }
.empty { padding: .8rem 1rem; border: 1px dashed var(--line); border-radius: .65rem; color: var(--muted); }
.honor-head { display: flex; gap: .9rem; align-items: center; }
.honor-head > div { min-width: 0; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 3.7rem; aspect-ratio: 1; background: #243a75; border: 1px solid var(--line); border-radius: 1.05rem; font-size: 1.9rem; }
.ranks { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.rank { background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; padding: clamp(.6rem, 2.5vw, 1.1rem); }
.rank strong { display: block; color: var(--accent); font-size: clamp(1.75rem, 7vw, 3.6rem); margin: .15rem 0; }
.rank a { font-size: .85rem; }
.game-row { flex-wrap: wrap; justify-content: space-between; }
.actions, .share { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.share-fallback { flex-basis: 100%; }
.standings { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid var(--line); }
td small { display: inline-block; margin-left: .5rem; color: var(--muted); }
.stack, .stack label { display: grid; gap: .55rem; }
.stack { gap: .85rem; align-content: start; }
.stack + .stack { border-top: 1px solid var(--line); padding-top: 1rem; }
.stack .check { display: flex; align-items: start; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.field-pair label { min-width: 0; }
.score-note {
  display: grid;
  gap: .25rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: .8rem;
  background: var(--surface);
}
.score-note strong { color: var(--accent); font-size: 1.4rem; }
.score-note span { color: var(--muted); }
.error { color: #ffc0b7; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.game { background: radial-gradient(ellipse at 50% 0%, #132c53 0%, #0a172f 54%, #070e20 100%); min-height: 100dvh; }
.game .top { border-color: #2b456e; }
.game-settings { display: flex; gap: .5rem; align-items: center; }
.game-settings select { width: auto; }
.game-settings .compact { min-width: 44px; padding-inline: .55rem; }
.game-layout { max-width: 980px; display: grid; gap: .8rem; padding-top: clamp(.8rem, 3vw, 2rem); }
.intro { display: grid; gap: .35rem; }
.intro h1 { font-size: clamp(2.1rem, 9vw, 4.25rem); }
.intro p, .competition p { color: #d3e1f0; }
.target, .saved { border-left: 3px solid #d6f46b; padding-left: .6rem; }
.arena {
  height: min(52dvh, 450px);
  min-height: 255px;
  position: relative;
  overflow: hidden;
  border-radius: 1.2rem;
  border: 1px solid #4c6591;
  background-color: #0b1a35;
  background-image: radial-gradient(ellipse at 48% 73%, #122d56 0%, transparent 70%),
    repeating-linear-gradient(0deg, transparent, transparent 25px, #46618a22 26px),
    repeating-linear-gradient(90deg, transparent, transparent 25px, #46618a22 26px);
  touch-action: manipulation;
}
.arena canvas { display: block; width: 100%; height: 100%; }
.arena-actions { position: absolute; inset: auto .75rem .75rem; display: flex; justify-content: center; pointer-events: none; }
.arena-actions button { pointer-events: auto; min-width: min(100%, 11rem); }
.live-score { position: absolute; z-index: 1; top: .75rem; left: .85rem; font-size: 2rem; line-height: 1; font-weight: 850; color: #edf5ff; pointer-events: none; }
.result { display: grid; gap: .5rem; padding: .8rem; background: #172c51; border: 1px solid #455f8d; border-radius: .9rem; }
.result h2 { color: #e3f98e; }
.notice:empty { display: none; }
.competition { display: grid; gap: .35rem; padding: .75rem 0 max(.8rem, env(safe-area-inset-bottom)); }
@media (min-width: 780px) {
  .game-layout { grid-template-columns: minmax(0, 1fr) 240px; column-gap: 1.3rem; }
  .intro, .arena, .notice, .result { grid-column: 1; }
  .competition { grid-column: 2; grid-row: 2; align-content: start; padding: .85rem; border: 1px solid #3e5683; border-radius: .9rem; background: #132548; }
}
@media (max-width: 360px) {
  .nav { gap: .25rem .6rem; font-size: .79rem; }
  .feature-art { min-width: 64px; }
  .field-pair { grid-template-columns: 1fr; }
}
