/* imagegen: pure black, image-first. Always dark (spec 2026-09-24-minimal-ui-design). */

:root {
  color-scheme: dark;
  --bg: #000;
  --text: #fff;
  --text-2: rgba(255, 255, 255, 0.6);
  --text-3: rgba(255, 255, 255, 0.4);
  --hair: rgba(255, 255, 255, 0.12);
  --fill: rgba(255, 255, 255, 0.07);
  --fill-2: rgba(255, 255, 255, 0.12);
  --accent: #ff7a1a;
  --accent-soft: rgba(255, 122, 26, 0.16);
  --error: #ff8a80;
  --ok: #4cd97b;
  --warn: #ffc233;
  --bad: #ff5c5c;
  --gutter: 16px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --fast: 160ms;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  /* Set from JS (visualViewport) so the app always fits above the iOS keyboard. */
  --vvh: 100dvh;
  --vvtop: 0px;
  --kb: 0px;
  --composer-h: auto;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  color: var(--text);
  font: 15px/1.45 system-ui, -apple-system, "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-font-smoothing: antialiased;
}

h1, h2, p, figure { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
svg { display: block; flex: none; }
img { -webkit-user-drag: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

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

/* ---------- app shell: exactly the visible viewport ---------- */

.app {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--vvh);
  transform: translateY(var(--vvtop));
  display: flex;
  flex-direction: column;
  padding-left: var(--safe-l);
  padding-right: var(--safe-r);
}

/* ---------- top bar ---------- */

.topbar {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: var(--safe-t) 6px 0 var(--gutter);
  min-height: calc(48px + var(--safe-t));
}

.brand {
  flex: 1;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: none;
  color: var(--text-2);
  transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.icon-btn:active { background: var(--fill); color: var(--text); }

#gallery-refresh { display: none; }
.app[data-view="gallery"] #gallery-refresh { display: inline-grid; }

.health .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--text-3);
  transition: background-color 300ms var(--ease);
}
.health[data-state="up"] .dot { background: var(--ok); }
.health[data-state="busy"] .dot { background: var(--warn); }
.health[data-state="down"] .dot { background: var(--bad); }

/* ---------- scrolling middle ---------- */

.scroller {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  display: flex;
  flex-direction: column;
}

.workspace {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* ---------- stage ---------- */

.stage {
  position: relative;
  flex: 1 1 0;
  min-height: 220px;
  display: none;
}
.app[data-view="create"] .stage[data-mode="create"],
.app[data-view="edit"] .stage[data-mode="edit"] { display: block; }

.stage-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: fade-in 280ms var(--ease);
}

.stage-hint {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: var(--gutter);
  color: var(--text-3);
  text-align: center;
  font-size: 15px;
}

.stage-pick {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 0;
}
.stage-pick:focus-visible { outline-offset: -4px; }
.stage-pick:disabled { cursor: default; }
.stage-pick[data-busy="true"] .stage-hint { color: var(--text-2); }

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* results of one submit: swipe between them (scroll-snap) */
.track {
  position: absolute;
  inset: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.track::-webkit-scrollbar { display: none; }
.track:focus-visible { outline-offset: -4px; border-radius: 0; }
.slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
}
#track-edit { cursor: pointer; }

.dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 6px 0 2px;
}
.dots .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  transition: background-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.dots .dot.on { background: var(--text); transform: scale(1.2); }
.dots .dot.coming { background: none; box-shadow: inset 0 0 0 1px var(--text-3); }

/* ---------- under the stage: actions / progress / error / caption ---------- */

.under {
  flex: none;
  padding: 4px var(--gutter) 8px;
  min-height: 60px;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 22px;
  background: none;
  color: var(--text);
  font-size: 15px;
  transition: background-color var(--fast) var(--ease), opacity var(--fast) var(--ease);
}
.action svg { color: var(--text-2); }
.action:active { background: var(--fill); }
.action:disabled { opacity: 0.35; }
.action.danger, .action.danger svg { color: var(--error); }

