/* Tournament pages (F1): player, admin, court devices, kiosk, poster. Colours only via the tokens in app.css. */
.mono { font-family: "Chakra Petch", ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.accent { color: var(--accent-text); }
.text-ok { color: var(--ok); }
.text-error { color: var(--error); }
.text-accent { color: var(--accent-text); }
.pre-line { white-space: pre-line; }
.big { font-size: 1.4rem; }
.grow { flex: 1 1 auto; min-width: 0; }
.full { flex-basis: 100%; }
.pad { padding: 1rem 1.25rem; margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.section-label { margin: 0.75rem 0 0.25rem; font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; }
h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
small { font-size: 0.8em; }

.chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.8rem; font-weight: 700; border: 1px solid var(--line); background: var(--btn); }
.chip-ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.chip-accent { background: var(--called-bg); color: var(--accent-text); border-color: var(--called-edge); }
.chip-error { background: var(--error-bg); color: var(--error); border-color: transparent; }
.chip-muted { color: var(--muted); }

.btn-xl { min-height: 64px; font-size: 1.15rem; padding: 0 1.5rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; margin: 0.5rem 0 1rem; }
.page-head h1 { margin: 0; }
.page-head p { margin: 0.25rem 0 0; }

.subnav { display: flex; flex-wrap: wrap; gap: 0.25rem; margin-bottom: 1rem; padding-bottom: 0.75rem; border-bottom: 1px solid var(--line); }
.subnav a { padding: 0.4rem 0.7rem; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.subnav a.active { background: var(--btn); color: var(--accent-text); }

.card + .card, .card + section, section + .card { margin-top: 1rem; }
.card.flush { padding: 0; overflow: hidden; }
.card-title { margin: 0; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.12em; font-family: Inter, sans-serif; }
.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-right: 1rem; border-bottom: 1px solid var(--line); }
.card-title-row .card-title { border-bottom: 0; }
.card.callout { border: 2px solid var(--called-edge); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.9rem 1rem; margin-bottom: 1rem; }
.form-grid .span2 { grid-column: 1 / -1; }
.field select, .field textarea { min-height: 48px; padding: 0.5rem 0.9rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 500 1rem Inter, system-ui, sans-serif; }
.check { display: flex; gap: 0.6rem; align-items: center; font-size: 0.95rem; }
.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.radios { border: 0; padding: 0; margin: 0; display: flex; gap: 1.25rem; flex-wrap: wrap; }
.radios legend { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.3rem; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0.6rem; }
/* Inputs have an intrinsic width; without this they stick out of narrow columns (surname out of the card). */
.field > input:not([type=checkbox]):not([type=radio]), .field > select, .field > textarea { width: 100%; min-width: 0; }
.sticky-actions { position: sticky; bottom: 0; padding: 0.9rem 0; background: linear-gradient(transparent, var(--bg) 35%); display: flex; justify-content: flex-end; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.9rem; margin-bottom: 1.5rem; }
.tile { display: flex; flex-direction: column; gap: 0.3rem; padding: 1.1rem 1.2rem; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; }
.tile strong { font-family: "Chakra Petch", sans-serif; font-size: 1.25rem; letter-spacing: 0.03em; }
.tile span { color: var(--muted); font-size: 0.9rem; }
.tile-primary { border: 2px solid var(--accent); background: var(--called-bg); }
.pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.pill { min-height: 40px; padding: 0 0.95rem; border-radius: 999px; border: 1px solid var(--line); background: var(--btn); color: var(--text); font: 600 0.9rem Inter, sans-serif; cursor: pointer; }
.pill.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-top: 1rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--line); }
.kpis.wide { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin: 0 0 1rem; }
.kpis > div { background: var(--panel); padding: 0.75rem 0.9rem; display: flex; flex-direction: column; }
.kpis span { font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.kpis strong { font-family: "Chakra Petch", sans-serif; font-size: 1.7rem; }
.kpis small { color: var(--muted); }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.25rem; border-bottom: 1px solid var(--line); }
.list li:last-child { border-bottom: 0; }
.card:not(.flush) .list li { padding-left: 0; padding-right: 0; }
.list.numbered { counter-reset: n; }
.list.numbered li::before { counter-increment: n; content: counter(n); font-family: "Chakra Petch", sans-serif; font-weight: 700; color: var(--accent-text); min-width: 1.5rem; }
.round-no { min-width: 2.2rem; font-family: "Chakra Petch", sans-serif; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th { text-align: left; font-size: 0.72rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table .num { text-align: right; }
.table tr.mine td, .table tr.selected td { background: var(--called-bg); }
.table tr.withdrawn td { opacity: 0.55; }
.table select { min-height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); padding: 0 0.4rem; }

/* courts */
.court-no { font-family: "Chakra Petch", sans-serif; font-weight: 700; font-size: 2.6rem; line-height: 1; min-width: 2.4rem; text-align: center; }
.court-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1rem; padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--line); border-left: 5px solid transparent; }
.court-row:last-child { border-bottom: 0; }
.court-row p { margin: 0.1rem 0; }
.court-row.playing { border-left-color: var(--ok); }
.court-row.called { border-left-color: var(--called-edge); background: var(--called-bg); }
.court-row.called .court-no { color: var(--accent); }
.tag { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ok); margin: 0; }
.called .tag { color: var(--accent-text); }
.courts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.court { display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1rem; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); border-left: 5px solid var(--line); }
.court p { margin: 0.1rem 0; }
.court.playing { border-left-color: var(--ok); }
.court.called { border-left-color: var(--called-edge); background: var(--called-bg); }
.court .score { font-size: 1.3rem; }

