/*
 * AVA — one-screen UI styles (two modes: surface check, compare with reference).
 * Industrial, high contrast, large touch targets (>= 48 px), readable in a bright shop.
 * Light + dark via prefers-color-scheme; system fonts only; no horizontal scroll at 360 px.
 */

:root {
  --bg: #e9e8e3;
  --surface: #ffffff;
  --surface-2: #f4f3ef;
  --ink: #111315;
  --ink-2: #474c52;
  --line: #c4c1b8;
  --line-strong: #8d8a82;

  --primary: #15181b;
  --primary-ink: #ffffff;
  --accent: #ffc400;          /* safety yellow */
  --accent-ink: #111315;
  --accent-press: #e6ad00;
  --focus: #1f5bff;

  --pass: #0a7a33;
  --pass-ink: #ffffff;
  --fail: #c8102e;
  --fail-ink: #ffffff;
  --retake: #5a6067;
  --retake-ink: #ffffff;

  --topbar: #15181b;
  --topbar-ink: #ffffff;
  --switch-bg: #15181b;
  --switch-ink: #ffffff;

  --radius: 10px;
  --radius-sm: 6px;
  --gap: 16px;
  --tap: 52px;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0f11;
    --surface: #171a1e;
    --surface-2: #1f2328;
    --ink: #f3f3ef;
    --ink-2: #a9aeb5;
    --line: #343a41;
    --line-strong: #59606a;

    --primary: #f3f3ef;
    --primary-ink: #111315;
    --focus: #7aa2ff;

    --pass: #157a3a;            /* white text >= 5:1 (WCAG AA) */
    --fail: #e4223f;
    --retake: #6a7179;

    --topbar: #050607;
    --switch-bg: #262b31;
    --switch-ink: #f3f3ef;
    --shadow: none;

    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------ base */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

body.modal-open { overflow: hidden; }

img, svg, video, canvas { max-width: 100%; }

h1, h2, h3, p { margin: 0; }

button, input { font: inherit; color: inherit; }

[hidden] { display: none !important; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

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

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 16px calc(40px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.help { color: var(--ink-2); font-size: 15px; }

.note {
  font-size: 15px;
  font-weight: 600;
  padding: 10px 12px;
  border-left: 5px solid var(--accent);
  background: var(--surface);
  border-radius: var(--radius-sm);
}

.section-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.icon { width: 24px; height: 24px; flex: none; }
.icon-sm { width: 18px; height: 18px; }
.icon-xl { width: 48px; height: 48px; }

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--topbar);
  color: var(--topbar-ink);
  padding-top: env(safe-area-inset-top);
}

.topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  min-height: 60px;
  padding: 0 12px 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hazard {
  height: 5px;
  background: repeating-linear-gradient(135deg, var(--accent) 0 12px, #111315 12px 24px);
}

.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; min-width: 0; }
.wordmark { margin: 0; font-weight: 900; font-size: 26px; letter-spacing: 0.06em; line-height: 1; }

.top-btn {
  min-width: 52px;
  height: 48px;
  padding: 0 12px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--topbar-ink);
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
}
.top-btn:hover { border-color: var(--accent); }

/* ----------------------------------------------------------------- intro */

.intro { display: flex; flex-direction: column; gap: 8px; }
.tagline { font-size: clamp(18px, 4.6vw, 22px); font-weight: 700; line-height: 1.3; max-width: 46em; }
.privacy { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 15px; font-weight: 600; }

/* ----------------------------------------------------------------- modes */

.modes { display: flex; flex-direction: column; gap: 10px; }

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--switch-bg);
  border-radius: var(--radius);
}
.mode-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  min-height: 64px;
  min-width: 0;
  padding: 8px 12px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--switch-ink);
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
}
.mode-btn:not([aria-pressed="true"]):hover { border-color: rgba(127, 127, 127, 0.5); }
.mode-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: #111315; }
.mode-btn:disabled { cursor: not-allowed; }
.mode-btn:disabled:not([aria-pressed="true"]) { opacity: 0.5; }
.mode-name { font-size: clamp(15px, 4.4vw, 19px); font-weight: 900; line-height: 1.15; overflow-wrap: anywhere; }
.mode-sub { font-size: 13px; font-weight: 700; opacity: 0.85; line-height: 1.2; }

