/* The Grand Duchy of Flush — blue-and-white porcelain, gilt edges.
   The throne is porcelain; so is the interface. */

:root {
  --porcelain: #f8f8f4;
  --glaze: #e8edf4;
  --jasper: #5d7ea8;        /* Wedgwood blue: the header band */
  --jasper-deep: #4d6d97;
  --cobalt: #1f3a73;        /* Delft blue: ink for accents, pins, buttons */
  --cobalt-deep: #132650;
  --gilt: #b8912f;
  --gilt-light: #e4cb84;
  --claret: #8b1e2d;        /* reserved for urgency and errors */
  --ink: #1a2236;
  --ink-2: #47526c;
  --ink-3: #737d95;
  --line: rgba(31, 58, 115, .15);

  --f-display: "IM Fell English", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --f-sc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --f-ui: "Alegreya Sans", "Gill Sans", "Segoe UI", system-ui, sans-serif;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--f-ui);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--cobalt-deep);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--gilt); outline-offset: 2px; }

/* ---------- app frame ---------- */
#app {
  position: relative;
  height: 100%;
  height: 100dvh;
  max-width: 480px;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto;
  grid-template-columns: minmax(0, 1fr);   /* never widen past the screen for a long title */
  background: var(--porcelain);
  overflow: hidden;
}
@media (min-width: 620px) {
  body {
    display: flex; align-items: center; justify-content: center;
    /* Delft tile field behind the "phone" on desktop */
    background-color: var(--porcelain);
    background-image:
      radial-gradient(circle at 50% 50%, transparent 17px, rgba(31,58,115,.18) 18px, transparent 19px),
      radial-gradient(circle at 0 0, rgba(31,58,115,.14) 6px, transparent 7px),
      radial-gradient(circle at 100% 100%, rgba(31,58,115,.14) 6px, transparent 7px),
      radial-gradient(circle at 100% 0, rgba(31,58,115,.14) 6px, transparent 7px),
      radial-gradient(circle at 0 100%, rgba(31,58,115,.14) 6px, transparent 7px);
    background-size: 56px 56px;
  }
  #app {
    width: 420px;
    height: min(880px, calc(100dvh - 48px));
    border-radius: 34px;
    box-shadow: 0 0 0 3px var(--gilt), 0 0 0 11px var(--cobalt-deep), 0 40px 80px rgba(19,38,80,.45);
  }
}

