/* USpeedtest web — mirrors app/src/main/java/com/uspeedtest/ui/theme/Theme.kt.
   Dark first. Mint = download, amber = upload, violet = latency, coral = error.
   One family (Bricolage Grotesque, variable): wide light figures for readouts, normal width for UI. */

:root {
  --ink: #0B0F17;
  --ink-raised: #131A26;
  --ink-card: #1A2333;
  --line: #2A3547;
  --text: #F5F7FA;
  --muted: #8A96AB;
  --mint: #38E8C6;
  --mint-deep: #13B8A0;
  --amber: #FFB547;
  --coral: #FF5C7A;
  --violet: #8B7CFF;
  --sky: #4DA8FF;
  --primary: var(--mint);
  --on-primary: var(--ink);
  --nav-bg: #0E141F;
  --ripple: rgba(56, 232, 198, 0.16);
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  --needle-glow: rgba(255, 255, 255, 0.16);
  color-scheme: dark;

  --font: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  /* Type scale, ratio ~1.2 from a 15px base. */
  --t-xs: 12px;
  --t-sm: 13.5px;
  --t-md: 15px;
  --t-lg: 18px;
  --t-xl: 22px;
  --t-2xl: 28px;
  --t-3xl: 40px;
  --t-hero: 58px;

  --r-sheet: 24px;
  --r-chip: 14px;
  --r-pill: 999px;
}

:root[data-theme="light"] {
  --ink: #F6F8FB;
  --ink-raised: #FFFFFF;
  --ink-card: #EDF0F5;
  --line: #C9D1DD;
  --text: #0B0F17;
  --muted: #5B6678;
  --mint: #13B8A0;
  --mint-deep: #0E9A86;
  --amber: #B8741A;
  --coral: #D62A4E;
  --violet: #5B4BD6;
  --sky: #1F7FD6;
  --primary: var(--mint-deep);
  --on-primary: #FFFFFF;
  --nav-bg: #FFFFFF;
  --ripple: rgba(19, 184, 160, 0.14);
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
  --needle-glow: rgba(11, 15, 23, 0.10);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-md);
  line-height: 1.4;
  font-variation-settings: "opsz" 14, "wdth" 100;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button { font: inherit; font-variation-settings: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }

/* Readout figures: the display cut of the same family. */
.figure {
  font-variation-settings: "opsz" 96, "wdth" 92;
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Shell: a phone-width column, bottom navigation like the Compose Scaffold. */
.shell { max-width: 480px; margin: 0 auto; min-height: 100%; display: flex; flex-direction: column; }
.screen { flex: 1; padding: 8px 20px calc(88px + env(safe-area-inset-bottom)); }

.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 6px; }
.topbar h1 { font-size: var(--t-2xl); font-weight: 500; margin: 0; letter-spacing: -0.01em; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
}
.icon-btn:hover:not(:disabled) { background: var(--ripple); color: var(--text); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn svg { width: 22px; height: 22px; }

/* Bottom navigation (Material 3 navigation bar) */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0;
  background: var(--nav-bg);
  border-top: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 20;
}
.nav-inner { max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); height: 74px; }
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  color: var(--muted); font-size: var(--t-xs); font-weight: 500;
}
.nav-item .pill { width: 60px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; transition: background 160ms ease; }
.nav-item svg { width: 22px; height: 22px; }
.nav-item[aria-selected="true"] { color: var(--text); }
.nav-item[aria-selected="true"] .pill { background: color-mix(in srgb, var(--primary) 22%, transparent); color: var(--primary); }

/* Surfaces. One sheet radius; nothing inside a sheet gets its own rounded box. */
.card { background: var(--ink-raised); border-radius: var(--r-sheet); padding: 20px; }
.divider { height: 1px; background: color-mix(in srgb, var(--line) 60%, transparent); margin: 14px 0 8px; }

