/* =============================================================================
   Orange Slices — one stylesheet, mobile first.

   Design notes
   - Built for two readers: a grandparent glancing at a score, and a parent
     tapping buttons outdoors in sunlight. So: large type, black on white,
     no thin greys, tap targets of 56px or more.
   - The one loud element is the scoreboard: a mown pitch with chalk-white
     numbers and a chalk centre circle holding the clock. Everything else is
     plain rows separated by rules.
   - Colour carries meaning only where soccer already gives it meaning:
     yellow card, red card, the red "live" dot. Our team is pitch green,
     the opponent is navy, everywhere.
   ============================================================================= */

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

:root {
  --pitch: #0f5c36;        /* our team, primary actions */
  --pitch-dark: #0a4a2a;
  --pitch-stripe: #0c5330;
  --away: #1d2f4f;         /* the opponent */
  --chalk: #ffffff;
  --ink: #111111;
  --muted: #45504a;        /* secondary text: still 8:1 on white */
  --line: #cdd4cb;
  --wash: #f0f4ee;
  --yellow: #ffd21f;
  --red: #c4201f;
  --live: #d92b2b;
  --focus: #0b57d0;
  --display: "Barlow Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 112.5%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--chalk); color: var(--ink);
  font-family: var(--text); font-size: 1rem; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: contain;
  word-wrap: break-word;
}
body.sheet-open { overflow: hidden; }
h1, h2, h3, p, ul, ol { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a { color: inherit; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
strong { font-weight: 700; }

.icon { display: inline-flex; width: 1.35em; height: 1.35em; flex: none; }
.icon svg { width: 100%; height: 100%; display: block; }

/* ---- first paint, before the app starts ---- */
.boot { min-height: 70vh; display: grid; place-content: center; text-align: center; padding: 2rem; }
.boot-name { font-family: var(--display); font-weight: 700; font-size: 2.2rem; color: var(--pitch); }
.boot-text { color: var(--muted); margin-top: .4rem; }

/* ---- page frame ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 3.2rem; padding: .3rem 1rem;
  padding-top: calc(.3rem + env(safe-area-inset-top, 0px));
  border-bottom: 2px solid var(--ink);
  max-width: 34rem; margin: 0 auto;
}
.topbar-brand { font-family: var(--display); font-weight: 700; font-size: 1.55rem; color: var(--pitch); letter-spacing: .01em; }
.topbar-back {
  display: inline-flex; align-items: center; min-height: 2.75rem; margin-left: -.4rem; padding-right: .6rem;
  font-weight: 700; text-decoration: none;
}
.topbar-back .icon { margin-right: .15rem; }

.page {
  max-width: 34rem; margin: 0 auto;
  padding: 1rem 1rem calc(5.5rem + env(safe-area-inset-bottom, 0px));
}
.page-game { padding-top: .75rem; }

.block { margin-top: 1.75rem; }
.block-title { font-family: var(--display); font-weight: 700; font-size: 1.45rem; line-height: 1.15; margin-bottom: .6rem; }
.block-title-lg { font-size: 2rem; }
.block-text { color: var(--muted); margin-bottom: .8rem; }
.hint { color: var(--muted); font-size: .86rem; margin-top: .35rem; }
.quiet-line { margin-top: 2rem; color: var(--muted); font-size: .9rem; }

.hero { padding: 1.25rem 0 .5rem; }
.hero-title { font-family: var(--display); font-weight: 700; font-size: 2.5rem; line-height: 1.02; color: var(--pitch); }
.hero-text { margin-top: .6rem; font-size: 1.05rem; max-width: 30rem; }
.hero + .btn, .hero + form { margin-top: 1rem; }

.notice { padding: 2.5rem 0 1rem; }
.notice-title { font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1.1; }
.notice-text { color: var(--muted); margin: .5rem 0 1rem; }

.account { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }

/* ---- layout helpers ---- */
.stack > * + * { margin-top: .7rem; }
.stack-row { display: grid; grid-template-columns: 1fr 1fr; grid-gap: .6rem; }
.stack-row > * + * { margin-top: 0; }
.stack-row > :only-child { grid-column: 1 / -1; }
.block .stack-row { margin-top: .8rem; }
.pair { display: grid; grid-template-columns: 1fr 1fr; grid-gap: .6rem; }

/* ---- buttons ---- */
.btn {
  display: flex; align-items: center; justify-content: center; width: 100%;
  min-height: 3.2rem; padding: .55rem 1rem;
  border: 2px solid transparent; border-radius: var(--radius);
  font-weight: 700; font-size: 1.05rem; line-height: 1.15; text-align: center; text-decoration: none;
  background: var(--wash); color: var(--ink);
}
.btn .icon { margin-right: .4rem; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.is-busy { opacity: .7; }
.btn-primary { background: var(--pitch); color: var(--chalk); }
.btn-outline { background: var(--chalk); border-color: var(--ink); }
.btn-quiet { background: transparent; text-decoration: underline; min-height: 2.75rem; font-weight: 600; }
.btn-danger { background: var(--red); color: var(--chalk); }
.btn-danger-quiet { background: transparent; color: var(--red); text-decoration: underline; min-height: 2.75rem; }
.btn-big { min-height: 4rem; font-size: 1.3rem; }
.btn-compact { min-height: 2.75rem; font-size: .95rem; padding: .35rem .7rem; }
.btn-add { margin-top: 1rem; }
.btn-small {
  flex: none; min-height: 2.75rem; padding: .3rem .85rem; border: 2px solid var(--ink); border-radius: 10px;
  background: var(--chalk); font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center;
}
.btn-small[disabled] { opacity: .5; }
.link-btn {
  background: none; border: 0; padding: .55rem 0; min-height: 2.75rem;
  font-weight: 700; text-decoration: underline; text-underline-offset: 3px; color: var(--ink);
}

/* ---- forms ---- */
.field label { display: block; font-weight: 700; margin-bottom: .3rem; }
.input {
  display: block; width: 100%; min-height: 3.2rem; padding: .5rem .8rem;
  border: 2px solid var(--ink); border-radius: var(--radius); background: var(--chalk);
  font-size: 1.05rem; -webkit-appearance: none; appearance: none;
}
select.input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' fill='none' stroke='%23111' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .6rem center; background-size: 1.3rem; padding-right: 2.2rem;
}
.input[disabled] { background-color: var(--wash); color: var(--muted); border-color: var(--line); }
.input::placeholder { color: #6d766f; }
.input-code { font-family: var(--display); font-weight: 700; font-size: 1.7rem; letter-spacing: .14em; text-transform: uppercase; text-align: center; }
.input-num { width: 4.2rem; text-align: center; flex: none; padding-left: .3rem; padding-right: .3rem; }
.input-num-lg { font-family: var(--display); font-weight: 700; font-size: 2rem; text-align: center; }
.input-area { min-height: 11rem; line-height: 1.5; resize: vertical; }

/* ---- rows (teams, games, players, scorers) ---- */
.rows { border-top: 1px solid var(--line); }
.row-wrap { display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.row {
  flex: 1; min-width: 0; display: flex; align-items: center;
  min-height: 4.2rem; padding: .65rem 0; text-decoration: none;
}
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row-title { font-weight: 700; font-size: 1.1rem; line-height: 1.2; overflow-wrap: anywhere; }
.row-sub { color: var(--muted); font-size: .9rem; margin-top: .15rem; }
.row-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; margin-left: .75rem; text-align: right; }
.row-score { font-family: var(--display); font-weight: 700; font-size: 1.65rem; line-height: 1; white-space: nowrap; }
.row-time { font-weight: 700; white-space: nowrap; }
.row-state { font-size: .82rem; font-weight: 700; color: var(--muted); margin-top: .2rem; }
.row-state.is-live { color: var(--chalk); background: var(--live); padding: .08rem .45rem; border-radius: 999px; }
.row-chevron { color: var(--muted); margin-left: .3rem; }
.row-edit {
  flex: none; width: 3rem; margin-left: .25rem; border: 0; border-left: 1px solid var(--line); background: none;
  display: grid; place-items: center;
}
.row-dead .row-title { color: var(--muted); }
.row .btn-small { margin-left: .6rem; }
.jersey {
  flex: none; width: 2.9rem; height: 2.9rem; margin-right: .8rem; border-radius: 50%;
  background: var(--pitch); color: var(--chalk); display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 1.45rem;
}

/* ---- team screen ---- */
.team-head { padding-top: .25rem; }
.team-name { font-family: var(--display); font-weight: 700; font-size: 2.5rem; line-height: 1; overflow-wrap: anywhere; }
.team-age { color: var(--muted); font-weight: 600; margin-top: .25rem; }
.role-note { margin-top: .4rem; font-size: .9rem; font-weight: 700; color: var(--pitch); }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 1rem; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; }
.tab { min-height: 3rem; border: 0; background: var(--chalk); font-weight: 700; font-size: 1rem; }
.tab + .tab { border-left: 2px solid var(--ink); }
.tab.is-on { background: var(--ink); color: var(--chalk); }

.live-card { display: block; margin-top: 1rem; text-decoration: none; }
.live-card-cta {
  display: flex; align-items: center; justify-content: center; min-height: 3rem;
  background: var(--ink); color: var(--chalk); font-weight: 700;
  border-radius: 0 0 var(--radius) var(--radius);
}
.live-card .board { border-radius: var(--radius) var(--radius) 0 0; }

.tip { margin-top: 2rem; padding: 1rem; border: 2px dashed var(--line); border-radius: var(--radius); }
.tip-title { font-family: var(--display); font-weight: 700; font-size: 1.3rem; }
.tip-text { color: var(--muted); margin-top: .25rem; }

.roster-add { display: flex; }
.roster-add > * + * { margin-left: .5rem; }
.roster-add .btn { width: auto; flex: none; padding-left: 1.2rem; padding-right: 1.2rem; }
.preview-row { display: flex; align-items: center; margin-bottom: .5rem; }
.preview-row > * + * { margin-left: .4rem; }
.preview-row .btn-small { width: 2.75rem; padding: 0; justify-content: center; }

.code-big {
  font-family: var(--display); font-weight: 700; font-size: 2.6rem; letter-spacing: .16em; line-height: 1.1;
  padding: .5rem .8rem; background: var(--wash); border-radius: var(--radius); text-align: center;
  -webkit-user-select: all; user-select: all;
}
.code-link { color: var(--muted); font-size: .82rem; margin-top: .4rem; overflow-wrap: anywhere; }

/* ---- THE SCOREBOARD ---- */
.board {
  position: relative; overflow: hidden; color: var(--chalk); text-align: center;
  padding: .8rem .6rem .7rem; border-radius: var(--radius);
  /* mown-grass stripes */
  background: repeating-linear-gradient(90deg, var(--pitch) 0, var(--pitch) 12.5%, var(--pitch-stripe) 12.5%, var(--pitch-stripe) 25%);
}
.board-status { display: flex; align-items: center; justify-content: center; min-height: 1.9rem; font-weight: 700; font-size: 1rem; }
.board-status > * + * { margin-left: .6rem; }
.live-tag { display: inline-flex; align-items: center; background: var(--chalk); color: var(--ink); border-radius: 999px; padding: .1rem .65rem .1rem .5rem; font-size: .9rem; }
.live-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--live); margin-right: .4rem; animation: pulse 1.6s ease-in-out infinite; }
.board-period { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: .02em; }
.board-locked { display: inline-flex; align-items: center; font-size: .85rem; font-weight: 600; opacity: .95; }
.board-locked .icon { width: 1em; height: 1em; margin-right: .25rem; }

