@font-face { font-family:'Barlow'; src:url('./fonts/Barlow-Regular.ttf') format('truetype'); font-weight:400; font-style:normal; font-display:swap; }
@font-face { font-family:'Barlow'; src:url('./fonts/Barlow-Medium.ttf') format('truetype'); font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'Barlow'; src:url('./fonts/Barlow-SemiBold.ttf') format('truetype'); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:'Barlow'; src:url('./fonts/Barlow-Bold.ttf') format('truetype'); font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'Barlow Condensed'; src:url('./fonts/BarlowCondensed-SemiBold.ttf') format('truetype'); font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:'Barlow Condensed'; src:url('./fonts/BarlowCondensed-Bold.ttf') format('truetype'); font-weight:700; font-style:normal; font-display:swap; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
.career-setup { max-width: 480px; margin: 32px auto; }
.career-setup form, .career-setup label { display: grid; gap: 8px; }
.career-setup form { gap: 14px; }
.career-setup input { color: inherit; background: #28402c; border: 1px solid #647954; border-radius: 7px; padding: 8px; font: inherit; }
.career-setup p { color: #b0c5bd; font-size: .85rem; }
.career-setup .access-note { margin:0; color:#ead49a; font-size:.8rem; }
.setup-subscription { margin-top:24px; border-top:1px solid #b7cc9d50; padding-top:18px; }
.setup-subscription h2 { margin:0; }
.career-form-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.career-setup .career-form-actions button { width:100%; min-width:0; padding:12px 8px; }
#subscription-dialog { width:min(850px,calc(100vw - 28px)); max-height:90dvh; overflow:auto; padding:24px; border:2px solid #b09b65; border-radius:8px; color:#f1f0dc; background:#143020; }
#subscription-dialog::backdrop { background:#041009cc; }
#subscription-dialog .subscription-price { font-size:2rem; font-weight:700; color:#ead49a; margin:10px 0; }
.subscription-price span { font-size:.9rem; font-weight:400; margin-left:4px; }
select option:disabled { color:#a3a89c; }
:root { color-scheme: dark; font: 16px/1.45 'Barlow', sans-serif; background: #0b1517; color: #f1f0dc; }
body { margin: 0; }
header { padding: 18px max(20px, calc((100vw - 1200px)/2)); display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #283a38; }
header span, label, legend { color: #b0c5bd; font-size: .85rem; }
main { max-width: 1240px; margin: 32px auto; padding: 0 20px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; align-items: start; gap: 18px; }
.match, aside { border: 1px solid #283a38; border-radius: 16px; background: #142c20; overflow: hidden; }
.manager { grid-column: 1 / -1; border: 1px solid #283a38; border-radius: 16px; background: #142c20; padding: 16px; }
.manager .controls { padding: 0; }
#round, #career-status, #stats, #results p { color: #b0c5bd; font-size: .85rem; margin: 10px 0; }
.league-tables { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); gap: 14px; }
.scroll-table { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
caption, #results h2 { text-align: left; font-weight: 700; font-size: .95rem; margin: 0 0 6px; }
th, td { text-align: right; padding: 5px 8px; border-bottom: 1px solid #30423e; white-space: nowrap; }
th:first-child, td:first-child { text-align: left; }
tr.selected { color: #9deac0; }
.promotion-zone td:first-child, .promotion-label { color:#82e49b; font-weight:600; }
.relegation-zone td:first-child, .relegation-label { color:#ff8a87; font-weight:600; }
.continental-zone td:first-child, .continental-label { color:#86bdff; font-weight:600; }
.standings-legend { display:flex; flex-wrap:wrap; gap:6px 18px; font-size:.8rem; }
#round-financial-summary { color:#a0e9b1; font-weight:600; }
.career-action-dialog { width:min(520px,calc(100vw - 32px)); max-height:90dvh; overflow:auto; padding:24px; color:#f1f0dc; border:1px solid #a8b376; border-radius:10px; background:#143020; }
.career-action-dialog::backdrop { background:#041009cc; }
.career-action-dialog h2 { margin-top:0; }
.career-action-dialog label { display:grid; gap:6px; }
.career-action-dialog select { width:100%; }
.career-action-buttons { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px; }
.roster { margin-top: 14px; }
.roster summary { cursor: pointer; }
#ranking-view > .scroll-table { margin:20px 0; }
#career-mode-dialog { width:min(920px,calc(100vw - 28px)); max-height:90dvh; overflow:auto; padding:30px; color:#f1f0dc; background:#143020; border:6px solid #65523c; border-radius:8px; }
#career-mode-dialog::backdrop { background:#041009d9; }
#career-mode-dialog h1 { font-size:clamp(1.6rem,3vw,2.4rem); margin:8px 0 24px; }
.career-mode-cards { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.online-mode-option { display:flex; flex-direction:column; gap:12px; min-width:0; }
.online-mode-option > .career-mode-card { flex:1; }
.online-mode-option > button { width:100%; }
.career-mode-card { display:flex; flex-direction:column; padding:22px; border:1px solid #b7cc9d70; border-top:3px solid #d7c482; background:linear-gradient(135deg,#304d2e,#122d1d); border-radius:5px; }
.career-mode-card h2 { font-size:1.7rem; margin:10px 0; }
.career-mode-card p { font-size:.9rem; color:#d1ddc5; }
.career-mode-card ul { padding-left:18px; flex:1; }
.career-mode-card li { border:0; padding:5px 0; font-size:.85rem; }
.mode-label { color:#e4ce8a; font-size:.7rem; font-weight:700; letter-spacing:.1em; }
.mode-locked { border-color:#82916b66; background:#102619; }
.mode-locked button:disabled { opacity:1; color:#d3d5bd; background:#354334; border-style:dashed; }
.ranking-tabs { margin-top:18px; }
@media(max-width:640px) { .career-mode-cards { grid-template-columns:1fr; } #career-mode-dialog { padding:18px; } header { flex-wrap:wrap; } }
#ranking-view h1 { font-size:2rem; }
#ranking-view td:nth-child(2), #ranking-view th:nth-child(2) { text-align:left; }
#coach-ranking-rows td:nth-child(3) { text-align:left; white-space:normal; min-width:150px; }
#coach-ranking-rows tr.selected { background:#d5bb6a1c; color:#f3dda0; font-weight:700; }
.manager > .roster { padding:14px 0; border-top:1px dashed #b2c1964d; }
.manager > .roster > summary { color:#e5dba8; font-size:1rem; letter-spacing:.035em; }
thead { color:#e5dba8; background:#b0c18c0b; }
button, select { transition:background-color .15s, border-color .15s; }
button:not(:disabled):hover { border-color:#d3d79f; }
a { color:#dfcf8e; }
#roster-sources a, #roster a { color: #9deac0; }
.match .roster { margin: 0 14px 14px; }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; text-align: center; padding: 14px; gap: 12px; }
.scoreboard strong { display: block; font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.scoreboard i { width:.8em; height:.8em; border:1px solid #d7e7db; box-shadow:0 0 0 1px #10281c; }
time { color: #9deac0; font-size: .85rem; }
i { display: inline-block; width: .65em; height: .65em; border-radius: 50%; margin: 0 4px; }
.home { background:var(--home-kit-bg,#526d83); }
.away { background:var(--away-kit-bg,#ffffff); }
canvas { width: 100%; height: auto; display: block; background: #10291c; }
.controls { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 14px; }
fieldset { display: flex; border: 0; gap: 4px; margin: 0; padding: 0; }
.controls label { display: grid; }
button, select { background: #28402c; border: 1px solid #647954; border-radius: 7px; color: #f1f0dc; font: inherit; padding: 5px 10px; min-height: 36px; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button[aria-pressed="true"], #play { background: #9deac0; border-color: #9deac0; color: #11291e; }
aside { padding: 18px; }
h1 { font-size: 1.05rem; margin: 0 0 12px; }
ol { padding: 0; list-style: none; margin: 0; max-height: 488px; overflow: auto; }
li { border-top: 1px solid #30423e; padding: 9px 0; font-size: .875rem; }
li time { display: inline-block; min-width: 2.25em; }
@media (max-width: 820px) { main { grid-template-columns: 1fr; margin-top: 18px; } ol { max-height: 230px; } }
/* Prancheta e gramado desenhados localmente, sem imagens ou fontes externas. */
:root { --ui-font:'Barlow',sans-serif; --heading-font:'Barlow Condensed',sans-serif; font-family:var(--ui-font); background:#091a10; color:#f1f0dc; }
body { min-height:100vh; background:radial-gradient(ellipse at 50% 0,#689c3045,transparent 65%),linear-gradient(#06150dd9,#06150de8),repeating-linear-gradient(90deg,#2d6237 0 100px,#234e2d 100px 200px); background-attachment:fixed; }
body::before { content:""; position:fixed; z-index:-1; inset:110px 4vw 4vh; border:2px solid #b7d8a51a; border-radius:2px; background:linear-gradient(90deg,transparent calc(50% - 1px),#b7d8a51a 50%,transparent calc(50% + 1px)),radial-gradient(circle at center,transparent 0 79px,#b7d8a51a 80px 81px,transparent 82px); pointer-events:none; }
header { background:#091a10eb; border-color:#c2d4a92e; padding:18px 5vw; }
header strong { font-family:var(--heading-font); font-stretch:condensed; text-transform:uppercase; letter-spacing:.07em; font-size:1.2rem; }
header strong::before { content:'⚽'; margin-right:12px; }
main { max-width:1360px; }
.manager, .match, aside { background:#10281cf5; border-color:#b7cc9d36; border-radius:8px; box-shadow:0 14px 48px #0005; }
.manager { padding:28px; min-width:0; }
#lobby { border:8px solid #65523c; outline:1px solid #ad947055; background:linear-gradient(115deg,#21433180,transparent 65%),repeating-linear-gradient(0deg,#ffffff02 0 1px,transparent 1px 5px),#122e20; box-shadow:inset 0 0 0 2px #a5ba8b35,0 18px 50px #0006; }
.career-setup { max-width:620px; margin:7vh auto; padding:46px 38px 38px; border:10px solid #6d583f; background:radial-gradient(ellipse at top,#34583988,transparent 60%),repeating-linear-gradient(0deg,#ffffff03 0 1px,transparent 1px 5px),#173523; box-shadow:inset 0 0 0 2px #c4c9a145,0 24px 70px #0008; }
.career-setup::before { content:""; position:absolute; width:132px; height:30px; top:-20px; left:calc(50% - 66px); border:2px solid #b7b5a0; border-radius:6px 6px 12px 12px; background:linear-gradient(#e3e2ce,#7b8275 45%,#b8bcaa 50%,#626e61); box-shadow:0 4px 6px #0006; }
.career-setup h1 { font-size:clamp(2.2rem,4vw,3.4rem); line-height:1.08; margin:18px 0; letter-spacing:-.02em; }
h1,h2,h3,summary,.scoreboard strong { font-family:var(--heading-font); }
h1 { font-weight:700; }
h2,h3,summary { font-weight:600; }
button { font-weight:600; letter-spacing:.01em; }
input,select,textarea { font-family:var(--ui-font); }
th,caption { font-weight:600; }
.mode-label,.subscription-price { font-family:var(--heading-font); }
h2 { font-size:1.15rem; letter-spacing:.015em; }
.eyebrow { color:#e4ce8a; font-family:var(--heading-font); font-size:.75rem; letter-spacing:.18em; font-weight:700; }
#lobby-club { font-size:2.8rem; margin:8px 0 24px; letter-spacing:.015em; text-transform:uppercase; }
.lobby-grid { display:grid; grid-template-columns:minmax(250px,.8fr) minmax(0,1.3fr); gap:24px; }
.lobby-grid > * { min-width:0; }
.next-card { background:linear-gradient(135deg,#324d2e,#183523); padding:26px; border:1px solid #c4cb8b60; border-top:4px solid #ddc17d; border-radius:4px; align-self:start; box-shadow:0 8px 20px #0003; }
.next-card h2 { font-size:1.65rem; line-height:1.3; }
.tactics-card { border:1px solid #b7cc9d36; padding:16px; border-radius:4px; background:#0c2316a8; }
.next-card p { color:#cbd6bd; }
.primary, .career-setup button { background:linear-gradient(#eee0a5,#d4b96a); border-color:#efdda0; color:#1d2d19; font-weight:700; padding:12px 22px; box-shadow:0 3px 0 #8d7338; }
button:hover:not(:disabled) { filter:brightness(1.12); }
button:focus-visible, select:focus-visible, input:focus-visible { outline:3px solid #b7efc8; outline-offset:3px; }
input, select, button { min-height:42px; }
.muted, #lineup-warning { color:#b5c6a5; font-size:.78rem; }
#lineup-pitch { position:relative; height:500px; border:2px solid #b8ebcd70; border-radius:8px; margin:8px 0; background:repeating-linear-gradient(0deg,#1a513d 0 41px,#205b44 41px 82px); overflow:hidden; }
#lineup-pitch::before { content:""; position:absolute; top:50%; left:0; width:100%; border-top:2px solid #b8ebcd55; }
#lineup-pitch::after { content:""; position:absolute; top:calc(50% - 43px); left:calc(50% - 43px); width:86px; height:86px; border:2px solid #b8ebcd55; border-radius:50%; pointer-events:none; }
.lineup-player { position:absolute; transform:translate(-50%,-50%); width:102px; text-align:center; z-index:1; font-size:.72rem; }
.lineup-player b { display:block; margin:auto auto 3px; background:#d5f7de; border-radius:9px 9px 5px 5px; width:30px; padding:5px 0; color:#152d22; box-shadow:0 3px 6px #0004; }
.lineup-player span { display:block; background:#0b211cdb; border-radius:4px; padding:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lineup-player small { font-size:.58rem; color:#d8f2e1; }
.squad-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; margin:12px 0 28px; }
.squad-player { display:flex; justify-content:space-between; flex-wrap:wrap; gap:4px 10px; padding:10px 0; border-bottom:1px solid #ffffff12; font-size:.82rem; }
.squad-player span { color:#b5c6a5; font-size:.72rem; }
.review-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,400px),1fr)); gap:20px; margin:24px 0; }
.review-grid section { padding:20px; background:#193523; border-radius:12px; }
.review-filters { display:flex; flex-wrap:wrap; gap:16px; align-items:end; margin:12px 0 20px; }
.results-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin:8px 0 18px; }
.results-heading h1 { margin:0; }
.review-filters label { display:grid; gap:6px; }
.review-filters #history-round { margin:0; }
.competition-review { display:grid; grid-template-columns:minmax(260px,.85fr) minmax(0,2fr); gap:22px; margin-bottom:24px; align-items:start; }
.round-match-list { background:#193523; padding:14px; border-radius:12px; }
.round-match-list h2 { font-size:1rem; margin:0 0 14px; }
.round-result { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:10px; width:100%; text-align:left; margin:5px 0; padding:10px; font-size:.8rem; }
.round-result span:last-child { text-align:right; }
.round-result[data-managed="true"] { border-color:#9bf0b5; }
.round-result[aria-pressed="true"] { background:#9bf0b5; color:#10261b; }
.selected-match-report { background:#193523; padding:20px; border-radius:12px; min-width:0; }
.report-score { text-align:center; font-size:1.3rem; margin:0 0 20px; }
.report-events { max-height:240px; margin:10px 0 20px; }
.report-squads { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
@media(max-width:1000px) { .report-squads { grid-template-columns:1fr; } }
@media(max-width:760px) { .competition-review { grid-template-columns:1fr; } .round-match-list { max-height:280px; overflow:auto; } }
.review-grid p { color:#d1ddc5; padding:8px 0; border-bottom:1px solid #ffffff12; }
#back-lobby { margin:14px; }
@media(max-width:800px) { .lobby-grid,.squad-grid { grid-template-columns:1fr; } .manager { padding:18px; } .career-setup { margin:25px 15px; } header span { display:none; } }
@media(max-width:440px) { .lineup-player { width:58px; font-size:.62rem; } .lineup-player small { font-size:.48rem; } #lineup-pitch { height:440px; } }
body::before { z-index:0; pointer-events:none; }
header, main, .career-setup { position:relative; z-index:1; }
.match-report { border-top:1px solid #ffffff18; padding:12px 0; }
.match-report summary { cursor:pointer; font-weight:600; line-height:1.6; }
.match-report[open] { margin-bottom:16px; }
.match-report h3 { font-size:.9rem; }
.match-report ol { max-height:240px; }
#history-round { margin:10px; }
.lineup-editor { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 12px; margin: 18px 0; }
.lineup-editor label { display: grid; gap: 5px; }
.lineup-editor select { width: 100%; min-width: 0; font-size: .8rem; }
.lineup-editor > div { display:grid; gap:5px; color:#b0c5bd; font-size:.85rem; }
.lineup-editor > div button { width:100%; text-align:left; font-size:.85rem; }
.lineup-editor > div small { font-size:.75rem; }
.player-picker { width:min(820px,94vw); max-height:85dvh; padding:18px; border:1px solid #8aa99a; border-radius:14px; color:#f1f0dc; background:#163222; }
.player-picker::backdrop { background:#0009; }
.player-picker-heading { display:flex; justify-content:space-between; gap:14px; align-items:center; margin-bottom:12px; }
.player-picker-heading h2 { margin:0; font-size:1.1rem; }
.player-picker-scroll { max-height:65dvh; overflow:auto; }
.player-picker th { position:sticky; top:0; background:#29452f; z-index:1; }
.player-picker th, .player-picker td { text-align:left; padding:4px 8px; }
.player-picker td:last-child { white-space:normal; min-width:160px; text-transform:capitalize; }
.player-picker td:first-child button { border:0; background:transparent; width:100%; text-align:left; padding:3px 0; min-height:30px; color:inherit; }
.player-choice-row { cursor:pointer; }
.player-choice-row:hover, .player-choice-row:focus-within { background-color:#55734445; }
.squad-unavailable.player-choice-row { cursor:not-allowed; }
.player-choice-row .stamina-bar { pointer-events:none; }
.player-picker tbody tr:hover, .player-picker tbody tr:focus-within { background:#29483e; }
.player-picker tr.selected { background:#254a39; }
.player-picker caption { font-size:.8rem; color:#b0c5bd; }
.player-picker .position-match td:first-child button { color:#a3f6ae; }
.player-picker .position-mismatch td:first-child button, .position-mismatch > span { color:#ffaaa2; }
.player-picker .position-mismatch td:nth-child(3) { color:#ffaaa2; }
.player-picker-heading { flex-wrap:wrap; }
.player-picker-heading p { flex-basis:100%; margin:0; font-size:.8rem; color:#d1ddc5; }
button.lineup-player { background:transparent; border:0; padding:0; min-height:0; }
.tactics-starters { margin:18px 0; }
#tactics-starters th, #tactics-starters td { text-align:left; }
#tactics-starters td:last-child { white-space:normal; min-width:150px; }
#tactics-starters button { text-align:left; padding:3px 5px; min-height:30px; }
.lineup-player.club-kit > b, .tactics-player.club-kit > b {
  display:flex; justify-content:center; align-items:center;
  width:42px; height:36px; flex-shrink:0; margin:0 auto 1px; padding:6px 0 0;
  border-radius:0; color:#fff; font-size:12px; line-height:1;
  text-shadow:1px 1px 2px #000,-1px -1px 2px #000,0 0 3px #000;
  background:var(--kit-primary); box-shadow:none;
  clip-path:polygon(29% 0,39% 0,43% 9%,57% 9%,61% 0,71% 0,100% 22%,86% 44%,74% 35%,74% 100%,26% 100%,26% 35%,14% 44%,0 22%);
}
.club-kit[data-kit="horizontal"] > b { background:repeating-linear-gradient(0deg,var(--kit-primary) 0 9px,var(--kit-secondary) 9px 18px); }
.club-kit[data-kit="vertical"] > b { background:repeating-linear-gradient(90deg,var(--kit-primary) 0 9px,var(--kit-secondary) 9px 18px); }
.club-kit[data-kit="vertical"][data-tricolor="true"] > b { background:repeating-linear-gradient(90deg,var(--kit-primary) 0 8px,var(--kit-tertiary) 8px 10px,var(--kit-secondary) 10px 18px,var(--kit-tertiary) 18px 20px); }
.club-kit[data-kit="trim"] > b, .club-kit[data-kit="solid"] > b { background:linear-gradient(var(--kit-secondary) 0 4px,var(--kit-primary) 4px 100%); }
.club-kit[data-kit="sash"] > b { background:linear-gradient(135deg,var(--kit-primary) 38%,var(--kit-secondary) 39% 56%,var(--kit-primary) 57%); }
.club-kit[data-kit="chest"] > b { background:linear-gradient(var(--kit-primary) 0 35%,var(--kit-secondary) 35% 52%,var(--kit-tertiary) 52% 69%,var(--kit-primary) 69%); }
.club-kit[data-kit="half"] > b { background:linear-gradient(135deg,var(--kit-primary) 50%,var(--kit-secondary) 50%); }
#tactics-pitch .tactics-player.club-kit { background:transparent; border:0; padding:0; gap:0; }
#tactics-pitch .club-kit > span { background:#102c29e8; border-radius:4px; padding:2px; }
#tactics-pitch .club-kit > small { background:#102c29d9; padding:0 3px; }
@media(max-width:440px) { .lineup-player.club-kit > b, .tactics-player.club-kit > b { width:38px; height:36px; font-size:11px; } }
.pitch-stage { position:relative; }
.set-piece-notice { position:absolute; z-index:2; top:10px; left:50%; transform:translateX(-50%); width:max-content; max-width:calc(100% - 24px); padding:9px 16px; border:1px solid #e8cf82; border-radius:8px; color:#fff1bf; background:#24351aef; font-size:.85rem; text-align:center; pointer-events:none; }
.pitch-stage canvas { display:block; width:100%; }
.match-notice { position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:12px; padding:24px; text-align:center; pointer-events:none; background:#102115b5; color:#fff; text-shadow:0 2px 10px #000; }
.match-notice[hidden] { display:none; }
.match-notice strong { font-size:clamp(1.7rem,7vw,4.5rem); letter-spacing:.06em; }
.match-notice span { font-size:clamp(.8rem,2vw,1.1rem); }
.match-notice[data-type="goal"] strong { color:#9bf3b5; }
.match-notice[data-type="yellow-card"] strong { color:#ffe27a; }
.match-notice[data-type="red-card"] strong { color:#ff8a88; }
.volume-controls { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.volume-controls input { width:110px; padding:0; accent-color:#9bf3b5; cursor:pointer; }
.volume-controls output { min-width:4ch; font-variant-numeric:tabular-nums; }
.volume-controls label { font-size:.8rem; }
/* The match gets the viewport; the canvas shrinks before the controls leave it. */
body.watching-match { height:100dvh; min-height:0; overflow:hidden; }
body.watching-match > header { display:none; }
body.watching-match main { height:100dvh; max-width:1600px; margin:0 auto; padding:8px; gap:10px; grid-template-columns:minmax(0,1fr) 260px; align-items:stretch; }
body.watching-match #match-view { min-height:0; height:100%; display:flex; flex-direction:column; }
.match-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:6px 12px; }
.match-heading #back-lobby { margin:0; min-height:32px; padding:4px 8px; font-size:.8rem; }
#match-status { color:#9deac0; font-size:.8rem; text-align:right; }
body.watching-match .scoreboard { padding:6px 12px; gap:8px; flex-shrink:0; }
body.watching-match .scoreboard strong { font-size:1.5rem; }
.match-field-layout { display:grid; grid-template-columns:minmax(0,1fr) 156px; min-height:0; flex:1; }
body.watching-match .pitch-stage { min-width:0; min-height:0; overflow:hidden; }
body.watching-match .pitch-stage canvas { height:100%; width:100%; object-fit:contain; }
.match-toolbar { min-width:0; min-height:0; display:flex; flex-direction:column; flex-wrap:nowrap; justify-content:center; align-items:stretch; overflow-y:auto; padding:14px 10px; gap:22px; background:#1b3725; border-left:1px solid #ffffff25; }
.match-toolbar button { min-height:42px; font-size:.85rem; }
.match-actions { display:grid; gap:12px; }
.match-actions button { width:100%; padding:12px 5px; font-weight:700; }
.match-toolbar fieldset { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:3px; min-width:0; }
.match-toolbar fieldset button { padding:5px 2px; }
.match-toolbar legend { float:none; margin-bottom:5px; font-size:.75rem; }
.match-toolbar .volume-controls { margin:0; display:grid; grid-template-columns:auto 1fr; gap:6px; padding-top:14px; border-top:1px solid #ffffff20; }
.match-toolbar .volume-controls input { width:100%; min-width:0; grid-column:1 / -1; }
.match-toolbar .volume-controls output { grid-column:1 / -1; text-align:center; font-size:.8rem; }
body.watching-match #player-stats { display:none; }
body.watching-match #match-events { min-height:0; display:flex; flex-direction:column; padding:14px; }
body.watching-match #events { flex:1; min-height:0; max-height:none; }
#match-dialog { width:min(900px,calc(100vw - 28px)); max-height:calc(100dvh - 32px); overflow:auto; border:1px solid #94a77a; border-radius:16px; padding:24px; background:#143020; color:#f1f0dc; box-shadow:0 20px 90px #0009; }
#match-dialog::backdrop { background:#061109c9; }
#match-dialog h2 { font-size:1.7rem; margin:0 0 10px; }
#match-dialog p { color:#d1ddc5; }
.dialog-actions { display:flex; flex-wrap:wrap; gap:10px; margin:18px 0; }
.dialog-actions .primary { padding:10px 16px; }
.dialog-actions { position:sticky; top:-24px; z-index:4; background:#143020; padding-block:10px; }
.tactics-controls { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); align-items:end; gap:10px 12px; width:100%; max-width:400px; margin-bottom:10px; }
.tactics-controls > label { display:grid; gap:6px; min-width:0; margin:0; font-size:.85rem; line-height:1.3; }
.tactics-controls select { width:100%; min-width:0; height:44px; margin:0; padding:8px 10px; font-size:.9rem; }
.tactics-controls > p, .tactics-controls > .muted { grid-column:1 / -1; margin:0; }
.dialog-actions #substitution-status { flex-basis:100%; margin:0; font-size:.8rem; }
.dialog-actions #substitution-status:empty { display:none; }
#discard-tactics-dialog { width:min(540px,calc(100vw - 28px)); max-height:90dvh; overflow:auto; padding:24px; border:1px solid #c4b77e; border-radius:10px; background:#143020; color:#f1f0dc; }
#discard-tactics-dialog::backdrop { background:#041009d9; }
#discard-tactics-dialog h2 { margin-top:0; }
.discard-tactics-actions { display:flex; flex-wrap:wrap; gap:12px; }
#tactics-limits { font-size:.85rem; }
#tactics-instruction { min-height:1.5em; font-size:.85rem; }
#tactics-pitch { position:relative; height:460px; overflow:hidden; border:2px solid #b8ebcd80; border-radius:10px; background:repeating-linear-gradient(0deg,#1a513d 0 38px,#205b44 38px 76px); }
#tactics-pitch::before { content:""; position:absolute; top:50%; left:0; right:0; border-top:2px solid #b8ebcd60; }
#tactics-pitch::after { content:""; position:absolute; left:calc(50% - 40px); top:calc(50% - 40px); width:80px; height:80px; border:2px solid #b8ebcd60; border-radius:50%; pointer-events:none; }
.tactics-player { width:110px; padding:5px; display:flex; flex-direction:column; align-items:center; gap:2px; font-size:.78rem; background:#102c29f0; border-color:#8fc8a5; }
.tactics-player b { display:block; background:#d5f7de; color:#152d22; padding:2px 8px; border-radius:5px; }
.tactics-player span { width:100%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tactics-player small { font-size:.65rem; color:#cbe5d5; }
#tactics-pitch .tactics-player { position:absolute; transform:translate(-50%,-50%); z-index:1; }
.tactics-player[aria-pressed="true"] { outline:3px solid #ffe284; outline-offset:2px; background:#2a493a; color:#fff; }
.tactics-player[data-pending="true"] { border-color:#ffe284; }
#tactics-bench { display:flex; gap:10px; padding:10px 4px 14px; overflow-x:auto; scrollbar-width:thin; }
#tactics-bench .tactics-player { flex:0 0 120px; }
.pending-substitution { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:8px 0; font-size:.85rem; border-bottom:1px solid #ffffff20; }
.substitution-in, #tactics-pitch .club-kit > .substitution-in { color:#a3f6ae; }
.substitution-out { color:#ffaaa2; }
.pending-substitution > div { display:grid; gap:4px; }
.substitution-note { display:block; color:#c6d7bc; white-space:normal; font-size:.73rem; }
#confirmed-substitutions .pending-substitution { flex-wrap:wrap; justify-content:flex-start; }
.change-symbol { display:inline-block; position:relative; vertical-align:middle; flex:0 0 auto; width:21px; height:20px; margin:0 0 0 6px; border-radius:2px; background:#fff; }
.change-symbol::before, .change-symbol::after { content:""; position:absolute; width:9px; height:17px; top:1px; }
.change-symbol::before { left:1px; background:#f52e52; clip-path:polygon(28% 0,72% 0,72% 55%,100% 55%,50% 100%,0 55%,28% 55%); }
.change-symbol::after { right:1px; background:#08c62c; clip-path:polygon(50% 0,100% 45%,72% 45%,72% 100%,28% 100%,28% 45%,0 45%); }
#tactics-pitch .tactics-player { overflow:visible; }
#tactics-pitch .tactics-player > .change-symbol { position:absolute; left:calc(100% - 2px); top:37px; margin:0; z-index:2; }
#tactics-withdrawn { display:flex; gap:10px; overflow-x:auto; padding:8px 2px 14px; }
#tactics-withdrawn .tactics-player { position:relative; flex:0 0 130px; opacity:.65; border-style:dashed; cursor:not-allowed; }
#tactics-withdrawn .change-symbol { position:absolute; right:3px; top:35px; }
#tactics-withdrawn .tactics-player > span { text-decoration:line-through; }
@media(max-width:560px) {
  #match-dialog { padding:14px; }
  .dialog-actions { top:-14px; }
  #tactics-pitch { height:440px; }
  #tactics-pitch .tactics-player { width:69px; font-size:.65rem; padding:4px 2px; }
  #tactics-pitch .tactics-player small { font-size:.55rem; }
}
#substitution-choices .controls { padding:8px 0; align-items:stretch; }
#substitution-choices label { flex:1; min-width:180px; }
#substitution-choices select { width:100%; min-width:0; }
@media(max-width:1050px) {
  .match-field-layout { grid-template-columns:minmax(0,1fr) 132px; }
}
@media(max-width:820px) {
  body.watching-match main { grid-template-columns:minmax(0,1fr); }
  body.watching-match #match-events { display:none; }
  .match-toolbar { padding:6px 8px; }
}
@media(max-width:560px) {
  .match-field-layout { grid-template-columns:minmax(0,1fr) 112px; }
  .match-toolbar { padding:8px 5px; gap:16px; }
  .match-actions button { font-size:.75rem; }
}
@media(max-height:500px) {
  .match-heading { padding-block:3px; }
  body.watching-match .scoreboard { padding-block:3px; }
  .match-toolbar { justify-content:flex-start; padding-block:8px; gap:12px; }
}
#lobby .club-dashboard { display:grid; grid-template-columns:minmax(220px,1fr) minmax(340px,1.25fr); gap:24px; align-items:center; margin-bottom:20px; }
.club-identity h1 { margin:8px 0; }
.club-money { color:#e6d48c; font-weight:700; margin:10px 0; }
#lobby-date { color:#b6d6b3; margin:8px 0; text-transform:capitalize; }
#manager-summary { font-size:.8rem; color:#b6c7b3; }
.club-shortcuts { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; }
.club-shortcuts button { min-height:62px; padding:10px 6px; font-size:.82rem; border-top:2px solid #b8b16b; background:linear-gradient(135deg,#314c32,#183b29); box-shadow:0 3px 8px #0003; }
.club-shortcuts button:hover { background:#3c6040; transform:translateY(-1px); }
.club-round-actions { display:flex; gap:10px; align-items:center; margin-bottom:18px; flex-wrap:wrap; }
.club-round-actions p { flex:1 1 300px; margin:0; font-size:.85rem; color:#bdd1b8; }
.club-panel-storage { display:none; }
#club-info-dialog { width:min(1100px,94vw); max-height:88vh; padding:24px; border:1px solid #adad72; border-radius:14px; background:linear-gradient(135deg,#193d2a,#10281d); color:#f2f0d5; }
#club-info-dialog::backdrop { background:#041009cc; }
.club-dialog-heading { position:sticky; top:-24px; z-index:5; display:flex; justify-content:space-between; align-items:center; gap:16px; padding:12px 0; margin-top:-12px; background:#193827; border-bottom:1px solid #8e9a68; }
.club-dialog-heading h2 { margin:0; }
#club-info-content > .manager { width:auto; margin:0; border:0; padding:18px 0; box-shadow:none; background:none; }
#club-info-content > details { border:0; margin-top:0; }
#club-info-content > details > summary { display:none; }
#club-info-content .scroll-table { max-width:100%; }
.calendar-current { border:1px solid #b8b16b; border-left:5px solid #dac46e; border-radius:10px; padding:18px; margin:20px 0; background:#29462b; }
.calendar-current strong { display:block; font-size:1.65rem; color:#f7e6a3; }
.calendar-current > span { display:block; margin-top:6px; text-transform:capitalize; }
.calendar-current p { margin-bottom:0; }
.stamina-bar { display:block; width:100%; min-width:40px; height:8px; margin:4px auto; accent-color:#82e5a0; }
.injury-cross { color:#ff7b83; font-style:normal; margin-left:5px; font-weight:900; }
#tactics-pitch .injury-player { outline:3px solid #ff7b83; outline-offset:4px; border-radius:8px; background:#58232dbb; }
tr.injury-player { background:#58232d; }
#tactics-pitch .injury-player > span { overflow:visible; white-space:normal; }
.stamina-bar::-webkit-meter-bar { background:#183126; border:1px solid #56715e; border-radius:6px; }
.stamina-bar::-webkit-meter-optimum-value { background:#83e4a2; }
.stamina-bar::-webkit-meter-suboptimum-value { background:#e7c258; }
.stamina-bar::-webkit-meter-even-less-good-value { background:#f58075; }
#lineup-pitch .stamina-bar, #tactics-pitch .stamina-bar { width:65%; height:6px; }
@media(max-width:1000px) { #lobby .club-dashboard { grid-template-columns:1fr; gap:18px; } }
@media(max-width:560px) {
  .club-shortcuts { grid-template-columns:repeat(3,minmax(0,1fr)); }
  #club-info-dialog { padding:14px; }
  .club-dialog-heading { top:-14px; }
}

/* One preparation board: compact fixture, pitch and the entire roster together. */
.squad-workspace { border:1px solid #acb57565; border-radius:10px; overflow:hidden; background:#102c1d; }
.squad-workspace .compact-fixture { display:flex; align-items:center; justify-content:space-between; gap:18px; padding:12px 16px; border:0; border-top:3px solid #d8bd75; border-bottom:1px solid #9baf6a45; border-radius:0; box-shadow:none; }
.compact-fixture h2 { margin:3px 0; font-size:1.2rem; }
.compact-fixture p { margin:3px 0; font-size:.77rem; }
.compact-fixture .eyebrow { font-size:.65rem; }
.compact-fixture > button { flex-shrink:0; }
.fixture-notes { display:flex; flex-wrap:wrap; column-gap:14px; }
.fixture-notes p { color:#afc5a6; font-size:.7rem; }
.squad-workspace-body { display:grid; grid-template-columns:minmax(300px,.85fr) minmax(0,1.35fr); gap:14px; padding:12px; }
.squad-workspace .tactics-card { border:0; padding:0; background:none; }
.squad-workspace .tactics-controls { max-width:none; gap:6px 10px; margin-bottom:8px; }
.squad-workspace .tactics-controls label { font-size:.75rem; gap:4px; }
.squad-workspace .tactics-controls select { height:36px; padding:5px 8px; font-size:.8rem; }
.squad-workspace #lineup-pitch { height:max(360px,calc(var(--lineup-rows, 4) * 78px)); margin:0; }
.squad-workspace .lineup-player { width:80px; font-size:.62rem; }
.squad-workspace .lineup-player.club-kit > b { width:34px; height:29px; font-size:10px; }
.squad-workspace .lineup-player small { font-size:.51rem; }
.squad-workspace #lineup-warning { margin:6px 0 0; font-size:.7rem; }
.squad-sheet { display:flex; flex-direction:column; min-width:0; min-height:0; }
.squad-sheet-heading { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.squad-sheet-heading h2 { font-size:1rem; margin:0; }
.squad-sheet-heading p, .squad-help { font-size:.7rem; color:#b1c6a8; margin:4px 0; }
.squad-sheet-heading button { font-size:.72rem; padding:7px 8px; }
.squad-help { margin-bottom:8px; }
.squad-sheet-scroll { max-height:clamp(360px,calc(100dvh - 370px),460px); overflow:auto; border:1px solid #719e6b60; border-radius:6px; scrollbar-gutter:stable; }
.squad-sheet-table { font-size:.72rem; }
.squad-sheet-table thead { position:sticky; top:0; z-index:2; background:#314b2e; color:#f2e5ad; }
.squad-sheet-table th, .squad-sheet-table td { padding:5px 6px; text-align:left; }
.squad-sheet-table td:first-child { font-size:.64rem; }
.squad-sheet-table td:nth-child(5) { white-space:normal; min-width:105px; }
.squad-sheet-table td:last-child { min-width:65px; }
.squad-sheet-table button { text-align:left; background:none; border:0; border-radius:3px; font-size:inherit; padding:3px 0; min-height:27px; color:inherit; white-space:normal; }
.squad-sheet-table button:hover { background:#c4d78524; }
.squad-sheet-table [draggable="true"], .lineup-player[draggable="true"] { cursor:grab; }
[data-dragging="true"] { opacity:.5; cursor:grabbing; }
[data-drop-target="true"] { outline:2px solid #e8d187; outline-offset:-2px; background:#42663670; }
#lineup-drag-status:empty { display:none; }
.team-role-panel { padding:8px 12px; border-bottom:1px solid #719e6b45; }
.team-role-panel summary { cursor:pointer; font-size:.9rem; }
#team-role-controls { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:8px; margin-top:8px; }
#team-role-controls label { display:grid; gap:4px; font-size:.72rem; min-width:0; }
#team-role-controls select { width:100%; min-width:0; font-size:.75rem; height:36px; }
.team-role-panel p { font-size:.7rem; color:#b1c6a8; margin:6px 0 0; }
.sale-market { margin-top:22px; border-top:1px solid #719e6b65; padding-top:10px; }
#sale-form label { min-width:0; flex:1 1 200px; }
#sale-form select { width:100%; min-width:0; }
.captain-badge { position:absolute; right:5px; top:5px; background:#e4cf77; color:#182720; border-radius:3px; width:13px; height:14px; font-style:normal; font-size:10px; font-weight:700; line-height:14px; }
@media(max-width:800px) { #team-role-controls { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:480px) { #team-role-controls { grid-template-columns:repeat(2,minmax(0,1fr)); } }
.squad-sheet-table small { display:block; color:#efa5a5; }
.squad-starter { background:#24472d80; }
.squad-reserve { background:#172e2080; }
.squad-outside { color:#b5bea9; }
.squad-unavailable { color:#acaaa0; background:#452b2a40; }
.squad-sheet-table .squad-reserve:first-of-type, .squad-sheet-table tr:nth-child(12) { border-top:2px solid #b0a86c; }
.squad-sheet-table .position-match td:nth-child(2) button { color:#a3f6ae; }
.squad-sheet-table .position-mismatch td:nth-child(2) button, .squad-sheet-table .position-mismatch td:nth-child(4) { color:#ffaaa2; }
.squad-sheet-table .stamina-bar { margin:2px 0; height:6px; }
#lobby .club-dashboard { gap:16px; margin-bottom:10px; }
#lobby .club-identity h1 { font-size:1.85rem; line-height:1.2; margin:4px 0; }
#lobby .club-money, #lobby #lobby-date { margin:4px 0; font-size:.78rem; }
#lobby .club-shortcuts button { min-height:42px; padding:6px; font-size:.75rem; }
#lobby .club-round-actions { margin-bottom:10px; }
@media(max-width:1000px) and (min-width:761px) {
  #lobby .club-dashboard { grid-template-columns:1fr 1.4fr; }
  .club-shortcuts { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .squad-workspace-body { grid-template-columns:minmax(270px,.9fr) minmax(0,1.2fr); }
}
@media(max-width:760px) {
  .squad-workspace-body { grid-template-columns:minmax(0,1fr); }
  .squad-workspace .compact-fixture { align-items:flex-start; flex-wrap:wrap; gap:8px; }
  .compact-fixture > button { width:100%; }
  .squad-sheet-scroll { max-height:360px; }
  .squad-workspace #lineup-pitch { height:max(360px,calc(var(--lineup-rows, 4) * 78px)); }
}

/* Keep career creation centered, with its actions beside the form. */
body:has(#career-setup:not([hidden])) { min-height:100dvh; display:flex; flex-direction:column; }
body:has(#career-setup:not([hidden])) > header { flex-shrink:0; }
body:has(#career-setup:not([hidden])) #career-setup { margin:auto; }
#career-setup { width:min(700px,calc(100% - 32px)); max-width:none; padding:22px 26px; border-width:6px; }
#career-setup::before { width:100px; height:18px; left:calc(50% - 50px); top:-13px; }
#career-setup > .eyebrow { font-size:.65rem; }
#career-setup h1 { font-size:clamp(1.5rem,3vw,2rem); line-height:1.15; margin:6px 0; }
#career-setup .setup-intro { margin:0 0 8px; font-size:.8rem; }
#career-setup #setup-source { margin:0 0 14px; font-size:.75rem; line-height:1.4; color:#c4d2b9; }
#career-setup #career-form { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px 14px; }
#career-setup label { min-width:0; gap:4px; font-size:.78rem; }
#career-setup input, #career-setup select { width:100%; min-width:0; height:40px; padding:7px 10px; font-size:.85rem; }
#career-setup .setup-full, #career-setup .career-form-actions { grid-column:1 / -1; }
#career-setup .setup-access { display:flex; flex-wrap:wrap; gap:3px 12px; padding:8px 10px; border-radius:6px; background:#0c241a; }
#career-setup .access-note { margin:0; font-size:.71rem; line-height:1.4; }
#career-setup .career-form-actions { gap:12px; margin-top:2px; }
#career-setup .career-form-actions button { min-height:42px; padding:8px 10px; font-size:.85rem; }
.site-header { justify-content:center; padding:12px 5vw; }
.site-header strong { font-size:1.35rem; font-weight:700; letter-spacing:.06em; }
.site-header { align-items:center; flex-wrap:wrap; gap:8px 18px; }
#test-edition-badge { color:#173021; background:#dfd18c; border-radius:4px; padding:4px 8px; font-size:.7rem; font-weight:700; }
body[data-edition="test"] #career-form .career-form-actions { grid-template-columns:1fr; }
.setup-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.setup-heading .eyebrow { font-size:.65rem; }
#career-setup .setup-back { flex-shrink:0; min-height:34px; padding:6px 10px; font-size:.75rem; background:#24422d; border:1px solid #82976a; color:#e2e6c9; box-shadow:none; font-weight:400; }
@media(max-width:480px) {
  #career-setup { padding:18px 16px; }
  #career-setup #career-form { grid-template-columns:minmax(0,1fr); gap:9px; }
  body:has(#career-setup:not([hidden])) #career-setup { margin:24px auto; }
}
@media(max-height:600px) and (min-width:481px) {
  #career-setup { padding:14px 22px; }
  #career-setup h1 { font-size:1.5rem; }
  #career-setup #career-form { gap:7px 12px; }
  #career-setup #setup-source { margin-bottom:9px; }
}

/* Each tactical row reserves enough room for shirt, name, information and stamina. */
#lineup-pitch .lineup-player, #tactics-pitch .tactics-player {
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  width:min(102px,calc(100% / var(--lineup-row-size, 4) - 8px));
  height:70px;
  min-height:0;
  padding:0;
  line-height:1.15;
}
#lineup-pitch .lineup-player > span, #tactics-pitch .tactics-player > span {
  box-sizing:border-box;
  width:100%;
  min-height:15px;
  flex-shrink:0;
  padding:2px;
  font-size:10px;
  line-height:11px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#lineup-pitch .lineup-player > small, #tactics-pitch .tactics-player > small {
  display:block;
  flex-shrink:0;
  font-size:9px;
  line-height:11px;
  white-space:nowrap;
}
#lineup-pitch .lineup-player.club-kit > b, #tactics-pitch .tactics-player.club-kit > b {
  box-sizing:border-box;
  width:34px;
  height:28px;
  margin:0;
  flex-shrink:0;
}
#lineup-pitch .stamina-bar, #tactics-pitch .stamina-bar {
  flex-shrink:0;
  min-width:0;
  height:6px;
  margin:1px auto 0;
}
#tactics-pitch { height:max(360px,calc(var(--lineup-rows, 4) * 78px)); }

.coach-central-title {
  display:inline-block; padding:8px 14px; margin-bottom:10px;
  border-left:4px solid #e8cf82; border-radius:3px 10px 10px 3px;
  background:linear-gradient(110deg,#385535,#183a27);
  color:#f6e8b0; font:700 clamp(1.3rem,2.4vw,1.8rem)/1.1 'Barlow Condensed',sans-serif;
  letter-spacing:.04em; text-transform:uppercase;
}
.club-wallet { display:flex; flex-wrap:wrap; gap:8px; margin:0 0 10px; }
.wallet-balance, .wallet-payroll {
  display:flex; align-items:center; gap:10px; padding:9px 12px;
  border:1px solid #bc9b5266; border-radius:12px;
  background:linear-gradient(145deg,#27382d,#101f18); box-shadow:inset 0 1px #ffffff0c;
  font-variant-numeric:tabular-nums;
}
.wallet-balance { flex:1 1 220px; }
.wallet-balance > div { min-width:0; flex:1; }
.wallet-label, .wallet-payroll > span { display:block; color:#b8c6ad; font-size:.7rem; }
.wallet-balance strong { display:block; color:#f7dc85; font-size:1.1rem; white-space:nowrap; }
.wallet-coin { font-size:1.3rem; }
#open-coin-shop { display:grid; place-items:center; flex-shrink:0; width:30px; min-height:30px; height:30px; padding:0; border-radius:50%; border:1px solid #f9e39a; background:linear-gradient(#f4df98,#b88a39); color:#253420; font-size:1.4rem; line-height:1; }
.wallet-payroll { flex:1 1 160px; flex-direction:column; align-items:flex-start; gap:1px; }
.wallet-payroll strong { color:#e3e9d3; font-size:.88rem; }
#coin-shop-dialog { width:min(860px,calc(100vw - 28px)); max-height:90dvh; overflow:auto; padding:24px; border:1px solid #c2a561; border-radius:16px; color:#f3f0d9; background:radial-gradient(ellipse at top,#2a4c31,#10251a 75%); }
#coin-shop-dialog::backdrop { background:#031008cf; }
.coin-shop-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.coin-shop-heading h2 { margin:2px 0; font:700 2rem/1.1 'Barlow Condensed',sans-serif; }
.coin-shop-heading .eyebrow { margin:0; }
.coin-packages { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:22px 0; }
.coin-package { display:flex; flex-direction:column; align-items:center; gap:10px; padding:20px 8px; border:1px solid #7d906b; border-radius:12px; color:#f0efd4; background:linear-gradient(#2b4730,#172d21); }
.coin-package strong { font-size:1rem; white-space:nowrap; }
.coin-package-icon { font-size:2rem; }
.coin-package-price { font-size:1.4rem; font-weight:700; color:#f8df91; white-space:nowrap; }
.coin-package-featured { border-color:#e7c46e; background:linear-gradient(#4b5030,#22341e); }
.coin-package[aria-pressed="true"] { outline:3px solid #a7edb9; outline-offset:2px; }
.coin-package-discount { border-radius:20px; padding:4px 8px; background:#e7ce7b; color:#1c321e; font-size:.75rem; font-weight:700; }
.coin-package-original { color:#bec3a9; font-size:.8rem; text-decoration:line-through; }
.coin-checkout { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; padding-top:12px; border-top:1px solid #a8b07855; }
#coin-package-summary { font-weight:600; }
.coin-checkout .muted { flex-basis:100%; margin:0; font-size:.8rem; }
@media(max-width:650px) { .coin-packages { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:360px) { #coin-shop-dialog { padding:16px; } .coin-package strong { font-size:.83rem; } }

.coin-package-featured { position:relative; padding-top:26px; }
.coin-package-popular { position:absolute; top:-12px; left:50%; transform:translateX(-50%); padding:5px 12px; border:1px solid #ff9c8d; border-radius:20px; background:#c93036; color:#fff; font-size:.72rem; font-weight:700; line-height:1.2; white-space:nowrap; box-shadow:0 3px 8px #0004; }

/* On phones, show the pitch first and reveal roster details only on demand. */
.squad-sheet { display:block; }
.squad-sheet > summary { display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; padding:10px 12px; border:1px solid #719e6b60; border-radius:7px; color:#e8dfa9; font-weight:700; }
.squad-sheet > summary #squad-summary { color:#b8c9af; font-size:.78rem; font-weight:500; text-align:right; }
.squad-sheet[open] > summary { margin-bottom:8px; }
.squad-sheet-content { min-width:0; }
.squad-sheet-heading { justify-content:flex-end; }
.mobile-lineup-hint { display:none; }

@media(max-width:760px) {
  main { margin:12px auto; padding:0 10px; gap:10px; }
  .manager { padding:12px; }
  #lobby { border-width:5px; }
  #lobby .club-dashboard { grid-template-columns:minmax(0,1fr); gap:8px; margin-bottom:8px; }
  .coach-central-title { margin:0 0 6px; padding:6px 10px; font-size:1.25rem; }
  .club-wallet { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:6px; margin:0 0 6px; }
  .wallet-balance, .wallet-payroll { min-width:0; padding:7px 8px; gap:6px; border-radius:9px; }
  .wallet-balance { flex:initial; }
  .wallet-balance strong { font-size:.86rem; white-space:normal; overflow-wrap:anywhere; }
  .wallet-payroll { flex:initial; }
  .wallet-payroll strong { font-size:.75rem; overflow-wrap:anywhere; }
  .wallet-label, .wallet-payroll > span { font-size:.64rem; }
  .wallet-coin { font-size:1rem; }
  #open-coin-shop { width:27px; min-height:27px; height:27px; font-size:1.15rem; }
  #lobby .club-identity h1 { font-size:1.65rem; margin:2px 0; }
  #lobby .club-money, #lobby #lobby-date { margin:2px 0; font-size:.72rem; }
  #manager-summary { font-size:.72rem; }
  .club-shortcuts { grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; }
  #lobby .club-shortcuts button { min-width:0; min-height:48px; padding:4px 2px; font-size:.66rem; line-height:1.1; overflow-wrap:anywhere; }
  #lobby .club-round-actions { gap:6px; margin:0 0 8px; }
  .club-round-actions p { flex:1 1 100%; font-size:.72rem; }
  .club-round-actions button { flex:1 1 calc(50% - 6px); min-width:0; min-height:36px; padding:5px 6px; font-size:.72rem; }
  .squad-workspace { display:flex; flex-direction:column; }
  .squad-workspace .compact-fixture { order:1; padding:10px 12px; }
  .squad-workspace-body { order:2; display:grid; grid-template-columns:minmax(0,1fr); gap:8px; padding:9px; }
  .team-role-panel { order:3; padding:7px 10px; }
  .team-role-panel summary { font-size:.82rem; }
  .team-role-panel p { font-size:.68rem; }
  .squad-workspace .tactics-controls { margin:0 0 6px; }
  .squad-workspace #lineup-pitch { width:100%; height:max(350px,calc(var(--lineup-rows, 4) * 78px)); }
  .mobile-lineup-hint { display:block; margin:5px 2px 0; color:#b8c9af; font-size:.72rem; }
  .squad-sheet { margin-top:2px; }
  .squad-sheet > summary { min-height:42px; padding:8px 10px; font-size:.86rem; }
  .squad-sheet > summary #squad-summary { font-size:.68rem; }
  .squad-sheet-content .squad-help { font-size:.72rem; }
  .squad-sheet-scroll { max-height:min(48dvh,360px); }
  .squad-sheet-table { min-width:670px; }
}

/* A phone gets a full-width field, then match controls below it. */
@media(max-width:820px) {
  body.watching-match { height:auto; min-height:100dvh; overflow-x:hidden; overflow-y:auto; }
  body.watching-match main { height:auto; min-height:100dvh; margin:0 auto; padding:8px; gap:0; grid-template-columns:minmax(0,1fr); align-items:stretch; }
  body.watching-match #match-view { height:auto; min-height:calc(100dvh - 16px); overflow:visible; }
  .match-field-layout { display:grid; grid-template-columns:minmax(0,1fr); grid-template-rows:auto auto; flex:1 0 auto; align-content:start; }
  body.watching-match .pitch-stage { width:100%; height:auto; min-height:0; aspect-ratio:900 / 510; overflow:hidden; }
  body.watching-match .pitch-stage canvas { display:block; width:100%; height:auto; object-fit:contain; }
  .match-toolbar { display:grid; grid-template-columns:minmax(0,1fr); align-content:start; gap:8px; overflow:visible; padding:8px; border-left:0; border-top:1px solid #ffffff25; }
  .match-actions { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .match-actions button { min-height:42px; padding:8px; font-size:.82rem; }
  .match-toolbar .volume-controls { display:grid; grid-template-columns:auto auto minmax(72px,1fr) auto; align-items:center; gap:6px; padding:0; border:0; }
  .match-toolbar .volume-controls label { font-size:.75rem; }
  .match-toolbar .volume-controls input, .match-toolbar .volume-controls output { grid-column:auto; min-width:0; margin:0; }
  .match-toolbar .volume-controls output { font-size:.72rem; }
  .match-toolbar fieldset { grid-column:1 / -1; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .match-toolbar legend { font-size:.75rem; }
  .match-toolbar fieldset button { min-height:38px; }
}