/* Metric grid inside a sheet: hairlines, not nested cards. */
.tile-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: color-mix(in srgb, var(--line) 60%, transparent);
  border-radius: 12px; overflow: hidden;
  outline: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.tile { background: var(--ink-raised); padding: 12px 14px 12px; min-width: 0; }
.tile .label { font-size: var(--t-sm); color: var(--muted); }
.tile .value { display: flex; align-items: baseline; gap: 5px; margin-top: 3px; }
.tile .value b { font-size: var(--t-xl); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; letter-spacing: -0.01em; }
.tile .value span { font-size: var(--t-xs); color: var(--muted); }

/* Network chip (CarrierChip.kt) */
.chip-row { display: flex; gap: 8px; margin-top: 8px; }
.chip {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px;
  background: var(--ink-raised); border-radius: var(--r-chip); padding: 10px 12px;
}
/* Brand tile: a rounded square that always carries its own ground, so a logo never sits on the
   theme and never brings its own edge. Artwork is pre-composited square, hence object-fit: cover. */
.brand {
  width: 36px; height: 36px; border-radius: 10px; flex: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--t-xs); font-weight: 700; letter-spacing: 0.04em; color: #fff; background: var(--sky);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}
.brand.has-logo { background: #fff; }
.brand > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand svg { width: 22px; height: 22px; }
.brand.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 10px; }
.card .brand-line { gap: 10px; padding: 3px 0; }
.card .brand-line .brand { width: 20px; height: 20px; border-radius: 6px; font-size: 8px; letter-spacing: 0; }
.hist-row .brand { width: 34px; height: 34px; }
.chip .body { flex: 1; min-width: 0; }
.chip .title { display: flex; align-items: center; gap: 6px; font-size: var(--t-lg); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.25; }
.chip .sub { color: var(--muted); font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip .trail { display: flex; align-items: center; gap: 6px; flex: none; }
.badge {
  display: inline-block; padding: 2px 7px; border-radius: 6px;
  font-size: var(--t-xs); font-weight: 600; white-space: nowrap;
  color: var(--mint); background: color-mix(in srgb, var(--mint) 16%, transparent);
}
.skeleton { background: var(--line); animation: breathe 1.4s ease-in-out infinite; border-radius: 6px; color: transparent !important; }
@keyframes breathe { 50% { opacity: 0.45; } }

/* Readout strip: the two headline figures and the latency row, ruled like an instrument panel. */
.headline-row { display: flex; gap: 16px; margin-top: 18px; }
.headline { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.headline .lab { display: flex; align-items: center; gap: 7px; font-size: var(--t-sm); color: var(--muted); }
.headline .lab .dot { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.headline .lab .dot svg { width: 13px; height: 13px; }
.headline.active .lab { color: var(--text); }
.headline .num { display: flex; align-items: baseline; gap: 6px; margin-top: 6px; }
.headline .num .figure { font-size: var(--t-3xl); }
.headline .num .unit { font-size: var(--t-sm); color: var(--muted); }
.headline .num .figure.placeholder { color: var(--muted); }
.headline.down .dot { background: color-mix(in srgb, var(--mint) 12%, transparent); color: var(--mint); }
.headline.up .dot { background: color-mix(in srgb, var(--amber) 12%, transparent); color: var(--amber); }
.headline.active.down .dot { background: color-mix(in srgb, var(--mint) 26%, transparent); }
.headline.active.up .dot { background: color-mix(in srgb, var(--amber) 26%, transparent); }

.ping-row {
  display: flex; margin-top: 14px; padding: 10px 0;
  border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.ping-cell { flex: 1; display: flex; flex-direction: column; }
.ping-cell .lab { display: flex; align-items: center; gap: 4px; font-size: var(--t-xs); color: var(--muted); }
.ping-cell .lab svg { width: 13px; height: 13px; }
.ping-cell .val { font-size: var(--t-lg); font-weight: 500; margin-top: 1px; }
.ping-cell .val span:not(.tnum) { font-size: var(--t-xs); font-weight: 400; color: var(--muted); }
.c-violet { color: var(--violet); } .c-mint { color: var(--mint); } .c-amber { color: var(--amber); } .c-sky { color: var(--sky); } .c-coral { color: var(--coral); }

/* Sparkline: the live trace sits right under the rule. */
.spark { display: block; width: 100%; height: 48px; margin-top: 8px; }

/* Gauge (Gauge.kt) */
.gauge-wrap { position: relative; width: 100%; aspect-ratio: 1; margin: 4px auto 0; max-width: 400px; }
.gauge-wrap canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.gauge-center { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.gauge-center > * { pointer-events: auto; }
.readout { display: flex; flex-direction: column; align-items: center; }
.readout .big { font-size: clamp(42px, 14vw, var(--t-hero)); }
.readout .unit { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: var(--t-md); color: var(--muted); }
.readout .unit svg { width: 16px; height: 16px; }

/* Rolling digits (rolling.js): each digit is a clipped column whose strip rolls and blurs. */
.roll { display: inline-flex; align-items: flex-start; }
.roll-col { display: inline-block; height: 1.1em; overflow: hidden; }
.roll-strip { display: block; will-change: transform; }
.roll-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.roll-strip > span, .roll-static { display: block; height: 1.1em; line-height: 1.1em; text-align: center; }

/* Low power: plain text in place of the dial. */
.plain { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 28px 0 8px; }
.plain-phase { font-size: var(--t-sm); color: var(--muted); }
.plain-num { display: flex; align-items: baseline; gap: 8px; }
.plain-num .figure { font-size: var(--t-3xl); }
.plain-num .unit { color: var(--muted); }
.plain-dir { font-size: var(--t-xl); color: var(--muted); }
.plain-btn { margin-top: 8px; padding: 10px 22px; border: 1px solid var(--line); border-radius: var(--r-pill); font-weight: 500; color: var(--text); }
.ping-pulse { display: flex; flex-direction: column; align-items: center; }
.ping-pulse .word { font-size: var(--t-xl); font-weight: 500; letter-spacing: 0.18em; color: var(--violet); }
.ping-pulse .dots { display: flex; gap: 8px; margin-top: 10px; }
.ping-pulse .dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--violet); animation: pulse 1.2s linear infinite; }
.ping-pulse .dots i:nth-child(2) { animation-delay: 0.2s; }
.ping-pulse .dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes pulse { 0% { opacity: 0.2; } 50% { opacity: 1; } 100% { opacity: 0.2; } }

/* GO button (GoButton.kt) */
.go {
  position: relative; border-radius: 50%; aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink-raised);
  box-shadow: inset 0 0 0 3px var(--line);
  overflow: hidden; user-select: none;
  transition: transform 120ms ease;
}
.go:active { transform: scale(0.97); }
.go::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  /* Hard stops: a solid arc segment that rotates, not a gradient. */
  background: conic-gradient(from 0deg, var(--mint) 0 28%, transparent 28% 100%);
  -webkit-mask: radial-gradient(circle closest-side, transparent 91%, #000 92%);
  mask: radial-gradient(circle closest-side, transparent 91%, #000 92%);
  animation: spin 6s linear infinite;
}
.go.running::before { animation: none; background: color-mix(in srgb, var(--mint) 70%, transparent); }
.go .text { font-size: 30px; font-weight: 600; letter-spacing: 0.08em; font-variation-settings: "opsz" 40, "wdth" 100; }
.go.again .text { font-size: var(--t-lg); }
.go .stop { width: 22%; aspect-ratio: 1; background: var(--text); border-radius: 4px; }
.go.gauge-go { width: 40%; }
.go.small { width: 64px; }
.go.done { width: 160px; }
@keyframes spin { to { transform: rotate(360deg); } }

.phase-caption { text-align: center; font-size: var(--t-sm); color: var(--muted); min-height: 18px; }
.running-controls { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 2px; }
.center { display: flex; justify-content: center; }

/* Result sheet: rises into place once. */
#result-section { animation: rise 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Info lines */
.info-lines { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.info-line { display: flex; align-items: center; gap: 12px; white-space: nowrap; overflow: hidden; }
.info-line svg { width: 20px; height: 20px; flex: none; color: var(--muted); }
.info-line span { overflow: hidden; text-overflow: ellipsis; }
.info-line.muted span { color: var(--muted); }
.card .info-line { gap: 10px; padding: 3px 0; font-size: var(--t-sm); }
.card .info-line svg { width: 16px; height: 16px; }

/* Grade pills */
.pills { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pill-g { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: var(--r-pill); font-size: var(--t-sm); color: var(--muted); }
.pill-g i { width: 7px; height: 7px; border-radius: 50%; }
.pill-g b { font-weight: 600; }

.card-foot { display: flex; align-items: center; margin-top: 10px; }
.card-foot .stamp { flex: 1; font-size: var(--t-sm); color: var(--muted); }
.text-btn { padding: 8px 12px; border-radius: var(--r-pill); color: var(--primary); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.text-btn:hover { background: var(--ripple); }
.text-btn svg { width: 16px; height: 16px; }
.text-btn.danger { color: var(--coral); }

/* History: a Material list, divider-separated. */
.filter-row { display: flex; align-items: center; gap: 8px; padding: 10px 0 6px; }
.filter-chip { padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); font-size: var(--t-sm); font-weight: 500; }
.filter-chip[aria-pressed="true"] { background: color-mix(in srgb, var(--primary) 20%, transparent); border-color: transparent; color: var(--primary); }
.filter-row .spacer { flex: 1; }
.history-list { display: flex; flex-direction: column; margin-top: 4px; }
.hist-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 4px; text-align: left; width: 100%;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
  border-radius: 8px;
}
.hist-row:hover { background: var(--ripple); }
.hist-row .body { flex: 1; min-width: 0; }
.hist-row .t { display: flex; align-items: center; gap: 8px; font-size: var(--t-lg); font-weight: 500; white-space: nowrap; overflow: hidden; }
.hist-row .t span { overflow: hidden; text-overflow: ellipsis; }
.hist-row .s { color: var(--muted); font-size: var(--t-sm); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-row .nums { text-align: right; font-size: var(--t-lg); font-weight: 500; line-height: 1.3; white-space: nowrap; }
.hist-row .nums small { display: block; font-size: var(--t-xs); font-weight: 400; color: var(--muted); }
.empty { display: flex; align-items: center; justify-content: center; min-height: 40vh; color: var(--muted); text-align: center; padding: 0 24px; }

/* Settings */
.section-h { font-size: var(--t-sm); font-weight: 500; color: var(--muted); margin: 22px 0 8px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: var(--r-pill); overflow: hidden; }
.seg button { padding: 10px 8px; font-weight: 500; color: var(--text); border-left: 1px solid var(--line); }
.seg button:first-child { border-left: 0; }
.seg button[aria-pressed="true"] { background: color-mix(in srgb, var(--primary) 20%, transparent); color: var(--primary); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; }
.setting-row .k { font-size: var(--t-lg); }
.setting-row .d { color: var(--muted); font-size: var(--t-sm); margin-top: 2px; }
.switch { position: relative; width: 52px; height: 32px; border-radius: 16px; background: var(--line); transition: background 160ms; flex: none; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--muted); transition: transform 160ms, background 160ms; }
/* Off: a visible outline, so the track does not vanish into the page. */
.switch[aria-checked="false"] { box-shadow: inset 0 0 0 2px var(--muted); background: var(--ink-card); }
.switch[aria-checked="true"] { background: var(--primary); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--on-primary); }
.about { color: var(--muted); line-height: 1.55; max-width: 60ch; }
.about a, .setting-row .d a { color: var(--primary); text-decoration: none; }

/* Detail screen */
.detail-head { display: flex; align-items: center; gap: 4px; padding: 8px 0; }
.detail-head h2 { font-size: var(--t-lg); font-weight: 500; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 45%, transparent); font-size: var(--t-sm); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; }
.kv .v.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.chart-label { display: flex; justify-content: space-between; font-size: var(--t-sm); color: var(--muted); margin: 18px 0 2px; }

/* Snackbar and dialog */
.snackbar {
  position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%) translateY(20px);
  background: var(--ink-card); color: var(--text);
  padding: 12px 16px; border-radius: 10px; box-shadow: var(--shadow);
  max-width: min(440px, calc(100% - 32px)); opacity: 0; transition: opacity 180ms, transform 180ms; z-index: 30;
  pointer-events: none;
}
.snackbar.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 40; padding: 16px; }
.dialog { background: var(--ink-card); border-radius: var(--r-sheet); padding: 24px; max-width: 360px; width: 100%; box-shadow: var(--shadow); }
.dialog h3 { margin: 0 0 8px; font-size: var(--t-xl); font-weight: 500; }
.dialog p { margin: 0 0 18px; color: var(--muted); }
.dialog .row { display: flex; justify-content: flex-end; gap: 4px; }

