/* The Plate — warm, calm, uncluttered. The plate is the hero of every screen. */

@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Fraunces';
  src: url('/fonts/fraunces-italic.woff2') format('woff2');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #f6efe3;
  --bg-deep: #efe6d6;
  --card: #fffdf8;
  --ink: #2f2a25;
  --ink-2: #6d645a;
  --ink-3: #9a9085;
  --line: #e6dccb;
  --ok: #6f9c69;
  --near: #c98a22;
  --over: #c95f3f;
  --accent: #c95f3f;
  --accent-ink: #fffdf8;
  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --radius: 18px;
  --tabs-h: 58px;
  --dock-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }

#app {
  position: relative;
  max-width: 520px;
  min-height: 100dvh;
  margin: 0 auto;
  background:
    radial-gradient(120% 60% at 50% 0%, #fbf6ec 0%, rgba(251, 246, 236, 0) 70%),
    var(--bg);
  padding-bottom: calc(var(--tabs-h) + var(--dock-h) + var(--safe-b) + 24px);
  transition: opacity 0.25s;
}
#app.is-loading { opacity: 0; }
#app.no-dock { padding-bottom: calc(var(--tabs-h) + var(--safe-b) + 24px); }
#app.no-dock #dock { display: none; }
@media (min-width: 560px) {
  #app { box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(80, 60, 30, 0.08); }
}

/* ---------- header ---------- */
#top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(env(safe-area-inset-top, 0px) + 14px) 20px 4px;
}
.brand { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 6px; }
.brand svg { width: 14px; height: 14px; stroke: var(--ink-2); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.top-btn {
  font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line);
}
.top-btn.primary { background: var(--ink); color: var(--card); border-color: var(--ink); }
.top-actions { display: flex; gap: 8px; }

.view-title { font-family: var(--serif); font-weight: 600; font-size: 30px; letter-spacing: -0.02em; margin: 10px 20px 14px; }
.view { animation: fade 0.22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }

/* ---------- guest banner ---------- */
.pitch { padding: 6px 22px 2px; text-align: center; }
.pitch h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(30px, 9vw, 40px); line-height: 1.05; letter-spacing: -0.03em; margin: 8px 0 8px; }
.pitch h1 em { font-style: italic; font-weight: 500; color: var(--accent); }
.pitch p { margin: 0 auto; max-width: 30ch; color: var(--ink-2); font-size: 15.5px; }

