/* FX Dynamic — 深色行情终端风格，红涨绿跌（中国习惯） */

*,
*::before,
*::after { box-sizing: border-box; }

[hidden] { display: none !important; }

:root {
  --bg: #070a12;
  --bg-2: #0a0f1b;
  --card: rgba(255, 255, 255, 0.038);
  --card-hi: rgba(255, 255, 255, 0.062);
  --line: rgba(255, 255, 255, 0.075);
  --line-hi: rgba(255, 255, 255, 0.16);
  --text: #e9eff9;
  --muted: #8d98ad;
  --faint: #5d687d;
  --accent: #4c8dff;
  --accent-soft: rgba(76, 141, 255, 0.16);
  --up: #ff5d6c;
  --up-soft: rgba(255, 93, 108, 0.12);
  --down: #21c98a;
  --down-soft: rgba(33, 201, 138, 0.12);
  --flat: #8d98ad;
  --radius: 20px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Cascadia Code", Consolas, "Liberation Mono", monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  --shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.95);
}

[data-theme="light"] {
  --bg: #f4f6fb;
  --bg-2: #eaeff8;
  --card: rgba(255, 255, 255, 0.86);
  --card-hi: rgba(255, 255, 255, 0.98);
  --line: rgba(15, 23, 42, 0.09);
  --line-hi: rgba(15, 23, 42, 0.18);
  --text: #0e1729;
  --muted: #5d6a80;
  --faint: #8a96a8;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --up: #e0334a;
  --up-soft: rgba(224, 51, 74, 0.09);
  --down: #0f9d63;
  --down-soft: rgba(15, 157, 99, 0.09);
  --flat: #5d6a80;
  --shadow: 0 24px 60px -42px rgba(15, 23, 42, 0.5);
}

html { color-scheme: dark; }
[data-theme="light"] html, html[data-theme="light"] { color-scheme: light; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
ul { margin: 0; padding: 0; list-style: none; }
b { font-weight: 600; }

/* ---------- 背景光晕 ---------- */

.aurora {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.aurora span {
  position: absolute;
  width: 46vw;
  height: 46vw;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
}
.aurora span:first-child {
  top: -18vw;
  left: -10vw;
  background: radial-gradient(circle, rgba(76, 141, 255, 0.55), transparent 68%);
  animation: drift 26s ease-in-out infinite alternate;
}
.aurora span:last-child {
  right: -14vw;
  top: 18vh;
  background: radial-gradient(circle, rgba(55, 224, 200, 0.3), transparent 66%);
  animation: drift 34s ease-in-out infinite alternate-reverse;
}
[data-theme="light"] .aurora span { opacity: 0.35; }

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(4vw, 6vh, 0) scale(1.14); }
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 26px 24px 12px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--accent); }
.brand > div { color: var(--text); }
.brand h1 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.top-right { display: flex; align-items: center; gap: 10px; }

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(12px);
}
.live-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
  box-shadow: 0 0 0 0 rgba(33, 201, 138, 0.5);
}
.live-pill[data-state="open"] { color: var(--text); border-color: rgba(33, 201, 138, 0.35); }
.live-pill[data-state="open"] .dot {
  background: var(--down);
  animation: pulse 2.4s ease-out infinite;
}
.live-pill[data-state="connecting"] .dot { background: #f5a524; }
.live-pill[data-state="lost"] { color: var(--up); border-color: rgba(255, 93, 108, 0.3); }
.live-pill[data-state="lost"] .dot { background: var(--up); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(33, 201, 138, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(33, 201, 138, 0); }
  100% { box-shadow: 0 0 0 0 rgba(33, 201, 138, 0); }
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  transition: color 0.18s, border-color 0.18s, transform 0.18s;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-hi); transform: translateY(-1px); }

/* ---------- 布局 ---------- */

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 24px 40px;
}

