:root {
  color-scheme: dark;
  --bg: #0c1014;
  --panel: rgba(24, 27, 33, .92);
  --panel-2: rgba(32, 36, 44, .92);
  --line: rgba(85, 99, 116, .38);
  --text: #eef3f6;
  --muted: #9aa6af;
  --soft: #c9d4dc;
  --accent: #6ee7b7;
  --accent-2: #7dc7ff;
  --warn: #f6d365;
  --danger: #ff8b8b;
  --shadow: 0 16px 40px rgba(0, 0, 0, .22);
  --glow: 0 0 34px rgba(110, 231, 183, .11);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 12% 0%, rgba(110, 231, 183, .14), transparent 34%),
    linear-gradient(180deg, rgba(125, 199, 255, .09), transparent 300px),
    var(--bg);
  color: var(--text);
  font: 14px/1.45 "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.motion-canvas {
  position: fixed;
  inset: 0 0 auto;
  pointer-events: none;
  z-index: 0;
  opacity: .82;
}

.topbar {
  border-bottom: 1px solid var(--line);
  background: rgba(10, 13, 17, .82);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 5;
}

main,
.footer {
  position: relative;
  z-index: 1;
}

.topbar-inner {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: .2px;
  flex-wrap: wrap;
}

.brand-copy {
  min-width: 0;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(110, 231, 183, .45);
  background: #020304;
  border-radius: 8px;
  box-shadow: 0 0 24px rgba(110, 231, 183, .14);
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand strong,
.brand-home {
  display: block;
}

.brand strong {
  font-weight: 850;
  line-height: 1.05;
}

.brand-home {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.2;
}

.brand-visitors {
  display: grid;
  gap: 1px;
  padding-left: 10px;
  border-left: 1px solid rgba(85, 99, 116, .5);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  white-space: nowrap;
}

.brand-visitors b {
  color: var(--accent);
  font-weight: 800;
}

.brand-visitors span {
  display: block;
}

.brand-tools {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  margin-left: 0;
  padding-left: 10px;
  border-left: 1px solid rgba(85, 99, 116, .5);
}

.sourcebans-button {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 7px;
  padding: 5px;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}

.sourcebans-button:hover {
  border-color: rgba(125, 199, 255, .55);
  background: rgba(125, 199, 255, .10);
  transform: translateY(-1px);
}

.sourcebans-button img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

.brand-link,
.hero-brand-link {
  color: var(--accent);
  text-shadow: 0 0 18px rgba(110, 231, 183, .18);
}

.brand-link:hover,
.brand-home:hover,
.hero-brand-link:hover {
  color: var(--accent-2);
}

.nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.nav a,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--soft);
  padding: 8px 11px;
  border-radius: 7px;
  transition: border-color .16s ease, background .16s ease, color .16s ease, transform .16s ease;
}

.nav a:hover,
.button:hover {
  border-color: rgba(125, 199, 255, .55);
  color: var(--text);
  transform: translateY(-1px);
}

.nav a.active,
.button.primary {
  border-color: rgba(110, 231, 183, .5);
  color: var(--text);
  background: rgba(110, 231, 183, .12);
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 7px;
  padding: 4px;
}

.lang-button {
  width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 5px;
  border: 1px solid transparent;
  padding: 0;
}

.lang-button span:not(.country-emoji) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.lang-button:hover,
.lang-button.active {
  border-color: rgba(110, 231, 183, .48);
  background: rgba(110, 231, 183, .11);
}

.lang-button .country-emoji {
  width: 22px;
  height: 22px;
}

.hero {
  min-height: 210px;
  padding: 42px 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(450px, 500px);
  align-items: end;
  gap: 22px;
}

.hero h1 {
  margin: 0 0 8px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
}

.eyebrow {
  color: var(--accent);
  font-weight: 750;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: .12em;
  margin-bottom: 9px !important;
}

.hero-panel {
  border: 1px solid rgba(125, 199, 255, .25);
  background:
    linear-gradient(145deg, rgba(24, 27, 33, .82), rgba(32, 36, 44, .72));
  box-shadow: var(--shadow), var(--glow);
  border-radius: 8px;
  padding: 13px;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.map-focus-panel {
  grid-template-columns: minmax(160px, 200px) minmax(220px, 1fr);
}

.runner-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .08);
  background: #020304;
}

.runner-art {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(1.08) contrast(1.06);
}

