:root {
  color-scheme: dark;
  --bg: #080b0e;
  --bg-raised: #0d1217;
  --panel: #10171d;
  --panel-hover: #141e26;
  --panel-soft: #0b1116;
  --text: #e9f0f4;
  --muted: #82909a;
  --line: rgba(147, 190, 211, 0.13);
  --line-strong: rgba(45, 202, 255, 0.34);
  --cyan: #20c8ff;
  --cyan-strong: #00aeee;
  --violet: #755dea;
  --gold: #f1b949;
  --green: #39d98a;
  --red: #ff5a67;
  --wr-purple: rgb(178, 122, 255);
  --wr-pink-purple: rgb(234, 124, 218);
  --wr-cyan-blue: rgb(82, 205, 236);
  --wr-green: rgb(120, 216, 150);
  --wr-yellow: rgb(240, 214, 86);
  --wr-red: rgb(226, 96, 96);
  --league-hurricane: rgb(168, 132, 255);
  --league-typhoon: rgb(115, 225, 154);
  --league-storm: rgb(246, 203, 82);
  --league-gale: rgb(232, 239, 239);
  --league-squall: rgb(190, 127, 79);
  --sidebar: 246px;
  --topbar: 68px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  --title-font: "Bahnschrift Condensed", "Arial Narrow", Impact, sans-serif;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #e7edf1;
  --bg-raised: #f7fafc;
  --panel: #f8fafb;
  --panel-hover: #ffffff;
  --panel-soft: #eaf0f4;
  --text: #15212a;
  --muted: #63727e;
  --line: rgba(25, 62, 80, 0.14);
  --line-strong: rgba(0, 121, 184, 0.35);
  --cyan: #007fc4;
  --cyan-strong: #006ca8;
  --violet: #6048c8;
  --gold: #b57400;
  --shadow: 0 16px 40px rgba(46, 78, 96, 0.13);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.ocean-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background:
    radial-gradient(circle at 80% 4%, rgba(32, 200, 255, 0.09), transparent 27%),
    linear-gradient(115deg, transparent 0 49.7%, rgba(255,255,255,.018) 50%, transparent 50.3%);
  background-size: auto, 26px 26px;
  z-index: 0;
}

.app-shell { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  padding: 22px 16px;
  background: rgba(10, 14, 18, 0.97);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 30;
}
html[data-theme="light"] .sidebar { background: rgba(247, 250, 252, .97); }

.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 25px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--cyan); }
.brand-mark svg { width: 40px; fill: rgba(32, 200, 255, .07); stroke: currentColor; stroke-width: 1.6; }
.brand strong { display: block; letter-spacing: .11em; font-family: var(--title-font); font-size: 21px; line-height: 1; }
.brand small { display: block; color: var(--muted); font-size: 9px; letter-spacing: .17em; margin-top: 5px; }

