/* 刻谱 · 前台样式（浅色 / 简洁 / 响应式） */
:root {
  --bg: #f6f4ef;
  --bg-soft: #efeae1;
  --surface: #ffffff;
  --ink: #211e1a;
  --ink-soft: #4c4640;
  --muted: #857d74;
  --line: #e6e0d6;
  --line-strong: #d5ccbf;
  --brand: #b5642c;
  --brand-dark: #8f4a1c;
  --brand-soft: #fbeee2;
  --ok: #3f8f6b;
  --ok-soft: #e8f4ee;
  --danger: #c2483b;
  --danger-soft: #fbeae7;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgb(33 30 26 / 5%);
  --shadow: 0 10px 30px -12px rgb(33 30 26 / 18%);
  --serif: "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }
#studio, #works { scroll-margin-top: 78px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }
.shell { width: min(1140px, calc(100% - 48px)); margin: 0 auto; }
.muted { color: var(--muted); font-size: 12.5px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(246 244 239 / 82%);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.topbar.scrolled { border-bottom-color: var(--line); background: rgb(246 244 239 / 94%); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 19px; color: #fff;
  background: linear-gradient(150deg, #c1763a, #a5571f);
  box-shadow: 0 4px 12px -4px rgb(165 87 31 / 55%);
}
.brand-name { font-weight: 600; font-size: 15.5px; letter-spacing: 0.01em; }

.nav { display: flex; align-items: center; gap: 22px; font-size: 14px; }
.nav-link { color: var(--ink-soft); position: relative; padding: 4px 0; }
.nav-link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--brand); border-radius: 2px;
  transform: scaleX(0); transform-origin: left; transition: transform 0.3s var(--ease);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-cta {
  padding: 8px 18px; border-radius: 999px; color: #fff; font-weight: 500;
  background: linear-gradient(150deg, #c1763a, #a5571f);
  box-shadow: 0 6px 16px -8px rgb(165 87 31 / 80%);
  transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgb(165 87 31 / 85%); }
.nav-cta:active { transform: translateY(0); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 76px 0 34px; overflow: hidden; }
.hero-glow {
  position: absolute; inset: -160px -10% auto;
  height: 520px; pointer-events: none; z-index: -1;
  background:
    radial-gradient(520px 300px at 20% 40%, rgb(197 120 58 / 14%), transparent 70%),
    radial-gradient(620px 320px at 82% 18%, rgb(63 143 107 / 10%), transparent 68%);
  filter: blur(4px);
}
.eyebrow {
  margin: 0 0 16px; font-size: 11px; letter-spacing: 0.24em;
  color: var(--brand); text-transform: uppercase;
}
.hero h1 {
  margin: 0 0 18px; font-family: var(--serif); font-weight: 600;
  font-size: clamp(30px, 5vw, 52px); line-height: 1.16; letter-spacing: 0.01em;
}
.hero h1 .accent { color: var(--brand); position: relative; }
.hero h1 .accent::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 6px; height: 9px;
  background: linear-gradient(90deg, rgb(181 100 44 / 18%), transparent);
  z-index: -1; border-radius: 4px;
}
.hero-sub { margin: 0 0 26px; max-width: 640px; color: var(--ink-soft); font-size: 15.5px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.hero-points li {
  padding: 9px 15px; border-radius: 12px; background: rgb(255 255 255 / 70%);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 1px;
}
.hero-points b { font-size: 13px; font-weight: 600; }
.hero-points span { font-size: 11.5px; color: var(--muted); }

/* ---------- 卡片 ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 20px; align-items: start; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm); min-width: 0;
}
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-head h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.04em; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 20px; }
.label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 12.5px; color: var(--ink-soft); margin-bottom: 8px;
}
.label-note { font-size: 11.5px; color: var(--muted); }
.label-note b { color: var(--brand); font-weight: 600; }

.dropzone {
  position: relative; display: grid; place-items: center; min-height: 128px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #fbf9f5, #fff);
  cursor: pointer; overflow: hidden;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--brand); background: var(--brand-soft); outline: none; }
.dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); transform: scale(1.01); }
.dz-empty { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 20px; color: var(--muted); text-align: center; }
.dz-empty strong { color: var(--ink-soft); font-weight: 500; font-size: 13.5px; }
.dz-empty span { font-size: 11.5px; }
.dz-preview { display: flex; gap: 14px; align-items: center; padding: 12px; width: 100%; animation: pop 0.28s var(--ease); }
.dz-preview img {
  width: 92px; height: 92px; object-fit: contain; border-radius: 10px;
  background: #f4f1ea; border: 1px solid var(--line); flex: none;
}
.dz-info { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.dz-meta { font-size: 12px; color: var(--ink-soft); line-height: 1.6; word-break: break-all; }
.dz-meta .prep-ok, .prep-ok { color: var(--ok); }
.dz-clear {
  align-self: flex-start; padding: 3px 10px; font-size: 11.5px; cursor: pointer;
  border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; color: var(--muted);
  transition: color 0.18s, border-color 0.18s;
}
.dz-clear:hover { color: var(--danger); border-color: var(--danger); }

.switch { display: inline-flex; align-items: center; gap: 9px; margin-top: 10px; font-size: 12.5px; color: var(--ink-soft); cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui {
  width: 36px; height: 20px; border-radius: 999px; flex: none; position: relative;
  background: #e0d9cd; transition: background 0.2s var(--ease);
}
.switch-ui::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 20%);
  transition: transform 0.22s var(--ease);
}
.switch input:checked + .switch-ui { background: var(--brand); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 7px 13px; border-radius: 999px; cursor: pointer; font-size: 12.5px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  transition: all 0.18s var(--ease);
}
.chip:hover { border-color: var(--brand); color: var(--brand-dark); transform: translateY(-1px); }
.chip.active {
  border-color: var(--brand); color: #fff; font-weight: 500;
  background: linear-gradient(150deg, #c1763a, #a5571f);
  box-shadow: 0 4px 10px -6px rgb(165 87 31 / 80%);
}
.chips-sm .chip { padding: 5px 11px; font-size: 12px; }

textarea {
  width: 100%; min-height: 88px; resize: vertical; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fbf9f5; color: var(--ink); font: inherit; font-size: 13.5px; line-height: 1.65;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
textarea:focus {
  outline: none; background: #fff; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgb(181 100 44 / 10%);
}
textarea::placeholder { color: #b0a89e; }

.quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.quick .q {
  padding: 4px 10px; font-size: 11.5px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--muted);
  transition: all 0.16s var(--ease);
}
.quick .q:hover { color: var(--brand-dark); border-color: var(--brand); background: var(--brand-soft); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.btn-primary {
  width: 100%; padding: 13px 18px; border: none; border-radius: 12px; cursor: pointer;
  font-size: 14.5px; font-weight: 600; color: #fff;
  background: linear-gradient(150deg, #c1763a, #a5571f);
  box-shadow: 0 10px 24px -12px rgb(165 87 31 / 90%);
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: transform 0.16s var(--ease), filter 0.16s, box-shadow 0.16s;
}
.btn-primary:hover { filter: brightness(1.04); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0) scale(0.995); }
.btn-primary[disabled] { opacity: 0.6; cursor: not-allowed; transform: none; filter: none; }
.btn-sm { width: auto; padding: 8px 16px; font-size: 13px; border-radius: 10px; }
.btn-spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgb(255 255 255 / 35%); border-top-color: #fff;
  animation: spin 0.8s linear infinite;
}
.hint { margin: 10px 0 0; text-align: center; font-size: 11.5px; color: var(--muted); min-height: 17px; }
.hint.warn { color: var(--danger); }
.hint.ok { color: var(--ok); }

/* ---------- 结果区 ---------- */
.stage { min-height: 420px; display: grid; }
.state {
  grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 12px; text-align: center;
  animation: fade 0.35s var(--ease);
}
.state p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.idle-mark {
  width: 74px; height: 74px; border-radius: 22px; display: grid; place-items: center;
  font-family: var(--serif); font-size: 32px; color: #d8d0c4;
  background: linear-gradient(160deg, #faf8f4, #f1ece3); border: 1px solid var(--line);
}

.ring { position: relative; width: 132px; height: 132px; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #ede7dd; stroke-width: 8; }
.ring-fg {
  fill: none; stroke: url(#ringGrad); stroke: var(--brand); stroke-width: 8;
  stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset 0.6s var(--ease);
}
.ring-num { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 1px; }
.ring-num b { font-size: 28px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink); }
.ring-num span { font-size: 12px; color: var(--muted); margin-top: 6px; }
.progress-step { color: var(--ink) !important; font-size: 13.5px !important; }
.progress-sub { font-size: 11.5px !important; }

.state-result { justify-content: flex-start; align-items: stretch; text-align: left; }
.result-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ref-tag { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid transparent; }
.ref-tag.ok { color: var(--ok); background: var(--ok-soft); border-color: #cfe8db; }
.ref-tag.warn { color: var(--brand-dark); background: var(--brand-soft); border-color: #f0dcc6; }
.result-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.btn-ghost {
  padding: 6px 12px; font-size: 12px; border-radius: 9px; cursor: pointer;
  border: 1px solid var(--line-strong); background: #fff; color: var(--ink-soft);
  transition: all 0.16s var(--ease);
  display: inline-flex; align-items: center; gap: 5px;
}
.btn-ghost:hover { color: var(--brand-dark); border-color: var(--brand); background: var(--brand-soft); }
.figure {
  margin: 10px 0 0; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); background: #faf8f4; display: grid; place-items: center;
}
.figure img { width: 100%; max-height: 58vh; object-fit: contain; animation: pop 0.4s var(--ease); }
.result-meta { margin-top: 10px; font-size: 12px; color: var(--muted); line-height: 1.9; }
.result-meta b { color: var(--ink-soft); font-weight: 500; }

.error-mark {
  width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center;
  color: var(--danger); background: var(--danger-soft); border: 1px solid #f2d3cd; font-size: 24px;
}

/* ---------- 出稿库 ---------- */
.works { padding: 46px 0 30px; }
.works-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.works-head h2 { margin: 0 0 2px; font-family: var(--serif); font-size: 24px; font-weight: 600; }
.works-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tabs { display: inline-flex; padding: 3px; background: var(--bg-soft); border-radius: 999px; }
.tab {
  padding: 6px 14px; font-size: 12.5px; border: none; background: transparent;
  color: var(--muted); cursor: pointer; border-radius: 999px;
  transition: all 0.2s var(--ease);
}
.tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.grid-works { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.wcard {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; cursor: zoom-in; position: relative;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), border-color 0.22s;
  animation: fade-up 0.4s var(--ease) both;
}
.wcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.wcard.selected { border-color: var(--brand); box-shadow: 0 0 0 2px rgb(181 100 44 / 18%); }
.wcard-media { position: relative; aspect-ratio: 1; background: #f4f1ea; overflow: hidden; }
.wcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.45s var(--ease); }
.wcard:hover .wcard-media img { transform: scale(1.04); }
.wcard-badge {
  position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 999px;
  font-size: 10.5px; background: rgb(255 255 255 / 92%); color: var(--ink-soft);
  border: 1px solid var(--line); backdrop-filter: blur(4px);
}
.wcard-badge.run { color: var(--brand-dark); border-color: #f0dcc6; background: rgb(251 238 226 / 95%); }
.wcard-badge.fail { color: var(--danger); border-color: #f2d3cd; background: rgb(251 234 231 / 95%); }
.wcard-check {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid #fff; background: rgb(255 255 255 / 70%);
  display: grid; place-items: center; opacity: 0; transform: scale(0.7);
  transition: all 0.2s var(--ease); box-shadow: 0 2px 6px rgb(0 0 0 / 15%);
}
.wcard-check::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.select-mode .wcard-check { opacity: 1; transform: scale(1); }
.wcard.selected .wcard-check { background: var(--brand); border-color: var(--brand); }
.wcard-body { padding: 9px 11px 11px; }
.wcard-title {
  font-size: 12.5px; color: var(--ink-soft);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wcard-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 11px; color: var(--muted); }

.empty { text-align: center; padding: 48px 0; color: var(--muted); }
.empty p { margin: 0 0 12px; }

/* ---------- 批量条 ---------- */
.batchbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(0);
  z-index: 50; display: flex; align-items: center; gap: 18px;
  padding: 10px 12px 10px 18px; border-radius: 999px;
  background: rgb(33 30 26 / 94%); color: #fff; box-shadow: 0 16px 40px -16px rgb(0 0 0 / 55%);
  animation: slide-up 0.32s var(--ease);
}
.batch-count { font-size: 13px; }
.batch-count b { font-size: 15px; }
.batch-actions { display: flex; gap: 8px; }
.batchbar .btn-ghost { background: transparent; color: #d9d2c7; border-color: rgb(255 255 255 / 22%); }
.batchbar .btn-ghost:hover { color: #fff; border-color: #fff; background: rgb(255 255 255 / 8%); }
.batchbar .btn-primary { width: auto; }

/* ---------- 弹窗 ---------- */
.modal {
  position: fixed; inset: 0; z-index: 60; background: rgb(33 30 26 / 42%);
  display: grid; place-items: center; padding: 20px;
  animation: fade 0.2s var(--ease);
}
.modal-card {
  width: min(560px, 100%); max-height: 82vh; overflow: auto;
  background: #fff; border-radius: 18px; box-shadow: 0 30px 60px -24px rgb(0 0 0 / 40%);
  animation: pop 0.28s var(--ease);
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff;
}
.modal-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.modal-x {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--muted); cursor: pointer; font-size: 16px; line-height: 1;
}
.modal-x:hover { color: var(--danger); border-color: var(--danger); }
.modal-body { padding: 16px 20px 20px; }
.convert-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.convert-row:last-child { border-bottom: none; }
.convert-row img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #f4f1ea; }
.convert-row .info { flex: 1; min-width: 0; }
.convert-row .info b { display: block; font-size: 12.5px; font-weight: 500; }
.convert-row .info span { font-size: 11.5px; color: var(--muted); }
.convert-zip {
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.convert-skip { margin-top: 10px; font-size: 11.5px; color: var(--danger); line-height: 1.7; }

/* ---------- Toast ---------- */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 70;
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  padding: 10px 16px; border-radius: 12px; font-size: 13px;
  background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow);
  animation: slide-in 0.28s var(--ease);
  max-width: 320px;
}
.toast.ok { border-color: #cfe8db; color: #2f7156; background: #f2faf6; }
.toast.err { border-color: #f2d3cd; color: #a63a2f; background: #fdf3f1; }

/* ---------- 页脚 ---------- */
.footer { border-top: 1px solid var(--line); margin-top: 34px; padding: 20px 0; }
.footer-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }

/* ---------- 动画 ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slide-up { from { opacity: 0; transform: translateX(-50%) translateY(16px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.reveal { animation: fade-up 0.6s var(--ease) both; animation-delay: var(--d, 0s); }

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

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
  .card-result { order: 2; }
  .stage { min-height: 300px; }
  .hero { padding: 56px 0 26px; }
  .shell { width: calc(100% - 36px); }
}

@media (max-width: 640px) {
  body { font-size: 14.5px; }
  .shell { width: calc(100% - 28px); }
  .topbar-inner { height: 58px; }
  .nav { gap: 14px; font-size: 13px; }
  .nav-link:nth-child(2) { display: none; }
  .nav-cta { padding: 7px 14px; }
  .brand-name { font-size: 14px; max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .hero { padding: 40px 0 20px; }
  .hero-points li { flex: 1 1 100%; }
  .card { padding: 18px; border-radius: 16px; }
  .grid-2 { grid-template-columns: 1fr; gap: 14px; }
  .works { padding: 34px 0 24px; }
  .works-head { align-items: flex-start; }
  .works-tools { width: 100%; justify-content: space-between; }
  .grid-works { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .stage { min-height: 260px; }
  .result-actions { width: 100%; }
  .batchbar {
    left: 12px; right: 12px; bottom: 12px; transform: none;
    border-radius: 16px; padding: 10px 12px; justify-content: space-between;
    animation: fade 0.25s var(--ease);
  }
  .toasts { right: 12px; left: 12px; bottom: 84px; }
  .toast { max-width: none; }
  .modal { padding: 12px; align-items: flex-end; }
  .modal-card { max-height: 86vh; border-radius: 16px 16px 0 0; }
  .figure img { max-height: 46vh; }
}
