:root {
  color-scheme: light dark;
  --bg: #f6f3ef;
  --surface: #ffffff;
  --surface-2: #f4efea;
  --text: #24201c;
  --muted: #6e655e;
  --border: #e8e1da;
  --accent: #b4572f;
  --accent-soft: rgba(180, 87, 47, 0.11);
  --accent-strong: #9a4626; /* accent text on --accent-soft */
  --danger: #c4320a;
  --danger-soft: rgba(196, 50, 10, 0.1);
  --warn: #b54708;
  --ok: #079455;
  --radius: 20px;
  --radius-sm: 12px;
  --nav-h: 60px;
  --sidebar-w: 224px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --shadow: 0 1px 2px rgba(60, 40, 20, 0.04), 0 6px 20px rgba(60, 40, 20, 0.05);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141210;
    --surface: #1d1a17;
    --surface-2: #27231f;
    --text: #efe9e3;
    --muted: #a89f97;
    --border: #36302a;
    /* Kept dark so white button text stays above 4.5:1; accent-coloured text uses --accent-strong. */
    --accent: #b85a33;
    --accent-soft: rgba(224, 128, 88, 0.16);
    --accent-strong: #ef9a74;
    --danger: #f97066;
    --danger-soft: rgba(249, 112, 102, 0.14);
    --warn: #fdb022;
    --ok: #32d583;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 6px 20px rgba(0, 0, 0, 0.35);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-tap-highlight-color: transparent;
  overflow-wrap: anywhere;
}

body:has(dialog[open]) {
  overflow: hidden;
}

h1, h2, h3, p, dl, dd { margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; width: 100%; }
a { color: var(--accent-strong); }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
.noscript { padding: 24px; text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 0.8125rem; }
.center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; min-height: 100dvh; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(var(--safe-top) + 10px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; }
.crumb-root { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 1rem; white-space: nowrap; }
.topbar h1 { font-size: 1.125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who { display: none; color: var(--muted); font-size: 0.875rem; }
.icon-btn.plain { background: transparent; color: var(--text); }
.icon-btn.plain:hover { background: var(--surface-2); }
.icon-btn:focus-visible, .avatar:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (min-width: 600px) { .who { display: inline; } }

.tabbar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  display: flex;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-bottom: var(--safe-bottom);
}
.brand { display: none; }
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: var(--nav-h);
  color: var(--muted);
  font-size: 0.75rem;
  text-decoration: none;
  touch-action: manipulation;
}
.tab[aria-current="page"] { color: var(--accent-strong); font-weight: 600; }
.icon { display: inline-flex; line-height: 0; }

.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--nav-h) + var(--safe-bottom) + 24px);
}

.logo {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
}

@media (min-width: 900px) {
  .shell { padding-left: var(--sidebar-w); }
  .tabbar {
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    flex-direction: column;
    gap: 4px;
    padding: 20px 12px;
    border-top: 0;
    border-right: 1px solid var(--border);
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 20px;
    font-weight: 700;
    font-size: 1.125rem;
  }
  .tab {
    flex: none;
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    min-height: 48px;
    padding: 0 14px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
  }
  .tab[aria-current="page"] { background: var(--accent-soft); }
  .content { padding: 24px 28px 48px; }
  .topbar { padding-left: 28px; padding-right: 28px; }
  .crumb-root { display: none; }
}

/* ---------- Primitives ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.actions { display: flex; gap: 10px; }
.actions .btn { flex: 1; }
.actions.wrap { flex-wrap: wrap; }
.actions.wrap .btn { flex: 1 1 40%; }
.section-title { font-size: 1.0625rem; margin: 4px 0 12px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head .section-title { margin: 0; }
.empty { text-align: center; color: var(--muted); padding: 28px 16px; grid-column: 1 / -1; display: grid; gap: 12px; justify-items: center; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 0.875rem; color: var(--muted); }
.field output { color: var(--text); font-weight: 600; }

input:not([type="checkbox"]):not([type="range"]),
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  font-size: 16px; /* anything smaller makes iOS Safari zoom the page on focus */
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  appearance: none;
  -webkit-appearance: none;
}
select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
textarea { resize: vertical; line-height: 1.5; }
input:not([type="checkbox"]):not([type="range"]):focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input[type="checkbox"]:focus-visible, input[type="range"]:focus-visible, .btn:focus-visible, .chip:focus-visible, .tab:focus-visible, .job:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
input:disabled, select:disabled { opacity: 0.6; }
input[type="range"] { width: 100%; height: 32px; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--accent); }
.input-group { display: flex; gap: 8px; align-items: stretch; }
.input-group .btn { flex: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); background: var(--accent); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger.ghost { background: transparent; color: var(--danger); border-color: var(--danger-soft); }
.btn.danger.ghost:hover { background: var(--danger-soft); }
.btn.small { min-height: 40px; padding: 0 14px; font-size: 0.875rem; }
.btn.block { display: flex; width: 100%; }
.btn.big { min-height: 52px; font-size: 1.0625rem; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-2);
  cursor: pointer;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  cursor: pointer;
  touch-action: manipulation;
}
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.badge {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  vertical-align: middle;
}
.badge.admin { background: var(--accent-soft); color: var(--accent-strong); }
.badge.off { background: var(--danger-soft); color: var(--danger); }