/* Primary action as a link or button: flat accent, pill. */
.cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--r-pill);
  background: var(--primary); color: var(--on-primary);
  font-weight: 600; font-size: var(--t-md); text-decoration: none;
  transition: transform 120ms ease;
}
.cta:active { transform: scale(0.98); }
.cta:focus-visible, .quiet-link:focus-visible, .wordmark:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.cta svg { width: 20px; height: 20px; }
a.text-btn { text-decoration: none; }
.quiet-link { display: inline-block; margin-top: 18px; font-size: var(--t-sm); color: var(--muted); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--muted) 40%, transparent); }
.quiet-link:hover { color: var(--text); }

/* History: open a shared result by link or id. */
.open-row { margin-top: 18px; }
.open-row .section-h { display: block; margin-top: 0; }
.open-field { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px 3px 3px 16px; }
.open-field:focus-within { border-color: var(--primary); }
.open-field input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text);
  font: inherit; font-size: var(--t-sm); padding: 7px 0;
}
.open-field input::placeholder { color: var(--muted); }

/* Shared result (/r/<id>): the completed state, read-only, with the date up front. */
.share .share-top { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 4px; }
.wordmark { font-weight: 600; font-size: var(--t-lg); color: var(--text); text-decoration: none; letter-spacing: -0.01em; }
.wordmark::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); margin-right: 8px; vertical-align: 1px; }
.share-when { padding: 18px 0 16px; }
.share-kicker { font-size: var(--t-sm); color: var(--muted); }
.share-date { margin: 6px 0 0; font-size: var(--t-2xl); font-weight: 500; letter-spacing: -0.015em; line-height: 1.15; }
.share-time { font-size: var(--t-lg); color: var(--muted); margin-top: 2px; }
.share-chip { background: var(--ink-raised); }
.share .headline .num .figure { font-size: 48px; }
.share-card { margin-top: 18px; }
.share-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin-top: 24px; }
.share-loading { padding: 40px 0; }
.share-empty { padding: 56px 0 24px; text-align: center; }
.share-empty h1 { font-size: var(--t-2xl); font-weight: 500; margin: 0 0 10px; letter-spacing: -0.01em; }
.share-empty p { color: var(--muted); margin: 0 auto; max-width: 36ch; }
.share-sheet { animation: rise 320ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
body.share-mode .screen { padding-bottom: calc(40px + env(safe-area-inset-bottom)); }
body.share-mode .snackbar { bottom: calc(24px + env(safe-area-inset-bottom)); }

.low-power .go::before, .low-power .skeleton { animation: none; }
.low-power #result-section, .low-power .share-sheet { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .go::before, .skeleton, .ping-pulse .dots i { animation: none; }
  #result-section, .share-sheet { animation: none; }
  .cta { transition: none; }
  .snackbar, .switch, .switch::after, .nav-item .pill { transition: none; }
}
