/* Backroom FC: a dark "club office" look. Phone first; a side rail for the tabs from 900px. */
:root {
  --bg: #0b1220; --bg2: #101a2e; --card: #131e35; --card2: #1a2744; --card3: #233256;
  --line: rgba(255, 255, 255, 0.08); --line2: rgba(255, 255, 255, 0.16);
  --text: #eef2fb; --muted: #9aa6c2; --dim: #66739a;
  --accent: #f4b740; --accent-ink: #231600; --pitch: #1d5c3a; --pitch2: #23704a;
  --good: #34d399; --bad: #f87171; --warn: #fbbf24; --blue: #60a5fa;
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); font-family: var(--font); }
body { display: flex; flex-direction: column; overflow: hidden; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; color: inherit; }
#app { flex: 1; min-height: 0; display: flex; flex-direction: column; outline: none; }
.num, td.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.center { text-align: center; }
.warn-text { color: var(--warn); font-weight: 600; }
.neg { color: var(--bad); }
.ok-text { color: var(--good); font-weight: 600; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
p { line-height: 1.45; }

/* Buttons and chips */
.btn { min-height: 44px; padding: 0 16px; border: 0; border-radius: 11px; background: var(--card3); color: var(--text); font-size: 0.95rem; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; -webkit-tap-highlight-color: transparent; transition: filter .15s, transform .08s; }
.btn:hover { filter: brightness(1.12); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; transform: none; }
.btn:focus-visible, .chip:focus-visible, .tab:focus-visible, .slot:focus-visible, .club-tile:focus-visible, .link:focus-visible, .tick:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.warn { background: var(--warn); color: #2a1b00; }
.btn.good { background: #10b981; color: #03261a; }
.btn.danger { background: #47202a; color: #fecaca; }
.btn.ghost { background: transparent; border: 1px solid var(--line2); }
.btn.small { min-height: 44px; padding: 0 12px; font-size: 0.85rem; }
.btn.big { min-height: 54px; font-size: 1.1rem; }
.btn.wide { width: 100%; }
.icon-btn { min-width: 44px; min-height: 44px; border: 0; border-radius: 11px; background: transparent; font-size: 1.1rem; cursor: pointer; }
.icon-btn:hover { background: var(--card2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { min-height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line2); background: transparent; font-size: .9rem; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.on::before { content: "✓ "; }
.link { background: none; border: 0; padding: 6px 0; min-height: 36px; color: var(--text); font: inherit; font-weight: 600; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--dim); text-underline-offset: 3px; }
.tag { display: inline-flex; font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--card3); color: var(--muted); margin-left: 6px; white-space: nowrap; }
.tag.good { background: rgba(52,211,153,.15); color: #a7f3d0; }
.tag.bad { background: rgba(248,113,113,.15); color: #fecaca; }
.tag.warn { background: rgba(251,191,36,.15); color: #fde68a; }
.tag.blue { background: rgba(96,165,250,.15); color: #bfdbfe; }

/* Title */
.title-screen { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 28px 16px 36px;
  background: radial-gradient(ellipse at 50% -20%, #2b3f6b 0%, transparent 60%), var(--bg); }
.logo { text-align: center; margin-top: 3vh; }
.crest { width: 76px; height: 86px; margin: 0 auto 12px; display: grid; place-items: center; font-size: 2.4rem; font-weight: 900; color: var(--accent-ink);
  background: linear-gradient(180deg, var(--accent), #c98a12); clip-path: polygon(50% 100%, 0 70%, 0 0, 100% 0, 100% 70%); }
.logo-word { font-size: clamp(2.2rem, 9vw, 3.6rem); font-weight: 900; letter-spacing: -0.02em; text-transform: uppercase; }
.logo-word span { color: var(--accent); }
.logo-sub { color: var(--muted); margin-top: 6px; letter-spacing: .18em; text-transform: uppercase; font-size: .85rem; font-weight: 700; }
.menu { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 10px; }
.slot-row { display: flex; gap: 6px; align-items: stretch; }
.slot { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 64px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--card); cursor: pointer; text-align: left; }
.slot:hover { border-color: var(--line2); }
.slot.empty { justify-content: center; color: var(--muted); border-style: dashed; background: transparent; }
.slot .meta { min-width: 0; }
.slot .meta b { display: block; }
.slot .meta small { color: var(--muted); }
.title-foot { color: var(--dim); font-size: .8rem; margin: 0; }
.about-game { max-width: 560px; width: 100%; color: var(--muted); font-size: .88rem; border-top: 1px solid var(--line); padding-top: 14px; }
.about-game h2 { color: var(--text); font-size: 1rem; margin: 0 0 6px; }
.about-game[hidden] { display: none; }

/* Club picker */
.picker { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 16px 32px; }
.picker-head { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.picker-head h2 { margin: 0; font-size: 1.3rem; }
.picker-note { max-width: 1000px; margin: 10px auto 14px; }
.club-grid { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.club-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 12px; min-height: 108px; border-radius: var(--radius); cursor: pointer; text-align: left;
  border: 1px solid var(--line); border-top: 6px solid var(--c2); background: linear-gradient(150deg, color-mix(in srgb, var(--c1) 70%, #000) 0%, var(--card) 85%); }
.club-tile:hover { border-color: var(--line2); }
.club-name { font-weight: 800; font-size: 1.02rem; }
.club-meta { font-size: .78rem; color: var(--muted); }
.club-tile .tag { margin: auto 0 0; }

/* Badges */
.badge { --s: 36px; width: var(--s); height: var(--s); flex: none; border-radius: 50% 50% 46% 46%; display: inline-grid; place-items: center; font-size: calc(var(--s) * .3); font-weight: 900;
  color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.7); background: var(--c1); box-shadow: inset 0 0 0 3px var(--c2); }
.badge.lg { --s: 52px; }
.badge.sm { --s: 24px; font-size: 0; }

/* Shell */
.shell { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr auto; grid-template-areas: "bar" "view" "tabs"; }
.appbar { grid-area: bar; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, color-mix(in srgb, var(--c1) 45%, var(--bg)) 0%, var(--bg2) 70%); }
.appbar .t { flex: 1; min-width: 0; }
.appbar .t b, .appbar .t small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appbar .t small { color: var(--muted); font-size: .78rem; }
.cash { text-align: right; line-height: 1.1; }
.cash small { display: block; color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; }
.tabs { grid-area: tabs; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); border-top: 1px solid var(--line); background: var(--bg2); padding-bottom: env(safe-area-inset-bottom); }
.tab { position: relative; min-height: 56px; border: 0; background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .7rem; font-weight: 700; cursor: pointer; }
.tab .ic { font-size: 1.2rem; }
.tab.on { color: var(--accent); }
.tab.on::after { content: ""; position: absolute; top: 0; left: 20%; right: 20%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.tab .dot { position: absolute; top: 5px; right: calc(50% - 22px); min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: .68rem; display: grid; place-items: center; }
.view { grid-area: view; overflow-y: auto; overflow-x: hidden; padding: 14px 12px 28px; -webkit-overflow-scrolling: touch; }
.show-sm { display: none; }
@media (max-width: 420px) { .hide-sm { display: none; } .show-sm { display: inline; } .cash small { display: none; } .tab { font-size: .58rem; letter-spacing: -.01em; } .tab .ic { font-size: 1.1rem; } }
@media (min-width: 900px) {
  .shell { grid-template-columns: 110px minmax(0, 1fr); grid-template-rows: auto 1fr; grid-template-areas: "bar bar" "tabs view"; }
  .tabs { grid-template-columns: 1fr; grid-auto-rows: 72px; align-content: start; border-top: 0; border-right: 1px solid var(--line); }
  .tab { font-size: .78rem; }
  .tab.on::after { top: 15%; bottom: 15%; left: 0; right: auto; width: 3px; height: auto; border-radius: 0 3px 3px 0; }
  .view { padding: 18px 22px 32px; }
}

/* Cards and layout */
.grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); max-width: 1200px; margin: 0 auto; }
.col { display: grid; gap: 12px; align-content: start; min-width: 0; }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; min-width: 0; }
.card h3 { margin: 0 0 10px; font-size: 1rem; }
.card h4 { margin: 14px 0 6px; font-size: .9rem; color: var(--muted); }
.card h5 { margin: 0 0 4px; font-size: .85rem; }
.card p { margin: 8px 0; }
.field { margin: 10px 0; }
.field label { display: block; font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.stat-row > span:first-child { color: var(--muted); }
.stat-row .bar { flex: 1; max-width: 160px; }
.mini { margin: 0; padding-left: 18px; line-height: 1.5; }
.mini li { margin: 3px 0; }
.money-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }

/* Home */
.fixture { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 6px 0; }
.vs { text-align: center; }
.vs b, .vs small { display: block; }
.vs small { color: var(--muted); }
.result-line { display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 1.05rem; }
.inbox { list-style: none; margin: 0; padding: 0; }
.msg { border-left: 4px solid var(--card3); padding: 6px 10px; margin: 6px 0; background: var(--bg2); border-radius: 0 8px 8px 0; }
.msg p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.msg-head { display: flex; justify-content: space-between; gap: 8px; }
.msg-head small { color: var(--dim); white-space: nowrap; }
.msg.good { border-left-color: var(--good); }
.msg.bad { border-left-color: var(--bad); }
.msg.board { border-left-color: var(--accent); }
.msg.youth { border-left-color: var(--blue); }
.msg.money { border-left-color: #a78bfa; }
.msg.unread .msg-head b::after { content: " • new"; color: var(--accent); font-size: .75rem; }

/* Bars and ratings */
.bar { display: inline-block; width: 64px; height: 8px; border-radius: 4px; background: var(--card3); overflow: hidden; vertical-align: middle; }
.bar > span { display: block; height: 100%; background: var(--blue); }
.bar.good > span { background: var(--good); }
.bar.warn > span { background: var(--warn); }
.bar.bad > span { background: var(--bad); }
.ovr { display: inline-grid; place-items: center; min-width: 34px; height: 28px; border-radius: 7px; font-weight: 800; font-variant-numeric: tabular-nums; }
.o-elite { background: #f4b740; color: #2a1b00; }
.o-great { background: #34d399; color: #02281a; }
.o-good { background: #60a5fa; color: #061a36; }
.o-ok { background: #334155; color: #e2e8f0; }
.o-poor { background: #47202a; color: #fecaca; }
.stars { color: var(--accent); letter-spacing: 1px; white-space: nowrap; }
.pos { display: inline-block; min-width: 38px; text-align: center; font-size: .72rem; font-weight: 800; padding: 3px 6px; border-radius: 6px; background: var(--card3); }
.p-GK { background: #3f3a12; color: #fde68a; }
.p-DEF { background: #12304a; color: #bfdbfe; }
.p-MID { background: #133a2a; color: #a7f3d0; }
.p-FWD { background: #44162a; color: #fbcfe8; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
table.list { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.list th { text-align: left; font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 6px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
table.list td { padding: 4px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list tr.in td { background: rgba(244,183,64,.05); }
table.list tr.me td { background: rgba(244,183,64,.12); font-weight: 700; }
.tick { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line2); background: transparent; font-weight: 900; color: var(--accent); cursor: pointer; }
.tick[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.tick:disabled { opacity: .3; cursor: not-allowed; }
.club-cell { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 560px) {
  table.list:not(.league) th:nth-child(7), table.list:not(.league) td:nth-child(7), table.list:not(.league) th:nth-child(8), table.list:not(.league) td:nth-child(8) { display: none; }
  .bar { width: 44px; }
}

/* Pitch */
.pitch { margin-top: 10px; border-radius: 12px; padding: 10px 6px; display: grid; gap: 10px;
  background: repeating-linear-gradient(180deg, var(--pitch) 0 36px, var(--pitch2) 36px 72px); box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.line { display: flex; justify-content: space-around; gap: 4px; }
.dot-player { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; flex: 1; max-width: 80px; }
.dot-player b { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: #0b1220; font-size: .85rem; }
.dot-player.oop b { background: var(--warn); }
.dot-player.oop b::after { content: "!"; font-size: .7rem; margin-left: 1px; }
.dot-player span { font-size: .7rem; font-weight: 700; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 1px 2px #000; }

/* Academy */
.youth-list { display: grid; gap: 8px; }
.youth { border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: var(--bg2); }
.youth.decide { border-color: var(--warn); }
.youth-main { display: flex; align-items: center; gap: 10px; }
.youth-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.youth-name .link { padding: 2px 0; }
.youth-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.youth p { margin: 6px 0 0; }

/* Club */
.price { display: flex; align-items: center; gap: 14px; }
.big-num { font-size: 1.8rem; font-variant-numeric: tabular-nums; min-width: 70px; text-align: center; }

/* League */
.week-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fixtures { list-style: none; padding: 0; margin: 10px 0 0; }
.fixtures li { display: grid; grid-template-columns: 1fr 64px 1fr; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.fixtures li.me { background: rgba(244,183,64,.12); font-weight: 700; border-radius: 6px; }
.fixtures .t-h { text-align: right; }
.fixtures .sc { text-align: center; }

/* Sheets, match, toasts */
#modal-root .overlay { position: fixed; inset: 0; z-index: 50; background: rgba(4,8,18,.72); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--card); border: 1px solid var(--line2); border-radius: 18px 18px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); }
@media (min-width: 640px) { #modal-root .overlay { align-items: center; } .sheet { border-radius: 18px; } }
.sheet-title { margin: 0 0 8px; font-size: 1.15rem; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.sheet-actions .btn { flex: 1; }
.match { display: flex; flex-direction: column; min-height: min(70dvh, 560px); }
.scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 8px 0 12px; border-bottom: 1px solid var(--line); }
.scoreboard .side { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.scoreboard .mid { text-align: center; }
.score { font-size: 2.4rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.clock { color: var(--muted); font-weight: 700; }
.match-tools { display: flex; justify-content: flex-end; margin-top: 8px; }
.feed { list-style: none; margin: 8px 0 0; padding: 0; flex: 1; overflow-y: auto; max-height: 46dvh; }
.ev { display: flex; gap: 8px; align-items: baseline; padding: 6px 4px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.ev .min { color: var(--dim); min-width: 30px; font-variant-numeric: tabular-nums; }
.ev .pip { width: 10px; height: 10px; border-radius: 50%; background: var(--c1); flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.4); }
.ev.goal { font-weight: 800; color: var(--accent); }
.ev.goal::before { content: "⚽"; }
.ev.injury { color: #fecaca; }
.ev.info { color: var(--muted); font-style: italic; }
.attrs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 4px 16px; margin: 10px 0; }
.attr { display: grid; grid-template-columns: 1fr 90px 28px; align-items: center; gap: 8px; font-size: .88rem; }
.attr .bar { width: 100%; }
.big-pos { font-size: 3rem; font-weight: 900; text-align: center; color: var(--accent); }
#toast-root { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; width: min(92vw, 460px); pointer-events: none; }
.toast { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--card3); border: 1px solid var(--line2); box-shadow: 0 10px 30px rgba(0,0,0,.4); font-size: .9rem; }
.toast.bad { background: #3a1820; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* Version 0.2: club business and the market */
.suggest { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 8px 10px; border-radius: 10px; background: rgba(96,165,250,.12); border: 1px solid rgba(96,165,250,.35); }
.facility, .sponsor, .staff-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.facility:last-child, .sponsor:last-of-type, .staff-row:last-child { border-bottom: 0; }
.fac-head { display: flex; align-items: center; gap: 10px; }
.fac-head b { flex: 1; }
.fac-head .lvl { color: var(--muted); font-size: .85rem; }
.facility p { margin: 4px 0 8px; font-size: .88rem; }
.building { color: var(--warn); font-weight: 600; }
.sponsor p { margin: 4px 0; font-size: .88rem; }
.offer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px; margin: 6px 0; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line); }
.offer > div:first-child { flex: 1; min-width: 180px; }
.offer.suggested { border-color: var(--blue); }
.offer .row-actions { margin: 0; }
.staff-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.staff-who { flex: 1; min-width: 190px; display: flex; flex-direction: column; gap: 2px; }
.staff-actions { display: flex; gap: 6px; }
.cands { display: grid; gap: 8px; }
.cand { display: grid; grid-template-columns: 1fr 80px auto; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: var(--bg2); }
.cand .bar { width: 100%; }
.activity li { font-size: .85rem; }
.market-list { display: grid; gap: 6px; }
.mrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 10px; background: var(--bg2); }
.mname { min-width: 0; display: flex; flex-direction: column; }
.mname .link { padding: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mname small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow .btn { min-width: 76px; }
.stars.unknown { color: var(--dim); min-width: 20px; text-align: center; }
@media (max-width: 480px) { .mrow .stars { display: none; } }

/* ── v0.3 / v0.4 ─────────────────────────────────────────────────────────── */
.picker-div { max-width: 1000px; margin: 18px auto 8px; font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.row-actions.center { justify-content: center; }
.sheet-actions.wrap { flex-wrap: wrap; }
.chips.small .chip { min-height: 38px; padding: 0 11px; font-size: .82rem; }
.attr.planned span { color: var(--accent); font-weight: 700; }
.attr.planned span::after { content: " ★"; }
.cup-line { background: var(--card2); border-radius: 10px; padding: 8px 10px; font-weight: 600; }
.promise { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 4px; }
.auto-role { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.limits { background: var(--bg2); border-radius: 10px; padding: 4px 10px; margin: 0 0 8px; }
.limits .price { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.scout-note { display: block; margin: -4px 0 6px 44px; }
table.league tr.up td:first-child { box-shadow: inset 3px 0 0 var(--good); }
table.league tr.down td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.cup-round h4 { margin: 10px 0 4px; }

/* Match broadcast extras: title, pitch view, stats */
.match-title { margin: 0 0 4px; text-align: center; color: var(--accent); font-weight: 700; }
.pitch2d { display: block; overflow: hidden; width: 100%; max-height: 24dvh; margin-top: 8px; border-radius: 10px; }
.pitch2d .turf { fill: var(--pitch); }
.pitch2d .team, .pitch2d .ball { transition: transform .45s ease; }
.pitch2d.flash .turf { animation: goalflash .9s ease; }
@keyframes goalflash { 0%, 100% { fill: var(--pitch); } 30% { fill: #3a8f5e; } }
@media (prefers-reduced-motion: reduce) { .pitch2d .team, .pitch2d .ball { transition: none; } .pitch2d.flash .turf { animation: none; } }
.match-tools { gap: 8px; }
.match-stats { width: 100%; max-width: 360px; margin: 8px auto 0; border-collapse: collapse; font-size: .88rem; }
.match-stats th, .match-stats td { padding: 3px 6px; text-align: center; }
.match-stats tbody th { color: var(--muted); font-weight: 600; }
.match-stats thead th { color: var(--muted); font-size: .78rem; }

/* v0.5: contracts, wishes, career */
.contract-list { list-style: none; margin: 8px 0 0; padding: 0; }
.contract-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.wish-wrap { padding: 8px 0; border-bottom: 1px solid var(--line); }
.wish p { margin: 4px 0 8px; }
.terms { margin: 8px 0; }
.story { color: var(--muted); font-style: italic; }
.offers .offer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.achievements { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.achievements li { display: flex; gap: 8px; align-items: flex-start; opacity: .55; }
.achievements li.got { opacity: 1; }
.ach-icon { font-size: 1.1rem; line-height: 1.3; }
.records .stat-row b { text-align: right; }