/* ---------- header: a band of Wedgwood jasperware ---------- */
.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(var(--safe-top) + 10px) 14px 10px;
  background: var(--jasper);
  color: #fff;
  border-bottom: 3px double var(--gilt-light);
}
.cameo { width: 40px; height: 40px; flex: none; color: #fff; filter: drop-shadow(0 1px 0 rgba(19,38,80,.35)); }
.brand { flex: 1; min-width: 0; }
.brand h1 {
  margin: 0;
  font-family: var(--f-sc);
  font-weight: 400;
  font-size: clamp(16px, 4.6vw, 23px);   /* the full name fits on a 360 px phone */
  line-height: 1.05;
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 0 rgba(19,38,80,.3);
}
.brand p { margin: 1px 0 0; font-family: var(--f-display); font-style: italic; font-size: 13.5px; color: rgba(255,255,255,.82); }
.user-chip {
  flex: none;
  max-width: 120px;
  min-height: 34px;
  padding: 4px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.7);
  background: rgba(19,38,80,.16);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

main { position: relative; overflow: hidden; }
.view { position: absolute; inset: 0; display: none; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.view.active { display: block; }

/* ---------- map ---------- */
#map { position: absolute; inset: 0; background: var(--glaze); }
.leaflet-container { font-family: var(--f-ui); }
/* Engrave the basemap in cobalt, like a map painted on a Delft plate */
.leaflet-tile-pane { filter: grayscale(1) sepia(.35) hue-rotate(175deg) saturate(1.6) brightness(1.03) contrast(.95); }
.leaflet-control-attribution { font-size: 10px; background: rgba(248,248,244,.85) !important; }
.leaflet-control-zoom { border: 1px solid var(--line) !important; border-radius: 12px !important; overflow: hidden; box-shadow: 0 4px 12px rgba(19,38,80,.15) !important; }
.leaflet-control-zoom a { color: var(--cobalt) !important; background: var(--porcelain) !important; width: 38px !important; height: 38px !important; line-height: 36px !important; }
.leaflet-bottom.leaflet-left { bottom: 84px; }

.map-top { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 1000; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.searchbar {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 4px 4px 12px;
  background: var(--porcelain);
  border: 1px solid var(--gilt);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(19,38,80,.18);
}
.searchbar svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--cobalt); stroke-width: 2; stroke-linecap: round; }
.searchbar input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 16px; padding: 10px 0; color: var(--ink); }
.searchbar input:focus { outline: none; }
.searchbar button { border: 0; border-radius: 12px; background: var(--cobalt); color: #fff; font-weight: 500; padding: 9px 14px; cursor: pointer; }

.chips { display: flex; gap: 6px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.chip {
  flex: none; padding: 5px 13px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(248,248,244,.94); color: var(--cobalt);
  font-weight: 500; font-size: 14.5px; box-shadow: 0 2px 6px rgba(19,38,80,.1);
}
.chip.on { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.map-status {
  display: inline-block; margin: 8px 0 0; padding: 3px 10px; border-radius: 8px;
  background: rgba(248,248,244,.9); color: var(--ink-2); font-size: 13.5px; font-style: italic;
}
.map-status:empty { display: none; }
.map-status.busy::before { content: ""; display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--gilt); animation: blink 1s infinite; vertical-align: 1px; }
.map-status.warn { color: var(--claret); }
@keyframes blink { 50% { opacity: .25; } }

.fab-col { position: absolute; right: 12px; bottom: 88px; z-index: 1000; display: grid; gap: 10px; }
.fab {
  width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: var(--porcelain); border: 1px solid var(--gilt);
  box-shadow: 0 6px 16px rgba(19,38,80,.22);
}
.fab svg { width: 22px; height: 22px; fill: none; stroke: var(--cobalt); stroke-width: 2; stroke-linecap: round; }

/* The one loud thing on screen: for when it is genuinely urgent */
.urgent {
  position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 1000;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px 9px 9px; border-radius: 999px; cursor: pointer; white-space: nowrap;
  background: var(--claret); color: #fff; border: 2px solid var(--gilt-light);
  font-family: var(--f-display); font-size: 18px;
  box-shadow: 0 10px 24px rgba(139,30,45,.35);
}
.urgent:active { transform: translateX(-50%) scale(.97); }
.urgent[disabled] { opacity: .8; }
.urgent-mark { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gilt-light); color: var(--claret); font-family: var(--f-ui); font-weight: 700; }

/* Pins are little porcelain plates with a gilt rim */
.plate-wrap { background: none; border: 0; }
.plate {
  position: relative; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--f-sc); font-size: 12px; line-height: 1;
  background: #fff; color: var(--cobalt);
  box-shadow: 0 0 0 2px var(--gilt), 0 0 0 3.5px var(--cobalt), 0 4px 10px rgba(19,38,80,.35);
}
.plate::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; border: 1px dotted rgba(31,58,115,.45); }
.plate.paid { background: var(--gilt-light); color: var(--cobalt-deep); }
.plate.unknown { background: var(--glaze); color: var(--ink-2); box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--ink-3), 0 4px 10px rgba(19,38,80,.3); }
.plate-score {
  position: absolute; top: -9px; right: -12px; z-index: 1;
  padding: 1px 5px; border-radius: 8px; background: var(--cobalt); color: #fff;
  font-family: var(--f-ui); font-weight: 700; font-size: 11px; border: 1px solid var(--gilt-light);
}
.me-wrap { background: none; border: 0; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--cobalt); border: 3px solid #fff; box-shadow: 0 0 0 0 rgba(31,58,115,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 16px rgba(31,58,115,0); } 100% { box-shadow: 0 0 0 0 rgba(31,58,115,0); } }