/* ---------- week strip ---------- */
#strip { padding: 10px 10px 0; }
.strip-days { display: grid; grid-template-columns: 26px repeat(7, 1fr) 26px; align-items: center; }
.strip-nav { height: 44px; color: var(--ink-3); display: grid; place-items: center; }
.strip-nav svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.day {
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 6px 0 5px; border-radius: 14px; font-size: 11px; font-weight: 600; color: var(--ink-3);
  position: relative;
}
.day .mini { width: 32px; height: 32px; }
.day .num { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.day.is-today .num { color: var(--ink); font-weight: 800; }
.day.is-past { opacity: 0.55; }
.day.is-on { background: var(--card); box-shadow: 0 1px 0 var(--line), 0 6px 16px rgba(80, 60, 30, 0.07); opacity: 1; color: var(--ink); }
.strip-week { text-align: center; font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.strip-week b { color: var(--ink-2); font-weight: 600; }
.strip-week .back { color: var(--accent); font-weight: 600; margin-left: 8px; }

/* ---------- plate ---------- */
#hero { padding: 18px 16px 0; }
#plate { display: block; width: min(100%, 440px, max(240px, 42dvh)); margin: 0 auto; overflow: visible; }
.is-first #strip, .is-first #meter { display: none; }
.is-first #plate { width: min(100%, 440px, max(220px, 38dvh)); }
.pl-band { transition: stroke-dasharray 0.6s cubic-bezier(0.2, 0.8, 0.2, 1), stroke 0.4s, opacity 0.3s; }
.pl-empty { transition: opacity 0.3s; pointer-events: none; }
.pl-empty-1 { font-family: var(--serif); font-size: 24px; font-weight: 500; font-style: italic; fill: #a89c8b; }
.pl-empty-2 { font-family: var(--sans); font-size: 13.5px; fill: #b5aa9a; }
.blob { cursor: pointer; transition: transform 0.55s cubic-bezier(0.2, 0.9, 0.25, 1); outline: none; }
.blob-in { animation: pop 0.45s cubic-bezier(0.2, 1.4, 0.4, 1) both; transform-origin: 0 0; transition: opacity 0.25s, transform 0.25s; }
@keyframes pop { from { transform: scale(0.2); opacity: 0; } }
.blob.is-leaving .blob-in { opacity: 0; transform: scale(0.4); }
.blob circle { transition: r 0.45s cubic-bezier(0.2, 0.9, 0.25, 1), fill 0.3s; }
.blob-fill { stroke: rgba(70, 50, 25, 0.1); stroke-width: 1; }
.blob-label { font-family: var(--sans); font-weight: 600; fill: #3a322a; pointer-events: none; letter-spacing: -0.01em; }
.blob.is-done .blob-fill { stroke: #cfc3ae; stroke-dasharray: 4 4; stroke-width: 1.4; }
.blob.is-done .blob-gloss { opacity: 0; }
.blob.is-done .blob-label { fill: #a3988a; font-weight: 500; }
.blob:focus-visible .blob-fill { stroke: var(--ink); stroke-width: 2.5; }
@media (hover: hover) { .blob:hover .blob-fill { stroke: rgba(70, 50, 25, 0.4); } }

/* ---------- meter ---------- */
#meter { text-align: center; padding: 0 24px; margin-top: 20px; }
.meter-num { font-family: var(--serif); font-size: 34px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.meter-num small { font-family: var(--sans); font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--ink-3); margin-left: 4px; }
.meter-say { font-size: 15px; color: var(--ink-2); margin-top: 4px; min-height: 21px; }
.meter-say b { font-weight: 600; }
.is-near .meter-say b { color: var(--near); }
.is-full .meter-say b, .is-over .meter-say b { color: var(--over); }
.is-over .meter-num { color: var(--over); }
.meter-fix { margin-top: 10px; font-size: 14px; font-weight: 600; padding: 8px 16px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); color: var(--over); }

/* ---------- starter chips (empty plate) ---------- */
#starter { padding: 14px 16px 0; text-align: center; }
.is-first #starter { padding-top: 30px; }
.starter-label { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  padding: 9px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--line);
  font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; min-height: 40px;
}
.chip i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink-3); }
.chip.is-on { background: var(--ink); color: var(--card); border-color: var(--ink); }
.chip.is-on i { color: #cfc6ba; }
.chip .dot { width: 10px; height: 10px; border-radius: 50%; }
.chip small { font-size: 12px; color: var(--ink-3); font-weight: 500; }
.chip.is-on small { color: #cfc6ba; }

/* ---------- lists ---------- */
.list { margin: 18px 16px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list-head { margin: 22px 22px -10px; font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; }
.list-head span { font-weight: 600; letter-spacing: 0; text-transform: none; }
.row { display: flex; align-items: center; min-height: 54px; border-top: 1px solid #f0e8da; }
.row:first-child { border-top: 0; }
.check { flex: none; width: 52px; height: 54px; display: grid; place-items: center; }
.check span { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #cfc4b2; display: grid; place-items: center; transition: 0.15s; }
.check svg { width: 13px; height: 13px; stroke: var(--card); fill: none; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.row.is-done .check span { background: var(--ok); border-color: var(--ok); }
.row.is-done .check svg { opacity: 1; }
.row-main { flex: 1; min-width: 0; text-align: left; padding: 9px 4px 9px 0; }
.row-title { font-size: 15.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.row.is-done .row-title { color: var(--ink-3); text-decoration: line-through; text-decoration-color: #cfc4b2; }
.row-meta { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; margin-top: 1px; flex-wrap: wrap; }
.row-meta .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.row-meta .late { color: var(--near); font-weight: 600; }
.pill { flex: none; min-width: 30px; height: 26px; padding: 0 8px; border-radius: 999px; background: var(--bg); font-size: 12px; font-weight: 700; color: var(--ink-2); display: grid; place-items: center; margin-left: 6px; }
.row-act { flex: none; width: 46px; height: 54px; display: grid; place-items: center; color: var(--ink-3); }
.row-act svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.row-end { width: 14px; flex: none; }
.row.stacked { flex-wrap: wrap; padding-bottom: 12px; }
.row.stacked .row-main { flex: 1 1 70%; padding-bottom: 6px; }
.row.stacked .mini-acts { width: 100%; padding: 0 14px; }
.empty { padding: 28px 24px; text-align: center; color: var(--ink-3); font-size: 15px; }

/* ---------- filters ---------- */
.filters { padding: 0 16px; display: grid; gap: 10px; }
.search { display: flex; align-items: center; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 0 12px; height: 46px; }
.search svg { width: 18px; height: 18px; stroke: var(--ink-3); fill: none; stroke-width: 2; stroke-linecap: round; }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; height: 100%; font-size: 16px; }
.filter-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
select {
  appearance: none; -webkit-appearance: none; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a9085' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 14px;
  border: 1px solid var(--line); border-radius: 12px; height: 40px; padding: 0 26px 0 12px; font-size: 14px; font-weight: 500; min-width: 0; width: 100%; text-overflow: ellipsis;
}

/* ---------- dock (quick add) ---------- */
#dock {
  position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px;
  bottom: calc(var(--tabs-h) + var(--safe-b)); padding: 8px 12px 10px; z-index: 20;
  background: linear-gradient(to top, var(--bg) 70%, rgba(246, 239, 227, 0));
}
.dock-row {
  display: flex; align-items: center; gap: 6px; height: 54px; padding: 0 6px 0 16px;
  background: var(--card); border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 8px 24px rgba(80, 60, 30, 0.12);
}
.dock-row:focus-within { border-color: #cdbfa8; }
#add { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: 16px; }
#add::placeholder { color: var(--ink-3); }
.sizes { display: flex; background: var(--bg); border-radius: 999px; padding: 3px; }
.size { width: 32px; height: 32px; border-radius: 50%; font-size: 13px; font-weight: 700; color: var(--ink-3); transition: 0.15s; }
.size[aria-checked='true'] { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(80, 60, 30, 0.18); }
.add-btn { flex: none; width: 42px; height: 42px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; transition: transform 0.12s; }
.add-btn:active { transform: scale(0.92); }
.add-btn svg { width: 20px; height: 20px; stroke: var(--card); fill: none; stroke-width: 2.6; stroke-linecap: round; }

/* ---------- tabs ---------- */
#tabs {
  position: fixed; left: 50%; transform: translateX(-50%); width: 100%; max-width: 520px; bottom: 0; z-index: 21;
  height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255, 253, 248, 0.94); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
}
#tabs button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--ink-3); }
#tabs svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
#tabs button.is-on { color: var(--ink); }

/* ---------- sheets ---------- */
.scrim { position: fixed; inset: 0; z-index: 50; background: rgba(47, 42, 37, 0.38); display: flex; align-items: flex-end; justify-content: center; animation: scrim 0.2s ease; }
@keyframes scrim { from { background: rgba(47, 42, 37, 0); } }
.sheet {
  width: 100%; max-width: 520px; max-height: 92dvh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg); border-radius: 26px 26px 0 0; padding: 10px 20px calc(22px + var(--safe-b));
  animation: rise 0.28s cubic-bezier(0.2, 0.9, 0.25, 1);
}
@keyframes rise { from { transform: translateY(40%); opacity: 0.4; } }
@media (min-width: 560px) { .scrim { align-items: center; } .sheet { border-radius: 26px; } }
.grab { width: 40px; height: 4px; border-radius: 4px; background: #d9cdb9; margin: 0 auto 14px; }
.sheet h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; letter-spacing: -0.02em; line-height: 1.12; margin: 4px 0 6px; }
.sheet h2 em { font-style: italic; font-weight: 500; }
.sheet .lead { color: var(--ink-2); margin: 0 0 16px; font-size: 15.5px; }
.sheet .lead b { color: var(--ink); font-weight: 600; }
.field-label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin: 18px 2px 8px; }
.sheet .chips { justify-content: flex-start; }
.title-input { width: 100%; border: 0; outline: none; background: none; font-family: var(--serif); font-size: 25px; font-weight: 600; letter-spacing: -0.02em; padding: 4px 0; }
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; min-height: 40px; padding: 0 4px; font-size: 14px; font-weight: 600; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; font-size: 18px; color: var(--ink-2); }
.stepper span { min-width: 54px; text-align: center; font-variant-numeric: tabular-nums; }
.date-chip { position: relative; overflow: hidden; }
.date-chip input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 10px 18px;
  border-radius: 16px; font-weight: 600; font-size: 16px; background: var(--card); border: 1px solid var(--line); text-align: center;
}
.btn.primary { background: var(--ink); color: var(--card); border-color: var(--ink); }
.btn.warm { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.quiet { background: none; border-color: transparent; color: var(--ink-2); min-height: 44px; font-size: 15px; }
.btn.danger { color: var(--over); }
.btn[disabled] { opacity: 0.5; }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 22px; }
.stack { display: grid; gap: 10px; margin-top: 18px; }
.opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 10px 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); text-align: left; font-weight: 600; font-size: 15.5px; }
.opt small { display: block; font-weight: 500; font-size: 13px; color: var(--ink-3); margin-top: 1px; }
.opt .tag { flex: none; font-size: 12.5px; font-weight: 600; color: var(--ok); }
.opt .tag.no { color: var(--ink-3); }
.sheet .list { margin: 0; }
.mini-acts { display: flex; gap: 6px; padding-right: 10px; flex: none; }
.mini-btn { font-size: 13px; font-weight: 600; padding: 7px 11px; border-radius: 999px; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.form { display: grid; gap: 12px; margin-top: 16px; }
.input { width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); padding: 0 16px; font-size: 16px; outline: none; }
.input:focus { border-color: #bfae93; }
.form-error { color: var(--over); font-size: 14px; min-height: 20px; margin: 0; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg-deep); border-radius: 14px; padding: 4px; margin-top: 12px; }
.seg button { height: 40px; border-radius: 11px; font-weight: 600; font-size: 15px; color: var(--ink-2); }
.seg button.is-on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(80, 60, 30, 0.14); }
.fine { font-size: 12.5px; color: var(--ink-3); text-align: center; margin: 12px 0 0; }
.fine a, .link { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }

/* ---------- review ---------- */
.review-say { margin: 0 20px 4px; font-family: var(--serif); font-size: 21px; line-height: 1.3; font-weight: 500; letter-spacing: -0.01em; }
.review-range { margin: 0 20px 12px; font-size: 13.5px; color: var(--ink-3); }
.tiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin: 16px 16px 0; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 10px; }
.tile b { display: block; font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; }
.tile span { font-size: 12.5px; color: var(--ink-3); }
.bars { margin: 14px 16px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 14px 10px; }
.bars-plot { position: relative; display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; height: 110px; align-items: end; }
.bars-cap { position: absolute; left: 0; right: 0; border-top: 1.5px dashed #cfc3ae; }
.bars-cap span { position: absolute; right: 0; top: -17px; font-size: 11px; color: var(--ink-3); background: var(--card); padding-left: 4px; }
.bar { border-radius: 7px 7px 3px 3px; min-height: 3px; background: #d9e6d4; position: relative; }
.bar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 7px 7px 3px 3px; background: var(--ok); }
.bar.is-near { background: #f3dfb9; } .bar.is-near i { background: #e5ac52; }
.bar.is-full, .bar.is-over { background: #f3cdbf; } .bar.is-full i, .bar.is-over i { background: #db7a5a; }
.bars-x { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--ink-3); text-align: center; font-weight: 600; }
.bars-key { display: flex; gap: 14px; justify-content: center; font-size: 12px; color: var(--ink-3); margin-top: 8px; }
.bars-key i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.note { margin: 14px 16px 0; padding: 14px 16px; border-radius: var(--radius); background: #fbeee4; border: 1px solid #f1d9c8; font-size: 14.5px; color: #7a4a35; }
.note.calm { background: #eef3ea; border-color: #dbe6d5; color: #4d6a48; }

/* ---------- you ---------- */
.card { margin: 14px 16px 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 4px; }
.card p { margin: 0 0 12px; color: var(--ink-2); font-size: 14.5px; }
.card .btn + .btn { margin-top: 8px; }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; font-size: 15px; }
.setting + .setting { border-top: 1px solid #f0e8da; }
.setting small { display: block; font-size: 12.5px; color: var(--ink-3); }
.plate-name { border: 0; outline: none; background: none; font-family: var(--serif); font-size: 19px; font-weight: 600; width: 100%; padding: 0; margin-bottom: 4px; }
.pro { background: linear-gradient(140deg, #fff7ea, #fbe9df); border-color: #f0dcc6; }
.pro ul { margin: 0 0 14px; padding-left: 18px; color: var(--ink-2); font-size: 14.5px; }
.pro li { margin: 3px 0; }
.badge { display: inline-block; font-family: var(--sans); font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--ink); color: var(--card); vertical-align: middle; margin-left: 6px; }
details { border-top: 1px solid #f0e8da; }
details:first-of-type { border-top: 0; }
summary { cursor: pointer; padding: 12px 0; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; color: var(--ink-3); font-weight: 400; font-size: 18px; line-height: 1; }
details[open] summary::after { content: '–'; }
details p { margin: 0 0 14px; }
.foot { text-align: center; font-size: 12.5px; color: var(--ink-3); margin: 22px 16px 0; }
.foot a { color: var(--ink-2); }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 10px); transform: translate(-50%, -20px);
  z-index: 60; background: var(--ink); color: var(--card); border-radius: 999px; padding: 11px 18px; font-size: 14.5px; font-weight: 500;
  display: flex; align-items: center; gap: 14px; opacity: 0; pointer-events: none; transition: 0.25s; max-width: calc(100vw - 32px); white-space: nowrap;
  box-shadow: 0 10px 30px rgba(47, 42, 37, 0.25);
}
#toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#toast span { overflow: hidden; text-overflow: ellipsis; }
#toast button { color: #f4c9a8; font-weight: 700; }

/* ---------- static pages ---------- */
.page { max-width: 640px; margin: 0 auto; padding: 32px 22px 80px; background: var(--bg); min-height: 100dvh; }
.page h1 { font-family: var(--serif); font-size: 34px; letter-spacing: -0.02em; margin: 18px 0 6px; }
.page h2 { font-family: var(--serif); font-size: 21px; margin: 28px 0 6px; }
.page p, .page li { color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.page a { color: var(--accent); }
.page .draft { background: #fbeee4; border: 1px solid #f1d9c8; border-radius: 14px; padding: 12px 16px; color: #7a4a35; font-size: 14.5px; }

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