/* details of a queued job (tap its tile) */
.job-panel { padding-top: 8px; }
.progress-track {
  height: 2px;
  border-radius: 1px;
  background: var(--hair);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 100%;
  background: var(--accent);
  transform-origin: left center;
  transform: scaleX(var(--p, 0));
  transition: transform 500ms linear;
}
.job-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 2px;
  min-height: 44px;
}
.job-text {
  flex: 1 1 12em;
  min-width: 0;
  padding: 6px 0;
  color: var(--text-2);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.job-panel[data-status="failed"] .job-text { color: var(--error); }
/* long messages get their own line, the buttons go under them on the right */
.job-panel[data-status="failed"] .job-row,
.job-panel[data-status="lost"] .job-row { justify-content: flex-end; }
.job-panel[data-status="failed"] .job-text,
.job-panel[data-status="lost"] .job-text { flex-basis: 100%; }
.job-close { width: 44px; margin-right: -12px; color: var(--text-3); }
.job-note { color: var(--text-3); font-size: 12px; }

.text-btn {
  min-height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font-weight: 500;
}
.text-btn:active { background: var(--fill); }
.text-btn.link { color: var(--text); text-decoration: underline; text-underline-offset: 3px; padding: 0 6px; }

.error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: 4px;
  min-height: 44px;
  color: var(--error);
  text-align: center;
  font-size: 14px;
}

.caption {
  display: block;
  width: 100%;
  margin-top: 2px;
  padding: 6px 0;
  border: 0;
  background: none;
  text-align: center;
  cursor: default;
}
.caption-prompt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  color: var(--text-2);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.caption[aria-expanded="true"] .caption-prompt { -webkit-line-clamp: unset; line-clamp: none; }
.caption-meta {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* ---------- gallery ---------- */

.gallery { flex: 1 0 auto; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
}
.grid li { aspect-ratio: 1; }
.thumb {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #0d0d0d;
}
.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 220ms var(--ease);
}
.thumb img.loaded { opacity: 1; }
.thumb:focus-visible { outline-offset: -2px; border-radius: 0; }
.thumb.failed { background: #1a0d0d; }

.gallery-note {
  padding: 24px var(--gutter);
  color: var(--text-3);
  text-align: center;
}
.gallery-note.small { padding: 16px var(--gutter) 24px; font-size: 13px; min-height: 60px; }
.gallery-error { padding: 12px var(--gutter); }

/* ---------- dock: chips, composer, tab bar ---------- */

/* queue strip: one tile per job */
.queue {
  display: flex;
  align-items: center;
  padding-top: 6px;
}
.app[data-view="gallery"] .queue { display: none; }
.queue-list {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 4px;
  margin: 0;
  padding: 0 var(--gutter);
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-padding: 0 var(--gutter);
}
.queue-list::-webkit-scrollbar { display: none; }
.queue-list li { flex: none; }
.queue-list li.batch-start { margin-left: 10px; }
.queue-note, .queue-clear {
  flex: none;
  padding: 0 12px;
  color: var(--text-2);
  font-size: 13px;
  white-space: nowrap;
}
.queue-note { color: var(--warn); padding-right: 4px; }

.qtile {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text-2);
  overflow: hidden;
  animation: fade-in 200ms var(--ease);
}
.qtile::after { /* outline, drawn on top of the thumbnail */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1.5px var(--hair);
  pointer-events: none;
}
.qtile img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.qtile-label {
  position: relative;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.qtile-ring {
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  display: none;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 360deg), var(--hair) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px));
}
.qtile[data-status="waiting"] .qtile-label { color: var(--text-3); }
.qtile[data-status="waiting"]::after { box-shadow: inset 0 0 0 1.5px var(--fill-2); }
.qtile[data-status="running"] .qtile-ring { display: block; }
.qtile[data-status="running"] .qtile-label { color: var(--text); font-size: 10px; }
.qtile[data-status="running"]::after { box-shadow: none; }
.qtile[data-status="done"]::after { box-shadow: none; }
.qtile[data-status="failed"] { background: rgba(255, 92, 92, 0.14); color: var(--bad); }
.qtile[data-status="failed"]::after { box-shadow: inset 0 0 0 1.5px var(--bad); }
.qtile[data-status="failed"] .qtile-label,
.qtile[data-status="lost"] .qtile-label { font-size: 16px; }
.qtile[data-status="lost"] { color: var(--warn); }
.qtile[data-status="lost"]::after { box-shadow: inset 0 0 0 1.5px var(--warn); }
.qtile.shown::after { box-shadow: inset 0 0 0 2px var(--text); }
.qtile.selected::after { box-shadow: inset 0 0 0 2px var(--accent); }
.qtile:focus-visible { outline-offset: 1px; border-radius: 10px; }
.qtile:active { opacity: 0.7; }

