/* Layout: one column — team scores up top, the round table, the round entry in a bottom sheet, action in thumb reach */
:root {
  --bg: #10201a;
  --surface: #19302a;
  --surface-2: #223d35;
  --line: #3b5a4f;
  --accent: #f2c14e;
  --accent-deep: #a8801f;
  --on-accent: #10201a;
  --focus: #ffd77a;
  --text: #f4efe2;
  --muted: #b2c3b9;
  --bust: #b8332b;
  --bust-text: #ff9a8f;
  --ok: #8fdc9f;
  --glow: rgba(242, 193, 78, .12);
  --paper: #f3e7cf;
  --mark: #1f1a14;
  --wij: #ff9a7a;
  --zij: #8cc8ff;
  --display: 'Bagel Fat One', 'Arial Black', system-ui, sans-serif;
  --body: 'Rethink Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; min-height: 100vh;
  background: radial-gradient(130% 55% at 50% 105%, var(--glow), transparent 62%), var(--bg);
  color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
button { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, h4, p { margin: 0; }
#app {
  max-width: 560px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0 112px;
  display: grid; gap: 14px;
}
.eyebrow, .label { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 14px; padding: 0 4px; }

/* ---------- buttons and controls ---------- */
.btn {
  appearance: none; border: 0; cursor: pointer; width: 100%; min-height: 52px; padding: 0 18px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; font-size: 17px;
}
.btn:active { transform: translateY(2px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn.primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 3px 0 var(--accent-deep); }
.btn.ghost { background: var(--surface); color: var(--text); border: 1.5px solid var(--line); }
.btn.ghost.danger { color: var(--bust-text); }
.btn.bust { background: var(--bust); color: #ffffff; }
.btn.text { background: transparent; color: var(--muted); min-height: 44px; }
.btn.small { width: auto; min-height: 44px; padding: 0 8px; font-size: 14px; font-weight: 700; }
.btn.big { min-height: 58px; font-family: var(--display); font-weight: 400; font-size: 21px; }
.icon-btn { appearance: none; flex: none; width: 46px; height: 46px; border-radius: 14px; cursor: pointer; border: 1.5px solid var(--line); background: var(--surface); display: grid; place-items: center; }
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:disabled { opacity: .35; cursor: default; }
.segmented { display: inline-flex; flex: none; gap: 2px; padding: 3px; border-radius: 12px; background: var(--bg); }
.segmented button { appearance: none; border: 0; cursor: pointer; min-height: 44px; padding: 0 12px; border-radius: 9px; background: none; color: var(--muted); font-weight: 700; font-size: 15px; }
.segmented button[aria-checked="true"] { background: var(--accent); color: var(--on-accent); }
.stepper { display: flex; align-items: center; gap: 4px; padding: 4px; border-radius: 14px; background: var(--bg); }
.stepper button { appearance: none; width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--surface-2); font-size: 24px; font-weight: 700; cursor: pointer; }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper output { min-width: 36px; padding: 0 4px; text-align: center; font-family: var(--display); font-size: 24px; font-variant-numeric: tabular-nums; }
.toggle {
  appearance: none; cursor: pointer; min-height: 44px; padding: 0 12px; border-radius: 12px;
  border: 1.5px solid var(--line); background: none; font-weight: 700; font-size: 15px;
}
.toggle[aria-pressed="true"] { border-color: var(--pc, var(--accent)); background: color-mix(in srgb, var(--pc, var(--accent)) 20%, transparent); }
.toggle:disabled { opacity: .4; cursor: default; }
.toggle-row { appearance: none; border: 0; padding: 4px 0; background: none; cursor: pointer; width: 100%; min-height: 44px; text-align: left; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.toggle-row > span:first-child { display: grid; gap: 2px; min-width: 0; }
.toggle-row strong { font-size: 16px; font-weight: 800; }
.toggle-row .muted { font-size: 14px; }
.switch { flex: none; width: 52px; height: 32px; border-radius: 999px; position: relative; background: var(--line); transition: background .2s ease; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--text); transition: transform .2s ease; }
[aria-checked="true"] .switch { background: var(--accent); }
[aria-checked="true"] .switch::after { transform: translateX(20px); background: var(--on-accent); }

/* ---------- avatars ---------- */
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--pc); color: #10201a; font-weight: 800; }
.avatar.pic { padding: 0; overflow: hidden; }
.avatar.pic svg { display: block; width: 100%; height: 100%; }
.avatar.avatar-btn { appearance: none; border: 0; padding: 0; cursor: pointer; position: relative; overflow: visible; width: 44px; height: 44px; }
.avatar-btn svg { border-radius: 50%; }
.avatar-btn::after {
  content: ""; position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-deep) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4L19 9l-4-4L4 16z'/%3E%3C/svg%3E") center / 11px no-repeat;
  box-shadow: 0 0 0 2px var(--surface);
}
.picker-head { margin: 4px 0 0; font-family: var(--display); font-weight: 400; font-size: 18px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 12px 6px; }
.picker-item { appearance: none; border: 0; background: none; cursor: pointer; display: grid; justify-items: center; gap: 4px; padding: 4px 0; border-radius: 12px; }
.picker-item .avatar { width: 52px; height: 52px; }
.picker-item.on .avatar { box-shadow: 0 0 0 3px var(--focus); }
.picker-name { font-size: 11.5px; line-height: 1.2; text-align: center; color: var(--muted); }
.picker-item.on .picker-name { font-weight: 700; color: var(--text); }