.map-focus-card {
  aspect-ratio: 16 / 10;
  background: #0b1016;
}

.map-focus-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 52%, rgba(8, 11, 15, .58)),
    radial-gradient(circle at 20% 18%, rgba(110, 231, 183, .16), transparent 32%);
  pointer-events: none;
}

.runner-glow {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 26% 34%, rgba(255, 48, 44, .23), transparent 22%),
    radial-gradient(circle at 50% 31%, rgba(35, 70, 255, .22), transparent 23%),
    radial-gradient(circle at 73% 34%, rgba(255, 255, 255, .21), transparent 23%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.hero-focus {
  min-width: 0;
}

.status-hero {
  min-height: 300px;
  padding: 30px 0 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr);
  gap: 18px;
  align-items: stretch;
}

.status-map,
.status-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.status-map {
  min-height: 300px;
  position: relative;
}

.status-map img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.05);
}

.status-map-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 40%, rgba(8, 11, 15, .86)),
    radial-gradient(circle at 18% 18%, rgba(110, 231, 183, .18), transparent 32%);
  pointer-events: none;
}

.status-map-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 15px;
}

.status-map-caption span,
.status-panel p,
.status-facts span {
  color: var(--muted);
}

.status-map-caption strong {
  display: block;
  color: var(--text);
  font-size: clamp(22px, 4vw, 36px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.status-panel {
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.status-panel h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 44px);
}

.status-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, .04);
}

.status-dot.online {
  background: #6ee7b7;
  box-shadow: 0 0 0 5px rgba(110, 231, 183, .12), 0 0 24px rgba(110, 231, 183, .5);
}

.status-dot.offline {
  background: #ff7777;
  box-shadow: 0 0 0 5px rgba(255, 119, 119, .12), 0 0 24px rgba(255, 119, 119, .36);
}

.status-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.status-facts div {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
}

.status-facts span {
  display: block;
  font-size: 12px;
  margin-bottom: 4px;
}

.status-facts strong {
  display: block;
  overflow-wrap: anywhere;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.status-player-table {
  min-width: 520px;
}

.replay-preview-section {
  margin-top: 14px;
}

.replay-preview-section .section-head {
  align-items: flex-start;
}

.replay-style-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.replay-style-tab {
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--soft);
  border-radius: 999px;
  padding: 8px 13px;
  min-height: 36px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.replay-style-tab:hover {
  border-color: rgba(125, 199, 255, .55);
  color: var(--text);
}

.replay-style-tab.active {
  border-color: rgba(110, 231, 183, .72);
  background: rgba(110, 231, 183, .14);
  color: var(--text);
}

.replay-style-tab.empty:not(.active) {
  color: var(--muted);
}

.replay-preview-card {
  display: none;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(112, 229, 255, .08), transparent 48%),
    var(--panel);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.replay-preview-card.active {
  display: block;
}

.replay-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  min-height: 300px;
}

.replay-canvas-wrap {
  height: 300px;
  background:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px),
    rgba(10, 14, 19, .72);
  background-size: 34px 34px;
}

.replay-preview-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.replay-telemetry {
  border-left: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent),
    rgba(12, 16, 22, .58);
  padding: 12px;
  display: grid;
  gap: 10px;
  align-content: stretch;
}

.replay-ghost-box,
.replay-key-box,
.replay-live-stat {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
}

.replay-ghost-box > span,
.replay-key-box > span,
.replay-live-stat > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}

.replay-ghost-model {
  width: 78px;
  height: 78px;
  margin: 4px auto 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 48%, rgba(255, 255, 255, .95), rgba(255, 255, 255, .22) 32%, transparent 64%),
    radial-gradient(circle, rgba(112, 229, 255, .18), transparent 68%);
  box-shadow: 0 0 24px rgba(112, 229, 255, .22);
  position: relative;
  transition: transform .08s linear;
}

.replay-ghost-model i {
  position: absolute;
  left: 50%;
  top: 9px;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-bottom: 18px solid rgba(110, 231, 183, .95);
  transform: translateX(-50%);
  filter: drop-shadow(0 0 8px rgba(110, 231, 183, .45));
}

.replay-key-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.replay-key-grid b {
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
  font-size: 11px;
  line-height: 1;
}

.replay-key-grid b.active {
  color: #071016;
  background: #6ee7b7;
  border-color: rgba(110, 231, 183, .95);
  box-shadow: 0 0 16px rgba(110, 231, 183, .24);
}

