:root {
  --bg: #06141f;
  --bg-2: #0a1d2a;
  --panel: #0d2432;
  --panel-2: #112d3d;
  --panel-3: #17394a;
  --line: rgba(181, 221, 232, .13);
  --line-strong: rgba(181, 221, 232, .25);
  --text: #eff9f8;
  --muted: #91aab1;
  --soft: #c8d9dc;
  --teal: #2dd2ae;
  --teal-2: #18a987;
  --lime: #bce65d;
  --amber: #f4bd5f;
  --red: #f16873;
  --blue: #63b7ff;
  --capy: #b6793f;
  --capy-light: #e1b373;
  --shadow: 0 28px 80px rgba(0, 0, 0, .34);
  --radius: 18px;
  --radius-sm: 11px;
  --sidebar: 238px;
  font-family: Inter, Pretendard, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; margin: 0; }
body {
  background:
    radial-gradient(circle at 18% 0%, rgba(45, 210, 174, .09), transparent 32%),
    radial-gradient(circle at 90% 20%, rgba(99, 183, 255, .08), transparent 34%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.muted-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.section-kicker { display: inline-block; color: var(--teal); font-size: 11px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }

/* Start screen */
.start-screen {
  min-height: 100vh;
  position: relative;
  padding: 36px clamp(20px, 4vw, 70px) 52px;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(4, 16, 25, .96), rgba(7, 29, 40, .92)),
    repeating-linear-gradient(90deg, transparent 0 66px, rgba(255,255,255,.018) 66px 67px),
    repeating-linear-gradient(0deg, transparent 0 66px, rgba(255,255,255,.018) 66px 67px);
}
.start-screen::after {
  content: "";
  position: absolute;
  inset: auto -10% -24% 38%;
  height: 48%;
  transform: rotate(-7deg);
  background: linear-gradient(90deg, rgba(45,210,174,.08), rgba(45,210,174,.015));
  border-top: 1px solid rgba(45,210,174,.16);
  pointer-events: none;
}
.start-orb { position: absolute; border-radius: 50%; filter: blur(1px); pointer-events: none; }
.start-orb-a { width: 420px; height: 420px; top: -220px; right: 7%; background: radial-gradient(circle, rgba(45,210,174,.15), transparent 67%); }
.start-orb-b { width: 520px; height: 520px; left: -260px; bottom: -260px; background: radial-gradient(circle, rgba(99,183,255,.12), transparent 68%); }
.start-brand { position: relative; z-index: 2; max-width: 1000px; margin: 0 auto 28px; }
.start-brand .eyebrow { color: var(--teal); font-size: 11px; font-weight: 900; letter-spacing: .24em; }
.start-brand h1 { margin: 7px 0 8px; font-size: clamp(37px, 5.2vw, 76px); line-height: .88; letter-spacing: -.055em; }
.start-brand h1 span { color: var(--text); }
.start-brand h1 b { color: var(--lime); font-size: .46em; letter-spacing: -.02em; vertical-align: top; margin-left: 8px; }
.start-brand p { margin: 16px 0 0; color: var(--soft); font-weight: 700; }
.start-layout { position: relative; z-index: 2; max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: minmax(250px, .72fr) minmax(620px, 1.7fr); gap: 26px; align-items: stretch; }
.glass-panel { background: linear-gradient(145deg, rgba(16, 43, 57, .92), rgba(8, 27, 38, .95)); border: 1px solid var(--line-strong); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.start-mascot-wrap { min-height: 560px; position: relative; display: grid; align-items: end; justify-items: center; overflow: hidden; border-radius: 28px; background: linear-gradient(180deg, rgba(17,51,63,.7), rgba(7,21,31,.92)); border: 1px solid var(--line); }
.start-mascot-wrap::before { content: ""; position: absolute; inset: 8% 10% 22%; border: 1px solid rgba(45,210,174,.13); border-radius: 50%; transform: rotate(18deg); }
.mascot-glow { position: absolute; width: 340px; height: 340px; top: 100px; border-radius: 50%; background: radial-gradient(circle, rgba(45,210,174,.22), transparent 66%); }
.start-mascot { width: min(74%, 310px); position: relative; z-index: 1; filter: drop-shadow(0 24px 28px rgba(0,0,0,.32)); transform: translateY(-42px); }
.mascot-card { position: absolute; z-index: 2; left: 18px; right: 18px; bottom: 18px; padding: 17px 18px; border-radius: 15px; background: rgba(4,18,26,.88); border: 1px solid var(--line-strong); }
.mascot-card span { display: block; color: var(--teal); font-size: 10px; font-weight: 900; letter-spacing: .13em; margin-bottom: 7px; }
.mascot-card strong { font-size: 15px; line-height: 1.48; }
.start-panel { border-radius: 28px; padding: clamp(22px, 3vw, 34px); }
.start-panel-heading { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.start-panel-heading h2 { margin: 4px 0 0; font-size: clamp(24px, 3vw, 35px); letter-spacing: -.04em; }
.manager-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 23px 0 18px; }
.field-label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 800; }
.field-label input, .field-label select, .filter-control, .number-input {
  width: 100%; border: 1px solid var(--line-strong); background: rgba(2,15,23,.66); color: var(--text); border-radius: 10px; padding: 12px 13px;
}
.club-select-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.club-select-card { min-height: 94px; text-align: left; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: rgba(7,24,34,.72); cursor: pointer; transition: .18s ease; }
.club-select-card:hover { transform: translateY(-2px); border-color: rgba(45,210,174,.45); background: rgba(17,49,62,.85); }
.club-select-card.selected { border-color: var(--teal); box-shadow: inset 0 0 0 1px var(--teal), 0 8px 30px rgba(45,210,174,.09); }
.club-select-card .mini-club-row { display: flex; gap: 9px; align-items: center; }
.club-select-card strong { display: block; font-size: 12px; line-height: 1.32; }
.club-select-card small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.club-preview { min-height: 94px; margin-top: 12px; padding: 15px; border-radius: 14px; background: linear-gradient(90deg, rgba(45,210,174,.08), rgba(99,183,255,.035)); border: 1px solid var(--line); }
.club-preview-empty { color: var(--muted); display: grid; place-items: center; min-height: 64px; }
.club-preview-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.club-preview-inner h3 { margin: 0 0 4px; font-size: 18px; }
.club-preview-inner p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.club-preview-stats { display: flex; gap: 18px; text-align: right; }
.club-preview-stats span { display: block; color: var(--muted); font-size: 10px; }
.club-preview-stats strong { display: block; font-size: 14px; margin-top: 3px; }
.start-actions { margin-top: 20px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.legal-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.legal-note input { accent-color: var(--teal); }
.parody-note { margin: 17px 0 0; color: #6f8b93; font-size: 10px; line-height: 1.5; }

/* Buttons */
.button { border: 1px solid var(--line-strong); border-radius: 10px; background: var(--panel-2); padding: 10px 14px; font-weight: 800; cursor: pointer; transition: .16s ease; display: inline-flex; align-items: center; justify-content: center; gap: 9px; }
.button:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.08); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button.primary { color: #042018; background: linear-gradient(135deg, var(--teal), #7ee3ba); border-color: transparent; box-shadow: 0 10px 30px rgba(45,210,174,.18); }
.button.ghost { background: transparent; }
.button.danger { background: rgba(241,104,115,.13); color: #ffb5bb; border-color: rgba(241,104,115,.28); }
.button.warning { background: rgba(244,189,95,.13); color: #ffd68e; border-color: rgba(244,189,95,.28); }
.button.large { padding: 13px 19px; font-size: 14px; }
.button.small { padding: 7px 10px; font-size: 11px; }

/* Club badges */
.club-badge { --c1: #3bc9a9; --c2: #e7f9f4; --ca: #16384a; width: 38px; height: 44px; flex: 0 0 auto; position: relative; border-radius: 11px 11px 16px 16px; background: linear-gradient(145deg, var(--c1), var(--ca)); border: 2px solid rgba(255,255,255,.75); box-shadow: inset 0 0 0 2px rgba(0,0,0,.18), 0 5px 12px rgba(0,0,0,.22); display: grid; place-items: center; color: var(--c2); font-size: 10px; font-weight: 1000; letter-spacing: -.04em; }
.club-badge::before, .club-badge::after { content: ""; position: absolute; top: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--capy-light); border: 2px solid rgba(0,0,0,.25); }
.club-badge::before { left: 7px; } .club-badge::after { right: 7px; }
.club-badge > span { position: relative; z-index: 2; margin-top: 10px; }
.club-badge-lg { width: 48px; height: 55px; font-size: 11px; }
.club-badge-xl { width: 66px; height: 76px; font-size: 14px; border-radius: 16px 16px 22px 22px; }
.club-badge-xl::before, .club-badge-xl::after { width: 12px; height: 12px; top: 11px; }
.club-badge-xl::before { left: 11px; } .club-badge-xl::after { right: 11px; }

/* Main shell */
.game-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column; background: linear-gradient(180deg, #081c28, #06131d); border-right: 1px solid var(--line); }
.club-lockup { min-height: 93px; padding: 18px 16px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.club-lockup strong { display: block; font-size: 13px; line-height: 1.25; margin-top: 4px; }
.main-nav { padding: 12px 9px; display: grid; gap: 3px; overflow-y: auto; }
.nav-item { min-height: 42px; padding: 0 11px; border: 0; border-radius: 9px; background: transparent; color: #9fb5bb; display: flex; align-items: center; gap: 11px; text-align: left; cursor: pointer; font-size: 12px; font-weight: 800; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.045); }
.nav-item.active { color: var(--text); background: linear-gradient(90deg, rgba(45,210,174,.17), rgba(45,210,174,.04)); box-shadow: inset 3px 0 var(--teal); }
.nav-icon { width: 22px; text-align: center; color: var(--teal); font-size: 16px; }
.nav-count { margin-left: auto; min-width: 19px; height: 19px; padding: 0 5px; display: grid; place-items: center; border-radius: 10px; background: var(--red); color: white; font-size: 10px; }
.sidebar-footer { margin-top: auto; padding: 11px 9px 14px; display: grid; grid-template-columns: 1fr 1fr 38px; gap: 5px; border-top: 1px solid var(--line); }
.sidebar-action { min-height: 35px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); color: var(--muted); font-size: 10px; font-weight: 800; cursor: pointer; }
.sidebar-action:hover { color: var(--text); border-color: var(--line-strong); }
.sidebar-action.icon-only { font-size: 14px; }
.workspace { grid-column: 2; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 73px; padding: 10px clamp(14px, 2.2vw, 28px); display: flex; align-items: center; gap: 22px; background: rgba(6,20,31,.91); border-bottom: 1px solid var(--line); backdrop-filter: blur(15px); }
.mobile-menu { display: none; background: transparent; border: 0; font-size: 22px; cursor: pointer; }
.date-block { min-width: 180px; }
.date-block span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; }
.date-block strong { display: block; margin-top: 3px; font-size: 14px; }
.resource-strip { flex: 1; display: flex; justify-content: flex-end; gap: clamp(15px, 3vw, 38px); }
.resource-strip div { min-width: 82px; }
.resource-strip span { display: block; color: var(--muted); font-size: 9px; font-weight: 800; }
.resource-strip strong { display: block; font-size: 12px; margin-top: 3px; }
.continue-button { min-width: 132px; border-color: transparent; background: linear-gradient(135deg, var(--teal), #4fe1bc); color: #032118; }
.screen-content { min-height: calc(100vh - 73px); padding: clamp(18px, 2.5vw, 30px); outline: none; }

/* General screen elements */
.screen-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin-bottom: 19px; }
.screen-header h1 { margin: 4px 0 0; font-size: clamp(25px, 3vw, 37px); letter-spacing: -.045em; }
.screen-header p { max-width: 660px; margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.header-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.panel { background: linear-gradient(145deg, rgba(15,42,56,.9), rgba(9,29,40,.94)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 34px rgba(0,0,0,.12); overflow: hidden; }
.panel-header { min-height: 54px; padding: 13px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-header h2, .panel-header h3 { margin: 0; font-size: 14px; }
.panel-body { padding: 16px; }
.panel-title-note { color: var(--muted); font-size: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat-card { padding: 16px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); }
.stat-card span { display: block; color: var(--muted); font-size: 10px; font-weight: 800; }
.stat-card strong { display: block; margin-top: 7px; font-size: 22px; letter-spacing: -.035em; }
.stat-card small { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.good { color: var(--teal) !important; }
.warn { color: var(--amber) !important; }
.bad { color: var(--red) !important; }
.info { color: var(--blue) !important; }
.progress { height: 7px; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.07); }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--teal-2), var(--teal)); }
.progress.amber > i { background: linear-gradient(90deg, #bd7b22, var(--amber)); }
.progress.red > i { background: linear-gradient(90deg, #a83045, var(--red)); }
.chip { display: inline-flex; align-items: center; justify-content: center; min-height: 23px; padding: 0 8px; border-radius: 13px; background: rgba(255,255,255,.07); color: var(--soft); font-size: 9px; font-weight: 900; white-space: nowrap; }
.chip.teal { color: #a8f7df; background: rgba(45,210,174,.13); }
.chip.amber { color: #ffdda1; background: rgba(244,189,95,.13); }
.chip.red { color: #ffb5bb; background: rgba(241,104,115,.13); }
.chip.blue { color: #b9dcff; background: rgba(99,183,255,.13); }
.empty-state { min-height: 220px; padding: 34px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--text); display: block; font-size: 16px; margin-bottom: 7px; }
.empty-icon { font-size: 36px; margin-bottom: 10px; opacity: .65; }

/* Dashboard */
.dashboard-hero { position: relative; min-height: 250px; padding: clamp(18px, 3vw, 30px); border-radius: 22px; overflow: hidden; display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; background: linear-gradient(125deg, rgba(22,66,78,.95), rgba(7,26,38,.98)); border: 1px solid var(--line-strong); }
.dashboard-hero::after { content: ""; position: absolute; width: 440px; height: 440px; right: -170px; top: -210px; border: 80px solid rgba(45,210,174,.065); border-radius: 50%; }
.hero-copy { position: relative; z-index: 2; }
.hero-copy h1 { margin: 7px 0 9px; font-size: clamp(28px, 4vw, 48px); letter-spacing: -.05em; }
.hero-copy p { margin: 0; color: var(--soft); line-height: 1.55; font-size: 13px; max-width: 570px; }
.hero-objective { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 23px; }
.objective-box { padding: 12px 13px; background: rgba(1,17,24,.38); border: 1px solid var(--line); border-radius: 12px; }
.objective-box span { display: block; color: var(--muted); font-size: 9px; }
.objective-box strong { display: block; margin-top: 4px; font-size: 12px; }
.next-match-card { position: relative; z-index: 2; align-self: stretch; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 17px; background: rgba(2,18,27,.66); border: 1px solid var(--line-strong); }
.next-match-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; font-weight: 800; }
.fixture-versus { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; margin: 14px 0; text-align: center; }
.fixture-club { display: grid; justify-items: center; gap: 8px; }
.fixture-club strong { font-size: 11px; line-height: 1.35; }
.fixture-vs { font-size: 20px; font-weight: 900; color: var(--muted); }
.dashboard-grid { margin-top: 15px; display: grid; grid-template-columns: 1.25fr .85fr .85fr; gap: 15px; }
.news-list { display: grid; }
.news-item { padding: 12px 15px; display: grid; grid-template-columns: 42px 1fr auto; gap: 11px; align-items: center; border-bottom: 1px solid var(--line); cursor: pointer; }
.news-item:last-child { border-bottom: 0; }
.news-item:hover { background: rgba(255,255,255,.025); }
.news-icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: rgba(45,210,174,.1); color: var(--teal); font-size: 16px; }
.news-item strong { font-size: 11px; display: block; }
.news-item p { margin: 4px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.news-item time { color: #68848c; font-size: 9px; }
.mini-table { width: 100%; border-collapse: collapse; }
.mini-table th { color: var(--muted); font-size: 8px; font-weight: 800; text-align: right; padding: 7px 8px; }
.mini-table th:nth-child(2) { text-align: left; }
.mini-table td { padding: 9px 8px; border-top: 1px solid var(--line); font-size: 10px; text-align: right; }
.mini-table td:nth-child(2) { text-align: left; font-weight: 800; }
.mini-table tr.my-team { background: rgba(45,210,174,.07); }
.warning-list { display: grid; gap: 9px; }
.warning-card { padding: 11px; border-radius: 10px; background: rgba(255,255,255,.03); border: 1px solid var(--line); display: flex; gap: 10px; align-items: flex-start; }
.warning-card b { width: 25px; height: 25px; border-radius: 8px; display: grid; place-items: center; background: rgba(244,189,95,.14); color: var(--amber); }
.warning-card strong { display: block; font-size: 10px; }
.warning-card small { display: block; color: var(--muted); margin-top: 4px; line-height: 1.4; }

/* Tables */
.table-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filter-control { width: auto; min-width: 130px; padding: 9px 11px; font-size: 11px; }
.search-control { flex: 1; min-width: 190px; }
.table-scroll { overflow: auto; }
.data-table { width: 100%; min-width: 760px; border-collapse: collapse; }
.data-table th { position: sticky; top: 0; z-index: 2; padding: 10px 11px; color: #78939a; background: #0b2330; border-bottom: 1px solid var(--line-strong); font-size: 9px; font-weight: 900; text-align: left; white-space: nowrap; cursor: default; }
.data-table th.sortable { cursor: pointer; }
.data-table td { padding: 10px 11px; border-bottom: 1px solid var(--line); color: var(--soft); font-size: 10px; white-space: nowrap; }
.data-table tbody tr { transition: background .14s; }
.data-table tbody tr:hover { background: rgba(255,255,255,.03); }
.data-table tbody tr.selected-row { background: rgba(45,210,174,.07); }
.data-table .player-cell { display: flex; align-items: center; gap: 9px; min-width: 190px; cursor: pointer; }
.data-table .player-cell strong { display: block; color: var(--text); font-size: 11px; }
.data-table .player-cell small { display: block; color: var(--muted); margin-top: 2px; }
.data-table .ovr { width: 32px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: rgba(45,210,174,.12); color: #9df2d8; font-weight: 900; }
.position-pill { min-width: 30px; display: inline-grid; place-items: center; padding: 4px 6px; border-radius: 7px; background: rgba(99,183,255,.1); color: #a8d2ff; font-size: 9px; font-weight: 900; }
.mini-portrait { width: 34px; height: 34px; border-radius: 9px; overflow: hidden; background: rgba(255,255,255,.05); flex: 0 0 auto; }
.mini-portrait svg { width: 100%; height: 100%; display: block; }
.star-toggle, .starter-toggle { border: 0; background: transparent; cursor: pointer; color: #58727a; font-size: 16px; }
.star-toggle.active { color: var(--amber); }
.starter-toggle.active { color: var(--teal); }
.condition { display: flex; align-items: center; gap: 6px; }
.condition .progress { width: 50px; height: 5px; }

/* Player modal */
.player-profile { display: grid; grid-template-columns: 180px 1fr; gap: 24px; }
.player-portrait-large { border-radius: 20px; overflow: hidden; background: linear-gradient(150deg, rgba(45,210,174,.12), rgba(99,183,255,.06)); border: 1px solid var(--line); }
.player-portrait-large svg { display: block; width: 100%; height: auto; }
.player-identity h3 { margin: 3px 0 5px; font-size: 27px; letter-spacing: -.045em; }
.player-identity .identity-meta { display: flex; flex-wrap: wrap; gap: 7px; }
.player-summary-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.player-summary-row .stat-card { padding: 12px; }
.player-summary-row .stat-card strong { font-size: 17px; }
.attribute-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 24px; margin-top: 20px; }
.attribute-row { display: grid; grid-template-columns: 72px 1fr 28px; gap: 8px; align-items: center; }
.attribute-row span { color: var(--muted); font-size: 10px; }
.attribute-row strong { font-size: 10px; text-align: right; }
.attribute-row .progress { height: 6px; }
.profile-notes { margin-top: 17px; padding: 13px; border-radius: 12px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.profile-notes h4 { margin: 0 0 7px; font-size: 11px; }
.profile-notes p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

/* Inbox */
.inbox-layout { display: grid; grid-template-columns: 330px 1fr; min-height: 610px; }
.inbox-list { border-right: 1px solid var(--line); overflow: auto; }
.mail-item { width: 100%; padding: 14px 15px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: inherit; text-align: left; cursor: pointer; }
.mail-item:hover, .mail-item.active { background: rgba(255,255,255,.035); }
.mail-item.unread { box-shadow: inset 3px 0 var(--teal); }
.mail-item strong { display: block; font-size: 11px; }
.mail-item p { margin: 5px 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.mail-item time { color: #5f7d85; font-size: 8px; }
.mail-reader { padding: clamp(20px, 3vw, 36px); }
.mail-reader h2 { margin: 4px 0 8px; font-size: 25px; }
.mail-reader-meta { color: var(--muted); font-size: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.mail-content { color: var(--soft); font-size: 12px; line-height: 1.75; padding-top: 20px; }
.mail-content p { margin: 0 0 14px; }
.mail-actions { display: flex; gap: 8px; margin-top: 22px; flex-wrap: wrap; }

/* Training and scouting */
.choice-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 9px; }
.choice-card { padding: 14px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.025); color: var(--soft); text-align: left; cursor: pointer; }
.choice-card:hover { border-color: var(--line-strong); }
.choice-card.active { border-color: var(--teal); background: rgba(45,210,174,.08); }
.choice-card strong { display: block; font-size: 11px; }
.choice-card small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.intensity-control { display: grid; grid-template-columns: 150px 1fr 80px; gap: 14px; align-items: center; }
.intensity-control input { accent-color: var(--teal); }
.assignment-card { padding: 14px; border-radius: 13px; background: rgba(255,255,255,.03); border: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; }
.assignment-card h4 { margin: 0 0 4px; font-size: 11px; }
.assignment-card p { margin: 0; color: var(--muted); font-size: 9px; }

/* Transfer market */
.market-hero { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; padding: 20px; margin-bottom: 14px; border-radius: 18px; background: linear-gradient(110deg, rgba(45,210,174,.13), rgba(99,183,255,.04)); border: 1px solid var(--line); }
.market-hero h2 { margin: 3px 0 7px; font-size: 23px; }
.market-hero p { margin: 0; color: var(--muted); font-size: 11px; }
.market-budget { text-align: right; }
.market-budget span { display: block; color: var(--muted); font-size: 9px; }
.market-budget strong { display: block; font-size: 25px; margin-top: 3px; }
.knowledge-mask { color: var(--muted); letter-spacing: .08em; }

/* Finance */
.finance-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 15px; }
.chart-wrap { min-height: 245px; padding: 15px; }
.finance-chart { width: 100%; height: 210px; display: block; }
.ledger-list { display: grid; }
.ledger-row { padding: 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row span { color: var(--muted); font-size: 10px; }
.ledger-row strong { font-size: 11px; }

/* Schedule */
.round-block { margin-bottom: 13px; }
.round-title { padding: 9px 12px; border-radius: 9px 9px 0 0; background: rgba(255,255,255,.04); color: var(--muted); font-size: 9px; font-weight: 900; }
.fixture-row { min-height: 54px; padding: 9px 12px; display: grid; grid-template-columns: 90px 1fr 68px 1fr 100px; gap: 10px; align-items: center; border: 1px solid var(--line); border-top: 0; }
.fixture-row.my-fixture { background: rgba(45,210,174,.055); }
.fixture-row .home { text-align: right; }
.fixture-row .score { text-align: center; font-weight: 900; font-size: 14px; }
.fixture-row .competition, .fixture-row time { color: var(--muted); font-size: 9px; }

/* League table */
.league-table { min-width: 700px; }
.league-table td, .league-table th { text-align: center; }
.league-table td:nth-child(2), .league-table th:nth-child(2) { text-align: left; }
.league-pos { width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 7px; background: rgba(255,255,255,.05); }
.rank-1 .league-pos { background: rgba(188,230,93,.18); color: var(--lime); }
.rank-bottom .league-pos { background: rgba(241,104,115,.13); color: var(--red); }
.club-table-cell { display: flex; align-items: center; gap: 8px; font-weight: 800; }
.form-dots { display: flex; gap: 3px; justify-content: center; }
.form-dots i { width: 15px; height: 15px; display: grid; place-items: center; border-radius: 50%; font-style: normal; font-size: 7px; font-weight: 900; }
.form-dots .W { background: rgba(45,210,174,.18); color: var(--teal); }
.form-dots .D { background: rgba(244,189,95,.18); color: var(--amber); }
.form-dots .L { background: rgba(241,104,115,.18); color: var(--red); }

/* Match preview screen */
.match-preview-card { min-height: 410px; padding: 28px; display: grid; place-items: center; text-align: center; background: radial-gradient(circle at 50% 28%, rgba(45,210,174,.12), transparent 33%), linear-gradient(145deg, rgba(15,48,61,.95), rgba(6,22,32,.98)); }
.match-preview-card .fixture-versus { width: min(680px, 100%); grid-template-columns: 1fr 100px 1fr; }
.match-preview-card .fixture-club strong { font-size: 16px; }
.match-preview-info { display: flex; justify-content: center; gap: 26px; margin: 15px 0 23px; color: var(--muted); font-size: 10px; }
.no-control-note { max-width: 520px; margin: 0 auto 18px; padding: 12px; border-radius: 11px; background: rgba(244,189,95,.08); color: #eed19e; border: 1px solid rgba(244,189,95,.18); font-size: 10px; line-height: 1.55; }

/* Formation board */
.formation-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) 360px; gap: 15px; align-items: start; }
.formation-stage-panel { min-width: 0; }
.formation-stage-body { padding: 16px; }
.formation-pitch {
  position: relative;
  min-height: 520px;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(167,225,229,.22);
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(230,255,238,.52) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 0 9.1%, rgba(230,255,238,.5) 9.3% 9.7%, transparent 9.9%),
    repeating-linear-gradient(90deg, #155d3a 0 9.5%, #0f4f34 9.5% 19%);
  box-shadow: inset 0 0 0 2px rgba(230,255,238,.42), inset 0 0 90px rgba(2,15,11,.58), 0 22px 60px rgba(0,0,0,.22);
  touch-action: none;
}
.formation-pitch::before,
.formation-pitch::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 28%;
  width: 15%;
  height: 44%;
  border: 2px solid rgba(230,255,238,.46);
  pointer-events: none;
}
.formation-pitch::before { left: 0; border-left: 0; }
.formation-pitch::after { right: 0; border-right: 0; }
.formation-stand {
  position: absolute;
  z-index: 2;
  left: 8%;
  right: 8%;
  height: 25px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.16);
  background: linear-gradient(90deg, rgba(2,14,21,.86), rgba(17,45,54,.92), rgba(2,14,21,.86));
  box-shadow: 0 8px 20px rgba(0,0,0,.24);
}
.formation-stand.top { top: 12px; }
.formation-stand.bottom { bottom: 12px; }
.formation-stand span {
  color: #dff9ff;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: .12em;
  text-align: center;
  text-shadow: 0 0 12px rgba(99,183,255,.55);
}
.formation-goal {
  position: absolute;
  z-index: 1;
  top: 42%;
  width: 3.5%;
  height: 16%;
  border: 2px solid rgba(230,255,238,.52);
  pointer-events: none;
}
.formation-goal.left { left: 0; border-left: 0; }
.formation-goal.right { right: 0; border-right: 0; }
.formation-token {
  position: absolute;
  z-index: 4;
  width: 98px;
  min-height: 58px;
  padding: 8px 9px;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 3px 7px;
  align-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(167,225,229,.32);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(8,30,43,.92), rgba(4,18,27,.96));
  color: var(--text);
  box-shadow: 0 14px 28px rgba(0,0,0,.28), inset 0 0 0 1px rgba(255,255,255,.04);
  cursor: grab;
  touch-action: none;
  transition: box-shadow .14s ease, transform .14s ease, border-color .14s ease;
}
.formation-token:hover,
.formation-token:focus-visible {
  border-color: rgba(105,239,208,.7);
  box-shadow: 0 18px 34px rgba(0,0,0,.32), 0 0 0 3px rgba(45,210,174,.13);
  outline: none;
}
.formation-token.dragging {
  z-index: 8;
  transform: translate(-50%, -50%) scale(1.06);
  cursor: grabbing;
}
.formation-token.keeper { border-color: rgba(244,189,95,.55); }
.formation-token span {
  grid-row: 1 / span 2;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(45,210,174,.16);
  color: #b9f6e7;
  font-size: 10px;
  font-weight: 1000;
}
.formation-token strong,
.formation-token small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.formation-token strong { font-size: 10px; }
.formation-token small { color: var(--muted); font-size: 8px; }
.formation-side-stack { display: grid; gap: 15px; }
.formation-list { display: grid; gap: 8px; max-height: 430px; overflow: auto; }
.formation-row {
  min-width: 0;
  padding: 9px;
  display: grid;
  grid-template-columns: 28px 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
}
.formation-row.compact { grid-template-columns: 42px 34px minmax(0, 1fr) auto; }
.formation-row.disabled { opacity: .62; }
.formation-row b {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(45,210,174,.11);
  color: #9df2d8;
  font-size: 10px;
}
.formation-row strong,
.formation-row small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.formation-row strong { color: var(--text); font-size: 10px; }
.formation-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.formation-empty { padding: 17px; border: 1px dashed var(--line-strong); border-radius: 12px; color: var(--muted); text-align: center; font-size: 11px; }
.formation-empty.on-pitch {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: rgba(3,16,24,.72);
}
.tactical-panel .panel-body { padding: 12px; }
.tactical-instruction-list { display: grid; gap: 10px; }
.tactical-instruction {
  min-width: 0;
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
}
.tactical-copy { min-width: 0; }
.tactical-copy b,
.tactical-copy small { display: block; min-width: 0; }
.tactical-copy b { color: var(--text); font-size: 10px; }
.tactical-copy small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.tactical-value {
  justify-self: end;
  min-width: 62px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(45,210,174,.11);
  color: #b9f6e7;
  font-size: 8px;
  font-weight: 1000;
  text-align: center;
  white-space: nowrap;
}
.tactical-range { grid-column: 1 / -1; width: 100%; accent-color: var(--teal); }
.tactical-meter {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,.07);
}
.tactical-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--lime));
}
.tactical-scale {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 7px;
  font-weight: 800;
}
.tactical-scale em { font-style: normal; }
.tactical-summary {
  padding: 9px 10px;
  border: 1px solid rgba(244,189,95,.18);
  border-radius: 10px;
  background: rgba(244,189,95,.075);
  color: #eed19e;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.5;
}

/* Modal */
.modal-layer { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(1,8,13,.76); backdrop-filter: blur(7px); }
.modal-card { position: relative; width: min(860px, 100%); max-height: min(90vh, 860px); display: flex; flex-direction: column; border-radius: 22px; background: linear-gradient(150deg, #102d3c, #081c28); border: 1px solid var(--line-strong); box-shadow: var(--shadow); overflow: hidden; }
.modal-card.narrow { width: min(560px, 100%); }
.modal-card.wide { width: min(1040px, 100%); }
.modal-header { padding: 19px 22px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 3px 0 0; font-size: 22px; }
.modal-close { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.04); cursor: pointer; font-size: 23px; }
.modal-body { padding: 22px; overflow: auto; }
.modal-footer { min-height: 65px; padding: 13px 22px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; border-top: 1px solid var(--line); }
.negotiation-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.negotiation-row { padding: 13px; border-radius: 11px; background: rgba(255,255,255,.03); border: 1px solid var(--line); }
.negotiation-row label { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 10px; margin-bottom: 9px; }
.negotiation-row input[type="range"] { width: 100%; accent-color: var(--teal); }
.offer-summary { margin-top: 14px; padding: 14px; border-radius: 12px; background: rgba(45,210,174,.06); border: 1px solid rgba(45,210,174,.14); }
.offer-summary .ledger-row { padding: 8px 0; }
.tutorial-step { display: grid; grid-template-columns: 50px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.tutorial-step:last-child { border-bottom: 0; }
.tutorial-step b { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: rgba(45,210,174,.11); color: var(--teal); font-size: 20px; }
.tutorial-step h4 { margin: 1px 0 5px; font-size: 12px; }
.tutorial-step p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }

/* Match live */
.match-layer { position: fixed; z-index: 120; inset: 0; background: #030c12; display: flex; flex-direction: column; }
.match-topbar { min-height: 70px; padding: 10px clamp(14px, 3vw, 36px); display: grid; grid-template-columns: 1fr minmax(330px, 540px) 1fr; align-items: center; gap: 16px; background: #071923; border-bottom: 1px solid var(--line); }
.match-brand span { display: block; color: var(--teal); font-size: 9px; font-weight: 900; letter-spacing: .14em; }
.match-brand strong { display: block; margin-top: 4px; font-size: 11px; }
.match-scoreboard { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 14px; text-align: center; }
.match-scoreboard > div { font-size: 11px; font-weight: 900; }
.match-scoreboard strong { min-width: 92px; font-size: 26px; }
.match-scoreboard small { color: var(--muted); margin: 0 7px; }
.match-clock { text-align: right; }
.match-clock span { display: block; font-size: 20px; font-weight: 900; }
.match-clock b { color: var(--muted); font-size: 9px; }
.match-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.pitch-wrap { position: relative; min-width: 0; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle, rgba(45,210,174,.08), transparent 55%); }
#match-canvas,
#match-webgl-canvas { width: min(100%, 1120px); max-height: calc(100vh - 70px); aspect-ratio: 16 / 9; display: block; box-shadow: 0 22px 60px rgba(0,0,0,.4); }
#match-webgl-canvas { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); }
.match-panel { min-height: 0; display: flex; flex-direction: column; background: #081923; border-left: 1px solid var(--line); }
.match-tabs { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.match-tabs button { min-height: 45px; border: 0; background: transparent; color: var(--muted); font-size: 10px; font-weight: 900; cursor: pointer; }
.match-tabs button.active { color: var(--text); box-shadow: inset 0 -2px var(--teal); }
.match-panel-body { flex: 1; min-height: 0; overflow: auto; padding: 12px; }
.commentary-feed { display: grid; gap: 6px; }
.commentary-line { padding: 9px 10px; border-radius: 9px; background: rgba(255,255,255,.025); color: var(--soft); font-size: 9px; line-height: 1.5; }
.commentary-line strong { color: var(--teal); margin-right: 5px; }
.commentary-line.goal { background: rgba(188,230,93,.09); color: #e5f5b4; border-left: 2px solid var(--lime); }
.commentary-line.card { border-left: 2px solid var(--amber); }
.match-controls { padding: 10px; display: grid; grid-template-columns: 38px repeat(3, 38px) 1fr; gap: 5px; border-top: 1px solid var(--line); }
.match-controls button { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.035); color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 900; }
.match-controls button.active { color: #052119; background: var(--teal); border-color: transparent; }
.match-controls .skip { color: var(--text); }
.match-stat-row { padding: 9px 2px; }
.match-stat-row div:first-child { display: flex; justify-content: space-between; font-size: 9px; margin-bottom: 5px; }
.match-stat-bars { height: 6px; display: flex; border-radius: 8px; overflow: hidden; background: rgba(255,255,255,.05); }
.match-stat-bars i:first-child { background: var(--teal); }
.match-stat-bars i:last-child { background: var(--blue); }
.match-tactics-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.match-tactics-summary span {
  min-width: 0;
  padding: 7px;
  border-radius: 8px;
  background: rgba(45,210,174,.07);
  color: #b9f6e7;
  font-size: 7px;
  font-weight: 900;
  line-height: 1.45;
}
.lineup-list { display: grid; gap: 3px; }
.lineup-row { display: grid; grid-template-columns: 30px 1fr 32px; gap: 6px; padding: 7px; border-radius: 7px; background: rgba(255,255,255,.025); font-size: 9px; }
.goal-flash { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; background: radial-gradient(circle, rgba(188,230,93,.25), transparent 54%); animation: goalFlash 1.7s ease both; }
.goal-flash span { font-size: clamp(55px, 12vw, 145px); font-weight: 1000; font-style: italic; letter-spacing: -.07em; color: var(--lime); text-shadow: 0 10px 40px rgba(0,0,0,.55); transform: rotate(-7deg); }
@keyframes goalFlash { 0% { opacity:0; transform:scale(.7) } 20% { opacity:1; transform:scale(1) } 75% { opacity:1 } 100% { opacity:0; transform:scale(1.08) } }
.match-prelude { position: absolute; width: min(560px, calc(100% - 32px)); padding: 28px; border-radius: 20px; text-align: center; background: rgba(5,22,31,.92); border: 1px solid var(--line-strong); box-shadow: var(--shadow); backdrop-filter: blur(12px); }
.match-prelude p { color: var(--muted); font-size: 11px; line-height: 1.65; }
.match-prelude p strong { color: var(--amber); }
.prelude-fixture { margin-bottom: 18px; }
.prelude-fixture .fixture-versus { margin: 0; }
.match-result { position: absolute; z-index: 5; inset: 70px 0 0; display: grid; place-items: center; padding: 20px; background: rgba(2,10,15,.82); backdrop-filter: blur(10px); }
.result-card { width: min(700px, 100%); padding: 30px; border-radius: 24px; background: linear-gradient(145deg, #133344, #071b27); border: 1px solid var(--line-strong); text-align: center; box-shadow: var(--shadow); }
.result-card h2 { margin: 5px 0 3px; font-size: 25px; }
.result-score { margin: 20px 0; font-size: 55px; font-weight: 1000; letter-spacing: -.08em; }
.result-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 18px 0; }
.result-summary .stat-card strong { font-size: 18px; }

/* Toasts */
.toast-stack { position: fixed; z-index: 200; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(350px, calc(100vw - 36px)); }
.toast { padding: 13px 14px; display: grid; grid-template-columns: 29px 1fr; gap: 10px; align-items: center; border-radius: 12px; background: rgba(12,38,50,.96); border: 1px solid var(--line-strong); box-shadow: 0 15px 35px rgba(0,0,0,.3); animation: toastIn .24s ease both; }
.toast b { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; background: rgba(45,210,174,.12); color: var(--teal); }
.toast strong { display: block; font-size: 10px; }
.toast p { margin: 3px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
@keyframes toastIn { from { opacity:0; transform:translateY(12px) } to { opacity:1; transform:none } }

/* Responsive */
@media (max-width: 1100px) {
  .start-layout { grid-template-columns: 250px 1fr; }
  .club-select-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr 1fr; }
  .dashboard-grid > .panel:first-child { grid-column: 1 / -1; }
  .choice-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .formation-layout { grid-template-columns: 1fr; }
  .formation-side-stack { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .match-main { grid-template-columns: minmax(0, 1fr) 290px; }
}
@media (max-width: 860px) {
  :root { --sidebar: 220px; }
  .start-screen { padding: 23px 16px 32px; }
  .start-layout { grid-template-columns: 1fr; }
  .start-mascot-wrap { display: none; }
  .resource-strip { display: none; }
  .dashboard-hero { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .finance-grid { grid-template-columns: 1fr; }
  .player-profile { grid-template-columns: 135px 1fr; }
  .formation-side-stack { grid-template-columns: 1fr; }
  .formation-pitch { min-height: 430px; }
  .match-main { grid-template-columns: 1fr; }
  .match-panel { position: absolute; right: 0; bottom: 0; width: 310px; height: 46%; border-top: 1px solid var(--line); }
  #match-canvas,
  #match-webgl-canvas { max-height: calc(100vh - 70px); }
}
@media (max-width: 720px) {
  .game-shell { display: block; }
  .sidebar { transform: translateX(-101%); transition: transform .2s ease; box-shadow: 25px 0 60px rgba(0,0,0,.45); }
  .sidebar.open { transform: translateX(0); }
  .workspace { margin: 0; }
  .mobile-menu { display: block; }
  .topbar { gap: 12px; }
  .date-block { min-width: 0; flex: 1; }
  .continue-button { min-width: 116px; }
  .screen-content { padding: 15px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid > .panel:first-child { grid-column: auto; }
  .screen-header { align-items: flex-start; flex-direction: column; }
  .header-actions { justify-content: flex-start; }
  .inbox-layout { grid-template-columns: 1fr; }
  .inbox-list { max-height: 270px; border-right: 0; border-bottom: 1px solid var(--line); }
  .choice-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .intensity-control { grid-template-columns: 1fr; }
  .fixture-row { grid-template-columns: 55px 1fr 50px 1fr; font-size: 9px; }
  .fixture-row .competition { display: none; }
  .player-profile { grid-template-columns: 1fr; }
  .player-portrait-large { max-width: 170px; }
  .player-summary-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .attribute-grid { grid-template-columns: 1fr; }
  .formation-stage-body { padding: 10px; }
  .formation-pitch { min-height: 360px; border-radius: 14px; }
  .formation-token { width: 82px; min-height: 51px; padding: 7px; grid-template-columns: 22px minmax(0,1fr); }
  .formation-token span { width: 22px; height: 22px; font-size: 9px; }
  .formation-token strong { font-size: 9px; }
  .formation-token small { font-size: 7px; }
  .formation-stand { left: 6%; right: 6%; height: 21px; }
  .formation-stand span { font-size: 7px; letter-spacing: .07em; }
  .match-topbar { grid-template-columns: 1fr auto; }
  .match-brand { display: none; }
  .match-scoreboard { grid-column: 1; }
  .match-clock { grid-column: 2; }
  .match-panel { width: 100%; height: 39%; }
  .result-summary { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .start-brand h1 { font-size: 43px; }
  .manager-row { grid-template-columns: 1fr; }
  .club-select-grid { grid-template-columns: 1fr 1fr; }
  .club-preview-inner { grid-template-columns: auto 1fr; }
  .club-preview-stats { grid-column: 1 / -1; justify-content: flex-start; text-align: left; }
  .start-actions { align-items: stretch; flex-direction: column; }
  .start-actions .button { width: 100%; }
  .grid-4 { grid-template-columns: 1fr; }
  .hero-objective { grid-template-columns: 1fr; }
  .market-hero { grid-template-columns: 1fr; }
  .market-budget { text-align: left; }
  .modal-layer { padding: 7px; }
  .modal-card { max-height: 96vh; border-radius: 16px; }
  .modal-body { padding: 16px; }
  .negotiation-grid { grid-template-columns: 1fr; }
  .match-scoreboard > div { max-width: 92px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .formation-pitch { min-height: 300px; }
  .formation-row,
  .formation-row.compact { grid-template-columns: 28px 34px minmax(0,1fr); }
  .formation-row .button { grid-column: 1 / -1; width: 100%; }
}


/* ===== CINEMATIC MATCH ENGINE 1.1 ===== */
.match-layer {
  background:
    radial-gradient(circle at 50% -20%, rgba(73,162,207,.16), transparent 52%),
    #020910;
}
.match-topbar {
  min-height: 72px;
  background: linear-gradient(180deg, rgba(7,25,35,.98), rgba(4,15,23,.98));
  box-shadow: 0 12px 40px rgba(0,0,0,.28);
  border-bottom-color: rgba(96,210,191,.22);
}
.match-brand span { color: #69efd0; text-shadow: 0 0 18px rgba(45,210,174,.42); }
.match-scoreboard strong { text-shadow: 0 0 24px rgba(255,255,255,.12); }
.match-main { grid-template-columns: minmax(0, 1fr) 332px; }
.pitch-wrap {
  isolation: isolate;
  padding: clamp(8px, 1.5vw, 18px);
  background:
    radial-gradient(circle at 50% 45%, rgba(50,190,147,.11), transparent 55%),
    linear-gradient(145deg, #02080e, #06151e 62%, #02080e);
}
.pitch-wrap::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, #000 12%, transparent 78%);
}
#match-canvas,
#match-webgl-canvas {
  position: relative;
  z-index: 1;
  width: min(100%, 1280px);
  max-height: calc(100vh - 92px);
  border-radius: 14px;
  border: 1px solid rgba(167,225,229,.19);
  box-shadow:
    0 30px 90px rgba(0,0,0,.58),
    0 0 0 1px rgba(255,255,255,.035) inset,
    0 0 70px rgba(36,185,138,.08);
  filter: saturate(1.12) contrast(1.04);
}
#match-webgl-canvas {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.match-engine-badge {
  position: absolute;
  left: clamp(14px, 2vw, 26px);
  top: clamp(14px, 2vw, 24px);
  z-index: 3;
  padding: 7px 10px;
  border: 1px solid rgba(105,239,208,.25);
  border-radius: 999px;
  background: rgba(3,13,20,.66);
  color: #b9f6e7;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: .12em;
  box-shadow: 0 14px 36px rgba(0,0,0,.25);
  pointer-events: none;
}
.match-engine-badge.fallback {
  color: #ffd166;
  border-color: rgba(255,209,102,.28);
}
.match-panel {
  background: linear-gradient(180deg, #071b26, #06141e);
  box-shadow: -16px 0 45px rgba(0,0,0,.22);
}
.match-controls {
  grid-template-columns: 38px repeat(3, 38px) minmax(92px, 112px) 1fr;
}
.match-controls .camera {
  color: #b9f6e7;
  border-color: rgba(45,210,174,.24);
  background: rgba(45,210,174,.075);
  letter-spacing: -.02em;
  white-space: nowrap;
}
.match-controls .camera:hover { background: rgba(45,210,174,.15); }
.goal-flash {
  z-index: 4;
  background:
    linear-gradient(115deg, transparent 0 30%, rgba(188,230,93,.16) 30% 64%, transparent 64%),
    radial-gradient(circle, rgba(188,230,93,.34), transparent 58%);
  mix-blend-mode: screen;
  animation: cinematicGoalFlash 1.75s cubic-bezier(.16,.76,.22,1) both;
}
.goal-flash::before,
.goal-flash::after {
  content: "";
  position: absolute;
  width: 120%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.9), transparent);
  box-shadow: 0 0 24px rgba(188,230,93,.8);
  transform: rotate(-8deg);
}
.goal-flash::before { top: 37%; }
.goal-flash::after { top: 63%; }
.goal-flash span {
  font-size: clamp(70px, 13vw, 176px);
  color: #eaff8a;
  text-shadow:
    0 5px 0 rgba(22,57,40,.78),
    0 14px 50px rgba(0,0,0,.8),
    0 0 34px rgba(188,230,93,.58);
  transform: rotate(-7deg) skewX(-8deg);
}
@keyframes cinematicGoalFlash {
  0% { opacity:0; transform:scale(.62) rotate(2deg); filter:blur(12px); }
  15% { opacity:1; transform:scale(1.04); filter:blur(0); }
  54% { opacity:1; transform:scale(1); }
  100% { opacity:0; transform:scale(1.12); }
}
.match-prelude {
  z-index: 5;
  background:
    linear-gradient(145deg, rgba(7,26,37,.94), rgba(3,13,21,.94));
  border-color: rgba(105,239,208,.24);
  box-shadow: 0 34px 100px rgba(0,0,0,.65), 0 0 70px rgba(45,210,174,.09);
}
@media (max-width: 980px) {
  .match-main { grid-template-columns: 1fr; }
  .match-panel { width: min(100%, 360px); }
  #match-canvas,
  #match-webgl-canvas { max-height: calc(100vh - 78px); }
}
@media (max-width: 520px) {
  .match-controls { grid-template-columns: 36px repeat(3, 36px) 86px 1fr; }
  .match-controls .camera { font-size: 8px; }
  .match-prelude {
    top: 88px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 24px);
    max-height: calc(100vh - 270px);
    padding: 14px;
    border-radius: 16px;
    overflow: auto;
  }
  .prelude-fixture { margin-bottom: 8px; }
  .prelude-fixture .fixture-versus { gap: 6px; }
  .prelude-fixture .fixture-club { gap: 4px; }
  .prelude-fixture .fixture-club strong { font-size: 9px; }
  .prelude-fixture .club-badge-xl {
    width: 44px;
    height: 52px;
    border-radius: 12px 12px 16px 16px;
    font-size: 10px;
  }
  .prelude-fixture .club-badge-xl::before,
  .prelude-fixture .club-badge-xl::after {
    width: 8px;
    height: 8px;
    top: 8px;
  }
  .prelude-fixture .club-badge-xl::before { left: 8px; }
  .prelude-fixture .club-badge-xl::after { right: 8px; }
  .match-prelude p {
    margin: 8px 0 10px;
    font-size: 9px;
    line-height: 1.38;
  }
  .match-prelude .button.large {
    min-height: 42px;
    padding: 10px 14px;
    font-size: 11px;
  }
}
