/* SoA-Web — TRON palette lifted from desktop/src/assets/themes/tron.json */
:root {
  --soa-bg:        #05080d;
  --soa-bg-deep:   #000000;
  --soa-fg:        #aacfd1;
  --soa-accent:    #aacfd1;
  --soa-accent-dim:#4a6566;
  --soa-green:     #50fa7b;
  --soa-red:       #ff5555;
  --soa-yellow:    #f1fa8c;
  --soa-blue:      #6272a4;
  --soa-line:      rgba(170, 207, 209, 0.25);
  --soa-line-soft: rgba(170, 207, 209, 0.08);
  --font-mono:     ui-monospace, "Fira Mono", Menlo, Consolas, monospace;
  --font-display:  "United Sans Medium", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  height: 100%;
  background: var(--soa-bg-deep);
  color: var(--soa-fg);
  font-family: var(--font-display);
  letter-spacing: 0.08em;
  overflow: hidden;
}

.hidden { display: none !important; }

/* ── Boot screen ──────────────────────────────────────────────────────── */
.boot {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  background: radial-gradient(ellipse at center, #0a1318 0%, #000 70%);
  z-index: 100;
}
.boot-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--soa-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--soa-line-soft) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: 0.7;
  pointer-events: none;
}
.boot-inner { position: relative; text-align: center; }
.boot-title {
  font-size: 34px; margin: 0 0 8px;
  color: var(--soa-accent);
  letter-spacing: 0.36em;
  text-shadow: 0 0 18px rgba(170,207,209,0.45);
}
.boot-sub { margin: 0 0 24px; font-size: 12px; opacity: 0.6; }
.boot-status { margin: 0; font-family: var(--font-mono); font-size: 12px; opacity: 0.8; }

/* ── Login (removed — no auth) ──────────────────────────────────────────── */

/* ── Shell layout ────────────────────────────────────────────────────── */
.shell { display: grid; grid-template-rows: 44px 1fr; height: 100%; }

.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  border-bottom: 1px solid var(--soa-line);
  background: linear-gradient(to bottom, #0a1318, var(--soa-bg));
}
.brand {
  color: var(--soa-accent);
  font-size: 12px; letter-spacing: 0.3em;
  text-shadow: 0 0 10px rgba(170,207,209,0.4);
  white-space: nowrap;
}
.tabs {
  display: flex; gap: 6px; overflow-x: auto;
  scrollbar-width: thin; scrollbar-color: var(--soa-accent-dim) transparent;
}
.tab {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border: 1px solid var(--soa-line);
  font-family: var(--font-mono); font-size: 12px;
  color: var(--soa-fg); background: transparent; cursor: pointer;
  white-space: nowrap;
}
.tab:hover { border-color: var(--soa-accent); }
/* Active tab is filled with its edge color so the current selection reads
   instantly across the tab row. Text and dot flip to the deep-bg tone for
   contrast; the outer glow stays to signal focus without a second accent. */
