:root {
  --bg: #11141b;
  --panel: #181c25;
  --panel-2: #1f2430;
  --line: #2a3142;
  --text: #eef1f6;
  --muted: #98a1b3;
  --accent: #2f7bd6;
  --accent-ink: #ffffff;
  --link: #6aa9ee;
  --ok: #57f287;
  --bad: #f2565b;
  --radius: 14px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f5f9;
    --panel: #ffffff;
    --panel-2: #eef1f6;
    --line: #d9dfe8;
    --text: #1b2230;
    --muted: #5b6577;
    --accent: #1565c0;
    --link: #1565c0;
    --bad: #c62828;
    --ok: #1e8e3e;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--link); }
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }

.top {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 1.1rem;
  padding: 1rem clamp(16px, 2vw, 40px);
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.15rem; color: var(--text); text-decoration: none; }
.brand img { height: 38px; width: auto; display: block; }
#account { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.who { display: flex; align-items: center; gap: 0.5rem; min-width: 0; color: var(--muted); font-size: 0.95rem; }
.who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14ch; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--panel-2); object-fit: cover; flex: none; }

main { max-width: 960px; margin: 0 auto; padding: 1.5rem 16px 4rem; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.15; margin: 0 0 0.5rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.25rem; display: flex; align-items: center; gap: 0.5rem; }
h2 .i { color: var(--accent); }
.lead { color: var(--muted); margin: 0 0 1.5rem; max-width: 60ch; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 44px; padding: 0.55rem 1.1rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, .card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 36px; padding: 0.3rem 0.8rem; font-size: 0.9rem; }

.hero { padding: 3rem 0 1rem; }
.features { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 2.5rem; }
.feature, .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.feature p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.95rem; }

.grid { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.card {
  display: flex; align-items: center; gap: 0.9rem; padding: 0.9rem 1rem; text-decoration: none; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.card:hover { border-color: var(--accent); }
.card .icon { width: 48px; height: 48px; border-radius: 12px; background: var(--panel-2); object-fit: cover; display: grid; place-items: center; font-weight: 700; color: var(--muted); flex: none; }
.card .meta { min-width: 0; }
.card .name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 600; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); }

.crumbs { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1rem; }
.title-row { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 1.25rem; }
.title-row .icon { width: 56px; height: 56px; border-radius: 14px; }

.layout { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .layout { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: start; } .sticky { position: sticky; top: 1rem; } }
.stack { display: grid; gap: 1rem; }

