/* Tubestone FX -- dark-first trading UI, mobile first. */

:root {
  --bg: #070b14;
  --surface: #0e1524;
  --surface-2: #141d30;
  --border: #1e2a45;
  --text: #e9effa;
  --muted: #8496b3;
  --faint: #5b6a86;
  --up: #22d18b;
  --down: #ff5f70;
  --accent: #4da3ff;
  --radius: 16px;
  --pad: 16px;

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

* { box-sizing: border-box; }

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

body {
  padding-bottom: calc(28px + env(safe-area-inset-bottom));
  min-height: 100dvh;
}

/* Every number in the app is tabular so digits do not jitter on tick. */
.num, .price, .chg, .rate-price, .hero-price {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/*
 * Flags are emoji, and emoji must never inherit a bold weight.
 *
 * The hero card's label is font-weight 600, and the flag span inherited it.
 * There is no bold cut of the emoji font, so the browser synthesised one --
 * measured on a canvas, the same flag drew 151 ink pixels across 19px at
 * weight 600 versus 94 across 17px at weight 400. That smear is what made the
 * flag look wrong in the top card while the identical flag looked fine in the
 * list and detail sheet, which do not set a weight.
 *
 * Pinning weight and font-synthesis is the actual fix; the rest keeps every
 * flag boxed identically wherever it appears.
 */
.flag, .rate-flag {
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: normal;
  line-height: 1;
  flex: none;
  display: inline-block;
}

/* ---------------------------------------------------------------- */
/* Top bar                                                           */
/* ---------------------------------------------------------------- */

/*
 * The full lockup is ~1.7:1, so showing it whole costs vertical space. Rather
 * than growing the bar, the app name and status stack in the column beside it
 * and consume the height the logo already occupies -- the header ends up the
 * same size it was with a small wordmark.
 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: calc(9px + env(safe-area-inset-top)) var(--pad) 9px;
  background: rgba(7, 11, 20, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand {
  margin: 0;
  flex: none;
  display: block;
  line-height: 0;
}

.brand-logo {
  width: 100px;
  height: auto;
  display: block;
}

.topbar-text {
  flex: 1;
  min-width: 0;
}

.brand-fx {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 1;
  color: var(--accent);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}
.icon-btn:active { background: var(--surface-2); }
.icon-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  /* The gear's teeth are fine; a heavier stroke closes the gaps between them. */
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.statusline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  font-size: 12.5px;
  color: var(--muted);
  min-width: 0;
}
#status-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}
.dot[data-state="live"] {
  background: var(--up);
  box-shadow: 0 0 0 0 rgba(34, 209, 139, 0.6);
  animation: pulse 2.4s infinite;
}
.dot[data-state="stale"] { background: #e8b339; }
.dot[data-state="error"] { background: var(--down); }
.dot[data-state="loading"] { background: var(--accent); animation: pulse 1.2s infinite; }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 209, 139, 0.55); }
  70%  { box-shadow: 0 0 0 7px rgba(34, 209, 139, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 209, 139, 0); }
}

/* ---------------------------------------------------------------- */
/* Banner                                                            */
/* ---------------------------------------------------------------- */

.banner {
  margin: 10px var(--pad) 0;
  padding: 10px 13px;
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid;
}
.banner[data-kind="warn"] {
  background: rgba(232, 179, 57, 0.1);
  border-color: rgba(232, 179, 57, 0.32);
  color: #f0cd7d;
}
.banner[data-kind="error"] {
  background: rgba(255, 95, 112, 0.1);
  border-color: rgba(255, 95, 112, 0.32);
  color: #ff9aa6;
}
.banner[data-kind="alert"] {
  background: rgba(77, 163, 255, 0.12);
  border-color: rgba(77, 163, 255, 0.42);
  color: #a9cfff;
  font-weight: 600;
}

/* ---------------------------------------------------------------- */
/* Hero card                                                         */
/* ---------------------------------------------------------------- */

main { padding: 0 var(--pad); }

.hero {
  margin-top: 14px;
  padding: 18px;
  border-radius: var(--radius);
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(77, 163, 255, 0.1), transparent 62%),
    var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
}
.hero:active { background: var(--surface-2); }

.hero-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hero-pair {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}
/* Matches the list rows -- the hero card should never show a smaller flag
   than the rows beneath it. */
.hero-pair .flag { font-size: 22px; }

.hero-price {
  margin: 10px 0 0;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
}

.hero-sub {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--faint);
}

.chg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 999px;
}
.chg[data-dir="up"]   { color: var(--up);   background: rgba(34, 209, 139, 0.13); }
.chg[data-dir="down"] { color: var(--down); background: rgba(255, 95, 112, 0.13); }
.chg[data-dir="flat"] { color: var(--muted); background: rgba(132, 150, 179, 0.13); }

.hero-spark { margin-top: 14px; }
.hero-spark svg { display: block; width: 100%; height: 62px; }

/* ---------------------------------------------------------------- */
/* Rate list                                                         */
/* ---------------------------------------------------------------- */

.section-label {
  margin: 24px 0 9px;
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--faint);
}