.main-nav { display: grid; gap: 6px; margin-top: 26px; }
.main-nav a { position: relative; display: flex; align-items: center; gap: 13px; padding: 12px 13px; color: var(--muted); border: 1px solid transparent; transition: .2s ease; font-size: 14px; }
.main-nav a::before { content: ""; position: absolute; left: -17px; width: 3px; height: 22px; background: transparent; }
.main-nav a:hover { color: var(--text); background: var(--panel); }
.main-nav a.active { color: var(--text); background: linear-gradient(90deg, rgba(32, 200, 255, .13), transparent); border-color: rgba(32, 200, 255, .13); }
.main-nav a.active::before { background: var(--cyan); box-shadow: 0 0 14px var(--cyan); }
.nav-icon { width: 20px; color: var(--cyan); font-family: var(--title-font); font-size: 19px; text-align: center; }
.main-column { grid-column: 2; min-width: 0; display: flex; min-height: 100vh; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--topbar);
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 clamp(18px, 3vw, 48px);
  background: rgba(8, 11, 14, .88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
html[data-theme="light"] .topbar { background: rgba(231, 237, 241, .88); }
.realm-switch { display: flex; gap: 2px; padding: 3px; background: var(--panel); border: 1px solid var(--line); }
.realm-switch button { border: 0; background: transparent; color: var(--muted); padding: 6px 10px; font-size: 10px; font-weight: 700; letter-spacing: .08em; cursor: pointer; }
.realm-switch button.active { color: #001019; background: var(--cyan); }
.command-search { margin-left: auto; width: min(520px, 44vw); height: 38px; display: flex; align-items: center; gap: 9px; background: var(--panel); border: 1px solid var(--line); padding-left: 13px; }
.command-search:focus-within { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(32, 200, 255, .06); }
.command-search span { color: var(--cyan); font-size: 20px; }
.command-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 13px; }
.command-search button { align-self: stretch; border: 0; padding: 0 15px; background: var(--cyan); color: #001018; cursor: pointer; font-size: 12px; font-weight: 800; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--panel); cursor: pointer; }
.icon-button:hover { border-color: var(--line-strong); color: var(--cyan); }
.language-button { height: 38px; min-width: 44px; padding: 0 10px; border: 1px solid var(--line); background: var(--panel); color: var(--cyan); cursor: pointer; font-size: 10px; font-weight: 900; letter-spacing: .06em; }
.language-button:hover { border-color: var(--line-strong); }
.mobile-menu { display: none; }

main { flex: 1; width: 100%; max-width: 1540px; margin: 0 auto; padding: clamp(24px, 4vw, 58px) clamp(18px, 4vw, 64px) 70px; }
.page { display: none; animation: page-in .25s ease; }
.page.active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(5px); } }