/* player page */
.call { margin: 0 0 1rem; padding: 1.1rem 1.25rem; border-radius: 16px; border: 2px solid var(--called-edge); background: var(--called-bg); animation: call-pulse 1.6s ease-in-out infinite; }
.call p { margin: 0.15rem 0; }
.call-label { font-family: "Chakra Petch", sans-serif; text-transform: uppercase; letter-spacing: 0.16em; color: var(--accent-text); font-weight: 700; }
.call-court { font-family: "Chakra Petch", sans-serif; font-weight: 700; font-size: 3rem; line-height: 1; color: var(--accent); }
.call-teams { font-size: 1.15rem; font-weight: 700; }
@keyframes call-pulse { 50% { box-shadow: 0 0 0 6px var(--called-edge); } }
@media (prefers-reduced-motion: reduce) { .call { animation: none; } }
.team-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.team-head h1 { margin: 0; }
.big-badge { display: flex; flex-direction: column; align-items: center; padding: 0.4rem 0.9rem; border-radius: 12px; background: var(--btn); }
.big-badge span { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; }
.big-badge strong { font-family: "Chakra Petch", sans-serif; font-size: 2rem; color: var(--accent); }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; margin: 1rem 0; }
.steps li { padding: 0.25rem 0.8rem; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.steps li.done { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.code-box { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1rem; border-radius: 14px; border: 2px solid var(--called-edge); background: var(--called-bg); margin-top: 0.75rem; }
.temp-code { font-family: "Chakra Petch", sans-serif; font-size: 2.6rem; letter-spacing: 0.1em; color: var(--accent); line-height: 1; }
.pay, .share { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 0.9rem; }
.pay p, .share p { margin: 0.15rem 0; }
.qr { width: 128px; flex-shrink: 0; background: #fff; border-radius: 8px; padding: 4px; line-height: 0; }
.qr svg { width: 100%; height: auto; }
.qr-lg { width: 180px; }

/* desk, draw, devices admin */
.search-big { font-family: "Chakra Petch", sans-serif !important; font-size: 1.6rem !important; letter-spacing: 0.1em; border: 2px solid var(--accent) !important; }
.found { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-top: 0.9rem; padding: 0.9rem 1rem; border-radius: 12px; border: 2px solid var(--called-edge); background: var(--called-bg); }
.found p { margin: 0.1rem 0; }
.meter { min-width: 200px; font-size: 0.85rem; }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 0.3rem; }
.bar > div { height: 100%; background: var(--accent); }
.checks { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.split { display: flex; flex-wrap: wrap; gap: 1rem; align-items: flex-start; }
.split-main { flex: 999 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 1rem; }
.split-main .card { margin: 0; }
.split-side { flex: 1 1 320px; min-width: 0; margin: 0 !important; }
.pair-code { font-family: "Chakra Petch", sans-serif; font-weight: 700; font-size: 2rem; letter-spacing: 0.12em; color: var(--accent); margin: 0; }
.result-editor { padding: 0.75rem 0; }
.result-editor .sets { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; margin-bottom: 0.6rem; }
.set-row { display: flex; align-items: center; gap: 0.35rem; }
.set-row input { width: 4.2rem; min-height: 44px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: 700 1.2rem "Chakra Petch", sans-serif; text-align: center; }

/* court devices */
.device-main { flex: 1; display: flex; flex-direction: column; }
.device-screen { flex: 1; display: flex; flex-direction: column; background: var(--bg); color: var(--text); min-height: 100vh; }
.device-screen.center { align-items: center; justify-content: center; padding: 1rem; }
.scorer { display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem; padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)); min-height: 100vh; }
.scorer-head { display: flex; align-items: center; gap: 0.6rem; }
.court-label { font-family: "Chakra Petch", sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--accent); letter-spacing: 0.04em; text-transform: uppercase; }
.scorer-sets { display: flex; gap: 0.6rem; align-items: baseline; margin: 0; }
.scorer-buttons { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; min-height: 46vh; }
.score-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; border-radius: 18px; border: 2px solid var(--accent); background: var(--panel); color: var(--text); cursor: pointer; touch-action: manipulation; user-select: none; }
.score-btn:active { background: var(--called-bg); }
.score-btn:disabled { opacity: 0.45; }
.side-tag { font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.14em; }
.side-name { font-weight: 700; font-size: 1.05rem; text-align: center; padding: 0 0.4rem; }
.side-score { font-family: "Chakra Petch", sans-serif; font-weight: 700; font-size: clamp(4rem, 18vw, 7rem); line-height: 1; color: var(--accent); }
.plus { font-family: "Chakra Petch", sans-serif; font-weight: 700; font-size: 1.8rem; color: var(--accent-text); }
.scorer-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 0.5rem; }
.scorer-tools .btn { min-height: 52px; }
.scorer-start, .scorer-idle { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; text-align: center; font-size: 1.2rem; }
.scorer-start .btn { margin-top: 1rem; }
.board { flex: 1; display: flex; flex-direction: column; min-height: 100vh; }
.board.compact { min-height: 0; border: 1px solid var(--line); border-radius: 14px; }
.board-head, .board-foot { display: flex; gap: 1rem; align-items: center; justify-content: space-between; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--line); }
.board-foot { border-bottom: 0; border-top: 1px solid var(--line); justify-content: center; font-size: 1.4rem; font-weight: 700; }
.board-halves { flex: 1; display: flex; }
.board-half { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1rem; }
.board-half p { margin: 0.1rem 0; }
.board-name { font-weight: 700; font-size: clamp(1.4rem, 3.4vw, 2.6rem); }
.board-players { font-size: clamp(0.9rem, 1.6vw, 1.2rem); }
.board-score { font-family: "Chakra Petch", sans-serif; font-weight: 700; font-size: clamp(6rem, 24vw, 18rem); line-height: 0.95; color: var(--accent); }
.compact .board-score { font-size: 4rem; }
.board-serve { min-height: 1.5em; color: var(--ok); font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; }
.board-net { width: 6px; margin: 2rem 0; background: repeating-linear-gradient(180deg, var(--muted) 0 16px, transparent 16px 28px); }
.board-idle, .board-called { flex: 1; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem; text-align: center; padding: 1rem; }
.board-called { background: var(--called-bg); }
.board-called .call-teams { font-size: clamp(1.6rem, 4vw, 3rem); }