.mode-hint {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-2);
  padding-left: 10px;
  border-left: 4px solid var(--accent);
}

.examples { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 8px; }
.examples-label { grid-column: 1 / -1; font-weight: 800; font-size: 15px; }
@media (min-width: 640px) {
  .examples { grid-template-columns: auto auto auto; justify-content: start; }
  .examples-label { grid-column: auto; margin-right: 4px; }
}
.btn-example {
  min-height: 48px;
  min-width: 0;
  padding: 6px 12px;
  font-size: 16px;
  background: var(--surface);
  color: var(--ink);
  border-color: var(--ink);
}
.btn-example:not(:disabled):hover { border-color: var(--ink); }
.btn-example:not(:disabled):active { transform: translateY(1px); }

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 10px 16px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.btn:disabled, .btn.is-disabled { opacity: 0.45; cursor: not-allowed; }
label.btn:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }

.btn-primary { background: var(--primary); color: var(--primary-ink); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn-accent { background: var(--accent); color: var(--accent-ink); border-color: #111315; }
.btn-accent:not(:disabled):active { background: var(--accent-press); }
.btn-primary:not(:disabled):active, .btn-secondary:active { transform: translateY(1px); }

.btn-lg { min-height: 60px; font-size: 19px; }
.btn-xl { min-height: 72px; font-size: clamp(22px, 6vw, 28px); letter-spacing: 0.02em; width: 100%; }
.btn-xl .icon { width: 30px; height: 30px; }

.pulse { animation: pulse-ring 0.6s ease-out 3; }
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(255, 196, 0, 0.9); }
  100% { box-shadow: 0 0 0 14px rgba(255, 196, 0, 0); }
}

/* ----------------------------------------------------------------- slots */

.slots { display: grid; grid-template-columns: 1fr; gap: var(--gap); }
@media (min-width: 640px) {
  .slots { grid-template-columns: 1fr 1fr; }
  .slots.slots-single { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
}

.slot {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  min-width: 0;
}
.slot-filled { border-color: var(--ink); }

.slot-head { display: flex; align-items: center; gap: 12px; }
.slot-num {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  border: 2px solid #111315;
  border-radius: var(--radius-sm);
  font-weight: 900; font-size: 19px;
}
.slot-title { font-size: 22px; font-weight: 900; line-height: 1.1; }
.slot-sub { color: var(--ink-2); font-size: 15px; font-weight: 600; }

.slot-preview {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #050607;
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: grid;
  place-items: center;
}
.slot-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }
.slot-size {
  position: absolute; right: 6px; bottom: 6px;
  padding: 2px 6px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.7); color: #fff;
  font-family: var(--mono); font-size: 12px;
}
.slot-tag {
  position: absolute; left: 6px; top: 6px;
  max-width: calc(100% - 12px);
  padding: 3px 8px; border-radius: 4px;
  background: var(--accent); color: var(--accent-ink);
  font-size: 13px; font-weight: 800; line-height: 1.2;
}
.slot-empty {
  background: var(--surface-2);
  border: 2px dashed var(--line-strong);
  color: var(--ink-2);
  font-weight: 700;
  gap: 6px;
  align-content: center;
}

.slot-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.slot-actions .btn { padding: 10px 6px; gap: 6px; min-width: 0; font-size: 16px; }
.slot-actions .btn span { overflow-wrap: anywhere; }

/* ------------------------------------------------------------ run button */

.run { display: flex; flex-direction: column; gap: 8px; align-items: stretch; text-align: center; }

