/* GW2 AI Assistant — "Tyrian night" theme
   Palette: abyss slate, parchment text, ley-line cyan (live/magic), waypoint gold (actions/money). */
:root {
  --bg: #18202a;
  --bg-2: #1d2631;
  --panel: #222c38;
  --panel-2: #2a3542;
  --line: #36424f;
  --text: #e9dfc8;
  --muted: #9aa3ad;
  --ley: #5ec9c1;
  --gold: #d9a441;
  --gold-ink: #22180a;
  --danger: #d0625a;
  --ok: #7fbf7a;
  --radius-s: 6px;
  --radius-m: 12px;
  --font-head: "Marcellus", Georgia, serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(94, 201, 193, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(217, 164, 65, .05), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font-body);
  min-height: 100vh;
}
a { color: var(--ley); }
a:hover { color: #8fe0d9; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2.2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
:focus-visible { outline: 2px solid var(--ley); outline-offset: 2px; }
code { background: var(--bg); padding: 1px 5px; border-radius: 4px; font-size: .9em; }

/* ---------- top bar ---------- */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(24, 32, 42, .92); backdrop-filter: blur(6px);
             border-bottom: 1px solid var(--line); }
.site-title { display: flex; justify-content: center; padding: 8px 16px 0; text-align: center; }
.site-title .brand { justify-content: center; flex-wrap: wrap; line-height: 1.25; }
.brand-long { margin-left: .3em; }
.topbar {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  padding: 6px 24px 8px; position: relative;
}
.has-menu .nav { flex: 0 1 auto; }
.topbar:not(.has-menu) .nav { flex: none; order: 0; }   /* signed out: 🏅 Scout Proof beside Log in / Create account */
/* information messages under the header (companion updates…): their own line, nothing when there's none */
.site-notices { display: flex; justify-content: center; padding: 0 16px; }
.site-notices:has(> :not([hidden])) { padding: 8px 16px; }
.site-notices .comp-update { white-space: normal; max-width: 100%; }
.brand { font-family: var(--font-head); font-size: 1.25rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand svg { width: 26px; height: 26px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 12px; border-radius: var(--radius-s); }
.nav a:hover, .nav a.active { color: var(--text); background: var(--panel); }
.balance {
  color: var(--gold); text-decoration: none; font-variant-numeric: tabular-nums;
  border: 1px solid rgba(217, 164, 65, .4); padding: 4px 12px; border-radius: 999px;
}
.topbar form { margin: 0; }
.topbar .btn-ghost, .topbar .btn, .balance { white-space: nowrap; flex-shrink: 0; }
/* signed in: the pages and "Log out" sit in one menu; on wide screens it's just part of the bar,
   on smaller ones it folds into the ☰ button (see the max-width: 1100px block below) */
.menu { display: contents; }
.has-menu .nav { order: 1; }
.nav a { white-space: nowrap; }
.has-menu .comp-update { order: 2; }
.has-menu .balance { order: 4; }
.has-menu .logout { order: 5; }
.burger { display: none; order: 6; align-items: center; justify-content: center; width: 40px; height: 38px; padding: 0;
          flex-shrink: 0; background: transparent; color: var(--text); border: 1px solid var(--line);
          border-radius: var(--radius-s); cursor: pointer; }
.burger svg { width: 22px; height: 22px; }
.burger:hover, .menu-open .burger { background: var(--panel); }

/* ---------- layout ---------- */
.page { max-width: 1100px; margin: 0 auto; padding: 32px 24px 64px; }
.page.narrow { max-width: 460px; }
.page.medium { max-width: 860px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 20px 22px; margin-bottom: 20px;
}
.panel h2 { margin-bottom: .4em; }
.panel > p.lead { color: var(--muted); max-width: 70ch; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }

/* ---------- forms ---------- */
label { display: block; font-size: .92rem; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=search], input[type=email], input[type=password], input[type=number], select, textarea {
  width: 100%; background: var(--bg); color: var(--text);
  border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 9px 11px; font: inherit;
}
input:focus, select:focus, textarea:focus { border-color: var(--ley); outline: none; }
.check { display: flex; gap: 8px; align-items: center; color: var(--text); margin: 6px 0; }
.check input { accent-color: var(--ley); width: 17px; height: 17px; }
.field { margin-bottom: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.seg button { border: 0; border-radius: 0; background: transparent; color: var(--muted); padding: 7px 14px; }
.seg button.on { background: var(--panel-2); color: var(--text); box-shadow: inset 0 -2px 0 var(--ley); }

button, .btn {
  font: inherit; cursor: pointer; border-radius: var(--radius-s);
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  padding: 8px 16px; text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
button:hover, .btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); font-weight: 600; }
.btn-primary:hover { background: #e6b354; border-color: #e6b354; }
.btn-danger { color: var(--danger); border-color: rgba(208, 98, 90, .5); background: transparent; }
.btn-ghost { background: transparent; }
button:disabled { opacity: .5; cursor: not-allowed; }

.flash { padding: 10px 14px; border-radius: var(--radius-s); margin-bottom: 16px; border-left: 3px solid var(--ley); background: var(--panel); }
.flash.error { border-color: var(--danger); }
.key-msg { margin: 10px 0 0; padding: 10px 14px; border-radius: var(--radius-s); border-left: 3px solid var(--danger); background: var(--panel-2); line-height: 1.5; }
.flash.ok { border-color: var(--ok); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--panel-2); }
.pos { color: var(--ok); }
.neg { color: var(--danger); }
.tag { font-size: .8rem; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted);
       white-space: nowrap; flex-shrink: 0; }
.tag.on { color: var(--ley); border-color: rgba(94, 201, 193, .5); }

/* ---------- landing ---------- */
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; padding: 56px 0 32px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 14ch; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.hero-chat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 40px; border-top: 1px solid var(--line); padding-top: 32px; }
.features h3 { color: var(--text); }
.features p { color: var(--muted); }

/* ---------- chat app ---------- */
.app { display: grid; grid-template-columns: minmax(0, 1fr) 330px; height: calc(100vh - var(--head-h, 96px));
       width: 100%; max-width: 1240px; margin: 0 auto; }   /* big screens: centred, like the Social page */
@media (min-width: 1280px) { .app { border-left: 1px solid var(--line); border-right: 1px solid var(--line); } }
.chat { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); }
.messages { flex: 1; overflow-y: auto; padding: 24px clamp(16px, 4vw, 48px); }
.msg { max-width: 72ch; margin: 0 0 18px; }
.msg .who { font-size: .82rem; color: var(--muted); margin-bottom: 3px; display: flex; gap: 10px; }
.msg .body { padding: 11px 15px; border-radius: var(--radius-m); background: var(--panel); border: 1px solid var(--line); }
.msg.user { margin-left: auto; }
.msg.user .body { background: var(--panel-2); border-color: transparent; }
.msg.user .who { justify-content: flex-end; }
.msg.passive .body { border-color: rgba(94, 201, 193, .35); border-style: dashed; }
.msg .body p:last-child { margin-bottom: 0; }
.msg .body ul, .msg .body ol { margin: .3em 0 .6em; padding-left: 1.3em; }
.msg .sources { font-size: .85rem; margin-top: 6px; color: var(--muted); }
.msg .sources a { margin-right: 10px; }
.msg.thinking .body { color: var(--muted); }
.dots span { animation: blink 1.2s infinite; }
.dots span:nth-child(2) { animation-delay: .2s; }
.dots span:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; } 40% { opacity: 1; } }
.empty-chat { color: var(--muted); max-width: 52ch; margin: 10vh auto; text-align: center; }
.empty-chat .ideas { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.empty-chat .ideas button { font-size: .92rem; }

.composer { border-top: 1px solid var(--line); padding: 12px clamp(16px, 4vw, 48px) 16px; background: var(--bg-2); }
.composer form { display: flex; flex-direction: column; gap: 8px; }
.composer textarea { resize: none; min-height: 44px; max-height: 160px; width: 100%; }
.composer-bar { display: flex; align-items: center; gap: 10px; }
.chit-compose .composer-bar { margin-top: 8px; }
.composer-bar { align-items: stretch; }
.composer-bar .mic { width: 46px; height: auto; min-height: 40px; }   /* as tall as Send, side by side */
.composer-bar #sendBtn { padding-left: 22px; padding-right: 22px; }
.composer-bar .clear-chat { align-self: center; }
.mic {
  width: 46px; height: 44px; justify-content: center; padding: 0; flex: none;
}
.mic svg { width: 20px; height: 20px; }
.mic.live { background: var(--danger); border-color: var(--danger); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(208, 98, 90, .5); } 50% { box-shadow: 0 0 0 8px rgba(208, 98, 90, 0); } }
.composer .hint { font-size: .82rem; color: var(--muted); margin-top: 6px; display: flex; gap: 16px; flex-wrap: wrap; }
kbd { border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 6px; font: .8rem var(--font-body); color: var(--text); }

/* side journal */
.journal { overflow-y: auto; padding: 20px; background: var(--bg-2); }
.journal section { margin-bottom: 24px; }
.journal h3 { font-size: 1rem; color: var(--muted); margin-bottom: 8px; }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); margin-right: 6px; }
.live-dot.on { background: var(--ley); box-shadow: 0 0 8px var(--ley); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 3px 12px; font-size: .93rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.chatlink { cursor: pointer; color: var(--gold); border-bottom: 1px dotted; white-space: nowrap; }
.chatlink:hover, .chatlink:focus-visible { background: rgba(232, 178, 74, .15); border-bottom-style: solid; }
.chatlink.copied-flash { animation: copied-blink 1s steps(1) 1; }
@keyframes copied-blink { 0%, 33%, 66% { background: var(--gold); color: #10161d; } 16%, 50%, 83%, 100% { background: transparent; color: var(--gold); } }

/* the compass — the one bold element */
.compass-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 8px 0; }
.compass { width: 190px; height: 190px; position: relative; }
.compass svg { width: 100%; height: 100%; }
.compass .needle { transition: transform .8s cubic-bezier(.3, 1.4, .5, 1); transform-origin: 100px 100px; }
.compass-step { text-align: center; font-size: .92rem; margin: 6px 0 4px; line-height: 1.4; }
.compass-step b { color: var(--ley); }
.compass-readout { text-align: center; font-family: var(--font-head); font-size: 1.05rem; }
.compass-readout .dist { font-size: 1.8rem; color: var(--ley); display: block; font-variant-numeric: tabular-nums; }
.compass.idle .needle { opacity: .25; }

.quick .field { margin-bottom: 10px; }

/* ---------- modal ---------- */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 22px; width: min(720px, 94vw); }
dialog::backdrop { background: rgba(8, 12, 16, .7); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; }
.stat b { display: block; font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .9rem; }

.packages { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 12px 0 18px; }
.package { text-align: left; display: block; padding: 14px 16px; background: var(--bg); }
.package b { display: block; font-size: 1.4rem; color: var(--gold); }
.package.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }

.toast.action { display: flex; align-items: center; gap: 12px; }
.toast.action button { white-space: nowrap; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--line); padding: 10px 18px; border-radius: var(--radius-s); z-index: 99; }

@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; height: auto; }
  .chat { height: calc(100vh - var(--head-h, 96px)); border-right: 0; }
  .journal { border-top: 1px solid var(--line); }
  .hero, .grid-2, .features { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 16px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .brand { font-size: 1.05rem; }
  .balance { margin-left: auto; }
  .topbar form button { padding: 6px 10px; }
  .page { padding: 24px 16px 48px; }
}
@media (max-width: 1280px) {
  .topbar.has-menu { flex-wrap: nowrap; gap: 12px; padding: 10px 16px; }
  .has-menu .brand { min-width: 0; font-size: 1.05rem; line-height: 1.2; }
  .has-menu .balance { margin-left: auto; }
  .burger { display: inline-flex; }
  .menu { display: none; }
  .menu-open .menu {
    display: flex; flex-direction: column; gap: 2px; position: absolute; top: 100%; left: 0; right: 0;
    padding: 8px 16px 14px; background: var(--panel-2); border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .35);
  }
  .menu-open .nav { flex-direction: column; width: 100%; overflow: visible; gap: 2px; }
  .menu-open .nav a { padding: 10px 12px; font-size: 1.05rem; }
  .menu-open .logout { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--line); }
  .menu-open .logout button { width: 100%; text-align: left; padding: 10px 12px; }
}
@media (max-width: 640px) {
  .brand-long { display: none; }   /* phones: "Scout (fansite)"; the browser title keeps the full name */
  .has-menu .brand > span { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.msg .who .cost { color: var(--gold); cursor: help; border-bottom: 1px dotted rgba(217,164,65,.5); }

/* toggle switch */
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text); margin: 0; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .slider { width: 42px; height: 24px; border-radius: 999px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--text); transition: transform .2s; }
.switch input:checked + .slider { background: var(--ley); }
.switch input:checked + .slider::after { transform: translateX(18px); background: #10221f; }
.switch input:focus-visible + .slider { outline: 2px solid var(--ley); outline-offset: 2px; }

/* header credits + usage averages */
.balance { display: inline-flex; align-items: center; gap: 6px; }
.balance svg { width: 16px; height: 16px; }
.big-credits { font-size: 2.4rem; color: var(--gold); margin: 0; font-variant-numeric: tabular-nums; }
table.history td { white-space: nowrap; }

[hidden] { display: none !important; }

/* in-game overlay settings */
.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 10px 14px; align-items: center; margin-top: 12px; }
.ov-grid label { margin: 0; font-size: .92rem; }
.ov-grid input[type=color] { width: 56px; height: 32px; padding: 2px; border-radius: var(--radius-s); }
.ov-grid input[type=range] { width: 100%; }
.ov-stage { position: relative; overflow: hidden; border-radius: var(--radius-s); padding: 10px;
  background: linear-gradient(135deg, #4c5d3c, #8a7a52 60%, #5d6b7a); min-height: 120px; }
.ov-preview { transform-origin: top left; border-radius: 12px; line-height: 1.35; text-shadow: 0 1px 2px rgba(0,0,0,.6); box-sizing: border-box; }
#overlaySettings .seg { flex-wrap: wrap; }

/* push-to-talk bar on the Scout page */
.ptt-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; margin-bottom: 10px;
  border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--panel); }
.ptt-bar .ptt-icon { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel-2); color: var(--muted); }
.ptt-bar .ptt-icon svg { width: 20px; height: 20px; }
.ptt-bar .ptt-text { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.ptt-bar .ptt-text b { font-size: 1rem; }
.ptt-bar .ptt-text span { font-size: .86rem; color: var(--muted); }
.ptt-btn { flex: none; font-weight: 700; padding: 10px 18px; border-radius: var(--radius-s); }
.ptt-bar[data-state="arm"] { border-color: var(--gold); background: linear-gradient(90deg, rgba(217,164,65,.16), var(--panel) 70%);
  animation: ptt-glow 2s ease-in-out infinite; }
.ptt-bar[data-state="arm"] .ptt-icon { background: var(--gold); color: var(--gold-ink); }
.ptt-bar[data-state="arm"] .ptt-btn { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-size: 1.02rem; }
.ptt-bar[data-state="ready"] { border-color: var(--ok); background: linear-gradient(90deg, rgba(127,191,122,.14), var(--panel) 70%); }
.ptt-bar[data-state="ready"] .ptt-icon { background: var(--ok); color: #10200f; }
.ptt-bar[data-state="ready"] .ptt-btn { font-weight: 500; }
.ptt-bar[data-state="off"] .ptt-btn { background: var(--ley); color: #0f2321; border-color: var(--ley); }
@keyframes ptt-glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(217,164,65,0); } 50% { box-shadow: 0 0 0 4px rgba(217,164,65,.25); } }
@media (prefers-reduced-motion: reduce) { .ptt-bar[data-state="arm"] { animation: none; } }
@media (max-width: 640px) { .ptt-bar { flex-wrap: wrap; } .ptt-btn { width: 100%; } }
.alert-rows { display: grid; grid-template-columns: auto auto; gap: 6px 18px; align-items: center; justify-content: start; margin-top: 10px; }
.field.inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.field.inline label { margin: 0; white-space: nowrap; }
@media (max-width: 480px) { .alert-rows { grid-template-columns: 1fr; } }
.keep-open-bar[hidden] { display: none; }
.chat-flash { margin: 10px clamp(16px, 4vw, 48px) 0; }
.keep-open-bar .ko-text { flex: 1; }
.keep-open-bar button { flex: none; font: inherit; font-size: .85rem; cursor: pointer; background: transparent;
                        color: var(--muted); border: 0; padding: 4px 8px; border-radius: var(--radius-s); }
.keep-open-bar .ko-never { text-decoration: underline; }
.keep-open-bar .ko-close { font-size: 1.3rem; line-height: 1; color: var(--text); }
.keep-open-bar button:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
.keep-open-bar { display: flex; gap: 10px; align-items: center; padding: 8px clamp(16px, 4vw, 48px); font-size: .9rem;
  background: rgba(217,164,65,.12); border-bottom: 1px solid rgba(217,164,65,.45); color: var(--text); }

/* "keep chat open" note on other pages */
.keep-chat { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 18px; border-radius: var(--radius-m);
  border: 1px solid rgba(217,164,65,.45); background: rgba(217,164,65,.08); font-size: .92rem; }
.keep-chat svg { flex: none; color: var(--gold); }
.keep-chat span { flex: 1; }
.keep-chat .btn { flex: none; white-space: nowrap; }
@media (max-width: 640px) { .keep-chat { flex-wrap: wrap; } }

/* settings: push-to-talk callout */
.ptt-callout { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-m); border: 1px solid var(--gold);
  background: rgba(217,164,65,.08); }
