/* Layout: one phone-first column on a mown-turf page. Match Pop's turf green, lime and navy frame the app;
   on a team's pages --team / --team-accent / --on-team / --on-accent switch to that team's kit (set from app.js). */
:root {
  --team: #1F7A32;
  --team-accent: #8CE02A;
  --on-team: #F4F7F2;
  --on-accent: #10200A;
  --navy: #0E1E3D;
  --chalkline: rgba(255,255,255,.55);
  --bg: color-mix(in srgb, var(--team) 4%, #F8FAF6);
  --bg-stripe: color-mix(in srgb, var(--team) 8%, #F2F6F0);
  --surface: #FFFFFF;
  --ink: color-mix(in srgb, var(--team) 22%, #121614);
  --muted: color-mix(in srgb, var(--team) 18%, #5E6863);
  --line: color-mix(in srgb, var(--team) 14%, #D6DBD7);
  --pitch: var(--team);
  --pitch-deep: color-mix(in srgb, var(--team) 72%, #000);
  --chalk: var(--on-team);
  --chalk-dim: color-mix(in srgb, var(--on-team) 72%, transparent);
  --accent: var(--team-accent);
  --red: #C4302A;
  --live: #D8381E;
  --good: #1D7A47;
  --water: #2F7FB8;
  --shadow: 0 1px 2px rgba(19,36,27,.06), 0 8px 24px rgba(19,36,27,.06);
  --f-brand: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", sans-serif;
  --f-display: "Big Shoulders Display", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --f-body: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
/* Theme: <html data-theme="light|dark"> is the viewer's choice; with no attribute ("System") the device setting decides.
   The dark values appear twice so both the device setting and an explicit choice reach them. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: color-mix(in srgb, var(--team) 10%, #121815);
    --bg-stripe: color-mix(in srgb, var(--team) 15%, #141B17);
    --navy: #DCE6FF;
    --surface: color-mix(in srgb, var(--team) 10%, #1B221E);
    --ink: #E9EFEB; --muted: #A3AFA8;
    --line: color-mix(in srgb, var(--team) 22%, #2E3732);
    --red: #EE5A4E; --live: #FF5B3D; --good: #4CC07F;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: color-mix(in srgb, var(--team) 10%, #121815);
  --bg-stripe: color-mix(in srgb, var(--team) 15%, #141B17);
  --navy: #DCE6FF;
  --surface: color-mix(in srgb, var(--team) 10%, #1B221E);
  --ink: #E9EFEB; --muted: #A3AFA8;
  --line: color-mix(in srgb, var(--team) 22%, #2E3732);
  --red: #EE5A4E; --live: #FF5B3D; --good: #4CC07F;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink);
  /* mowing stripes */
  background: repeating-linear-gradient(180deg, var(--bg) 0 72px, var(--bg-stripe) 72px 144px);
  background-color: var(--bg);
  min-height: 100vh; font-family: var(--f-body); font-size: 15px; line-height: 1.45;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: calc(20px + env(safe-area-inset-top, 0px)) calc(64px + env(safe-area-inset-bottom, 0px));
}
[hidden] { display: none !important; }
.wrap { max-width: 600px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; letter-spacing: .01em; }
a { color: inherit; }
button { font: inherit; color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-brand); font-size: 24px; letter-spacing: .01em; text-decoration: none; color: var(--navy); }
.brand-logo { width: 44px; height: 44px; flex: none; filter: drop-shadow(0 2px 3px rgba(0,0,0,.18)); transition: transform .3s ease; }
.brand:hover .brand-logo { transform: rotate(-12deg) scale(1.06); }
h1, .team-head h1 { font-family: var(--f-brand); font-weight: 400; text-transform: none; letter-spacing: .005em; }

/* Signed-out landing */
.hero { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: center; padding-block: 8px; }
.hero-logo { width: 200px; height: 200px; filter: drop-shadow(0 10px 18px rgba(0,0,0,.22)); animation: bounce-in .7s cubic-bezier(.2,1.4,.4,1) both; }
.hero h1 { font-size: clamp(34px, 7vw, 46px); line-height: 1.02; color: var(--navy); }
.hero-copy { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.hero-copy p { margin: 0; color: var(--muted); max-width: 44ch; font-size: 16px; }
.hero-ctas { display: flex; gap: 8px; flex-wrap: wrap; }
.btn.big { min-height: 50px; padding: 12px 20px; font-size: 16px; border-radius: 12px; }
@keyframes bounce-in { from { transform: translateY(-24px) scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 560px) {
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hero-logo { width: 168px; height: 168px; }
  .hero-copy { align-items: center; }
  .hero-ctas { justify-content: center; }
}
/* A little pitch drawn in chalk, holding the feature list */
.pitch-card { position: relative; overflow: hidden; border-radius: 18px; color: #F4F8F1; padding: 22px 18px;
  background: repeating-linear-gradient(90deg, #1F7A32 0 56px, #23863A 56px 112px); box-shadow: var(--shadow); border: 3px solid var(--chalkline); }
.pitch-lines { position: absolute; inset: 0; pointer-events: none; }
.pitch-lines span { position: absolute; border: 2px solid rgba(255,255,255,.28); }
.pitch-lines .halfway { left: 50%; top: 0; bottom: 0; width: 0; border-width: 0 0 0 2px; }
.pitch-lines .circle { left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; }
.pitch-lines .box { top: 28%; bottom: 28%; width: 11%; }
.pitch-lines .box.left { left: -2px; border-left: 0; }
.pitch-lines .box.right { right: -2px; border-right: 0; }
.features { position: relative; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.features li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 2px 10px; background: rgba(9,30,16,.45); border-radius: 12px; padding: 12px; backdrop-filter: blur(2px); }
.features .ico { grid-row: span 2; width: 34px; height: 34px; padding: 7px; border-radius: 50%; background: #8CE02A; color: #10200A; }
.features b { font-family: var(--f-brand); font-weight: 400; font-size: 18px; line-height: 1.1; }
.features span { font-size: 13.5px; color: rgba(244,248,241,.82); }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* Loading: a rolling ball */
.loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-weight: 600; }
.loading::before { content: "⚽"; font-size: 22px; display: inline-block; animation: roll 1s linear infinite; }
@keyframes roll { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading::before, .hero-logo, .brand-logo { animation: none; transition: none; } }
.topright { display: flex; align-items: center; gap: 12px; }
.linkbtn { background: none; border: 0; padding: 6px 0; color: var(--muted); font-weight: 600; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; text-decoration: none; }
.linkbtn:hover { color: var(--ink); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 13px; cursor: pointer; }

.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--pitch); border-color: var(--pitch); color: var(--chalk); }
.btn.primary:hover { background: var(--pitch-deep); }
.btn.danger { color: var(--red); }
.btn.small { min-height: 34px; padding: 6px 11px; font-size: 13.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.ico { width: 18px; height: 18px; flex: none; }

.team-head { display: flex; flex-direction: column; gap: 4px; }
.team-head h1 { font-size: clamp(34px, 9vw, 48px); font-weight: 900; text-transform: uppercase; line-height: .95; }
.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.rolechip { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.rolechip.admin { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.rolechip.removed { color: var(--red); }

.board {
  position: relative; overflow: hidden; border-radius: 18px; color: var(--chalk);
  background: repeating-linear-gradient(90deg, transparent 0 44px, rgba(255,255,255,.035) 44px 88px), linear-gradient(180deg, var(--pitch), var(--pitch-deep));
  padding: 18px 18px 20px; box-shadow: var(--shadow);
}
.board::before { content: ""; position: absolute; left: 50%; top: 50%; width: 170px; height: 170px; margin: -85px 0 0 -85px; border: 2px solid color-mix(in srgb, var(--on-team) 12%, transparent); border-radius: 50%; pointer-events: none; }
.board::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: color-mix(in srgb, var(--on-team) 12%, transparent); pointer-events: none; }
.board > * { position: relative; z-index: 1; }
.board-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--chalk-dim); flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 9px; border-radius: 999px; background: color-mix(in srgb, var(--on-team) 15%, transparent); color: var(--chalk); white-space: nowrap; }
.chip.live { background: var(--live); color: #fff; }
.chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: pulse 1.4s ease-in-out infinite; }
.chip.water { background: var(--water); color: #fff; }
.chip.stopped { background: var(--accent); color: var(--on-accent); }
@keyframes pulse { 50% { opacity: .25; } }
.score-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin-top: 16px; }
.side { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.side.away { text-align: right; align-items: flex-end; }
.side .nm { font-family: var(--f-display); font-weight: 800; font-size: 20px; line-height: 1.05; text-transform: uppercase; overflow-wrap: anywhere; }
.side .tag { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--chalk-dim); font-weight: 600; }
.score { font-family: var(--f-display); font-weight: 900; font-size: clamp(64px, 20vw, 92px); line-height: .85; display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.score .dash { font-size: .5em; opacity: .5; }
.clock { margin-top: 16px; display: flex; justify-content: center; align-items: baseline; gap: 8px; font-family: var(--f-display); font-weight: 800; font-size: 34px; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.clock .extra { font-size: 20px; color: var(--accent); }
.clock-sub { text-align: center; font-size: 12.5px; color: var(--chalk-dim); margin-top: 2px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.ctl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ctl-grid .wide { grid-column: 1 / -1; }
.btn.goal { border: 1.5px solid var(--pitch); }
.btn.phase { min-height: 50px; font-size: 16px; }
.btn.resume { background: var(--accent); border-color: var(--accent); color: var(--on-accent); min-height: 50px; font-size: 16px; }
.cardswatch { width: 11px; height: 15px; border-radius: 2px; background: #E9B820; flex: none; display: inline-block; }
.cardswatch.red { background: var(--red); }
.note { font-size: 13px; color: var(--muted); }
.sec { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.sec h2 { font-size: 22px; font-weight: 800; text-transform: uppercase; }

.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ev { display: grid; grid-template-columns: 52px 28px minmax(0,1fr) auto; gap: 10px; align-items: start; padding: 12px 0; border-top: 1px solid var(--line); }
.ev:first-child { border-top: 0; }
.ev .min { font-family: var(--f-display); font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; text-align: right; line-height: 1.2; }
.ev .badge { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); }
.ev.goal .badge { background: var(--pitch); border-color: var(--pitch); color: var(--chalk); }
.ev.goal.them .badge { background: var(--surface); border-color: var(--muted); color: var(--ink); }
.ev .body { min-width: 0; overflow-wrap: anywhere; }
.ev .title { font-weight: 700; }
.ev .detail { color: var(--muted); font-size: 13.5px; }
.ev .by { color: var(--muted); font-size: 12px; margin-top: 2px; }
.ev.phase .title { text-transform: uppercase; letter-spacing: .06em; font-size: 13px; }
.evbtns { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rm { background: none; border: 0; color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 4px 2px; }
.rm.arm { color: var(--red); font-weight: 700; }
.runscore { font-family: var(--f-display); font-weight: 800; margin-left: 6px; font-variant-numeric: tabular-nums; }

.mlist { display: flex; flex-direction: column; gap: 8px; }
.mrow { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: center; text-align: left; width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; }
.mrow:hover { border-color: var(--muted); }
.mrow.sel { border-color: var(--pitch); box-shadow: inset 3px 0 0 var(--pitch); }
.mrow .opp { font-weight: 700; overflow-wrap: anywhere; }
.mrow .when { font-size: 13px; color: var(--muted); }
.mrow .res { font-family: var(--f-display); font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; }
.mrow .chip, .tcard .chip { background: var(--bg); color: var(--muted); }
.mrow .chip.live, .tcard .chip.live { background: var(--live); color: #fff; }
.calmark { font-size: 11px; color: var(--muted); }
.wl { font-family: var(--f-body); font-size: 11px; font-weight: 700; width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); }
.wl.w { background: var(--good); border-color: var(--good); color: #fff; }
.wl.l { background: var(--red); border-color: var(--red); color: #fff; }

.teams { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.tcard { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; cursor: pointer; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 4px 12px; text-decoration: none; }
.tcard:hover { border-color: var(--muted); }
.crest { grid-row: span 3; width: 40px; height: 40px; border-radius: 50%; background: conic-gradient(var(--c1) 0 50%, var(--c2) 50% 100%); border: 2px solid var(--line); align-self: start; }
.tcard .tn { font-family: var(--f-display); font-weight: 900; font-size: 26px; text-transform: uppercase; line-height: 1; }
.tcard .tc { color: var(--muted); font-size: 13.5px; }
.tcard .ts { font-size: 13.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.empty { border: 1.5px dashed var(--line); border-radius: 14px; padding: 22px 18px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty h3 { font-size: 22px; text-transform: uppercase; font-weight: 800; }
.empty p { margin: 0; color: var(--muted); max-width: 42ch; }
.empty .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.banner { border-radius: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); font-size: 14px; }
.banner.warn { border-color: var(--accent); }

.members { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.member { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.member:first-child { border-top: 0; }
.member .who { min-width: 0; overflow-wrap: anywhere; }
.member .who b { display: block; }
.member .who span { font-size: 12.5px; color: var(--muted); }
.member .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }

.scrim { position: fixed; inset: 0; background: rgba(5,10,8,.5); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
@media (min-width: 640px) { .scrim { align-items: center; } }
.sheet { background: var(--surface); width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; border-radius: 18px 18px 0 0; padding: 20px max(18px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(18px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 640px) { .sheet { border-radius: 18px; } }
.sheet h2 { font-size: 26px; font-weight: 900; text-transform: uppercase; }
.sheet h3 { font-size: 18px; font-weight: 800; text-transform: uppercase; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .field .lbl { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; width: 100%; min-height: 44px; }
.field textarea { min-height: 96px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg label { flex: 1; text-align: center; cursor: pointer; padding: 10px 6px; font-weight: 600; font-size: 14px; color: var(--muted); display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; }
.seg label + label { border-left: 1px solid var(--line); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--pitch); color: var(--chalk); }
.seg label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.err { color: var(--red); font-size: 13.5px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

.colors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.colorfield { display: flex; align-items: center; gap: 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; }
.colorfield input[type=color] { width: 40px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; min-height: 0; }
.colorfield code { font-size: 13px; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.preset { width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; background: conic-gradient(var(--c1) 0 50%, var(--c2) 50% 100%); padding: 0; }
.preview { border-radius: 12px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 900; font-size: 22px; text-transform: uppercase; }
.preview .pa { font-family: var(--f-body); font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; letter-spacing: .08em; }

.emojis { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.emo { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; width: 38px; height: 38px; font-size: 19px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.stickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.stickopt { position: relative; cursor: pointer; border: 2px solid transparent; border-radius: 14px; padding: 2px; display: flex; min-width: 0; }
.stickopt input { position: absolute; opacity: 0; pointer-events: none; }
.stickopt:has(input:checked) { border-color: var(--pitch); }
.stickopt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.stickopt.none { align-items: center; justify-content: center; border-color: var(--line); border-style: dashed; color: var(--muted); font-weight: 600; font-size: 13px; min-height: 48px; }
.stickopt.none:has(input:checked) { border-style: solid; border-color: var(--pitch); color: var(--ink); }
.stickopt .sticker { width: 100%; }
.sticker { --sb: var(--accent); --sf: var(--on-accent); display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 12px; background: var(--sb); color: var(--sf); transform: rotate(-1.5deg); box-shadow: 0 2px 0 rgba(0,0,0,.18); max-width: 100%; min-width: 0; }
.sticker.angry { --sb: #C4302A; --sf: #FFFFFF; }
.sticker.hype { --sb: var(--pitch); --sf: var(--chalk); transform: rotate(1.5deg); }
.sticker.chill { --sb: var(--water); --sf: #FFFFFF; transform: rotate(1deg); }
.sticker .se { font-size: 26px; line-height: 1; display: inline-block; flex: none; }
.sticker .st { font-family: var(--f-display); font-weight: 900; font-size: 17px; text-transform: uppercase; line-height: 1; letter-spacing: .02em; overflow-wrap: anywhere; min-width: 0; }
.a-shake { animation: s-shake 1.6s ease-in-out infinite; }
.a-wobble { animation: s-wobble 2.2s ease-in-out infinite; }
.a-wave { animation: s-wave 1.4s ease-in-out infinite; transform-origin: 20% 90%; }
.a-pop { animation: s-pop 1.8s ease-in-out infinite; }
.a-spin { animation: s-spin 2.4s linear infinite; }
@keyframes s-shake { 0%, 55%, 100% { transform: translateX(0) } 60% { transform: translateX(-3px) rotate(-8deg) } 70% { transform: translateX(3px) rotate(8deg) } 80% { transform: translateX(-3px) rotate(-6deg) } 90% { transform: translateX(2px) rotate(4deg) } }
@keyframes s-wobble { 0%, 100% { transform: rotate(-7deg) } 50% { transform: rotate(7deg) } }
@keyframes s-wave { 0%, 100% { transform: rotate(-12deg) } 50% { transform: rotate(14deg) } }
@keyframes s-pop { 0%, 70%, 100% { transform: scale(1) } 80% { transform: scale(1.3) } 90% { transform: scale(.95) } }
@keyframes s-spin { to { transform: rotate(360deg) } }
@media (prefers-reduced-motion: reduce) { .sticker .se, .chip.live::before { animation: none; } }

.clockset { display: flex; align-items: center; justify-content: center; }
.clockset input { font-family: var(--f-display); font-weight: 800; font-size: 40px; text-align: center; width: 6ch; font-variant-numeric: tabular-nums; }
.nudges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.qrbox { background: #FFFFFF; border-radius: 14px; padding: 12px; width: min(260px, 100%); margin: 0 auto; border: 1px solid var(--line); }
.qrbox svg, .qrbox img { display: block; width: 100%; height: auto; }
.qrcap { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.qrcap b { font-family: var(--f-display); font-weight: 900; font-size: 26px; text-transform: uppercase; line-height: 1; }
.linkcode { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12.5px; word-break: break-all; user-select: all; }
.ftscore { margin: 0; font-family: var(--f-display); font-weight: 900; font-size: 26px; text-transform: uppercase; text-align: center; padding: 12px; background: var(--bg); border-radius: 12px; overflow-wrap: anywhere; }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; z-index: 60; max-width: calc(100% - 32px); box-shadow: var(--shadow); }

@media (max-width: 420px) {
  .board { padding: 16px 14px 18px; }
  .side .nm { font-size: 17px; }
  .ev { grid-template-columns: 44px 26px minmax(0,1fr) auto; gap: 8px; }
  .colors { grid-template-columns: 1fr; }
}

.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.check { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.check input { width: 18px; height: 18px; accent-color: var(--pitch); flex: none; }
.check:has(input:not(:checked)) { color: var(--muted); text-decoration: line-through; }

/* Section titles get a short accent "chalk" mark underneath */
.sec h2 { position: relative; padding-bottom: 6px; }
.sec h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 30px; height: 3px; border-radius: 2px; background: var(--accent); }

/* Theme button in the header */
.iconbtn { width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer; color: var(--ink); padding: 0; }
.iconbtn:hover { border-color: var(--muted); }
.seg .ico { width: 16px; height: 16px; }

/* Delete team: present at the bottom of Team settings, but quiet */
.danger-zone { display: flex; justify-content: center; padding-top: 10px; margin-top: 4px; border-top: 1px dashed var(--line); }
.danger-zone .linkbtn { font-size: 12.5px; font-weight: 500; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; opacity: .8; }
.danger-zone .linkbtn:hover { color: var(--red); opacity: 1; }
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-solid[disabled] { background: var(--surface); border-color: var(--line); color: var(--muted); opacity: 1; }

/* Goal celebration overlay (see celebrate.js). Click-through so the match controls stay usable. */
.celebrate { position: fixed; inset: 0; z-index: 80; pointer-events: none; overflow: hidden; animation: cel-in .2s ease-out both; }
.celebrate.out { animation: cel-out .4s ease-in both; }
.celebrate canvas { position: absolute; inset: 0; }
.cel-text { position: absolute; left: 50%; top: 26%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; width: max-content; max-width: calc(100vw - 32px); z-index: 2; }
.cel-head { font-family: var(--f-brand); font-size: clamp(48px, 15vw, 120px); line-height: .95; color: var(--cel-b); -webkit-text-stroke: 3px #0E1E3D; paint-order: stroke fill; text-shadow: 0 6px 0 #0E1E3D, 0 12px 28px rgba(0,0,0,.35); animation: cel-pop .9s cubic-bezier(.2,1.6,.4,1) both; overflow-wrap: anywhere; }
.cel-sub { font-family: var(--f-brand); font-size: clamp(20px, 5vw, 34px); color: #fff; background: var(--cel-a); padding: 4px 16px; border-radius: 999px; border: 3px solid #0E1E3D; animation: cel-pop .9s .15s cubic-bezier(.2,1.6,.4,1) both; max-width: 100%; overflow-wrap: anywhere; }
@keyframes cel-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes cel-out { to { opacity: 0; } }
@keyframes cel-pop { 0% { transform: scale(.2) rotate(-8deg); opacity: 0; } 60% { transform: scale(1.12) rotate(2deg); opacity: 1; } 100% { transform: scale(1) rotate(-2deg); } }
.cel-vuvus .vuvu { position: absolute; overflow: visible; bottom: 8%; width: min(46vw, 340px); height: auto; filter: drop-shadow(0 6px 10px rgba(0,0,0,.3)); }
.cel-vuvus .vuvu.left { left: -4%; transform-origin: 0% 50%; animation: vuvu-left 4.2s ease-in-out both; }
.cel-vuvus .vuvu.right { right: -4%; transform-origin: 100% 50%; animation: vuvu-right 4.2s ease-in-out both; }
.cel-vuvus .waves path { animation: vuvu-wave .45s ease-out infinite; transform-box: fill-box; }
.cel-vuvus .waves .w2 { animation-delay: .22s; }
@keyframes vuvu-left { 0% { transform: translateX(-110%) rotate(-30deg); } 15%, 85% { transform: translateX(0) rotate(-24deg); } 25%, 45%, 65% { transform: translateX(0) rotate(-30deg); } 35%, 55%, 75% { transform: translateX(0) rotate(-20deg); } 100% { transform: translateX(-110%) rotate(-30deg); } }
@keyframes vuvu-right { 0% { transform: translateX(110%) rotate(30deg); } 15%, 85% { transform: translateX(0) rotate(24deg); } 25%, 45%, 65% { transform: translateX(0) rotate(30deg); } 35%, 55%, 75% { transform: translateX(0) rotate(20deg); } 100% { transform: translateX(110%) rotate(30deg); } }
@keyframes vuvu-wave { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(14px); } }
@media (prefers-reduced-motion: reduce) { .cel-head, .cel-sub, .celebrate { animation: none; } }