.rate-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.rate-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) 68px auto;
  align-items: center;
  gap: 13px;
  padding: 16px 15px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.rate-row:last-child { border-bottom: 0; }
.rate-row:active { background: var(--surface-2); }

.rate-flag { font-size: 22px; line-height: 1; }

/* nowrap matters: "AUD / ZAR" broke across two lines at 375px otherwise. */
.rate-pair {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.rate-spark svg { display: block; width: 68px; height: 26px; }

.rate-figures { text-align: right; }

/* These are spans, so they need to be blocks to stack rather than run on. */
.rate-price {
  display: block;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.rate-chg {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-top: 3px;
  white-space: nowrap;
}
.rate-chg[data-dir="up"]   { color: var(--up); }
.rate-chg[data-dir="down"] { color: var(--down); }
.rate-chg[data-dir="flat"] { color: var(--muted); }

/* Brief tint when a printed price actually changes. */
@keyframes flash-up {
  from { background-color: rgba(34, 209, 139, 0.18); }
  to   { background-color: transparent; }
}
@keyframes flash-down {
  from { background-color: rgba(255, 95, 112, 0.18); }
  to   { background-color: transparent; }
}
.flash-up   { animation: flash-up 0.85s ease-out; }
.flash-down { animation: flash-down 0.85s ease-out; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, #1a2439 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: 6px;
  color: transparent;
}
@keyframes shimmer {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.disclaimer {
  margin: 20px 2px 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--faint);
}

/* ---------------------------------------------------------------- */
/* Pull to refresh                                                   */
/* ---------------------------------------------------------------- */

.refresh-hint {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 4px);
  left: 50%;
  transform: translate(-50%, -46px);
  z-index: 40;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
  pointer-events: none;
}
.refresh-hint.show { transform: translate(-50%, 0); opacity: 1; }

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid var(--faint);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- */
/* Bottom sheets                                                     */
/* ---------------------------------------------------------------- */

.sheet { position: fixed; inset: 0; z-index: 50; }
.sheet[hidden] { display: none; }

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 6, 12, 0.68);
  backdrop-filter: blur(2px);
  animation: fade 0.2s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet-panel {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 90dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-radius: 22px 22px 0 0;
  padding: 8px var(--pad) calc(26px + env(safe-area-inset-bottom));
  animation: slide-up 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes slide-up { from { transform: translateY(100%); } to { transform: none; } }

.sheet-grip {
  width: 38px;
  height: 4px;
  border-radius: 999px;
  background: var(--border);
  margin: 6px auto 14px;
  cursor: pointer;
}

.sheet-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ---------------------------------------------------------------- */
/* Detail sheet                                                      */
/* ---------------------------------------------------------------- */

.detail-head { display: flex; align-items: flex-start; gap: 12px; }
.detail-head .flag { font-size: 30px; line-height: 1; }
.detail-title { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.detail-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--faint); }

.detail-price {
  margin: 16px 0 0;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.detail-chg-row { margin-top: 9px; }

/* Timeframe tabs */
.range-tabs {
  display: flex;
  gap: 6px;
  margin: 18px 0 12px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.range-tabs::-webkit-scrollbar { display: none; }

.range-tab {
  flex: 1 0 auto;
  min-width: 38px;
  padding: 7px 9px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: pointer;
  text-align: center;
}
.range-tab[aria-selected="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(77, 163, 255, 0.14);
}

.detail-chart {
  position: relative;
  margin: 0 0 4px;
  transition: opacity 0.15s ease;
  /* Horizontal drags scrub the chart; vertical drags still scroll the sheet. */
  touch-action: pan-y;
  -webkit-tap-highlight-color: transparent;
}

/* Scrub crosshair */
.scrub {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.scrub[hidden] { display: none; }

.scrub-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--muted);
  opacity: 0.5;
}

.scrub-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--text);
  border: 2px solid var(--accent);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 3px rgba(7, 11, 20, 0.85);
}

.scrub-tip {
  position: absolute;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 5px 9px;
  white-space: nowrap;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
}
.scrub-tip b {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--text);
}
.scrub-tip span {
  display: block;
  font-size: 10.5px;
  color: var(--faint);
  margin-top: 1px;
}
.detail-chart svg { display: block; width: 100%; height: 150px; }

/*
 * Loading states:
 *   "1"     first draw or an explicit range change -- dim and show the spinner
 *   "quiet" background refresh of a chart already on screen -- show nothing,
 *           so a 30-second poll never makes the chart blink
 *   "0"     idle
 */
.detail-chart[data-loading="1"] { opacity: 0.35; }

.chart-loader {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
}
.detail-chart[data-loading="1"] .chart-loader { display: grid; }

.chart-axis {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  margin-top: 7px;
}

.chart-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 15px;
  font-size: 11.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}
.chart-meta b { color: var(--muted); font-weight: 600; }
/* The shared pill is sized for the headline; scale it down in this row. */
.chart-meta .chg { font-size: 11.5px; padding: 2px 8px; }

.chart-caption {
  font-size: 11.5px;
  color: var(--faint);
  text-align: center;
  margin-top: 6px;
}