/* ---------- setup ---------- */
.setup { display: grid; gap: 14px; padding-top: 18px; }
.back-link { justify-self: start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; margin-bottom: -10px; color: var(--muted); font-weight: 700; text-decoration: none; }
.hero { display: grid; gap: 6px; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 12vw, 60px); line-height: 1; overflow-wrap: anywhere; }
.hero p { color: var(--muted); max-width: 34ch; }
.box { background: var(--surface); border-radius: 18px; padding: 16px; display: grid; gap: 12px; min-width: 0; }
.box h2 { font-size: 17px; font-weight: 800; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.choice {
  appearance: none; cursor: pointer; text-align: left; min-height: 78px; padding: 12px; border-radius: 14px; min-width: 0;
  border: 1.5px solid var(--line); background: none; display: grid; align-content: start; gap: 4px;
}
.choice strong { font-size: 16px; }
.choice span { font-size: 13.5px; color: var(--muted); }
.choice[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.team-box { border-top: 4px solid var(--pc); }
.team-label { display: grid; gap: 6px; }
.team-input, .names input {
  width: 100%; min-width: 0; height: 48px; border-radius: 12px; border: 1.5px solid var(--line);
  background: var(--bg); color: var(--text); padding: 0 14px; font: inherit; font-size: 17px; font-weight: 600;
}
.team-input { font-weight: 800; color: var(--pc); }
.team-input::placeholder, .names input::placeholder { color: var(--muted); font-weight: 400; }
.names { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.names li { display: flex; align-items: center; gap: 10px; }
.names input { flex: 1; }
.seat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seat-pick {
  appearance: none; cursor: pointer; min-height: 52px; padding: 6px 10px; border-radius: 14px; min-width: 0;
  border: 1.5px solid var(--line); background: none; display: flex; align-items: center; gap: 8px; text-align: left;
}
.seat-no { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--pc); color: #10201a; font-weight: 800; font-size: 14px; }
.seat-name { min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.more-toggle {
  appearance: none; border: 0; padding: 0; background: none; cursor: pointer; width: 100%; min-height: 44px; text-align: left;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.more-text { display: grid; gap: 2px; min-width: 0; }
.more-text strong { font-size: 17px; font-weight: 800; }
.more-text .muted { font-size: 14px; }
.chev { flex: none; font-size: 26px; line-height: 1; color: var(--muted); transition: transform .2s ease; }
.more-toggle[aria-expanded="true"] .chev { transform: rotate(90deg); }
.more { display: grid; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.more h3 { font-size: 16px; font-weight: 800; }
.more .field-row .muted { font-size: 14px; }
.seat-pick[aria-checked="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }

/* ---------- top bar and teams ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 6;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-block: 12px 8px; background: linear-gradient(var(--bg) 80%, transparent);
}
.turn { display: flex; align-items: center; gap: 10px; min-width: 0; }
.turn-text { display: grid; min-width: 0; }
.turn-name { font-family: var(--display); font-size: 26px; line-height: 1.05; color: var(--pc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 8px; flex: none; }
.badge { font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text); white-space: nowrap; }
.badge.turn { background: var(--accent); color: var(--on-accent); }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.team-card {
  min-width: 0; padding: 12px; border-radius: 18px; background: var(--surface);
  border-top: 4px solid var(--pc); display: grid; gap: 6px; align-content: start;
}
.team-card.lead { box-shadow: inset 0 0 0 1.5px var(--pc); }
.team-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.team-title { min-width: 0; font-weight: 800; color: var(--pc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lead-tag { flex: none; font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 999px; background: var(--pc); color: #10201a; }
.team-total { font-family: var(--display); font-weight: 400; font-size: 40px; line-height: 1; font-variant-numeric: tabular-nums; }
.members { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.members li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.members .avatar { width: 30px; height: 30px; font-size: 13px; }
.m-text { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.m-name { max-width: 100%; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- rounds table ---------- */
.board { background: var(--surface); border-radius: 18px; padding: 4px 8px; min-width: 0; }
.rounds, .stats { width: 100%; border-collapse: collapse; table-layout: fixed; font-variant-numeric: tabular-nums; }
.rounds th, .rounds td, .stats th, .stats td { padding: 8px 6px; text-align: left; vertical-align: top; }
.rounds thead th, .stats thead th { font-size: 13px; font-weight: 800; color: var(--pc, var(--muted)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1.5px solid var(--line); }
.rounds .c-no { width: 54px; padding-inline: 0; color: var(--muted); font-weight: 700; }
.rounds tbody tr + tr { border-top: 1px solid var(--line); }
.round-btn {
  appearance: none; border: 0; cursor: pointer; width: 48px; min-height: 44px; padding: 0 4px; border-radius: 10px;
  background: var(--surface-2); color: var(--text); display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-weight: 800;
}
.round-btn svg { width: 14px; height: 14px; color: var(--muted); }
.rounds td { min-width: 0; }
.r-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.r-total { font-weight: 800; font-size: 19px; }
.r-parts, .r-run { display: block; font-size: 12.5px; color: var(--muted); }
.r-run { font-weight: 700; }
.tag { font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 999px; background: var(--surface-2); color: var(--text); }
.tag.nat { background: var(--bust); color: #ffffff; }
.tag.pit { background: var(--accent); color: var(--on-accent); }
.is-went .r-total { color: var(--focus); }
.row-nat { background: color-mix(in srgb, var(--bust) 12%, transparent); }
.rounds .empty { color: var(--muted); text-align: center; padding: 18px 6px; }
.rounds tfoot th, .rounds tfoot td { border-top: 1.5px solid var(--line); font-weight: 800; font-size: 18px; }
.rounds tfoot th { font-size: 13px; color: var(--muted); }
.stats { background: var(--surface); border-radius: 18px; overflow: hidden; }
.stats th[scope="row"] { color: var(--muted); font-weight: 700; font-size: 14px; }
.stats td { font-weight: 800; font-size: 17px; }
.stats tbody tr + tr { border-top: 1px solid var(--line); }

/* ---------- action bar ---------- */
.action-bar {
  position: fixed; z-index: 8; left: 50%; translate: -50% 0;
  bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 2 * max(16px, env(safe-area-inset-left, 0px))), 528px);
}
.action-bar .btn { box-shadow: 0 3px 0 var(--accent-deep), 0 10px 30px rgba(0, 0, 0, .45); }

/* ---------- end ---------- */
.end { display: grid; gap: 16px; padding-top: 26px; }
.end-hero { display: grid; gap: 6px; text-align: center; }
.end-hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 10vw, 48px); line-height: 1.05; color: var(--focus); overflow-wrap: anywhere; }
.rank { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rank li { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 10px; border-radius: 16px; background: var(--surface); min-width: 0; }
.rank li.first { box-shadow: inset 0 0 0 1.5px var(--focus); }
.rank .place { width: 22px; text-align: center; font-family: var(--display); font-size: 20px; color: var(--muted); }
.pair { display: flex; flex: none; }
.pair .avatar { width: 34px; height: 34px; box-shadow: 0 0 0 2px var(--surface); }
.pair .avatar + .avatar { margin-left: -10px; }
.rank .who { flex: 1; min-width: 0; display: grid; gap: 2px; }
.p-name { font-weight: 800; color: var(--pc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.p-members { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank .total { font-family: var(--display); font-weight: 400; font-size: 28px; }
.end-actions { display: grid; gap: 8px; }

/* ---------- round entry ---------- */
.entry { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; min-width: 0; }
.team-choice { min-height: 64px; border-color: color-mix(in srgb, var(--pc) 45%, var(--line)); }
.team-choice strong { color: var(--pc); }
.team-choice[aria-checked="true"] { border-color: var(--pc); background: color-mix(in srgb, var(--pc) 16%, transparent); }
.points-row { display: flex; align-items: center; gap: 12px; }
#entry-points {
  width: 120px; height: 58px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--bg); color: var(--text);
  padding: 0 14px; font-family: var(--display); font-size: 28px; text-align: center; font-variant-numeric: tabular-nums;
}
#entry-points::placeholder { color: var(--muted); font-family: var(--body); font-size: 17px; }
.opp { min-width: 0; color: var(--muted); font-weight: 700; }
.roem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.roem-col { min-width: 0; padding: 10px; border-radius: 14px; background: var(--surface-2); border-top: 3px solid var(--pc); display: grid; gap: 8px; }
.roem-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; min-width: 0; }
.roem-team { min-width: 0; font-weight: 800; color: var(--pc); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roem-head strong { font-family: var(--display); font-weight: 400; font-size: 24px; font-variant-numeric: tabular-nums; }
.roem-detail { min-height: 1.4em; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.roem-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.roem-btn {
  appearance: none; cursor: pointer; min-height: 48px; padding: 4px; border-radius: 10px; min-width: 0;
  border: 1.5px solid var(--line); background: var(--surface); display: grid; align-content: center; gap: 1px; line-height: 1.1;
}
.roem-btn b { font-weight: 800; font-size: 15px; }
.roem-btn small { font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.roem-btn:active { transform: translateY(1px); }
.roem-btn:disabled { opacity: .4; cursor: default; transform: none; }
.roem-col .toggle { width: 100%; }
.roem-col .btn.small { width: 100%; }
.field-hint { font-size: 14px; color: var(--muted); }
.verzaakt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.verzaakt-row .toggle { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.verzaakt-row .toggle[aria-pressed="true"] { color: var(--bust-text); }
.pit-toggle { width: 100%; min-height: 52px; text-align: left; padding: 0 14px; }
.verdict { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); color: var(--text); border-left: 4px solid var(--line); }
.verdict b { font-family: var(--display); font-weight: 400; font-size: 19px; margin-right: 4px; }
.verdict.ok { border-left-color: var(--ok); }
.verdict.ok b { color: var(--ok); }
.verdict.pit { border-left-color: var(--accent); }
.verdict.pit b { color: var(--accent); }
.verdict.nat { border-left-color: var(--bust); background: color-mix(in srgb, var(--bust) 16%, var(--surface-2)); }
.verdict.nat b { color: var(--bust-text); }
.verdict.warn { border-left-color: var(--focus); }
.entry-actions { display: grid; gap: 8px; }
.entry-actions.two { grid-template-columns: 1fr 1.4fr; }

/* ---------- sheets, modal, toast ---------- */
.backdrop { position: fixed; inset: 0; z-index: 20; background: rgba(4, 10, 8, .6); animation: fade .2s ease; }
.sheet {
  position: fixed; z-index: 21; bottom: 0; left: 50%; translate: -50% 0; width: min(100%, 560px); max-height: 90%; overflow-y: auto; overscroll-behavior: contain;
  border-radius: 22px 22px 0 0; background: var(--surface); display: grid; gap: 14px;
  padding-top: 10px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .5); animation: rise .25s cubic-bezier(.2, .9, .3, 1);
}
.grabber { width: 40px; height: 5px; border-radius: 3px; background: var(--line); justify-self: center; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h3 { font-family: var(--display); font-weight: 400; font-size: 24px; }
.close-btn { appearance: none; border: 0; flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); cursor: pointer; display: grid; place-items: center; }
.close-btn svg { width: 18px; height: 18px; }
.menu-list { display: grid; gap: 6px; }
.menu-item {
  appearance: none; border: 0; cursor: pointer; width: 100%; min-height: 54px; padding: 0 14px; border-radius: 14px;
  background: var(--surface-2); text-align: left; font-weight: 700; font-size: 16.5px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
.menu-item.static { cursor: default; padding-block: 8px; }
.menu-item .menu-value { color: var(--muted); font-weight: 700; }
.menu-item.menu-options { display: grid; justify-content: stretch; gap: 0; padding-block: 12px; }
.menu-options .more { margin-top: 10px; }
.menu-options .muted { font-weight: 600; font-size: 14px; }
.tiebreak { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 16%, var(--surface)); border-left: 4px solid var(--accent); }
.tiebreak b { color: var(--focus); }
.menu-item.home { color: var(--focus); }
.menu-item.danger { color: var(--bust-text); }
.rules { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.rules b { color: var(--focus); }
.rules li.on { margin-left: -8px; padding: 8px 10px 8px 8px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 3px 0 0 var(--accent); }
.rules-head { font-family: var(--display); font-weight: 400; font-size: 18px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(4, 10, 8, .6); animation: fade .2s ease; }
.modal {
  position: fixed; z-index: 41; left: 50%; top: 50%; translate: -50% -50%; width: min(calc(100% - 48px), 360px);
  padding: 20px; border-radius: 20px; background: var(--surface); box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  display: grid; gap: 10px; animation: pop .2s ease;
}
.modal h3 { font-family: var(--display); font-weight: 400; font-size: 24px; line-height: 1.1; }
.modal p { color: var(--muted); }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 6px; }
.modal-actions .btn { min-height: 48px; font-size: 16px; padding: 0 10px; }
.toast {
  position: fixed; z-index: 30; left: 50%; translate: -50% 0; bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 32px), 528px); display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 16px; background: var(--paper); color: var(--mark);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .55); font-weight: 600; font-size: 15px;
}
.toast span { flex: 1; min-width: 0; }

@media (orientation: landscape) and (min-width: 760px) {
  #app { max-width: 1000px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); column-gap: 16px; align-items: start; }
  #app > .topbar, #app > .setup, #app > .end { grid-column: 1 / -1; }
  #app > .teams { grid-column: 1; }
  #app > .board { grid-column: 2; grid-row: 2 / span 3; }
  .setup, .end { max-width: 560px; justify-self: center; width: 100%; }
}

@keyframes rise { from { translate: -50% 30px; opacity: 0; } to { translate: -50% 0; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; scale: .95; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .btn:active, .roem-btn:active { transform: none; }
}