.field { display: grid; gap: 0.35rem; margin-top: 0.9rem; }
.field > label, .field > .label { font-weight: 600; font-size: 0.95rem; }
.hint { color: var(--muted); font-size: 0.85rem; }
input[type="text"], select, textarea {
  width: 100%; min-height: 44px; padding: 0.55rem 0.75rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--text); font: inherit;
}
textarea { min-height: 96px; resize: vertical; }
input[type="number"] { width: 7rem; min-height: 44px; padding: 0.55rem 0.75rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
input[type="color"] { width: 56px; height: 44px; padding: 3px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; }
.row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

.preview { background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 0.8rem 1rem; display: grid; grid-template-columns: 1fr auto; gap: 0.2rem 0.75rem; }
.preview .p-title { font-weight: 700; }
.preview .p-body { grid-column: 1; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview .p-foot { grid-column: 1 / -1; color: var(--muted); font-size: 0.8rem; margin-top: 0.4rem; }
.preview .p-thumb { grid-column: 2; grid-row: 1 / span 2; width: 56px; height: 56px; border-radius: 10px; background: var(--line); object-fit: cover; }
.preview-wrap { display: grid; gap: 0.5rem; }
.preview-wrap .p-content { white-space: pre-wrap; overflow-wrap: anywhere; }
.preview .p-author { grid-column: 1 / -1; font-size: 0.85rem; font-weight: 600; }
.preview .p-link { color: var(--accent); text-decoration: underline; }
.preview .p-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0.5rem 0.75rem; margin-top: 0.4rem; }
.preview .p-field.wide { grid-column: 1 / -1; }
.preview .p-field b { display: block; font-size: 0.85rem; }
.preview .p-field span { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9rem; }
.preview .p-image { grid-column: 1 / -1; height: 110px; border-radius: 8px; background: var(--line); display: grid; place-items: center; color: var(--muted); font-size: 0.8rem; margin-top: 0.4rem; }
.p-buttons { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.p-button { border: 1px solid var(--line); border-radius: 8px; padding: 0.3rem 0.7rem; font-size: 0.85rem; background: var(--panel-2); }

.bar { position: sticky; bottom: 0; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; padding: 0.8rem 0; margin-top: 1rem; background: linear-gradient(transparent, var(--bg) 35%); }
.status { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.95rem; }
.status.ok { color: var(--ok); }
.status.bad { color: var(--bad); }
.notice { display: flex; gap: 0.6rem; align-items: flex-start; padding: 0.9rem 1rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.notice .i { color: var(--accent); margin-top: 0.15rem; }

@media (prefers-reduced-motion: no-preference) {
  .card, .btn { transition: border-color 0.12s, filter 0.12s; }
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.shell { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .shell { grid-template-columns: 220px minmax(0, 1fr); align-items: start; } }
.side { display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 0.25rem; }
@media (min-width: 820px) { .side { flex-direction: column; overflow: visible; position: sticky; top: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.6rem; } }
.side a { display: flex; align-items: center; gap: 0.6rem; min-height: 42px; padding: 0.5rem 0.8rem; border-radius: 10px; color: var(--muted); text-decoration: none; font-weight: 600; white-space: nowrap; }
.side a:hover { background: var(--panel-2); color: var(--text); }
.side a.active { background: var(--accent); color: var(--accent-ink); }
.side-back { font-weight: 500 !important; }
.side button.side-toggle { display: flex; align-items: center; gap: 0.6rem; min-height: 42px; padding: 0.5rem 0.8rem; border: 0; border-radius: 10px; background: none; color: var(--muted); font: inherit; font-weight: 600; text-align: left; cursor: pointer; white-space: nowrap; }
.side button.side-toggle:hover { background: var(--panel-2); color: var(--text); }
.side-toggle .i:last-child { margin-left: auto; transition: transform 0.15s; }
.side-toggle.open .i:last-child { transform: rotate(90deg); }
.side-sub { display: none; }
.side-sub.open { display: flex; flex-direction: column; }
.side a.sub { min-height: 36px; padding-left: 2.6rem; font-weight: 500; font-size: 0.93rem; }
/* on a phone the buttons are one row that scrolls sideways, so the module list is simply part of that row */
@media (max-width: 819px) { .side-toggle { display: none !important; } .side-sub { display: contents; } .side a.sub { padding-left: 0.8rem; } }
.status-list { display: grid; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; min-height: 46px; padding: 0.4rem 1rem; color: var(--text); text-decoration: none; font-weight: 600; }
.status-row + .status-row { border-top: 1px solid var(--line); }
.status-row:hover { background: var(--panel-2); }
.status-name { display: flex; align-items: center; gap: 0.6rem; }
.log-stack { display: grid; gap: 0.5rem; }
.perm-use { font-weight: 400; }
@media (min-width: 820px) { .side-back { border-bottom: 1px solid var(--line); border-radius: 0 !important; margin-bottom: 0.35rem; } }
.content { min-width: 0; display: grid; gap: 1rem; }
.content > .title-row { margin-bottom: 0; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0; border-top: 1px solid var(--line); cursor: pointer; }
.panel > .toggle-row:first-of-type { border-top: 0; }
.toggle-text { display: grid; gap: 0.1rem; min-width: 0; }
.toggle-label { font-weight: 600; }
input.sw { appearance: none; -webkit-appearance: none; flex: none; box-sizing: border-box; display: block; min-height: 0; padding: 0; margin: 0; width: 46px; height: 26px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); position: relative; cursor: pointer; transition: background 0.15s; }
input.sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--muted); transition: transform 0.15s, background 0.15s; }
input.sw:checked { background: var(--accent); border-color: var(--accent); }
input.sw:checked::after { transform: translateX(20px); background: var(--accent-ink); }
input.sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.checks { border: 0; padding: 0; margin-inline: 0; min-width: 0; }
.check-grid { display: grid; gap: 0.25rem 1rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); margin-top: 0.4rem; }
.check { display: flex; align-items: center; gap: 0.5rem; min-height: 36px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.stats { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1.1rem; }
.stat-n { font-size: 1.8rem; font-weight: 700; line-height: 1.1; }
.modules { display: grid; gap: 0.9rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.module { display: grid; gap: 0.4rem; align-content: start; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; text-decoration: none; color: var(--text); }
.module:hover { border-color: var(--accent); }
.module p { margin: 0; }
.module-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.module .link { color: var(--link); font-weight: 600; font-size: 0.9rem; }
.pill { font-size: 0.75rem; font-weight: 600; padding: 0.1rem 0.55rem; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill.on { color: var(--ok); border-color: var(--ok); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .pill.on { color: #1b7f3b; border-color: #1b7f3b; } :root:not([data-theme="dark"]) .status.ok { color: #1b7f3b; } }
.bar[hidden] { display: none; }

.topnav { display: flex; align-items: center; gap: 0.15rem; order: 2; }
.topnav a { padding: 0.5rem 0.75rem; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.topnav a:hover { background: var(--panel-2); }
.topnav a[aria-current="page"] { color: var(--link); }
.free-badge { order: 3; padding: 0.3rem 0.8rem; border-radius: 8px; background: #f5b82e; color: #231a00; font-weight: 700; font-size: 0.85rem; white-space: nowrap; }
#account { order: 4; margin-left: auto; }
.brand { order: 1; }
@media (max-width: 760px) {
  .free-badge { display: none; }
  .topnav { order: 5; width: 100%; overflow-x: auto; margin-left: -0.7rem; }
  #account .btn:not(.primary):not(.ghost) { display: none; }
}

.btn.big { min-height: 52px; padding: 0.7rem 1.5rem; font-size: 1.05rem; border-radius: 10px; }
.btn.accent { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.btn.accent:hover { border-color: var(--link); }

.hero-wrap { position: relative; margin: 0 calc(50% - 50vw); padding: 4rem max(16px, calc(50vw - 480px)) 3rem; overflow: hidden; }
.arcs { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--line); pointer-events: none; z-index: 0; }
.hero-grid { position: relative; z-index: 1; display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); } }
.hero-text h1 { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.12; margin: 0 0 1.1rem; }
.hero-text .lead { font-size: 1.05rem; margin-bottom: 1.1rem; }
.hero-stats { color: var(--muted); margin: 0 0 1.5rem; max-width: 52ch; }
.hero-stats strong { color: #22d3ee; font-size: 1.1em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-art { display: grid; place-items: center; }

.hero-shot { display: block; width: 100%; max-width: 600px; height: auto; filter: drop-shadow(0 20px 36px rgba(0, 0, 0, 0.35)); }

.platform { padding: 2rem 0 1rem; }
.platform-head { display: grid; gap: 0.6rem; justify-items: start; margin-bottom: 1.5rem; }
.platform-head h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); display: block; margin: 0; }
.platform-head .lead { margin: 0; }
.features { margin-top: 0; }
.feature { display: grid; gap: 0.4rem; align-content: start; }
.feature h3 { margin: 0.2rem 0 0; font-size: 1.1rem; }
.feature p { margin: 0; }
.feature-icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--panel-2); color: var(--link); border: 1px solid var(--line); }
.feature-icon .i { width: 1.3em; height: 1.3em; }
.cta { margin-top: 3rem; padding: 2rem 1.5rem; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); display: grid; gap: 1rem; justify-items: center; }
.cta h2 { display: block; font-size: 1.5rem; margin: 0; }
.cta .hero-actions { justify-content: center; }
.foot { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; margin-top: 3rem; padding-top: 1.25rem; border-top: 1px solid var(--line); font-size: 0.9rem; }
.mark { height: 44px; width: auto; }

.page-head { margin-bottom: 1.25rem; }
.page-head .lead { margin-bottom: 0; }
.cmd-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-bottom: 1.25rem; }
.cmd-tools input { flex: 1 1 260px; max-width: 420px; min-height: 44px; padding: 0.55rem 0.75rem; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; }
.cmd-tools .chips { flex-basis: 100%; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip { min-height: 36px; padding: 0.3rem 0.85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.chip:hover { color: var(--text); }
.chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip:focus-visible, .cs-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.callout { border-left: 4px solid var(--accent); background: var(--panel); border-radius: 0 12px 12px 0; padding: 0.8rem 1.1rem; margin-top: 0.75rem; }
.callout p { margin: 0; color: var(--muted); }

.docs { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1040px) { .docs { grid-template-columns: minmax(0, 1fr) 200px; } }
.docs-side { display: none; }
@media (min-width: 1040px) { .docs-side { display: block; } }
.toc { position: sticky; top: 1rem; display: grid; gap: 0.15rem; border-left: 1px solid var(--line); padding-left: 1rem; }
.toc h3 { margin: 0 0 0.4rem; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.toc a { color: var(--muted); text-decoration: none; font-size: 0.92rem; padding: 0.2rem 0; }
.toc a:hover { color: var(--link); }

.cmd-group { margin-bottom: 1.5rem; scroll-margin-top: 1rem; }
.cs-heading { display: flex; align-items: center; gap: 0.5rem; font-size: 1.35rem; margin: 0 0 0.7rem; }
.cs-heading .count { font-size: 0.75rem; font-weight: 700; color: var(--muted); background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 0.05rem 0.55rem; }
.cs-toggle { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--link); cursor: pointer; padding: 0; }
.cs-toggle:hover { border-color: var(--link); }
.cs-toggle .i { transition: transform 0.15s; }
.cs-toggle[aria-expanded="false"] .i { transform: rotate(-90deg); }

.cmd-grid { display: grid; gap: 0.55rem; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
/* A card is a link, but reads as a card: no underline, normal text colour */
.cmd { display: grid; gap: 0.3rem; align-content: start; min-width: 0; padding: 0.75rem 0.9rem; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none; transition: border-color 0.12s, background 0.12s; }
.cmd:hover { border-color: var(--link); background: var(--panel-2); }
.cmd:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cmd-top { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-width: 0; }
.cmd code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.cmd-name { font-weight: 700; font-size: 1rem; color: var(--link); }
.cmd-desc { color: var(--text); font-size: 0.92rem; line-height: 1.4; overflow-wrap: anywhere; }
.cmd-usage { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8rem; color: var(--muted); }
.cmd .badge { flex: none; }
.badge.staff { color: var(--link); border-color: color-mix(in srgb, var(--link) 40%, var(--line)); }
.usage { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.usage code { display: inline-block; padding: 0.3rem 0.6rem; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); overflow-wrap: anywhere; }

.status-card { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); margin-bottom: 1rem; }
.status-card .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--bad); flex: none; }
.status-card.up .dot { background: var(--ok); box-shadow: 0 0 0 5px rgba(87, 242, 135, 0.18); }

