/* stats.ligspace.pl – courtside scoring app. Tablet landscape first; phones show one team at a time. */
:root {
	--bg: #f4f1ea; --card: #fff; --ink: #1d2733; --muted: #66707c; --line: #ddd8cc;
	--accent: #e8743b; --accent-ink: #fff; --ok: #1f8a4c; --bad: #c0392b; --sel: #ffe2cf;
	--board: #1d2733; --board-ink: #f4f1ea;
	--r: 10px; --tap: 48px;
	color-scheme: light;
	font: 16px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
h1 { font-size: 1.5rem; margin: 0; }
h2 { font-size: 1.15rem; margin: 1.4rem 0 .6rem; }
.muted { color: var(--muted); }
.center { text-align: center; justify-content: center; }
.boot { padding: 2rem; text-align: center; color: var(--muted); }
[hidden] { display: none !important; }

.app, .doc { max-width: 1280px; margin: 0 auto; }
.home, .setup, .boxscore, .doc { padding: 16px max(16px, env(safe-area-inset-left)) 32px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; min-height: var(--tap); padding: 0 1.1em;
	border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); font: inherit; font-weight: 600;
	text-decoration: none; cursor: pointer; touch-action: manipulation; }
.btn:hover { border-color: var(--ink); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { border-color: var(--bad); color: var(--bad); }
.btn.big { min-height: 64px; font-size: 1.1rem; padding: 0 1.6em; }
.btn.small { min-height: 38px; padding: 0 .8em; font-size: .9rem; }
.btn.icon { min-width: var(--tap); padding: 0; font-size: 1.2rem; }
.btn.icon.small { min-width: 32px; min-height: 32px; font-size: .9rem; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; margin-top: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; }
.note { background: #fff6e8; border: 1px solid #f1d9b5; border-radius: var(--r); padding: 10px 14px; }
.badge { display: inline-block; font-size: .78rem; padding: 2px 8px; border-radius: 99px; background: var(--line); }
.badge.warn { background: #fde7c7; color: #8a4b00; }

/* start screen */
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.start-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 8px 0 8px; }
.games { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.games .empty { color: var(--muted); padding: 12px 0; }
.game-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; background: var(--card);
	border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.gr-score { font-size: 1.3rem; font-weight: 800; grid-row: span 2; align-self: center; }
.gr-meta { font-size: .85rem; color: var(--muted); }
.help { margin-top: 24px; }
.help summary { cursor: pointer; font-weight: 600; }
.foot { margin-top: 32px; font-size: .9rem; color: var(--muted); }

/* setup */
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.field > span { font-size: .85rem; color: var(--muted); font-weight: 600; }
.field.small { width: 150px; }
input, textarea, select { font: inherit; min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); width: 100%; }
input[type=checkbox] { width: 24px; min-height: 24px; height: 24px; accent-color: var(--accent); }
.roster-edit { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.roster-edit th { font-size: .8rem; color: var(--muted); text-align: left; font-weight: 600; }
.roster-edit td { padding: 3px 3px; }
.roster-edit td:first-child, .roster-edit th:first-child { width: 36px; text-align: center; }
.roster-edit .jersey, input.jersey { width: 64px; text-align: center; }
.roster-edit tr.absent input:not([type=checkbox]) { opacity: .45; }

/* scoring screen */
.score-screen { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.sb { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 6px 12px;
	padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top)); background: var(--board); color: var(--board-ink); }
.sb .btn { background: transparent; color: var(--board-ink); border-color: #4b5866; }
.sb .btn.primary { background: var(--accent); border-color: var(--accent); }
.sb-team { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.sb-team.away { justify-content: flex-start; }
.sb-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-pts { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sb-mid { display: grid; justify-items: center; gap: 4px; }
.sb-period { font-size: .85rem; opacity: .8; }
.clock { font: 800 2.2rem/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; padding: 6px 16px; border-radius: 10px; border: 2px solid #4b5866;
	background: #0f151c; color: #f4f1ea; cursor: pointer; font-variant-numeric: tabular-nums; }
.clock.running { border-color: var(--ok); color: #9ff0b9; }
.clock:disabled { cursor: default; opacity: .8; }
.sb-tools { display: grid; gap: 6px; grid-column: 5; grid-row: 1 / span 2; }
.sb > .btn.icon { grid-row: 1 / span 2; }
.sb-ctrl { grid-column: 3; grid-row: 2; flex-wrap: wrap; }

.tabs { display: none; }
.teams { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; flex: 1; align-content: start; }
.team { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; }
.team-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 8px; }
.team-head b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.team-head .muted { font-size: .85rem; }
.roster { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pl { width: 100%; display: grid; grid-template-columns: 3rem 1fr 3rem 4.5rem;   /* rem: same widths in the smaller header row */ align-items: center; gap: 8px; min-height: 52px; padding: 0 10px;
	border: 2px solid transparent; border-radius: 8px; background: #f7f5f0; font: inherit; color: inherit; text-align: left; cursor: pointer; touch-action: manipulation; }
.pl.on { background: #e8f1ea; border-color: #bfd9c7; }
.pl.bench { opacity: .7; }
.pl.sel { background: var(--sel); border-color: var(--accent); opacity: 1; }
.pl.out { border-color: var(--bad); }
.pl-no { font-weight: 800; font-size: 1.15rem; text-align: center; }
.pl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-name em { color: var(--bad); font-style: normal; font-size: .85rem; }
.pl-pts { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.pl-f { font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; color: #8a6a00; background: #fff4d6; border-radius: 6px; padding: 2px 0; }
.pl-f.zero { background: transparent; color: var(--muted); font-weight: 600; }
.pl-f.hot { color: #fff; background: var(--bad); }
.pl-f small { font-weight: 600; font-size: .7rem; }
.roster .pl-headrow { position: sticky; top: 0; z-index: 1; background: var(--card); }
.pl.pl-head { min-height: 0; padding: 0 10px 2px; background: none; border-color: transparent; cursor: default; font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.pl.pl-head span:nth-child(3), .pl.pl-head span:nth-child(4) { text-align: center; }
.pl-pts { text-align: center; }

.pad { position: sticky; bottom: 0; z-index: 4; background: #fbfaf7; border-top: 1px solid var(--line);
	padding: 8px 12px; padding-bottom: max(8px, env(safe-area-inset-bottom)); }
.pad-who { min-height: 38px; margin-bottom: 6px; display: flex; align-items: center; }
.pad-who .last { display: flex; align-items: center; gap: 10px; width: 100%; }
.pad-who .last > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pad-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.act { min-height: 58px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; touch-action: manipulation; }
.act.made { background: #e3f4ea; border-color: #9fd3b3; color: #135c33; font-size: 1.2rem; }
.act.miss { background: #fbe9e7; border-color: #f0b8b0; color: #8f2a1f; }
.act.foul { background: #fff4d6; border-color: #ecd38c; }
.act:disabled { opacity: .35; cursor: default; }
.act:not(:disabled):active { transform: scale(.97); }

.pbp-panel { margin: 0 12px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; }
.pbp-panel summary { cursor: pointer; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
.pbp { list-style: none; margin: 0; padding: 0; }
.pbp li { padding: 6px 0; border-top: 1px solid #eee9de; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pbp .score { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }

/* dialogs */
.modal { position: fixed; inset: 0; z-index: 20; background: rgba(15, 21, 28, .55); display: grid; place-items: center; padding: 16px; }
.modal-card { background: var(--card); border-radius: 14px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 18px; }
.modal-card h2 { margin-top: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.subs { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px; margin-bottom: 12px; }
.sub-btn { min-height: 52px; border-radius: 8px; border: 2px solid var(--line); background: #f7f5f0; font: inherit; text-align: left; padding: 6px 10px; cursor: pointer; }
.sub-btn.on { background: #e8f1ea; border-color: var(--ok); }
.sub-btn.out { color: var(--bad); }
.sub-btn:disabled { opacity: .4; cursor: default; }
.clockset input { width: 90px; font-size: 1.6rem; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); z-index: 30; display: flex; gap: 12px; align-items: center;
	background: var(--board); color: var(--board-ink); padding: 10px 14px; border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,.25); max-width: calc(100% - 32px); }
.toast .btn { background: transparent; color: var(--board-ink); border-color: #4b5866; }

/* box score / share */
.sharehead { display: flex; justify-content: center; align-items: baseline; gap: 16px; flex-wrap: wrap; text-align: center; margin: 8px 0; }
.sharehead b { font-size: 2.2rem; }
.scroll { overflow-x: auto; }
.tbl { border-collapse: collapse; width: 100%; background: var(--card); font-size: .92rem; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 6px 8px; border-bottom: 1px solid #eee9de; text-align: center; white-space: nowrap; }
.tbl .l { text-align: left; }
.tbl thead th { background: #efebe2; font-size: .8rem; }
.tbl tr.sum td { font-weight: 700; background: #faf8f3; }
.tbl.q { width: auto; margin: 8px auto 4px; }
.tbl.q tbody th { text-align: left; }
.share { margin-top: 16px; word-break: break-all; }
.page .doc { line-height: 1.55; }
.page .doc h1 { margin-bottom: .5rem; }

/* phones: one team at a time */
@media (max-width: 760px) {
	.two { grid-template-columns: 1fr; }
	.sb { grid-template-columns: auto 1fr auto 1fr; gap: 6px; padding: 6px 8px; }
	.sb > .btn.icon { grid-row: 1; }
	.sb-ctrl { grid-column: 1 / -1; grid-row: 2; }
	.sb-tools { grid-column: 1 / -1; grid-row: 3; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
	.sb-tools .btn.small { min-height: 34px; padding: 0 .6em; font-size: .85rem; }
	.sb-pts { font-size: 2rem; }
	.sb-name { display: none; }
	.sb-team { justify-content: center; }
	.sb-team.away { justify-content: center; }
	.clock { font-size: 1.6rem; padding: 4px 10px; }
	.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px 12px 0; }
	.tab { min-height: 42px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); font: inherit; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
	.tab.on { background: var(--board); color: var(--board-ink); border-color: var(--board); }
	.teams { grid-template-columns: 1fr; padding: 8px 12px; }
	.team:not(.shown) { display: none; }
	.pad-grid { grid-template-columns: repeat(4, 1fr); }
	.act { min-height: 50px; }
	.toast { bottom: 250px; }
}

@media print {
	.noprint, .top, .toast { display: none !important; }
	body { background: #fff; }
	.tbl { font-size: 10pt; }
}

/* table view (GameStats-like): one row per player, click a cell = +1, right-click = -1 */
.tables { display: grid; gap: 12px; padding: 12px; }
.tteam { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 8px; }
.tteam-pts { font-size: 1.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.grid { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; user-select: none; }
.grid th, .grid td { padding: 0 4px; height: 36px; text-align: center; border-bottom: 1px solid #eee9de; white-space: nowrap; }
.grid th { font-size: .78rem; background: #efebe2; position: sticky; top: 0; }
.grid th.made { background: #dcefe3; } .grid th.miss { background: #f6e0dc; } .grid th.foul { background: #f6ecc8; }
.grid .l { text-align: left; }
.grid td.no { font-weight: 800; width: 3em; }
.grid td.name { max-width: 14em; overflow: hidden; text-overflow: ellipsis; }
.grid td.name em { color: var(--bad); font-style: normal; font-size: .8rem; }
.grid td.pts { font-weight: 800; }
.grid td.cell { cursor: pointer; min-width: 2.6em; }
.grid td.cell:hover { background: var(--sel); outline: 1px solid var(--accent); }
.grid td.cell:active { background: #ffc9a6; }
.grid td.cell.off { color: #b9b4aa; }
.grid tr.on { background: #f1f8f3; }
.grid tr.bench td.no, .grid tr.bench td.name { opacity: .65; }
.grid tr.out td.name { color: var(--bad); }
.grid input[type=checkbox] { width: 22px; height: 22px; min-height: 22px; }
.hint { margin: 0 12px 8px; font-size: .85rem; }
.editbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 12px 12px 0; padding: 8px 12px; border-radius: var(--r); background: var(--card); border: 1px solid var(--line); }
.editbar.on { background: #fff6e8; border-color: #f1d9b5; }
.editbar select { width: auto; min-height: 36px; }
.editbar .muted { font-size: .85rem; }
.switch { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; cursor: pointer; }
.grid td.edit { padding: 2px; }
.grid .cellin { width: 3.4em; min-height: 30px; padding: 2px 4px; text-align: center; font-variant-numeric: tabular-nums; }
.grid td.edit:nth-child(5) .cellin { width: 4.2em; }
.warn-txt { color: var(--bad); font-weight: 700; font-size: .85rem; }
.row.undo { gap: 6px; } .row.undo .btn { flex: 1; }

/* game list: delete button next to each game */
.game-item { display: flex; gap: 8px; align-items: stretch; }
.game-item .game-row { flex: 1; min-width: 0; }
.game-item .del { align-self: center; color: var(--muted); }
.game-item .del:hover { color: var(--bad); border-color: var(--bad); }

/* tablets/desktops: the game is one screen in both views – compact one-line bar, nothing but the panels scrolls */
.btn { white-space: nowrap; }
.app:has(.score-screen) { max-width: none; }
@media (min-width: 761px) {
	.score-screen { height: 100vh; height: 100dvh; min-height: 0; }
	/* two rows: score + clock with the game controls (Ustaw zegar, Koniec kwarty…) right under the clock; app tools on the right */
	.score-screen .sb { display: grid; grid-template-columns: auto 1fr auto 1fr auto; grid-template-areas: "back home mid away tools" "back home ctrl away tools";
		align-items: center; gap: 4px 14px; padding: 6px 12px; padding-top: max(6px, env(safe-area-inset-top)); }
	.score-screen .sb > .btn.icon { grid-area: back; }
	.score-screen .sb-team { grid-area: home; }
	.score-screen .sb-team.away { grid-area: away; }
	.score-screen .sb-mid { grid-area: mid; justify-self: center; }
	.score-screen .sb-ctrl { grid-area: ctrl; justify-content: center; }
	.score-screen .sb-tools { grid-area: tools; justify-content: flex-end; flex-wrap: nowrap; }
	.score-screen .sb .viewtoggle { width: 8.6rem; }   /* same width for "tabela" and "przyciski": the bar doesn't jump when switching */
	.score-screen .sb > .btn.icon { min-height: 36px; min-width: 36px; }
	.score-screen .sb-team { min-width: 0; }
	.score-screen .sb-pts { font-size: 1.9rem; }
	.score-screen .sb-mid { display: flex; align-items: center; gap: 8px; }
	.score-screen .sb-period { font-size: .8rem; }
	.score-screen .clock { font-size: 1.5rem; padding: 3px 10px; }
	.score-screen .sb-ctrl, .score-screen .sb-tools { display: flex; flex-wrap: wrap; gap: 6px; }
	.score-screen .sb-tools .row.undo .btn { flex: none; }
	.score-screen .sb .btn.small { min-height: 32px; padding: 0 .65em; font-size: .85rem; }
	/* button view */
	.score-screen .teams { flex: 1; min-height: 0; padding: 8px; gap: 8px; }
	.score-screen .team { display: flex; flex-direction: column; min-height: 0; overflow: hidden; padding: 6px; }
	.score-screen .team .roster { overflow: auto; min-height: 0; }
	.score-screen .team-head { padding: 0 4px 4px; }
	.score-screen .roster { gap: 2px; }
	.score-screen .pl { min-height: 32px; padding: 0 8px; border-width: 1px; font-size: .92rem; }
	.score-screen .pl-no { font-size: 1rem; }
	.score-screen .pl.pl-head { min-height: 0; font-size: .72rem; }
	.score-screen .pl-f { padding: 1px 0; }
	.score-screen .act { min-height: 40px; }
	.score-screen .pad-grid { gap: 4px; }
	.score-screen .pad { padding: 6px 8px; }
	.score-screen .pad-who { min-height: 32px; margin-bottom: 4px; }
	.score-screen .pbp-panel { margin: 0 8px 6px; padding: 2px 10px; }
	.score-screen .pbp-panel[open] .pbp { max-height: 30vh; overflow: auto; }
}
.tablemode .tables { flex: 1; }
.tablemode .editbar { margin: 6px 8px 0; padding: 4px 10px; font-size: .9rem; }
.tablemode .tables { flex: 1; min-height: 0; display: grid; grid-template-rows: 1fr 1fr; gap: 6px; padding: 6px 8px; }
.tablemode .tteam { display: flex; flex-direction: column; min-height: 0; padding: 4px 6px; }
.tablemode .tteam .team-head { padding: 0 4px 4px; }
.tablemode .tteam-pts { font-size: 1.3rem; }
.tablemode .tteam .scroll { flex: 1; min-height: 0; overflow: auto; }
.tablemode .grid th, .tablemode .grid td { height: 28px; padding: 0 3px; font-size: .88rem; }
.tablemode .grid th { font-size: .74rem; z-index: 1; }
.tablemode .grid input[type=checkbox] { width: 18px; height: 18px; min-height: 18px; }
.tablemode .grid .cellin { min-height: 24px; height: 24px; font-size: .85rem; }
/* small tablets: not enough width for teams + clock + tools in one band – tools get their own row */
@media (min-width: 761px) and (max-width: 1100px) {
	/* tablets: score + clock on top, game controls and app tools together in one row below */
	.score-screen .sb { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); grid-template-areas: "back home mid away" "ctrl ctrl tools tools"; }
	.score-screen .sb-ctrl { justify-self: end; }
	.score-screen .sb-tools { justify-self: start; justify-content: flex-start; flex-wrap: wrap; }
}
.score-screen .sb-team { overflow: hidden; }

/* clock with quick ± 1 s buttons */
.clockrow { display: flex; align-items: center; gap: 6px; }
.spin { display: grid; grid-template-rows: 1fr 1fr; gap: 2px; }
.spin-btn { width: 34px; height: 20px; padding: 0; border: 1px solid #4b5866; border-radius: 6px; background: transparent; color: var(--board-ink);
	font-size: .65rem; line-height: 1; cursor: pointer; touch-action: manipulation; }
.spin-btn:hover:not(:disabled) { background: #2b3846; }
.spin-btn:active:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.spin-btn:disabled { opacity: .35; cursor: default; }
.btn.placeholder { visibility: hidden; }   /* keeps the bar the same width in both views */

/* table view: whole columns tinted like their headers */
.grid td.cell.made, .grid td.edit.made { background: #f0f8f3; }
.grid td.cell.miss, .grid td.edit.miss { background: #fcf1ef; }
.grid td.cell.foul, .grid td.edit.foul { background: #fcf7e6; }
.grid td.cell:hover { background: var(--sel); }

/* tablets/desktops, button view: action buttons right under the bar, above the rosters (short mouse/finger travel) */
@media (min-width: 761px) {
	.score-screen > .sb { order: 0; }
	.score-screen > .pad { order: 1; position: static; border-top: 0; border-bottom: 1px solid var(--line); }
	.score-screen > :not(.sb):not(.pad) { order: 2; }
}
/* table view on narrow screens: sections keep the screen width, the table scrolls inside */
.tables { grid-template-columns: minmax(0, 1fr); }
.tteam { min-width: 0; }
.tteam .scroll { overflow-x: auto; }

/* public pages: /mecze list, game page */
.topline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.games-list .search { margin: 8px 0 16px; max-width: 520px; }
.games-list .search input { flex: 1; }
.games-list .games a.game-row { text-decoration: none; }
.badge.live { background: #e3f4ea; color: #135c33; font-weight: 700; }
.pager { margin-top: 16px; }
.row.between { justify-content: space-between; } .row.between h2 { margin-bottom: .6rem; } .public-note { margin-top: 16px; }

/* start screen: live strip + tabs (Moje mecze / Wszystkie mecze) */
.livestrip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 14px 0 4px; padding: 8px 12px; border-radius: var(--r);
	background: #e3f4ea; border: 1px solid #9fd3b3; color: #135c33; }
.livestrip a { color: inherit; font-weight: 600; text-decoration: none; }
.livestrip a:hover { text-decoration: underline; }
.livestrip small { font-weight: 400; }
.hometabs { display: flex; gap: 4px; margin: 18px 0 10px; border-bottom: 2px solid var(--line); }
.hometab { padding: 10px 16px; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; background: none; font: inherit; font-weight: 700;
	color: var(--muted); cursor: pointer; min-height: var(--tap); }
.hometab.on { color: var(--ink); border-bottom-color: var(--accent); }
.panel .search { margin-bottom: 10px; max-width: 560px; }
.panel .search input { flex: 1; }
.panel .row.center { margin-top: 12px; }

/* online / saved status in the game bar */
.netpill { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: 99px; font-size: .8rem; font-weight: 700;
	white-space: nowrap; width: 11.5rem; justify-content: center; border: 1px solid transparent; }
.netpill.ok { background: #1f4d34; color: #a8f0c3; border-color: #2f7a52; }
.netpill.busy { background: #3a3a22; color: #f2e5a1; border-color: #6d6a35; }
.netpill.off { background: #2e3742; color: #c9d1db; border-color: #4b5866; }
.netpill.err { background: #5a2420; color: #ffc3bb; border-color: #9a3b33; }

/* league connection (P4) */
.leagues { display: grid; gap: 8px; margin: 12px 0; }
.league-card { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; }
form.connect { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 8px; }
@media (max-width: 760px) { form.connect { grid-template-columns: 1fr; } }
.game-row.as-button { width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.note.warn { background: #fde7c7; border-color: #f0c98a; }
.league-send { margin: 16px 0; }
.league-send.due { border: 2px solid #e8743b; background: #fff4ea; }
.league-send h2 { margin-top: 0; }
.netpill.league { text-decoration: none; width: auto; min-width: 9rem; }