/* kiosk */
.kiosk { min-height: 100vh; display: flex; flex-direction: column; }
.kiosk-head { display: flex; align-items: center; gap: 1rem; padding: 0.8rem 1.25rem; border-bottom: 1px solid var(--line); font-family: "Chakra Petch", sans-serif; font-size: clamp(1rem, 1.8vw, 1.6rem); text-transform: uppercase; letter-spacing: 0.05em; }
.kiosk-body { flex: 1; display: flex; flex-wrap: wrap; min-height: 0; }
.kiosk-courts { flex: 999 1 560px; display: flex; flex-direction: column; }
.kiosk-court { flex: 1; display: flex; align-items: center; gap: 1.2rem; padding: 0.6rem 1.4rem; border-bottom: 1px solid var(--line); border-left: 6px solid transparent; }
.kiosk-court.playing { border-left-color: var(--ok); }
.kiosk-court.called { border-left-color: var(--called-edge); background: var(--called-bg); }
.kiosk-court p { margin: 0.1rem 0; }
.kiosk-court-no { font-family: "Chakra Petch", sans-serif; font-weight: 700; font-size: clamp(3rem, 7vw, 6rem); line-height: 1; min-width: 4rem; }
.kiosk-court.called .kiosk-court-no { color: var(--accent); }
.kiosk-team { font-weight: 700; font-size: clamp(1.1rem, 2vw, 1.8rem); }
.kiosk-score { display: flex; flex-direction: column; align-items: flex-end; font-family: "Chakra Petch", sans-serif; }
.kiosk-score strong { font-size: clamp(2.2rem, 5vw, 4.4rem); color: var(--accent); line-height: 1; }
.kiosk-side { flex: 1 1 320px; border-left: 1px solid var(--line); padding: 0.75rem 1.25rem; overflow: hidden; }
.kiosk.standings .kiosk-side { border-left: 0; font-size: 1.2rem; }
.kiosk-foot { padding: 0.4rem 1.25rem; border-top: 1px solid var(--line); font-size: 0.8rem; text-align: right; }
.kiosk-overlay { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; background: var(--called-bg); border: 10px solid var(--called-edge); text-align: center; z-index: 50; }
.kiosk-overlay .call-label { font-size: clamp(3rem, 9vw, 8rem); color: var(--accent); }
.kiosk-overlay .call-teams { font-size: clamp(1.8rem, 4.5vw, 4rem); }