.board-main { position: relative; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: .35rem; }
/* chalk halfway line */
.board-main::before { content: ""; position: absolute; left: 50%; top: .2rem; bottom: -.1rem; width: 3px; margin-left: -1.5px; background: rgba(255, 255, 255, .55); }
.board-side { position: relative; min-width: 0; padding: 0 .25rem; }
.board-name {
  font-family: var(--display); font-weight: 600; font-size: 1.35rem; line-height: 1.05;
  min-height: 2.1em; display: flex; align-items: flex-end; justify-content: center; overflow-wrap: anywhere;
}
.board-score { font-family: var(--display); font-weight: 700; font-size: 6.2rem; line-height: .95; font-variant-numeric: tabular-nums; }
.board-score.is-bump { animation: bump 1.4s ease-out 1; }
/* chalk centre circle with the clock in it */
.board-mid {
  position: relative; z-index: 1; width: 6.3rem; height: 6.3rem; border-radius: 50%; align-self: end; margin-bottom: .2rem;
  border: 3px solid rgba(255, 255, 255, .8); background: var(--pitch-dark); display: grid; place-items: center;
}
.board-clock { font-family: var(--display); font-weight: 700; font-size: 2.15rem; line-height: 1; font-variant-numeric: tabular-nums; }
.board-clock-quiet { font-size: 1.7rem; opacity: .9; }
.board-pks { position: relative; z-index: 1; margin-top: .5rem; display: inline-block; background: var(--pitch-dark); border-radius: var(--radius); padding: .35rem .9rem; }
.board-scoreline { font-family: var(--display); font-weight: 700; font-size: 1.7rem; line-height: 1.1; }
.board-verdict { font-weight: 700; font-size: .95rem; }
.board-where { position: relative; z-index: 1; margin-top: .5rem; font-size: .88rem; font-weight: 600; }
.board-where:empty { display: none; }
.board-compact .board-score { font-size: 4.6rem; }
.board-compact .board-mid { width: 5.2rem; height: 5.2rem; }
.board-compact .board-clock { font-size: 1.75rem; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes bump { 0% { transform: scale(1); } 12% { transform: scale(1.28); color: var(--yellow); } 60% { transform: scale(1.04); color: var(--yellow); } 100% { transform: scale(1); } }

.live-status { margin-top: 1.5rem; color: var(--muted); font-size: .88rem; text-align: center; }
.live-status.is-off { color: var(--red); font-weight: 700; }

/* ---- scorer controls ---- */
.controls { margin-top: .9rem; }
.locked-note { display: flex; align-items: center; font-weight: 700; padding: .7rem .8rem; background: var(--wash); border-radius: var(--radius); margin-bottom: .7rem; }
.locked-note .icon { margin-right: .5rem; flex: none; }
.phase { display: grid; grid-gap: .6rem; }
.phase-two { grid-template-columns: 1fr 1fr; }
.phase .btn-big { font-size: 1.15rem; }
.sides { display: grid; grid-template-columns: 1fr 1fr; grid-gap: .7rem; margin-top: .9rem; }
.side-name { font-family: var(--display); font-weight: 700; font-size: 1.3rem; line-height: 1.1; margin-bottom: .4rem; overflow-wrap: anywhere; min-height: 2.2em; display: flex; align-items: flex-end; }
.btn-goal { min-height: 5rem; font-size: 1.5rem; color: var(--chalk); }
.btn-goal .icon { width: 1.5em; height: 1.5em; }
.side-us .btn-goal { background: var(--pitch); }
.side-them .btn-goal { background: var(--away); }
.side-small { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: .35rem; margin-top: .45rem; }
.side-small .btn { min-height: 3.4rem; padding: .3rem 0; font-size: .86rem; border-radius: 10px; }
.btn-foul { background: var(--chalk); border-color: var(--ink); }
.btn-yellow { background: var(--yellow); color: var(--ink); border-color: var(--ink); }
.btn-red { background: var(--red); color: var(--chalk); }
.fixes { display: flex; justify-content: space-between; margin-top: .6rem; }

.shootout { margin-top: 1.1rem; padding: .9rem; border: 2px solid var(--ink); border-radius: var(--radius); }
.pk-line { display: flex; align-items: center; min-height: 2.6rem; }
.pk-name { width: 34%; font-weight: 700; overflow-wrap: anywhere; padding-right: .4rem; }
.kicks { flex: 1; display: flex; flex-wrap: wrap; }
.kicks-none { flex: 1; color: var(--muted); font-size: .9rem; }
.kick { width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; margin: .12rem .2rem .12rem 0; color: var(--chalk); }
.kick .icon { width: 1.05rem; height: 1.05rem; }
.kick-in { background: var(--pitch); }
.kick-out { background: var(--red); }
.pk-total { font-family: var(--display); font-weight: 700; font-size: 2rem; margin-left: .5rem; }
.pk-buttons { display: grid; grid-template-columns: 1fr 1fr; grid-gap: .5rem; margin-top: .6rem; }
.pk-buttons .btn { font-size: .95rem; min-height: 3.6rem; }
.btn-pk-in { background: var(--pitch); color: var(--chalk); }
.btn-pk-out { background: var(--chalk); border-color: var(--red); color: var(--red); }

.picker { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: .5rem; }
.pick {
  min-height: 4.6rem; padding: .3rem .2rem; border: 2px solid var(--ink); border-radius: var(--radius); background: var(--chalk);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.pick[disabled] { opacity: .5; }
.pick-num { font-family: var(--display); font-weight: 700; font-size: 1.9rem; line-height: 1; }
.pick-name { font-size: .88rem; font-weight: 600; overflow-wrap: anywhere; line-height: 1.15; margin-top: .15rem; }

.reading { font-family: var(--display); font-weight: 700; font-size: 2rem; text-align: center; padding: 1rem 0 .5rem; }
.clock-now { font-family: var(--display); font-weight: 700; font-size: 3.4rem; text-align: center; line-height: 1; font-variant-numeric: tabular-nums; }
.nudges { display: grid; grid-template-columns: repeat(2, 1fr); grid-gap: .5rem; }

/* ---- timeline ---- */
.timeline-wrap { margin-top: 1.6rem; }
.timeline { border-top: 1px solid var(--line); }
.tl { display: flex; align-items: flex-start; padding: .75rem 0; border-bottom: 1px solid var(--line); }
.tl-min { flex: none; width: 3.1rem; font-family: var(--display); font-weight: 700; font-size: 1.35rem; line-height: 1.5; }
.tl-icon { flex: none; width: 2rem; height: 2rem; margin-right: .6rem; display: grid; place-items: center; color: var(--ink); }
.tl-icon .icon { width: 1.5rem; height: 1.5rem; }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-weight: 600; line-height: 1.25; padding-top: .2rem; overflow-wrap: anywhere; }
.tl-detail { font-weight: 700; margin-top: .1rem; }
.tl-meta { color: var(--muted); font-size: .8rem; margin-top: .15rem; }
.tl-run { display: inline-block; margin-left: .5rem; font-family: var(--display); font-weight: 700; font-size: 1.25rem; line-height: 1; vertical-align: -1px; }
.tl-goal .tl-title { font-weight: 800; font-size: 1.12rem; }
.tl-goal .tl-icon { border-radius: 50%; color: var(--chalk); background: var(--pitch); }
.tl-goal.tl-side-them .tl-icon { background: var(--away); }
.tl-yellow .tl-icon { color: var(--yellow); }
.tl-yellow .tl-icon svg { filter: drop-shadow(0 0 0 var(--ink)) drop-shadow(0 0 1px var(--ink)); }
.tl-red .tl-icon { color: var(--red); }
.tl-pk-scored .tl-icon { border-radius: 50%; color: var(--chalk); background: var(--pitch); }
.tl-pk-missed .tl-icon { border-radius: 50%; color: var(--chalk); background: var(--red); }
.tl-pk-scored .tl-icon .icon, .tl-pk-missed .tl-icon .icon { width: 1.2rem; height: 1.2rem; }
.tl-edit { flex: none; align-self: center; min-height: 2.75rem; margin-left: .4rem; padding: .2rem .7rem; border: 2px solid var(--ink); border-radius: 10px; background: var(--chalk); font-weight: 700; font-size: .85rem; }
.tl-period { align-items: center; justify-content: center; background: var(--wash); padding: .45rem .5rem; }
.tl-period-text { flex: 1; text-align: center; font-family: var(--display); font-weight: 700; font-size: 1.2rem; }
.tl-dup { background: #fff8d6; margin: 0 -.5rem; padding-left: .5rem; padding-right: .5rem; }
.dup { margin-top: .5rem; }
.dup-text { font-weight: 700; font-size: .92rem; }
.dup-actions { display: grid; grid-template-columns: 1fr 1fr; grid-gap: .5rem; margin-top: .45rem; }
.deleted { margin-top: 1rem; }

/* ---- bottom sheet ---- */
.sheet-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 50; background: rgba(0, 0, 0, .55); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 34rem; max-height: 92vh; overflow-y: auto; -webkit-overflow-scrolling: touch;
  background: var(--chalk); border-radius: 18px 18px 0 0; padding: .4rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px) + var(--host-badge, 0px));
  animation: sheet-up .18s ease-out 1;
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: -.4rem; background: var(--chalk); padding: .5rem 0 .4rem; z-index: 1; }
.sheet-title { font-family: var(--display); font-weight: 700; font-size: 1.65rem; line-height: 1.1; overflow-wrap: anywhere; }
.sheet-close { flex: none; width: 2.9rem; height: 2.9rem; border: 0; border-radius: 50%; background: var(--wash); display: grid; place-items: center; margin-left: .5rem; }
.sheet-text { margin-bottom: .2rem; }
@keyframes sheet-up { from { transform: translateY(18%); } to { transform: none; } }