body { overflow-x: hidden; }

.platform-head { justify-items: center; text-align: center; }
.platform-head .lead { margin-inline: auto; }

.prose { max-width: 720px; margin: 1.5rem auto 0; }
.prose h1 { margin-bottom: 0.4rem; }
.prose section { margin-top: 1.75rem; }
.prose h2 { display: block; font-size: 1.2rem; margin-bottom: 0.4rem; }
.prose p, .prose li { color: var(--muted); line-height: 1.65; }
.prose p { margin: 0 0 0.75rem; }
.prose ul { margin: 0 0 0.75rem; padding-left: 1.25rem; display: grid; gap: 0.4rem; }
.prose ol { padding-left: 1.25rem; }

.site-foot { margin-top: 3rem; padding: 2.5rem clamp(16px, 2vw, 40px) 1.25rem; background: var(--panel); border-top: 1px solid var(--line); }
.foot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 2rem 4rem; }
.foot-brand { display: grid; gap: 0.6rem; justify-items: start; }
.foot-brand img { height: 36px; width: auto; display: block; }
.foot-brand p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.foot-cols { display: flex; flex-wrap: wrap; gap: 2rem 4.5rem; }
.foot-col { display: grid; gap: 0.6rem; align-content: start; min-width: 9rem; }
.site-foot h3 { margin: 0 0 0.2rem; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); }
.foot-col a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.foot-col a:hover { color: var(--link); }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem 1.5rem; margin-top: 2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1 0 auto; width: 100%; }
.site-foot { flex: none; }