/* ---------- tab bar ---------- */
.tabbar {
  z-index: 30;
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding: 6px 4px calc(6px + var(--safe-bottom));
  background: var(--cobalt-deep);
  border-top: 2px solid var(--gilt);
}
.tab {
  white-space: nowrap;
  position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 0;
  border: 0; background: none; color: rgba(255,255,255,.62); font-size: 12.5px; cursor: pointer;
}
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; }
.tab.active { color: var(--gilt-light); }
.tab.active svg { fill: rgba(228,203,132,.18); }
.tab-badge {
  position: absolute; top: 0; left: calc(50% + 7px); min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 10px; background: var(--claret); color: #fff; font-size: 11.5px; line-height: 19px; font-weight: 700;
}

/* ---------- pages (visits, gazette, account) ---------- */
.page { padding: 22px 18px 32px; }
.page-head { margin: 0 0 18px; }
.page-head h2 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 32px; line-height: 1.1; color: var(--cobalt); }
.page-head p { margin: 4px 0 0; color: var(--ink-2); max-width: 34ch; }

.rule { display: flex; align-items: center; gap: 12px; margin: 22px 0 10px; color: var(--cobalt); font-family: var(--f-display); font-size: 19px; }
.rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gilt), transparent); }

.empty { padding: 26px 8px; text-align: center; color: var(--ink-2); }
.empty .cameo-lg { margin: 0 auto 10px; }
.loading { padding: 20px 0; color: var(--ink-3); font-style: italic; }

/* ledger rows: hairlines, not cards */
.visit { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.visit:first-child { border-top: 1px solid var(--line); }
.visit-main { flex: 1; min-width: 0; }
.visit-main b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 19px; line-height: 1.2; color: var(--ink); overflow-wrap: anywhere; }
.visit-main small { color: var(--ink-3); font-size: 14px; }
.visit-state { font-size: 14px; color: var(--claret); font-style: italic; }
.visit .crowns { margin-top: 3px; }
.ledger-summary { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--glaze); color: var(--cobalt); }

/* reviews read as letters */
.letter { padding: 16px 0 18px; border-bottom: 1px solid var(--line); }
.letter-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.letter-verdict { font-style: italic; color: var(--ink-2); font-size: 15px; }
.letter h3 { margin: 8px 0 2px; font-family: var(--f-display); font-weight: 400; font-size: 21px; line-height: 1.2; color: var(--cobalt); }
.letter-body { margin: 6px 0 0; font-family: var(--f-display); font-size: 18px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.letter-sign { margin: 10px 0 0; color: var(--ink-2); font-size: 14.5px; }
.letter-sign b { color: var(--ink); font-weight: 500; }
.letter-place {
  display: inline-flex; align-items: center; gap: 5px; margin: 8px 0 0; padding: 3px 10px 3px 7px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--glaze); color: var(--cobalt);
  font-size: 14px; cursor: pointer; text-align: left;
}
.letter-place svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
.subs { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 10px 0 0; font-size: 13.5px; color: var(--ink-2); }
.subs span { display: inline-flex; align-items: center; gap: 6px; }
.pips { display: inline-flex; gap: 2px; }
.pips i { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--cobalt); }
.pips i.on { background: var(--cobalt); }

/* crowns: the rating unit */
.crowns { display: inline-flex; gap: 2px; vertical-align: middle; }
.crowns svg { width: 19px; height: 19px; fill: #d9dde6; }
.crowns svg.on { fill: var(--gilt); }
.crowns.sm svg { width: 15px; height: 15px; }

/* ---------- bottom sheet ---------- */
#backdrop { position: absolute; inset: 0; z-index: 1500; background: rgba(19,38,80,.32); opacity: 0; pointer-events: none; transition: opacity .25s; }
#backdrop.show { opacity: 1; pointer-events: auto; }
#sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 1600;
  max-height: 88%; overflow-y: auto; overscroll-behavior: contain;
  padding: 6px 20px calc(26px + var(--safe-bottom));
  background: var(--porcelain);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -2px 0 var(--gilt), 0 -16px 40px rgba(19,38,80,.25);
  transform: translateY(105%);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
  visibility: hidden;
}
#sheet.open { transform: none; visibility: visible; }
.sheet-grip { width: 42px; height: 5px; margin: 4px auto 6px; border-radius: 3px; background: var(--line); }
.sheet-close {
  position: sticky; top: 0; float: right; margin-right: -8px; z-index: 2;
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--porcelain); cursor: pointer;
}
.sheet-close svg { width: 18px; height: 18px; stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; }