/* ---- toast ---- */
#toast-root { position: fixed; left: 0; right: 0; bottom: calc(.9rem + env(safe-area-inset-bottom, 0px) + var(--host-badge, 0px)); z-index: 60; display: flex; justify-content: center; padding: 0 .75rem; pointer-events: none; }
.toast {
  pointer-events: auto; max-width: 32rem; width: 100%; display: flex; align-items: center;
  background: var(--ink); color: var(--chalk); border-radius: var(--radius); padding: .5rem .5rem .5rem 1rem; min-height: 3.4rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
}
.toast-error { background: var(--red); }
.toast-text { flex: 1; font-weight: 600; padding: .25rem 0; }
.toast-action { flex: none; min-height: 2.75rem; margin-left: .6rem; padding: .3rem 1rem; border: 0; border-radius: 10px; background: var(--yellow); color: var(--ink); font-weight: 800; }

/* While a sheet is open, messages go to the top so they never cover the sheet's buttons. */
body.sheet-open #toast-root { bottom: auto; top: calc(.9rem + env(safe-area-inset-top, 0px)); }

/* --host-badge is the height of a badge the web host may pin to the bottom-right
   corner (Netlify's free plan adds one). main.js measures it; sheets and messages
   then sit above it instead of underneath it. 0 when there is no badge. */

/* ---- small phones ---- */
@media (max-width: 359px) {
  html { font-size: 100%; }
  .board-score { font-size: 5rem; }
  .board-mid { width: 5.2rem; height: 5.2rem; }
  .board-clock { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