.tab.active {
  color: #05080d; background: var(--soa-accent);
  border-color: var(--soa-accent);
  box-shadow: 0 0 14px rgba(170,207,209,0.35), inset 0 0 0 1px rgba(255,255,255,0.06);
}
.tab .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--soa-accent-dim); }
.tab.active .dot { background: #05080d; box-shadow: none; }

/* Agent status colors — all tabs (active and inactive) */
.tab[data-agent="working"] .dot { background: var(--soa-green); box-shadow: 0 0 6px var(--soa-green); }
.tab[data-agent="working"] { color: var(--soa-green); border-color: var(--soa-green); }
.tab[data-agent="working"].active {
  color: #05080d; background: var(--soa-green); border-color: var(--soa-green);
  box-shadow: 0 0 14px rgba(80,250,123,0.35), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.tab[data-agent="working"].active .dot { background: #05080d; box-shadow: none; }
.tab[data-agent="attention"] .dot { background: #ffb86c; box-shadow: 0 0 6px #ffb86c; }
.tab[data-agent="attention"] { color: #ffb86c; border-color: #ffb86c; }
.tab[data-agent="attention"].active {
  color: #05080d; background: #ffb86c; border-color: #ffb86c;
  box-shadow: 0 0 14px rgba(255,184,108,0.35), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.tab[data-agent="attention"].active .dot { background: #05080d; box-shadow: none; }
.tab[data-agent="stuck"] .dot { background: var(--soa-red); box-shadow: 0 0 6px var(--soa-red); }
.tab[data-agent="stuck"] { color: var(--soa-red); border-color: var(--soa-red); }
.tab[data-agent="stuck"].active {
  color: #05080d; background: var(--soa-red); border-color: var(--soa-red);
  box-shadow: 0 0 14px rgba(255,85,85,0.35), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.tab[data-agent="stuck"].active .dot { background: #05080d; box-shadow: none; }
.tab[data-agent="none"] .dot { background: var(--soa-blue); box-shadow: 0 0 6px var(--soa-blue); }
.tab[data-agent="none"] { color: var(--soa-blue); border-color: var(--soa-blue); }
.tab[data-agent="none"].active {
  color: #05080d; background: var(--soa-blue); border-color: var(--soa-blue);
  box-shadow: 0 0 14px rgba(98,114,164,0.35), inset 0 0 0 1px rgba(255,255,255,0.08);
}
.tab[data-agent="none"].active .dot { background: #05080d; box-shadow: none; }
.tab .x {
  width: 14px; height: 14px; display: grid; place-items: center;
  font-size: 12px; opacity: 0.55; margin-left: 2px;
}
.tab .x:hover { opacity: 1; color: var(--soa-red); }

/* Drag-to-reorder: the tab being dragged fades, and the drop target shows a
   thin accent-colored bar on the edge where the dragged tab will land. */
.tab { position: relative; }
.tab[draggable="true"] { cursor: grab; }
.tab.dragging { opacity: 0.45; cursor: grabbing; }
.tab.drop-before::before,
.tab.drop-after::after {
  content: ""; position: absolute; top: 10%; bottom: 10%;
  width: 2px; background: var(--soa-accent);
  box-shadow: 0 0 6px var(--soa-accent);
  pointer-events: none;
}
.tab.drop-before::before { left: -4px; }
.tab.drop-after::after   { right: -4px; }

.topbar-actions { display: flex; gap: 8px; }
.topbar-actions button,
.topbar-actions .release-btn {
  background: transparent; color: var(--soa-accent);
  border: 1px solid var(--soa-accent-dim); padding: 6px 10px;
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.25em;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center;
}
.topbar-actions button:hover,
.topbar-actions .release-btn:hover { border-color: var(--soa-accent); }

/* Primary CTA: make the desktop-app download read as the promoted action
   without drowning the rest of the topbar. Solid accent fill, subtle
   breathing glow, icon nudge on hover. */
.topbar-actions .release-btn--cta {
    background: var(--soa-accent);
    color: #05080d;
    border-color: var(--soa-accent);
    font-weight: 600;
    letter-spacing: 0.22em;
    box-shadow: 0 0 0 1px rgba(170,207,209,0.18), 0 0 14px rgba(170,207,209,0.35);
    animation: soaCtaPulse 3.2s ease-in-out infinite;
}
.topbar-actions .release-btn--cta:hover {
    background: #c8e5e7;
    border-color: #c8e5e7;
    color: #000;
    box-shadow: 0 0 0 1px rgba(170,207,209,0.3), 0 0 22px rgba(170,207,209,0.6);
}
@keyframes soaCtaPulse {
    0%, 100% { box-shadow: 0 0 0 1px rgba(170,207,209,0.18), 0 0 10px rgba(170,207,209,0.25); }
    50%      { box-shadow: 0 0 0 1px rgba(170,207,209,0.28), 0 0 20px rgba(170,207,209,0.55); }
}
@media (prefers-reduced-motion: reduce) {
    .topbar-actions .release-btn--cta { animation: none; }
}
.lang-select {
  background: transparent; color: var(--soa-accent);
  border: 1px solid var(--soa-accent-dim);
  padding: 5px 6px;
  font-family: var(--font-display); font-size: 11px; letter-spacing: 0.15em;
  cursor: pointer;
  appearance: none;
}
.lang-select:hover { border-color: var(--soa-accent); }
.lang-select option { background: var(--soa-bg); color: var(--soa-fg); }

.stage { position: relative; overflow: hidden; display: grid; grid-template-rows: 1fr 24px; }
.scanline {
  pointer-events: none;
  position: absolute; inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(170,207,209,0.02) 0px,
    rgba(170,207,209,0.02) 1px,
    transparent 2px,
    transparent 4px
  );
  z-index: 2;
}

.terms { position: relative; background: var(--soa-bg); overflow: hidden; }
.terms .term {
  position: absolute; inset: 0;
  display: none;
  padding: 4px 0 4px 6px;
}
.terms .term.active { display: block; }
.terms .xterm { height: 100%; width: 100%; }
.terms .xterm-viewport {
  background: transparent !important;
  /* FitAddon sizes the terminal by subtracting the viewport's scrollbar
     width (offsetWidth − clientWidth) from the parent. If the viewport
     still scrolls, Chromium on a trackpad-less machine reserves ~15px and
     the grid stops one column short, leaving a dark gutter on the right.
     Dropping overflow to hidden collapses that reservation to 0 — xterm
     still receives wheel events from this element, so scrollback keeps
     working. */
  overflow: hidden !important;
  scrollbar-width: none;
}
.terms .xterm-viewport::-webkit-scrollbar { width: 0; height: 0; }
.terms .xterm-screen { width: 100% !important; }
.terms .term-empty {
  display: grid; place-items: center; height: 100%;
  font-family: var(--font-mono); font-size: 13px; opacity: 0.6;
  text-align: center; padding: 24px;
}

.status-bar {
  display: flex; align-items: center; gap: 18px;
  padding: 0 14px;
  border-top: 1px solid var(--soa-line);
  font-family: var(--font-mono); font-size: 11px;
  color: var(--soa-accent-dim);
  background: var(--soa-bg-deep);
}
.status-bar span { white-space: nowrap; }
#status-conn.ok   { color: var(--soa-green); }
#status-conn.warn { color: var(--soa-yellow); }
#status-conn.err  { color: var(--soa-red); }

/* The brand name wraps an anchor pointing at the video explaining the
   origin of the name. Visually indistinguishable from plain text — same
   color, same letter-spacing, same glow — so it doesn't read as a link
   unless hovered. */
.soa-name-link,
.soa-name-link:visited,
.soa-name-link:hover,
.soa-name-link:active {
    color: inherit;
    text-decoration: none;
    letter-spacing: inherit;
    text-shadow: inherit;
    cursor: pointer;
}

/* ── Mobile topbar + terminal density ──────────────────────────────────
   Tight layout so tabs + actions fit on one row without horizontal
   scroll, and the terminal gets all the remaining height. */
@media (max-width: 768px) {
    .shell { grid-template-rows: 40px 1fr; }
    .topbar {
        grid-template-columns: 1fr auto;
        gap: 8px;
        padding: 0 8px;
    }
    .brand { display: none; }
    .tabs { gap: 4px; }
    .tab { padding: 5px 8px; font-size: 11px; letter-spacing: 0.05em; }
    .topbar-actions { gap: 4px; }
    .topbar-actions button,
    .topbar-actions .release-btn {
        padding: 5px 7px;
        font-size: 10px;
        letter-spacing: 0.15em;
    }
    .status-bar { gap: 10px; padding: 0 8px; font-size: 10px; }
}

@media (max-width: 420px) {
    .topbar-actions #logout { display: none; }
}

/* ── Install modal (WC mode ↯ LOCAL) ──────────────────────────── */
.soa-modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(5, 8, 13, 0.82);
    backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    z-index: 9999;
    animation: soaFade 120ms ease-out;
}
@keyframes soaFade { from { opacity: 0; } to { opacity: 1; } }
.soa-modal {
    width: min(560px, calc(100vw - 32px));
    background: #05080d;
    border: 1px solid rgba(170, 207, 209, 0.28);
    box-shadow: 0 0 0 1px rgba(170,207,209,0.05), 0 24px 80px rgba(0,0,0,0.6);
    padding: 18px 20px 16px;
    color: #aacfd1;
    font-family: 'Fira Mono', ui-monospace, Menlo, Consolas, monospace;
    font-size: 13px; line-height: 1.5;
}
.soa-modal-title {
    font-size: 12px; letter-spacing: 0.12em;
    color: #aacfd1; margin-bottom: 10px;
    border-bottom: 1px dashed rgba(170,207,209,0.24);
    padding-bottom: 8px;
}
.soa-modal-body { color: rgba(170,207,209,0.82); margin: 8px 0; }
.soa-modal-cmdwrap {
    display: flex; gap: 8px; align-items: stretch;
    margin: 10px 0 6px;
}
.soa-modal-cmd {
    flex: 1; padding: 10px 12px;
    background: rgba(170,207,209,0.06);
    border: 1px solid rgba(170,207,209,0.18);
    color: #d8eef0;
    font-size: 12px; white-space: nowrap; overflow-x: auto;
    user-select: all;
}
.soa-modal-copy, .soa-modal-close, .soa-modal-link {
    background: transparent; color: #aacfd1;
    border: 1px solid rgba(170,207,209,0.28);
    padding: 0 14px; font-family: inherit; font-size: 11px;
    letter-spacing: 0.1em; cursor: pointer;
    transition: background 80ms;
}
.soa-modal-copy:hover, .soa-modal-close:hover, .soa-modal-link:hover {
    background: rgba(170,207,209,0.08);
}
.soa-modal-note { font-size: 11px; color: rgba(170,207,209,0.55); }
.soa-modal-divider {
    border-top: 1px dashed rgba(170,207,209,0.16);
    margin: 14px 0 8px;
}
.soa-modal-link {
    display: block; margin-top: 4px; padding: 8px 12px;
    text-align: left; width: 100%;
}
.soa-modal-close {
    display: block; margin: 14px 0 0 auto;
    padding: 6px 14px;
}
@media (max-width: 480px) {
    .soa-modal { padding: 14px 14px 12px; font-size: 12px; }
    .soa-modal-cmdwrap { flex-direction: column; }
    .soa-modal-copy { padding: 8px 0; }
}

/* ── Settings modal ──────────────────────────────────────────── */
body.nocursor, body.nocursor * { cursor: none !important; }

.soa-modal.soa-settings { width: min(720px, calc(100vw - 32px)); }
.settings-tabbed {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 14px;
    margin-top: 6px;
    min-height: 280px;
}
.settings-sidebar {
    display: flex; flex-direction: column; gap: 4px;
    border-right: 1px dashed rgba(170,207,209,0.16);
    padding-right: 10px;
}
.settings-tab {
    padding: 6px 10px; font-size: 11px; letter-spacing: 0.14em;
    color: rgba(170,207,209,0.7); cursor: pointer;
    border: 1px solid transparent;
}
.settings-tab:hover { color: #aacfd1; border-color: rgba(170,207,209,0.18); }
.settings-tab--active {
    color: #aacfd1; border-color: rgba(170,207,209,0.4);
    background: rgba(170,207,209,0.06);
}
.settings-content { min-width: 0; }
.settings-pane { display: none; }
.settings-pane--active { display: block; }
.settings-table {
    width: 100%; border-collapse: collapse; font-size: 12px;
}
.settings-table th {
    text-align: left; font-weight: 500; font-size: 10px;
    letter-spacing: 0.12em; color: rgba(170,207,209,0.55);
    border-bottom: 1px dashed rgba(170,207,209,0.18);
    padding: 6px 8px;
}
.settings-table td {
    padding: 6px 8px; vertical-align: top;
    border-bottom: 1px dashed rgba(170,207,209,0.08);
}
.settings-table td.k code {
    font-family: 'Fira Mono', ui-monospace, monospace;
    color: #d8eef0; font-size: 11px;
}
.settings-table td.d { color: rgba(170,207,209,0.7); }
.settings-table td.v input,
.settings-table td.v select {
    background: rgba(170,207,209,0.06);
    border: 1px solid rgba(170,207,209,0.22);
    color: #d8eef0;
    font-family: 'Fira Mono', ui-monospace, monospace;
    font-size: 11px; padding: 4px 8px; min-width: 120px;
}
.settings-pane-body .kv {
    display: flex; justify-content: space-between; gap: 16px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(170,207,209,0.08);
    font-size: 12px;
}
.settings-pane-body .kv .k { color: rgba(170,207,209,0.55); letter-spacing: 0.1em; font-size: 11px; }
.settings-pane-body .kv .v { color: #d8eef0; font-family: 'Fira Mono', ui-monospace, monospace; }
.settings-row-actions { margin: 14px 0 8px; }
.settings-hint { font-size: 11px; color: rgba(170,207,209,0.55); margin: 4px 0 0; }
.settings-status {
    margin: 12px 0 0; font-size: 11px; color: rgba(170,207,209,0.55);
    font-family: 'Fira Mono', ui-monospace, monospace;
}
.settings-actions {
    display: flex; gap: 8px; justify-content: flex-end;
    margin-top: 8px;
}
@media (max-width: 560px) {
    .settings-tabbed { grid-template-columns: 1fr; }
    .settings-sidebar { flex-direction: row; flex-wrap: wrap; border-right: 0; padding-right: 0; border-bottom: 1px dashed rgba(170,207,209,0.16); padding-bottom: 8px; }
    .settings-table td.d { display: none; }
}

/* ── Welcome gate ───────────────────────────────────────────────────── */
/* Shown on first visit (html[data-welcome]) and on every mobile visit
   (html[data-welcome-mobile]). Kept intentionally short — a 2-column
   compare card plus one install command — so it fits on a 667px-tall
   iPhone viewport without scrolling. Typography hierarchy from size +
   letter-spacing + opacity since Fira Mono has one weight only. */
#welcome { display: none; }
html[data-welcome="1"] #welcome { display: flex; }
html[data-welcome="1"] #boot,
html[data-welcome="1"] #shell { display: none !important; }
html[data-welcome="1"] body { overflow: hidden; }

.welcome {
    position: fixed; inset: 0;
    align-items: center; justify-content: center;
    padding: 32px 24px;
    overflow-y: auto;
    background: #05080d;
    color: #aacfd1;
    font-family: 'Fira Mono', ui-monospace, Menlo, Consolas, monospace;
    z-index: 10000;
}
.welcome-inner { width: 100%; max-width: 640px; }

/* Language picker sits above the title on the welcome page. Five tiny
   buttons; the current choice wears an accent underline. Clicking
   re-renders copy in place (no reload) and writes to the same
   soa-web:lang key that the main app reads, so the picked language
   carries into the terminal UI automatically. */
.welcome-lang {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 16px;
}
.welcome-lang button {
    background: transparent;
    color: rgba(170, 207, 209, 0.55);
    border: 1px solid transparent;
    border-bottom: 1px solid rgba(170, 207, 209, 0.14);
    padding: 4px 10px;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.14em;
    cursor: pointer;
    transition: color 80ms, border-color 80ms;
}
.welcome-lang button:hover {
    color: #aacfd1;
    border-bottom-color: rgba(170, 207, 209, 0.4);
}
.welcome-lang button[aria-pressed="true"] {
    color: #e6f4f6;
    border-bottom-color: #aacfd1;
}

.welcome-head { text-align: center; margin-bottom: 22px; }
.welcome-title {
    margin: 0;
    font-size: 26px;
    letter-spacing: 0.14em;
    font-weight: 400;
    color: #e6f4f6;
}
.welcome-sub {
    margin: 6px 0 0;
    font-size: 10px;
    letter-spacing: 0.26em;
    color: rgba(170, 207, 209, 0.5);
}

.welcome-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}
.welcome-col {
    border: 1px solid rgba(170, 207, 209, 0.2);
    background: rgba(170, 207, 209, 0.03);
    padding: 14px 14px 12px;
}
.welcome-col--accent {
    border-color: rgba(170, 207, 209, 0.35);
    background: rgba(170, 207, 209, 0.055);
}
.welcome-h3 {
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.12em;
    color: #e6f4f6;
}
.welcome-tag {
    font-size: 10px;
    letter-spacing: 0.16em;
    color: rgba(170, 207, 209, 0.5);
    padding-left: 6px;
}
.welcome-list {
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    line-height: 1.45;
    color: rgba(170, 207, 209, 0.82);
}
.welcome-list li {
    padding: 4px 0;
    border-top: 1px dashed rgba(170, 207, 209, 0.12);
}
.welcome-list li:first-child { border-top: none; }
.welcome-list li.no { color: rgba(170, 207, 209, 0.5); }
.welcome-list li.no::before {
    content: '× ';
    color: rgba(255, 110, 110, 0.7);
    margin-right: 2px;
}

.welcome-cta { margin-bottom: 18px; }
.welcome-cta-caption {
    margin: 0 0 8px;
    font-size: 11px;
    letter-spacing: 0.12em;
    color: rgba(170, 207, 209, 0.7);
}
.welcome-cmdwrap {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.welcome-cmd {
    flex: 1;
    margin: 0;
    padding: 10px 12px;
    background: rgba(170, 207, 209, 0.07);
    border: 1px solid rgba(170, 207, 209, 0.2);
    color: #d8eef0;
    font-size: 12px;
    line-height: 1.35;
    white-space: nowrap;
    overflow-x: auto;
    user-select: all;
}
.welcome-copy {
    background: transparent;
    color: #aacfd1;
    border: 1px solid rgba(170, 207, 209, 0.28);
    padding: 0 14px;
    font-family: inherit;
    font-size: 10px;
    letter-spacing: 0.14em;
    cursor: pointer;
}
.welcome-copy:hover { background: rgba(170, 207, 209, 0.06); }
.welcome-copy:active { background: rgba(170, 207, 209, 0.12); }

.welcome-foot {
    padding-top: 14px;
    border-top: 1px dashed rgba(170, 207, 209, 0.18);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
}
.welcome-foot-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}
.welcome-link {
    font-size: 11px;
    letter-spacing: 0.14em;
    color: rgba(170, 207, 209, 0.6);
    text-decoration: none;
    border-bottom: 1px dashed rgba(170, 207, 209, 0.24);
    padding-bottom: 2px;
}
.welcome-link:hover { color: #aacfd1; border-color: rgba(170, 207, 209, 0.55); }
.welcome-enter {
    background: #aacfd1;
    color: #05080d;
    border: 1px solid #aacfd1;
    padding: 9px 18px;
    font-family: inherit;
    font-size: 11px;
    letter-spacing: 0.18em;
    cursor: pointer;
}
.welcome-enter:hover { background: #c8dfe1; border-color: #c8dfe1; }
.welcome-enter:active { transform: translateY(1px); }

/* Phone: collapse the compare to one column, shrink type. Tight padding
   + scaled sizes keep the whole welcome above the fold on 375×667. */
@media (max-width: 640px) {
    .welcome { padding: 16px 14px; align-items: flex-start; }
    .welcome-title { font-size: 20px; letter-spacing: 0.12em; }
    .welcome-sub { font-size: 9px; letter-spacing: 0.2em; }
    .welcome-head { margin-bottom: 14px; }
    .welcome-lang { gap: 2px; margin-bottom: 10px; }
    .welcome-lang button { padding: 3px 7px; font-size: 10.5px; letter-spacing: 0.1em; }
    .welcome-compare { grid-template-columns: 1fr; gap: 8px; margin-bottom: 14px; }
    .welcome-col { padding: 10px 12px; }
    .welcome-h3 { font-size: 12px; margin-bottom: 6px; }
    .welcome-list { font-size: 11.5px; line-height: 1.4; }
    .welcome-list li { padding: 3px 0; }
    .welcome-cta { margin-bottom: 14px; }
    .welcome-cta-caption { font-size: 10.5px; }
    .welcome-cmd { font-size: 10.5px; padding: 9px 10px; }
    .welcome-cmdwrap { flex-direction: column; gap: 6px; }
    .welcome-copy { padding: 7px 0; }
    .welcome-foot { flex-direction: column-reverse; align-items: stretch; gap: 10px; padding-top: 10px; }
    .welcome-foot-right { align-items: stretch; }
    .welcome-enter { width: 100%; padding: 11px; }
    .welcome-link { text-align: center; }
}

/* Inline warning shown above the "continue anyway" button on mobile. Only
   rendered when the welcome gate is in mobile mode — the .welcome-warn node
   lives in the DOM year-round but stays hidden on desktop. */
.welcome-warn { display: none; }
html[data-welcome-mobile="1"] .welcome-warn {
    display: block;
    margin: 0 0 10px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 85, 85, 0.5);
    background: rgba(255, 85, 85, 0.08);
    color: #ffb3b3;
    font-size: 11px;
    letter-spacing: 0.08em;
    line-height: 1.45;
    text-align: center;
}

/* ── Mobile "not supported" toast ───────────────────────────────────── */
/* OS-native-style notification banner: pill-shaped card, blurred backdrop,
   slides down from the top. Fires when a mobile visitor tries to open a new
   tab after bypassing the welcome gate. */
.soa-toast {
    position: fixed;
    top: max(12px, env(safe-area-inset-top, 12px));
    left: 50%;
    transform: translate(-50%, -120%);
    z-index: 20000;
    width: min(92vw, 380px);
    padding: 12px 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: rgba(28, 28, 30, 0.92);
    color: #f5f5f7;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.2);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
    opacity: 0;
    pointer-events: auto;
    transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), opacity 220ms ease-out;
}
.soa-toast[data-show="1"] {
    transform: translate(-50%, 0);
    opacity: 1;
}
.soa-toast-icon {
    flex: 0 0 auto;
    width: 28px; height: 28px;
    border-radius: 7px;
    background: linear-gradient(135deg, #ff5e62, #ff3b30);
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
    letter-spacing: 0;
}
.soa-toast-body { flex: 1; min-width: 0; }
.soa-toast-title {
    margin: 0 0 2px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #ffffff;
}
.soa-toast-text {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: -0.005em;
}
@media (prefers-reduced-motion: reduce) {
    .soa-toast { transition: opacity 120ms linear; transform: translate(-50%, 0); }
}
.soa-toast--agent .soa-toast-icon { background: linear-gradient(135deg, #ffb86c, #ff9500); }