.ptt-callout ol { margin: 10px 0 10px 1.2em; padding: 0; font-size: .9rem; color: var(--text); }
.ptt-callout li { margin-bottom: 4px; }

/* collapsible settings sections */
details.sect > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; user-select: none; }
details.sect > summary::-webkit-details-marker { display: none; }
details.sect > summary::before { content: ""; width: 9px; height: 9px; flex: none; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .2s; margin: 0 4px 0 2px; }
details.sect[open] > summary::before { transform: rotate(45deg); margin-top: -4px; }
details.sect > summary h2 { margin: 0; }
details.sect > summary:hover h2 { color: var(--ley); }
details.sect > summary:focus-visible { outline: 2px solid var(--ley); outline-offset: 4px; border-radius: 4px; }
details.sect[open] > summary { margin-bottom: 12px; }
details.sect:not([open]) { padding-bottom: 18px; }
.passive-head { align-items: center; gap: 14px; }
.passive-limit { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--bg-2); }
.passive-limit label { display: block; margin-bottom: 6px; }
.warn-credits { margin: 10px 0 0; font-size: .88rem; color: var(--gold); }
h3.sub { font-size: .95rem; margin: 0 0 6px; font-family: var(--font-body); font-weight: 600; }
h3.sub .muted { font-weight: 400; font-size: .85rem; }

.model-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }

/* credits page */
.rate-box { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; margin-top: 10px; background: var(--bg-2); }
.rate-box.est { border-color: rgba(217,164,65,.5); }
.rate-head { font-family: var(--font-head); font-size: 1.15rem; color: var(--gold); display: flex; flex-wrap: wrap;
  align-items: baseline; gap: 8px; margin-bottom: 8px; }
.rate-head span { font-family: var(--font-body); font-size: .82rem; color: var(--muted); }
.rate-head .reset-avg { margin-left: auto; font-size: .82rem; padding: 2px 10px; }
.rates dd b { color: var(--gold); font-size: 1.05rem; }
.est-empty { margin: 4px 0; color: var(--gold); font-weight: 600; }
.history-scroll { max-height: 440px; overflow-y: auto; }
.history-scroll thead th { position: sticky; top: 0; background: var(--panel); z-index: 1; }

/* settings: status tags, companion gating */
.tag.off { color: var(--danger); border-color: rgba(208, 98, 90, .5); }
details.sect > summary .tag { margin-left: 4px; }
.locked-note { margin: 0 0 10px; padding: 8px 12px; border-radius: var(--radius-s); border: 1px dashed var(--gold);
  color: var(--gold); font-size: .9rem; background: rgba(217,164,65,.06); }