/* poster */
.poster { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.75rem; text-align: center; padding: 2rem; background: #fff; color: #111418; }
.poster h1 { font-size: 3rem; margin: 0.5rem 0 0; }
.poster-qr { width: 360px; }
.poster-cta { font-size: 1.6rem; font-weight: 700; margin: 0.5rem 0 0; }
.poster-url { font-family: "Chakra Petch", sans-serif; font-size: 2rem; margin: 0; }
@media print { .poster { min-height: auto; } }

@media (max-width: 600px) {
    .kpis strong { font-size: 1.35rem; }
    .kpis.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpis > div { padding: 0.6rem 0.7rem; }
    .row2 { grid-template-columns: 1fr; }
    .court-row .row-actions { flex-basis: 100%; }
}

/* Scorer without a connection (js/scorer-offline.js) */
.offline-scorer { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; gap: 0.75rem; padding: 0.75rem; padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)); background: var(--bg); color: var(--text); overflow: auto; }
.offline-scorer > * { flex-shrink: 0; }
.offline-scorer .scorer-buttons { flex: 1 0 auto; }
.offline-banner { margin: 0; padding: 0.6rem 0.8rem; border-radius: 12px; background: var(--called-bg); border: 1px solid var(--accent); font-weight: 600; }

/* Privacy and other text pages */
.prose h2 { font-size: 1.05rem; margin: 1.25rem 0 0.35rem; }
.prose ul { padding-left: 1.2rem; margin: 0.35rem 0; }
.prose li { margin: 0.3rem 0; }

/* Standings and other headings with a subtitle (e.g. "live · round 1 in play") */
h1 small { display: block; margin-top: 0.25rem; font-family: Inter, system-ui, sans-serif; font-size: 0.95rem; font-weight: 500; letter-spacing: 0; }
.players-inline { display: none; }
@media (max-width: 600px) {
    .col-players, .col-played { display: none; }
    .players-inline { display: block; font-weight: 400; }
}

