﻿
:root {
  color-scheme: light;
  --page:           #e6e4dc;
  --surface-1:      #f4f3ee;
  --surface-2:      #dedcd2;
  --text-primary:   #131210;
  --text-secondary: #43423c;
  --text-muted:     #6f6e66;
  --hairline:       rgba(11,11,11,0.18);
  --grid:           #cbc9be;
  --bar-track:      #cbc9be;
  --series-1:       #1f6bcc;
  --series-1-soft:  rgba(31,107,204,0.18);
  --series-2:       #4f4e48;
  --status-good:    #0a8a0a;
  --status-crit:    #c22f2f;
  --status-dead:    #78776f;
  --link:           #1f6bcc;
  --beat:           #0b0b0a;
  --beat-glow:      rgba(11,11,10,0.35);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --page:           #0d0d0d;
    --surface-1:      #1a1a19;
    --surface-2:      #232322;
    --text-primary:   #ffffff;
    --text-secondary: #c3c2b7;
    --text-muted:     #898781;
    --hairline:       rgba(255,255,255,0.10);
    --grid:           #2c2c2a;
    --bar-track:      #2c2c2a;
    --series-1:       #3987e5;
    --series-1-soft:  rgba(57,135,229,0.22);
  --series-2:       #b8b6ac;
    --status-good:    #17b917;
    --status-crit:    #e05252;
    --status-dead:    #8a8a84;
    --link:           #5aa2f0;
    --beat:           #ffffff;
    --beat-glow:      rgba(255,255,255,0.70);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page:           #0d0d0d;
  --surface-1:      #1a1a19;
  --surface-2:      #232322;
  --text-primary:   #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted:     #898781;
  --hairline:       rgba(255,255,255,0.10);
  --grid:           #2c2c2a;
  --bar-track:      #2c2c2a;
  --series-1:       #3987e5;
  --series-1-soft:  rgba(57,135,229,0.22);
  --series-2:       #b8b6ac;
  --status-good:    #17b917;
  --status-crit:    #e05252;
  --status-dead:    #8a8a84;
  --link:           #5aa2f0;
  --beat:           #ffffff;
  --beat-glow:      rgba(255,255,255,0.70);
}

