.tcg-import-card { max-width: 760px; margin: 0 auto 1.15rem; }
.tcg-work-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.15rem; align-items: start; }
.tcg-link-list { display: grid; gap: 0.65rem; margin: 0; padding: 0; list-style: none; }
.tcg-game-settings { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 0.85rem; margin-top: 1rem; }
.tcg-link-list a { display: grid; gap: 0.25rem; padding: 0.85rem; border: 1px solid var(--border); border-radius: 0.65rem; color: var(--text); text-decoration: none; }
.tcg-link-list a:hover, .tcg-link-list a:focus-visible { border-color: var(--accent-strong); background: var(--panel-raised); }
.tcg-link-list + .tcg-link-list { margin-top: 0.65rem; }
.tcg-event-card.has-logo { grid-template-columns: minmax(0, 1fr) 4rem; column-gap: 0.85rem; align-items: center; }
.tcg-event-card-details { display: grid; min-width: 0; gap: 0.25rem; color: var(--text); font-size: 1rem; }
.tcg-event-card-logo { display: block; width: 4rem; height: 4rem; object-fit: contain; justify-self: end; }
.tcg-standings-access { max-width: 32rem; }
.tcg-standings-access p { margin-top: 0; }
.tcg-results-table .tcg-empty-results { white-space: normal; }
.tcg-review-table th label { display: block; margin-top: 0.65rem; font-size: 0.8rem; white-space: normal; }
.tcg-review-table th select { width: 100%; min-width: 0; }
.tcg-link-list span, .field-hint { color: var(--muted); font-size: 0.88rem; }
.tcg-section { margin-bottom: 1.15rem; }
.tcg-event-rules > summary { cursor: pointer; font-weight: 700; }
.tcg-event-rules > p { margin: 0.75rem 0; color: var(--muted); }
.tcg-rule-values { max-width: 46rem; margin: 1rem 0 0; }
.tcg-rule-values > div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(4ch, max-content); align-items: baseline; gap: 1rem; padding: 0.65rem 0; border-bottom: 1px solid var(--border); }
.tcg-rule-values > div:first-child { border-top: 1px solid var(--border); }
.tcg-rule-values dt { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.tcg-rule-values dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.eyebrow { margin: 0 0 0.45rem; color: var(--accent-strong); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.validation { padding: 0.75rem 0.85rem; border: 1px solid var(--border); border-radius: 0.55rem; }
.validation-error { border-color: var(--danger); background: var(--danger-panel); color: #ffc8c8; }
.validation-warning { border-color: #a58a54; background: rgb(91 65 45 / 45%); color: #efd397; }
.tcg-player-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0.8rem; }
.player-picker { display: grid; gap: 0.35rem; min-width: 0; align-content: start; }
.player-picker :is(input, select) { min-width: 0; width: 100%; }
.player-search-results { display: grid; gap: 0.25rem; }
.player-search-results button { width: 100%; justify-content: start; text-align: start; overflow-wrap: anywhere; }
.player-search-results:empty, .player-picker .field-hint:empty { display: none; }
.tcg-player-grid > [hidden] { display: none; }
.tcg-player-card { min-width: 0; padding: 0.9rem; border: 1px solid rgb(199 185 174 / 18%); border-radius: 0.65rem; background: rgb(33 26 24 / 32%); }
.tcg-player-card h3 { margin-top: 0; }
.tcg-player-card form { grid-template-columns: minmax(0, 1fr); }
.mapping-ok { color: var(--success); }
.tcg-settings-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; }
.tcg-results-table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }
.tcg-results-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tcg-results-table th, .tcg-results-table td { padding: 0.7rem 0.55rem; border-bottom: 1px solid rgb(199 185 174 / 16%); text-align: left; white-space: nowrap; }
.tcg-results-table thead th { color: var(--muted); font-size: 0.8rem; }
.tcg-results-table input[type="checkbox"] { width: 1.2rem; min-height: 1.2rem; }
.tcg-results-table input[type="number"] { min-width: 6rem; }
.tcg-review-table { min-width: 68rem; table-layout: fixed; }
.tcg-review-table .tcg-review-player-column { width: 9rem; }
.tcg-review-table .tcg-review-result-column { width: 22rem; }
.tcg-review-table .tcg-review-notes-column { width: 23rem; }
.tcg-review-table .tcg-review-shard-column { width: 6rem; }
.tcg-review-table .tcg-review-packs-column { width: 8rem; }
.tcg-result-inputs { display: grid; grid-template-columns: repeat(4, minmax(4.5rem, 1fr)); gap: 0.45rem; }
.tcg-result-inputs label { color: var(--muted); font-size: 0.72rem; }
.tcg-result-inputs input[type="number"] { min-width: 4.5rem; }
.tcg-total-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.tcg-total-grid > div { display: grid; gap: 0.25rem; padding: 0.9rem; border: 1px solid var(--border); border-radius: 0.6rem; background: rgb(33 26 24 / 35%); }
.tcg-total-grid span { color: var(--muted); font-size: 0.82rem; }
.tcg-total-grid strong { color: var(--accent-strong); font-size: 1.3rem; }
.tcg-confirm-card { border-color: var(--accent); }
.standings-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.standings-branding { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.25rem; }
.standings-game-logo { display: block; width: auto; height: auto; max-width: min(100%, 15rem); max-height: 5rem; object-fit: contain; }
.standings-otter-logo { display: block; width: min(100%, 15rem); height: auto; margin-left: auto; }
.standings-game-logo.logo-white-glow, .tcg-event-card-logo.logo-white-glow { filter: drop-shadow(0 0 2px white) drop-shadow(0 0 5px white); }
.league-grid > .card { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.league-grid h2, .league-grid p { overflow-wrap: anywhere; }
.league-grid .button { margin-top: auto; }
.prize-progress { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem 2rem; align-items: center; margin-bottom: 1.15rem; }
.prize-progress h2, .prize-progress p { margin-bottom: 0.25rem; }
.prize-progress p { color: var(--muted); }
.prize-progress > strong { color: var(--accent-strong); font-size: clamp(1.6rem, 4vw, 2.5rem); }
.prize-progress > strong span { color: var(--muted); font-size: 0.9rem; }
.prize-progress progress { grid-column: 1 / -1; width: 100%; height: 0.9rem; accent-color: var(--accent-strong); }
.public-standings-table th:nth-child(2), .public-standings-table td:nth-child(2) { white-space: nowrap; overflow-wrap: normal; }
.public-standings-table .standings-achievement { color: var(--accent-strong); background: rgb(178 130 112 / 9%); font-weight: 800; }
.standings-revision { color: var(--muted); font-family: Lekton, Consolas, monospace; font-size: 0.76rem; text-align: right; }
@media (max-width: 760px) {
	.tcg-work-list, .tcg-settings-grid, .tcg-total-grid, .prize-progress { grid-template-columns: 1fr; }
	.standings-heading { display: grid; }
}

@media (max-width: 420px) {
	.tcg-event-card.has-logo { grid-template-columns: minmax(0, 1fr) 3rem; }
	.tcg-event-card-logo { width: 3rem; height: 3rem; }
}

.tcg-event-date-controls {
	display: flex;
	align-items: stretch;
	gap: 0.75rem;
}
.tcg-event-date-controls input {
	min-width: 0;
	flex: 1;
}
.tcg-event-date-controls button {
	flex: 0 0 auto;
}

.tcg-results-page { display: grid; gap: 1.15rem; }
.tcg-results-page > .page-heading, .tcg-results-page > .tcg-section, .tcg-results-page > .tcg-import-card { margin-bottom: 0; }


/* Wide staff review tables use the available screen, retaining local scrolling. */
.page.tcg-review-page { width: calc(100% - clamp(1rem, 2vw, 3rem)); max-width: none; }
.tcg-review-player-name { display: block; white-space: normal; overflow-wrap: anywhere; }
.tcg-review-player-handle { display: block; white-space: normal; overflow-wrap: anywhere; }

.league-home .site-header { min-height: 4.25rem; padding-block: 0.5rem; }
.league-home .header-actions { display: none; }
.league-home .page { margin-block: 1.25rem; }
.league-home .page-heading h1 { font-size: clamp(2rem, 3vw, 2.4rem); }
.league-games { gap: 1rem; margin: 0; }
.league-game { min-width: 0; padding: 1.25rem; gap: 0.65rem; }
.league-game h2, .league-game .league-prize { margin: 0; }
.league-game .standings-game-logo { max-height: 4rem; }
.league-game h2, .league-game p { overflow-wrap: anywhere; }
.league-game h2 a { color: var(--text); text-decoration-color: var(--accent); text-underline-offset: 0.2em; }
.league-game h2 a:hover { color: var(--accent-strong); }
.league-highlights { display: grid; width: 100%; min-width: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 0.65rem; margin: 0.25rem 0; }
.league-highlight { display: flex; align-items: flex-start; gap: 0.65rem; padding: 0.75rem; border: 1px solid rgb(216 181 112 / 28%); border-radius: 0.8rem; background: linear-gradient(125deg, rgb(216 181 112 / 12%), rgb(216 181 112 / 3%)); }
.league-highlight > div { min-width: 0; }
.league-highlight h3 { margin: 0 0 0.45rem; color: #e5c68e; font-size: 0.75rem; letter-spacing: 0.07em; text-transform: uppercase; }
.league-highlight ul { display: grid; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.league-highlight li { font-size: 1.2rem; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.league-highlight p { margin: 0.4rem 0 0; color: var(--muted); font-size: 0.8rem; }
.league-highlight-icon { display: grid; place-items: center; flex: 0 0 2.4rem; height: 2.4rem; border-radius: 50%; color: #e5c68e; background: rgb(216 181 112 / 12%); font-size: 1.5rem; line-height: 1; }
.league-highlight-winner { border-color: rgb(123 196 187 / 25%); background: linear-gradient(125deg, rgb(123 196 187 / 10%), rgb(123 196 187 / 2%)); }
.league-highlight-winner h3, .league-highlight-winner .league-highlight-icon { color: #9fd5cb; }
.league-highlight-winner .league-highlight-icon { background: rgb(123 196 187 / 12%); }
@media (max-width: 600px) { .league-highlights { grid-template-columns: minmax(0, 1fr); } }
.tcg-player-matches {
	display: grid;
	gap: .75rem;
	list-style: none;
	padding: 0;
}

.tcg-player-matches button {
	max-width: 100%;
	white-space: normal;
	overflow-wrap: anywhere;
}
