/* ==========================================================================
   SpeedTest — design tokens
   A precision-instrument aesthetic, executed with SaaS-grade polish: a
   technical monospace readout, a calm humanist UI face, and a teal/amber
   duotone (download vs. upload — like the two needles on a lab meter).
   Zero external font/icon dependencies on purpose: this is meant to run
   on air-gapped LANs with nothing fetched from a CDN.
   ========================================================================== */

:root {
  --bg: #F5F6FA;
  --bg-2: #ECEEF4;
  --surface: #FFFFFF;
  --surface-2: #EEF0F5;
  --border: #E1E4EC;
  --text: #10131A;
  --text-muted: #565F6B;
  --text-faint: #838C97;

  --accent: #0B7285;          /* download / teal */
  --accent-bright: #0E93A8;
  --accent-ink: #085C6C;
  --accent-2: #B5570E;        /* upload / amber */
  --accent-2-bright: #D66A16;
  --accent-2-ink: #94480B;
  --danger: #C4432B;

  --accent-grad: linear-gradient(135deg, var(--accent), var(--accent-bright));
  --brand-grad: linear-gradient(135deg, #0B7285 0%, #0E93A8 60%, #14A6BC 100%);

  --focus: #0B7285;

  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 24px;

  --shadow-1: 0 1px 2px rgba(16, 19, 26, 0.05), 0 1px 1px rgba(16, 19, 26, 0.04);
  --shadow-2: 0 10px 28px rgba(16, 19, 26, 0.09), 0 2px 8px rgba(16, 19, 26, 0.06);
  --shadow-3: 0 20px 48px rgba(16, 19, 26, 0.14), 0 4px 12px rgba(16, 19, 26, 0.08);

  --transition-fast: 140ms ease;
  --transition-med: 260ms cubic-bezier(.2,.7,.3,1);
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  color-scheme: light;
}

html.dark {
  --bg: #0A0D12;
  --bg-2: #0D1117;
  --surface: #12161D;
  --surface-2: #181D25;
  --border: #262C36;
  --text: #E9EDF2;
  --text-muted: #9AA6B2;
  --text-faint: #6E7883;

  --accent: #2BB8CC;
  --accent-bright: #55CBDC;
  --accent-ink: #7FE3F0;
  --accent-2: #E08A3C;
  --accent-2-bright: #F0A45E;
  --accent-2-ink: #F4B677;
  --danger: #E5624B;

  --accent-grad: linear-gradient(135deg, var(--accent), var(--accent-bright));
  --brand-grad: linear-gradient(135deg, #17A6BA 0%, #2BB8CC 55%, #55CBDC 100%);

  --focus: #2BB8CC;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-2: 0 12px 30px rgba(0, 0, 0, 0.45);
  --shadow-3: 0 24px 56px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body {
  min-height: 100vh;
  transition: background var(--transition-med), color var(--transition-med);
}

::selection { background: var(--accent); color: #fff; }

a { color: var(--accent); }

button {
  font-family: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.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;
}

/* ------------------------------------------------------ background decor -- */

.bg-decor {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.16;
}
html.dark .blob { opacity: 0.22; }
.blob-a {
  width: 480px; height: 480px;
  top: -180px; left: -140px;
  background: var(--accent);
}
.blob-b {
  width: 420px; height: 420px;
  top: 320px; right: -160px;
  background: var(--accent-2);
}

/* ---------------------------------------------------------------- shell -- */

.app-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: max(20px, var(--safe-t)) max(20px, var(--safe-r)) calc(48px + var(--safe-b)) max(20px, var(--safe-l));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 4px 0 4px;
}

.brand { min-width: 0; }

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.wordmark .dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent-grad);
  display: inline-block;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
  flex-shrink: 0;
}
.wordmark .tag {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 8px;
  margin-left: 2px;
}
.tagline {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 340px;
}

.topbar-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 19px; height: 19px; stroke: var(--text-muted); }

.host-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  margin-top: 14px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-1);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  max-width: 100%;
}
.host-pill svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--accent); }
.host-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-mono);
  color: var(--text);
}

/* ----------------------------------------------------------------- hero -- */

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 18px;
}

.meter-card {
  position: relative;
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-3);
  padding: 36px 24px 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}
.meter-card::before {
  content: '';
  position: absolute;
  top: -90px; left: 50%;
  width: 320px; height: 320px;
  transform: translateX(-50%);
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 20%, transparent) 0%, transparent 70%);
  pointer-events: none;
  transition: background var(--transition-med);
}
.meter-card.upload-phase::before {
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 20%, transparent) 0%, transparent 70%);
}