.replay-live-stat strong {
  display: block;
  color: var(--text);
  font-size: 24px;
  line-height: 1.1;
}

.replay-progress-track {
  height: 7px;
  margin-top: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, .08);
}

.replay-progress-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7777, #facc15, #6ee7b7);
  transition: width .08s linear;
}

.replay-preview-meta {
  display: grid;
  grid-template-columns: minmax(160px, 1.25fr) repeat(3, minmax(120px, 1fr));
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.replay-preview-meta strong,
.replay-preview-meta span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.replay-preview-meta strong {
  color: var(--text);
}

.replay-empty {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.hero-panel span,
.hero-panel small {
  color: var(--muted);
  display: block;
}

.hero-panel strong {
  display: block;
  color: var(--text);
  font-size: 20px;
  overflow-wrap: anywhere;
  margin: 3px 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 20px;
}

.stat {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent),
    var(--panel);
  border-radius: 8px;
  padding: 14px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  opacity: .55;
}

.stat strong {
  display: block;
  font-size: 23px;
  line-height: 1.1;
}

.stat span {
  color: var(--muted);
  font-size: 12px;
}

.filters {
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .035), transparent),
    var(--panel);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 16px;
  display: grid;
  grid-template-columns: 1.3fr 1fr .8fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.lj-filters {
  grid-template-columns: minmax(220px, 360px) auto;
  justify-content: start;
}

.limit-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.limit-buttons .button {
  min-width: 52px;
  padding-inline: 10px;
}

label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}

select,
input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text);
  border-radius: 7px;
  padding: 8px 10px;
  outline: none;
}

select:focus,
input:focus {
  border-color: rgba(125, 199, 255, .7);
}

.section {
  margin: 18px 0;
  min-width: 0;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
}

.section-title-row {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.section-inline-link {
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.section-inline-link:hover {
  color: var(--accent);
}

.section-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.meta {
  color: var(--muted);
  font-size: 12px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  max-width: 100%;
  overscroll-behavior-x: contain;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 780px;
}

th,
td {
  padding: 11px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, .04);
  position: sticky;
  top: 0;
  z-index: 2;
}

tr:last-child td {
  border-bottom: 0;
}

tr:hover td {
  background: rgba(125, 199, 255, .045);
}

.podium-1 td {
  background: rgba(246, 211, 101, .045);
}

.podium-2 td {
  background: rgba(125, 199, 255, .035);
}

.podium-3 td {
  background: rgba(110, 231, 183, .03);
}

.rank {
  color: var(--warn);
  font-weight: 800;
}

.time {
  color: var(--accent);
  font-weight: 800;
}

.rating-delta {
  font-weight: 800;
}

.rating-delta.up {
  color: var(--accent);
}

.rating-delta.down {
  color: var(--danger);
}

.player-cell {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 210px;
}

.achievement-player-cell {
  min-width: 250px;
}

.achievement-medal {
  width: 24px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 24px;
  font-size: 18px;
  line-height: 1;
}

.achievement-player-cell + .muted,
td .muted {
  white-space: normal;
}

.avatar-link {
  display: inline-flex;
  flex: 0 0 auto;
  border-radius: 8px;
  transition: transform .16s ease, filter .16s ease;
}

.avatar-link:hover,
.avatar-link:focus-visible {
  transform: translateY(-1px);
  filter: brightness(1.12);
  outline: none;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  background: #111821;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 0 16px rgba(125, 199, 255, .08);
}

.player-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.player-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.country {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.country-toggle {
  border: 1px solid rgba(125, 199, 255, .18);
  background: rgba(125, 199, 255, .055);
  color: var(--soft);
  border-radius: 999px;
  padding: 2px 6px;
  font: inherit;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.country-toggle:hover,
.country-toggle:focus-visible {
  border-color: rgba(110, 231, 183, .55);
  background: rgba(110, 231, 183, .12);
  color: var(--text);
  outline: none;
}

.player-line .country-toggle {
  padding: 0;
  border-color: transparent;
  background: transparent;
}

.country-flag {
  font-size: 16px;
  line-height: 1;
}

.country-emoji {
  display: inline-block;
  width: 18px;
  height: 18px;
  object-fit: contain;
  vertical-align: -3px;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .25));
}

.country-code {
  color: var(--muted);
  font-size: 11px;
}

.country-popover-card {
  position: fixed;
  z-index: 30;
  min-width: 190px;
  max-width: min(280px, calc(100vw - 24px));
  border: 1px solid rgba(125, 199, 255, .35);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .055), transparent),
    rgba(17, 24, 31, .98);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .36);
  padding: 10px 12px;
  display: none;
}