.form-error { min-height: 0; color: var(--danger); font-size: 0.9375rem; }
.form-error:empty { display: none; }

.meter { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.meter-bar { height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.3s; }
.meter-bar.full { background: var(--danger); }
.quota-text { display: flex; justify-content: space-between; gap: 12px; font-size: 0.875rem; color: var(--muted); }
.quota-strip { display: grid; gap: 8px; margin-bottom: 16px; }

.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}
.avatar.big { width: 56px; height: 56px; font-size: 1.25rem; }
.avatar.small { width: 40px; height: 40px; border: 1px solid var(--border); text-decoration: none; }

/* ---------- Reference images ---------- */
.ref-section { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; padding-top: 18px; border-top: 1.5px dashed var(--border); }
.ref-title { display: flex; align-items: baseline; gap: 8px; }
.ref-title h3 { font-size: 1.0625rem; }
.ref-bar { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-weight: 600; }
.ref-bar .icon { color: var(--accent); }
.ref-count { margin-left: auto; color: var(--muted); font: 500 0.875rem var(--mono); }
.ref-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 148px;
  padding: 16px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
.ref-drop .icon { color: var(--muted); }
.ref-drop strong { font-weight: 500; }
.ref-drop:hover:not(:disabled) { border-color: var(--accent); }
.ref-drop:disabled { opacity: 0.6; cursor: progress; }
.ref-drop:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ref-section.dragging .ref-drop, .ref-section.dragging .ref-grid { border-color: var(--accent); background: var(--accent-soft); }
.ref-section.dragging .ref-grid { outline: 1.5px dashed var(--accent); outline-offset: 4px; border-radius: var(--radius-sm); }
.ref-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.chip.tag { min-height: 36px; padding: 0 12px; font: 500 0.8125rem var(--mono); color: var(--accent-strong); background: var(--accent-soft); border-color: transparent; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 10px; }
.ref-item, .ref-add { position: relative; aspect-ratio: 1; margin: 0; border-radius: var(--radius-sm); overflow: hidden; }
.ref-item { background: var(--surface-2); border: 1px solid var(--border); }
.ref-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-item figcaption { position: absolute; left: 6px; bottom: 6px; padding: 0 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 0.75rem; line-height: 22px; }
.ref-btn { position: absolute; top: 4px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.62); color: #fff; font-size: 1rem; line-height: 1; cursor: pointer; touch-action: manipulation; }
.ref-remove { right: 4px; }
.ref-earlier { left: 4px; font-size: 1.25rem; }
.ref-add { display: grid; place-items: center; padding: 0; border: 1.5px dashed var(--border); background: transparent; color: var(--muted); font: inherit; font-size: 0.875rem; cursor: pointer; touch-action: manipulation; }
.ref-add:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.ref-add:disabled { opacity: 0.6; cursor: progress; }
.ref-btn:focus-visible, .ref-add:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Login ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: calc(var(--safe-top) + 16px) 16px calc(var(--safe-bottom) + 16px); }
.login-card { width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.login-brand h1 { font-size: 1.5rem; }

/* ---------- Generate ---------- */
.gen-layout, .account-layout { display: grid; gap: 20px; align-items: start; }
.gen-form { display: flex; flex-direction: column; gap: 16px; }
.step { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.step-head { display: flex; align-items: center; gap: 14px; margin-bottom: 2px; }
.step-head h2 { font-size: 1.25rem; }
.step-no {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font: 600 0.9375rem var(--mono);
}
.prompt-box { position: relative; }
.prompt-box textarea { min-height: 150px; padding-bottom: 30px; }
.counter { position: absolute; right: 14px; bottom: 9px; color: var(--muted); font: 0.8125rem var(--mono); pointer-events: none; }
.hint { color: var(--muted); }
.seed-row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.hint.warn { color: var(--warn); font-weight: 500; }

.advanced { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 0 14px; background: var(--surface); }
.advanced[open] { padding-bottom: 14px; display: flex; flex-direction: column; gap: 14px; }
.advanced summary { min-height: 48px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; list-style: none; }
.advanced summary::-webkit-details-marker { display: none; }
.advanced summary::after { content: "＋"; flex: none; color: var(--muted); }
.advanced[open] summary::after { content: "－"; }
.summary-meta { flex: 1; min-width: 0; text-align: right; color: var(--muted); font-size: 0.8125rem; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Keeps the generate button reachable on phones while the form scrolls. */
.submit-bar {
  position: sticky;
  bottom: calc(var(--nav-h) + var(--safe-bottom) + 8px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.submit-bar .quota-strip { margin: 0; gap: 6px; }
.submit-bar .meter { height: 4px; }
.quota-text .bad { color: var(--danger); font-weight: 600; }
.recent-note { margin: -6px 0 12px; }

@media (min-width: 900px) {
  .submit-bar { bottom: 16px; }
  .step { padding: 22px; }
}

@media (min-width: 1000px) {
  .gen-layout { grid-template-columns: minmax(400px, 480px) 1fr; }
  .account-layout { grid-template-columns: 1fr 1fr; }
}

/* ---------- Job tiles ---------- */
.job-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 600px) { .job-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } }
@media (min-width: 1000px) { .job-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .gen-layout .job-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.job {
  display: flex;
  flex-direction: column;
  align-items: stretch; /* browsers default <button> to flex-start, which shrink-wraps the tile */
  width: 100%;
  padding: 0;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
}
.job:disabled { cursor: default; }
.job-media { position: relative; aspect-ratio: 1 / 1; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; }
.job-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.job-state { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px; text-align: center; font-size: 0.8125rem; color: var(--muted); }
.job-state.bad { color: var(--danger); }
.job-caption { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; font-size: 0.75rem; color: var(--muted); }
.job-caption p {
  font-size: 0.8125rem;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } .meter-bar { transition: none; } }

/* ---------- Admin ---------- */
.summary, section.card.stack { gap: 10px; }
.user-grid { display: grid; gap: 12px; margin-top: 12px; }
@media (min-width: 700px) { .user-grid { grid-template-columns: 1fr 1fr; } }
.user-card { display: flex; align-items: center; gap: 12px; }
.user-card.off { opacity: 0.7; }
.user-main { flex: 1; min-width: 0; }
.user-name { font-weight: 600; }
.profile { display: flex; align-items: center; gap: 14px; }
.secret-box { display: grid; gap: 8px; padding: 12px; border: 1px dashed var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.secret-box > div { display: flex; flex-direction: column; }
.secret-box code { font: 600 1rem ui-monospace, "SF Mono", Menlo, Consolas, monospace; user-select: all; }

/* ---------- Dialogs ---------- */
dialog.sheet {
  width: 100%;
  max-width: 520px;
  max-height: 92vh;
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 0;
  border: 0;
  border-radius: 20px 20px 0 0;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}
dialog.sheet::backdrop { background: rgba(8, 10, 16, 0.6); }
.sheet-body { display: flex; flex-direction: column; gap: 14px; padding: 16px 16px calc(var(--safe-bottom) + 20px); max-height: 92vh; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head h2 { font-size: 1.125rem; }
@media (min-width: 600px) { dialog.sheet { margin: auto; border-radius: 20px; } }

dialog.viewer { max-width: 1000px; height: 100vh; height: 100dvh; max-height: none; border-radius: 0; margin: 0; }
dialog.viewer .sheet-body { position: relative; padding: calc(var(--safe-top) + 64px) 0 0; max-height: 100dvh; height: 100%; gap: 0; }
.viewer-info .actions {
  position: sticky;
  bottom: 0;
  margin: 0 -16px;
  padding: 12px 16px calc(var(--safe-bottom) + 12px);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.viewer-close { position: absolute; top: calc(var(--safe-top) + 10px); right: 12px; z-index: 2; background: rgba(0, 0, 0, 0.55); color: #fff; }
.viewer-layout { display: flex; flex-direction: column; gap: 16px; }
.viewer-img { display: block; width: 100%; max-height: 70vh; max-height: 70dvh; object-fit: contain; background: var(--surface-2); }
.viewer-info { display: flex; flex-direction: column; gap: 12px; padding: 0 16px; }
.viewer-info h3 { font-size: 0.875rem; color: var(--muted); font-weight: 500; }
.prompt-text { white-space: pre-wrap; }
.params { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 0.875rem; }
.params dt { color: var(--muted); }
@media (min-width: 900px) {
  dialog.viewer { height: auto; max-height: 90vh; margin: auto; border-radius: 20px; }
  dialog.viewer .sheet-body { padding: 0; height: auto; max-height: 90vh; }
  .viewer-close { top: 12px; }
  .viewer-layout { flex-direction: row; gap: 0; align-items: stretch; }
  .viewer-img { flex: 1 1 60%; min-width: 0; max-height: 90vh; }
  .viewer-info { flex: 0 0 320px; padding: 56px 20px 20px; overflow-y: auto; }
  .viewer-info .actions { position: static; margin: 0; padding: 0; border: 0; background: none; }
}

/* ---------- Toasts ---------- */
/* Page toasts sit under the top bar so they never cover the sticky generate button. */
.toasts {
  position: fixed;
  left: 0;
  right: 0;
  top: calc(var(--safe-top) + 72px);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  pointer-events: none;
}
dialog > .toasts { top: auto; bottom: calc(var(--safe-bottom) + 16px); }
.toast { max-width: 440px; padding: 10px 16px; border-radius: 999px; background: #2b2520; color: #fff; font-size: 0.9375rem; box-shadow: var(--shadow); }
.toast.error { background: var(--danger); }
@media (min-width: 900px) { body:has(.shell) > .toasts { padding-left: calc(var(--sidebar-w) + 16px); } }