.meter-stage {
  position: relative;
  width: 100%;
}

.meter-wrap {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 0.72;
  margin: 0 auto;
}

.meter-wrap svg { width: 100%; height: 100%; display: block; overflow: visible; }

.meter-track { fill: none; stroke: var(--surface-2); stroke-width: 10; stroke-linecap: round; }
.meter-fill { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round;
  transition: stroke var(--transition-med);
  filter: drop-shadow(0 0 0 transparent);
}
html.dark .meter-fill { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 55%, transparent)); }
.meter-fill.upload { stroke: var(--accent-2); }
html.dark .meter-fill.upload { filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent-2) 55%, transparent)); }

.meter-tick { stroke: var(--text-faint); stroke-width: 1.4; opacity: .5; }
.meter-scale-label {
  font-family: var(--font-mono);
  font-size: 8.5px;
  fill: var(--text-faint);
}
.meter-needle { stroke: var(--text); stroke-width: 2.5; stroke-linecap: round; }
.meter-pivot { fill: var(--text); }

.meter-readout {
  position: absolute;
  left: 50%; top: 60%;
  transform: translate(-50%, -50%);
  text-align: center;
  width: 100%;
}
.meter-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: clamp(38px, 10.5vw, 54px);
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.meter-unit {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.meter-unit .phase { color: var(--accent); transition: color var(--transition-fast); }
.meter-unit .phase.upload { color: var(--accent-2); }

.status-line {
  min-height: 20px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  text-align: center;
}

/* --------------------------------------------------------------- start -- */

.start-btn {
  margin: 20px auto 4px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 36px;
  border-radius: 999px;
  border: none;
  background: var(--brand-grad);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 24px -6px color-mix(in srgb, var(--accent) 55%, transparent), var(--shadow-1);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}
.start-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -6px color-mix(in srgb, var(--accent) 60%, transparent), var(--shadow-1); }
.start-btn:active { transform: translateY(0) scale(0.98); }
.start-btn.stop {
  background: var(--danger);
  box-shadow: 0 10px 24px -6px color-mix(in srgb, var(--danger) 45%, transparent), var(--shadow-1);
}
.start-btn svg { width: 16px; height: 16px; }

/* ----------------------------------------------------------------- stats -- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
  margin-top: 22px;
}

.stat-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: var(--shadow-1);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  min-width: 0;
}
.stat-chip.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent), var(--shadow-1);
}
.stat-chip[data-metric="upload"].active {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-2) 12%, transparent), var(--shadow-1);
  border-color: var(--accent-2);
}
.stat-chip[data-metric="download"].active { border-color: var(--accent); }

.chip-icon {
  width: 30px; height: 30px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  background: var(--surface-2);
  color: var(--text-muted);
}
.chip-icon svg { width: 15px; height: 15px; }
.stat-chip[data-metric="download"] .chip-icon { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.stat-chip[data-metric="upload"] .chip-icon { background: color-mix(in srgb, var(--accent-2) 14%, transparent); color: var(--accent-2); }

.chip-text { min-width: 0; overflow: hidden; }
.stat-chip .label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}
.stat-chip .value {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.stat-chip .value .u {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 2px;
}

/* ----------------------------------------------------------------- trace -- */

.trace-wrap {
  width: 100%;
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 12px 14px 10px;
  box-shadow: var(--shadow-1);
}
.trace-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 6px;
}
.trace-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.trace-wrap canvas {
  width: 100%;
  height: 84px;
  display: block;
}
.trace-legend {
  display: flex;
  gap: 14px;
  font-size: 11px;
  color: var(--text-muted);
}
.trace-legend span { display: flex; align-items: center; gap: 5px; }
.trace-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.trace-legend i.dl { background: var(--accent); }
.trace-legend i.ul { background: var(--accent-2); }

/* ------------------------------------------------------------- actions -- */

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
  width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}
.ghost-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast), border-color var(--transition-fast);
}
.ghost-btn:hover { background: var(--surface-2); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.ghost-btn:active { transform: scale(0.96); }
.ghost-btn svg { width: 15px; height: 15px; stroke: var(--text-muted); }

/* --------------------------------------------------------------- footer -- */

.footer {
  margin-top: auto;
  padding-top: 32px;
  font-size: 12px;
  color: var(--text-faint);
}
.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}
.footer a { color: var(--text-muted); text-decoration: none; font-weight: 600; }
.footer a:hover { color: var(--accent); }