.dock {
  flex: none;
  background: var(--bg);
  padding-bottom: var(--safe-b);
}
.app.kb-open .dock { padding-bottom: 0; }

.compose { padding-top: 4px; }
.app[data-view="gallery"] .compose { display: none; }

.chips-row {
  display: flex;
  align-items: center;
}
.chips-row + .chips-row { margin-top: 2px; }

.chips {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 6px;
  padding: 0 var(--gutter);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  scroll-padding: 0 var(--gutter);
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: none;
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
}
.chip-face {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 13px;
  border-radius: 17px;
  background: var(--fill);
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease);
}
.chip:active .chip-face { background: var(--fill-2); }
.chip[aria-pressed="true"] .chip-face,
input:checked + .chip .chip-face {
  background: var(--accent-soft);
  color: var(--accent);
}
.chip:focus-visible { outline: none; }
.chip:focus-visible .chip-face,
input:focus-visible + .chip .chip-face {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.chip:disabled, input:disabled + .chip { opacity: 0.4; cursor: default; }
.app[data-view="create"] .chip[data-edit-only] { display: none; }

.shape {
  display: inline-block;
  flex: none;
  border: 1.5px solid currentColor;
  opacity: 0.8;
}
.shape-16x9 { width: 16px; height: 9px; border-radius: 2px; }
.shape-4x3 { width: 14px; height: 10.5px; border-radius: 2px; }
.shape-1x1 { width: 12px; height: 12px; border-radius: 2px; }
.shape-3x4 { width: 10.5px; height: 14px; border-radius: 2px; }
.shape-9x16 { width: 9px; height: 16px; border-radius: 2px; }
.shape-original { width: 13px; height: 11px; border-radius: 2px; border-style: dashed; }

/* model switch: a segmented control at the start of the chips row, shown (by app.js) on
   Create/Edit only when the server lists more than one model for that tab */
.model-switch {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  padding-left: var(--gutter);
}
.model-switch ~ .chips,
.model-switch ~ .slot2 { padding-left: 8px; }
.model-switch[hidden] ~ .chips,
.model-switch[hidden] ~ .slot2 { padding-left: var(--gutter); }
.model-switch .chip-face { border-radius: 4px; padding: 0 12px; }
.model-name { max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-switch .chip:first-of-type .chip-face { border-radius: 17px 4px 4px 17px; padding-left: 14px; }
.model-switch .chip:last-of-type .chip-face { border-radius: 4px 17px 17px 4px; padding-right: 14px; }

/* second image slot (Edit only), beside the style chips */
.slot2 {
  flex: none;
  display: none;
  align-items: center;
  padding-left: var(--gutter);
  position: relative;
}
.app[data-view="edit"] .slot2 { display: flex; }
.app[data-view="edit"] .slot2 + .chips { padding-left: 8px; }
.slot2-pick .chip-face { padding: 0 12px 0 10px; gap: 5px; }
.slot2-plus { font-size: 17px; line-height: 1; }
.slot2-img {
  width: 26px; height: 26px;
  margin-left: -6px;
  border-radius: 13px;
  object-fit: cover;
}
.slot2[data-filled="true"] .slot2-plus { display: none; }
.slot2[data-filled="true"] .slot2-pick .chip-face { background: var(--fill-2); color: var(--text); }
.slot2-remove {
  display: grid;
  place-items: center;
  width: 32px; height: 44px;
  margin-left: -4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
}

.composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 4px var(--gutter) 8px;
}

#prompt {
  flex: 1;
  min-width: 0;
  height: var(--composer-h);
  min-height: 44px;
  max-height: calc(5 * 22px + 22px);
  padding: 11px 16px;
  border: 1px solid var(--hair);
  border-radius: 22px;
  background: var(--bg);
  color: var(--text);
  font-size: 16px; /* 16px+ keeps iOS from zooming */
  line-height: 22px;
  resize: none;
  overflow-y: auto;
  transition: border-color var(--fast) var(--ease);
}
#prompt::placeholder { color: var(--text-3); }
#prompt:focus { border-color: rgba(255, 255, 255, 0.28); }
#prompt:focus-visible { outline: none; border-color: var(--accent); }
#prompt:disabled { color: var(--text-3); }