/* Desk on a phone: each registration is a card instead of a wide table row. */
.mobile-only { display: none; }
@media (max-width: 600px) {
    .mobile-only { display: inline; }
    .desk-table thead { display: none; }
    .desk-table, .desk-table tbody { display: block; width: 100%; }
    .desk-table tr {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas: "no team status" "code players players" "pay present present" "actions actions actions";
        gap: 0.4rem 0.6rem;
        align-items: center;
        padding: 0.75rem 0.9rem;
        border-bottom: 1px solid var(--line);
    }
    .desk-table td { padding: 0; border: 0; }
    .desk-table .c-no { grid-area: no; font-weight: 700; }
    .desk-table .c-code { grid-area: code; }
    .desk-table .c-team { grid-area: team; }
    .desk-table .c-players { grid-area: players; }
    .desk-table .c-status { grid-area: status; justify-self: end; }
    .desk-table .c-pay { grid-area: pay; }
    .desk-table .c-present { grid-area: present; }
    .desk-table .c-actions { grid-area: actions; justify-self: start; }
    .desk-table .check { display: inline-flex; align-items: center; gap: 0.35rem; }
}

/* announcements (messages from the organisers) */
.ann-banner { display: flex; flex-direction: column; gap: 0.5rem; margin: 0 0 1rem; }
.ann-item { position: relative; padding: 0.75rem 2.6rem 0.75rem 1rem; border-radius: 12px; border: 1px solid var(--called-edge); background: var(--called-bg); }
.ann-label { display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-text); }
.ann-text { margin: 0.15rem 0 0; font-size: 1.05rem; font-weight: 600; white-space: pre-line; }
.ann-close { position: absolute; top: 0.4rem; right: 0.4rem; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.4rem; cursor: pointer; }
.ann-compact { margin: 0; }
.ann-compact .ann-item { padding: 0.5rem 0.75rem; }
.ann-screen { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; margin: 0; gap: 0; }
.ann-screen .ann-item { border-radius: 0; border-width: 3px 0 0; padding: 0.9rem 1.5rem; }
.ann-screen .ann-label { font-size: clamp(0.8rem, 1.2vw, 1.1rem); }
.ann-screen .ann-text { font-size: clamp(1.4rem, 3vw, 2.6rem); }
.ann-reach { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin: 0.25rem 0 0.9rem; color: var(--muted); font-size: 0.9rem; }
.ann-row p { margin: 0.1rem 0; }
.team-picks { display: flex; flex-direction: column; gap: 0.45rem; max-height: 18rem; overflow-y: auto; padding: 0.5rem 0; margin-bottom: 0.25rem; }

/* remote control of devices */
.device-row { flex-wrap: wrap; }
.device-panel { padding: 0.75rem 1.25rem 1rem; border-bottom: 1px solid var(--line); background: var(--bg); }
.device-panel .form-grid { margin-bottom: 0.6rem; }
.device-panel .hint { margin-top: 0.6rem; }

/* device asleep: black, a dim line so it is clear the screen is not broken */
.sleep-screen { position: fixed; inset: 0; background: #000; display: flex; align-items: flex-end; justify-content: flex-end; padding: 1rem 1.25rem; cursor: none; }
.sleep-screen p { margin: 0; color: #2a2a2a; font-size: 0.85rem; }

/* hall screen on a monitor turned to portrait (rotated by the device's OS): courts on top, standings below */
@media (orientation: portrait) and (min-width: 700px) {
    .kiosk-body { flex-direction: column; flex-wrap: nowrap; }
    .kiosk-courts { flex: 0 0 auto; }
    .kiosk-court { flex: 0 0 auto; min-height: 8.5rem; }
    .kiosk-side { flex: 1 1 auto; border-left: 0; border-top: 1px solid var(--line); font-size: 1.35rem; padding: 1rem 1.5rem; }
    .kiosk.standings .kiosk-side { border-top: 0; font-size: 1.6rem; }
    .kiosk-side .table { font-size: 1em; }
    .kiosk-side .table th { font-size: 0.6em; }
}