/* Loader: three pulsing dots. From Uiverse.io by adamgiebl */
.dots-container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  width: 100%;
}
.dots-container.loading { min-height: 40vh; }
.dots-container .dot {
  height: 20px;
  width: 20px;
  margin-right: 10px;
  border-radius: 10px;
  background-color: #b3d4fc;
  animation: pulse 1.5s infinite ease-in-out;
}
.dots-container .dot:last-child { margin-right: 0; }
.dots-container .dot:nth-child(1) { animation-delay: -0.3s; }
.dots-container .dot:nth-child(2) { animation-delay: -0.1s; }
.dots-container .dot:nth-child(3) { animation-delay: 0.1s; }
@keyframes pulse {
  0% { transform: scale(0.8); background-color: #b3d4fc; box-shadow: 0 0 0 0 rgba(178, 212, 252, 0.7); }
  50% { transform: scale(1.2); background-color: #6793fb; box-shadow: 0 0 0 10px rgba(178, 212, 252, 0); }
  100% { transform: scale(0.8); background-color: #b3d4fc; box-shadow: 0 0 0 0 rgba(178, 212, 252, 0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .dots-container .dot { animation: none; }
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .dots-container .dot { background-color: #7aa7e8; }
}

.rows { display: grid; gap: 0.6rem; margin: 0.6rem 0; }
.row-item { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.row-item .grow { flex: 1 1 180px; min-width: 0; }
.row-item .tag-opts { flex: 1 1 100%; margin-top: 0; padding-top: 0.4rem; border-top: 1px solid var(--line); }
.row-item select, .row-item input[type="text"] { width: auto; flex: 1 1 150px; min-height: 40px; }
.row-item.wide { align-items: flex-start; }
.row-item select[multiple] { min-height: 0; }
.row-item.wide textarea { flex: 1 1 100%; min-height: 72px; width: 100%; }
.num { width: 6.5rem; min-height: 40px; }
.short { max-width: 8rem; }
.emoji { font-size: 1.3rem; line-height: 1; }
.tag-name { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; color: var(--link); }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; padding: 0; flex: none; }
.icon-btn:hover { color: var(--bad); border-color: var(--bad); }
.icon-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.add-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 0.6rem; }
.add-row input[type="text"] { flex: 1 1 160px; width: auto; min-height: 40px; padding: 0.5rem 0.7rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.panel > .status { display: flex; margin-top: 0.5rem; }
.cmd-switches .dim { opacity: 0.5; }
.cmd-switches .toggle-row { padding: 0.55rem 0; }
.chart { width: 100%; height: auto; display: block; margin-top: 0.4rem; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .bar { fill: var(--accent); }
.chart .bar:hover { fill: var(--link); }
.tabs { display: flex; gap: 0.4rem; margin: 0.4rem 0 0.2rem; }
.tabs .btn[aria-pressed="true"] { background: var(--panel-2); color: var(--link); border-color: var(--link); }
.live-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; }
.live-head h2 { margin: 0; }
.live-dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--ok); margin-right: 0.5rem; animation: live-pulse 1.8s ease-in-out infinite; }
.live.paused .live-dot { background: var(--muted); animation: none; }
@keyframes live-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.live-list { display: grid; gap: 0.35rem; max-height: 22rem; overflow-y: auto; margin-top: 0.6rem; }
.live-row { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; align-items: center; gap: 0.6rem; padding: 0.4rem 0.6rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.live-time { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 0.85rem; }
.live-server { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill.warn { color: var(--warn, #b8860b); border-color: var(--warn, #b8860b); }
.pill.bad { color: var(--bad, #d33); border-color: var(--bad, #d33); }
@media (max-width: 600px) { .live-row { grid-template-columns: auto minmax(0, 1fr) auto; } .live-server { grid-column: 1 / -1; order: 5; } .live-ms { display: none; } }
.meter-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr auto; align-items: center; gap: 0.7rem; }
.meter { height: 10px; border-radius: 6px; background: var(--panel-2); overflow: hidden; }
.meter-fill { height: 100%; background: var(--accent); border-radius: 6px; }
.meter-n { font-variant-numeric: tabular-nums; color: var(--muted); min-width: 3ch; text-align: right; }
.table-wrap { overflow-x: auto; margin-top: 0.5rem; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.table th { color: var(--muted); font-size: 0.85rem; font-weight: 600; }
.table .num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.cell-server { display: flex; align-items: center; gap: 0.6rem; }
.cell-server .icon { width: 28px; height: 28px; border-radius: 8px; background: var(--panel-2); object-fit: cover; display: grid; place-items: center; font-size: 0.8rem; font-weight: 700; color: var(--muted); flex: none; }
.page-intro { margin: 0.2rem 0 1.1rem; color: var(--muted); max-width: 70ch; }
.section-title { font-size: 1.05rem; margin: 1.4rem 0 0.7rem; }
.setup { border-color: var(--accent); }
.steps { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.step { display: flex; align-items: center; gap: 0.8rem; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); flex-wrap: wrap; }
.step-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-weight: 700; flex: none; }
.step.ok .step-mark { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.ok .step-mark .i { width: 16px; height: 16px; }
.step-text { display: grid; gap: 0.1rem; flex: 1 1 220px; min-width: 0; }
.setup-done { margin-bottom: 1rem; }
.setup-done .i { color: var(--ok); }
.help-note { margin-top: 1.2rem; }
.log-filters select { min-height: 40px; padding: 0.4rem 0.6rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.log-filters input[type="search"] { flex: 1 1 220px; }
.log-row { display: flex; align-items: flex-start; gap: 0.8rem; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.log-row time { margin-left: auto; white-space: nowrap; }
.log-main { flex: 1 1 auto; min-width: 0; display: grid; gap: 0.15rem; overflow-wrap: anywhere; }
.log-reason { font-style: italic; }
.log-pill { margin-left: 0.5rem; }
.case-badge { flex: none; min-width: 3.2rem; text-align: center; font-weight: 700; font-size: 0.85rem; padding: 0.2rem 0.5rem; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); }
.case-badge.t-ban, .case-badge.t-tempban, .case-badge.t-kick { color: var(--bad); border-color: var(--bad); }
.case-badge.t-warn, .case-badge.t-timeout { color: #d4a017; border-color: #d4a017; }
.case-badge.t-unban, .case-badge.t-untimeout { color: var(--ok); border-color: var(--ok); }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; margin-top: 0.6rem; }
.pager .btn[disabled] { opacity: 0.45; cursor: default; }
.gate-wrap { display: grid; place-items: center; min-height: 55vh; }
.gate { width: min(100%, 460px); text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem 1.4rem; display: grid; gap: 0.9rem; justify-items: center; }
.gate-chip { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 16px; background: var(--panel-2); border: 1px solid var(--line); }
.gate h1 { margin: 0; font-size: 1.4rem; }
.gate-lead { margin: 0; color: var(--muted); }
.gate-notes { margin: 0.4rem 0 0; padding: 0.9rem 0 0; border-top: 1px solid var(--line); list-style: none; display: grid; gap: 0.5rem; text-align: left; width: 100%; color: var(--muted); font-size: 0.9rem; }
.empty { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 1.3rem 1.2rem; }
.empty h2 { margin: 0 0 0.3rem; font-size: 1.2rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; }
.secret-box { margin-top: 0.8rem; padding: 0.9rem 1rem; border: 1px solid var(--accent); border-radius: 12px; background: var(--panel-2); }
.secret-box p { margin: 0 0 0.6rem; }
.secret-box .row { display: flex; gap: 0.5rem; }
.secret-box input { flex: 1 1 auto; min-width: 0; min-height: 40px; padding: 0.4rem 0.6rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.how { margin-top: 0.8rem; }
.how summary { cursor: pointer; font-weight: 600; color: var(--link); }
.code { margin: 0.6rem 0; padding: 0.8rem 1rem; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); overflow-x: auto; font-size: 0.85rem; line-height: 1.5; }
.code code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre; }
.bad-text { color: var(--bad); }
.doc-table { width: 100%; border-collapse: collapse; margin: 0.5rem 0 1rem; }
.doc-table th, .doc-table td { padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.doc-table th { color: var(--muted); font-size: 0.85rem; }
.plain-list { margin: 0.6rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.35rem; }
.stack { display: grid; gap: 1rem; }
.dev-docs { display: grid; gap: 1.5rem; }
.dev-docs .page-head { margin-bottom: 0.25rem; }
.dev-docs .panel { padding: 1.6rem 1.75rem; }
.dev-docs .panel h2 { margin-bottom: 1rem; }
.dev-docs .panel p { margin: 0 0 1.1rem; line-height: 1.7; }
.dev-docs .panel p:last-child { margin-bottom: 0; }
.dev-docs .panel .code { margin: 1.1rem 0 1.3rem; padding: 1rem 1.2rem; line-height: 1.65; }
.dev-docs .doc-table { margin: 0.9rem 0 1.4rem; }
.dev-docs .doc-table th, .dev-docs .doc-table td { padding: 0.75rem 1rem; }
.dev-docs .doc-table td:first-child { white-space: nowrap; }
.dev-docs .plain-list { margin-top: 1rem; gap: 0.7rem; line-height: 1.65; }
.dev-docs code:not(pre code) { padding: 0.1rem 0.35rem; border-radius: 6px; background: var(--panel-2); }
@media (max-width: 640px) { .dev-docs .panel { padding: 1.2rem 1.1rem; } }
.api-slow, .perm-warning { border-color: #d4a017; margin-bottom: 1rem; }
.api-slow .i, .perm-warning .i { color: #d4a017; }
.rule-list { display: grid; gap: 0.8rem; margin: 0.6rem 0; }
.rule-card { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); padding: 0.8rem 0.9rem; }
.rule-head { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-bottom: 0.6rem; }
.rule-grid { display: grid; gap: 0.6rem 1rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.rule-field { display: grid; gap: 0.25rem; font-size: 0.85rem; color: var(--muted); }
.rule-field select { min-height: 38px; padding: 0.3rem 0.5rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
[hidden] { display: none !important; }
.dev-page .dev-main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.dev-layout { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .dev-layout { grid-template-columns: 220px minmax(0, 1fr); } .toc { position: sticky; top: 1rem; max-height: calc(100vh - 2rem); overflow-y: auto; } }
.toc { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 0.9rem 1rem; }
.toc h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 0 0 0.5rem; }
.toc ul { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.1rem; }
.toc a { display: block; padding: 0.3rem 0.5rem; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 0.92rem; }
.toc a:hover { background: var(--panel-2); }
.toc a[data-current] { color: var(--link); background: var(--panel-2); font-weight: 600; }
.toc-link { margin: 0; font-size: 0.9rem; }
.dev-content { display: grid; gap: 1.5rem; min-width: 0; }
.doc-section { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 1.5rem 1.6rem; scroll-margin-top: 1rem; }
.doc-section h2 { font-size: 1.3rem; margin: 0 0 1rem; display: block; }
.doc-section h3 { font-size: 1.1rem; margin: 1.6rem 0 0.7rem; }
.doc-section h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 1.3rem 0 0.5rem; }
.doc-section .doc-section { border: 0; padding: 0; background: none; border-top: 1px solid var(--line); margin-top: 1.8rem; padding-top: 1.2rem; }
.doc-section p, .doc-section li { line-height: 1.7; }
.doc-section ul, .doc-section ol { padding-left: 1.3rem; display: grid; gap: 0.5rem; }
.anchor { margin-right: 0.4rem; color: var(--muted); text-decoration: none; opacity: 0; font-weight: 400; }
h2:hover .anchor, h3:hover .anchor, .anchor:focus { opacity: 1; }
.doc-section code:not(pre code) { padding: 0.1rem 0.35rem; border-radius: 6px; background: var(--panel-2); font-size: 0.88em; }
.dev-content pre.code { position: relative; margin: 0.6rem 0 1rem; padding: 1rem 1.2rem; line-height: 1.6; }
.copy-btn { position: absolute; top: 0.5rem; right: 0.5rem; padding: 0.2rem 0.6rem; font: inherit; font-size: 0.78rem; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); cursor: pointer; }
.copy-btn:hover { color: var(--text); border-color: var(--link); }
.tab-list { display: flex; gap: 0.3rem; margin-top: 0.6rem; border-bottom: 1px solid var(--line); }
.tab-list button { padding: 0.45rem 0.9rem; font: inherit; font-size: 0.9rem; background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); cursor: pointer; }
.tab-list button[aria-selected="true"] { color: var(--link); border-bottom-color: var(--link); font-weight: 600; }
.lang-label { margin-top: 0.8rem; font-size: 0.8rem; color: var(--muted); font-weight: 600; }
.response { margin: 0.8rem 0 1.2rem; }
.response-head { display: flex; align-items: baseline; gap: 0.7rem; }
.status { flex: none; min-width: 2.8rem; text-align: center; padding: 0.1rem 0.5rem; border-radius: 8px; font-weight: 700; font-size: 0.85rem; border: 1px solid var(--line); }
.status.s2 { color: var(--ok); border-color: var(--ok); }
.status.s4 { color: #d4a017; border-color: #d4a017; }
.status.s5 { color: var(--bad); border-color: var(--bad); }
.facts { display: grid; gap: 0.6rem; margin: 1rem 0 0; }
.facts div { display: grid; gap: 0.1rem; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
@media (min-width: 640px) { .facts div { grid-template-columns: 160px 1fr; gap: 1rem; } }
.facts dt { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.facts dd { margin: 0; }
.faq dt { font-weight: 700; margin-top: 1.1rem; }
.faq dd { margin: 0.3rem 0 0; line-height: 1.7; color: var(--muted); }
.steps-list { gap: 0.8rem; }
@media (max-width: 640px) { .doc-section { padding: 1.1rem 1rem; } }

/* ---- documentation page on phones and tablets ---- */
.dev-content { grid-template-columns: minmax(0, 1fr); }
.doc-section, .dev-content li, .facts div, .response, .tab-panel { min-width: 0; }
.dev-content pre.code { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dev-page .topnav { flex-wrap: wrap; }
@media (max-width: 959px) {
  .dev-page .dev-main { padding: 1rem 0.9rem 2.5rem; }
  .toc { position: sticky; top: 0; z-index: 20; margin: 0 -0.9rem; padding: 0.55rem 0.9rem; border-radius: 0 0 14px 14px; border-width: 0 0 1px; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25); }
  .toc h2, .toc-more { display: none; }
  .toc ul { display: flex; gap: 0.45rem; margin: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .toc ul::-webkit-scrollbar { display: none; }
  .toc li { flex: none; }
  .toc a { white-space: nowrap; min-height: 40px; display: flex; align-items: center; padding: 0.4rem 0.85rem; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; }
  .doc-section { scroll-margin-top: 4.2rem; }
}
@media (max-width: 640px) {
  .dev-page .dev-main { padding-top: 0.6rem; }
  .dev-page h1 { font-size: 1.6rem; line-height: 1.2; }
  .doc-section { padding: 1.1rem 0.95rem; border-radius: 12px; }
  .doc-section h2 { font-size: 1.2rem; }
  .doc-section ul, .doc-section ol { padding-left: 1.1rem; }
  .dev-content pre.code { padding: 0.85rem 0.9rem; font-size: 0.82rem; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
  .dev-content pre.code code { white-space: inherit; }
  .copy-btn { position: static; display: block; margin: 0.6rem 0 0 auto; min-height: 36px; padding: 0.3rem 0.9rem; font-size: 0.85rem; }
  .tab-list button { min-height: 44px; padding: 0.5rem 1rem; }
  .response-head { flex-direction: column; gap: 0.4rem; }
  .doc-table thead { display: none; }
  .doc-table, .doc-table tbody { display: block; }
  .doc-table tr { display: block; margin: 0 0 0.7rem; padding: 0.55rem 0.75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
  .doc-table td { display: block; padding: 0.2rem 0; border: 0; white-space: normal !important; }
  .doc-table td::before { content: attr(data-label); display: block; font-size: 0.7rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
  .doc-table td:first-child { font-weight: 700; padding-bottom: 0.35rem; }
  .doc-table td:first-child::before { display: none; }
  .dev-page .topnav a { padding: 0.55rem 0.7rem; }
}
.doc-section code:not(pre code) { overflow-wrap: anywhere; }
@media (hover: none) { .anchor { display: none; } }
@media (pointer: coarse) { .copy-btn { min-height: 36px; padding: 0.3rem 0.8rem; } .site-foot a { display: inline-block; padding: 0.5rem 0.15rem; } }
@media (max-width: 640px) {
  .anchor { display: none; }
  .dev-page .topnav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .dev-page .topnav a { padding: 0.55rem 0.45rem; font-size: 0.9rem; white-space: nowrap; }
  .dev-page .free-badge { display: none; }
  .doc-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0.1rem 0.9rem; }
  .doc-table td:first-child, .doc-table td:last-child, .doc-table td:nth-child(2):nth-last-child(2) { grid-column: 1 / -1; }
  .doc-table td:nth-child(2):nth-last-child(2)::before { margin-top: 0.1rem; }
  .doc-table td:only-child { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .dev-page .top { padding-left: 0.7rem; padding-right: 0.7rem; }
  .dev-page .topnav { margin-left: -0.45rem; gap: 0; }
  .dev-page .topnav a { font-size: 0.86rem; padding: 0.55rem 0.4rem; }
}

/* ---- the rest of the site on phones ---- */
input[type="search"], input[type="url"] { width: 100%; min-height: 44px; padding: 0.55rem 0.75rem; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; }
.row input[type="url"], .add-row input[type="search"], .log-filters input[type="search"] { width: auto; flex: 1 1 200px; }
.title-row .icon { display: grid; place-items: center; flex: none; object-fit: cover; background: var(--panel-2); color: var(--muted); font-weight: 700; font-size: 1.4rem; }
@media (max-width: 819px) {
  .shell > .side { position: sticky; top: 0; z-index: 30; margin: 0 -16px; padding: 0.5rem 16px; background: var(--bg); border-bottom: 1px solid var(--line); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .shell > .side::-webkit-scrollbar { display: none; }
  .side a { min-height: 44px; }
  .title-row { margin-top: 0.4rem; }
}
@media (max-width: 640px), (pointer: coarse) {
  .btn.small { min-height: 44px; padding: 0.4rem 1rem; }
  .chip, .cs-toggle { min-height: 44px; }
  .check { min-height: 44px; }
  .check input[type="checkbox"], .check input[type="radio"] { width: 22px; height: 22px; }
  .icon-btn { width: 44px; height: 44px; }
  summary { min-height: 44px; display: flex; align-items: center; }
  .pager .btn, .tabs .btn { min-height: 44px; }
  .row-item select, .row-item input[type="text"] { min-height: 44px; }
}
@media (max-width: 640px) {
  .foot-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem 1rem; }
  .foot-col { min-width: 0; }
  .foot-col a { padding: 0.35rem 0; }
  .site-foot { padding-top: 1.8rem; }
  .foot-bottom { flex-direction: column; }
}
@media (max-width: 520px) {
  .hero-actions .btn { flex: 1 1 100%; justify-content: center; text-align: center; }
  .bar { padding-bottom: calc(0.8rem + env(safe-area-inset-bottom, 0px)); }
  .bar .btn { flex: 1 1 auto; justify-content: center; }
  .stats { grid-template-columns: 1fr 1fr; }
  .page-intro { font-size: 0.97rem; }
}
@media (max-width: 640px) { .foot-col a { display: block; padding: 0.7rem 0; } .foot-col { gap: 0; } }
.content { grid-template-columns: minmax(0, 1fr); }
.content > *, .panel, .shell > * { min-width: 0; }

.updates { display: grid; gap: 1rem; max-width: 52rem; }
.update { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; }
.update h2 { margin: 0 0 0.15rem; font-size: 1.2rem; overflow-wrap: anywhere; }
.update time { color: var(--muted); font-size: 0.85rem; }
.update-body { margin: 0.6rem 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.update-actions { display: flex; gap: 0.5rem; margin-top: 0.8rem; }

.directory { margin-top: 3rem; display: grid; gap: 1rem; }
.directory[hidden] { display: none; }
.directory-head h2 { display: block; margin: 0; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.directory-head .lead { margin: 0.3rem 0 0; }
.directory-tools { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.directory-tools .listing-search { flex: 1 1 220px; width: auto; }
.directory-tools select { width: auto; }
.listing-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.listing-card { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-width: 0; }
.listing-card:hover { border-color: var(--accent); }
.listing-banner { height: 84px; background: linear-gradient(135deg, var(--panel-2), var(--accent)); }
.listing-banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-identity { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.5rem; padding: 0 1rem; margin-top: -28px; }
.listing-avatar { width: 56px; height: 56px; border-radius: 14px; border: 3px solid var(--panel); background: var(--panel-2); display: grid; place-items: center; font-weight: 700; font-size: 1.3rem; object-fit: cover; flex: none; }
.listing-body { display: grid; gap: 0.35rem; padding: 0.6rem 1rem 1rem; align-content: start; flex: 1; }
.listing-name { margin: 0; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-stats { display: flex; flex-wrap: wrap; gap: 0.2rem 0.8rem; color: var(--muted); font-size: 0.85rem; }
.listing-desc { margin: 0; color: var(--text); font-size: 0.92rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.listing-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.2rem; }
.listing-tag { padding: 0.1rem 0.6rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.listing-preview { max-width: 340px; }

.choices { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.choice { display: grid; gap: 0.75rem; align-content: start; padding: 1.25rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.choice h2 { margin: 0; font-size: 1.3rem; }
.choice p { margin: 0; color: var(--muted); }