.locked-note.big { font-size: 1rem; font-weight: 600; }
fieldset.lockable { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.locked { opacity: .45; pointer-events: none; }
.comp-status { display: block; line-height: 1.5; padding: 8px 12px; margin-bottom: 10px; border-radius: var(--radius-s);
  background: var(--bg-2); border: 1px solid var(--line); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.dot.warn { background: var(--gold); }
.dot.bad { background: var(--danger); }
.hint-sm { font-size: .82rem; margin: -2px 0 6px; }

/* Scout page: right panel cards */
.journal .jcard { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px 14px; margin-bottom: 14px; }
.journal .jcard h3 { font-family: var(--font-head); font-size: .98rem; color: var(--text); margin: 0 0 10px; letter-spacing: .02em; }
.status-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: .92rem; }
.status-val { font-weight: 600; font-size: .86rem; }
.status-val.on { color: var(--ok); }
.status-val.off { color: var(--danger); }
.status-val.off a { color: var(--danger); }
.status-val.warn { color: var(--gold); }
.journal .kv { margin-top: 8px; }
.jhint { font-size: .82rem; margin: 4px 0 0 52px; line-height: 1.4; }
.switch input:disabled + .slider { opacity: .4; cursor: not-allowed; }

/* settings: passive options as rows */
.pgroup { margin-top: 16px; }
.pgroup h3 { margin-bottom: 6px; }
.pitem { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: var(--bg-2); margin-bottom: 6px; }
.pitem.off { opacity: .7; }
.pitem-check { display: flex; gap: 10px; align-items: flex-start; flex: 1; min-width: 0; margin: 0; cursor: pointer; }
.pitem-check input { margin-top: 4px; flex: none; }
.pitem-check span { display: flex; flex-direction: column; }
.pitem-check small { color: var(--muted); font-size: .84rem; line-height: 1.35; }
.seg-sm button { padding: 4px 10px; font-size: .84rem; }
.seg-sm button:disabled { cursor: not-allowed; opacity: .5; }
@media (max-width: 640px) { .pitem { flex-wrap: wrap; } .pitem .seg { margin-left: 28px; } }

.note-sm { font-size: .86rem; line-height: 1.45; margin-top: 8px; }
.context-note { margin-top: 12px; padding: 12px 14px; font-size: 1rem; line-height: 1.5; color: var(--text);
  border: 2px solid var(--gold); border-radius: var(--radius-m); background: rgba(217,164,65,.08); }

.step-shots { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.step-shots img { max-width: 240px; max-height: 160px; border-radius: 6px; border: 1px solid var(--line, #36424f); display: block; }

/* collapsible sections */
.sec-head { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; flex-wrap: wrap; }
.sec-head > h2, .sec-head > h3 { margin: 0; }
.sec-head:hover > h2, .sec-head:hover > h3 { color: var(--ley); }
.sec-toggle { width: 22px; height: 22px; padding: 0; border: 0; background: transparent; flex: none; cursor: pointer; position: relative; }
.sec-toggle::before { content: ""; position: absolute; left: 6px; top: 6px; width: 8px; height: 8px; border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.sec-open > .sec-head .sec-toggle::before { transform: rotate(45deg); top: 4px; }
.sec-open > .sec-head { margin-bottom: 12px; }
.panel:not(.sec-open):has(> .sec-head) { padding-bottom: 18px; }
.sec-peek { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-left: auto; }
.peek-chip { font-size: .74rem; line-height: 1; padding: 4px 7px; border-radius: 999px; background: rgba(255,255,255,.06);
  border: 1px solid var(--line, #2c3744); color: var(--muted); white-space: nowrap; display: inline-flex; gap: 4px; align-items: center; }
.peek-chip .dot { width: 8px; height: 8px; margin: 0; }
.peek-chip b.on { color: #6fd08c; } .peek-chip b.off { color: #e0736b; }
details.sect > summary .sec-peek { margin-left: auto; }
details.sect > summary h2 { min-width: 0; }
@media (max-width: 640px) {   /* phones: the small chips move under the title instead of off the screen */
  details.sect > summary { flex-wrap: wrap; row-gap: 6px; }
  details.sect > summary .sec-peek { max-width: 100%; justify-content: flex-end; }
}
/* admin: offline databases */
.ds-scroll { max-height: min(75vh, 900px); }
#ds tr.ds-group td { background: rgba(255,255,255,.025); }
#ds .ds-arrow { padding: 0 4px; margin-right: 4px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .9rem; }
#ds .ds-arrow-sp { display: inline-block; width: 22px; }
#ds tr.ds-inner td { font-size: .9rem; }
#ds tr.ds-section td { padding: 14px 8px 4px; border-bottom: 1px solid rgba(212, 175, 55, .35); color: var(--accent, #d4af37); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; background: none; }
#ds .ds-st { font-weight: 600; white-space: nowrap; }
#ds th, #ds td.num { white-space: nowrap; }
#ds .ds-st.pos { color: var(--ok, #6fcf97); } #ds .ds-st.warn, #ds .ds-msg.warn { color: #f2c94c; }
#ds .ds-st.neg, #ds .ds-msg.neg, #ds td.neg { color: var(--danger, #eb5757); }
#ds .ds-logbtn { padding: 0 6px; border: 0; background: transparent; color: var(--accent, #6bb6ff); cursor: pointer; font-size: .85rem; white-space: nowrap; }
#ds tr.ds-logrow td { background: rgba(0,0,0,.18); }
#ds .ds-msg { margin: 2px 0 4px; font-weight: 600; }
#ds .ds-log { max-height: 240px; overflow: auto; margin-top: 6px; padding: 6px 8px; border-radius: 6px; background: rgba(0,0,0,.25);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
#ds .ds-cmp { width: auto; margin: 6px 0; font-size: .85rem; }
#ds .ds-cmp td, #ds .ds-cmp th { padding: 2px 12px 2px 0; background: transparent; }
#ds .ds-cmp td.neg { color: var(--danger, #eb5757); font-weight: 600; }
#ds .ds-acts { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; }
#ds tr.ds-review td { background: rgba(242,201,76,.07); }
#ds tr.ds-review.ok td { background: rgba(111,207,151,.07); }
#ds .ds-msg.pos { color: var(--ok, #6fcf97); }
#ds .ds-t2 { color: var(--muted); }
#ds .ds-t2::before { content: "· "; }
#ds .ds-log-head .ds-t2::before { content: ""; }
#ds .ds-log-head { margin-bottom: 2px; font-size: .74rem; }
#ds .ds-bk td { vertical-align: middle; }
#ds .ds-bk-acts { white-space: nowrap; }
#ds .ds-bk-acts a { margin-right: 6px; font-size: .85rem; }
#ds .ds-logbtn.neg { color: var(--danger, #eb5757); }
#ds .ds-logbtn[disabled] { opacity: .45; cursor: default; }
#ds .ds-upload { display: inline-flex; align-items: center; cursor: pointer; }
#ds .ds-acts small { flex: 1 1 260px; align-self: center; }
#ds .ds-log-error { color: var(--danger, #eb5757); } #ds .ds-log-warning { color: #f2c94c; } #ds .ds-log-debug { opacity: .65; }

/* game icons before skill / trait / spec / gear names in chat */
.gw-icon { width: 1.35em; height: 1.35em; vertical-align: -0.3em; margin-right: 0.25em; border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35); }

.ds-opt { display: inline-flex; margin: 0 0 0 10px; font-size: .85rem; font-weight: 400; vertical-align: middle; }

.compass-step .step-shot { display: block; width: 100%; max-height: 220px; object-fit: cover; border-radius: 8px; margin-top: 8px; border: 1px solid var(--line); }
.compass-step .checklist { list-style: none; margin: 8px 0 0; padding: 0; max-height: 220px; overflow-y: auto; font-size: .86rem; text-align: left; }
.compass-step .checklist li { padding: 2px 0; }
.compass-step .checklist li.done { opacity: .55; text-decoration: line-through; }
.compass-step .checklist li.current { color: var(--gold); font-weight: 600; }

/* overlay info lines (settings + Scout page status card) */
fieldset.ov-group { border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px 10px; margin: 0 0 12px; min-width: 0; }
fieldset.ov-group legend { padding: 0 6px; font-family: var(--font-head); color: var(--ley); }
fieldset.ov-group small { display: block; margin: 4px 0; color: var(--muted); }
fieldset.ov-group .check { margin: 3px 0; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0 14px; }
.info-rows { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .86rem;
             font-variant-numeric: tabular-nums; }
.info-chip { white-space: nowrap; }
.info-chip i { font-style: normal; color: var(--muted); }
.info-chip button { margin-left: 6px; padding: 0 7px; font-size: .78rem; border-radius: 4px; cursor: pointer;
                    background: transparent; color: var(--ley); border: 1px dashed var(--ley); }

/* header: companion update offer */
.comp-update { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 10px; border-radius: 999px;
               border: 1px solid var(--ley); font-size: .86rem; white-space: nowrap; }
.comp-update .btn { padding: 2px 12px; font-size: .82rem; }
.comp-update.done { border-color: var(--line); color: var(--ley); padding-right: 10px; }
@media (max-width: 700px) { .site-notices .comp-update span { display: inline; } }

/* admin logs: per-question steps */
.steps-btn { padding: 0 8px; font-size: .85rem; white-space: nowrap; }
.steps-row > td { background: var(--bg-2); }
.steps-table { width: auto; font-size: .85rem; margin: 4px 0 6px 8px; }
.steps-table th, .steps-table td { padding: 3px 12px; }

/* companion download: license agreement */
.agree-box { font-size: .9rem; line-height: 1.4; }
.btn.disabled { opacity: .45; cursor: not-allowed; }
/* site footer */
.site-footer { text-align: center; color: var(--muted); font-size: .8rem; padding: 18px 12px 24px; }
.site-footer a { color: var(--muted); }
.site-footer p { margin: 0 auto 6px; max-width: 900px; }
.site-footer .trademarks { font-size: .72rem; opacity: .8; line-height: 1.5; max-width: 900px; margin: 0 auto; white-space: pre-line; }
.legal-text { white-space: pre-wrap; font-family: inherit; line-height: 1.55; font-size: .92rem; }
#domStatus.error { color: var(--danger); }
.agree-box { align-items: flex-start; }
.agree-box input { margin-top: 3px; flex: none; }

/* ---------- front page ---------- */
.page.landing { max-width: 1160px; padding-top: 8px; }
.btn-big { padding: 12px 22px; font-size: 1.05rem; }
.lp-small { color: var(--muted); font-size: .92rem; margin-top: 12px; }
.lp-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 56px; align-items: center; padding: 56px 0 64px; }
.lp-hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.2rem); line-height: 1.04; letter-spacing: -.01em; max-width: 12ch; margin-bottom: .35em; }
.lp-lead { font-size: 1.16rem; color: #cfc6b2; max-width: 46ch; margin-bottom: 26px; }

.lp-race { display: grid; gap: 14px; }
.lp-lane { border-radius: var(--radius-m); padding: 16px 18px; }
.lp-old { background: var(--bg-2); border: 1px solid var(--line); }
.lp-new { background: linear-gradient(160deg, rgba(94, 201, 193, .12), rgba(94, 201, 193, .03)); border: 1px solid rgba(94, 201, 193, .45); }
.lp-lane-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; color: var(--muted); }
.lp-clock { font-family: var(--font-head); font-weight: 400; font-size: 2.6rem; line-height: 1; font-variant-numeric: tabular-nums; color: var(--muted); }
.lp-old .lp-clock { text-decoration: line-through; text-decoration-color: var(--danger); text-decoration-thickness: 3px; }
.lp-clock.fast { color: var(--ley); font-size: 3.4rem; }
.lp-steps { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; font-size: .95rem; color: #b9b2a2; }
.lp-steps li { display: grid; grid-template-columns: 3.2em 1fr; gap: 10px; animation: lp-step .5s both; animation-delay: calc(.35s * var(--i) + .2s); }
.lp-steps time { color: var(--muted); font-variant-numeric: tabular-nums; }
@keyframes lp-step { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.lp-ask { margin-top: 12px; }
.lp-q { margin: 0 0 8px; color: var(--text); }
.lp-q kbd { margin-right: 6px; }
.lp-a { margin: 0; padding: 11px 14px; border-radius: var(--radius-m); background: var(--panel); border: 1px solid var(--line); }

.lp-asks, .lp-time, .lp-start, .lp-fair { border-top: 1px solid var(--line); padding: 48px 0; }
.lp-asks h2, .lp-time h2, .lp-start h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); max-width: 26ch; }
.lp-sub { color: var(--muted); max-width: 70ch; font-size: 1.05rem; }
.lp-ask-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 34px 48px; margin-top: 30px; }
.lp-ask-grid h3 { color: var(--gold); margin-bottom: .5em; }
.lp-ask-grid ul { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; }
.lp-ask-grid li { font-family: var(--font-head); font-size: 1.12rem; color: var(--text); padding-left: 14px; border-left: 2px solid rgba(94, 201, 193, .5); }
.lp-ask-grid p { color: var(--muted); margin: 0; max-width: 46ch; }
.lp-extra { margin-top: 34px; max-width: 72ch; font-size: 1.05rem; }

.lp-time { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }

.lp-start ol { margin: 22px 0 0; padding-left: 1.4em; display: grid; gap: 12px; max-width: 70ch; font-size: 1.05rem; }
.lp-start li::marker { color: var(--gold); font-family: var(--font-head); }
.lp-start li b { color: var(--text); }
.lp-start li { color: #cfc6b2; }
.lp-fair { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; }
.lp-fair p { color: var(--muted); margin: 0; }
.lp-cta { text-align: center; padding: 56px 0 24px; border-top: 1px solid var(--line); }
.lp-cta h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin-bottom: 22px; }
@media (max-width: 900px) {
  .lp-hero, .lp-time, .lp-fair, .lp-ask-grid { grid-template-columns: 1fr; gap: 28px; }
  .lp-hero { padding: 28px 0 40px; }
  .lp-asks, .lp-time, .lp-start, .lp-fair { padding: 36px 0; }
  .lp-clock { font-size: 2.1rem; }
  .lp-clock.fast { font-size: 2.7rem; }
}

/* ---------- sign-up / checkout agreement ---------- */
.check.agree { align-items: flex-start; margin: 4px 0 16px; font-size: .93rem; line-height: 1.45; }
.check.agree input { margin-top: 2px; flex: none; }
#refundAgree { max-width: 60ch; }

/* ---------- nav badge ---------- */
.nav-badge { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: var(--gold); color: var(--gold-ink);
  font-size: .75rem; font-weight: 600; line-height: 18px; text-align: center; margin-left: 4px; }

/* ---------- admin: player page, server page ---------- */
.player-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.player-head h2 { margin: 0; }
.player-balance { color: var(--muted); }
.player-balance b { color: var(--gold); font-variant-numeric: tabular-nums; }
.seg.tabs { margin-bottom: 14px; flex-wrap: wrap; }
.tag.neg { color: var(--danger); border-color: rgba(208, 98, 90, .5); }
.conv-list { display: grid; gap: 10px; margin-top: 12px; max-height: 70vh; overflow-y: auto; }
.conv-msg { max-width: 80ch; padding: 10px 14px; border-radius: var(--radius-m); border: 1px solid var(--line); background: var(--bg-2); }
.conv-msg.from-player { background: var(--panel-2); border-color: transparent; justify-self: end; }
.conv-meta { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
.conv-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.settings-dump { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; max-height: 50vh; overflow: auto; font-size: .85rem; }
#backupPanel h3 { margin-top: 18px; }

/* ---------- Chit Chat ---------- */
.page.wide { max-width: 1240px; }
.chit { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.chit-main { display: flex; flex-direction: column; height: calc(100vh - 330px); min-height: 440px; padding: 0; position: relative; overflow: hidden; }
.chit-tabs { display: flex; align-items: center; gap: 4px; padding: 10px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chit-tabs button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; }
.chit-tabs button.on { color: var(--text); background: var(--panel-2); box-shadow: inset 0 -2px 0 var(--ley); }
.chit-note { font-size: .85rem; }
.chit-scroll { flex: 1; overflow-y: auto; padding: 8px 18px 14px; }
.chit-more { text-align: center; }
.chit-list { list-style: none; margin: 0; padding: 0; }
.chit-msg { padding: 8px 10px; border-radius: var(--radius-s); }
.chit-msg + .chit-msg { margin-top: 2px; }
.chit-msg:hover, .chit-msg:focus-within { background: var(--bg-2); }
.chit-msg.mine .chit-name { color: var(--gold); }
.chit-msg.flash-msg { background: rgba(94, 201, 193, .15); }
.chit-head { display: flex; align-items: baseline; gap: 10px; }
.chit-head time { font-size: .78rem; color: var(--muted); }
.chit-name { border: 0; background: none; padding: 0; color: var(--ley); font-weight: 600; cursor: pointer; }
.chit-name:hover { text-decoration: underline; border: 0; }
.chit-name.admin::after { content: "admin"; margin-left: 6px; font-size: .7rem; font-weight: 400; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; }
.chit-name.static { cursor: default; text-decoration: none; }
.chit-acts { margin-left: auto; display: flex; gap: 2px; opacity: 0; }
.chit-msg:hover .chit-acts, .chit-msg:focus-within .chit-acts { opacity: 1; }
.chit-acts button { padding: 1px 8px; font-size: .8rem; color: var(--muted); border-color: transparent; }
.chit-body { overflow-wrap: anywhere; margin-top: 2px; }
.chit-quote { display: block; margin: 4px 0 2px; padding: 3px 10px; border-left: 2px solid var(--line); color: var(--muted); font-size: .88rem; text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chit-quote b { color: var(--text); font-weight: 600; }
.chit-empty { text-align: center; margin: 12vh 0; }
.chit-new { position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ley); color: #10221f; border-color: var(--ley); font-weight: 600; }
.chit-compose { border-top: 1px solid var(--line); padding: 10px 14px 12px; background: var(--bg-2); }
.chit-input-row { display: flex; gap: 10px; align-items: flex-end; }
.chit-input-row textarea { resize: none; min-height: 42px; max-height: 160px; }
.chit-replying { display: flex; align-items: center; gap: 8px; font-size: .88rem; color: var(--muted); margin-bottom: 6px; padding-left: 10px; border-left: 2px solid var(--ley); }
.chit-replying span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chit-side .panel { padding: 16px 16px; }
.chit-side h2 { font-size: 1.2rem; }
.chit-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.chit-people li { display: flex; align-items: center; gap: 6px; }
.chit-people li.on .chit-person { background: var(--panel-2); }
.chit-person { flex: 1; border: 0; background: transparent; justify-content: flex-start; padding: 6px 8px; min-width: 0; }
.chit-person .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chit-people .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; }
.chit-people .dot.on { background: var(--ok); }
button.small { padding: 3px 9px; font-size: .82rem; }
.chit-menu { position: absolute; z-index: 50; min-width: 200px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 8px; display: grid; gap: 2px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.chit-menu b { padding: 2px 8px 6px; }
.chit-menu button { border: 0; background: transparent; justify-content: flex-start; padding: 6px 8px; }
.chit-menu button:hover, .chit-menu button:focus-visible { background: var(--panel); }
.chit-menu .muted { padding: 6px 8px; }
@media (max-width: 900px) {
  .chit { grid-template-columns: 1fr; }
  .chit-main { height: 72vh; }
  .chit-acts { opacity: 1; }
}

/* ---------- Social ---------- */
.social-head { margin-bottom: 18px; }
.social-head h1 { margin-bottom: .2em; }
.social-head p { color: var(--muted); margin: 0; max-width: 70ch; }
.chit-options { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.chit-opt { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: .88rem; cursor: pointer; }
.chit-opt svg { width: 15px; height: 15px; color: var(--ley); }
.chit-opt input[type=checkbox] { accent-color: var(--ley); width: 16px; height: 16px; }
.chit-opt select { width: auto; padding: 4px 8px; font-size: .88rem; }
.chit-opt:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.spot-card { display: flex; align-items: center; gap: 10px; margin-top: 6px; padding: 8px 12px; border-radius: var(--radius-s);
  border: 1px solid rgba(94, 201, 193, .35); background: rgba(94, 201, 193, .06); max-width: 560px; }
.spot-card > svg { width: 20px; height: 20px; color: var(--ley); flex: none; }
.spot-card > div { flex: 1; display: grid; min-width: 0; }
.spot-card .spot-wp { color: var(--muted); font-size: .85rem; }
.chit-head .tag { font-size: .7rem; }
.chit-people li.friend { display: grid; gap: 2px; padding: 6px 4px 8px; border-bottom: 1px solid var(--line); }
.chit-people li.friend:last-child { border-bottom: 0; }
.friend-top, .friend-bottom { display: flex; align-items: center; gap: 6px; }
.friend-bottom { justify-content: space-between; }
.chit-people .where { color: var(--text); display: inline-flex; align-items: center; gap: 4px; padding-left: 8px; font-size: .85rem; }
.chit-people .where svg { width: 13px; height: 13px; color: var(--ley); }
.chit-people li.friend > small.muted { padding-left: 8px; font-size: .82rem; }
.mini-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: .8rem; color: var(--muted); cursor: pointer; }
.mini-check input { accent-color: var(--ley); width: 14px; height: 14px; }
.chit-people .dot.hidden-status { background: transparent; border: 1px dashed var(--line); }
.chit-menu .mini-check { padding: 6px 8px 2px; max-width: 230px; }

/* front page v2: compass demo, friends box, passive list */
.lp-tagline { font-family: var(--font-head); font-size: clamp(1.4rem, 2.6vw, 1.9rem); color: var(--ley); margin: -.1em 0 .7em; }
.lp-name { color: var(--muted); font-size: .98rem; margin-top: -8px; }
.lp-go { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.lp-slogan { font-family: var(--font-head); font-size: 1.3rem; color: var(--text); margin-bottom: 14px; }
.lp-demo { display: grid; gap: 14px; }
.lp-overlay { background: linear-gradient(160deg, rgba(94, 201, 193, .10), rgba(94, 201, 193, .02)); border: 1px solid rgba(94, 201, 193, .45);
  border-radius: var(--radius-m); padding: 16px 18px; }
.lp-overlay-body { display: flex; align-items: center; gap: 18px; margin: 12px 0; }
.lp-compass { width: 128px; height: 128px; flex: none; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .35)); }
.lp-compass g[transform] { transform-origin: 60px 60px; animation: lp-needle 1.6s cubic-bezier(.3, 1.4, .5, 1) both .2s; }
@keyframes lp-needle { from { transform: rotate(-60deg); } to { transform: rotate(42deg); } }
.lp-readout { display: grid; gap: 2px; }
.lp-readout .lp-step { color: var(--muted); font-size: .88rem; }
.lp-readout b { font-family: var(--font-head); font-weight: 400; font-size: 1.35rem; }
.lp-readout .lp-dist { font-family: var(--font-head); font-size: 2.3rem; line-height: 1.05; color: var(--ley); font-variant-numeric: tabular-nums; }
.lp-ticks { display: flex; gap: 4px; margin-top: 6px; }
.lp-ticks i { width: 14px; height: 6px; border-radius: 3px; background: var(--line); }
.lp-ticks i.done { background: var(--gold); }
.lp-friends { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 18px; }
.lp-friends h3 { margin-bottom: 8px; }
.lp-friends ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.lp-friends li { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 8px; }
.lp-friends .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.lp-friends .dot.on { background: var(--ok); }
.lp-friends small { color: var(--muted); }
.lp-pill { font-size: .78rem; padding: 2px 10px; border-radius: 999px; background: var(--gold); color: var(--gold-ink); font-weight: 600; }
.lp-friends-q { margin: 12px 0 0; font-family: var(--font-head); font-size: 1.05rem; }
.lp-friends-q span { display: block; font-family: var(--font-body); font-size: .9rem; color: var(--muted); }
.lp-time .lp-race { margin: 0; }
.lp-passive { border-top: 1px solid var(--line); padding: 48px 0; }
.lp-passive h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); max-width: 26ch; }
.lp-passive-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 40px; }
.lp-passive-list li { padding-left: 16px; border-left: 2px solid var(--gold); color: #cfc6b2; }
.lp-passive-list b { color: var(--text); font-weight: 600; }
@media (max-width: 900px) {
  .lp-passive-list { grid-template-columns: 1fr; }
  .lp-overlay-body { gap: 12px; }
  .lp-compass { width: 104px; height: 104px; }
  .lp-friends li { grid-template-columns: auto auto 1fr; }
  .lp-friends .lp-pill { display: none; }
  .lp-passive { padding: 36px 0; }
}

/* Scout page: "Passive mode" sub-heading; settings: experimental tag */
.jsub { font-family: var(--font-head); font-weight: 400; font-size: 1rem; color: var(--text); margin: 14px 0 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.tag.exp { color: var(--gold); border-color: rgba(217, 164, 65, .5); font-weight: 400; font-size: .72rem; margin-left: 4px; vertical-align: middle; }
.lp-offer { display: inline-block; margin-top: 14px; padding: 6px 12px; border-radius: var(--radius-s); border: 1px dashed rgba(217, 164, 65, .6);
  color: var(--text); font-size: .95rem; }
.lp-offer b { color: var(--gold); }
.code-input { font-size: 1.6rem; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.change-email { margin-top: 10px; }
.change-email summary { cursor: pointer; }

/* community credits pool */
.lp-pool { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center;
  border-top: 1px solid var(--line); padding: 48px 0; }
.lp-pool h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.lp-pool .lp-sub b { color: var(--gold); }
.lp-pool-stats { display: grid; gap: 14px; margin: 0; padding: 22px 26px; border-left: 3px solid var(--gold); }
.lp-pool-stats div { display: grid; }
.lp-pool-stats dt { color: var(--muted); font-size: .92rem; }
.lp-pool-stats dd { margin: 0; font-family: var(--font-head); font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.1;
  color: var(--gold); font-variant-numeric: tabular-nums; }
.lp-pool-stats dd small { font-family: var(--font-body); font-size: .95rem; color: var(--muted); }
.lp-lane-text { margin: 10px 0 0; font-size: 1.1rem; color: var(--text); }
.lp-old .lp-lane-text { color: #b9b2a2; }
.buy-for { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 4px 0 6px; }
.buy-for .check { margin: 0; }
.buy-for input { accent-color: var(--gold); }
.pool-stats { margin: 6px 0 12px; }
.pool-mine { color: var(--text); }
@media (max-width: 900px) { .lp-pool { grid-template-columns: 1fr; gap: 24px; padding: 36px 0; } }

/* Settings → Build damage estimate */
.est-results { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.est-results button { text-align: left; padding: 6px 8px; font-size: .9rem; }
.est-results button small { display: block; color: var(--muted); }
.est-now { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--panel-2); }
.est-now .big { font-size: 1.4rem; font-weight: 600; }
.est-now dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 12px; margin: 8px 0 0; font-size: .9rem; }
.est-now dt { color: var(--muted); }
.est-rows { border-top: 1px solid var(--line); padding-top: 6px; margin-top: 6px; }

/* Scout page: "get the companion" notice until it has connected once */
.keep-open-bar.comp-needed { border-left: 3px solid var(--gold); background: rgba(217, 164, 65, .12); }
.keep-open-bar.comp-needed .btn { margin-left: 8px; padding: 3px 12px; font-size: .85rem; color: var(--gold-ink); }
.lp-credits-note { font-size: .9rem; opacity: .9; }
/* Settings profiles */
.prof-row { flex-wrap: wrap; gap: 8px; }
.prof-row select, .prof-row input { flex: 1 1 180px; min-width: 0; }
/* Admin → Server: updates & scheduled backups */
.ops-log { max-height: 320px; overflow: auto; font-size: .78rem; white-space: pre-wrap; background: var(--panel-2); padding: 10px; border-radius: var(--radius-s); }
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn, .row-actions button { padding: 3px 10px; font-size: .85rem; }
.ops-alert { margin-bottom: 18px; }
.ops-alert .btn-ghost { padding: 0 6px; }

/* Front page: how Scout works (ask → research with AI credits → answer), free voice and what this browser can do */
.lp-how { border-top: 1px solid var(--line); padding: 48px 0; }
.lp-how h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.lp-flow { list-style: none; margin: 26px 0 0; padding: 0; display: grid; align-items: stretch;
           grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1.15fr) 64px minmax(0, 1fr); }
.lp-step { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px;
           display: flex; flex-direction: column; gap: 8px; position: relative; }
.lp-step b { font-family: var(--font-head); font-size: 1.15rem; }
.lp-step span:not(.lp-ico):not(.lp-credit) { color: var(--muted); }
.lp-ico { font-size: 2rem; line-height: 1; width: 52px; height: 52px; display: grid; place-items: center;
          border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line); }
.lp-step-ai { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(217, 164, 65, .25), 0 10px 30px rgba(217, 164, 65, .08); }
.lp-step-ai .lp-ico { animation: lp-think 2.4s ease-in-out infinite; border-color: var(--gold); }
.lp-credit { align-self: flex-start; margin-top: auto; padding: 3px 12px; border-radius: 999px; font-size: .88rem;
             font-weight: 600; background: var(--gold); color: var(--gold-ink); }
.lp-arrow { display: flex; align-items: center; justify-content: center; gap: 6px; }
.lp-arrow i { width: 8px; height: 8px; border-radius: 50%; background: var(--ley); opacity: .25;
              animation: lp-dots 1.5s infinite; }
.lp-arrow i:nth-child(2) { animation-delay: .25s; }
.lp-arrow i:nth-child(3) { animation-delay: .5s; }
@keyframes lp-dots { 0%, 100% { opacity: .2; transform: scale(.8); } 40% { opacity: 1; transform: scale(1.15); } }
@keyframes lp-think { 0%, 100% { transform: rotate(-6deg); } 50% { transform: rotate(6deg) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .lp-arrow i, .lp-step-ai .lp-ico { animation: none; opacity: 1; } }
.lp-how-note { color: var(--muted); margin: 18px 0 0; }
.lp-free { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; margin-top: 36px;
           align-items: start; }
.lp-free h3 { margin: 0 0 8px; }
.lp-free p { color: var(--muted); margin: 0 0 14px; }
.lp-free-table { width: 100%; border-collapse: collapse; }
.lp-free-table th, .lp-free-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lp-free-table thead th { color: var(--muted); font-weight: 500; font-size: .9rem; }
.lp-free-table tbody th small { display: block; font-weight: 400; color: var(--muted); }
.lp-free-table td { color: var(--ley); white-space: nowrap; }
.lp-free-table td:last-child { color: var(--gold, #e6b84a); }
.lp-voice-note { border-left: 3px solid var(--gold, #e6b84a); padding: 8px 12px; background: rgba(230,184,74,.08); border-radius: 6px; color: var(--text) !important; }
.ai-disclaimer { margin: 6px 0 0; font-size: .8rem; color: var(--muted); text-align: center; }
.ai-disclaimer.after-msgs { margin: 0 0 6px; }
.lp-yours { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--ley);
            border-radius: var(--radius-m); padding: 18px 20px; }
.lp-yours ul { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.lp-yours li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.lp-cap-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem;
              background: var(--panel-2); color: var(--muted); }
.lp-yours li.yes .lp-cap-dot { background: var(--ok, #4caf7a); color: #08130c; }
.lp-yours li.no { color: var(--muted); font-weight: 400; text-decoration: line-through; }
.lp-yours p { margin: 0; }
@media (max-width: 900px) {
  .lp-flow { grid-template-columns: 1fr; }
  .lp-arrow { height: 40px; flex-direction: column; }
  .lp-free { grid-template-columns: 1fr; gap: 24px; }
  .lp-how { padding: 36px 0; }
}
@media (max-width: 600px) { .lp-free-table td { white-space: normal; } .lp-free-table th, .lp-free-table td { padding: 8px 6px; } }
/* Front page: live average cost per question */
.lp-cost { border-top: 1px solid var(--line); padding: 48px 0; }
.lp-cost h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.lp-cost-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin: 22px 0 16px; }
.lp-cost-hour { border-left-color: var(--gold); }
.lp-hour-note { margin-top: 4px; }
.lp-cost-main, .lp-cost-free { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m);
                               padding: 22px 24px; display: grid; gap: 4px; }
.lp-cost-main { border-left: 3px solid var(--gold); }
.lp-cost-free { border-left: 3px solid var(--ley); }
.lp-cost-label { color: var(--muted); font-size: .95rem; }
.lp-cost-big { font-family: var(--font-head); font-size: clamp(2rem, 4.5vw, 2.8rem); line-height: 1.1; color: var(--gold); }
.lp-cost-free .lp-cost-big { color: var(--ley); }
.lp-cost-big small { font-family: var(--font-body); font-size: 1rem; color: var(--muted); }
.lp-cost-usd { font-weight: 600; }
@media (max-width: 700px) { .lp-cost-grid { grid-template-columns: 1fr; } .lp-cost { padding: 36px 0; } }
.row-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0; }
.lp-trim { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 28px; margin: 4px 0 10px; }
.lp-trim label { display: grid; gap: 6px; color: var(--muted); font-size: .95rem; }
.lp-trim label b { color: var(--text); }
.lp-trim input[type=range] { width: 100%; accent-color: var(--gold); }
.lp-costway { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 26px; }
.lp-costway-side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 20px 22px; }
.lp-costway-side h3 { margin: 0 0 10px; font-size: 1.15rem; display: flex; align-items: center; gap: 8px; }
.lp-down { border-top: 3px solid var(--ley); }
.lp-down h3 span { color: var(--ley); }
.lp-up { border-top: 3px solid var(--gold); }
.lp-up h3 span { color: var(--gold); }
.lp-costway-side ul { margin: 0 0 12px; padding-left: 1.1em; display: grid; gap: 6px; }
.lp-costway-ex { margin: 0; font-style: italic; }
.lp-costway-ex span { font-style: normal; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em;
                      color: var(--muted); margin-right: 6px; }
@media (max-width: 700px) { .lp-trim, .lp-costway { grid-template-columns: 1fr; } }
.lp-dist { position: relative; margin: 4px 0 18px; padding: 26px 0 0; }
.lp-dist svg { display: block; width: 100%; height: 170px; overflow: visible; }
.lp-dist-all { fill: var(--panel-2); }
.lp-dist-kept { fill: color-mix(in srgb, var(--gold) 38%, transparent); }
.lp-dist-line { fill: none; stroke: var(--gold); stroke-width: 2; vector-effect: non-scaling-stroke; }
.lp-dist-avg { stroke: var(--text); stroke-width: 2; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.lp-dist-tag { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; font-size: .85rem;
               font-weight: 600; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; }
.lp-dist-tag.right { transform: translateX(-100%); }
.lp-dist figcaption { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: .85rem;
                      border-top: 1px solid var(--line); padding-top: 6px; }
.lp-dist.waiting .lp-dist-tag, .lp-dist.waiting .lp-dist-avg { opacity: 0; }
.lp-dist-tag, .lp-dist-avg { transition: opacity .6s ease .9s; }
@media (max-width: 700px) { .lp-dist svg { height: 130px; } .lp-dist figcaption span:nth-child(2) { display: none; } }
.pc-list { display: grid; gap: 8px; margin: 0; }
.pc-list > div { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 12px; }
.pc-list dt { color: var(--muted); }
.pc-list dd { margin: 0; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; text-align: right; }
.pc-list dd.pc-wait { flex-basis: 100%; text-align: left; font-weight: 400; color: var(--muted); font-size: .85rem; font-style: italic; }
/* Social: event feed posts, commander posts, the Events panel */
.chit-msg.feed { background: color-mix(in srgb, var(--panel-2) 70%, transparent); border-left: 3px solid var(--gold);
                 padding: 8px 12px; border-radius: var(--radius-s); }
.chit-msg.feed.meta { border-left-color: var(--ley); }
.chit-msg.feed.done { opacity: .55; }
.feed-row { display: flex; align-items: center; gap: 10px; }
.feed-icon { font-size: 1.2rem; line-height: 1; width: 1.4em; text-align: center; flex: none; }
.feed-main { flex: 1; min-width: 0; }
.feed-main .chatlink { margin-left: 4px; }
.feed-kind { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.feed-when { flex: none; font-size: .85rem; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.soon > .feed-when, .soon .feed-when { color: var(--gold); font-weight: 600; }
.live > .feed-when, .live .feed-when { color: var(--ok); font-weight: 600; }
.chit-msg.commander { border-left: 3px solid var(--ok); padding-left: 10px; }
.cmd-tag { border-color: var(--ok); color: var(--ok); }
.ev-feeds { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.ev-hint { font-size: .82rem; margin: 6px 0 8px; }
.ev-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ev-item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 8px; align-items: start;
           padding: 6px 4px; border-bottom: 1px solid var(--line); }
.ev-item:last-child { border-bottom: 0; }
.ev-item small { display: block; }
.ev-item .chatlink { font-size: .78rem; }
.ev-item .feed-when { grid-column: 2; font-size: .8rem; white-space: normal; }
.ev-item .feed-icon { grid-row: span 2; padding-top: 2px; }
.ev-src { font-size: .75rem; margin: 8px 0 0; }
@media (max-width: 600px) { .feed-row { flex-wrap: wrap; } .feed-when { flex-basis: 100%; padding-left: 2em; } }
.ev-wp { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: .85rem; margin-top: 2px; }
.ev-wp .btn-ghost.small { padding: 1px 8px; }
.feed-main .ev-wp { margin-left: 0; }

/* chat controls: the input first, then Clear chat (far from Send) and the push-to-talk status, compact */
.composer .hint { align-items: center; gap: 6px 16px; }
.composer .clear-chat { padding: 2px 8px; font-size: .8rem; color: var(--muted); border: 1px solid var(--line); }
.composer .clear-chat:hover { color: var(--danger); border-color: var(--danger); }
.composer .ptt-bar { margin: 8px 0 0; padding: 6px 10px; gap: 10px; }
.composer .ptt-bar .ptt-icon { width: 28px; height: 28px; }
.composer .ptt-bar .ptt-icon svg { width: 15px; height: 15px; }
.composer .ptt-bar .ptt-text b { font-size: .88rem; }
.composer .ptt-bar .ptt-text span { font-size: .78rem; }
.composer .ptt-bar .ptt-btn { padding: 4px 12px; font-size: .85rem; }
@media (max-width: 640px) {
  .composer { padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
  .composer form { gap: 8px; }
  .composer textarea { min-height: 44px; font-size: 16px; }   /* 16px: phones don't zoom into the field */
  .composer .mic, .composer #sendBtn { min-height: 44px; }
  .composer .hint { margin-top: 8px; font-size: .78rem; }
  .composer .ptt-bar { flex-wrap: nowrap; }
  .composer .ptt-bar .ptt-text span { display: none; }       /* the title says enough on a phone */
  .composer .ptt-bar .ptt-text b { font-size: .82rem; }
  .composer .ptt-bar .ptt-btn { width: auto; flex: none; }
  .chit-compose { padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
  .chit-input-row textarea { font-size: 16px; min-height: 44px; }
  .composer-bar #sendBtn { min-height: 44px; }
  .chit-options { gap: 8px 14px; margin-top: 6px; }
  .chit-opt { font-size: .82rem; }
  #charCount { flex-basis: 100%; }
  .composer .hint { margin-top: 0; }
}
/* forgot password */
.forgot-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; align-items: start; }
.forgot-ways.one { grid-template-columns: 1fr; }
.forgot-way { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px 16px; background: var(--bg-2); }
.forgot-way h2 { font-size: 1.1rem; margin: 0 0 10px; }
.forgot-alt { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; }
@media (max-width: 700px) { .forgot-ways { grid-template-columns: 1fr; } }
/* Credits: who the credits are for */
.buy-for-title { margin: 18px 0 8px; font-size: 1.05rem; }
.buy-for-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.buy-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin: 0; cursor: pointer;
            border: 2px solid var(--line); border-radius: var(--radius-m); background: var(--bg-2);
            transition: border-color .15s, background .15s; }
.buy-card input { position: absolute; opacity: 0; pointer-events: none; }
.buy-card b { display: block; font-size: 1.05rem; margin-bottom: 2px; }
.buy-card small { color: var(--muted); line-height: 1.35; display: block; }
.buy-icon { font-size: 1.6rem; line-height: 1; flex: none; }
.buy-card:hover { border-color: var(--muted); }
.buy-card.me:has(input:checked) { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--bg-2)); }
.buy-card.pool:has(input:checked) { border-color: var(--ley); background: color-mix(in srgb, var(--ley) 12%, var(--bg-2)); }
.buy-card:has(input:checked) b::after { content: "  ✔"; }
.buy-card:has(input:focus-visible) { outline: 2px solid var(--ley); outline-offset: 2px; }
.history-note { font-size: .88rem; margin: -4px 0 10px; }
@media (max-width: 640px) { .buy-for-cards { grid-template-columns: 1fr; } }
.sum-h { font-size: 1rem; color: var(--muted); margin: 6px 0 8px; font-weight: 600; }
#summaryPanel .stats { margin-bottom: 14px; }
#log thead tr.totals th { background: var(--panel-2); color: var(--gold); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Admin → Server → Scheduled backups: name a backup made now */
.bk-now { margin-top: 14px; }
.bk-now .row input { flex: 1 1 220px; min-width: 0; }
.bk-now .row button { flex: 0 0 auto; }
.bk-now small { display: block; margin-top: 4px; }

/* footer: social links (each platform's logo, from Simple Icons, CC0) */
.site-footer .socials { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px;
  margin: 12px auto 10px; max-width: 900px; }
.site-footer .socials-title { color: var(--text); font-weight: 600; font-size: .9rem; margin-right: 2px; }
.site-footer a.social { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--panel-2, rgba(255,255,255,.06)); border: 1px solid rgba(255,255,255,.14); color: var(--text);
  font-size: .92rem; font-weight: 600; text-decoration: none; transition: transform .12s, border-color .12s, background .12s; }
.site-footer a.social:hover, .site-footer a.social:focus-visible { transform: translateY(-1px); border-color: var(--brand);
  background: rgba(255,255,255,.1); }
.social-ico { width: 20px; height: 20px; flex: 0 0 20px; background: var(--brand); -webkit-mask: var(--ico) center / contain no-repeat;
  mask: var(--ico) center / contain no-repeat; }
.social-youtube { --brand: #FF0000; }
.social-instagram { --brand: #FF0069; }
.social-twitch { --brand: #9146FF; }
.social-x { --brand: var(--text); }
.site-footer .wiki-attribution { font-size: .76rem; line-height: 1.5; opacity: .9; }

/* Admin → Site info: search result and link preview */
.seo-preview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 16px; align-items: start; margin: 6px 0 4px; }
@media (max-width: 760px) { .seo-preview { grid-template-columns: 1fr; } }
.serp { background: #fff; color: #202124; border-radius: 10px; padding: 14px 16px; font-family: Arial, sans-serif; }
.serp-url { font-size: 13px; color: #4d5156; }
.serp-title { font-size: 19px; line-height: 1.3; color: #1a0dab; margin: 4px 0 3px; }
.serp-desc { font-size: 14px; line-height: 1.5; color: #4d5156; }
.card-pv { border: 1px solid var(--line, #2c3846); border-radius: 10px; overflow: hidden; background: #1e2329; }
.card-img { aspect-ratio: 1200 / 630; background: #2b3138 center / cover no-repeat; display: grid; place-items: center;
            color: #8a949e; font-size: 13px; }
.card-img.has span { display: none; }
.card-body { padding: 10px 12px; font-family: Arial, sans-serif; }
.card-host { font-size: 12px; color: #8a949e; text-transform: lowercase; }
.card-title { font-size: 15px; font-weight: 600; color: #e8eaed; margin: 2px 0; }
.card-desc { font-size: 13px; color: #b0b6bc; line-height: 1.4; }
#seoColorPick { width: 46px; min-width: 46px; height: 40px; padding: 2px; }
#seoColor { flex: 1; }
.chit-msg[hidden] { display: none !important; }

/* Admin → Site info: link preview picture */
.pv-upload { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pv-thumb { width: 300px; max-width: 100%; aspect-ratio: 1200 / 630; border-radius: 8px; border: 1px solid var(--line);
            background: var(--panel-2) center / cover no-repeat; display: grid; place-items: center; color: var(--muted);
            font-size: .85rem; flex: 0 0 auto; }
.pv-thumb.has span { display: none; }
.pv-controls { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }
.pv-url { margin-top: 8px; }
.pv-url summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
.pv-url input { margin-top: 6px; }

/* Admin → Site info: overlay header preview (on the overlay's default background) */
.oh-preview { position: relative; background: rgba(16, 22, 29, .92); border: 1px solid var(--line); border-radius: 10px;
              padding: 10px 34px; margin: 4px 0 12px; text-align: center; font-weight: 700; font-family: sans-serif;
              text-shadow: 1px 1px 0 rgba(0, 0, 0, .75); max-width: 360px; }
.oh-arrow { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 11px; color: #5ec9c1; }
#ohColorPick { width: 46px; min-width: 46px; height: 40px; padding: 2px; }
#ohColor { flex: 1; min-width: 0; }
#ohSize { width: 100%; display: block; margin: 8px 0 4px; accent-color: var(--gold); }
.obs-how { margin-top: 8px; } .obs-how summary { cursor: pointer; color: var(--muted); } .obs-how ol { margin: 6px 0 0 1.2em; padding: 0; } .obs-how li { margin: 3px 0; }

/* Social → Groups */
.grp-voice-ind { margin: 0 0 8px; font-size: .85rem; font-weight: 600; }
.grp-voice-ind.ok { color: var(--teal, #5ec9c1); }
.grp-voice-ind.no { color: var(--muted); }
.grp-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.grp-item, .grp-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--panel-2); }
.grp-top { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.grp-top b { font-size: 1rem; }
.grp-desc { margin: 4px 0; font-size: .88rem; color: var(--muted); white-space: pre-wrap; }
.grp-roles { display: flex; flex-wrap: wrap; gap: 4px; margin: 4px 0; }
.grp-acts { gap: 8px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
.grp-pick { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.grp-pick p { width: 100%; margin: 0; }
.grp-form { margin-top: 10px; }
.grp-role-row { gap: 6px; margin-bottom: 6px; flex-wrap: nowrap; }
.grp-leader { margin: 8px 0; font-size: .9rem; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.grp-members { list-style: none; margin: 6px 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.grp-members li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .92rem; }
.grp-members .grp-name { font-weight: 600; }
.grp-mod { width: auto; padding: 2px 6px; font-size: .85rem; }
.grp-voice { gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.grp-bans { margin-top: 8px; font-size: .88rem; }
.tag.brb { background: #f2b84a33; }
.chit-msg.grp-sys { font-size: .85rem; text-align: center; padding: 2px 0; }
.grp-acts select { width: auto; padding: 2px 6px; }
.grp-acts .row-inline { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.grp-voice .check { margin: 0; }
/* Social → My groups / Public groups (groups.js) */
.grp-my { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.grp-myrow { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; width: 100%; text-align: left; padding: 5px 10px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); color: inherit; font-weight: 400; }
.grp-myrow > .muted { order: 3; width: 100%; font-size: .78rem; }
.grp-myrow:hover { border-color: rgba(94, 201, 193, .5); }
.grp-myrow.on { border-color: var(--ley); background: rgba(94, 201, 193, .12); }
.grp-myname { font-weight: 600; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grp-unread { background: var(--ley); color: #0d1a1c; border-radius: 999px; font-size: .72rem; font-weight: 700; padding: 0 7px; }
.grp-new-row { margin: 8px 0 0; }
.grp-sub { margin: -2px 0 6px; display: block; }
.grp-away { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.grp-away input[type="number"] { width: 3.3em; padding: 3px 4px; }
.grp-away span { color: var(--muted); font-size: .85rem; margin-right: 4px; }
.grp-invite { margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.grp-owner { margin-top: 8px; font-size: .9rem; }
.grp-owner summary { cursor: pointer; color: var(--muted); }
.grp-owner .check { margin: 6px 0; }
.grp-filter { width: 100%; margin-bottom: 6px; padding: 3px 6px; font-size: .85rem; }
.grp-pub { list-style: none; margin: 0 0 8px; padding: 0; max-height: 360px; overflow-y: auto; }
.grp-prow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.grp-prow:last-child { border-bottom: 0; }
.grp-prow.flash { animation: copied-blink 1.4s steps(2) 1; }
.grp-prow-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 6px; background: none; border: 0; padding: 3px 2px;
  color: inherit; text-align: left; font-weight: 400; cursor: pointer; }
.grp-prow-main { flex-wrap: wrap; column-gap: 6px; row-gap: 0; }
.grp-prow-main b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 100%; min-width: 0; }
.grp-prow-main .muted { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; font-size: .78rem; }
.grp-count { font-size: .82rem; font-variant-numeric: tabular-nums; }
.grp-prow .btn-primary.small { padding: 1px 9px; }
.grp-pdetail { width: 100%; padding: 0 2px 4px; }
.grp-prow .grp-pick { width: 100%; }
.grp-code { gap: 6px; margin-top: 6px; flex-wrap: nowrap; }
.grp-code input { flex: 1; min-width: 0; text-transform: uppercase; }
.grp-post-card { border: 1px solid rgba(94, 201, 193, .4); border-radius: 10px; padding: 6px 10px; margin-top: 4px; background: var(--panel-2); }
.grp-fold > .grp-fold-body { display: none; }
.grp-fold.sec-open > .grp-fold-body { display: block; }
.grp-fold-head { gap: 6px; margin: 4px 0; }
.grp-fold-head h3, .grp-fold-head h4 { margin: 0; font-size: .98rem; font-family: inherit; font-weight: 700; }
.grp-fold-head h4 { font-size: .9rem; color: var(--muted); }
.grp-fold-head .sec-toggle { width: 18px; height: 18px; }
.grp-fold-head .sec-toggle::before { left: 4px; top: 4px; }
.grp-fold.sec-open > .grp-fold-head .sec-toggle::before { transform: rotate(45deg); top: 2px; }
#grpForm.grp-fold > .grp-fold-head { margin-bottom: 8px; }
.grp-hms { display: inline-flex; align-items: center; gap: 2px; }
.grp-hms input { width: 3.4em; padding: 2px 4px; text-align: center; font-variant-numeric: tabular-nums; }
.grp-settings { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 6px; }
.grp-settings .check { margin: 4px 0; }
.grp-invite-row { gap: 6px; flex-wrap: nowrap; margin: 4px 0; }
.grp-invite-row select { flex: 1; min-width: 0; padding: 2px 6px; }
#codeFold { margin: 8px 0 0; }
/* My groups: one box per group (head with arrow; the open group's details inside) */
.grp-box { list-style: none; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); padding: 4px 10px; }
.grp-box.on { border-color: rgba(94, 201, 193, .6); }
.grp-myhead { display: flex; flex-wrap: wrap; align-items: center; column-gap: 6px; row-gap: 0; margin: 2px 0; }
.grp-myhead .sec-toggle { width: 18px; height: 18px; }
.grp-myhead .sec-toggle::before { left: 4px; top: 4px; }
.grp-box.sec-open > .grp-myhead .sec-toggle::before { transform: rotate(45deg); top: 2px; }
.grp-myhead .grp-myname { flex: 1; min-width: 0; }
.grp-mymeta { width: 100%; padding-left: 24px; font-size: .78rem; }
.grp-box > .grp-fold-body { padding: 4px 0 6px; border-top: 1px solid var(--line); margin-top: 4px; }
/* Join with an invite code: an outlined box */
#codeFold { border: 1px solid rgba(94, 201, 193, .55); border-radius: 10px; padding: 4px 10px; background: rgba(94, 201, 193, .06); }
#codeFold.sec-open { padding-bottom: 10px; }
/* the join form (a role, and whether push-to-talk talks to the group) */
.grp-pick { flex-direction: column; align-items: flex-start; gap: 4px; }
.grp-pick .check { margin: 0; }
.grp-pick-q { margin: 0; }
.grp-post .grp-pick { margin-top: 6px; }
/* Social → Who hears me */
.talk-toggles { display: flex; flex-wrap: wrap; gap: 6px; }
.talk-btn { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); font-weight: 600; font-size: .85rem; }
.talk-btn.on { color: var(--ley); border-color: var(--ley); background: rgba(94, 201, 193, .12); }
.talk-hint { margin: 0 0 8px; }
.talk-private { gap: 6px; margin-top: 8px; flex-wrap: nowrap; align-items: center; }
.talk-private select { flex: 1; min-width: 0; padding: 3px 6px; }
/* front page: what's free, right under the tagline */
.lp-highlights { list-style: none; margin: 0 0 1em; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.lp-highlights li { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 12px;
  border: 1px solid rgba(217, 164, 65, .65); background: linear-gradient(135deg, rgba(217, 164, 65, .18), rgba(94, 201, 193, .10));
  box-shadow: 0 0 0 1px rgba(217, 164, 65, .12), 0 6px 18px rgba(0, 0, 0, .25); }
.lp-highlights b { display: block; color: var(--gold); font-size: 1.08rem; letter-spacing: .01em; }
.lp-highlights small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.3; }
.lp-hl-ico { font-size: 1.35rem; line-height: 1; color: var(--gold); }
@media (max-width: 560px) { .lp-highlights li { flex: 1 1 100%; } }
/* top bar: the uploaded logo (Admin → Site info → Logo & favicon) */
.brand .brand-logo { width: 28px; height: 28px; object-fit: contain; flex: none; }
/* Admin → Site info → Logo & favicon */
.logo-previews { display: flex; flex-direction: column; gap: 8px; flex: 0 0 auto; }
.logo-thumb { width: 128px; height: 128px; border-radius: 12px; border: 1px solid var(--line); display: grid; place-items: center;
  color: var(--muted); font-size: .85rem;
  background: repeating-conic-gradient(#ffffff10 0% 25%, transparent 0% 50%) 0 0 / 16px 16px, var(--panel-2); }
.logo-thumb img { max-width: 112px; max-height: 112px; }
.logo-tab, .logo-bar { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px 8px 0 0;
  background: #2b313a; color: #e8e8e8; font-size: .8rem; max-width: 260px; }
.logo-bar { border-radius: 8px; background: var(--panel-2); font-family: var(--font-head); font-size: 1rem; color: var(--text); }
.logo-tab img { width: 16px; height: 16px; }
.logo-bar img { width: 26px; height: 26px; object-fit: contain; }
.logo-tab span, .logo-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Scout page → Overlays → Stream overlay (OBS) */
.ov-obs-acts { gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.ov-obs-acts .btn, .ov-obs-acts button { padding: 3px 9px; font-size: .82rem; }

/* front page: what's free (no credits) vs the AI answers (credits) */
.lp-gratis { border-top: 1px solid var(--line); padding: 52px 0 44px; }
.lp-gratis-head { text-align: center; max-width: 760px; margin: 0 auto 28px; }
.lp-gratis-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: 10px 0 8px; }
.lp-gratis-head p { color: var(--muted); margin: 0; font-size: 1.05rem; }
.lp-gratis-badge { display: inline-block; padding: 3px 14px; border-radius: 999px; background: var(--ok); color: #10200f;
  font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; }
.lp-gratis-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 20px; align-items: stretch; }
.lp-premium { position: relative; padding: 22px 22px 20px; border-radius: var(--radius-m); border: 1px solid rgba(217, 164, 65, .65);
  background: linear-gradient(160deg, rgba(217, 164, 65, .16), rgba(217, 164, 65, .04)); display: flex; flex-direction: column; }
.lp-premium-tag { align-self: flex-start; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--gold); color: var(--gold);
  font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.lp-premium h3 { color: var(--gold); font-size: 1.35rem; margin: 0 0 8px; }
.lp-premium p { margin: 0 0 10px; }
.lp-premium-note { color: var(--muted); font-size: .92rem; margin-top: auto !important; }
.lp-gratis-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lp-gratis-list li { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; padding: 12px 14px;
  border-radius: var(--radius-m); background: var(--panel); border: 1px solid rgba(127, 191, 122, .35); }
.lp-gratis-list .ico { grid-row: span 2; font-size: 1.5rem; line-height: 1; }
.lp-gratis-list b { color: var(--text); }
.lp-gratis-list b::after { content: "FREE"; margin-left: 8px; padding: 1px 6px; border-radius: 4px; background: rgba(127, 191, 122, .18);
  color: var(--ok); font-size: .66rem; font-weight: 700; letter-spacing: .06em; vertical-align: 2px; }
.lp-gratis-list small { color: var(--muted); font-size: .86rem; line-height: 1.35; }
@media (max-width: 900px) { .lp-gratis-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .lp-gratis-list { grid-template-columns: 1fr; } .lp-gratis { padding: 36px 0 28px; } }
.lp-gratis-more { display: flex; align-items: center; gap: 14px; margin: 18px auto 0; max-width: 820px; padding: 14px 20px;
  border-radius: var(--radius-m); border: 1px dashed rgba(94, 201, 193, .55); background: rgba(94, 201, 193, .07); }
.lp-gratis-more .ico { font-size: 1.7rem; line-height: 1; }
.lp-gratis-more p { margin: 0; color: var(--muted); }
.lp-gratis-more b { color: var(--ley); }
.lp-premium { align-self: start; }
.lp-premium .lp-premium-note { margin-top: 6px !important; }
/* Admin → AI models: the picked models' prices under each card */
.model-slots .stat .slot-price { display: block; font-size: .85rem; margin-top: 4px; line-height: 1.4; }
.model-slots .stat .slot-price > * { display: inline; font-size: inherit; margin: 0; }
.model-slots .stat .slot-price b { color: var(--text); font-weight: 700; }
.model-slots .stat .slot-price span { color: var(--muted); }

/* Updates page */
.updates .upd { border-top: 1px solid var(--line, rgba(255,255,255,.1)); padding-top: 12px; margin-top: 14px; }
.updates .upd h3 { margin: 0 0 8px; font-size: 1.05rem; }
.updates .upd-date { color: var(--gold, #d9a441); }
.updates ul { margin: 0; padding-left: 1.1em; line-height: 1.6; }
.updates li { margin: 4px 0; }
.updates .upd-tag { display: inline-block; font-size: .72rem; font-weight: 700; padding: 0 7px; border-radius: 999px;
                    margin-right: 4px; vertical-align: 1px; text-transform: uppercase; letter-spacing: .03em; }
.updates .upd-tag.new { background: rgba(94, 201, 193, .18); color: #5ec9c1; }
.updates .upd-tag.improved { background: rgba(217, 164, 65, .18); color: #d9a441; }
.updates .upd-tag.fixed { background: rgba(160, 170, 185, .18); color: #b9c2cf; }
.burger.has-new { position: relative; }
.burger.has-new::after { content: ""; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%;
                         background: var(--gold, #d9a441); }

/* Settings → Trading Post alerts, daily / weekly checklists */
.tp-add { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 10px 0 30px; }
.tp-add .field { margin-bottom: 0; }
.tp-add .tp-item { flex: 1 1 240px; position: relative; }
/* (the picked item's rarity and price sit under its box, so every box and the button stay on one line) */
.tp-add .tp-item small { position: absolute; left: 0; top: 100%; margin-top: 4px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tp-add input, .tp-add select, .tp-add > button { height: 44px; box-sizing: border-box; margin: 0; }
.tp-add .coins { display: inline-flex; align-items: center; gap: 4px; }
.tp-add .coins input { width: 4.6em; }
.tp-add .cg { color: #e6b84a; } .tp-add .cs { color: #c0c0c0; } .tp-add .cc { color: #c27c4a; }
.tp-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.tp-table th, .tp-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tp-table td.r { text-align: right; white-space: nowrap; }
.tp-table tr.hit td { background: rgba(217, 164, 65, .08); }
.tp-hit { color: var(--gold); font-size: .85rem; }
.tag-auto { color: var(--ley); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; margin-left: 4px; }
@media (max-width: 600px) { .tp-table th:nth-child(4), .tp-table td:nth-child(4) { display: none; } }

/* Planner */
.planner { max-width: 1100px; margin: 0 auto; }
.pl-title { margin: 0 0 4px; }
.pl-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.pl-tabs button { background: transparent; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.pl-tabs button[aria-selected="true"] { border-color: var(--gold); color: var(--gold); background: rgba(217, 164, 65, .08); }
.pl-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin: 10px 0 18px; }
.pl-form .field { min-width: 260px; margin-bottom: 0; }
.pl-form .field select, .pl-form .field input { height: 44px; box-sizing: border-box; }
.pl-form > button, .pl-form > .btn { height: 44px; box-sizing: border-box; margin: 0; }
.pl-cost { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.pl-cost > div { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.pl-cost b { font-size: 1.2rem; color: var(--gold); }
.pl-scroll { overflow-x: auto; }
.pl-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.pl-table th, .pl-table td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.pl-table th { color: var(--muted); font-weight: 500; }
.pl-table td.ok { color: var(--ley); }
.pl-list { list-style: none; padding: 0; } .pl-list li { padding: 4px 0; }
.pl-done { color: var(--ley); font-size: 1.1rem; }
.pl-disclaimer { border-left: 3px solid var(--gold); padding: 8px 12px; background: rgba(217, 164, 65, .08); border-radius: 6px; }
.pl-tag { display: inline-block; border-radius: 4px; padding: 1px 6px; font-size: .8rem; border: 1px solid var(--line); white-space: nowrap; }
.pl-tag.tp { color: var(--gold); } .pl-tag.vendor { color: #c27c4a; } .pl-tag.salvage { color: #9fb7ff; }
.pl-tag.keep { color: var(--ley); } .pl-tag.merchant { color: #d68be0; }
.pl-group { margin: 10px 0; } .pl-group summary { cursor: pointer; list-style: revert; } .pl-group summary h4 { display: inline; }
.pl-farm { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.pl-farm h3 small { font-weight: 400; font-size: .85rem; }
.pl-farm ol { margin: 4px 0 10px 18px; padding: 0; }
.pl-updated { margin: 4px 0; color: var(--gold); }

/* front page: the free features box (show all) and the premium (credits) section under it */
.lp-free-box { border: 1px solid rgba(127, 191, 122, .45); border-radius: var(--radius-m); padding: 18px; background: rgba(127, 191, 122, .04); }
.lp-free-box .lp-gratis-list li { display: flex; align-items: center; gap: 12px; }
.lp-free-box .lp-gratis-list .txt { display: block; min-width: 0; }
.lp-free-box .lp-gratis-list small { display: block; }
.lp-new-tag { margin-left: 6px; padding: 1px 6px; border-radius: 4px; font-size: .66rem; font-weight: 700; vertical-align: 2px;
  letter-spacing: .06em; text-transform: uppercase; background: rgba(217, 164, 65, .18); color: var(--gold); }
.lp-more-feats { margin: 18px 0 0; text-align: center; }
.lp-more-feats > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px;
  border-radius: 999px; background: var(--ok); color: #10200f; font-weight: 700; font-size: 1.05rem; list-style: none;
  box-shadow: 0 0 0 4px rgba(127, 191, 122, .18), 0 6px 18px rgba(0, 0, 0, .3); }
.lp-more-feats > summary:hover { filter: brightness(1.08); }
.lp-more-feats > summary:focus-visible { outline: 3px solid var(--text); outline-offset: 3px; }
.lp-more-feats > summary::-webkit-details-marker { display: none; }
.lp-more-feats > summary::after { content: "▼"; font-size: .8rem; }
.lp-more-feats[open] > summary::after { content: "▲"; }
.lp-more-n { padding: 1px 8px; border-radius: 999px; background: rgba(16, 32, 15, .2); font-size: .8rem; }
.lp-more-feats > ul { margin-top: 14px; text-align: left; }
.lp-paid { margin-top: 36px; }
.lp-paid-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.lp-paid-list .lp-premium { display: block; }
.lp-paid-n { float: right; color: var(--gold); opacity: .6; font-weight: 700; }

/* the GW2 wiki's attribution under answers that used its pages */
.sources .wiki-attrib { margin: 6px 0 0; font-size: .76rem; color: var(--muted); line-height: 1.4; }
.sources .wiki-attrib a { color: var(--muted); text-decoration: underline; }
.pl-sources { margin-top: 12px; font-size: .9rem; color: var(--muted); }
.pl-cost b.pl-neg { color: #e08a7a; } .pl-cost b.pl-pos { color: var(--ok); }
.pl-where { font-size: .82rem; color: var(--muted); margin-top: 3px; }

/* Companion app page */
.comp-page { max-width: 1000px; margin: 0 auto; }
.comp-page h1 { margin-bottom: 8px; }
.comp-page .panel { margin-bottom: 16px; }
.comp-welcome { border-color: var(--gold, #d4b46a); }
.comp-page .step-no { display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; border-radius: 50%;
  background: var(--gold, #d4b46a); color: #1a1f26; font-size: .8em; margin-right: 8px; vertical-align: middle; }
.comp-pick-head { margin: 4px 0 14px; }
.comp-pick-title { font-size: 1.2rem; font-weight: 700; color: var(--gold, #e6b54a); margin: 0 0 4px; }
.comp-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
@media (max-width: 700px) { .comp-pick { grid-template-columns: 1fr; } }
.comp-pick button { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left;
  padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--panel-2); color: var(--text);
  font-size: 1rem; font-weight: 600; cursor: pointer; }
.comp-pick button small { font-weight: 400; color: var(--muted); font-size: .82rem; }
.comp-pick button:hover { border-color: var(--gold, #e6b54a); }
.comp-pick button.on { border-color: var(--gold, #e6b54a); box-shadow: 0 0 0 1px var(--gold, #e6b54a) inset; }
.comp-ways.picked { grid-template-columns: 1fr; }
.linkish { background: none; border: 0; padding: 0; color: var(--ley, #5ec9c1); text-decoration: underline; cursor: pointer; font: inherit; }
.comp-ways { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.comp-ways #wayManual { grid-column: 1 / -1; }
@media (max-width: 800px) { .comp-ways { grid-template-columns: 1fr; } }
.comp-way { background: var(--panel-2); border-radius: 12px; padding: 14px 16px; min-width: 0; }
.comp-way h3 { margin: 0 0 8px; font-size: 1.05rem; }
.comp-way p, .comp-way li { font-size: .92rem; }
.comp-way ul, .comp-way ol { padding-left: 1.2em; margin: 6px 0; }
.comp-way code { white-space: pre-wrap; overflow-wrap: anywhere; padding: 6px 10px; display: inline-block; max-width: 100%; }
.comp-way .row { flex-wrap: nowrap; align-items: center; gap: 8px; margin: 6px 0; }
@media (max-width: 560px) { .comp-way .row { flex-wrap: wrap; } }
.comp-way .row code { flex: 1 1 auto; min-width: 0; }
.comp-way input[type=text] { width: 100%; }
.comp-page .small { font-size: .85rem; }
.comp-shortcut-box { margin-top: 10px; }
.comp-page .sums { width: 100%; border-collapse: collapse; font-size: .85rem; }
.comp-page .sums td, .comp-page .sums th { text-align: left; padding: 5px 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
.comp-page .sums code.hash { word-break: break-all; font-size: .78rem; }
.comp-page .table-wrap { overflow-x: auto; }

/* Settings: sections that need the companion app */
.needs-comp { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 8px 12px;
  border-radius: 10px; border: 1px dashed rgba(212,180,106,.55); background: rgba(212,180,106,.08); font-size: .9rem; }
.needs-comp a { font-weight: 600; }
.needs-comp.ok { border-style: solid; border-color: rgba(120,200,140,.4); background: rgba(120,200,140,.07); }

/* sources and credits under an answer / a Planner result, folded */
.sources-box { margin-top: 8px; font-size: .85rem; color: var(--muted); }
.sources-box > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); }
.sources-box > summary::-webkit-details-marker { display: none; }
.sources-box > summary::after { content: "▾"; font-size: .8em; transition: transform .15s; }
.sources-box[open] > summary::after { transform: rotate(180deg); }
.sources-box > summary:hover { border-color: rgba(255,255,255,.25); color: var(--text); }
.sources-box .sources { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.sources-box .wiki-attrib { margin: 6px 0 0; font-size: .76rem; color: var(--muted); line-height: 1.4; }
.sources-box .wiki-attrib a { color: var(--muted); text-decoration: underline; }

/* Settings: main groups (each opens to its settings) */
.set-intro { margin: -4px 0 14px; }
details.setcat { margin-bottom: 14px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1);
  background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(255,255,255,.01)); }
details.setcat > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; user-select: none; }
details.setcat > summary::-webkit-details-marker { display: none; }
details.setcat > summary::after { content: ""; width: 10px; height: 10px; margin-left: auto; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform .15s; margin-top: -5px; }
details.setcat[open] > summary::after { transform: rotate(-135deg); margin-top: 5px; }
details.setcat > summary:hover .setcat-title { color: var(--ley); }
details.setcat > summary:focus-visible { outline: 2px solid var(--ley); outline-offset: -2px; border-radius: 14px; }
.setcat-icon { font-size: 1.6rem; line-height: 1; }
.setcat-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.setcat-title { font-family: var(--font-head); font-size: 1.25rem; color: var(--text); }
.setcat-sub { font-size: .85rem; color: var(--muted); }
.setcat-count { font-size: .78rem; color: var(--muted); border: 1px solid rgba(255,255,255,.14); border-radius: 999px;
  padding: 1px 8px; margin-left: 4px; }
.setcat-body { padding: 0 12px 4px; }
.setcat-body > details.sect { margin-bottom: 12px; }

/* Companion page: the folder for the Steam launch option */
.comp-path-help { font-size: .88rem; margin: 6px 0 10px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.03); }
.comp-path-help.warn { border-color: rgba(217,164,65,.7); background: rgba(217,164,65,.1); }
.comp-path-help ul { margin: 6px 0 0; padding-left: 1.2em; }
.comp-path-help li { margin: 4px 0; }
.comp-path-help code { padding: 1px 5px; display: inline; }
#winFolder.needs-edit { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(217,164,65,.25); }
.comp-found { color: #7fd49a; font-size: .9rem; margin: 4px 0 8px; }

/* Planner: legendaries tracked on the overlay */
.pl-tracked { margin: 0 0 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pl-chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px;
  border: 1px solid rgba(217,164,65,.45); background: rgba(217,164,65,.08); }
.pl-trackbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 14px 0 6px; padding: 12px;
  border-radius: 12px; border: 1px dashed rgba(217,164,65,.5); }

/* Planner → Time-gated */
.tg-btns { display: flex; gap: 6px; margin-top: 4px; }
.tg-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; margin: 4px 0 2px; min-width: 90px; }
.tg-bar span { display: block; height: 100%; background: var(--ley); }
/* Planner → Gold farms: each farm's sections fold open */
.pl-farm .pl-sect { margin: 8px 0; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 6px 10px; }
.pl-farm .pl-sect > summary { cursor: pointer; font-weight: 600; }
.pl-farm .pl-sect[open] > summary { margin-bottom: 6px; }

.gf-q { font-size: .72rem; vertical-align: middle; margin-left: 6px; }
.gf-researched { background: rgba(94, 201, 193, .18); }
.gf-partly-researched { background: rgba(240, 192, 76, .18); }
.gf-needs-measuring { background: rgba(230, 110, 90, .18); }
.gf-measured { margin: 4px 0 8px; }
.gf-measure { margin: 12px 0; }

/* ---------- phones (≤ 640 px): nothing overlaps, nothing scrolls sideways ---------- */
html { background: var(--bg); }   /* (short pages: the page colour reaches the bottom of the screen) */
@media (max-width: 640px) {
  .has-menu .brand { flex: 1 1 auto; min-width: 0; }
  .has-menu .brand > span { overflow: hidden; text-overflow: ellipsis; }
  .site-title .brand > span { white-space: normal; overflow: visible; }
  .topbar:not(.has-menu) { flex-wrap: nowrap; gap: 8px; }
  .topbar:not(.has-menu) .nav { flex: none; width: auto; order: 0; overflow: visible; }   /* (only 🏅 Scout Proof) */
  .topbar:not(.has-menu) .nav a { padding: 6px 8px; }
  .topbar:not(.has-menu) .brand { flex: 1 1 auto; min-width: 0; }
  .topbar:not(.has-menu) .brand > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar:not(.has-menu) .btn { padding: 6px 10px; font-size: .9rem; white-space: nowrap; }
  .pl-tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .pl-tabs button { padding: 8px 10px; text-align: left; }
  .admin-tabs { display: flex; flex-wrap: wrap; width: 100%; }
  .admin-tabs a.btn { flex: 1 1 auto; white-space: nowrap; text-align: center; padding: 8px 10px; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 10px 12px; }
  .stat b { font-size: 1.2rem; }
  h1 { font-size: 1.8rem; }
}
fieldset { min-width: 0; }                       /* (a fieldset is as wide as its widest line by default) */
.grid-2 > *, .grid-3 > * { min-width: 0; }
@media (max-width: 640px) {
  .row:has(> .admin-tabs) { flex-wrap: wrap; }
}
@media (max-width: 640px) { .field.inline { flex-wrap: wrap; } }
.page { overflow-wrap: anywhere; }   /* (a long link or error line wraps instead of widening the page) */
.key-warn { color: #f2b84a; font-weight: 600; margin: 6px 0 0; font-size: .9rem; }
/* text only screen readers read (the X button: its logo is already the letter X) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.site-notices .comp-update { border-radius: 14px; }

.comp-admin { margin: 6px 0 14px; padding: 10px 14px; border: 1px solid rgba(242,201,76,.45); border-radius: 10px;
  background: rgba(242,201,76,.08); font-size: .92rem; line-height: 1.5; }
.comp-admin code { font-size: .85em; }
.comp-admin-big { margin-top: 14px; font-size: 1rem; border-width: 2px; border-color: rgba(242,201,76,.8);
  background: rgba(242,201,76,.14); }
.comp-admin-big b:first-child { display: block; margin-bottom: 4px; font-size: 1.08rem; color: var(--gold, #f2c94c); }
/* Scout page → Overlays: one box per overlay (in game, and on the stream with its own OBS link) */
.ov-box { border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 10px; padding: 8px 10px 10px; margin: 8px 0 0; }
.ov-box-h { margin: 0 0 6px; font-size: .95rem; }
/* Settings → 🧭 Scout overlay: the preview on top, centred; the options under it in two columns */
.ov-preview-top { max-width: 560px; margin: 0 auto 16px; }
.ov-preview-top > label { display: block; text-align: center; }
.ov-cols { columns: 2 340px; column-gap: 20px; }
.ov-cols > .ov-group { break-inside: avoid; display: inline-block; width: 100%; box-sizing: border-box; margin: 0 0 14px; }

/* Updates page, admins: Public / Admins only on each entry */
.updates .upd-vis { float: right; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; cursor: pointer; }
.updates .upd-hidden { opacity: .6; border-left: 3px dashed var(--muted, #888); padding-left: 10px; }
.updates .upd-hidden .upd-vis-label { color: #e0a040; }

/* Planner → Events Tracker */
.et-cats { display: flex; gap: 6px; margin: 6px 0 10px; }
.et-cats .seg-btn { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line, #3a4656); background: transparent; color: inherit; cursor: pointer; }
.et-cats .seg-btn[aria-pressed="true"] { background: var(--accent, #d9a441); color: #1b1f26; border-color: transparent; font-weight: 700; }
.et-list, .et-favs { list-style: none; margin: 6px 0 14px; padding: 0; max-height: 420px; overflow: auto; }
.et-list li, .et-favs li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line, #2c3542); }
.et-row.is-fav .et-name b { color: var(--accent, #d9a441); }
.et-star { white-space: nowrap; }
.et-edit { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .9rem; }
.et-mmss { width: 4.6em; text-align: center; font-variant-numeric: tabular-nums; }
.et-default { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.et-vlabel { display: block; margin-top: 8px; font-weight: 600; }
#etVoice { width: 100%; }
.planner .et-edit input, .planner .et-edit select, .planner .et-edit button,
.planner .et-default input, .planner .et-default select, .planner .et-default button,
.planner .et-default label { width: auto; display: inline-block; margin: 0; }
.planner .et-mmss { width: 4.8em; padding: 4px 6px; }
.planner .et-edit select, .planner .et-default select { padding: 4px 8px; }
.planner .et-edit button, .planner .et-default button { padding: 4px 10px; }
.planner input.et-mmss { width: 5em !important; min-width: 0 !important; flex: none !important; }

.comp-status > .dot { display: inline-block; margin-right: 6px; vertical-align: middle; }   /* (one line of text that wraps) */

/* ---------- 🏅 the public Scout Proof page ---------- */
.sp-page { max-width: 760px; margin: 0 auto; }
.sp-form { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 18px; }
.sp-form input { flex: 1 1 260px; min-width: 0; }
.sp-none { color: var(--muted); padding: 10px 0; }
.sp-card h3 { margin: 4px 0 2px; }
.sp-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.sp-big > div { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 12px; text-align: center; }
.sp-big b { display: block; font-size: 1.9rem; color: var(--gold); line-height: 1.1; font-variant-numeric: tabular-nums; }
.sp-big b span { font-size: 1rem; color: var(--muted); }
.sp-big small { color: var(--muted); }
.sp-sect { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; margin: 8px 0; }
.sp-sect > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 10px; }
.sp-list { list-style: none; margin: 8px 0 2px; padding: 0; }
.sp-list li { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; border-bottom: 1px solid rgba(255,255,255,.04); color: var(--muted); }
.sp-list li.done { color: var(--text); }
.sp-list small { color: var(--muted); white-space: nowrap; }
.sp-foot { margin-top: 16px; }
.sp-mine { margin-bottom: 18px; }
.sp-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-head h2 { margin: 0; }
.sp-msg { margin: 8px 0; color: var(--gold); }
.sp-msg.bad { color: var(--danger, #e46a6a); }
.sp-share { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 14px 12px; margin: 14px 0 0; }
.sp-share legend { padding: 0 6px; color: var(--muted); }
.sp-check { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.sp-check input { margin-top: 4px; flex: none; }
.sp-link { margin: 10px 0 4px; }
.sp-link select { width: auto; max-width: 100%; display: inline-block; padding: 4px 8px; margin-left: 4px; }
.sp-linkrow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 6px 0 10px; }
.sp-linkrow a { word-break: break-all; }
.sp-chars { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 6px 0; }
.sp-char { display: inline-flex; gap: 6px; align-items: center; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 10px; cursor: pointer; }
#spCharsBox.off { opacity: .55; }
.btn-xs { padding: 2px 10px; font-size: .85rem; }
@media (max-width: 480px) { .sp-big b { font-size: 1.5rem; } }

/* ====================================================================== phones and tablets (round 202)
   One stylesheet for every screen: PC as before; tablets (≤ 900 px) and phones (≤ 640 px) get a compact header that
   slides away while you scroll down (and back on the way up), chats that fill the screen (messages scrolling above,
   the text box and Send at the bottom, options in fold-out sections under it), the Planner's tabs in one drop-down
   and its parts in fold-out sections, and tables that scroll sideways in their own box instead of squeezing their
   text into one letter per line. js/mobile.js does the moving parts. */
.site-head { transition: transform .22s ease; will-change: transform; }
.head-hidden .site-head { transform: translateY(-100%); }
@media (prefers-reduced-motion: reduce) { .site-head { transition: none; } }
.mfold > summary { cursor: pointer; color: var(--muted); font-size: .92rem; padding: 4px 0; }
.mfold[open] > summary { margin-bottom: 6px; }
.pl-pick { display: none; }

@media (max-width: 900px) {
  .topbar:not(.has-menu) .nav { order: 0; width: auto; flex: none; }   /* (🏅 Scout Proof first, not on a row of its own) */
  /* the chats: the screen's height (the header slides away while you scroll down: they take its place) */
  .chat { height: calc(100dvh - var(--head-h, 96px)); }
  .head-hidden .chat { height: 100dvh; }
  .chit-main { height: calc(100dvh - var(--head-h, 96px) - 24px); min-height: 360px; }
  .head-hidden .chit-main { height: calc(100dvh - 24px); }
  .chit { grid-template-columns: 1fr; }
  /* tables: scroll sideways in their own box; headings never break into one letter per line */
  .page table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .page table th { white-space: nowrap; }
  .page table td { overflow-wrap: normal; word-break: normal; }
  .page .table-wrap table, .page .pl-scroll table { display: table; }
  /* section headings: the arrow and the title stay on one line, the small chips go under them */
  details.sect > summary { flex-wrap: wrap; row-gap: 6px; }
  details.sect > summary h2, .sec-head > h2, .sec-head > h3 { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
  details.sect > summary .sec-peek, .sec-head .sec-peek { flex-basis: 100%; justify-content: flex-start; margin-left: 0; }
  h1, h2, h3, h4 { overflow-wrap: anywhere; hyphens: auto; }
  /* the home page: its columns may shrink (a wide table scrolls in its own box) */
  .lp-free, .lp-pool, .lp-cost-grid, .lp-hero, .lp-time, .lp-fair, .lp-ask-grid { grid-template-columns: minmax(0, 1fr); }
  .lp-free-table { display: block; max-width: 100%; overflow-x: auto; }
  .lp-demo { grid-template-columns: minmax(0, 1fr); }
  .lp-overlay-body { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  /* one compact row: the name on the left, credits and ☰ on the right (the menu opens under the whole bar) */
  .site-head { display: flex; align-items: center; gap: 8px; padding: 0 10px 0 12px; }
  .site-title { flex: 1 1 auto; min-width: 0; justify-content: flex-start; padding: 6px 0; text-align: left; }
  .site-title .brand { justify-content: flex-start; flex-wrap: nowrap; font-size: 1.05rem; gap: 8px; }
  .site-title .brand { min-width: 0; max-width: 100%; }
  .site-title .brand > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .brand svg, .brand-logo { width: 22px; height: 22px; }
  .topbar, .topbar.has-menu { position: static; flex: none; padding: 6px 0; gap: 8px; }
  .balance { padding: 3px 10px; font-size: .92rem; }
  .burger { width: 38px; height: 34px; }
  /* signed out: the site's name on its own row, then 🏅 Scout Proof, Log in and Create account under it */
  .site-head.signed-out { flex-wrap: wrap; justify-content: center; row-gap: 0; padding: 0 10px; }
  .site-head.signed-out .site-title { flex: 1 1 100%; justify-content: center; padding: 6px 0 0; }
  .site-head.signed-out .topbar { flex: 1 1 100%; justify-content: center; padding: 4px 0 8px; }
  /* only for playing on a PC: not on a phone */
  .keep-open-bar, .ptt-bar, .composer .hint, #compUpdate, #compNeededBar { display: none !important; }
  .site-notices:has(> :not([hidden])) { padding: 0; }
  .page { padding: 16px 12px 40px; }
  .messages { padding: 14px 14px; }
  .composer { padding: 8px 12px 10px; }
  .composer textarea { min-height: 42px; }
  .ai-disclaimer.after-msgs { font-size: .74rem; margin: 2px 12px; }
  /* Social: a short title, the chat right under it */
  .social-head p { display: none; }
  .social-head h1 { font-size: 1.5rem; margin-bottom: 8px; }
  .chit-note { display: none; }
  .chit-tabs { padding: 6px 10px; flex-wrap: nowrap; overflow-x: auto; }
  .chit-tabs button { white-space: nowrap; }
  .chit-scroll { padding: 6px 10px 10px; }
  .chit-compose { padding: 8px 10px 10px; }
  /* the Planner: one drop-down instead of the row of tabs */
  .pl-tabs { display: none; }
  .pl-pick { display: block; margin: 10px 0 12px; }
  .pl-pick select { width: 100%; font-size: 1.02rem; padding: 10px 12px; }
  .pl-tab > h2 { font-size: 1.3rem; }
  .pl-tab .fold-h { cursor: pointer; display: flex; align-items: center; gap: 8px; }
  .pl-tab .fold-h::after { content: "▾"; margin-left: auto; color: var(--muted); font-size: .9em; transition: transform .15s; }
  .pl-tab .fold-h.folded::after { transform: rotate(-90deg); }
  /* buttons and boxes: never wider than the screen, easy to tap */
  .pitem-check { flex: 1 1 100%; }                    /* (Settings → passive mode: the text a full line, its choice under it) */
  .rates { grid-template-columns: minmax(0, 1fr) auto; }
  .rates dd { white-space: nowrap; text-align: right; }
  input, select, textarea { max-width: 100%; }
  .row { flex-wrap: wrap; }
  .seg { flex-wrap: wrap; }
}

@media (max-width: 360px) {   /* the smallest phones: signed out, the three links still fit on one row */
  .site-head.signed-out .topbar { gap: 4px; }
  .site-head.signed-out .nav a { padding: 6px 4px; font-size: .9rem; }
  .site-head.signed-out .topbar .btn { padding: 5px 8px; font-size: .85rem; }
}

/* Admin → Site info → Overlay colours */
.oc-swatches { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 10px 0 14px; }
.oc-sw { display: inline-flex; align-items: center; gap: 6px; font-size: .9rem; }
.oc-sw i { width: 18px; height: 18px; border-radius: 4px; border: 1px solid var(--line); display: inline-block; }
/* admin overview: the cost of AI answers, layer by layer */
table.cost-break { max-width: 640px; table-layout: fixed; }
table.cost-break th:first-child { width: 52%; }
table.cost-break td:first-child { white-space: nowrap; }
table.cost-break tr.cost-sum td { font-weight: 700; border-top: 1px solid var(--line, rgba(255,255,255,.18)); }
table.cost-break tr.cost-sum:last-child td { color: var(--gold); }
/* admin offline databases: a marker for an update waiting, a short title with its description, tabs under each */
.ds-new, .ds-new-sp { display: inline-block; width: 16px; margin-right: 2px; }
.ds-new { background: none; border: 0; padding: 0; cursor: pointer; color: var(--gold); font-size: .9rem; line-height: 1;
          animation: dsPulse 2s ease-in-out infinite; }
.ds-new.warn { color: #e0a030; }
@keyframes dsPulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .ds-new { animation: none; } }
tr.ds-group.has-new > td { background: rgba(212, 175, 55, .06); }
.ds-desc { font-size: .8rem; margin: 2px 0 0 40px; line-height: 1.3; }
.ds-info { font-size: .8rem; margin: 1px 0 0 40px; }
.ds-info.warn { color: #e0a030; }
.ds-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 4px 0 8px; flex-wrap: wrap; }
.ds-tab { background: none; border: 1px solid transparent; border-bottom: 0; border-radius: 6px 6px 0 0; padding: 5px 12px;
          color: var(--muted, #9aa5b1); cursor: pointer; margin-bottom: -1px; font-size: .86rem; }
.ds-tab:hover { color: var(--text); }
.ds-tab.on { color: var(--text); border-color: var(--line); background: var(--panel, #1f2a35); font-weight: 600; }
.ds-tab.ready { color: var(--gold); }
/* header: the Tools and Profile menus (a dropdown on a wide screen; in the folded ☰ menu they open in place) */
.nav-menu { position: relative; }
.nav-menu > summary { list-style: none; cursor: pointer; color: var(--muted); padding: 6px 12px; border-radius: var(--radius-s);
                      white-space: nowrap; user-select: none; display: flex; align-items: center; gap: 6px; }
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu > summary:hover, .nav-menu > summary.active, .nav-menu[open] > summary { color: var(--text); background: var(--panel); }
.nav-menu > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.nav-caret { font-size: .75em; transition: transform .15s; }
.nav-menu[open] .nav-caret { transform: rotate(180deg); }
.nav-drop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; min-width: 230px; display: flex; flex-direction: column;
            gap: 2px; padding: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s);
            box-shadow: 0 12px 28px rgba(0, 0, 0, .4); }
.nav .nav-drop a { padding: 8px 12px; }
@media (max-width: 1280px) {
  .menu-open .nav-menu > summary { padding: 10px 12px; font-size: 1.05rem; }
  .menu-open .nav-drop { position: static; min-width: 0; box-shadow: none; border: 0; border-left: 2px solid var(--line);
                         border-radius: 0; margin: 0 0 4px 14px; padding: 0 0 0 6px; background: none; }
}
/* the Admin menu: its pages in groups, side by side on a wide screen */
.nav-drop-admin { display: grid; grid-template-columns: repeat(4, minmax(170px, 1fr)); gap: 4px 10px; width: min(880px, 94vw);
                  max-height: calc(100vh - 140px); overflow: auto; padding: 10px; }
.nav-admin .nav-drop-admin { left: 50%; transform: translateX(-50%); }
.nav-group { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.nav-group-h { font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--gold); padding: 6px 12px 2px; }
.nav .nav-drop-admin a { padding: 6px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1280px) {
  .menu-open .nav-drop-admin { display: flex; flex-direction: column; width: auto; max-height: none; transform: none; }
  .menu-open .nav-admin .nav-drop-admin { left: auto; }
}
/* an admin page: where it is, its title, the other pages of its group */
.admin-head { margin: 0 0 18px; }
.admin-crumb { margin: 0 0 2px; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.admin-head h1 { margin: 0 0 10px; }
.admin-sub { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-sub a { padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none;
               color: var(--muted); font-size: .9rem; }
.admin-sub a:hover { color: var(--text); background: var(--panel); }
.admin-sub a.on { color: var(--text); background: var(--panel-2); border-color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .nav-caret { transition: none; } }
.pl-crumb { margin: 0 0 2px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.tool-list { list-style: none; padding: 0; display: grid; gap: 6px; }
.tool-list a { display: inline-block; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); text-decoration: none; }
/* Tools → Build damage estimate: the build editor */
.be .be-preview { position: sticky; top: calc(var(--head-bar, 96px) + 8px); z-index: 5;   /* (under the header and its menus: they stay on top) */ box-shadow: 0 10px 24px rgba(0, 0, 0, .35); }
.be-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.be-acts { display: flex; gap: 6px; flex-wrap: wrap; }
.be-stale { background: rgba(217, 164, 65, .15); color: var(--gold); }
.be-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.be-card { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px;
           display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.be-card > span, .be-card summary span { color: var(--muted); font-size: .82rem; }
.be-card b { font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.be-card.big b { font-size: 1.8rem; color: var(--gold); }
.be-cond summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.be-cond summary::-webkit-details-marker { display: none; }
.be-cond summary span::after { content: " ▾"; }
.be-cond[open] summary span::after { content: " ▴"; }
.be-condlist { margin-top: 6px; }
.be-mini { width: 100%; border-collapse: collapse; font-size: .9rem; }
.be-mini td { padding: 2px 4px; border-bottom: 1px solid var(--line); }
.be-mini .num, .be .num { text-align: right; font-variant-numeric: tabular-nums; }
.be-boons { display: grid; gap: 4px; margin-top: 8px; font-size: .9rem; }
.be-chips .tag { margin: 2px 2px 0 0; }
.be-row { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 12px; align-items: end; }
.be-inline { display: flex; gap: 6px; }
.be-inline select, .be-inline input { flex: 1; min-width: 0; }
.be-ids { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: .9rem; }
.be-game { word-break: break-all; }
.be-step h2 { display: flex; align-items: center; gap: 10px; }
.be-n { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--gold);
        color: var(--gold-ink, #1a1206); font-size: .95rem; font-family: inherit; flex: none; }
.be-profs, .be-elites { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.be-prof, .be-elite { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-s);
                      border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; }
.be-prof img, .be-elite img { width: 22px; height: 22px; }
.be-prof.on, .be-elite.on { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); color: var(--gold); }
.be-line { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px; margin-bottom: 10px; position: relative;
           background: linear-gradient(rgba(20, 26, 34, .86), rgba(20, 26, 34, .92)), var(--bg, none) center / cover; }
.be-line-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.be-line-head img { width: 32px; height: 32px; }
.be-line-head select { max-width: 260px; }
.be-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.be-tier { display: flex; align-items: center; gap: 6px; }
.be-minor img { width: 26px; height: 26px; opacity: .8; border-radius: 50%; }
.be-majors { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.be-trait { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 6px; border: 1px solid transparent;
            background: rgba(0, 0, 0, .25); color: var(--muted); cursor: pointer; text-align: left; font-size: .84rem; min-width: 0; }
.be-trait img { width: 26px; height: 26px; flex: none; filter: grayscale(.8); opacity: .75; }
.be-trait span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.be-trait:hover { color: var(--text); }
.be-trait.on { border-color: var(--gold); color: var(--text); background: rgba(217, 164, 65, .12); }
.be-trait.on img { filter: none; opacity: 1; }
.be-grid5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.be-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 12px; }
.be-grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 12px; }
.be-all { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.be-all select { max-width: 240px; }
.be-go { display: flex; align-items: center; gap: 12px; margin: 4px 0 16px; }
.be-go .btn-primary { padding: 10px 28px; font-size: 1.05rem; }
.be-results h2 { margin-top: 18px; }
.be-results h2:first-child { margin-top: 0; }
.be-best { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px; }
.be-best b { font-size: 1.1rem; }
.be-dps b { font-size: 1.8rem; color: var(--gold); }
.be-ico { width: 22px; height: 22px; vertical-align: middle; margin-right: 6px; }
.be-dlg { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 18px; width: min(420px, 92vw); }
.be-dlg::backdrop { background: rgba(0, 0, 0, .55); }
.be-dlg form { display: flex; flex-direction: column; gap: 8px; }
@media (max-width: 900px) {
  .be-row { grid-template-columns: 1fr; }
  .be-tiers { grid-template-columns: 1fr; }
  .be-grid5 { grid-template-columns: repeat(2, 1fr); }
  .be-grid3 { grid-template-columns: repeat(2, 1fr); }
  .be .be-preview { position: static; }
}
@media (max-width: 520px) { .be-grid2, .be-grid3, .be-grid5 { grid-template-columns: 1fr; } }
/* Social: a shared build */
.build-card { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius-s);
              padding: 8px 12px; margin-top: 6px; background: var(--panel-2); }
.build-card code { font-size: 1rem; letter-spacing: .06em; }
/* Settings → Sections on the overlay: their order (drag a row, or ▲ ▼) */
.ov-order { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 2px; max-width: 460px; }
.ov-ord-row { display: flex; align-items: center; gap: 8px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 6px;
              background: var(--panel-2); }
.ov-ord-row .check { flex: 1; margin: 0; }
.ov-ord-row.fixed { background: none; border-style: dashed; }
.ov-ord-row.dragging { opacity: .5; }
.ov-grip { cursor: grab; color: var(--muted); user-select: none; }
.ov-ord-btns { display: flex; gap: 2px; }
.ov-ord-btns button:disabled { visibility: hidden; }
/* Build designer → Stats you want, and what a picked stat / rune / sigil gives (under its drop-down) */
.be-stats { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.be-stat { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--line);
           border-radius: 999px; background: var(--panel-2); cursor: pointer; font-size: .9rem; }
.be-stat input { margin: 0; }
.be-stat.on { border-color: var(--gold); color: var(--gold); background: rgba(217, 164, 65, .1); }
.be-stat-acts { align-items: center; gap: 12px; }
.be-stat-acts .check { margin: 0; }
.be-tip { display: block; margin-top: 3px; font-size: .78rem; line-height: 1.3; min-height: 1em; }
/* every table: each column as wide as its content (common.js marks them). Short columns one line, long text wraps
   between a readable minimum and maximum; too wide for the screen: it scrolls sideways in its own box */
table.fitted th.fit-one, table.fitted td.fit-one { white-space: nowrap; }
table.fitted td.fit-wrap { white-space: normal; overflow-wrap: anywhere; min-width: min(16rem, 62vw); max-width: 38rem; }
table.fitted td.fit-wrap a, table.fitted td.fit-wrap code { overflow-wrap: anywhere; }
.pl-scroll, .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
@media (max-width: 640px) {
  table.fitted td.fit-wrap { min-width: min(13rem, 70vw); max-width: 22rem; }
  .pl-table th, .pl-table td { padding: 6px 6px; }
}
@media (max-width: 640px) {   /* phones: rows as small cards, each value with its column's title */
  .page table.fitted.stack, .page .pl-scroll table.fitted.stack { display: block; overflow: visible; }
  table.fitted.stack thead { display: none; }
  table.fitted.stack tbody, table.fitted.stack tr { display: block; }
  table.fitted.stack tr { padding: 8px 0; border-bottom: 1px solid var(--line); }
  table.fitted.stack td { display: flex; gap: 10px; border: 0; padding: 2px 4px; white-space: normal; min-width: 0; max-width: none; }
  table.fitted.stack td::before { content: attr(data-label); flex: 0 0 6.5rem; color: var(--muted); font-size: .85em; }
  table.fitted.stack td:not([data-label])::before, table.fitted.stack td[data-label=""]::before { content: none; }
  table.fitted.stack td:first-child { font-weight: 600; }
  table.fitted.stack td:empty { display: none; }
}
/* Admin → Errors */
.err-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 8px; }
.err-bar input[type=search] { max-width: 240px; }
.err-table td { vertical-align: top; }
.err-row { cursor: pointer; }
.err-row:hover, .err-row.open { background: var(--panel-2); }
.err-row:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.err-what { min-width: 220px; max-width: 460px; overflow-wrap: anywhere; }
.err-what b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }   /* (all of it under the row) */
.err-where code { font-size: .8rem; overflow-wrap: anywhere; }
.err-acts { white-space: nowrap; }
.err-row td:nth-child(5), .err-row td:nth-child(7) { white-space: nowrap; }
.err-pick { width: 1%; padding-right: 0 !important; }   /* (tick boxes for 📋 Copy selected) */
.err-pick input { width: 18px; height: 18px; margin: 2px 0 0; cursor: pointer; accent-color: var(--gold); }
.err-bar select { width: auto; max-width: 100%; }
.err-acts button { padding: 4px 10px; font-size: .85rem; }
.err-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; white-space: nowrap;
            border: 1px solid var(--line); color: var(--muted); }
.err-chip.warn { color: var(--gold); border-color: var(--gold); }
.err-chip.bad { color: #fff; background: var(--danger); border-color: var(--danger); }
.err-chip.ok { color: var(--ley); border-color: var(--ley); }
.err-detail td { background: var(--panel-2); }
.err-detail dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 4px 0; }
.err-detail dt { color: var(--muted); }
.err-detail dd { margin: 0; overflow-wrap: anywhere; }
.err-tech pre { max-height: 320px; overflow: auto; font-size: .78rem; white-space: pre-wrap; background: var(--bg, #0e141b);
                padding: 10px; border-radius: var(--radius-s); }
@media (max-width: 700px) { .err-detail dl { grid-template-columns: 1fr; } }
/* Settings → Travel → In-map shortcuts */
.sc-kinds { display: flex; flex-direction: column; gap: 6px; margin: 8px 0 10px 28px; }
.sc-kind { display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
.sc-kind.off { opacity: .6; cursor: default; }
.sc-kind .muted { font-size: .85rem; }
.sc-sum { margin: 4px 0 10px; font-weight: 600; }
.sc-rules { gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.pitem.pitem-stack { flex-direction: column; align-items: stretch; }   /* (text, then its boxes, then a switch) */
.pitem-stack > .pitem-check { flex: none; }
.pitem-stack .sc-kinds { margin: 2px 0 4px 0; }
.sc-kind > span { display: block; }

/* Phones / tablets, the Scout and Social pages: everything under Send folds behind one button (closed at first), so
   the box you type in stays at the bottom of the screen (js/mobile.js opens / shuts it and remembers). */
.mob-more-btn { display: none; }
@media (max-width: 900px) {
  .mob-more-btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
                  margin: 6px 0 0; padding: 7px 12px; border: 1px solid var(--line); border-radius: var(--radius-s);
                  background: var(--panel); color: var(--muted); font-size: .9rem; text-align: left; }
  .mob-more-btn .mob-more-caret { transition: transform .15s ease; }
  .more-open .mob-more-btn .mob-more-caret { transform: rotate(180deg); }
  .app:not(.more-open) .journal, .app:not(.more-open) .composer .hint, .app:not(.more-open) .composer .ptt-bar,
  .chit:not(.more-open) .chit-side, .chit:not(.more-open) .chit-options { display: none !important; }
  .chit .chit-compose .mob-more-btn { margin-top: 4px; }
}
@media (max-width: 900px) and (prefers-reduced-motion: reduce) { .mob-more-btn .mob-more-caret { transition: none; } }
@media (max-width: 900px) {   /* Social on a phone: a short heading, and the chat fills the rest of the screen */
  .social-head { margin-bottom: 8px; }
  .social-head h1 { font-size: 1.35rem; margin: 0; }
  .social-head p { display: none; }
  .page.wide:has(.chit) { padding-top: 10px; padding-bottom: 10px; }
  .chit-main { height: calc(100dvh - var(--head-h, 96px) - 64px); }
  .head-hidden .chit-main { height: calc(100dvh - 64px); }
}

/* Phones and narrow screens: the folded ☰ menu scrolls inside itself (it never runs off the screen), and the Admin
   menu's pages sit two to a row as tap-sized tiles under each group's heading, so the whole list is half as long. */
@media (max-width: 1280px) {
  .menu-open .menu { max-height: calc(100dvh - var(--head-h, 64px)); overflow-y: auto; overscroll-behavior: contain;
                     -webkit-overflow-scrolling: touch; }
  .menu-open .nav-drop-admin { margin-left: 0; padding: 4px 0 8px; border-left: 0; gap: 10px; }
  .menu-open .nav-drop-admin .nav-group { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
  .menu-open .nav-drop-admin .nav-group-h { grid-column: 1 / -1; padding: 4px 2px 0; }
  .menu-open .nav .nav-drop-admin a { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 10px;
                                      font-size: .92rem; line-height: 1.2; white-space: normal; overflow: visible;
                                      background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-s); }
  .menu-open .nav .nav-drop-admin a.active { border-color: var(--gold); color: var(--text); }
}

/* a button just clicked: a gold outline for a moment ("Guide me": a little longer, while the route is worked out) */
button:active, .btn:active { transform: translateY(1px); }
button.clicked, .btn.clicked, a.clicked { box-shadow: 0 0 0 2px var(--gold) !important; transition: box-shadow 0s; }
button.clicked-guide, .btn.clicked-guide, a.clicked-guide { box-shadow: 0 0 0 2px var(--gold), 0 0 12px rgba(232, 179, 74, .45) !important;
  border-color: var(--gold) !important; }

/* Admin: answer tests, saved / weak answers, credits and security checks */
.pre-wrap { white-space: pre-wrap; margin-top: 6px; max-width: 70ch; }
.sec-list { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.sec-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.sec-ico { font-weight: 700; width: 1.4em; text-align: center; flex: none; }
.sec-ok .sec-ico { color: var(--ok); }
.sec-warn .sec-ico { color: var(--gold); }
.sec-fix { border-color: rgba(208, 98, 90, .6) !important; }
.sec-fix .sec-ico { color: var(--danger); }
.sec-info .sec-ico { color: var(--ley); }
.sec-key { font-size: 1.05rem; letter-spacing: .06em; padding: 4px 8px; border: 1px solid var(--line); border-radius: var(--radius-s); }
.sec-steps li { margin-bottom: 10px; }
#atTests td:nth-child(3) .tag, #atDetail .tag { display: inline-block; margin: 1px 2px; }

/* Getting started (players) */
.gs-card { border: 1px solid rgba(94, 201, 193, .45); border-radius: var(--radius-s); padding: 12px 14px; margin: 0 0 14px; }
.gs-card h2 { font-size: 1.05rem; margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }
.gs-bar { height: 6px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin: 6px 0 10px; }
.gs-bar > i { display: block; height: 100%; background: var(--ley); }
.gs-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.gs-steps li { display: flex; gap: 10px; align-items: flex-start; }
.gs-mark { flex: none; width: 1.6em; height: 1.6em; border-radius: 50%; display: grid; place-items: center; font-size: .85rem;
  border: 1px solid var(--line); color: var(--muted); }
.gs-done .gs-mark { background: var(--ok); color: #13171d; border-color: transparent; }
.gs-partial .gs-mark { border-color: var(--gold); color: var(--gold); }
.gs-steps .gs-text { color: var(--muted); font-size: .92rem; }
.gs-steps .gs-links a { margin-right: 12px; font-size: .92rem; }
.gs-done b { text-decoration: none; }

/* Goals (tools) */
.goal-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 10px; }
.goal { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; }
.goal-head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.goal-head b { font-size: 1.02rem; }
.goal-head .spacer { flex: 1; }
.goal-bar { height: 8px; border-radius: 999px; background: var(--panel-2); overflow: hidden; margin: 6px 0; }
.goal-bar > i { display: block; height: 100%; background: var(--gold); }
.goal.done .goal-bar > i { background: var(--ok); }
.goal-next { font-size: .92rem; }
.goal-left { margin: 4px 0 0; padding-left: 18px; color: var(--muted); font-size: .9rem; }
.goal-pick { list-style: none; padding: 0; margin: 6px 0 0; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-s); }
.goal-pick li { display: flex; gap: 8px; align-items: center; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.goal-pick li:last-child { border-bottom: 0; }
.goal-pick .sub { color: var(--muted); font-size: .85rem; }
.goal-pick button { margin-left: auto; padding: 4px 10px; }

/* Credits → What things cost: the premium voice prices, as extra information */
.rate-extra { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line); }
.rate-extra p { margin: 4px 0; }
.gs-key { font-weight: 700; color: var(--text); padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; white-space: nowrap; }

/* Tools → Timers */
.tm-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.tm { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; }
.tm .tm-ic { font-size: 1.3rem; width: 1.6em; text-align: center; }
.tm .tm-nm { font-weight: 700; }
.tm .tm-len { color: var(--muted); font-size: .9rem; }
.tm .tm-left { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--gold); min-width: 5.5em; }
.tm.flash .tm-left { color: var(--bad, #e66); }
.tm .spacer { flex: 1; }
.tm button { padding: 4px 10px; }
.tm-form { align-items: flex-end; }
.tm-form .tm-icon input { width: 4.5em; text-align: center; }
.tm-form .tm-time input { width: 8em; font-variant-numeric: tabular-nums; }

/* Companion → 3 Start it: "Choose one" stands out (and why: more than one way starts more than one companion) */
.comp-choose-one { margin: 8px 0 4px; padding: 12px 14px; border: 2px solid var(--gold, #e6b54a); border-radius: 10px;
  background: rgba(230, 181, 74, .10); }
.comp-choose-one p { margin: 0; }
.comp-choose-one p + p { margin-top: 6px; font-size: .93rem; }
.comp-choose-title { font-size: 1.08rem; font-weight: 700; color: var(--gold, #e6b54a); }
/* Companion → Uninstall */
.comp-uninstall { margin: 10px 0; }
.comp-uninstall li { margin-bottom: 10px; }
.comp-uninstall .row { margin: 6px 0; flex-wrap: nowrap; align-items: flex-start; }
.comp-uninstall .row code { word-break: break-all; flex: 1; min-width: 0; }
.comp-uninstall .row button { flex-shrink: 0; white-space: nowrap; }
.comp-un-token { margin-top: 12px; padding: 10px 14px; border-left: 3px solid var(--gold, #e6b54a); background: var(--panel-2); border-radius: 8px; }
/* Tools → Achievements: what an achievement needs first; the picker's note under a pinned result */
.goal-needs { font-size: .92rem; margin: 4px 0; padding: 6px 10px; border-left: 3px solid var(--gold, #e6b54a); background: var(--panel-2); border-radius: 6px; }
.pick-note { font-size: .85rem; color: var(--gold, #e6b54a); margin-top: 4px; }
/* Admin → Server → Domain & HTTPS: what actually answers */
.dom-live { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; margin: 8px 0; }
.dom-live.ok { border-color: var(--pos, #6c6); }
.dom-live.warn { border-color: var(--gold, #e6b54a); }
.dom-live.bad { border-color: var(--neg, #e66); }
.dom-live p { margin: 0 0 6px; }
/* Companion → 🗑 Uninstall: the uninstaller's download button stands out */
.comp-uninstall .un-dl { margin: 10px 0; }
.comp-uninstall .un-btn { display: inline-block; font-size: 1.05rem; padding: 10px 18px; text-decoration: none; }
.comp-uninstall li.un-run { border: 1px solid var(--gold, #e6b54a); border-radius: var(--radius-s); padding: 10px 12px; }
#uninstall .un-sum { color: var(--muted); font-size: .9rem; margin-left: 8px; }
/* Companion page: one way to start it, and its questions */
.comp-one-way { font-size: 1.02rem; }
.comp-faq details.faq { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin: 8px 0; background: var(--panel-2); }
.comp-faq details.faq > summary { cursor: pointer; font-weight: 700; list-style: revert; }
.comp-faq details.faq[open] > summary { margin-bottom: 6px; color: var(--gold, #e6b54a); }
.comp-faq details.faq p, .comp-faq details.faq ul { margin: 6px 0; }
/* Getting started (all pages, top): the three steps to a first answer; then "the companion isn't running" */
.gs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; width: 100%; max-width: 1100px;
  padding: 10px 14px; border: 1px solid var(--gold, #e6b54a); border-radius: 12px; background: var(--panel);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .25); position: relative; }
.gs-bar.warn { border-color: var(--danger, #e05555); }
.gs-bar.done { border-color: var(--ley, #59c9a5); }
.gs-steps { display: flex; gap: 6px; flex-wrap: wrap; }
.gs-step { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: .85rem; color: var(--muted); white-space: nowrap; }
.gs-step.now { border-color: var(--gold, #e6b54a); color: var(--gold, #e6b54a); font-weight: 700; }
.gs-step.ok { border-color: var(--ley, #59c9a5); color: var(--ley, #59c9a5); }
.gs-text { flex: 1 1 320px; min-width: 0; }
.gs-text b { color: var(--text); }
.gs-text .gs-how { display: block; color: var(--muted); font-size: .92rem; margin-top: 2px; }
.gs-bar .btn { white-space: nowrap; }
.gs-x { background: none; border: none; color: var(--muted); font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.gs-x:hover { color: var(--text); background: var(--panel-2); }
.site-notices { flex-direction: column; align-items: center; gap: 8px; }
/* Companion page: the picked computer and game client in a gold outline; the file to double-click marked in gold */
/* (inset: the group clips anything outside its edge, which left only one side of the outline showing) */
#compOs button.on, #compClient button.on { color: var(--gold, #e6b54a); font-weight: 700; background: rgba(230, 181, 74, .14);
  box-shadow: inset 0 0 0 2px var(--gold, #e6b54a); border-radius: var(--radius-s); }
.comp-page mark.file-hl { background: rgba(230, 181, 74, .16); color: var(--gold, #e6b54a); border: 1px solid var(--gold, #e6b54a);
  border-radius: 6px; padding: 0 5px; font-weight: 700; white-space: nowrap; }