.count {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--hair);
  border-radius: 22px;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: color var(--fast) var(--ease), background-color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
.count.multi { color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.count:active { background: var(--fill-2); }
.count:focus-visible { outline-offset: 3px; border-radius: 22px; }

.send {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--text);
  color: #000;
  transition: opacity var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.send:active { transform: scale(0.94); }
.send.idle { opacity: 0.35; }
.send:disabled { opacity: 0.25; transform: none; }
.send:focus-visible { outline-offset: 3px; border-radius: 22px; }

.tabbar {
  display: flex;
  border-top: 1px solid var(--hair);
}
.app.kb-open .tabbar { display: none; }

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 50px;
  padding: 5px 0 3px;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color var(--fast) var(--ease);
}
.tab[aria-selected="true"] { color: var(--text); }
.tab:focus-visible { outline-offset: -4px; }

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

.toast {
  position: absolute;
  left: 50%;
  top: calc(var(--safe-t) + 54px);
  transform: translateX(-50%);
  max-width: calc(100% - 2 * var(--gutter));
  padding: 9px 16px;
  border-radius: 20px;
  background: #1c1c1e;
  color: var(--text);
  font-size: 14px;
  text-align: center;
  z-index: 5;
  animation: fade-in 200ms var(--ease);
  pointer-events: none;
}

/* ---------- dialogs ---------- */

dialog {
  color: var(--text);
  background: var(--bg);
  border: 0;
  padding: 0;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.6); }

/* full-screen viewer */
.viewer {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
}
.viewer::backdrop { background: #000; }
.viewer[open] { animation: fade-in 200ms var(--ease); }
.viewer-body {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: var(--safe-t) var(--safe-r) var(--safe-b) var(--safe-l);
}
.viewer-bar {
  flex: none;
  display: flex;
  justify-content: flex-end;
  padding: 2px 6px;
}
.viewer-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
}
#viewer-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: fade-in 240ms var(--ease);
}
.viewer-status { color: var(--text-3); padding: var(--gutter); text-align: center; }
.viewer-info {
  flex: none;
  padding: 12px var(--gutter) 8px;
  text-align: center;
}
.viewer-prompt {
  color: var(--text-2);
  font-size: 13px;
  max-height: 6.5em;
  overflow-y: auto;
  overflow-wrap: anywhere;
}
.viewer-meta {
  margin-top: 4px;
  color: var(--text-3);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.viewer .actions { margin-top: 8px; }

/* settings: bottom sheet */
.sheet {
  width: 100%;
  max-width: 560px;
  max-height: calc(var(--vvh) - var(--safe-t) - 24px);
  margin: auto auto var(--kb);
  border-top: 1px solid var(--hair);
  border-radius: 16px 16px 0 0;
  overflow-y: auto;
}
.sheet[open] { animation: sheet-up 260ms var(--ease); }
@keyframes sheet-up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

.sheet-body {
  padding: 22px var(--gutter) calc(16px + var(--safe-b));
}
.app.kb-open ~ .sheet .sheet-body { padding-bottom: 16px; }
.sheet h2 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.field-label {
  display: block;
  margin: 18px 0 6px;
  color: var(--text-2);
  font-size: 13px;
}
.key-row { display: flex; gap: 6px; align-items: center; }
#api-key {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--hair);
  border-radius: 12px;
  background: var(--bg);
  font-size: 16px;
}
#api-key:focus-visible { outline: none; border-color: var(--accent); }
#key-state { margin-top: 8px; min-height: 1.4em; }

.sheet-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.btn {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 22px;
  background: var(--fill);
  color: var(--text);
  font-weight: 500;
  transition: opacity var(--fast) var(--ease), background-color var(--fast) var(--ease);
}
.btn:active { background: var(--fill-2); }
.btn:disabled { opacity: 0.35; }
.btn-primary { background: var(--text); color: #000; }
.btn-primary:active { background: rgba(255, 255, 255, 0.85); }
.btn-danger { color: var(--error); }
#close-settings { margin-left: auto; }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