.range-block { margin-top: 26px; }

.range-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}
.range-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}
.range-pos {
  font-size: 10.5px;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.range-track {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.range-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(77, 163, 255, 0.3), var(--accent));
  transition: width 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.range-marker {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  border: 3px solid var(--accent);
  transform: translate(-50%, -50%);
  /* ring the marker in the panel colour so it reads against the fill */
  box-shadow: 0 0 0 3px var(--surface);
  transition: left 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.range-ends {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 11px;
  font-size: 13px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.range-ends b {
  color: var(--faint);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-right: 5px;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 20px;
}
.stat {
  padding: 11px 12px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.stat dt { font-size: 11px; color: var(--faint); margin: 0 0 3px; }
.stat dd {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ---------------------------------------------------------------- */
/* Price alerts                                                      */
/* ---------------------------------------------------------------- */

.alerts { margin-top: 26px; }

.alert-add {
  flex: none;
  padding: 5px 12px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(77, 163, 255, 0.12);
  border: 1px solid rgba(77, 163, 255, 0.4);
  border-radius: 999px;
  cursor: pointer;
}
.alert-add:active { background: rgba(77, 163, 255, 0.22); }

.alert-form {
  display: flex;
  gap: 7px;
  margin-bottom: 12px;
}
.alert-form[hidden] { display: none; }
.alert-form select {
  flex: 1 1 auto;
  width: auto;
  padding: 10px 30px 10px 11px;
  font-size: 13.5px;
  background-position: calc(100% - 17px) 19px, calc(100% - 12px) 19px;
}

.alert-input {
  flex: 1 1 84px;
  min-width: 0;
  padding: 10px 11px;
  font-size: 15px;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  -webkit-appearance: none;
}
.alert-input:focus {
  outline: 2px solid rgba(77, 163, 255, 0.5);
  outline-offset: -1px;
}

.alert-save {
  flex: none;
  padding: 10px 15px;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 650;
  color: #06121f;
  background: var(--accent);
  border: 0;
  border-radius: 11px;
  cursor: pointer;
}

.alert-error {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: #ff9aa6;
}
.alert-error[hidden] { display: none; }

.alert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.alert-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.alert-item:last-child { border-bottom: 0; }
.alert-item.is-hit { opacity: 0.6; }

.alert-badge {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 10px;
}
.alert-badge[data-dir="above"] { color: var(--up); background: rgba(34, 209, 139, 0.15); }
.alert-badge[data-dir="below"] { color: var(--down); background: rgba(255, 95, 112, 0.15); }

.alert-text { flex: 1; min-width: 0; }
.alert-text b {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}
.alert-text span {
  display: block;
  font-size: 11px;
  color: var(--faint);
  margin-top: 1px;
}

.alert-del {
  flex: none;
  width: 28px;
  height: 28px;
  font-size: 20px;
  line-height: 1;
  color: var(--faint);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.alert-del:active { background: var(--surface); color: var(--down); }

.alert-note { margin-top: 9px; }

/* Converter */
.converter { margin-top: 22px; }
.conv-row { display: flex; align-items: center; gap: 9px; }
.conv-input {
  flex: 1;
  min-width: 0;
  padding: 12px 13px;
  font-size: 17px;
  font-family: var(--font);
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  -webkit-appearance: none;
}
.conv-input:focus { outline: 2px solid rgba(77, 163, 255, 0.5); outline-offset: -1px; }
.conv-code {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  width: 38px;
  flex: none;
}
.conv-swap { text-align: center; color: var(--faint); font-size: 17px; margin: 7px 0; }

/* ---------------------------------------------------------------- */
/* Settings                                                          */
/* ---------------------------------------------------------------- */

.field { margin-bottom: 20px; }
.field > label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.field-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.field-row > div { min-width: 0; }
.field-row label { margin-bottom: 2px; }

.hint { margin: 0; font-size: 11.5px; color: var(--faint); line-height: 1.45; }

select {
  width: 100%;
  padding: 12px 13px;
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 11px;
  -webkit-appearance: none;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 14px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.switch {
  flex: none;
  width: 46px;
  height: 27px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  transition: background 0.16s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 0.16s, background 0.16s;
}
.switch:checked { background: rgba(77, 163, 255, 0.28); border-color: var(--accent); }
.switch:checked::after { transform: translateX(19px); background: var(--accent); }

.pair-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 9px;
}
.pair-chip {
  padding: 7px 11px;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}
.pair-chip[aria-pressed="true"] {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(77, 163, 255, 0.14);
}

.btn-ghost {
  width: 100%;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 11px;
  cursor: pointer;
}
.btn-ghost:active { background: var(--surface-2); }

.push-status {
  margin: -8px 0 20px;
  min-height: 1em;
  color: var(--accent);
}
.push-status:empty { margin: 0; min-height: 0; }

.settings-footer {
  margin-top: 26px;
  text-align: center;
}
.footer-logo {
  width: 148px;
  height: auto;
  display: block;
  margin: 0 auto 10px;
  opacity: 0.9;
}

.version {
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  margin: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
