:root {
  color-scheme: light;
  font: .925rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #282b30;
  background: #eff2f8;
  --ink: #282b30;
  --muted: #565f72;
  --edge: #ccd4e6;
  --blue: #2c5eb1;
  --accent: #5387e4;
  --nav: #e6eaf1;
  --paper: #fff;
}
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
a { color: var(--blue); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .13em; }
:focus-visible { outline: 3px solid #1877d2; outline-offset: 3px; }
.skip { position: fixed; z-index: 2; top: .5rem; left: .5rem; background: white; padding: .65rem; transform: translateY(-150%); }
.skip:focus { transform: none; }
.icon { display: inline-block; flex: none; fill: currentColor; vertical-align: -.14em; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--nav); color: #3f415e; min-width: 0; display: flex; flex-direction: column; gap: 1.2rem; }
.brand { display: flex; align-items: center; gap: .65rem; padding: 21px; color: #282b30; text-decoration: none; font-size: 1.25rem; font-weight: 800; line-height: 1.1; }
.brand-mark, .nav-icon, .menu-toggle { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 10px; background: #eff2f8; color: #3f415e; }
.brand-mark { background: var(--accent); color: #fff; }
.brand-mark .icon, .menu-toggle .icon { width: 20px; height: 20px; }
.brand small, .compact-brand small { display: block; margin-top: .2rem; color: #565f72; font-size: .61rem; letter-spacing: .13em; }
.sidebar nav { display: grid; gap: .18rem; }
.sidebar nav a { display: flex; align-items: center; gap: .65rem; margin-right: .9rem; text-decoration: none; padding: .35rem .8rem .35rem 21px; color: #3f415e; border-radius: 0 10px 10px 0; }
.sidebar nav a:hover { background: #e1e5ed; }
.sidebar nav a[aria-current] { margin: 0 0 0 .6rem; padding-left: calc(21px - .6rem); background: #eff2f8; border-radius: 10px 0 0 10px; color: var(--ink); font-weight: 700; }
.sidebar nav a[aria-current] .nav-icon { background: var(--accent); color: #fff; }
.nav-caption { padding: .3rem 21px; color: #565f72; font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.menu-state { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; }
.menu-state:focus-visible ~ .workspace .menu-toggle { outline: 3px solid #1877d2; outline-offset: 3px; }
.menu-state:checked ~ .sidebar { display: none; }
body:has(.menu-state:checked) { grid-template-columns: minmax(0, 1fr); }
.workspace { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: .8rem; min-height: 64px; padding: .7rem 1.5rem; background: #ffffffeb; backdrop-filter: blur(12px); border-bottom: 1px solid #e5eaf2; }
.menu-toggle { cursor: pointer; }
.menu-toggle:hover { background: #e0e9fa; }
.compact-brand { display: none; color: var(--ink); font-weight: 800; line-height: 1; text-decoration: none; }
.menu-state:checked ~ .workspace .compact-brand { display: block; }
.quick-search { margin-left: auto; display: flex; align-items: center; gap: .6rem; background: #eff2f8; color: var(--muted); border-radius: 10px; padding: 0 .7rem; }
.quick-search input { width: min(18vw, 15rem); min-width: 0; min-height: 36px; background: transparent; color: var(--ink); border: 0; font: inherit; }
.language { display: flex; gap: .35rem; }
.language a { color: #3f415e; padding: .38rem .48rem; border-radius: .45rem; text-decoration: none; font-size: .75rem; font-weight: 750; }
.language a[aria-current] { background: #e0e9fa; color: var(--blue); }
.topbar > .language:first-of-type { margin-left: auto; }
.quick-search + .language { margin-left: 0 !important; }
.account { position: relative; }
.account summary { display: flex; align-items: center; gap: .5rem; cursor: pointer; list-style: none; font-size: .86rem; font-weight: 650; }
.account summary::-webkit-details-marker { display: none; }
.account-name { max-width: 10rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-menu { position: absolute; right: 0; top: calc(100% + .75rem); display: grid; gap: .6rem; background: #fff; border: 1px solid var(--edge); border-radius: .8rem; padding: .8rem; box-shadow: 0 8px 24px #202f471a; white-space: nowrap; }
.account:not([open]) .account-menu { display: none; }
.breadcrumbs { display: flex; align-items: center; gap: .6rem; min-height: 44px; padding: .55rem 1.5rem; background: #ffffffa8; color: var(--muted); font-size: .8rem; }
.breadcrumbs a { color: #3f415e; text-decoration: none; }
.breadcrumbs a[aria-current] { color: var(--ink); font-weight: 700; }
main { width: 100%; padding: 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.hero { display: flex; align-items: flex-start; gap: 1rem; padding: .5rem 0 .6rem; }
.heading { min-width: 0; }
.avatar { border-radius: .85rem; background: #d6e0eb; object-fit: cover; }
.eyebrow { margin: 0 0 .35rem; color: var(--blue); font-size: .73rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(1.55rem, 2.3vw, 2.15rem); letter-spacing: -.025em; line-height: 1.14; overflow-wrap: anywhere; }
h2 { margin: 0; font-size: 1.1rem; }
p { line-height: 1.5; }
.intro { max-width: 68ch; margin: .65rem 0 0; color: var(--muted); }
.identity { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; color: var(--muted); margin-top: .65rem; }
code, .private-text { overflow-wrap: anywhere; }
.text-button { border: 0; padding: .2rem; background: transparent; color: var(--blue); text-decoration: underline; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); gap: .75rem; }
.card, .panel { background: var(--paper); border: 1px solid transparent; border-radius: .8rem; }
.card { position: relative; min-width: 0; display: grid; align-content: start; gap: .45rem; padding: 1rem; color: var(--ink); text-decoration: none; }
a.card:hover { border-color: var(--blue); background: #f5f9ff; }
a.card { padding-right: 1.8rem; }
.card span { color: var(--muted); font-weight: 650; font-size: .85rem; }
.card strong { font-size: 1.1rem; line-height: 1.35; overflow-wrap: anywhere; }
.card b { position: absolute; top: .8rem; right: .75rem; color: var(--blue); }
.panel { padding: 1rem; min-width: 0; }
.login { max-width: 36rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; }
button { font: inherit; cursor: pointer; }
.button { display: inline-flex; align-items: center; gap: .45rem; width: fit-content; min-height: 2.55rem; padding: .45rem .75rem; border-radius: .55rem; border: 1px solid transparent; text-decoration: none; background: var(--blue); color: #fff; font-size: .88rem; font-weight: 700; }
.button:hover { filter: brightness(.94); }
.button.secondary { background: var(--paper); color: var(--blue); border-color: var(--edge); }
.button.danger { background: #92363d; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: .7rem; }
.field { display: grid; gap: .3rem; min-width: 8rem; color: var(--muted); font-size: .85rem; font-weight: 650; }
.field input, .field select, .field textarea { min-width: 0; width: 100%; font: inherit; font-weight: 400; min-height: 2.55rem; border: 1px solid #a6b5c7; border-radius: .4rem; background: white; color: var(--ink); padding: .45rem .55rem; }
.records { padding: 0; overflow: hidden; }
.records h2 { padding: .95rem 1rem; }
.table-wrap { overflow-x: auto; }
.table-wrap:focus-visible { outline-offset: -3px; }
table { border-collapse: collapse; width: 100%; text-align: left; font-size: .88rem; }
thead { color: #435471; background: #f4f7fa; }
th, td { padding: .72rem 1rem; border-top: 1px solid var(--edge); vertical-align: top; overflow-wrap: anywhere; }
th { white-space: nowrap; }
td small { display: block; color: var(--muted); font-size: .78rem; margin-top: .22rem; }
td a { font-weight: 650; }
.player-cell, .country-cell { display: inline-flex; align-items: center; gap: .55rem; min-width: 0; }
.player-cell small { display: block; margin: 0; font-size: .74rem; color: var(--muted); }
.mini-avatar { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; color: #48649b; background: #e0e9fa; overflow: hidden; flex: none; }
.mini-avatar img { position: absolute; inset: 0; object-fit: cover; color: transparent; }
.country-flag { border-radius: 3px; box-shadow: 0 0 0 1px #41516a40; object-fit: cover; flex: none; }
.pill { display: inline-block; border-radius: .75rem; padding: .2rem .55rem; font-size: .8rem; font-weight: 700; background: #e9eff7; color: #263e5e; }
.pill.good { background: #dff1e5; color: #195832; }
.pill.warn { background: #fae8ca; color: #714100; }
.pill.info { background: #e0e9fa; color: #244e99; }
.pill.attack { background: #ffeeeb; color: #8a3c27; }
.empty { border-top: 1px solid var(--edge); margin: 0; padding: 1rem; color: var(--muted); }
.decisions details { margin-top: .7rem; border: 1px solid var(--edge); border-radius: .45rem; }
.decisions summary { cursor: pointer; color: var(--blue); font-weight: 700; padding: .65rem; }
.decision-form { display: grid; justify-items: start; gap: .7rem; padding: 0 .75rem .75rem; max-width: 42rem; }
.decision-form p { margin: .2rem 0; color: var(--muted); }
.decision-form .field { width: 100%; }
.confirm { display: flex; align-items: center; gap: .4rem; }
.private-text { margin: 0; white-space: pre-wrap; font-size: .9rem; line-height: 1.5; }
.battle-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 27rem), 1fr)); gap: 1rem; }
.battle-list > h2, .battle-list > p { grid-column: 1 / -1; margin: 0; }
.battle { display: flex; flex-direction: column; gap: .85rem; padding: 1rem; min-width: 0; background: #fff; border-radius: .8rem; }
.battle-header, .battle-location, .battle-footer, .battle-meta, .battle-time { display: flex; align-items: center; gap: .65rem; }
.battle-header { justify-content: space-between; flex-wrap: wrap; }
.battle-location { min-width: 0; }
.battle-location-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; color: #2c5eb1; background: #e0e9fa; }
.battle-location h2 { overflow-wrap: anywhere; }
.battle-location h2 span { color: var(--muted); font-weight: 600; font-size: .9em; }
.battle-location small, .battle-time { color: var(--muted); font-size: .78rem; }
.battle-front { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: .45rem; padding: .45rem; background: #202b3c; border-radius: .65rem; color: #fff; }
.battle-side { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: .3rem; min-width: 0; padding: .65rem .7rem; border: 1px solid transparent; border-radius: .45rem; overflow-wrap: anywhere; }
.battle-side.attackers { background: #402f35; border-color: #644246; }
.battle-side.defenders { background: #293d57; border-color: #3c5675; }
.battle-side-label { display: block; font-size: .68rem; font-weight: 750; letter-spacing: .055em; text-transform: uppercase; }
.attackers .battle-side-label { color: #ffb39e; }
.defenders .battle-side-label { color: #b5d9ff; }
.battle-side small { color: #e1e8f2; font-size: .75rem; }
.battle-countries { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; list-style: none; margin: 0; padding: 0; font-weight: 750; }
.battle-direction { align-self: center; display: grid; place-items: center; width: 1.6rem; color: #fff; }
.battle-direction .icon { width: 19px; height: 19px; }
.battle-footer { margin-top: auto; flex-wrap: wrap; }
.battle-host { display: grid; gap: .18rem; min-width: 0; }
.battle-host .battle-side-label { color: var(--muted); }
.battle-host a, .battle-link { font-weight: 650; }
.battle-meta { flex-wrap: wrap; margin-left: auto; gap: .4rem; }
.battle-link { display: inline-flex; align-items: center; gap: .3rem; }
.record-technical summary { cursor: pointer; color: var(--blue); }
.record-technical dl { margin-bottom: 0; }
.record-technical dl > div { margin-top: .45rem; }
.record-technical dd { margin: 0; }
.dashboard { display: grid; gap: .8rem; min-width: 0; }
.dashboard-banner { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: 1rem 1.2rem; border-radius: .8rem; background: #fff; }
.dashboard-banner h2 { font-size: clamp(1.2rem, 2vw, 1.55rem); }
.dashboard-banner p:last-child { margin: .32rem 0 0; color: var(--muted); font-size: .84rem; }
.dashboard-period { display: flex; gap: .16rem; border: 1px solid var(--edge); border-radius: .5rem; background: #fff; padding: .2rem; }
.dashboard-period a { padding: .38rem .6rem; border-radius: .32rem; text-decoration: none; font-size: .83rem; font-weight: 700; }
.dashboard-period a[aria-current] { background: #e0e9fa; color: var(--blue); }
.dashboard-metrics, .dashboard-charts, .dashboard-totals { display: grid; gap: .75rem; min-width: 0; }
.dashboard-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-totals { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dashboard-metric, .dashboard-chart { --series: #5387e4; --wash: #e0e9fa; --glyph: #2c5eb1; }
.dashboard .game { --series: #27ba89; --wash: #def8ef; --glyph: #167356; }
.dashboard .campaign { --series: #64c1fe; --wash: #def2ff; --glyph: #23678d; }
.dashboard .classic { --series: #ff7d5c; --wash: #ffeeeb; --glyph: #a3442c; }
.dashboard-metric { display: flex; align-items: center; gap: .7rem; min-width: 0; background: #fff; border-radius: .8rem; padding: .9rem; }
.dashboard-metric > div:last-child { display: grid; min-width: 0; }
.metric-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; border-radius: 12px; color: var(--glyph); background: var(--wash); }
.metric-icon .icon { width: 21px; height: 21px; }
.dashboard-metric span { font-size: .83rem; font-weight: 700; }
.dashboard-metric strong { font-size: clamp(1.35rem, 3vw, 2rem); color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.25; }
.dashboard-metric small, .dashboard-chart p, .dashboard-source, .chart-labels, .chart-axis { color: var(--muted); }
.dashboard h3 { font-size: .98rem; margin: 0; }
.dashboard-chart p { margin: .15rem 0 .55rem; font-size: .79rem; }
.chart-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .45rem; height: 5.6rem; }
.chart-axis { display: flex; flex-direction: column; justify-content: space-between; text-align: right; font-size: .72rem; }
.chart-plot svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: #e5eaf2; fill: none; vector-effect: non-scaling-stroke; }
.chart-fill { fill: var(--wash); }
.chart-line { fill: none; stroke: var(--series); stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart-labels { display: flex; justify-content: space-between; padding-left: 1.2rem; font-size: .72rem; margin-top: .2rem; }
.chart-data { margin-top: .5rem; font-size: .8rem; }
.chart-data summary { cursor: pointer; color: var(--blue); }
.chart-data ul { list-style: none; padding: 0; margin: .4rem 0 0; max-height: 10rem; overflow: auto; }
.chart-data li, .dashboard-summary dl div { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem; padding: .28rem 0; border-bottom: 1px solid var(--edge); }
.chart-empty { display: grid; place-items: center; min-height: 6rem; border-radius: .45rem; padding: .65rem; background: #eff2f8; color: var(--muted); text-align: center; font-size: .85rem; }
.dashboard-summary dl { margin: .42rem 0 0; font-size: .82rem; }
.dashboard-summary dd { margin: 0; font-weight: 700; }
.dashboard-source { margin: 0; font-size: .78rem; }
.dashboard-label { margin-top: .35rem; }
@media (max-width: 1040px) {
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 530px) {
  .dashboard-charts, .dashboard-totals { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body { display: block; }
  .sidebar { display: none; position: fixed; z-index: 4; top: 58px; left: 0; width: min(250px, 90vw); height: auto; max-height: calc(100dvh - 58px); gap: 0; padding: .45rem 0 .75rem; box-shadow: 5px 10px 30px #202f4729; border-radius: 0 0 .8rem 0; }
  .menu-state:checked ~ .sidebar { display: flex; }
  .sidebar .brand { display: none; }
  .compact-brand { display: block; }
  .topbar { min-height: 58px; padding: .55rem 1rem; }
  .account-name, .quick-search { display: none; }
  .quick-search + .language { margin-left: auto !important; }
  .breadcrumbs { padding-inline: 1rem; }
  main { padding: 1rem; }
  th, td { padding: .65rem; }
  .filters .field { flex: 1 1 10rem; }
  .avatar { width: 3rem; height: 3rem; }
}
@media (max-width: 420px) {
  .dashboard-metrics { grid-template-columns: minmax(0, 1fr); }
  .battle-front { gap: .25rem; }
  .battle-side { padding: .5rem; }
  .battle-direction { width: 1.3rem; }
  .battle-meta { margin-left: 0; }
}