.spinner {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 4px solid var(--line);
  border-top-color: var(--ink);
  animation: spin 0.8s linear infinite;
}
.spinner-light { border-color: rgba(255, 255, 255, 0.25); border-top-color: #fff; }
.spinner-btn { width: 28px; height: 28px; border-width: 4px; border-color: rgba(0, 0, 0, 0.2); border-top-color: #111315; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- result */

.result { display: flex; flex-direction: column; gap: var(--gap); scroll-margin-top: 76px; }

.result-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--gap); align-items: start; }
@media (min-width: 960px) {
  .result-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .result-grid.result-grid-single { grid-template-columns: minmax(0, 1fr); max-width: 760px; }
}

.panel {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  box-shadow: var(--shadow);
}
.panel-main { border-color: var(--ink); }
.panel-title { font-size: 14px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }

.verdict {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px;
  border-radius: var(--radius);
  min-height: 96px;
  animation: pop 220ms ease-out;
}
.verdict-icon { width: 52px; height: 52px; flex: none; stroke-width: 3; }
.verdict-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.verdict-title { font-size: clamp(26px, 7.5vw, 40px); font-weight: 900; line-height: 1.08; overflow-wrap: anywhere; }
.verdict-sub { font-size: 17px; font-weight: 700; opacity: 0.95; }
.verdict-small { min-height: 72px; padding: 14px; }
.verdict-small .verdict-title { font-size: clamp(20px, 5.5vw, 26px); }
.verdict-small .verdict-icon { width: 36px; height: 36px; }

.verdict-pass { background: var(--pass); color: var(--pass-ink); }
.verdict-fail { background: var(--fail); color: var(--fail-ink); }
.verdict-retake { background: var(--retake); color: var(--retake-ink); }
@keyframes pop { from { transform: scale(0.98); opacity: 0.6; } to { transform: none; opacity: 1; } }

.fig { margin: 0; }
.fig-box { position: relative; background: #050607; border-radius: var(--radius-sm); overflow: hidden; }
.fig-img { display: block; width: 100%; height: auto; }
.fig-zones { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fig-dim { fill: rgba(0, 0, 0, 0.55); }
.fig-zone {
  fill: transparent;
  stroke: transparent;
  stroke-width: 4;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
  cursor: pointer;
}
.fig-zone.is-selected { stroke: var(--accent); }

.zones { display: flex; flex-direction: column; gap: 8px; }
.zones-title { font-size: 18px; font-weight: 900; }
.zone-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.zone {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 12px;
  text-align: left;
  background: var(--surface-2);
  border: 2px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.zone[aria-pressed="true"] { border-color: var(--ink); background: var(--surface); box-shadow: inset 6px 0 0 var(--accent); }
.zone-num {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  background: var(--fail); color: var(--fail-ink);
  border-radius: 4px; font-weight: 900;
}
.zone-body { display: flex; flex-direction: column; min-width: 0; }
.zone-meta { font-size: 14px; color: var(--ink-2); }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 16px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-2);
}
.sha {
  min-height: 48px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink-2);
  text-align: left;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  cursor: pointer;
  max-width: 100%;
}
.sha[aria-expanded="true"] { color: var(--ink); }

.base-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  cursor: pointer;
  list-style: none;
}
.base-summary::-webkit-details-marker { display: none; }
.base-summary::before {
  content: "";
  width: 10px; height: 10px; flex: none;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg);
  margin: 0 4px;
  transition: transform 150ms;
}
.panel-base[open] > .base-summary::before { transform: rotate(45deg); }
.base-title { flex: 1; font-size: 18px; font-weight: 900; }

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}
.chip-pass { background: var(--pass); color: var(--pass-ink); }
.chip-fail { background: var(--fail); color: var(--fail-ink); }
.chip-retake { background: var(--retake); color: var(--retake-ink); }

.result-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 520px) {
  .result-actions { grid-template-columns: 1fr 1fr; }
  .result-actions.result-actions-single { grid-template-columns: minmax(0, 360px); }
}

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

.history { display: flex; flex-direction: column; gap: 10px; }
.hchips { display: flex; flex-wrap: wrap; gap: 8px; }
.hchip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 6px 12px 6px 10px;
  background: var(--surface);
  border: 2px solid var(--line);
  border-left-width: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.hchip-pass { border-left-color: var(--pass); }
