@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/barlow-condensed-700.woff2") format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: italic; font-display: swap; src: url("/fonts/barlow-condensed-800-italic.woff2") format("woff2"); }

:root {
  --pitch: #0f3d2a;
  --pitch-light: #1a5c40;
  --panel: #0a2a1d;
  --chalk: #f4f7f2;
  --muted: #a9c2b4;
  --line: #2e6a50;
  --accent: #ffcf33;
  --accent-ink: #1b1600;
  --bad: #ff7a6b;
  --good: #63e6a3;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; min-height: 100%; }

body {
  background: var(--pitch);
  color: var(--chalk);
  font: 500 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

#app {
  width: 100%;
  max-width: 460px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 44px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.center { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; }

h1 { margin: 0; font-size: 44px; line-height: 1; font-weight: 900; letter-spacing: -.02em; }
h2 { margin: 0; font-size: 26px; font-weight: 800; }
p { margin: 0; color: var(--muted); }

.dot-logo { width: 22px; height: 22px; border-radius: 50%; background: var(--chalk); box-shadow: 0 0 0 5px var(--pitch-light); margin-bottom: 8px; }

label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }

input[type=text] {
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--chalk);
  font: inherit;
  font-size: 18px;
}

button {
  font: inherit;
  font-weight: 800;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  min-height: 52px;
  padding: 12px 14px;
  color: var(--accent-ink);
  background: var(--accent);
  touch-action: manipulation;
}
button.ghost { background: transparent; color: var(--chalk); border: 1px solid var(--line); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible { outline: 3px solid var(--chalk); outline-offset: 2px; }

.swatches { display: flex; gap: 8px; justify-content: space-between; }
.swatch { width: 42px; height: 42px; min-height: 0; padding: 0; border-radius: 50%; border: 3px solid transparent; }
.swatch[aria-pressed=true] { border-color: var(--chalk); box-shadow: 0 0 0 2px var(--pitch); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.link-box { word-break: break-all; font-size: 15px; color: var(--chalk); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.seat { display: flex; align-items: center; gap: 10px; }
.chip { width: 14px; height: 14px; border-radius: 50%; flex: none; border: 1px solid #ffffff66; }
.seat .state { margin-left: auto; font-size: 14px; color: var(--muted); }

.score { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; }
.score-top { display: flex; justify-content: space-between; align-items: center; min-height: 28px; font-size: 13px; color: var(--muted); }
.timer { font-size: 20px; font-weight: 900; color: var(--accent); font-variant-numeric: tabular-nums; }
.timer.low { color: var(--bad); }
.score-row { display: grid; grid-template-columns: 14px 1fr auto 26px; align-items: center; gap: 8px; min-height: 30px; }
.score-row .name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.you { font-size: 11px; color: var(--muted); font-weight: 600; }
.dots { display: flex; gap: 4px; }
.kick { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--muted); }
.kick.goal { background: var(--good); border-color: var(--good); }
.kick.fail { background: var(--bad); border-color: var(--bad); }
.total { text-align: right; font-weight: 900; font-size: 20px; }

.stage { position: relative; border-radius: 14px; overflow: hidden; background: var(--pitch-light); }
.stage svg { display: block; width: 100%; height: auto; }
.zone { fill: transparent; }
.zone.on { cursor: pointer; }
.zone-mark { fill: transparent; }
.zone-mark.mine { fill: #ffcf3366; }
.keeper, .ball, .runner { transition: transform .55s cubic-bezier(.2, .8, .3, 1); transform-box: fill-box; transform-origin: center; }
.runner { transition-duration: .7s; }
.ball { transform-box: view-box; transform-origin: 0 0; transition-duration: .9s; transition-timing-function: cubic-bezier(.12, .75, .2, 1); }
.keeper { transition-duration: .6s; }
.instant * { transition: none !important; }
.stage svg { transition: transform .7s ease-in-out; transform-origin: 50% 22%; }
.stage.tense svg { transform: scale(1.14); }
.stage.quake { animation: quake .4s ease-out; }
@keyframes quake { 25% { transform: translate(-4px, 2px); } 50% { transform: translate(4px, -2px); } 75% { transform: translate(-2px, 1px); } }
.trail { fill: none; stroke: #ffcf33; stroke-width: 5; stroke-linecap: round; opacity: 0; stroke-dasharray: 1; stroke-dashoffset: 1; }
.trail.on { opacity: .8; stroke-dashoffset: 0; transition: stroke-dashoffset .9s cubic-bezier(.12, .75, .2, 1); }
.burst { fill: #fff; opacity: 0; transform-box: fill-box; transform-origin: center; }
.burst.on { animation: burst .5s ease-out; }
@keyframes burst { from { opacity: .9; transform: scale(.3); } to { opacity: 0; transform: scale(1.6); } }
.confetti { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.confetti i { position: absolute; top: -12px; width: 7px; height: 11px; animation: fall 1.7s ease-in forwards; }
@keyframes fall { to { transform: translate(var(--drift), 470px) rotate(540deg); } }
.stats { position: relative; overflow: hidden; }
.streak-title { font-size: 20px; font-weight: 800; }
.streak-title.hot { color: var(--accent); font-size: 26px; font-weight: 900; }
.streak-bar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.streak-bar span { height: 8px; border-radius: 4px; background: var(--line); }
.streak-bar span.on { background: var(--accent); }
.recent-head { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-top: 4px; }
.recent { display: flex; gap: 8px; }
.result { flex: 1; height: 36px; display: grid; place-items: center; border-radius: 8px; border: 1.5px solid var(--line); font-weight: 900; }
.result.win { background: var(--good); border-color: var(--good); color: #06281a; }
.result.loss { background: var(--bad); border-color: var(--bad); color: #3a0d07; }
.home { align-items: stretch; text-align: center; gap: 14px; }
.hero { width: 74%; max-width: 280px; margin: 0 auto 4px; }
.home h1 { font: italic 800 72px/.92 "Barlow Condensed", system-ui, sans-serif; letter-spacing: .01em; }
.tagline { font-size: 17px; margin-bottom: 12px; }
.play-row { display: grid; grid-template-columns: 1fr 64px; gap: 10px; }
.home button { font-family: "Barlow Condensed", system-ui, sans-serif; font-weight: 700; letter-spacing: .05em; }
.home button.play { min-height: 68px; font-size: 26px; }
.home button.kit { min-height: 68px; padding: 0; display: grid; place-items: center; color: var(--chalk); background: var(--panel); border: 1px solid var(--line); }
.home button.link { min-height: 44px; padding: 8px; color: var(--accent); background: transparent; font-size: 19px; letter-spacing: .02em; }
.home button.link.small { min-height: 34px; font-size: 16px; }
.account { display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); font-size: 15px; }
.auth { position: relative; gap: 12px; }
.auth-brand { text-align: center; font: 700 26px "Barlow Condensed", system-ui, sans-serif; letter-spacing: .18em; padding-top: 6px; }
.auth-sub { text-align: center; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; margin: 0 -14px; }
.tabs .tab { min-height: 52px; border-radius: 0; color: var(--muted); background: transparent; border-top: 2px solid var(--line); font-family: "Barlow Condensed", system-ui, sans-serif; font-size: 18px; letter-spacing: .05em; }
.tabs .tab[aria-pressed=true] { color: var(--accent); border-top-color: var(--accent); }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form > button[type=submit] { font-family: "Barlow Condensed", system-ui, sans-serif; font-size: 20px; letter-spacing: .05em; }
.field { display: flex; }
.field input { flex: 1; min-width: 0; }
.field input[type=password], .field:has(.eye) input { border-radius: 10px 0 0 10px; border-right: 0; }
.field .eye { min-height: 0; width: 50px; flex: none; padding: 0; display: grid; place-items: center; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 0 10px 10px 0; }
input[type=email], input[type=password] { width: 100%; padding: 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--chalk); font: inherit; font-size: 16px; }
.field input[type=text] { font-size: 16px; }
.close { position: absolute; top: 6px; right: 6px; min-height: 44px; width: 44px; padding: 0; font-size: 26px; font-weight: 400; color: var(--muted); background: transparent; }
.hint { font-size: 14px; }
button.danger { color: #fff; background: #b3382a; }
button.danger-link { color: var(--bad); }
.privacy { color: var(--muted); font-size: 14px; }
.legal { display: block; padding-bottom: 32px; }
.legal h3 { margin: 22px 0 6px; }
.legal p { margin: 0 0 10px; }
.legal a { color: var(--accent); }
.search-clock { font: italic 800 96px/1 "Barlow Condensed", system-ui, sans-serif; color: var(--accent); text-align: center; font-variant-numeric: tabular-nums; }
#online { position: fixed; top: 8px; right: 10px; z-index: 5; display: flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--chalk); background: var(--panel); border: 1px solid var(--line); }
#online[hidden] { display: none; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); }
.consent { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 10; max-width: 436px; margin: 0 auto; }
.consent a { color: var(--accent); }
.legal-links { display: flex; justify-content: center; align-items: center; gap: 14px; }
button.plain { min-height: 0; padding: 0; font: inherit; font-size: 14px; letter-spacing: 0; text-decoration: underline; background: transparent; }
.home button.plain { font-family: inherit; font-weight: 500; letter-spacing: 0; }
.home button.kit.nudge { color: var(--accent); border-color: var(--accent); animation: kit-pulse 1.6s ease-out infinite; }
@keyframes kit-pulse {
  0% { box-shadow: 0 0 0 0 #ffcf33aa; transform: scale(1); }
  35% { transform: scale(1.06); }
  70% { box-shadow: 0 0 0 12px #ffcf3300; transform: scale(1); }
  100% { box-shadow: 0 0 0 0 #ffcf3300; }
}
.home button.kit-hint { position: relative; align-self: flex-end; min-height: 36px; margin-top: -4px; padding: 6px 12px; font-family: inherit; font-size: 14px; font-weight: 700; letter-spacing: 0; color: var(--accent-ink); background: var(--accent); border-radius: 10px; }
.kit-hint::before { content: ""; position: absolute; top: -6px; right: 26px; border: 6px solid transparent; border-top: 0; border-bottom-color: var(--accent); }
.rating-line { color: var(--accent); font-weight: 700; }
.board { width: 100%; border-collapse: collapse; font-size: 15px; }
.board th { text-align: left; font-size: 12px; color: var(--muted); padding: 4px; }
.board td { padding: 8px 4px; border-top: 1px solid var(--line); }
.board .who { font-weight: 700; word-break: break-word; }
.home button.wide { min-height: 52px; font-size: 20px; background: var(--panel); }
button.mute { min-height: 32px; padding: 2px 8px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted); background: transparent; border: 1px solid var(--line); margin-left: 8px; }
.banner.good { color: var(--good); }
.banner.bad { color: var(--bad); }
.net.shake { animation: net-shake .4s ease-out; transform-box: fill-box; transform-origin: top center; }
@keyframes net-shake { 30% { transform: scaleY(.86); } 65% { transform: scaleY(1.05); } }
.cheer .fan { animation: fan-jump .42s ease-in-out 5 alternate; }
.cheer .fan-1 { animation-delay: .1s; }
.cheer .fan-2 { animation-delay: .2s; }
@keyframes fan-jump { to { transform: translateY(-3px); } }

.banner {
  position: absolute;
  inset: auto 0 28%;
  padding: 10px;
  text-align: center;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: .04em;
  background: #000000a8;
  animation: pop .25s ease-out;
}
@keyframes pop { from { transform: scale(.8); } }

.prompt { text-align: center; font-weight: 700; min-height: 24px; color: var(--chalk); }
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.choices button { min-height: 62px; padding: 8px 4px; font-size: 15px; }
.choices button.mine { outline: 3px solid var(--chalk); }

.notice { background: #5a1f17; border-radius: 10px; padding: 10px 12px; text-align: center; font-size: 14px; color: var(--chalk); }

@media (prefers-reduced-motion: reduce) {
  .home button.kit.nudge, .stage svg, .keeper, .ball, .runner, .trail, .banner, .burst, .quake, .net.shake, .cheer .fan { transition: none; animation: none; }
}