.country-popover-card.open {
  display: block;
}

.country-popover-title {
  color: var(--accent);
  font-weight: 800;
  margin-bottom: 7px;
}

.country-popover-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 8px;
  padding: 4px 0;
  color: var(--soft);
}

.country-popover-row span {
  color: var(--muted);
  font-size: 12px;
}

.country-popover-row strong {
  font-weight: 650;
  overflow-wrap: anywhere;
}

.save {
  color: var(--accent-2);
  margin-left: 5px;
  font-size: 12px;
}

.muted {
  color: var(--muted);
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.empty,
.notice {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 18px;
  color: var(--muted);
}

.player-head {
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(110, 231, 183, .08), transparent 55%),
    var(--panel);
  border-radius: 8px;
  padding: 18px;
  margin: 16px 0;
}

.player-head h1 {
  margin: 0 0 8px;
}

.details {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: var(--panel-2);
}

.footer {
  padding: 30px 0 44px;
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

@media (max-width: 860px) {
  .stats,
  .grid-two {
    grid-template-columns: 1fr 1fr;
  }

  .filters {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .status-hero {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .map-focus-panel {
    grid-template-columns: minmax(128px, 34vw) minmax(0, 1fr);
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .stats,
  .grid-two {
    grid-template-columns: 1fr;
  }

  body {
    font-size: 13px;
  }

  .wrap {
    width: min(100% - 20px, 1180px);
  }

  .topbar-inner {
    gap: 10px;
    min-height: 0;
  }

  .brand {
    width: 100%;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }

  .nav a,
  .button {
    min-height: 36px;
    padding: 8px 10px;
    white-space: nowrap;
  }

  .brand-tools {
    flex: 0 0 auto;
  }

  .hero {
    padding: 28px 0 16px;
    gap: 14px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .hero p {
    font-size: 13px;
  }

  .footer {
    flex-direction: column;
  }

  .hero-panel {
    grid-template-columns: 64px minmax(0, 1fr);
    padding: 10px;
  }

  .map-focus-panel {
    grid-template-columns: minmax(112px, 38vw) minmax(0, 1fr);
  }

  .hero-panel strong {
    font-size: 17px;
  }

  .status-hero {
    min-height: 0;
    padding-top: 18px;
  }

  .status-map,
  .status-map img {
    min-height: 220px;
  }

  .status-panel {
    padding: 16px;
  }

  .status-panel h1 {
    font-size: 32px;
  }

  .status-facts {
    grid-template-columns: 1fr;
  }

  .status-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .status-actions .button {
    justify-content: center;
    text-align: center;
  }

  .filters {
    padding: 12px;
    gap: 9px;
  }

  .filters .button {
    width: 100%;
    justify-content: center;
  }

  .section {
    margin: 14px 0;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .section-head h2 {
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .section-title-row {
    flex-wrap: wrap;
    gap: 4px 8px;
  }

  .table-wrap {
    border-radius: 7px;
    margin-inline: -1px;
  }

  table {
    min-width: 700px;
  }

  .status-player-table {
    min-width: 420px;
  }

  .replay-style-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .replay-style-tab {
    width: 100%;
  }

  .replay-stage {
    grid-template-columns: 1fr;
  }

  .replay-canvas-wrap {
    height: 220px;
  }

  .replay-telemetry {
    border-left: 0;
    border-top: 1px solid var(--line);
    grid-template-columns: 1fr;
  }

  .replay-preview-meta {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 9px 10px;
  }

  .player-cell {
    min-width: 160px;
  }

  .avatar {
    width: 32px;
    height: 32px;
  }

  .player-head {
    padding: 14px;
  }

  .pill {
    max-width: 100%;
    overflow-wrap: anywhere;
  }
}

@media (max-width: 380px) {
  .nav {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 6px;
  }

  .nav > a {
    flex: 1 1 calc(50% - 6px);
  }

  .brand-tools {
    flex: 1 1 auto;
    min-width: 0;
  }

  .lang-switcher {
    justify-content: center;
    flex: 1 1 auto;
    min-width: 0;
  }
}

/* AKB hidden scrollbar: keep scroll, hide scrollbar chrome */
html, body, * {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
