:root {
  color-scheme: dark;
  --bg: #050a08;
  --bg-soft: #09110e;
  --panel: rgba(14, 26, 21, .88);
  --panel-solid: #0d1814;
  --panel-2: #12221c;
  --panel-3: #172b23;
  --line: rgba(190, 242, 215, .12);
  --line-strong: rgba(190, 242, 215, .22);
  --text: #effaf5;
  --muted: #92aa9e;
  --subtle: #60776c;
  --accent: #17d990;
  --accent-2: #79f2bf;
  --accent-dark: #064e3b;
  --danger: #fb7185;
  --warning: #fbbf24;
  --info: #38bdf8;
  --shadow: 0 18px 60px rgba(0, 0, 0, .34);
  --radius: 18px;
  --radius-sm: 12px;
  font-family: Inter, "Noto Sans JP", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--text); background:
  radial-gradient(circle at 10% 0%, rgba(16, 185, 129, .13), transparent 32rem),
  radial-gradient(circle at 100% 15%, rgba(56, 189, 248, .07), transparent 30rem),
  linear-gradient(145deg, #040806 0%, #07110d 50%, #050907 100%); }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.icon { flex: 0 0 auto; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent-2); }

.boot-screen { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 16px; color: var(--muted); }
.brand-ball { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; color: #04100b; font-weight: 900; font-size: 22px; background: linear-gradient(145deg, var(--accent-2), var(--accent)); box-shadow: 0 20px 50px rgba(23, 217, 144, .24); }

/* New game */
.new-game { min-height: 100vh; padding: 40px clamp(18px, 5vw, 72px); display: grid; align-items: center; }
.new-game__shell { width: min(1180px, 100%); margin: auto; display: grid; grid-template-columns: minmax(300px, .82fr) minmax(520px, 1.4fr); gap: 38px; }
.new-game__intro { padding: 28px 0; align-self: start; position: sticky; top: 30px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-2); font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.new-game h1 { margin: 20px 0 16px; font-size: clamp(38px, 6vw, 74px); line-height: .96; letter-spacing: -.055em; }
.new-game h1 span { display: block; color: var(--accent); }
.new-game__lead { max-width: 520px; color: #b9ccc2; font-size: 17px; line-height: 1.9; }
.feature-list { display: grid; gap: 12px; margin: 30px 0; padding: 0; list-style: none; }
.feature-list li { display: flex; gap: 12px; align-items: center; color: #c8d9d0; }
.feature-list .icon { color: var(--accent); }
.research-note { border-left: 2px solid var(--accent); padding: 2px 0 2px 14px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.new-game__form { background: linear-gradient(180deg, rgba(18, 34, 28, .94), rgba(9, 18, 14, .96)); border: 1px solid var(--line); border-radius: 26px; padding: clamp(20px, 4vw, 34px); box-shadow: var(--shadow); }
.form-section + .form-section { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line); }
.form-section__title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.form-section__title h2 { margin: 0; font-size: 18px; }
.form-section__title span { color: var(--subtle); font-size: 12px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: grid; gap: 8px; }
.field span { color: #b8c9c0; font-size: 13px; font-weight: 700; }
.field input, .field select, .control-select { width: 100%; border: 1px solid var(--line-strong); border-radius: 12px; background: rgba(4, 10, 8, .68); color: var(--text); padding: 12px 13px; min-height: 46px; }
.field small { color: var(--subtle); }
.club-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.club-option { position: relative; }
.club-option input { position: absolute; opacity: 0; pointer-events: none; }
.club-option__body { min-height: 112px; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(6, 14, 10, .52); cursor: pointer; transition: .2s ease; }
.club-option__body:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.club-option input:checked + .club-option__body { border-color: var(--accent); background: rgba(16, 185, 129, .09); box-shadow: inset 0 0 0 1px rgba(16, 185, 129, .24); }
.club-option__name { font-weight: 800; font-size: 14px; }
.club-option__meta { color: var(--muted); font-size: 11px; margin-top: 5px; line-height: 1.5; }
.difficulty-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.difficulty-option { position: relative; }
.difficulty-option input { position: absolute; opacity: 0; }
.difficulty-option span { display: grid; gap: 5px; min-height: 82px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(6, 14, 10, .52); cursor: pointer; }
.difficulty-option strong { font-size: 13px; }
.difficulty-option small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.difficulty-option input:checked + span { border-color: var(--accent); background: rgba(16, 185, 129, .09); }

/* Buttons */
.btn { border: 0; border-radius: 12px; min-height: 42px; padding: 10px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; font-weight: 800; font-size: 13px; transition: transform .16s ease, background .16s ease, opacity .16s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }
.btn--primary { background: linear-gradient(135deg, var(--accent-2), var(--accent)); color: #032017; box-shadow: 0 10px 30px rgba(23, 217, 144, .18); }
.btn--secondary { background: #1a3027; border: 1px solid var(--line); }
.btn--ghost { background: transparent; border: 1px solid var(--line); color: #c7d8cf; }
.btn--danger { background: rgba(251, 113, 133, .12); border: 1px solid rgba(251, 113, 133, .25); color: #fda4af; }
.btn--selected { background: rgba(16,185,129,.16); border: 1px solid rgba(121,242,191,.42); color: var(--accent-2); }
.btn--sm { min-height: 34px; padding: 7px 10px; font-size: 11px; border-radius: 9px; }
.btn--wide { width: 100%; min-height: 52px; margin-top: 24px; font-size: 15px; }
.icon-btn { width: 40px; height: 40px; padding: 0; border-radius: 11px; border: 1px solid var(--line); background: rgba(11, 24, 19, .7); display: grid; place-items: center; cursor: pointer; }

/* App shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--line); background: rgba(5, 12, 9, .86); backdrop-filter: blur(18px); padding: 22px 14px; display: flex; flex-direction: column; z-index: 10; }
.sidebar__brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 22px; }
.sidebar__brand-mark { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; color: #032017; font-weight: 950; background: linear-gradient(145deg, var(--accent-2), var(--accent)); }
.sidebar__brand strong { display: block; font-size: 14px; }
.sidebar__brand small { color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.sidebar__club { display: flex; align-items: center; gap: 10px; padding: 13px 10px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .025); }
.sidebar__club strong { display: block; font-size: 12px; line-height: 1.3; }
.sidebar__club span { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.nav { display: grid; gap: 4px; }
.nav__item { width: 100%; min-height: 43px; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border: 0; border-radius: 11px; background: transparent; color: #9cb2a7; cursor: pointer; text-align: left; font-weight: 700; font-size: 12px; }
.nav__item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav__item.is-active { color: var(--accent-2); background: rgba(16, 185, 129, .11); }
.nav__badge { margin-left: auto; min-width: 21px; height: 21px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px; background: var(--danger); color: white; font-size: 10px; }
.sidebar__footer { margin-top: auto; display: grid; gap: 7px; }
.sidebar__utility { background: transparent; border: 0; color: var(--muted); font-size: 11px; display: flex; gap: 9px; align-items: center; padding: 8px 10px; cursor: pointer; }
.sidebar__utility:hover { color: var(--text); }
.main-shell { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 8; height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(18px, 3vw, 34px); border-bottom: 1px solid var(--line); background: rgba(5, 11, 8, .78); backdrop-filter: blur(18px); }
.topbar__context { min-width: 0; }
.topbar__context small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.topbar__context h1 { margin: 5px 0 0; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.auto-advance-status { display: flex; align-items: center; gap: 6px; margin-top: 4px; color: var(--muted); font-size: 9px; }
.auto-advance-status.is-active { color: var(--accent-2); }
.auto-advance-status.is-active .icon { animation: auto-pulse 1.1s ease-in-out infinite; }
@keyframes auto-pulse { 50% { opacity: .35; transform: scale(.9); } }
.topbar__actions { display: flex; align-items: center; gap: 9px; }
.date-chip { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 11px; color: #c3d4cb; font-size: 11px; }
.content { padding: 28px clamp(16px, 3vw, 34px) 50px; max-width: 1540px; margin: 0 auto; }
.mobile-nav { display: none; }

/* Shared surfaces */
.page-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 22px; }
.page-header h2 { margin: 0 0 7px; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.035em; }
.page-header p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.page-header__actions { display: flex; gap: 8px; }
.card { background: linear-gradient(180deg, rgba(17, 32, 26, .92), rgba(10, 20, 16, .92)); border: 1px solid var(--line); border-radius: var(--radius); }
.card__body { padding: 18px; }
.card__header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.card__header h3 { margin: 0; font-size: 14px; }
.card__header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.section-header { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 30px 0 14px; }
.section-header h2 { margin: 0; font-size: 18px; }
.section-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-card { min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 13px; align-items: center; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: rgba(14, 27, 22, .72); }
.metric-card__icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: var(--accent-2); background: rgba(16, 185, 129, .1); }
.metric-card__label { margin: 0; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.metric-card__value { margin: 5px 0 0; font-size: clamp(18px, 2.3vw, 25px); font-weight: 900; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-card__meta { margin: 3px 0 0; color: var(--subtle); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric-card--warning .metric-card__icon { color: var(--warning); background: rgba(251,191,36,.1); }
.metric-card--danger .metric-card__icon { color: var(--danger); background: rgba(251,113,133,.1); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 14px; }
.grid-equal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.stack { display: grid; gap: 14px; }

/* Club badges */
.club-badge { flex: 0 0 auto; display: inline-grid; place-items: center; border-radius: 35% 35% 42% 42%; color: white; background: linear-gradient(145deg, var(--club-primary), var(--club-secondary)); border: 1px solid rgba(255,255,255,.18); box-shadow: inset 0 0 0 3px rgba(255,255,255,.05), 0 8px 18px rgba(0,0,0,.22); font-weight: 950; letter-spacing: -.06em; }
.club-badge--sm { width: 30px; height: 34px; font-size: 8px; }
.club-badge--md { width: 42px; height: 48px; font-size: 10px; }
.club-badge--lg { width: 64px; height: 72px; font-size: 15px; }

/* Dashboard */
.next-match { position: relative; overflow: hidden; min-height: 280px; padding: 22px; display: grid; align-content: space-between; background:
  linear-gradient(105deg, rgba(7, 22, 16, .95), rgba(11, 45, 31, .72)),
  repeating-linear-gradient(90deg, transparent 0 46px, rgba(255,255,255,.025) 47px 48px); }
.next-match::after { content: ''; position: absolute; inset: auto -80px -100px auto; width: 340px; height: 340px; border: 1px solid rgba(255,255,255,.06); border-radius: 50%; box-shadow: inset 0 0 0 55px rgba(255,255,255,.018), inset 0 0 0 110px rgba(255,255,255,.015); }
.next-match__top { position: relative; z-index: 1; display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.next-match__teams { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 22px; }
.next-team { display: grid; gap: 10px; align-items: center; }
.next-team:last-child { justify-items: end; text-align: right; }
.next-team strong { font-size: clamp(18px, 2.4vw, 28px); letter-spacing: -.03em; }
.versus { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-strong); color: var(--muted); font-size: 11px; font-weight: 900; background: rgba(3, 12, 8, .66); }
.next-match__footer { position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: end; gap: 16px; }
.opponent-scout { display: flex; gap: 16px; color: var(--muted); font-size: 11px; }
.opponent-scout strong { display: block; color: var(--text); font-size: 14px; margin-top: 4px; }
.next-match__actions { display: flex; align-items: center; gap: 8px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.mini-table th { color: var(--subtle); text-align: right; font-weight: 700; padding: 9px 6px; border-bottom: 1px solid var(--line); }
.mini-table th:nth-child(2) { text-align: left; }
.mini-table td { padding: 10px 6px; border-bottom: 1px solid rgba(190,242,215,.065); text-align: right; }
.mini-table td:nth-child(2) { text-align: left; }
.mini-table tr.is-user { background: rgba(16,185,129,.07); }
.team-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.team-cell span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-dots { display: inline-flex; gap: 3px; }
.form-dot { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; font-size: 8px; font-weight: 900; }
.form-dot--w { color: #6ee7b7; background: rgba(16,185,129,.15); }
.form-dot--d { color: #cbd5e1; background: rgba(148,163,184,.13); }
.form-dot--l { color: #fda4af; background: rgba(251,113,133,.13); }
.alert-list { display: grid; gap: 8px; }
.alert-item { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 11px; background: rgba(255,255,255,.025); }
.alert-item__icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: rgba(251,191,36,.09); color: var(--warning); }
.alert-item strong { display: block; font-size: 11px; }
.alert-item span { color: var(--muted); font-size: 10px; }
.alert-item button { border: 0; background: transparent; color: var(--accent-2); cursor: pointer; }

/* Progress */
.progress { height: 7px; border-radius: 10px; overflow: hidden; background: rgba(255,255,255,.075); }
.progress__fill { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.progress__fill--warning { background: var(--warning); }
.progress__fill--danger { background: var(--danger); }

/* Tables */
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 11px; }
.data-table th { position: sticky; top: 0; z-index: 1; padding: 11px 12px; color: var(--subtle); text-align: left; font-size: 9px; letter-spacing: .08em; text-transform: uppercase; background: #0e1b16; border-bottom: 1px solid var(--line); }
.data-table td { padding: 11px 12px; border-bottom: 1px solid rgba(190,242,215,.065); vertical-align: middle; }
.data-table tbody tr:hover { background: rgba(255,255,255,.025); }
.player-name { display: flex; align-items: center; gap: 9px; min-width: 150px; }
.player-avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #233c32, #10231b); color: var(--accent-2); font-weight: 900; font-size: 10px; }
.player-name strong { display: block; font-size: 11px; }
.player-name span { color: var(--muted); font-size: 9px; }
.position-tag, .status-tag { display: inline-flex; min-width: 30px; min-height: 23px; align-items: center; justify-content: center; padding: 3px 7px; border-radius: 7px; background: rgba(56,189,248,.1); color: #7dd3fc; font-size: 9px; font-weight: 900; }
.status-tag--injured { background: rgba(251,113,133,.1); color: #fda4af; }
.status-tag--listed { background: rgba(251,191,36,.1); color: #fde68a; }
.rating-number { font-size: 17px; font-weight: 950; }
.actions { display: flex; gap: 5px; flex-wrap: wrap; }

/* Squad and pitch */
.squad-layout { display: grid; grid-template-columns: minmax(390px, .72fr) minmax(0, 1.28fr); gap: 14px; }
.pitch { position: relative; aspect-ratio: 72 / 92; max-height: 700px; width: 100%; overflow: hidden; border-radius: 18px; background:
  linear-gradient(90deg, transparent 49.6%, rgba(255,255,255,.22) 49.8% 50.2%, transparent 50.4%),
  repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 10%, rgba(255,255,255,.035) 10% 20%),
  linear-gradient(145deg, #0b5132, #073d27); border: 2px solid rgba(255,255,255,.15); }
.pitch::before { content: ''; position: absolute; inset: 3.5%; border: 1px solid rgba(255,255,255,.26); border-radius: 4px; }
.pitch::after { content: ''; position: absolute; left: 50%; top: 50%; width: 18%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; transform: translate(-50%,-50%); }
.pitch-box { position: absolute; left: 27%; width: 46%; height: 15%; border: 1px solid rgba(255,255,255,.25); z-index: 0; }
.pitch-box--top { top: 3.5%; border-top: 0; }
.pitch-box--bottom { bottom: 3.5%; border-bottom: 0; }
.pitch-slot { position: absolute; z-index: 2; width: 104px; transform: translate(-50%,-50%); border-radius: 14px; transition: filter .16s ease, box-shadow .16s ease; }
.pitch-slot.is-drop-ready { box-shadow: 0 0 0 1px rgba(121,242,191,.25); }
.pitch-slot.is-drag-over { box-shadow: 0 0 0 3px var(--accent-2), 0 0 28px rgba(23,217,144,.45); filter: brightness(1.18); }
.pitch-player { width: 100%; border: 1px solid rgba(255,255,255,.22); border-radius: 12px; padding: 7px 8px; background: rgba(4, 18, 11, .92); box-shadow: 0 8px 20px rgba(0,0,0,.28); cursor: grab; user-select: none; transition: opacity .16s ease, transform .16s ease; }
.pitch-player:active { cursor: grabbing; }
.pitch-player.is-dragging, tr.is-dragging { opacity: .35; }
.pitch-player__top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 5px; }
.pitch-player__pos { color: var(--accent-2); font-size: 8px; font-weight: 900; }
.pitch-player__roles { display: flex; justify-content: center; gap: 3px; min-height: 18px; }
.pitch-player__rating { font-size: 12px; font-weight: 950; }
.pitch-player__name { display: block; margin-top: 4px; overflow: hidden; color: #effaf5; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.pitch-player select { margin-top: 5px; width: 100%; min-width: 0; border: 0; color: #b8c9c0; background: transparent; font-size: 8px; font-weight: 700; text-overflow: ellipsis; cursor: pointer; }
.role-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 5px; border-radius: 6px; font-size: 8px; font-weight: 950; line-height: 1; vertical-align: middle; }
.role-badge--captain { color: #221702; background: var(--warning); }
.role-badge--penalty { color: #03170f; background: var(--accent-2); }
.role-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 16px; border-top: 1px solid var(--line); }
.role-summary__item { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); color: var(--muted); font-size: 9px; }
.role-summary__item > span:last-child { min-width: 0; }
.role-summary__item strong, .role-summary__item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-summary__item strong { margin-top: 2px; color: var(--text); font-size: 11px; }
.role-summary__item small { margin-top: 2px; color: var(--subtle); font-size: 8px; }
.role-summary__count { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: rgba(56,189,248,.12); color: #7dd3fc; font-size: 12px; font-weight: 950; }
.squad-controls { display: grid; grid-template-columns: 1.25fr 1.25fr 1fr 1fr; gap: 9px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.012); }
.squad-controls label { display: grid; gap: 5px; min-width: 0; }
.squad-controls label > span { color: var(--muted); font-size: 9px; font-weight: 800; }
.squad-controls .control-select { min-height: 38px; padding: 8px 10px; font-size: 10px; }
.drag-handle { display: inline-block; color: var(--subtle); font-size: 14px; letter-spacing: -3px; cursor: grab; }
tr.is-draggable { cursor: grab; }
tr.is-unavailable { opacity: .66; }
.selection-role { margin-left: 4px; color: var(--muted); font-size: 9px; }

/* Tactics */
.tactics-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tactic-control { padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018); }
.tactic-control label { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 11px; font-weight: 800; }
.tactic-control p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.training-options { display: grid; gap: 8px; }
.training-option { position: relative; }
.training-option input { position: absolute; opacity: 0; }
.training-option__body { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.training-option input:checked + .training-option__body { border-color: var(--accent); background: rgba(16,185,129,.08); }
.training-option__icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--accent-2); background: rgba(16,185,129,.09); }
.training-option strong { display: block; font-size: 11px; }
.training-option small { color: var(--muted); font-size: 9px; }
.training-option__check { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-strong); }
.training-option input:checked + .training-option__body .training-option__check { background: var(--accent); box-shadow: inset 0 0 0 4px #0a1913; }

/* Fixtures */
.standings-table { min-width: 620px; }
.standings-table tr.is-user td { background: rgba(16,185,129,.07); }
.position-number { width: 28px; height: 28px; display: inline-grid; place-items: center; border-radius: 9px; background: rgba(255,255,255,.04); font-weight: 900; }
.position-number--top { color: #fde68a; background: rgba(251,191,36,.1); }
.fixture-week { padding: 14px 16px; }
.fixture-week + .fixture-week { border-top: 1px solid var(--line); }
.fixture-week__label { color: var(--muted); font-size: 10px; font-weight: 800; margin-bottom: 9px; }
.fixture-row { display: grid; grid-template-columns: 1fr 64px 1fr auto; align-items: center; gap: 10px; min-height: 45px; }
.fixture-row + .fixture-row { border-top: 1px solid rgba(190,242,215,.055); }
.fixture-team { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 11px; }
.fixture-team--home { justify-content: flex-end; text-align: right; }
.fixture-score { text-align: center; font-size: 15px; font-weight: 950; }
.fixture-score--upcoming { color: var(--muted); font-size: 9px; font-weight: 700; }

/* Transfers */
.filter-bar { display: flex; gap: 9px; align-items: end; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.filter-bar .field { min-width: 140px; flex: 1; }
.scout-confidence { display: flex; align-items: center; gap: 7px; min-width: 80px; }
.scout-confidence .progress { width: 54px; }
.transfer-price { font-weight: 900; }

/* Academy / facilities */
.prospect-grid, .facility-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.prospect-card, .facility-card { padding: 16px; }
.prospect-card__top, .facility-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.prospect-card h3, .facility-card h3 { margin: 0; font-size: 13px; }
.prospect-card p, .facility-card p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.prospect-score { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: rgba(16,185,129,.1); color: var(--accent-2); font-size: 18px; font-weight: 950; }
.attribute-row { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; color: var(--muted); font-size: 10px; }
.attribute-row strong { color: var(--text); }
.prospect-card .btn, .facility-card .btn { width: 100%; margin-top: 14px; }
.level-dots { display: flex; gap: 5px; margin-top: 12px; }
.level-dot { width: 100%; height: 6px; border-radius: 6px; background: rgba(255,255,255,.07); }
.level-dot.is-filled { background: var(--accent); }

/* Inbox */
.inbox-list { display: grid; gap: 10px; }
.inbox-card { display: grid; grid-template-columns: 8px minmax(0, 1fr); overflow: hidden; }
.inbox-card__rail { background: var(--accent); }
.inbox-card.is-resolved .inbox-card__rail { background: #42564c; }
.inbox-card__content { padding: 17px; }
.inbox-card__meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 9px; }
.inbox-card h3 { margin: 9px 0 7px; font-size: 14px; }
.inbox-card p { margin: 0; color: #a8bdb2; font-size: 11px; line-height: 1.7; }
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 14px; }
.choice-button { text-align: left; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.02); color: var(--text); cursor: pointer; }
.choice-button:hover { border-color: var(--accent); background: rgba(16,185,129,.06); }
.choice-button strong { display: block; font-size: 10px; }
.choice-button span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.resolved-choice { display: inline-flex; margin-top: 12px; padding: 6px 9px; border-radius: 8px; color: #b8c9c0; background: rgba(255,255,255,.04); font-size: 9px; }

/* Empty / toast */
.empty-state { min-height: 220px; display: grid; place-items: center; align-content: center; gap: 9px; color: var(--subtle); text-align: center; padding: 24px; }
.empty-state h3 { margin: 0; color: #baccc2; font-size: 14px; }
.empty-state p { margin: 0; max-width: 440px; font-size: 11px; line-height: 1.7; }
.toast-region { position: fixed; top: 88px; right: 18px; z-index: 100; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 260px; max-width: 380px; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; color: #e5f6ed; background: rgba(13, 29, 22, .96); box-shadow: var(--shadow); animation: toast-in .25s ease both; font-size: 11px; }
.toast--error { border-color: rgba(251,113,133,.3); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } }

/* Match center */
.modal-backdrop { position: fixed; inset: 0; z-index: 80; padding: 18px; display: grid; place-items: center; background: rgba(0, 5, 3, .82); backdrop-filter: blur(10px); }
.match-modal { width: min(980px, 100%); max-height: calc(100vh - 36px); overflow: auto; border: 1px solid var(--line-strong); border-radius: 24px; background: #07110d; box-shadow: 0 40px 100px rgba(0,0,0,.55); }
.match-hero { position: relative; overflow: hidden; min-height: 300px; padding: 22px; background:
  radial-gradient(circle at center, rgba(16,185,129,.16), transparent 35%),
  repeating-linear-gradient(90deg, rgba(255,255,255,.018) 0 7%, rgba(255,255,255,.035) 7% 14%),
  linear-gradient(180deg, #0a3d27, #082719); }
.match-hero::before { content: ''; position: absolute; inset: 24px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; }
.match-hero__top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; }
.live-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 20px; color: #d1fae5; background: rgba(0,0,0,.3); font-size: 9px; font-weight: 900; letter-spacing: .1em; }
.live-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 5px rgba(251,113,133,.12); animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .45; transform: scale(.82); } }
.match-minute { font-size: 20px; font-weight: 950; }
.match-scoreboard { position: relative; z-index: 2; min-height: 190px; display: grid; grid-template-columns: 1fr 160px 1fr; align-items: center; gap: 18px; }
.match-club { display: grid; justify-items: center; text-align: center; gap: 10px; }
.match-club strong { font-size: clamp(15px, 2vw, 22px); }
.match-score { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: clamp(44px, 8vw, 80px); font-weight: 950; letter-spacing: -.08em; }
.match-score span:nth-child(2) { color: rgba(255,255,255,.34); font-size: 30px; }
.match-progress { position: relative; z-index: 2; height: 5px; border-radius: 5px; background: rgba(255,255,255,.1); overflow: hidden; }
.match-progress span { display: block; height: 100%; width: 0; background: var(--accent-2); transition: width .2s ease; }
.match-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 360px; }
.commentary { max-height: 420px; overflow: auto; padding: 16px 18px; border-right: 1px solid var(--line); }
.commentary-event { display: none; grid-template-columns: 38px 30px 1fr; align-items: start; gap: 8px; padding: 9px 0; border-bottom: 1px solid rgba(190,242,215,.055); opacity: 0; transform: translateY(5px); }
.commentary-event.is-visible { display: grid; animation: commentary-in .2s ease forwards; }
@keyframes commentary-in { to { opacity: 1; transform: translateY(0); } }
.commentary-event__minute { color: var(--muted); font-size: 10px; font-weight: 800; }
.commentary-event__type { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); background: rgba(255,255,255,.04); font-size: 11px; }
.commentary-event--goal .commentary-event__type { color: #032017; background: var(--accent); }
.commentary-event--card .commentary-event__type { background: var(--warning); color: #422006; }
.commentary-event--injury .commentary-event__type { background: var(--danger); color: white; }
.commentary-event p { margin: 2px 0 0; color: #c1d2c9; font-size: 11px; line-height: 1.55; }
.match-sidepanel { padding: 16px; }
.match-stat { display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 9px; margin-bottom: 12px; font-size: 10px; text-align: center; }
.match-stat__bar { display: grid; grid-template-columns: 1fr 1fr; height: 6px; overflow: hidden; border-radius: 6px; background: rgba(255,255,255,.06); }
.match-stat__bar span:first-child { justify-self: end; background: var(--accent); }
.match-stat__bar span:last-child { background: #64748b; }
.match-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 18px; border-top: 1px solid var(--line); }
.match-result-only { opacity: .18; transition: opacity .3s ease; }
.match-result-only.is-visible { opacity: 1; }

/* Responsive */
@media (max-width: 1120px) {
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .squad-layout { grid-template-columns: 1fr; }
  .pitch { max-height: 610px; width: min(520px, 100%); margin: 0 auto; }
  .prospect-grid, .facility-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .new-game__shell { grid-template-columns: 1fr; }
  .new-game__intro { position: static; padding-bottom: 0; }
  .app-shell { grid-template-columns: 82px minmax(0, 1fr); }
  .sidebar { padding-inline: 10px; }
  .sidebar__brand { justify-content: center; }
  .sidebar__brand div:last-child, .sidebar__club div:last-child, .nav__item span:not(.nav__badge), .sidebar__utility span { display: none; }
  .sidebar__club { justify-content: center; padding: 10px; }
  .nav__item { justify-content: center; padding: 10px; }
  .nav__badge { position: absolute; margin: -24px 0 0 28px; }
  .sidebar__utility { justify-content: center; }
  .grid-2 { grid-template-columns: 1fr; }
  .match-body { grid-template-columns: 1fr; }
  .commentary { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 680px) {
  .new-game { padding: 24px 14px; align-items: start; }
  .new-game h1 { font-size: 42px; }
  .new-game__form { padding: 18px; border-radius: 20px; }
  .field-grid, .club-picker, .difficulty-picker { grid-template-columns: 1fr; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { height: 66px; padding: 0 14px; }
  .topbar__actions .date-chip { display: none; }
  .topbar__actions .btn span { display: none; }
  .topbar__actions .btn { width: 42px; padding: 0; }
  .content { padding: 20px 12px 92px; }
  .mobile-nav { position: fixed; inset: auto 0 0; z-index: 30; display: flex; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 7px 7px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(5, 12, 9, .95); backdrop-filter: blur(18px); }
  .mobile-nav::-webkit-scrollbar { display: none; }
  .mobile-nav .nav__item { flex: 0 0 76px; min-height: 48px; display: grid; place-items: center; gap: 2px; padding: 4px; font-size: 8px; }
  .mobile-nav .nav__item span { display: block; }
  .page-header { align-items: flex-start; }
  .page-header__actions { flex-direction: column; }
  .metrics-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .metric-card { grid-template-columns: 1fr; gap: 8px; }
  .metric-card__icon { width: 32px; height: 32px; }
  .metric-card__value { font-size: 18px; }
  .grid-equal { grid-template-columns: 1fr; }
  .next-match { min-height: 315px; }
  .next-match__teams { gap: 9px; }
  .next-team strong { font-size: 15px; }
  .next-match__footer { align-items: stretch; flex-direction: column; }
  .opponent-scout { justify-content: space-between; }
  .tactics-grid { grid-template-columns: 1fr; }
  .prospect-grid, .facility-grid { grid-template-columns: 1fr; }
  .choice-grid { grid-template-columns: 1fr; }
  .pitch-slot { width: 78px; }
  .pitch-player { padding: 5px; }
  .pitch-player select { font-size: 8px; }
  .role-summary { grid-template-columns: 1fr; }
  .squad-controls { grid-template-columns: 1fr 1fr; }
  .next-match__actions { width: 100%; }
  .next-match__actions .btn { flex: 1; }
  .fixture-row { grid-template-columns: 1fr 48px 1fr; }
  .fixture-row .btn { display: none; }
  .modal-backdrop { padding: 0; align-items: end; }
  .match-modal { max-height: 95vh; border-radius: 22px 22px 0 0; }
  .match-hero { min-height: 240px; }
  .match-scoreboard { grid-template-columns: 1fr 100px 1fr; min-height: 150px; }
  .match-score { gap: 10px; }
  .club-badge--lg { width: 48px; height: 54px; font-size: 11px; }
  .match-actions { position: sticky; bottom: 0; background: #07110d; }
}