.hchip-fail { border-left-color: var(--fail); }
.hchip-retake { border-left-color: var(--retake); }
.hchip[aria-pressed="true"] { border-color: var(--ink); }
.hchip-m { font-size: 12px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.hchip-v { font-weight: 900; font-size: 15px; }
.hchip-t { font-family: var(--mono); font-size: 13px; color: var(--ink-2); }

/* ---------------------------------------------------------------- camera */

.camera {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  background: #000;
  color: #fff;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.cam-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 16px;
  min-height: 60px;
  border-bottom: 4px solid var(--accent);
}
.cam-title { flex: 1; min-width: 0; font-size: 18px; font-weight: 800; line-height: 1.2; }
.cam-icon-btn {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.cam-stage { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.cam-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cam-ghost { pointer-events: none; object-fit: cover; }  /* box set by app.js fitGhost() */
.cam-msg {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 24px; text-align: center; font-weight: 700;
}
.cam-tap { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); max-width: calc(100% - 32px); }
.cam-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.cam-flash.on { animation: flash 300ms ease-out; }
@keyframes flash { from { opacity: 0.85; } to { opacity: 0; } }

.cam-bottom { display: flex; flex-direction: column; gap: 8px; padding: 10px 16px 14px; background: #000; }

.ghost-row { display: grid; grid-template-columns: auto 1fr 3.5em; align-items: center; gap: 12px; font-weight: 700; }
.ghost-row input[type="range"] { width: 100%; height: 44px; accent-color: var(--accent); }
.ghost-row output { font-family: var(--mono); text-align: right; }

.cam-controls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; }
.cam-side-btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; min-height: 56px; padding: 4px;
  font-size: 13px; font-weight: 700; text-align: center;
  color: #fff; cursor: pointer;
  justify-self: start;
}
.cam-side-btn:focus-within { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }
.cam-spacer { visibility: hidden; }

.shutter {
  width: 80px; height: 80px;
  border-radius: 50%;
  border: 5px solid #fff;
  background: transparent;
  padding: 5px;
  cursor: pointer;
}
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--accent); }
.shutter:not(:disabled):active span { transform: scale(0.9); }
.shutter:disabled { opacity: 0.4; cursor: not-allowed; }
.shutter:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

/* Phone held sideways (short landscape screen): the controls move to a right-hand column so the
   viewfinder keeps most of the height for lining up the reference ghost. */
@media (orientation: landscape) and (max-height: 500px) {
  .camera { display: grid; grid-template-columns: minmax(0, 1fr) 200px; grid-template-rows: auto minmax(0, 1fr); }
  .cam-top { grid-column: 1 / -1; min-height: 44px; padding: 2px 8px 2px 16px; border-bottom-width: 3px; }
  .cam-title { font-size: 16px; }
  .cam-icon-btn { width: 44px; height: 44px; }
  .cam-stage { grid-column: 1; grid-row: 2; }
  .cam-bottom { grid-column: 2; grid-row: 2; justify-content: center; padding: 8px 12px; }
  .ghost-row { grid-template-columns: 1fr auto; row-gap: 0; }
  .ghost-row input[type="range"] { grid-column: 1 / -1; grid-row: 2; }
  .cam-controls { grid-template-columns: 1fr; justify-items: center; gap: 8px; }
  .cam-side-btn { justify-self: center; min-height: 48px; }
  .cam-spacer { display: none; }
}

/* ------------------------------------------------------------- QR modal */

.modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 16px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7); }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  border-top: 6px solid var(--accent);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  text-align: center;
}
.modal-title { font-size: 22px; font-weight: 900; }
.qr-box { width: min(300px, 100%); margin: 0 auto; }
.qr-svg { display: block; width: 100%; height: auto; }
.qr-url { font-family: var(--mono); font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- toasts */

.toasts {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  max-width: 560px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius);
  font-weight: 700;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  animation: toast-in 180ms ease-out;
}
.toast-error { background: var(--fail); color: #fff; }
.toast-info { background: var(--primary); color: var(--primary-ink); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

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