* { box-sizing: border-box; margin: 0; }
body {
  background: var(--page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  padding: 24px 16px 40px;
}
.wrap { max-width: 1080px; margin: 0 auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

header.top {
  display: grid; grid-template-columns: 1fr auto 1fr;
  align-items: center; gap: 16px;
  margin-bottom: 20px;
}
.topctl {
  grid-column: 3; justify-self: end;
  display: inline-flex; align-items: center; gap: 10px;
}
header.top .brand { font-size: 1.35rem; font-weight: 650; letter-spacing: -0.01em; line-height: 1; }
header.top .brand a { color: var(--text-primary); }
header.top .brand a:hover { text-decoration: none; }

.pagetitle {
  font-size: 1.0rem; font-weight: 650; line-height: 1.3;
  letter-spacing: -0.01em; margin-bottom: 12px;
}

.pagelead {
  color: var(--text-muted); font-size: 0.82rem; line-height: 1.5;
  margin-top: 18px;
}

.brand a { display: inline-flex; align-items: center; gap: 11px; }
.brand a:hover .wordmark { opacity: 0.85; }
.wire {
  width: 56px; height: auto; flex: none;
  color: var(--text-muted);
  overflow: visible;
}
.wire-strand { stroke: currentColor; }
.wire-spike  { stroke: var(--text-primary); }

.wire-trace {
  stroke: var(--beat); stroke-width: 2.4; opacity: 0;
  stroke-dasharray: 12 100; stroke-dashoffset: 12;
  filter: drop-shadow(0 0 3px var(--beat-glow));
}
@keyframes wire-beat {
  0%   { stroke-dashoffset:   12; opacity: 0; }
  6%   { opacity: 1; }
  92%  { opacity: 1; }
  100% { stroke-dashoffset: -100; opacity: 0; }
}
.wire.beat .wire-trace           { animation: wire-beat 1.5s linear 1; }
.brand a:hover .wire .wire-trace { animation: wire-beat 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .wire-trace { animation: none !important; }
}
.wordmark { transition: opacity .2s ease; }
.wordmark .s-scum {
  color: var(--text-primary); font-weight: 800; letter-spacing: 0.005em;
}
.wordmark .s-metrics { color: var(--text-muted); font-weight: 600; }
.spacer { flex: 1; }

#themeBtn, .langsel, .topbtn {
  border: 1px solid var(--hairline); background: var(--surface-1);
  color: var(--text-secondary); border-radius: 2px; padding: 5px 12px;
  font: inherit; font-size: 0.8rem; line-height: 1.5; cursor: pointer;
}
.langsel { padding: 5px 8px; }

.topbtn { display: inline-flex; align-items: center; gap: 7px; line-height: 1.5; }
.topbtn:hover { color: var(--text-primary); text-decoration: none; }
.topicon { width: 15px; height: 15px; flex: none; }

.listswitch {
  grid-column: 2; justify-self: center;
  display: inline-flex; gap: 6px;
}
.listswitch .seg {
  padding: 5px 14px; font-size: 0.8rem; line-height: 1.5;
  font-weight: 600; white-space: nowrap;
  border: 1px solid transparent; border-radius: 2px;
  color: var(--text-secondary);
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.listswitch .seg:hover {
  color: var(--text-primary); border-color: var(--hairline);
  text-decoration: none;
}
.listswitch .seg.on {
  background: var(--surface-2); border-color: var(--text-muted);
  color: var(--text-primary); cursor: default;
}

#themeBtn { display: inline-flex; align-items: center; gap: 7px; }
.themeicon { width: 15px; height: 15px; flex: none; display: none; }

.card {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.card h1,
.card h2 { font-size: 1.0rem; font-weight: 650; margin-bottom: 12px; }

.searchrow { display: flex; align-items: stretch; }
.searchfield { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; }
.searchicon {
  position: absolute; left: 12px; width: 16px; height: 16px;
  color: var(--text-muted); pointer-events: none; transition: color .12s ease;
}
.searchrow:focus-within .searchicon { color: var(--text-secondary); }
.searchfield input[type="search"] {
  flex: 1; width: 100%; min-width: 0;
  border: 1px solid var(--hairline); border-right: 0;
  border-radius: 2px 0 0 2px;
  background: var(--surface-2); color: var(--text-primary);
  font: inherit; font-size: 0.9rem; padding: 10px 34px 10px 36px;
}
.searchfield input[type="search"]:focus { outline: none; }

.searchfield input[type="search"]::-webkit-search-cancel-button { display: none; }
.searchrow:focus-within .searchfield input[type="search"],
.searchrow:focus-within .searchbtn { border-color: var(--text-muted); }
.clearbtn {
  position: absolute; right: 8px; width: 20px; height: 20px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: 0; border-radius: 999px; background: transparent;
  color: var(--text-muted); font: inherit; font-size: 0.95rem; line-height: 1;
  cursor: pointer;
}
.clearbtn:hover { background: var(--hairline); color: var(--text-primary); }
.clearbtn[hidden] { display: none; }
.searchbtn {
  flex: none;
  border: 1px solid var(--hairline); background: var(--surface-2);
  color: var(--text-primary); border-radius: 0 2px 2px 0; padding: 0 20px;
  font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.searchbtn:hover { border-color: var(--text-muted); background: var(--surface-1); }

.filterbody { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--hairline); }
.filterrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filterrow + .filterrow { margin-top: 9px; }
.filterlbl {
  flex: none; width: 68px;
  color: var(--text-muted); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.filterend { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.countrysel {
  border: 1px solid var(--hairline); background: var(--surface-2);
  color: var(--text-secondary); border-radius: 2px; padding: 6px 9px;
  font: inherit; font-size: 0.78rem; line-height: 1.25;
  cursor: pointer; max-width: 220px;
}
.countrysel:hover { border-color: var(--text-muted); }
.countrysel.active { color: var(--text-primary); border-color: var(--text-muted); font-weight: 600; }
.chip {
  border: 1px solid var(--hairline); background: transparent;
  color: var(--text-secondary); border-radius: 2px; padding: 6px 13px;
  font: inherit; font-size: 0.78rem; line-height: 1.25; cursor: pointer;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.chip:hover { border-color: var(--text-muted); color: var(--text-primary); }

.chip.active {
  background: var(--text-primary); border-color: var(--text-primary);
  color: var(--page); font-weight: 600;
}
.chip.active:hover { color: var(--page); opacity: 0.85; }
.resetbtn {
  border: 1px solid transparent; background: none; color: var(--link);
  border-radius: 2px; padding: 6px 4px; font: inherit; font-size: 0.78rem;
  font-weight: 600; cursor: pointer; white-space: nowrap;
}
.resetbtn:hover { text-decoration: underline; }
.resetbtn[hidden] { display: none; }
.resultinfo {
  color: var(--text-secondary); font-size: 0.8rem;
  margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--hairline);
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
}

.overviewgrid {
  display: grid; grid-template-columns: 1.618fr 1fr; gap: 16px;
  align-items: stretch; margin-bottom: 16px;
}
.overviewgrid .card { margin-bottom: 0; }
.searchcard { display: flex; flex-direction: column; }

.searchcard .filterbody { margin-bottom: auto; }
.searchcard .resultinfo { margin-top: 14px; padding-top: 13px; }

.spotcard { display: flex; flex-direction: column; visibility: hidden; }
.spotcard.on { visibility: visible; }
.spotcard[hidden] { display: none; }
.spothead {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  color: var(--text-muted); font-size: 0.72rem; font-weight: 600; margin-bottom: 10px;
}
.spotmore { color: var(--text-muted); }
.spotmore:hover { color: var(--text-primary); }

.spotlink {
  display: flex; flex: 1; align-items: center; justify-content: center;
  padding: 8px 0;
}
.spotlink img { display: block; max-width: 100%; height: auto; }
.spotfoot { margin-top: 12px; }

@supports selector(:has(*)) {
  .spotlink:focus-visible { outline: none; }
  .spotcard:has(.spotlink:focus-visible) {
    outline: 2px solid var(--link); outline-offset: -1px;
  }
}

.filtertoggle { display: none; }
.listbar { display: none; }
.linkbtn {
  background: none; border: none; color: var(--link); cursor: pointer;
  font: inherit; font-size: 0.8rem; padding: 6px 0 0; display: inline-block;
}
.linkbtn:hover { text-decoration: underline; }
.linkbtn:disabled { opacity: 0.5; cursor: default; text-decoration: none; }
td.loc { white-space: nowrap; }
td.loc .km { color: var(--text-secondary); font-size: 0.82rem; }

.tablewrap { overflow-x: auto; }

table.servers { width: 100%; border-collapse: collapse; font-size: 0.87rem; table-layout: fixed; }
table.servers { min-width: 720px; }

th[data-sort="rank"]     { width: 52px; }
th[data-sort="players"]  { width: 96px; }
th.colmode               { width: 72px; }
th[data-sort="address"]  { width: 168px; }

th[data-sort="location"] { width: 60px; }

:root[lang="en"] th[data-sort="location"] { width: 84px; }
th[data-sort="status"]   { width: 74px; }
table.servers th, table.servers td {
  text-align: left; padding: 9px 10px;
  border-bottom: 1px solid var(--grid);
  white-space: nowrap;
}

table.servers tbody td { height: 48px; padding-top: 4px; padding-bottom: 4px; }

table.servers th.colst, table.servers td.st { text-align: center; }
table.servers td.st { cursor: help; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.dot.online  { background: var(--status-good); }
.dot.offline { background: var(--status-crit); }
.dot.dead    { background: var(--status-dead); }

table.servers td.name a {
  display: block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
table.servers th.colloc, table.servers td.loc { text-align: center; }
table.servers th {
  color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase;
  letter-spacing: 0.04em; user-select: none;
}
table.servers th.sortable { cursor: pointer; }
table.servers th.sorted { color: var(--text-primary); }
table.servers tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; }
.addr { color: var(--text-muted); font-family: ui-monospace, Consolas, monospace; font-size: 0.8rem; }
.muted { color: var(--text-muted); }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; font-weight: 600; border-radius: 2px;
  padding: 3px 10px; border: 1px solid var(--hairline);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.badge.online  { color: var(--status-good); } .badge.online::before  { background: var(--status-good); }
.badge.offline { color: var(--status-crit); } .badge.offline::before { background: var(--status-crit); }
.badge.dead    { color: var(--status-dead); } .badge.dead::before    { background: var(--status-dead); }

.limited {
  display: inline-block; font-size: 0.7rem; font-weight: 600; white-space: nowrap;
  color: var(--text-muted); border: 1px solid var(--hairline);
  border-radius: 2px; padding: 1px 7px; opacity: 0.85; cursor: help;
}

.minibar {
  width: 70px; height: 5px; border-radius: 1px; background: var(--bar-track);
  display: inline-block; vertical-align: middle; overflow: hidden; margin-left: 8px;
}
.minibar > i { display: block; height: 100%; background: var(--series-1); border-radius: 1px; }

.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 14px; }
.pager button {
  border: 1px solid var(--hairline); background: var(--surface-1);
  color: var(--text-primary); border-radius: 2px; padding: 6px 16px;
  font: inherit; font-size: 0.85rem; cursor: pointer;
}
.pager button:disabled { opacity: 0.4; cursor: default; }
.pager .pinfo { color: var(--text-muted); font-size: 0.82rem; }

.profilehead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.profilehead h1,
.profilehead h2 { font-size: 1.15rem; font-weight: 650; line-height: 1.35; }

.hero { padding: 20px 22px; }
.herotop {
  display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.herotitle { min-width: 0; flex: 1; }
.hero h1 {
  font-size: 1.7rem; font-weight: 700; line-height: 1.2;
  letter-spacing: -0.015em; margin: 0 0 10px;
}
.herometa { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.herometa .addr { font-size: 0.85rem; }
.hero .wgbtn { flex: none; margin-left: auto; }

.kpigrid { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); }
.kpi { background: var(--surface-2); border-radius: 6px; padding: 13px 15px; }
.kpi .lbl {
  color: var(--text-muted); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.kpi .val {
  font-size: 1.7rem; font-weight: 700; line-height: 1.1; margin-top: 4px;
  letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.kpi .val small { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.kpi.good .val { color: var(--status-good); }
.kpi .kbar { height: 5px; border-radius: 1px; background: var(--bar-track); overflow: hidden; margin-top: 9px; }
.kpi .kbar > i { display: block; height: 100%; background: var(--series-1); }
.kpi .sub { color: var(--text-muted); font-size: 0.74rem; margin-top: 8px; min-height: 1em; }

.subgrid { display: grid; gap: 12px; grid-template-columns: repeat(4, 1fr); margin-top: 12px; }
.subtile {
  background: var(--surface-2); border-radius: 6px; padding: 8px 14px;
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.subtile .lbl {
  color: var(--text-muted); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; flex: none;
}
.subtile .val {
  font-size: 0.92rem; font-weight: 600; font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.midrow {
  display: grid; grid-template-columns: minmax(240px, 0.85fr) 1.5fr;
  gap: 16px; align-items: stretch; margin-bottom: 16px;
}
.midrow .card { margin-bottom: 0; display: flex; flex-direction: column; }
.midrow .chartpanel { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.detailgrid {
  display: grid; grid-template-columns: max-content 1fr; gap: 11px 18px;
  font-size: 0.9rem; align-items: baseline;
}
.detailgrid dt { color: var(--text-muted); }
.detailgrid dd { color: var(--text-primary); margin: 0; }

@media (max-width: 720px) {
  .kpigrid { grid-template-columns: repeat(2, 1fr); }
  .subgrid { grid-template-columns: repeat(2, 1fr); }
  .midrow  { grid-template-columns: 1fr; }
}

.rangebtns { display: flex; gap: 6px; margin-left: auto; }
.rangebtns button {
  border: 1px solid var(--hairline); background: var(--surface-2);
  color: var(--text-secondary); border-radius: 2px; padding: 4px 12px;
  font: inherit; font-size: 0.78rem; cursor: pointer;
}
.rangebtns button.active { background: var(--series-1); border-color: var(--series-1); color: #fff; }
.charthead { display: flex; align-items: center; margin-bottom: 10px; }
.charthead h2 { font-size: 0.95rem; margin: 0; }
.chartbox { position: relative; }
.chartbox svg { display: block; width: 100%; height: auto; }
.tooltip {
  position: absolute; pointer-events: none; display: none;
  background: var(--surface-1); border: 1px solid var(--hairline);
  border-radius: 2px; padding: 6px 10px; font-size: 0.78rem;
  color: var(--text-primary); box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  white-space: nowrap; z-index: 5;
}

.statsgrid { display: grid; gap: 20px 28px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .statsgrid { grid-template-columns: 1fr 1fr; } }
.chartpanel { min-width: 0; }
.rangebtns button:disabled { opacity: 0.4; cursor: default; }

.flag { font-size: 1.1em; line-height: 1; }
.ok { color: var(--status-good); font-weight: 600; }
.dtlist {
  margin-top: 8px; font-size: 0.8rem; color: var(--text-secondary);
  display: grid; gap: 3px; font-family: ui-monospace, Consolas, monospace;
}

.grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.tile {
  background: var(--surface-1);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.tile h2 { font-size: 0.95rem; font-weight: 600; line-height: 1.35; min-height: 2.6em; }
.statusrow { display: flex; align-items: center; gap: 8px; font-size: 0.8rem; }
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.status-online  .dot { background: var(--status-good); }
.status-offline .dot { background: var(--status-crit); }
.status-online  .statuslabel { color: var(--status-good); font-weight: 600; }
.status-offline .statuslabel { color: var(--status-crit); font-weight: 600; }
.statusrow .addr { margin-left: auto; }
.players { display: flex; align-items: baseline; gap: 6px; }
.players .n { font-size: 2.1rem; font-weight: 650; line-height: 1; }
.players .of { color: var(--text-muted); font-size: 0.95rem; }
.bar { height: 6px; border-radius: 1px; background: var(--bar-track); overflow: hidden; }
.bar > i {
  display: block; height: 100%; border-radius: 1px;
  background: var(--series-1); transition: width .6s ease;
}
.meta { display: flex; gap: 16px; color: var(--text-secondary); font-size: 0.82rem; }
.meta b { font-weight: 600; color: var(--text-primary); }
.offlinehint { color: var(--text-secondary); font-size: 0.82rem; }

footer.bottom {
  margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--grid);
  color: var(--text-muted); font-size: 0.78rem;
  display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline;
}

.footlink { margin-left: auto; color: var(--text-secondary); font-weight: 600; }
.footlink:hover { color: var(--text-primary); }

.legal { display: inline-flex; align-items: baseline; gap: 8px; }
.legal a { color: var(--text-secondary); font-weight: 600; }
.legal a:hover { color: var(--text-primary); }
.legal .sep { color: var(--text-muted); }

.exclmeta  { color: var(--text-muted); font-size: 0.78rem; margin-bottom: 14px; }
.namelist {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.namelist li {
  padding: 8px 10px; border-bottom: 1px solid var(--grid);
  font-size: 0.85rem; color: var(--text-primary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#err {
  display: none; margin-bottom: 16px; padding: 10px 14px;
  border: 1px solid var(--status-crit); border-radius: 2px;
  color: var(--status-crit); font-size: 0.85rem; background: var(--surface-1);
}

.doc { line-height: 1.55; }
.doc h3 {
  font-size: 0.95rem; font-weight: 650; color: var(--text-primary);
  margin: 28px 0 8px; padding-top: 14px; border-top: 1px solid var(--grid);
}
.doc h3:first-of-type { border-top: 0; padding-top: 0; }
.doc p { font-size: 0.85rem; color: var(--text-secondary); margin: 0 0 12px; }
.doc p.lead { font-size: 0.95rem; color: var(--text-primary); }
.doc p.note { font-size: 0.8rem; color: var(--text-muted); }
.doc pre {
  margin: 0 0 14px; padding: 12px 14px; background: var(--surface-2);
  border: 1px solid var(--grid); border-radius: 2px;

  overflow-x: auto;
}
.doc pre code {
  font-family: ui-monospace, Consolas, monospace; font-size: 0.78rem;
  color: var(--text-primary); white-space: pre; tab-size: 2;
}
.doc pre.req code { font-size: 0.85rem; font-weight: 600; }
.doc pre .cmt { color: var(--text-muted); }
.doc pre .host { color: var(--series-1); }
.doc td code, .doc p code, .doc li code {
  font-family: ui-monospace, Consolas, monospace; font-size: 0.78rem;
  color: var(--text-primary); background: var(--surface-2);
  padding: 1px 4px; border-radius: 2px;
}

.doc .postaddr {
  font-style: normal; font-size: 0.85rem; line-height: 1.6;
  color: var(--text-primary); margin: 0 0 14px;
}
.doclist { margin: 0 0 14px; padding-left: 18px; }
.doclist li {
  font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 6px;
}
.doctable { width: 100%; border-collapse: collapse; margin: 0 0 14px; }
.doctable th {
  text-align: left; font-size: 0.7rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
  padding: 6px 10px 6px 0; border-bottom: 1px solid var(--hairline);
}
.doctable td {
  font-size: 0.82rem; color: var(--text-secondary); vertical-align: top;
  padding: 8px 10px 8px 0; border-bottom: 1px solid var(--grid);
}
.doctable td:first-child { white-space: nowrap; }

.doctable td:last-child, .doctable th:last-child { padding-right: 0; }

.servers th:first-child, .servers td:first-child { padding-right: 12px; }
.servers td.mode { white-space: nowrap; }
.modetag {
  display: inline-block; padding: 1px 7px; border-radius: 2px;
  background: var(--surface-2); border: 1px solid var(--grid);
  font-size: 0.72rem; color: var(--text-secondary);

  cursor: help;
}

.offbadge {
  display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 2px;
  background: var(--series-1-soft); color: var(--series-1);
  font-size: 0.68rem; font-weight: 600; white-space: nowrap; cursor: help;
  vertical-align: middle;
}

.deoutside h2 { font-size: 0.95rem; font-weight: 650; margin-bottom: 6px; }
.deo-intro {
  font-size: 0.8rem; color: var(--text-muted); margin: 0 0 12px;
}
.deo-list { list-style: none; margin: 0 0 10px; padding: 0; }
.deo-list li {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 0; border-bottom: 1px solid var(--grid); font-size: 0.85rem;
}
.deo-list li a {
  color: var(--link); text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.deo-list li a:hover { text-decoration: underline; }
.deo-meta {
  margin-left: auto; color: var(--text-muted); font-size: 0.78rem; white-space: nowrap;
}
.deo-more {
  display: inline-block; font-size: 0.8rem; color: var(--link); text-decoration: none;
}
.deo-more:hover { text-decoration: underline; }

@media (max-width: 720px) {

  body { padding: 16px 12px 28px; }
  .card { padding: 13px 13px; margin-bottom: 12px; }

  header.top { gap: 10px; margin-bottom: 14px; grid-template-columns: 1fr auto; }
  header.top .brand { font-size: 1.15rem; }
  .topctl { grid-column: 2; }
  .listswitch { grid-column: 1 / -1; grid-row: 2; }
  .brand a { gap: 8px; }
  .wire { width: 42px; }

  #themeBtn .btnlabel { display: none; }
  #themeBtn { padding: 5px 9px; }
  .themeicon { display: block; }

  .topbtn .btnlabel { display: none; }
  .topbtn { padding: 5px 9px; }

  .spotcard { display: none; }
  .overviewgrid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }

  .filtertoggle {
    display: flex; align-items: center; gap: 8px;
    width: 100%; margin-top: 10px; padding: 9px 12px;
    border: 1px solid var(--hairline); border-radius: 2px;
    background: var(--surface-2); color: var(--text-secondary);
    font: inherit; font-size: 0.85rem; font-weight: 600; cursor: pointer;
  }
  .filterchevron { margin-left: auto; transition: transform .15s ease; }
  .filtertoggle[aria-expanded="true"] .filterchevron { transform: rotate(180deg); }

  .filtercount {
    background: var(--text-secondary); color: var(--surface-1);
    border-radius: 999px; min-width: 19px; padding: 0 6px;
    font-size: 0.72rem; line-height: 19px; text-align: center;
  }

  .filterbody { display: none; margin-top: 0; padding-top: 0; border-top: 0; }
  .filterbody.open { display: block; }
  .countrysel { max-width: none; width: 100%; }

  .filterrow { flex-direction: column; align-items: stretch; gap: 6px; }
  .filterrow + .filterrow { margin-top: 12px; }
  .filterrow:first-child { margin-top: 10px; }
  .filterlbl { width: auto; }
  .filterend { margin-left: 0; flex-direction: column; align-items: stretch; }
  .resetbtn { text-align: left; padding-left: 0; }

  .chip { padding: 8px 13px; font-size: 0.8rem; }

  .listbar { display: flex; align-items: center; gap: 9px; margin-bottom: 6px; }
  .sortlbl { color: var(--text-muted); font-size: 0.78rem; font-weight: 600; flex: none; }
  .sortsel {
    flex: 1; min-width: 0;
    border: 1px solid var(--hairline); background: var(--surface-2);
    color: var(--text-secondary); border-radius: 2px; padding: 7px 9px;
    font: inherit; font-size: 0.82rem; cursor: pointer;
  }

  .tablewrap { overflow-x: visible; }
  table.servers {
    min-width: 0; table-layout: auto; display: block; font-size: 0.88rem;
  }
  table.servers thead { display: none; }
  table.servers tbody { display: block; }
  table.servers tbody tr {
    display: grid;
    grid-template-columns: 2.5rem minmax(0, 1fr) auto auto;
    grid-template-areas:
      "rank name name st"
      "rank play mode loc";
    align-items: center;
    column-gap: 10px; row-gap: 3px;
    padding: 11px 2px;
    border-bottom: 1px solid var(--grid);
  }

  table.servers tbody td {
    height: auto; padding: 0; border: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  table.servers tbody td.num:first-child {
    grid-area: rank; text-align: left;
    font-size: 1.0rem; font-variant-numeric: tabular-nums;
  }
  table.servers tbody td.name { grid-area: name; font-size: 0.92rem; }
  table.servers tbody td.st   { grid-area: st;   text-align: right; }
  table.servers tbody td.num:nth-child(3) {
    grid-area: play; text-align: left; color: var(--text-secondary);
  }
  table.servers tbody td.mode { grid-area: mode; text-align: right; }
  table.servers tbody td.loc  { grid-area: loc;  text-align: right; }

  table.servers tbody td.addr { display: none; }

  table.servers tbody td[colspan] { grid-column: 1 / -1; text-align: center; padding: 16px 0; }

  .pager { margin-top: 12px; }
  .pager button { padding: 9px 18px; }
}

.wgfor { font-weight: 400; color: var(--text-muted); margin-left: 8px; }
.wgintro { color: var(--text-secondary); }

.wglayout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.wgside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
@media (max-width: 960px) {
  .wglayout { grid-template-columns: 1fr; }
  .wgside { position: static; order: -1; }
}

.wgset { border: 0; border-top: 1px solid var(--hairline); padding: 14px 0 4px; margin: 0; }
.wgctl .wgset:first-of-type { border-top: 0; padding-top: 0; }
.wgset legend { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-muted); padding: 0 0 8px; }

.wgrow { display: grid; grid-template-columns: 11rem 1fr auto; align-items: center;
  gap: 10px; padding: 5px 0; font-size: 0.92rem; }
.wgrow > span:first-child { color: var(--text-secondary); }
.wgrow output { font-variant-numeric: tabular-nums; color: var(--text-muted);
  min-width: 4.5rem; text-align: right; font-size: 0.85rem; }
.wgrow select { width: 100%; }
.wgrow input[type="range"] { width: 100%; }
.wghint { color: var(--text-muted); font-size: 0.82rem; line-height: 1.45;
  margin: 4px 0 2px; }

.wgkinds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.wgkinds button { display: flex; flex-direction: column; gap: 3px; text-align: left;
  padding: 9px 11px; border: 1px solid var(--hairline); border-radius: 8px;
  background: var(--surface-2); color: var(--text-primary); cursor: pointer;
  font: inherit; font-size: 0.9rem; }
.wgkinds button small { color: var(--text-muted); font-size: 0.76rem; line-height: 1.3; }
.wgkinds button:hover { border-color: var(--text-muted); }
.wgkinds button.active { background: var(--text-primary); color: var(--page);
  border-color: var(--text-primary); }
.wgkinds button.active small { color: var(--page); opacity: 0.75; }

.wgcolor input[type="color"] { width: 100%; height: 26px; padding: 0;
  border: 1px solid var(--hairline); border-radius: 5px; background: none; cursor: pointer; }
.wgcolor input[type="color"]:disabled { opacity: 0.35; cursor: default; }

.wgreset { visibility: hidden; width: 22px; height: 22px; line-height: 1;
  border: 1px solid var(--hairline); border-radius: 5px; background: var(--surface-2);
  color: var(--text-muted); cursor: pointer; font-size: 0.9rem; padding: 0; }
.wgcolor.on .wgreset { visibility: visible; }
.wgreset:hover { color: var(--text-primary); border-color: var(--text-muted); }

.wgchecks { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 2px 12px; }
.wgcheck { display: flex; align-items: center; gap: 8px; padding: 5px 0;
  font-size: 0.92rem; color: var(--text-secondary); cursor: pointer; }
.wgcheck.off { opacity: 0.45; cursor: default; }
.wgcheck input { flex: none; }

.wgpreviews { display: flex; flex-wrap: wrap; gap: 12px; }
.wgpane { margin: 0; flex: 1 1 auto; min-width: 0; border: 1px solid var(--hairline);
  border-radius: 8px; padding: 14px; display: flex; flex-direction: column;
  align-items: center; gap: 8px; overflow-x: auto; }
.wgpane.light { background: #e6e4dc; }
.wgpane.dark { background: #0d0d0d; }
.wgpane img { display: block; max-width: 100%; height: auto; }
.wgpane figcaption { font-size: 0.76rem; letter-spacing: 0.03em; text-transform: uppercase; }
.wgpane.light figcaption { color: #6f6e66; }
.wgpane.dark figcaption { color: #898781; }

.wgtabs { margin-bottom: 10px; }
.wgcode { width: 100%; resize: vertical; font-family: ui-monospace, SFMono-Regular,
  Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.5; padding: 10px 11px;
  border: 1px solid var(--hairline); border-radius: 8px; background: var(--surface-2);
  color: var(--text-primary); }
.wgcopyrow { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.wgcopyrow .wghint { margin: 0; }

.profilehead .wgbtn { margin-left: auto; }