.sheet-title { margin: 6px 44px 4px 0; font-family: var(--f-display); font-weight: 400; font-size: 27px; line-height: 1.15; color: var(--cobalt); overflow-wrap: anywhere; }
.sheet-title em { display: block; color: var(--ink); }
.sheet-lead { margin: 0 0 6px; color: var(--ink-2); }
.center { text-align: center; }
.muted { color: var(--ink-3); }

.place-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 2px 0 8px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 500; background: #fff; color: var(--cobalt); box-shadow: inset 0 0 0 1.5px var(--cobalt); }
.tag.paid { background: var(--gilt-light); color: var(--cobalt-deep); box-shadow: inset 0 0 0 1.5px var(--gilt); }
.tag.unknown { background: var(--glaze); color: var(--ink-2); box-shadow: none; }
.distance { color: var(--ink-2); font-size: 15px; }
.rating-line { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 15px; }
.rating-line strong { color: var(--ink); font-size: 17px; }

.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 14px 0; border-radius: 12px; overflow: hidden; background: var(--line); }
.facts div { padding: 8px 12px; background: #fff; }
.facts dt { font-size: 13px; color: var(--ink-3); }
.facts dd { margin: 1px 0 0; font-size: 15px; overflow-wrap: anywhere; }

.actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin: 16px 0 8px; }
.actions.stack { grid-template-columns: 1fr; }
.fine { margin: 6px 0 0; font-size: 14px; color: var(--ink-3); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 10px 18px; border-radius: 14px; cursor: pointer;
  font-size: 16.5px; font-weight: 500; text-decoration: none; border: 1.5px solid transparent;
  transition: transform .08s ease;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-primary { background: var(--cobalt); color: #fff; box-shadow: inset 0 0 0 1px var(--gilt-light), 0 4px 12px rgba(19,38,80,.25); }
.btn-quiet { background: #fff; color: var(--cobalt); border-color: var(--cobalt); }
.btn-gilt { background: var(--gilt-light); color: var(--cobalt-deep); border-color: var(--gilt); }
.btn-block { width: 100%; }
.btn-sm { min-height: 38px; padding: 6px 13px; font-size: 15px; border-radius: 11px; }

/* forms */
.form { display: grid; gap: 15px; margin-top: 14px; }
.field { display: grid; gap: 5px; }
.field > span { font-weight: 500; color: var(--ink-2); font-size: 15px; }
.field > span i { font-weight: 400; color: var(--ink-3); }
.form input:not([type=radio]), .form textarea {
  width: 100%; font: inherit; font-size: 17px; color: var(--ink);
  padding: 11px 13px; border-radius: 12px; border: 1px solid #cdd5e2; background: #fff;
}
.form textarea { min-height: 140px; resize: vertical; font-family: var(--f-display); font-size: 18px; line-height: 1.45; }
.form input:focus, .form textarea:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px rgba(31,58,115,.15); }

.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; border-radius: 14px; background: var(--glaze); }
.seg.three { grid-template-columns: repeat(3, 1fr); }
.seg button, .seg label span {
  display: block; padding: 9px 6px; border: 0; border-radius: 10px; text-align: center;
  background: none; color: var(--ink-2); font-weight: 500; font-size: 15px; cursor: pointer;
}
.seg button.on, .seg input:checked + span { background: #fff; color: var(--cobalt); box-shadow: 0 1px 4px rgba(19,38,80,.15); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:focus-visible) span { outline: 2px solid var(--gilt); }

/* crown picker */
.picker { border: 0; margin: 0; padding: 14px 0 4px; text-align: center; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.picker legend { padding: 0; font-weight: 500; color: var(--ink-2); float: left; width: 100%; margin-bottom: 4px; font-size: 15px; }
.crown-row { display: flex; justify-content: center; gap: 4px; clear: both; }
.crown-btn { width: 52px; height: 52px; padding: 6px; border: 0; background: none; cursor: pointer; transition: transform .12s; }
.crown-btn svg { width: 100%; height: 100%; fill: #dde1e9; transition: fill .12s; }
.crown-btn.on svg { fill: var(--gilt); filter: drop-shadow(0 2px 2px rgba(184,145,47,.35)); }
.crown-btn:active { transform: scale(.9); }
.verdict-label { min-height: 28px; margin: 2px 0 10px; font-family: var(--f-display); font-style: italic; font-size: 19px; color: var(--cobalt); }

.sub-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.sub-row:last-child { border-bottom: 0; }
.sub-row > span { font-size: 15.5px; }
.sub-row small { display: block; color: var(--ink-3); font-size: 13px; }
.dots { display: flex; gap: 4px; }
.dots button { width: 30px; height: 30px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; place-items: center; }
.dots button::before { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--cobalt); transition: background .1s; }
.dots button.on::before { background: var(--cobalt); }

.etiquette {
  padding: 14px 16px; border-radius: 16px; background: var(--glaze);
  border: 1px dashed var(--jasper);
}
.etiquette h4 { margin: 0 0 4px; font-family: var(--f-display); font-weight: 400; font-size: 20px; color: var(--cobalt); }
.etiquette p { margin: 0 0 8px; color: var(--ink-2); font-size: 15px; }
.etiquette ol { margin: 0 0 12px; padding-left: 20px; font-size: 15px; color: var(--ink-2); }

/* nearest list */
.nearest { list-style: none; margin: 12px 0 0; padding: 0; }
.nearest li { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.nearest b { font-family: var(--f-display); font-weight: 400; font-size: 19px; overflow-wrap: anywhere; }
.nearest .n-dist { font-size: 22px; font-family: var(--f-display); color: var(--cobalt); text-align: right; }
.nearest .n-sub { grid-column: 1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); }
.nearest .n-btns { grid-column: 2; display: flex; gap: 6px; }

/* account */
.cameo-lg { width: 76px; height: 76px; color: var(--cobalt); margin: 4px auto 6px; }
.profile-name { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 30px; line-height: 1.15; text-align: center; color: var(--cobalt); overflow-wrap: anywhere; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 18px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats div { padding: 12px 4px; text-align: center; }
.stats div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-family: var(--f-display); font-weight: 400; font-size: 30px; color: var(--cobalt); line-height: 1.1; }
.stats span { font-size: 14px; color: var(--ink-2); }
.prose { color: var(--ink-2); }
.prose p { margin: 0 0 10px; }

.seal { width: 88px; height: 88px; margin: 10px auto 8px; border-radius: 50%; display: grid; place-items: center; background: var(--cobalt); color: #fff; box-shadow: 0 0 0 4px var(--porcelain), 0 0 0 6px var(--gilt); animation: stamp .45s cubic-bezier(.2,1.4,.4,1); }
.seal svg { width: 54px; height: 54px; }
@keyframes stamp { from { transform: scale(1.6) rotate(-12deg); opacity: 0; } }

/* toast */
#toast {
  position: absolute; left: 50%; top: calc(var(--safe-top) + 74px); z-index: 2000;
  width: max-content; max-width: calc(100% - 32px);
  padding: 10px 16px; border-radius: 14px;
  background: var(--cobalt-deep); color: #fff; border: 1px solid var(--gilt-light);
  box-shadow: 0 10px 30px rgba(19,38,80,.35);
  font-size: 15.5px;
  transform: translate(-50%, -14px); opacity: 0; pointer-events: none; transition: all .25s;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }
#toast.error { background: var(--claret); }

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

/* moderation */
.letter-report, .link-btn { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--ink-3); text-decoration: underline; cursor: pointer; }
.letter-report { float: right; }
.link-btn { display: block; margin: 6px 0 0; }
.radio { display: flex; gap: 8px; align-items: center; padding: 5px 0; }
fieldset.field { border: 0; padding: 0; margin: 0; }
fieldset.field legend { padding: 0; margin-bottom: 4px; font-weight: 500; }
.sheet-lead.warn { color: var(--claret); }