/* --------------------------------------------------------------- drawer -- */

.scrim {
  position: fixed; inset: 0;
  background: rgba(8, 10, 14, 0.42);
  backdrop-filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-med);
  z-index: 40;
}
.scrim.open { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0;
  height: 100%;
  width: min(380px, 90vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-3);
  transform: translateX(100%);
  transition: transform var(--transition-med);
  z-index: 41;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: var(--safe-t);
  padding-bottom: var(--safe-b);
}
.drawer.open { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-head h2 { font-size: 15px; margin: 0; font-weight: 700; }
.drawer-body { padding: 16px 18px 24px; overflow-y: auto; }

.drawer-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
  margin: 22px 0 12px;
}
.drawer-section-label:first-child { margin-top: 2px; }

.field {
  margin-bottom: 18px;
}
.field label {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field label span.val { color: var(--text); font-family: var(--font-mono); }
.field input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
.field input[type="text"], .field input[type="number"] {
  width: 100%;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
}
.field input[type="text"]:focus, .field input[type="number"]:focus {
  border-color: var(--accent);
}
.field .hint {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}
.field .hint code {
  font-family: var(--font-mono);
  background: var(--surface-2);
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 11px;
}

.checkrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.checkrow:last-child { border-bottom: none; }

.switch {
  position: relative;
  width: 40px; height: 24px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.3);
  transition: transform var(--transition-fast);
}
.switch.on { background: var(--accent-grad); border-color: transparent; }
.switch.on::after { transform: translateX(16px); }

.segmented {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.segmented button {
  flex: 1;
  min-width: 0;
  border: none;
  background: var(--surface);
  padding: 9px 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  border-left: 1px solid var(--border);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.segmented button:first-child { border-left: none; }
.segmented button.on { background: var(--accent-grad); color: #fff; }

.reset-link {
  display: inline-block;
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--accent);
  cursor: pointer;
  background: none; border: none; padding: 0;
}

/* ------------------------------------------------------------- history -- */

.history-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 40px 10px;
}
.history-row {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}
.history-row:last-child { border-bottom: none; }
.history-row .when {
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.history-row .metric { font-family: var(--font-mono); text-align: right; white-space: nowrap; }
.history-row .metric small { color: var(--text-muted); font-family: var(--font-ui); }

.clear-history {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--danger);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ---------------------------------------------------------------- toast -- */

.toast {
  position: fixed;
  left: 50%; bottom: calc(24px + var(--safe-b));
  transform: translateX(-50%) translateY(12px);
  background: var(--text);
  color: var(--bg);
  padding: 11px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  z-index: 60;
  max-width: min(90vw, 420px);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* --------------------------------------------------------------- install -- */

.install-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 18px;
  font-size: 13px;
  box-shadow: var(--shadow-1);
}
.install-banner.show { display: flex; }
.install-banner span { flex: 1 1 auto; min-width: 180px; }
.install-actions { display: flex; gap: 6px; flex-shrink: 0; }
.install-banner button {
  background: var(--accent-grad);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
}
.install-banner .dismiss {
  background: none;
  color: var(--text-muted);
  padding: 8px;
}

/* ---------------------------------------------------------------- error -- */

.error-banner {
  display: none;
  align-items: center;
  gap: 10px;
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border));
  color: var(--danger);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
}
.error-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.error-banner.show { display: flex; }

/* -------------------------------------------------------------- motion -- */

.hero > * { animation: rise-in 480ms cubic-bezier(.2,.7,.2,1) both; }
.meter-card { animation-delay: 0ms; }
.stats { animation-delay: 70ms; }
.result-actions { animation-delay: 90ms; }
.trace-wrap { animation-delay: 120ms; }
.install-banner { animation: none; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .hero > * { animation: none; }
}

/* ---------------------------------------------------------- responsive -- */

@media (max-width: 640px) {
  .tagline { display: none; }
}

@media (max-width: 460px) {
  .wordmark .tag { display: none; }
  .meter-card { padding: 30px 16px 24px; }
}

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

@media (max-width: 360px) {
  .app-shell { padding-left: max(14px, var(--safe-l)); padding-right: max(14px, var(--safe-r)); }
  .start-btn { padding: 14px 26px; }
  .host-pill span { max-width: 46vw; }
}
