:root {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #20372f;
  background: #f6f7f4;
  font-synthesis: none;
  --green: #174d3d;
  --lime: #d9ef9f;
  --muted: #64736b;
  --line: #e0e6df;
  --white: #fff;
  --red: #a13f36;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button, a, input, select { touch-action: manipulation; }
button { cursor: pointer; border: 0; background: none; color: inherit; }
button:disabled { opacity: .45; cursor: not-allowed; }
:is(button,a,input,select,textarea,summary):focus-visible { outline: 3px solid #6b9a4c; outline-offset: 4px; }
a { color: inherit; text-underline-offset: 3px; }
h1,h2,h3,p { margin: 0; }
h1,h2,h3 { font-weight: 650; }
h1 { font-size: clamp(27px,3vw,36px); letter-spacing: -1.2px; line-height: 1.16; }
h2 { font-size: 20px; letter-spacing: -.5px; }
h3 { font-size: 16px; letter-spacing: -.2px; }
.muted { color: var(--muted); font-size: 14px; line-height: 1.65; }
.eyebrow,.section-label,.form-section-label { font-size: 11px; font-weight: 700; letter-spacing: 1.3px; }
.eyebrow { color: var(--green); }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 30; padding: 12px; background: white; }
.skip-link:focus { top: 10px; }
.app-header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 0 max(28px,calc((100vw - 1200px)/2)); background: #fff; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0; text-align: left; font-size: 22px; letter-spacing: -.8px; font-weight: 750; flex-shrink: 0; }
.brand img { width: 38px; height: 38px; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; font-weight: 600; letter-spacing: 1.8px; }
.nav { display: flex; gap: 4px; }
.nav button { min-height: 44px; padding: 10px 16px; border-radius: 9px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 550; }
.nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav .active { background: #edf3ed; color: var(--green); font-weight: 700; }
.saved { display: flex; align-items: center; gap: 7px; max-width: 170px; font-size: 11px; color: var(--muted); line-height: 1.5; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #628652; flex-shrink: 0; }
.dot.offline { background: #b27729; }
.shell { max-width: 1200px; padding: 40px 28px 48px; margin: auto; }
.shell:focus { outline: none; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
.page-heading p { margin-top: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 46px; padding: 12px 18px; border: 1px solid transparent; border-radius: 9px; background: var(--green); color: white; font-size: 13px; font-weight: 650; line-height: 1.4; text-align: center; }
.btn.secondary { background: #fff; color: var(--green); border-color: var(--line); }
.btn.light { background: var(--lime); color: #1b382c; }
.btn.danger { color: var(--red); background: #faeeeb; }
.btn.full { width: 100%; }
.text-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 10px 0; color: var(--green); font-size: 13px; font-weight: 650; text-underline-offset: 4px; }
.layout { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,1fr); align-items: start; gap: 24px; }
.stack { display: grid; align-content: start; gap: 20px; min-width: 0; }
.card { min-width: 0; border: 1px solid var(--line); border-radius: 14px; background: white; padding: 24px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.badge { display: inline-block; padding: 6px 9px; background: #f0f4ee; border-radius: 6px; font-size: 11px; font-weight: 650; }
.welcome-heading { padding: 12px 0 34px; }
.welcome-heading h1 { font-size: clamp(35px,4vw,52px); letter-spacing: -2px; margin: 16px 0; font-weight: 650; line-height: 1.12; }
.welcome-heading p { font-size: 15px; line-height: 1.8; color: var(--muted); }
.intro { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 70px; padding: 44px 48px; border-radius: 18px; background: #153f33; color: white; overflow: hidden; }
.intro-label { color: #cbdccf; display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: 1.6px; font-weight: 600; }
.intro-label .dot { background: var(--lime); }
.intro h2 { font-size: clamp(27px,3vw,38px); letter-spacing: -1.2px; line-height: 1.18; margin: 18px 0 14px; font-weight: 600; }
.intro p { color: #c1d3c9; line-height: 1.8; font-size: 14px; max-width: 390px; margin-bottom: 24px; }
.intro-note { display: block; margin-top: 14px; font-size: 11px; color: #b5cdc0; line-height: 1.6; }
.match-preview { position: relative; background: #ffffff09; border: 1px solid #ffffff21; border-radius: 12px; padding: 20px; transform: rotate(2deg); }
.preview-top { display: flex; justify-content: space-between; align-items: center; font-size: 9px; letter-spacing: 1.5px; color: #bfd1c6; }
.preview-live { font-size: 9px; background: #d9ef9f18; color: var(--lime); padding: 5px 8px; border-radius: 4px; }
.preview-score { display: flex; align-items: center; justify-content: space-around; gap: 12px; padding: 16px 0; }
.preview-score > span { font-size: 9px; letter-spacing: 1px; color: #c1d3c9; }
.preview-score strong { font-size: 34px; letter-spacing: 2px; font-weight: 600; }
.preview-score i { font-style: normal; color: #819e8e; }
.preview-pitch { height: 174px; position: relative; border: 1px solid #ffffff35; border-radius: 3px; background: repeating-linear-gradient(90deg,#ffffff02 0%,#ffffff02 16.6%,#ffffff06 16.6%,#ffffff06 33.3%); }
.preview-pitch:before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 1px solid #ffffff35; }
.preview-pitch:after { content: ""; position: absolute; left: -1px; top: 29%; bottom: 29%; width: 12%; border: 1px solid #ffffff35; }
.preview-center { position: absolute; left: 50%; top: 50%; width: 55px; height: 55px; transform: translate(-50%,-50%); border: 1px solid #ffffff35; border-radius: 50%; }
.marker { position: absolute; display: grid; place-items: center; width: 24px; height: 24px; background: var(--lime); color: #244335; border-radius: 50%; font-size: 10px; font-weight: 700; box-shadow: 0 0 0 4px #d9ef9f0d; transform: translate(-50%,-50%); }
.m1 { left: 9%; top: 50%; }.m2 { left: 30%; top: 25%; }.m3 { left: 30%; top: 75%; }.m4 { left: 52%; top: 50%; }.m5 { left: 72%; top: 24%; }.m6 { left: 72%; top: 76%; }.m7 { left: 89%; top: 50%; }
.preview-event { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px; border-radius: 7px; background: #ffffff0a; font-size: 11px; }
.preview-minute { background: #d9ef9f; color: #244335; padding: 7px; border-radius: 5px; font-weight: 700; }
.preview-event small { display: block; font-size: 9px; color: #b2cbbc; margin-top: 4px; }
.preview-event > :last-child { margin-left: auto; }
.preview-caption { display: block; text-align: right; color: #adc5b7; font-size: 9px; margin-top: 9px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 38px 0 18px; }
.section-heading h2 { font-size: 21px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.feature-card { display: flex; flex-direction: column; align-items: start; padding: 24px; }
.step-number { display: flex; align-items: center; gap: 12px; color: #3f6854; font-size: 20px; font-weight: 500; margin-bottom: 25px; }
.step-number span { color: var(--muted); font-size: 9px; letter-spacing: 1.2px; font-weight: 650; }
.feature-card h3 { margin-bottom: 9px; }
.feature-card .muted { font-size: 13px; margin-bottom: 12px; }
.feature-card .text-btn,.feature-note { margin-top: auto; }
.feature-note { display: block; font-size: 11px; color: var(--muted); padding-top: 12px; line-height: 1.6; }
.import-callout { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.import-callout p { margin-top: 6px; }
.footer-note { color: var(--muted); text-align: center; font-size: 11px; line-height: 1.7; padding: 24px 0 0; }
.scoreboard { background: #153f33; color: white; border-radius: 16px; padding: 22px 28px; overflow: hidden; }
.score-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: #c4d9cc; font-size: 11px; }
.score-top > span:first-child { overflow-wrap: anywhere; }
.status-pill { display: inline-flex; align-items: center; white-space: nowrap; color: var(--lime); font-size: 10px; background: #ffffff0d; border: 1px solid #ffffff22; border-radius: 5px; padding: 6px 9px; }
.score-row { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 16px; align-items: center; text-align: center; margin: 26px 0 22px; }
.crest { margin: 0 auto 8px; width: 38px; height: 42px; border: 1px solid #ffffff40; border-radius: 10px 10px 16px 16px; background: #ffffff09; display: grid; place-items: center; color: var(--lime); font-size: 12px; font-weight: 650; }
.team-logo { display: block; width: 48px; height: 48px; object-fit: contain; background: white; border-radius: 8px; padding: 4px; margin: 0 auto 8px; }
.team-name { font-size: 13px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.home-label { color: #a8c4b3; text-transform: uppercase; font-size: 9px; letter-spacing: 1.2px; margin-top: 4px; }
.score { font-size: 48px; letter-spacing: 1px; font-weight: 650; white-space: nowrap; font-variant-numeric: tabular-nums; }
.score span { color: #83a28e; }
.timer-wrap { border-top: 1px solid #ffffff20; padding-top: 20px; text-align: center; }
.clock-display { position: relative; }
.ring-caption { display: block; font-size: 9px; letter-spacing: 1.8px; color: #adc9b9; }
.timer { font-size: 52px; font-weight: 500; letter-spacing: -1.5px; font-variant-numeric: tabular-nums; line-height: 1.2; margin-top: 3px; }
.half-clock { color: #c0d8c9; font-size: 12px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.timer-info { color: #adc9b9; font-size: 11px; margin: 5px 0 18px; }
.clock-actions { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.clock-actions button { min-height: 44px; padding: 11px 18px; font-size: 12px; border: 1px solid #ffffff30; border-radius: 8px; background: #ffffff08; }
.clock-actions .start { background: var(--lime); border-color: var(--lime); color: #203e2f; font-weight: 650; min-width: 165px; }
.clock-edit { color: #bad0c2; min-height: 40px; margin-top: 4px; font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.action { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 84px; background: white; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; font-weight: 650; }
.action.goal { background: #e5efd8; border-color: #d8e5ca; color: #284d31; }
.action .symbol { font-size: 22px; font-weight: 400; line-height: 1; }
.action small { display: none; }
.hint { color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; margin-top: 10px; }
.event-list { display: grid; }
.event { display: grid; grid-template-columns: 34px 30px minmax(0,1fr) 12px; align-items: center; gap: 10px; width: 100%; padding: 15px 0; border-top: 1px solid var(--line); text-align: left; }
.event:first-child { border-top: 0; }
.event-time { font-size: 12px; font-weight: 650; }
.event-icon { width: 30px; height: 30px; display: grid; place-items: center; background: #edf3e8; border-radius: 8px; }
.event-icon.against { color: var(--red); background: #f9ede8; }
.event-copy { font-size: 12px; line-height: 1.7; white-space: pre-line; overflow-wrap: anywhere; }
.event-copy strong { display: block; font-size: 12px; }
.empty { color: var(--muted); padding: 30px 12px; font-size: 13px; line-height: 1.8; text-align: center; }
.empty h3 { color: #284b39; margin-bottom: 6px; }
.empty-icon { color: #719068; font-size: 26px; margin-bottom: 10px; }
.section-label { text-transform: uppercase; color: var(--muted); margin-bottom: 12px; font-size: 10px; }
.form-section-label { color: var(--green); margin: 20px 0 16px; }
.roster-list { display: flex; flex-wrap: wrap; gap: 8px; }
.player-chip { display: inline-flex; align-items: center; gap: 8px; background: #f2f5ef; border-radius: 6px; padding: 8px 10px; font-size: 12px; }
.player-chip b { color: #4d703f; }
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.archive-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.archive-card { width: 100%; text-align: left; }
.archive-card h3 { margin: 15px 0; line-height: 1.6; overflow-wrap: anywhere; }
.archive-score { font-size: 30px; font-weight: 650; font-variant-numeric: tabular-nums; }
.archive-logos { display: flex; gap: 10px; margin: 12px 0; }
.archive-logos .team-logo { width: 35px; height: 35px; margin: 0; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border: 0; }
.list-row strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.list-row small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.person { display: flex; align-items: center; gap: 14px; min-width: 0; }
.person > div { min-width: 0; }
.number { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 9px; background: #edf3e6; color: #456237; font-size: 18px; font-weight: 650; flex-shrink: 0; }
.player-filters { display: grid; grid-template-columns: 1.3fr 1fr 1fr auto; gap: 12px; align-items: end; margin-bottom: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
label.field { display: grid; gap: 8px; font-size: 12px; font-weight: 600; min-width: 0; }
input, select, textarea { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #d7dfd5; border-radius: 8px; padding: 11px 12px; color: #20372f; background: white; font-size: 16px; }
input[type="checkbox"],input[type="radio"] { width: 20px; height: 20px; min-height: 20px; flex-shrink: 0; accent-color: var(--green); }
textarea { resize: vertical; }
.checks { display: grid; gap: 8px; margin: 15px 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; }
.setup-player { display: grid; grid-template-columns: 24px minmax(0,1fr) 62px 92px; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.setup-player input,.setup-player select { padding: 8px; }
.setup-player .name { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.setup-player:has(input[type="checkbox"]:not(:checked)) { opacity: .65; }
.report { white-space: pre-wrap; overflow: auto; max-height: 500px; border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: #f6f7f3; font: 13px/1.85 "Segoe UI",system-ui,sans-serif; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.toolbar .btn { font-size: 12px; }
dialog { padding: 0; border: 1px solid var(--line); width: min(600px,calc(100% - 32px)); max-height: 90dvh; border-radius: 16px; color: #20372f; background: #fff; box-shadow: 0 24px 100px #10251d30; }
body:has(dialog[open]) { overflow: hidden; }
dialog::backdrop { background: #10291f70; backdrop-filter: blur(4px); }
.modal-head { position: sticky; top: 0; z-index: 3; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 20px; }
.modal-head button { width: 44px; height: 44px; flex-shrink: 0; background: #f3f5f0; border-radius: 50%; font-size: 26px; }
.modal-body { padding: 20px 24px 24px; }
.modal-body > .muted { margin-bottom: 18px; }
.modal-body > .field { margin-top: 16px; }
.modal-body > .form-section-label:first-child { margin-top: 0; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; padding-top: 14px; background: #fff; }
.modal-actions .btn { flex: 1; }
.player-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: 17px 0; }
.player-pick { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; min-height: 90px; border: 2px solid transparent; border-radius: 9px; background: #f3f6ef; font-size: 12px; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.player-pick b { font-size: 22px; }
.player-pick:has(input:checked) { background: #e8f0dc; border-color: var(--green); }
.player-pick input { width: 18px; height: 18px; min-height: 18px; }
.sub-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.sub-columns .player-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.error { margin-top: 12px; font-size: 13px; color: var(--red); line-height: 1.6; }
.success { color: #4b7338; }
.storage-error,.sync-banner { padding: 12px 20px; background: #f8e9df; color: #7e3328; text-align: center; font-size: 13px; line-height: 1.6; }
.sync-banner { background: #eef3e4; color: #3d5432; }
.storage-error button { text-decoration: underline; min-height: 44px; }
#toast { display: none; position: fixed; bottom: 24px; left: 50%; z-index: 10; transform: translateX(-50%); background: #153f33; color: #fff; border-radius: 9px; padding: 14px 20px; max-width: calc(100% - 32px); width: max-content; font-size: 13px; box-shadow: 0 6px 30px #10251d25; }
#toast.visible { display: block; }
.fixture-info { color: var(--muted); font-size: 12px; line-height: 1.7; margin: -10px 0 20px; overflow-wrap: anywhere; }
#football-results { margin-top: 24px; }
.football-result { display: grid; width: 100%; gap: 7px; text-align: left; padding: 16px; border: 1px solid var(--line); border-radius: 10px; margin: 10px 0; background: #f5f7f1; overflow-wrap: anywhere; }
.football-result small,.football-result span { font-size: 12px; line-height: 1.6; }
.football-preview { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 12px; text-align: center; align-items: center; margin-bottom: 20px; }
.football-preview strong,.football-preview small { display: block; margin-top: 8px; overflow-wrap: anywhere; }
.card-head > .team-logo { margin: 0; }
@media (hover:hover) {
  .btn:hover,.action:hover,.archive-card:hover { filter: brightness(.97); }
  .nav button:not(.active):hover { background: #f5f7f2; }
  .event:hover { background: #f6f8f3; }
  .text-btn:hover { text-decoration: underline; }
}
@media (prefers-reduced-motion:no-preference) {
  button { transition: background .15s, border-color .15s; }
}
@media (max-width:1050px) and (min-width:761px) {
  .app-header { gap: 12px; padding: 0 24px; }
  .nav button { padding: 10px; font-size: 12px; }
  .nav svg { display: none; }
  .saved { max-width: 140px; }
  .intro { padding: 36px; gap: 30px; }
  .player-filters { grid-template-columns: 1fr 1fr; }
}
@media (max-width:760px) {
  .app-header { min-height: 68px; padding: 10px 20px; gap: 16px; }
  .brand { font-size: 20px; }
  .brand img { width: 34px; height: 34px; }
  .brand small { font-size: 7px; letter-spacing: 1.5px; }
  .saved { font-size: 10px; max-width: 125px; gap: 6px; }
  .nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 5; min-height: calc(70px + env(safe-area-inset-bottom)); padding: 7px 10px calc(7px + env(safe-area-inset-bottom)); justify-content: space-around; gap: 4px; border-top: 1px solid var(--line); background: #fffffffa; backdrop-filter: blur(12px); }
  .nav button { display: flex; flex-direction: column; justify-content: center; flex: 1; gap: 5px; min-width: 0; min-height: 54px; padding: 7px 2px; font-size: 10px; border-radius: 8px; }
  .nav svg { width: 20px; height: 20px; }
  .shell { padding: 26px 18px calc(94px + env(safe-area-inset-bottom)); }
  .welcome-heading { padding: 4px 0 26px; }
  .welcome-heading .eyebrow { font-size: 9px; letter-spacing: 1px; }
  .welcome-heading h1 { font-size: clamp(32px,8.7vw,42px); letter-spacing: -1.5px; margin: 14px 0; line-height: 1.13; }
  .welcome-heading p { font-size: 13px; line-height: 1.75; }
  .desktop-break { display: none; }
  .intro { grid-template-columns: 1fr; gap: 24px; padding: 27px 25px; border-radius: 14px; }
  .intro h2 { font-size: 29px; }
  .intro p { font-size: 13px; line-height: 1.75; margin-bottom: 20px; }
  .intro .btn { width: 100%; }
  .intro-note { text-align: center; font-size: 10px; }
  .match-preview { display: none; }
  .intro-label { font-size: 9px; letter-spacing: 1.4px; }
  .section-heading { margin: 28px 0 16px; }
  .section-heading h2 { font-size: 19px; }
  .section-heading > .muted { display: none; }
  .grid-3 { grid-template-columns: 1fr; gap: 12px; }
  .feature-card { padding: 20px; }
  .step-number { font-size: 17px; margin-bottom: 14px; }
  .feature-card .text-btn { padding-bottom: 0; }
  .import-callout { align-items: stretch; flex-direction: column; gap: 16px; margin-top: 12px; }
  .import-callout h3 { font-size: 15px; }
  .import-callout .muted { font-size: 13px; }
  .page-heading { gap: 12px; align-items: flex-start; margin-bottom: 22px; }
  h1 { font-size: 28px; letter-spacing: -1px; }
  .page-heading .muted { font-size: 12px; }
  .page-heading .btn { flex-shrink: 1; font-size: 12px; padding: 10px 12px; max-width: 100%; }
  .page-heading:has([data-action="add-player"]),.page-heading:has([data-action="add-team"]),.page-heading:has([data-action="setup"]) { flex-wrap: wrap; }
  .card { padding: 20px; border-radius: 12px; }
  .card-head { flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
  .card-head h2 { font-size: 18px; }
  .card-head .text-btn { font-size: 12px; }
  .layout { grid-template-columns: 1fr; gap: 16px; }

  .scoreboard { padding: 18px 20px 10px; border-radius: 14px; }
  .score-top { font-size: 10px; }
  .status-pill { font-size: 9px; padding: 5px 7px; }
  .score-row { gap: 10px; margin: 18px 0; }
  .team-name { font-size: 12px; }
  .score { font-size: 40px; }
  .crest { width: 30px; height: 34px; font-size: 10px; margin-bottom: 6px; }
  .team-logo { width: 36px; height: 36px; }
  .timer-wrap { padding-top: 14px; }
  .timer { font-size: 44px; }
  .half-clock { margin-top: 5px; font-size: 11px; }
  .timer-info { font-size: 10px; margin: 4px 0 12px; }
  .clock-actions { flex-wrap: nowrap; }
  .clock-actions button { flex: 1; padding: 10px; font-size: 11px; }
  .clock-actions .start { min-width: 0; }
  .clock-edit { min-height: 36px; margin-top: 2px; font-size: 10px; }
  .action { min-height: 76px; gap: 7px; font-size: 12px; }
  .action .symbol { font-size: 21px; }
  .hint { font-size: 10px; }
  .archive-grid { grid-template-columns: 1fr; gap: 14px; }
  .player-filters { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .player-filters > :first-child { grid-column: 1/-1; }
  .player-filters > .btn { grid-column: 1/-1; justify-self: start; min-height: 44px; }
  .list-row { gap: 10px; align-items: flex-start; }
  .list-row > .btn { font-size: 11px; padding: 10px; min-height: 44px; }
  .person { gap: 10px; }
  .person .number { width: 34px; height: 38px; font-size: 15px; }
  .person small { font-size: 11px; }
  dialog { width: 100%; max-width: none; max-height: calc(100dvh - env(safe-area-inset-top)); margin: auto 0 0; border: 0; border-radius: 18px 18px 0 0; }
  .modal-head { padding: 14px 20px; }
  .modal-head h2 { font-size: 19px; }
  .modal-body { padding: 20px 20px calc(24px + env(safe-area-inset-bottom)); }
  .modal-actions { position: sticky; bottom: 0; z-index: 2; padding-bottom: 8px; box-shadow: 0 -10px 12px #ffffffec; }
  .form-grid { gap: 14px 12px; }
  .form-grid > .field { font-size: 11px; }
  .setup-player { grid-template-columns: 22px minmax(0,1fr) 52px 77px; gap: 8px; }
  .setup-player input,.setup-player select { padding: 8px 5px; }
  .setup-player .name { font-size: 12px; }
  .sub-columns .player-grid { grid-template-columns: 1fr; }
  .sub-columns .player-pick { min-height: 70px; }
  #toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
  .toolbar { gap: 8px; }
  .toolbar .btn { flex: 1; }
  .archive-toolbar { margin-top: 0; }
}
@media (max-width:380px) {
  .app-header { padding-left: 16px; padding-right: 16px; }
  .saved { max-width: 110px; font-size: 9px; }
  .shell { padding-left: 14px; padding-right: 14px; }
  .nav button { font-size: 9px; }
  .intro { padding: 24px 22px; }
  .modal-body { padding-left: 16px; padding-right: 16px; }
}

.tactics-pitch { position: relative; width: 100%; aspect-ratio: .78; margin: 18px auto; max-width: 540px; border: 3px solid #c9debe; border-radius: 12px; overflow: hidden; background: repeating-linear-gradient(to bottom, #426b4b 0%, #426b4b 12.5%, #3d6445 12.5%, #3d6445 25%); isolation: isolate; }
.tactics-pitch::before { content: ''; position: absolute; inset: 3%; border: 1px solid #c8ddc073; pointer-events: none; }
.tactics-pitch::after { content: ''; position: absolute; left: 3%; right: 3%; top: 50%; border-top: 1px solid #c8ddc073; pointer-events: none; }
.pitch-center { position: absolute; width: 25%; aspect-ratio: 1; border: 1px solid #c8ddc073; border-radius: 50%; left: 37.5%; top: 50%; transform: translateY(-50%); pointer-events: none; }
.pitch-box { position: absolute; width: 55%; height: 15%; left: 22.5%; border: 1px solid #c8ddc073; pointer-events: none; }
.pitch-box.top { top: 3%; border-top: 0; } .pitch-box.bottom { bottom: 3%; border-bottom: 0; }
.attack-direction { position: absolute; top: 4%; left: 4%; font-size: 10px; letter-spacing: 1px; color: #eef9e3; pointer-events: none; }
.pitch-player { position: absolute; z-index: 1; transform: translate(-50%,-50%); display: grid; justify-items: center; width: 95px; padding: 3px; border: 0; background: transparent; color: #fff; font-size: 11px; line-height: 1.2; text-align: center; }
.pitch-player:disabled { opacity: 1; cursor: default; }
.pitch-player b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: #1b342d; background: #d7eea6; border: 2px solid #fff; font-size: 16px; box-shadow: 0 2px 8px #102a2750; }
.pitch-player strong { padding: 3px 4px; border-radius: 4px; background: #173f35e8; max-width: 100%; overflow-wrap: anywhere; }
.pitch-player small { padding: 1px 4px; color: #edf7e4; }
.editable .pitch-player { touch-action: none; cursor: grab; user-select: none; }
.editable .pitch-player.selected b, .editable .pitch-player:focus-visible b { outline: 3px solid #fff18b; outline-offset: 3px; }
.position-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.formation-readout { padding: 12px; background: #edf3e5; border-radius: 10px; font-weight: 700; }
.roster-edit-head { display: grid; grid-template-columns: 22px 1fr 54px 90px; gap: 10px; font-size: 11px; margin-top: 16px; color: var(--muted); }
[hidden] { display: none !important; }
@media(max-width: 650px) { .player-filters { grid-template-columns: 1fr 1fr; } .player-filters .field:first-child { grid-column: 1 / -1; } .pitch-player { width: 78px; font-size: 10px; } .tactics-card .card-head { flex-wrap: wrap; gap: 10px; } .position-controls { grid-template-columns: 1fr; } }

.match-roster > .hint { text-align: left; margin: -3px 0 20px; }

@media (min-width:761px) {
  .match-layout { grid-template-areas: "score timeline" "actions timeline" "roster report" "tactics next"; }
  .match-layout .scoreboard { grid-area: score; }
  .match-actions { grid-area: actions; }
  .match-timeline { grid-area: timeline; }
  .match-roster { grid-area: roster; }
  .tactics-card { grid-area: tactics; }
  .report-card { grid-area: report; }
  .match-layout > .btn { grid-area: next; }
}

@font-face {
  font-family: Inter;
  src: url("./fonts/inter-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
}

:root {
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: #1a1d1f;
  background: #f4f4f4;
  --green: #2a85ff;
  --lime: #2a85ff;
  --muted: #6f767e;
  --line: #ececec;
  --white: #fcfcfc;
  --red: #ff6a55;
}
body { background: #f4f4f4; font-size: 15px; }
:is(button,a,input,select,textarea,summary):focus-visible { outline-color: #2a85ff; }
h1,h2,h3 { color: #1a1d1f; font-weight: 700; }
h1 { font-size: 40px; letter-spacing: -1.2px; }
h2 { font-size: 20px; letter-spacing: -.4px; }
h3 { font-size: 16px; letter-spacing: -.25px; }
.muted { color: #6f767e; }
#app { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 7;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  width: 340px;
  padding: 24px;
  background: #fcfcfc;
  border-right: 1px solid #ececec;
}
.sidebar .brand { width: fit-content; gap: 11px; font-size: 19px; letter-spacing: -.55px; }
.sidebar .brand img { width: 42px; height: 42px; border-radius: 10px; }
.sidebar .brand small { margin-top: 2px; color: #9a9fa5; font-size: 8px; letter-spacing: 1px; }
.nav { display: flex; flex-direction: column; gap: 8px; margin-top: 48px; width: 100%; }
.nav button {
  justify-content: flex-start;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  gap: 14px;
  border-radius: 12px;
  color: #6f767e;
  font-size: 15px;
  font-weight: 600;
}
.nav svg { width: 21px; height: 21px; }
.nav .active { background: #efefef; color: #1a1d1f; font-weight: 700; }
.sidebar-foot { display: grid; gap: 16px; margin-top: auto; padding-top: 24px; border-top: 1px solid #ececec; }
.sidebar-help { color: #9a9fa5; font-size: 12px; }
.saved { max-width: 100%; font-size: 12px; }
.dot { background: #83bf6e; }
.dot.offline { background: #ffb848; }
.workspace { min-height: 100vh; margin-left: 340px; }
.app-header {
  min-height: 96px;
  padding: 0 40px;
  border-bottom: 0;
  background: #fcfcfc;
  gap: 24px;
}
.header-search {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(352px, 50%);
  min-height: 48px;
  padding: 0 12px;
  border-radius: 12px;
  background: #f4f4f4;
  color: #9a9fa5;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.header-search svg { width: 20px; height: 20px; flex: none; color: #6f767e; }
.header-search span { flex: 1; }
.header-search kbd { display: grid; place-items: center; width: 50px; height: 32px; border-radius: 8px; background: #fcfcfc; color: #1a1d1f; font: 600 14px Inter,sans-serif; }
.header-actions { display: flex; align-items: center; gap: 24px; }
.header-context { font-size: 14px; font-weight: 600; }
.shell { width: 100%; max-width: none; margin: 0; padding: 40px; }
.page-heading { align-items: flex-start; margin-bottom: 24px; }
.page-heading p { font-size: 14px; }
.btn {
  min-height: 46px;
  padding: 11px 18px;
  border-radius: 10px;
  background: #2a85ff;
  color: #fcfcfc;
  font-size: 14px;
  font-weight: 700;
}
.btn.secondary { background: #fcfcfc; color: #1a1d1f; border-color: #e8e8e8; }
.btn.light { background: #2a85ff; color: #fff; }
.btn.danger { background: #fff0ee; color: #d34a37; }
.text-btn { color: #2a85ff; font-weight: 700; }
.card { border: 0; border-radius: 8px; background: #fcfcfc; padding: 24px; box-shadow: none; }
.card-head { margin-bottom: 24px; }
.card-head h2[class^="marker-"] { display: flex; align-items: center; gap: 16px; }
.card-head h2[class^="marker-"]::before { content: ""; display: block; width: 16px; height: 32px; border-radius: 4px; flex: none; }
.marker-peach::before { background: #ffbc99; }
.marker-lavender::before { background: #c9b8ff; }
.marker-cyan::before { background: #a6e7ff; }
.marker-mint::before { background: #b5e5ce; }
.marker-yellow::before { background: #ffdb94; }
.card-more { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #eee; border-radius: 11px; color: #6f767e; }
.badge { background: #eef7ff; color: #2a85ff; }
.welcome-heading { padding: 0 0 24px; }
.welcome-heading .eyebrow { display: none; }
.welcome-heading h1 { margin: 0; font-size: 40px; line-height: 1.2; letter-spacing: -1.2px; }
.welcome-heading p { margin-top: 8px; font-size: 14px; line-height: 1.5; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(280px,1fr); gap: 8px; align-items: start; }
.dashboard-main,.dashboard-aside { display: grid; gap: 8px; min-width: 0; }
.overview-card { min-height: 354px; }
.stat-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; padding: 8px; border-radius: 18px; background: #f4f4f4; }
.stat { display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 106px; padding: 14px; text-align: left; border-radius: 14px; }
.stat:first-child { background: #fcfcfc; box-shadow: 0 3px 8px #1a1d1f12; }
.stat-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; color: #1a1d1f; font-size: 23px; }
.stat-icon.cyan { background: #a6e7ff; }.stat-icon.lavender { background: #d5c4ff; }.stat-icon.mint { background: #b5e5ce; }
.stat small,.stat strong { display: block; }
.stat small { color: #6f767e; font-size: 12px; font-weight: 600; }
.stat strong { font-size: clamp(25px,3vw,40px); font-weight: 700; line-height: 1.2; }
.overview-detail { display: flex; align-items: start; justify-content: space-between; gap: 16px; margin-top: 30px; }
.overview-detail p { margin-bottom: 6px; color: #6f767e; }
.overview-detail .btn { flex: none; }
.intro { display: block; min-height: 224px; color: #1a1d1f; background: #fcfcfc; padding: 24px; border-radius: 8px; overflow: visible; }
.intro .card-head { margin-bottom: 24px; }
.intro-label { color: #6f767e; font-size: 11px; letter-spacing: .7px; }
.intro h3 { margin: 8px 0; font-size: 20px; }
.intro p { max-width: none; margin: 0 0 16px; color: #6f767e; line-height: 1.6; }
.intro .btn { width: auto; }
.step-list { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.step-list button { display: flex; align-items: center; gap: 10px; min-width: 0; text-align: left; }
.step-list button > span:nth-child(2) { flex: 1; min-width: 0; }
.step-list strong,.step-list small { display: block; }
.step-list strong { font-size: 13px; }
.step-list small { margin-top: 5px; color: #6f767e; font-size: 11px; line-height: 1.4; }
.step-list button > span:last-child { color: #9a9fa5; }
.step-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: none; border: 1px solid #e8e8e8; border-radius: 50%; color: #2a85ff; font-size: 12px; font-weight: 700; }
.side-card { display: grid; }
.side-card .card-head { margin-bottom: 18px; }
.side-row { display: flex; align-items: center; gap: 11px; min-height: 72px; width: 100%; border-top: 1px solid #f0f0f0; text-align: left; }
.side-row > span:nth-child(2) { flex: 1; min-width: 0; }
.side-row strong,.side-row small { display: block; overflow-wrap: anywhere; }
.side-row strong { font-size: 13px; }
.side-row small { margin-top: 3px; color: #6f767e; font-size: 11px; }
.side-row > span:last-child { color: #9a9fa5; }
.side-avatar { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 12px; background: #e4ecff; color: #2a85ff; font-size: 13px; font-weight: 700; }
.side-card > .btn { margin-top: 18px; }
.side-card > .muted { margin-bottom: 20px; font-size: 13px; }
.side-card .empty { padding: 20px 0; text-align: left; }
.layout { grid-template-columns: minmax(0,2fr) minmax(280px,1fr); gap: 8px; }
.scoreboard { background: #fcfcfc; color: #1a1d1f; border-radius: 8px; padding: 24px; }
.score-top { color: #6f767e; font-size: 12px; }
.status-pill { color: #2a85ff; border: 0; background: #eef7ff; font-size: 11px; font-weight: 700; }
.score-row { margin: 20px 0 14px; }
.score { font-size: 40px; letter-spacing: -1px; }
.score span { color: #b0b5ba; }
.crest { background: #e7f0ff; border: 0; color: #2a85ff; }
.team-logo { border: 1px solid #e8e8e8; }
.home-label { color: #9a9fa5; }
.timer-wrap { border-color: #eee; padding-top: 14px; }
.clock-display { display: grid; place-items: center; width: 146px; height: 146px; margin: auto; }
.time-ring { width: 146px; height: 146px; grid-area: 1/1; }
.ring-track,.ring-progress { fill: none; stroke-width: 8; }
.ring-track { stroke: #edf0f3; }
.ring-progress { stroke: #2a85ff; stroke-linecap: round; transition: stroke-dashoffset .4s linear; }
.clock-center { display: grid; justify-items: center; align-content: center; grid-area: 1/1; width: 100%; height: 100%; }
.ring-caption { color: #9a9fa5; font-size: 9px; letter-spacing: 1px; }
.timer { margin-top: 3px; color: #1a1d1f; font-size: 30px; font-weight: 700; line-height: 1.1; letter-spacing: -.8px; }
.ring-period { margin-top: 4px; color: #6f767e; font-size: 10px; }
.half-clock { color: #6f767e; font-size: 11px; margin-top: 4px; }
.timer-info { color: #9a9fa5; margin: 3px 0 12px; font-size: 11px; }
.clock-actions button { min-height: 42px; border-color: #e8e8e8; background: #fcfcfc; color: #1a1d1f; }
.clock-actions .start { background: #2a85ff; border-color: #2a85ff; color: #fff; }
.clock-edit { color: #2a85ff; }
.match-actions { padding: 16px; background: #fcfcfc; border-radius: 8px; }
.actions { gap: 8px; }
.action { min-height: 72px; background: #f4f4f4; border: 0; border-radius: 8px; color: #1a1d1f; }
.action.goal { background: #eaf4ff; color: #1a62c9; }
.event { border-color: #eee; }
.event-icon { color: #2a85ff; background: #eaf4ff; }
.event-icon.against { color: #ff6a55; background: #fff0ee; }
.event:hover { background: #f6f8fa; }
.empty h3 { color: #1a1d1f; }
.empty-icon { color: #2a85ff; }
.section-label { color: #9a9fa5; }
.form-section-label { color: #2a85ff; }
.player-chip { background: #f4f4f4; }
.player-chip b { color: #2a85ff; }
.archive-grid { gap: 8px; }
.list-row { border-color: #eee; }
.number { background: #eaf4ff; color: #2a85ff; }
input,select,textarea { border-color: #e5e7e9; color: #1a1d1f; background: #fcfcfc; }
input[type="checkbox"],input[type="radio"] { accent-color: #2a85ff; }
.report { background: #f4f4f4; }
dialog { color: #1a1d1f; border-color: #e9e9e9; border-radius: 12px; box-shadow: 0 24px 90px #1a1d1f30; }
dialog::backdrop { background: #1a1d1f70; }
.modal-head { border-color: #eee; }
.modal-head button { background: #f4f4f4; color: #6f767e; }
.player-pick { background: #f4f4f4; }
.player-pick:has(input:checked) { background: #eaf4ff; border-color: #2a85ff; }
.formation-readout { background: #eaf4ff; }
#toast { background: #1a1d1f; }
.football-result { background: #f8f8f8; }
@media (hover:hover) {
  .nav button:not(.active):hover { background: #f4f4f4; }
  .btn:hover,.action:hover,.archive-card:hover { filter: brightness(.97); }
}
@media (max-width:1280px) and (min-width:761px) {
  .stat { display: grid; justify-items: center; gap: 8px; text-align: center; }
}
@media (max-width:1200px) and (min-width:761px) {
  .sidebar { width: 260px; }
  .workspace { margin-left: 260px; }
  .app-header { padding: 0 28px; }
  .shell { padding: 28px; }
  .dashboard-grid,.layout { grid-template-columns: minmax(0,1.5fr) minmax(260px,1fr); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-aside { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .step-list { grid-template-columns: 1fr; }
  .header-context { display: none; }
}
@media (max-width:900px) and (min-width:761px) {
  .sidebar { width: 220px; padding: 18px; }
  .workspace { margin-left: 220px; }
  .dashboard-grid,.layout { grid-template-columns: 1fr; }
  .dashboard-aside { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .match-layout { display: grid; grid-template-areas: none; }
  .match-layout > * { grid-area: auto !important; }
}
@media (max-width:760px) {
  .sidebar { inset: auto 0 0; width: 100%; height: auto; padding: 0; border: 0; background: transparent; }
  .sidebar .brand,.sidebar-foot { display: none; }
  .workspace { margin-left: 0; }
  .nav { position: relative; inset: auto; z-index: 8; display: flex; flex-direction: row; width: 100%; min-height: calc(68px + env(safe-area-inset-bottom)); margin: 0; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); gap: 4px; border-top: 1px solid #ececec; background: #fcfcfc; }
  .nav button { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 4px; width: auto; height: 52px; min-height: 52px; padding: 5px 2px; font-size: 10px; text-align: center; }
  .nav svg { display: block; width: 20px; height: 20px; }
  .app-header { min-height: 72px; padding: 12px 18px; gap: 8px; }
  .header-search { width: auto; flex: 1; min-height: 44px; font-size: 12px; }
  .header-search kbd { display: none; }
  .header-context { display: none; }
  .header-create { min-height: 44px; padding: 9px 11px; font-size: 11px; white-space: nowrap; }
  .shell { padding: 24px 16px calc(96px + env(safe-area-inset-bottom)); }
  .welcome-heading { padding: 0 0 22px; }
  .welcome-heading h1 { font-size: 30px; }
  .welcome-heading p { font-size: 12px; }
  .dashboard-grid,.layout { grid-template-columns: 1fr; gap: 8px; }
  .dashboard-main,.dashboard-aside { gap: 8px; }
  .dashboard-aside { grid-template-columns: 1fr; }
  .overview-card { min-height: 0; }
  .stat-strip { gap: 4px; padding: 5px; }
  .stat { display: grid; justify-items: center; gap: 4px; min-height: 92px; padding: 8px 3px; text-align: center; }
  .stat-icon { width: 30px; height: 30px; font-size: 17px; }
  .stat small { font-size: 10px; }
  .stat strong { font-size: 26px; }
  .overview-detail { display: grid; margin-top: 22px; }
  .overview-detail p { font-size: 13px; }
  .overview-detail .btn { justify-self: start; }
  .intro { padding: 20px; }
  .intro .btn { width: auto; }
  .step-list { grid-template-columns: 1fr; gap: 16px; }
  .scoreboard { padding: 18px; }
  .score-row { margin: 16px 0 10px; }
  .score { font-size: 35px; }
  .clock-display,.time-ring { width: 132px; height: 132px; }
  .timer { font-size: 27px; }
  .timer-wrap { padding-top: 10px; }
  .clock-actions button { min-height: 42px; }
  .match-actions { padding: 12px; }
  .action { min-height: 68px; }
  .card { padding: 20px; }
  .page-heading { flex-wrap: wrap; }
  .page-heading .btn { min-height: 42px; }
  .player-filters { margin-bottom: 8px; }
  dialog { border-radius: 14px 14px 0 0; }
}
@media (max-width:380px) {
  .shell { padding-left: 12px; padding-right: 12px; }
  .app-header { padding-left: 12px; padding-right: 12px; }
  .header-search span { max-width: 102px; overflow: hidden; white-space: nowrap; }
  .header-create { font-size: 10px; }
  .nav button { font-size: 9px; }
}
.intro .card-head h2 { font-size: 20px; letter-spacing: -.4px; }
.overview-card { min-height: 494px; }
.overview-players { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-top: 44px; }
.overview-players strong,.overview-players .muted { display: block; }
.overview-players strong { font-size: 14px; }
.overview-players .muted { margin-top: 5px; font-size: 12px; }
.overview-avatars { display: flex; align-items: center; padding-right: 2px; }
.player-avatar,.overview-avatars button { display: grid; place-items: center; width: 48px; height: 48px; margin-left: -7px; border: 3px solid #fcfcfc; border-radius: 50%; background: #ffdbbf; color: #1a1d1f; font-size: 12px; font-weight: 700; }
.player-avatar:nth-child(2) { background: #ffe2a8; }
.player-avatar:nth-child(3) { background: #d5c4ff; }
.overview-avatars button { margin-left: 7px; background: #f4f4f4; color: #6f767e; font-size: 24px; font-weight: 400; }
@media (max-width:760px) {
  .overview-card { min-height: 0; }
  .overview-players { margin-top: 26px; align-items: center; }
  .overview-players .muted { max-width: 180px; line-height: 1.4; }
  .player-avatar,.overview-avatars button { width: 40px; height: 40px; }
}

.trainer-switch { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid #e8e8e8; border-radius: 12px; background: #f8f9fa; text-align: left; }
.trainer-switch strong, .trainer-switch small { display: block; overflow-wrap: anywhere; }
.trainer-switch strong { font-size: 13px; color: #1a1d1f; }
.trainer-switch small { margin-top: 2px; font-size: 11px; color: #6f767e; }
.trainer-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: #eaf4ff; color: #2a85ff; font-size: 13px; font-weight: 700; }
.trainer-avatar.large { width: 44px; height: 44px; font-size: 15px; }
.trainer-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border: 1px solid #e8e8e8; border-radius: 10px; background: #f8f9fa; color: #1a1d1f; font-size: 12px; font-weight: 600; white-space: nowrap; }
.collab-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.card-actions-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.badge.status-approved { background: #e6f6ec; color: #1f7a3f; }
.badge.status-proposed { background: #fff4df; color: #9c6514; }
.badge.status-draft { background: #f1f3f5; color: #5c646d; }
.badge.warn-badge { background: #fff0ee; color: #c93b2b; }
.conflict-tag { display: block; margin-top: 3px; color: #c93b2b; font-size: 11px; font-weight: 600; line-height: 1.35; }
.warn-dot { color: #c93b2b; font-weight: 700; }
.notes-summary { display: grid; gap: 6px; margin-top: 16px; padding: 12px 14px; border-radius: 8px; background: #f8f9fa; font-size: 12px; line-height: 1.5; }
.notes-summary p { overflow-wrap: anywhere; }
.note-log { display: grid; gap: 8px; margin-top: 12px; }
.note-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #f8f9fa; font-size: 12px; overflow-wrap: anywhere; }
.collab-profile { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.collab-profile > div { flex: 1; min-width: 140px; }
.collab-profile strong, .collab-profile small { display: block; }
.collab-profile small { margin-top: 3px; color: #6f767e; font-size: 12px; }
.invite-box { margin-top: 14px; padding: 14px; border: 1px solid #cfe3ff; border-radius: 10px; background: #eef7ff; font-size: 13px; }
.invite-box p { margin: 8px 0 12px; overflow-wrap: anywhere; }
.invite-box code { font-size: 11px; word-break: break-all; }
.side-card > .btn + .btn { margin-top: 8px; }
@media (max-width:760px) {
  .header-actions { gap: 8px; }
  .trainer-pill { padding: 6px 9px; font-size: 11px; }
}
@media (max-width:380px) {
  .trainer-pill { display: none; }
}

.small-btn { min-height: 36px; padding: 7px 12px; font-size: 12px; }
.match-switcher { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; padding: 8px 12px; border-radius: 10px; background: #fcfcfc; }
.switcher-label { font-size: 11px; font-weight: 700; color: #6f767e; text-transform: uppercase; letter-spacing: .8px; }
.switch-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 10px; border: 1px solid #e8e8e8; border-radius: 8px; background: #f8f9fa; font-size: 12px; color: #1a1d1f; }
.switch-pill span { color: #6f767e; font-size: 11px; }
.switch-pill.active { border-color: #2a85ff; background: #eef7ff; color: #1a62c9; }
.switch-pill.active span { color: #1a62c9; }
.switch-pill.ghost { border-style: dashed; color: #2a85ff; background: transparent; font-weight: 600; }

.phase-bar { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; padding: 6px; border-radius: 12px; background: #fcfcfc; }
.phase-step { display: flex; align-items: center; gap: 10px; min-width: 0; min-height: 48px; padding: 8px 12px; border: 1px solid #ececec; border-radius: 9px; background: #f8f9fa; text-align: left; }
.phase-step > span:last-child { min-width: 0; flex: 1; }
.phase-step strong, .phase-step small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phase-step strong { font-size: 12px; color: #1a1d1f; }
.phase-step small { margin-top: 2px; font-size: 11px; color: #6f767e; }
.phase-num { display: grid; place-items: center; width: 24px; height: 24px; flex: none; border-radius: 50%; background: #e8ecef; color: #6f767e; font-size: 11px; font-weight: 700; }
.phase-step.active { border-color: #2a85ff; background: #eef7ff; }
.phase-step.active .phase-num { background: #2a85ff; color: #fff; }
.phase-step.active strong { color: #1a62c9; }
.phase-step.done .phase-num { background: #e6f6ec; color: #1f7a3f; }

.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; min-height: 36px; padding: 6px 12px; border: 1px solid #e5e7e9; border-radius: 999px; background: #fcfcfc; color: #6f767e; font-size: 12px; font-weight: 600; }
.chip.active { border-color: #2a85ff; background: #eef7ff; color: #2a85ff; }
.archive-section > .section-label { margin-bottom: 10px; }

.dashboard-match-list { display: grid; gap: 10px; }
.dashboard-match-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid #ececec; border-radius: 10px; background: #f8f9fa; }
.dashboard-match-row > div { flex: 1; min-width: 180px; }
.dashboard-match-row strong, .dashboard-match-row small { display: block; overflow-wrap: anywhere; }
.dashboard-match-row strong { font-size: 14px; color: #1a1d1f; }
.dashboard-match-row small { margin-top: 3px; font-size: 12px; color: #6f767e; }
.dashboard-match-row.scheduled { border-style: dashed; border-color: #cfe3ff; background: #f7fbff; }
.last-match-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.last-match-summary > div { flex: 1; min-width: 160px; }
.last-match-summary strong, .last-match-summary small { display: block; overflow-wrap: anywhere; }
.last-match-summary strong { font-size: 15px; color: #1a1d1f; }
.last-match-summary small { margin-top: 4px; font-size: 12px; color: #6f767e; }

@media (max-width:760px) {
  .app-header { min-height: 58px; padding: 8px 16px; gap: 6px; }
  .header-search, .header-create, .trainer-pill { min-height: 38px; }
  .shell { padding: 14px 16px calc(92px + env(safe-area-inset-bottom)); }
  .page-heading { margin-bottom: 10px; gap: 8px; }
  .page-heading h1 { font-size: 24px; line-height: 1.15; }
  .page-heading p { margin-top: 2px; font-size: 11px; line-height: 1.35; }
  .page-heading .btn { min-height: 36px; padding: 6px 10px; font-size: 11px; }
  .match-switcher { gap: 6px; margin-bottom: 6px; padding: 6px 8px; }
  .switch-pill { min-height: 30px; padding: 4px 8px; font-size: 11px; }
  .phase-bar { gap: 4px; margin-bottom: 8px; padding: 4px; }
  .phase-step { gap: 6px; min-height: 40px; padding: 5px 7px; }
  .phase-num { width: 20px; height: 20px; font-size: 10px; }
  .phase-step strong { font-size: 11px; }
  .phase-step small { font-size: 10px; }
  .scoreboard { padding: 12px 14px; }
  .score-row { margin: 8px 0 8px; }
  .score { font-size: 32px; }
  .crest { width: 28px; height: 30px; margin-bottom: 4px; }
  .team-logo { width: 32px; height: 32px; margin-bottom: 4px; }
  .timer-wrap { padding-top: 8px; }
  .clock-display, .time-ring { width: 110px; height: 110px; }
  .timer { font-size: 24px; }
  .half-clock { margin-top: 3px; font-size: 10px; }
  .timer-info { margin: 2px 0 8px; font-size: 10px; }
  .clock-actions button { min-height: 36px; padding: 7px 10px; font-size: 11px; }
  .clock-edit { min-height: 24px; margin-top: 2px; font-size: 10px; }
  .match-actions { padding: 8px 10px; }
  .action { min-height: 58px; gap: 4px; font-size: 11px; }
  .action .symbol { font-size: 18px; }
  .match-actions .hint { margin-top: 6px; }
}