.hero { position: relative; min-height: 390px; overflow: hidden; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; padding: clamp(34px, 6vw, 78px); background: linear-gradient(105deg, #111a21 0%, #0b1116 55%, #071017 100%); border: 1px solid var(--line); box-shadow: var(--shadow); }
html[data-theme="light"] .hero { background: linear-gradient(105deg, #f8fafb, #e9f2f7); }
.hero::before { content: ""; position: absolute; inset: auto -8% -44% 20%; height: 80%; transform: skewX(-22deg); border-top: 1px solid rgba(32, 200, 255, .3); background: linear-gradient(180deg, rgba(32, 200, 255, .06), transparent); }
.hero-grid { position: absolute; inset: 0; opacity: .18; background-image: linear-gradient(rgba(32, 200, 255, .11) 1px, transparent 1px), linear-gradient(90deg, rgba(32, 200, 255, .11) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(90deg, black, transparent 73%); }
.hero-content { position: relative; z-index: 2; max-width: 690px; }
.eyebrow { display: inline-flex; align-items: center; gap: 9px; color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow > span { width: 26px; height: 1px; background: currentColor; }
.hero h1, .page-title h1 { font-family: var(--title-font); letter-spacing: .055em; text-transform: uppercase; margin: 13px 0; font-size: clamp(48px, 7vw, 92px); line-height: .94; }
.hero h1 { text-shadow: 0 0 40px rgba(32, 200, 255, .12); }
.hero p { max-width: 620px; color: #aebbc3; line-height: 1.8; font-size: 14px; }
html[data-theme="light"] .hero p { color: var(--muted); }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; }
.button { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; border: 1px solid var(--line); cursor: pointer; font-size: 12px; font-weight: 800; letter-spacing: .04em; transition: .2s ease; }
.button-primary { background: var(--cyan); color: #001018; border-color: var(--cyan); }
.button-primary:hover { background: #69dcff; box-shadow: 0 0 24px rgba(32, 200, 255, .22); }
.button-ghost { background: rgba(255, 255, 255, .02); }
.button-ghost:hover { border-color: var(--line-strong); color: var(--cyan); }
.button.compact { min-height: 36px; padding: 0 14px; }

.radar { position: relative; z-index: 2; justify-self: center; width: min(25vw, 260px); aspect-ratio: 1; border: 1px solid rgba(32, 200, 255, .26); border-radius: 50%; background: radial-gradient(circle, rgba(32, 200, 255, .08), transparent 62%); overflow: hidden; box-shadow: inset 0 0 50px rgba(32, 200, 255, .06), 0 0 50px rgba(32, 200, 255, .04); }
.radar::before, .radar::after { content: ""; position: absolute; background: rgba(32, 200, 255, .22); }
.radar::before { top: 50%; left: 0; width: 100%; height: 1px; }
.radar::after { left: 50%; top: 0; height: 100%; width: 1px; }
.radar-ring { position: absolute; inset: 16%; border: 1px solid rgba(32, 200, 255, .18); border-radius: 50%; }
.ring-two { inset: 32%; }.ring-three { inset: 46%; }
.radar-sweep { position: absolute; inset: 0 50% 50% 0; transform-origin: 100% 100%; background: linear-gradient(45deg, rgba(32, 200, 255, .2), transparent 72%); animation: sweep 5s linear infinite; }
@keyframes sweep { to { transform: rotate(360deg); } }
.radar-blip { position: absolute; width: 5px; height: 5px; background: var(--cyan); border-radius: 50%; box-shadow: 0 0 12px 4px rgba(32, 200, 255, .3); }
.blip-one { top: 30%; left: 66%; }.blip-two { top: 65%; left: 31%; }
.radar-label { position: absolute; inset: auto 0 18%; text-align: center; color: var(--muted); font-size: 9px; letter-spacing: .18em; }
.radar-label strong { color: var(--green); font-size: 11px; }

.section-heading { margin: 55px 0 19px; display: flex; align-items: end; justify-content: space-between; gap: 20px; }
.section-heading > div { display: flex; align-items: baseline; gap: 13px; }
.section-index { color: var(--cyan); font: 18px var(--title-font); }
.section-heading h2, .panel-header h2 { margin: 0; font-family: var(--title-font); letter-spacing: .055em; text-transform: uppercase; }
.section-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.command-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.command-card { min-height: 110px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); transition: .2s ease; }
.command-card:hover { transform: translateY(-2px); background: var(--panel-hover); border-color: var(--line-strong); }
.command-card h3 { margin: 0 0 6px; font-size: 14px; }.command-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.card-code { display: grid; place-items: center; min-width: 42px; height: 32px; padding: 0 7px; background: rgba(32, 200, 255, .13); color: var(--cyan); border-left: 2px solid currentColor; font: 15px var(--title-font); letter-spacing: .05em; }
.card-code.violet { color: #a58cff; background: rgba(117, 93, 234, .14); }.card-code.gold { color: var(--gold); background: rgba(241, 185, 73, .12); }.card-code.slate { color: #a9bac5; background: rgba(169, 186, 197, .1); }
.arrow { color: var(--muted); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.panel { background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.panel-header { min-height: 76px; padding: 17px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-header a { color: var(--cyan); font-size: 11px; }.kicker { display: block; color: var(--cyan); font-size: 8px; font-weight: 800; letter-spacing: .2em; margin-bottom: 5px; }
.compact-ranking { padding: 5px 0; }
.rank-row { display: grid; grid-template-columns: 42px 62px minmax(0, 1fr) 150px; gap: 10px; align-items: center; padding: 13px 20px; border-bottom: 1px solid var(--line); font-size: 12px; }
.rank-row:last-child { border-bottom: 0; }.rank-position { font: 20px var(--title-font); color: var(--muted); }.rank-position.top { color: var(--gold); }
.realm-tag, .clan-tag { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 7px; font-size: 9px; font-weight: 900; letter-spacing: .05em; }
.clan-tag { color: var(--cyan); background: rgba(4, 12, 16, .48); border: 1px solid currentColor; vertical-align: middle; }
.clan-tag.league-hurricane { color: var(--league-hurricane); }.clan-tag.league-typhoon { color: var(--league-typhoon); }.clan-tag.league-storm { color: var(--league-storm); }.clan-tag.league-gale { color: var(--league-gale); }.clan-tag.league-squall { color: var(--league-squall); }
.realm-tag.asia { color: #ff9f43; background: rgba(255, 159, 67, .14); }.realm-tag.na { color: #b7d95c; background: rgba(183, 217, 92, .12); }.realm-tag.eu { color: #ff7597; background: rgba(255, 117, 151, .12); }
.rank-clan { min-width: 0; display: flex; align-items: center; }.rank-clan .clan-tag { flex: 0 0 auto; height: auto; margin-right: 8px; padding: 0; background: transparent; border: 0; font-size: inherit; }.rank-clan .clan-name { min-width: 0; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-score { text-align: right; font-weight: 700; }.loading-row { padding: 38px 20px; color: var(--muted); text-align: center; font-size: 12px; }

.page-title { min-height: 140px; display: flex; align-items: end; justify-content: space-between; gap: 25px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }.page-title h1 { margin: 10px 0 18px; font-size: clamp(46px, 6vw, 72px); }.page-title > p { max-width: 420px; margin: 0 0 25px; color: var(--muted); font-size: 12px; text-align: right; }
.toolbar, .query-deck { display: flex; align-items: end; gap: 12px; padding: 17px; background: var(--panel-soft); border-bottom: 1px solid var(--line); }
.query-deck { margin-bottom: 18px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.toolbar label, .query-deck label { display: grid; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }.toolbar .grow, .query-deck .grow { flex: 1; }
input, select { height: 37px; min-width: 90px; border: 1px solid var(--line); outline: 0; padding: 0 11px; color: var(--text); background: var(--panel); }
input:focus, select:focus { border-color: var(--line-strong); box-shadow: 0 0 0 3px rgba(32, 200, 255, .05); }
.table-wrap { overflow: auto; }.table-wrap table { width: 100%; border-collapse: collapse; font-size: 12px; }.table-wrap th { height: 42px; padding: 0 16px; color: var(--muted); background: var(--panel-soft); text-align: left; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }.table-wrap td { height: 49px; padding: 0 16px; border-top: 1px solid var(--line); white-space: nowrap; }.table-wrap tbody tr:hover { background: var(--panel-hover); }.empty-cell { height: 130px !important; color: var(--muted); text-align: center; }
.result-zone { min-height: 340px; }.empty-state { min-height: 340px; display: grid; place-items: center; align-content: center; padding: 40px; text-align: center; color: var(--muted); border: 1px dashed var(--line-strong); background: rgba(32, 200, 255, .015); }.empty-state > span { color: var(--cyan); font: 44px var(--title-font); }.empty-state h2 { margin: 10px 0 3px; color: var(--text); font-family: var(--title-font); letter-spacing: .06em; }.empty-state p { max-width: 540px; font-size: 12px; line-height: 1.7; }

.profile-header { display: flex; align-items: center; gap: 20px; padding: 24px; background: linear-gradient(120deg, var(--panel-hover), var(--panel)); border: 1px solid var(--line); box-shadow: var(--shadow); }.profile-emblem { width: 68px; height: 68px; display: grid; place-items: center; color: var(--cyan); background: rgba(32, 200, 255, .08); border: 1px solid var(--line-strong); font: 30px var(--title-font); }.profile-title { flex: 1; }.profile-title h2 { margin: 2px 0; font: 34px var(--title-font); letter-spacing: .04em; }.profile-title p { margin: 0; color: var(--muted); font-size: 11px; }.profile-meta { text-align: right; }.profile-meta strong { display: block; color: var(--cyan); font: 25px var(--title-font); }.profile-meta small { color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 10px 0; }.metric { padding: 17px; background: var(--panel); border: 1px solid var(--line); }.metric > span { display: block; color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }.metric strong { display: block; margin-top: 6px; font: 27px var(--title-font); }.metric strong.positive { color: var(--green); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.detail-grid .panel-header { min-height: 64px; }.subtable { width: 100%; border-collapse: collapse; font-size: 11px; }.subtable th, .subtable td { padding: 11px 15px; border-top: 1px solid var(--line); text-align: left; }.subtable th { color: var(--muted); font-size: 8px; letter-spacing: .08em; }.subtable td:last-child, .subtable th:last-child { text-align: right; }
.quality { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; font-size: 8px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; border-left: 2px solid currentColor; }.official_direct { color: var(--cyan); background: rgba(32,200,255,.1); }.exact_delta { color: var(--green); background: rgba(57,217,138,.1); }.inferred_high { color: #b6a5ff; background: rgba(117,93,234,.12); }.inferred_medium { color: var(--gold); background: rgba(241,185,73,.1); }.aggregate_only { color: #c0ccd3; background: rgba(192,204,211,.08); }.unavailable { color: var(--red); background: rgba(255,90,103,.08); }
.quality-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }.quality-card { min-height: 190px; padding: 22px; background: var(--panel); border: 1px solid var(--line); }.quality-card h2 { margin: 20px 0 8px; font: 23px var(--title-font); letter-spacing: .04em; }.quality-card p { color: var(--muted); font-size: 12px; line-height: 1.75; }.limitation-panel { margin-top: 14px; padding: 24px; }.limitation-panel h2 { font: 30px var(--title-font); margin: 7px 0 18px; }.limitation-list { display: flex; flex-wrap: wrap; gap: 8px; }.limitation-list span { padding: 8px 11px; color: var(--muted); background: var(--panel-soft); border: 1px solid var(--line); font-size: 10px; }
.candidate-list { display: grid; gap: 8px; }.candidate-button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; text-align: left; background: var(--panel); border: 1px solid var(--line); cursor: pointer; }.candidate-button:hover { border-color: var(--line-strong); background: var(--panel-hover); }.candidate-button strong { flex: 1; }.candidate-button small { color: var(--muted); }
.error-panel { padding: 28px; color: var(--muted); border: 1px solid rgba(255,90,103,.24); background: rgba(255,90,103,.04); }.error-panel strong { display: block; color: var(--red); margin-bottom: 8px; }
.history-grid { margin-top: 10px; }
.data-note { margin-top: 10px; padding: 18px 20px; color: var(--muted); border: 1px solid var(--line); border-left: 2px solid var(--cyan); background: var(--panel-soft); font-size: 11px; line-height: 1.7; }
.compact-note { margin-top: 0; min-height: 120px; display: flex; align-items: center; }
.warning-note { border-left-color: var(--gold); }
.result-tabs { position: sticky; top: calc(var(--topbar) + 8px); z-index: 12; display: flex; gap: 4px; margin: 14px 0 10px; padding: 5px; overflow-x: auto; background: color-mix(in srgb, var(--bg) 92%, transparent); border: 1px solid var(--line); backdrop-filter: blur(16px); }
.result-tab { min-height: 38px; flex: 0 0 auto; padding: 0 16px; color: var(--muted); background: transparent; border: 1px solid transparent; cursor: pointer; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.result-tab:hover { color: var(--text); border-color: var(--line); }
.result-tab.active { color: #001018; background: var(--cyan); border-color: var(--cyan); }
.result-pane { display: none; }
.result-pane.active { display: block; animation: page-in .2s ease; }
.result-pane > .panel + .panel, .result-pane > .detail-grid + .panel { margin-top: 10px; }
.inline-filter { display: flex; justify-content: flex-end; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel-soft); }
.inline-filter label { width: min(420px, 100%); display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.inline-filter input { width: 100%; }
.table-action { min-height: 28px; padding: 0 10px; color: var(--cyan); background: rgba(32, 200, 255, .08); border: 1px solid var(--line-strong); cursor: pointer; font-size: 10px; font-weight: 800; }
.table-action:hover { color: #001018; background: var(--cyan); }
.ship-detail-panel { margin-top: 10px; }
.ship-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ship-detail-grid > div { min-height: 86px; padding: 17px 20px; border-right: 1px solid var(--line); border-top: 1px solid var(--line); }
.ship-detail-grid > div:nth-child(4n) { border-right: 0; }
.ship-detail-grid > div > span { display: block; color: var(--muted); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.ship-detail-grid strong { display: block; margin-top: 7px; font: 23px var(--title-font); }
.panel-body { padding: 20px; color: var(--muted); font-size: 12px; line-height: 1.8; }
.panel-body p { margin: 0 0 12px; }
.panel-body p:last-child { margin-bottom: 0; }
.panel-body strong { color: var(--text); }
.muted { color: var(--muted); }
.win-rate { font-weight: 850; }.win-rate.wr-purple { color: var(--wr-purple); }.win-rate.wr-pink-purple { color: var(--wr-pink-purple); }.win-rate.wr-cyan-blue { color: var(--wr-cyan-blue); }.win-rate.wr-green { color: var(--wr-green); }.win-rate.wr-yellow { color: var(--wr-yellow); }.win-rate.wr-red { color: var(--wr-red); }
.clan-rating { font-weight: 850; }.clan-rating.league-hurricane { color: var(--league-hurricane); }.clan-rating.league-typhoon { color: var(--league-typhoon); }.clan-rating.league-storm { color: var(--league-storm); }.clan-rating.league-gale { color: var(--league-gale); }.clan-rating.league-squall { color: var(--league-squall); }
.footer { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 clamp(18px, 4vw, 64px); color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; letter-spacing: .08em; }
.footer-credit { color: var(--text); }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }.toast { max-width: 330px; padding: 13px 15px; color: var(--text); background: var(--panel-hover); border: 1px solid var(--line-strong); box-shadow: var(--shadow); font-size: 11px; animation: toast-in .2s ease; }@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1180px) {
  .command-grid { grid-template-columns: repeat(2, 1fr); }
  .radar { width: min(29vw, 230px); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  :root { --sidebar: 238px; }
  .app-shell { display: block; }
  .sidebar { transform: translateX(-102%); transition: transform .25s ease; box-shadow: var(--shadow); }
  .sidebar.open { transform: translateX(0); }
  .main-column { min-height: 100vh; }
  .mobile-menu { display: grid; }
  .topbar { gap: 9px; padding: 0 14px; }
  .realm-switch { display: none; }
  .command-search { width: auto; flex: 1; margin-left: 0; }
  main { padding-top: 28px; }
  .hero { grid-template-columns: 1fr; min-height: 430px; }
  .radar { position: absolute; right: -40px; bottom: -55px; width: 240px; opacity: .48; }
  .dashboard-grid, .detail-grid { grid-template-columns: 1fr; }
  .quality-grid { grid-template-columns: repeat(2, 1fr); }
  .ship-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ship-detail-grid > div:nth-child(4n) { border-right: 1px solid var(--line); }
  .ship-detail-grid > div:nth-child(2n) { border-right: 0; }
}

@media (max-width: 600px) {
  .topbar { height: 60px; }.command-search button { padding: 0 10px; }.command-search input { font-size: 12px; }
  .language-button { display: none; }
  .hero { min-height: 470px; padding: 32px 24px; }.hero h1 { font-size: 56px; }.hero p { font-size: 12px; }.hero-actions { flex-wrap: wrap; }
  .section-heading { align-items: start; flex-direction: column; }.section-heading p { display: none; }
  .command-grid { grid-template-columns: 1fr; }.command-card { min-height: 94px; }
  .page-title { align-items: start; flex-direction: column; min-height: 120px; }.page-title > p { display: none; }.page-title h1 { font-size: 48px; }
  .toolbar, .query-deck { align-items: stretch; flex-direction: column; }.toolbar label, .query-deck label { width: 100%; }.toolbar input, .toolbar select, .query-deck input, .query-deck select { width: 100%; }
  .rank-row { grid-template-columns: 32px 48px 1fr; padding: 12px; }.rank-score { display: none; }
  .quality-grid, .metric-grid { grid-template-columns: 1fr; }.profile-header { align-items: start; flex-wrap: wrap; }.profile-meta { width: 100%; text-align: left; }
  .result-tabs { top: 68px; }
  .inline-filter label { grid-template-columns: 1fr; }
  .ship-detail-grid { grid-template-columns: 1fr; }
  .ship-detail-grid > div { border-right: 0 !important; }
  .footer { align-items: start; flex-direction: column; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