.card {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, var(--card-hi), var(--card));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 20px;
  overflow: hidden;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-hi), transparent);
  opacity: 0.7;
}

.converter { grid-column: span 5; display: flex; flex-direction: column; justify-content: space-between; gap: 14px; }
.board { grid-column: span 7; }
.chart-card { grid-column: span 12; }
.watch { grid-column: span 5; }
.alerts { grid-column: span 7; }

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.card-head h2 { font-size: 14.5px; font-weight: 600; letter-spacing: 0.01em; }
.card-head .muted { font-size: 11.5px; margin-top: 2px; }
.muted { color: var(--muted); }
.tiny { font-size: 11.5px; }
.pill {
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(76, 141, 255, 0.26);
}
.pill-soft { color: var(--muted); background: var(--card); border-color: var(--line); }

/* ---------- 转换器 ---------- */

.conv-row { display: flex; align-items: flex-end; gap: 12px; }
.conv-main { flex: 1; min-width: 0; }
.mini {
  display: block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 4px;
}
.amount-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 2px 0 6px;
  font-family: var(--mono);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color 0.2s;
}
.amount-input:focus { border-color: var(--accent); }
.amount-output {
  display: block;
  padding: 2px 0 6px;
  border-bottom: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.picker {
  flex: none;
  width: 132px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card-hi);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  outline: 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% - 15px) 50%, calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: border-color 0.18s;
}
.picker:hover { border-color: var(--line-hi); }
.picker:focus { border-color: var(--accent); }
select option { background: #101724; color: #e9eff9; }
[data-theme="light"] select option { background: #fff; color: #0e1729; }

.conv-divider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 0;
}
.conv-rate {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.swap {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card-hi);
  color: var(--accent);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s;
}
.swap:hover { transform: rotate(180deg); border-color: rgba(76, 141, 255, 0.5); }
.swap.spin { transform: rotate(180deg); }

.conv-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
}
.star {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}
.star svg { transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
.star:hover { color: var(--text); border-color: var(--line-hi); }
.star[aria-pressed="true"] {
  color: #f5b73d;
  border-color: rgba(245, 183, 61, 0.4);
  background: rgba(245, 183, 61, 0.1);
}
.star[aria-pressed="true"] svg { fill: #f5b73d; transform: scale(1.08); }
.conv-meta b { color: var(--text); font-family: var(--mono); font-weight: 500; }

/* ---------- 行情板 ---------- */

.tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tile {
  position: relative;
  padding: 12px 12px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
  overflow: hidden;
}
.tile:hover {
  border-color: var(--line-hi);
  background: var(--card-hi);
  transform: translateY(-2px);
}
.tile-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.pair {
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
}
.pair i { color: var(--faint); font-style: normal; margin: 0 1px; }
.pair-name {
  font-size: 10px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tile-rate {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s;
}
.tile-rate.up { color: var(--up); }
.tile-rate.down { color: var(--down); }
.tile-rate.flat { color: var(--text); }

.tile-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.delta {
  font-family: var(--mono);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.delta.up { color: var(--up); }
.delta.down { color: var(--down); }
.delta.flat { color: var(--faint); }

.spark { width: 62px; height: 24px; flex: none; overflow: visible; }
.spark-line { fill: none; stroke: var(--faint); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.spark-area { fill: var(--faint); opacity: 0.1; stroke: none; }
.spark-dot { fill: var(--faint); }
.tile.up .spark-line, .tile.up .spark-dot { stroke: var(--up); fill: var(--up); }
.tile.up .spark-area { fill: var(--up); }
.tile.down .spark-line, .tile.down .spark-dot { stroke: var(--down); fill: var(--down); }
.tile.down .spark-area { fill: var(--down); }

/* 数值刷新闪烁 */
@keyframes flashUp {
  0% { box-shadow: inset 0 0 0 999px rgba(255, 93, 108, 0.16); }
  100% { box-shadow: inset 0 0 0 999px rgba(255, 93, 108, 0); }
}
@keyframes flashDown {
  0% { box-shadow: inset 0 0 0 999px rgba(33, 201, 138, 0.16); }
  100% { box-shadow: inset 0 0 0 999px rgba(33, 201, 138, 0); }
}
.flash-up { animation: flashUp 0.9s ease-out; border-radius: 6px; }
.flash-down { animation: flashDown 0.9s ease-out; border-radius: 6px; }

/* ---------- 图表 ---------- */

.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.chart-head h2 { font-size: 15px; }
.tabs { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; border: 1px solid var(--line); background: rgba(0, 0, 0, 0.18); }
[data-theme="light"] .tabs { background: rgba(15, 23, 42, 0.04); }
.tabs button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 8px;
  transition: background 0.18s, color 0.18s;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--accent); color: #fff; }

.chart-wrap { position: relative; height: 300px; margin-top: 14px; }
.chart-wrap canvas { display: block; width: 100%; height: 100%; }

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12.5px;
  color: var(--muted);
  padding: 0 24px;
  line-height: 1.8;
}

.chart-tip {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 9px;
  border-radius: 9px;
  border: 1px solid var(--line-hi);
  background: rgba(12, 18, 30, 0.94);
  box-shadow: 0 14px 30px -18px rgba(0, 0, 0, 0.9);
  pointer-events: none;
  z-index: 3;
  white-space: nowrap;
  transition: transform 0.06s linear;
}
[data-theme="light"] .chart-tip { background: rgba(255, 255, 255, 0.97); }
.chart-tip .tip-time { font-size: 10px; color: var(--muted); }
.chart-tip .tip-value { font-family: var(--mono); font-size: 12px; font-weight: 600; }

.chart-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chart-foot b { color: var(--text); font-family: var(--mono); font-weight: 500; }
.chart-foot .up { color: var(--up); }
.chart-foot .down { color: var(--down); }

/* ---------- 自选 ---------- */

.watch-list { display: flex; flex-direction: column; gap: 2px; }
.watch-row {
  display: grid;
  grid-template-columns: 1fr auto auto 24px;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-radius: 10px;
  transition: background 0.16s;
}
.watch-row:hover { background: var(--card-hi); }
.watch-main { display: flex; align-items: baseline; gap: 8px; border: 0; background: none; padding: 0; text-align: left; min-width: 0; }
.watch-pair { font-family: var(--mono); font-size: 12.5px; font-weight: 600; letter-spacing: 0.01em; }
.watch-pair i { font-style: normal; color: var(--faint); margin: 0 1px; }
.watch-name { font-size: 10.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.watch-rate { font-family: var(--mono); font-size: 13px; font-variant-numeric: tabular-nums; }
.watch-rate.up { color: var(--up); }
.watch-rate.down { color: var(--down); }
.watch-delta { font-family: var(--mono); font-size: 11px; min-width: 52px; text-align: right; font-variant-numeric: tabular-nums; }
.watch-delta.up { color: var(--up); }
.watch-delta.down { color: var(--down); }
.watch-delta.flat { color: var(--faint); }

.icon-x {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  font-size: 15px;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.16s, background 0.16s, color 0.16s;
}
.watch-row:hover .icon-x, .alert-row:hover .icon-x { opacity: 1; }
.icon-x:hover { background: rgba(255, 93, 108, 0.14); color: var(--up); }

.empty {
  padding: 20px 8px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

/* ---------- 提醒 ---------- */

.text-btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 9px;
  transition: color 0.18s, border-color 0.18s;
}
.text-btn:hover { color: var(--text); border-color: var(--line-hi); }

.alert-form { margin-bottom: 14px; padding: 12px; border-radius: 12px; background: rgba(0, 0, 0, 0.18); border: 1px solid var(--line); }
[data-theme="light"] .alert-form { background: rgba(15, 23, 42, 0.03); }
.alert-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.2fr); gap: 8px; }
.alert-grid select, .text-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card-hi);
  color: var(--text);
  font-size: 12px;
  outline: none;
}
.text-input { font-family: var(--mono); }
.alert-grid select:focus, .text-input:focus { border-color: var(--accent); }
.alert-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; }
.btn-primary {
  border: 0;
  border-radius: 9px;
  padding: 8px 16px;
  background: linear-gradient(180deg, #5c97ff, #2f6fe4);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 10px 24px -12px rgba(76, 141, 255, 0.9);
  transition: transform 0.16s, filter 0.16s;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-primary:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.alert-list { display: flex; flex-direction: column; gap: 2px; }
.alert-row {
  display: grid;
  grid-template-columns: 8px 1fr auto 24px;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 10px;
  transition: background 0.16s;
}
.alert-row:hover { background: var(--card-hi); }
.alert-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.alert-row.is-triggered .alert-dot { background: var(--up); box-shadow: 0 0 0 3px var(--up-soft); }
.alert-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.alert-line b { font-family: var(--mono); font-size: 12.5px; }
.alert-cond { font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
.alert-sub { font-size: 11px; margin-top: 1px; }
.badge { font-size: 10px; padding: 1px 6px; border-radius: 5px; letter-spacing: 0.03em; }
.badge-hit { color: var(--up); background: var(--up-soft); }
.badge-idle { color: var(--muted); background: var(--card-hi); }
.alert-live { width: 6px; height: 6px; border-radius: 50%; background: var(--down); animation: pulse 2.6s ease-out infinite; }

/* ---------- 状态栏 ---------- */

.statusbar {
  grid-column: span 12;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
  padding: 4px 6px;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.statusbar b { color: var(--text); font-weight: 500; font-family: var(--mono); }

/* ---------- Toast ---------- */

.toast-stack {
  position: fixed;
  z-index: 50;
  right: 18px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(340px, calc(100vw - 36px));
}
.toast {
  display: flex;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--line-hi);
  background: rgba(16, 23, 36, 0.94);
  color: var(--text);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.9);
  font-size: 12.5px;
  backdrop-filter: blur(14px);
  animation: toastIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  position: relative;
}
[data-theme="light"] .toast { background: rgba(255, 255, 255, 0.97); }
.toast::before { content: ""; width: 3px; border-radius: 2px; background: var(--accent); flex: none; }
.toast.is-hit::before { background: var(--up); }
.toast.is-error::before { background: var(--up); }
.toast.is-ok::before { background: var(--down); }
.toast-body { min-width: 0; }
.toast-title { font-weight: 600; font-size: 12.5px; }
.toast-text { color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.toast.out { animation: toastOut 0.24s ease-in forwards; }

@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(14px); } }

/* ---------- 响应式 ---------- */

@media (max-width: 1020px) {
  .converter, .board, .watch, .alerts { grid-column: span 12; }
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .topbar { padding: 18px 16px 8px; }
  .layout { padding: 6px 16px 32px; gap: 12px; }
  .card { padding: 16px; border-radius: 16px; }
  .brand h1 { font-size: 17px; }
  .live-pill { padding: 5px 9px; font-size: 11px; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker { width: 108px; font-size: 12px; padding: 8px; }
  .chart-wrap { height: 240px; }
  .chart-head { flex-direction: column; }
  .tabs { width: 100%; justify-content: space-between; }
  .tabs button { flex: 1; }
  .alert-grid { grid-template-columns: 1fr 1fr; }
  .watch-name { display: none; }
  .statusbar { font-size: 10.5px; gap: 4px 14px; }
  .toast-stack { right: 12px; left: 12px; bottom: 12px; max-width: none; }
}

@media (max-width: 400px) {
  .tile { padding: 10px 9px 8px; }
  .tile-rate { font-size: 16px; }
  .spark { width: 48px; }
}

@media (hover: none) {
  .icon-x { opacity: 0.6; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
