/* Expedition Journal: warm paper, saddle leather, a field notebook. Fraunces for titles, Source Serif 4 to read,
   IBM Plex Mono for every number. */
:root {
  --bg: #f3eee3;
  --surface: #fbf8f1;
  --ink: #1e1a14;
  --muted: #6a6153;
  --line: #d9d0bf;
  --accent: #7a4a1f;
  --accent-soft: #efe3d2;
  --rule: rgba(122, 74, 31, .07);
  --display: "Fraunces", Georgia, serif;
  --text: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #18150f;
    --surface: #221d16;
    --ink: #ece5d6;
    --muted: #a39a88;
    --line: #3a332a;
    --accent: #d49a5c;
    --accent-soft: #2f261b;
    --rule: rgba(212, 154, 92, .06);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--text);
}
a { color: var(--accent); }

.hero { position: relative; min-height: 62vh; display: flex; align-items: flex-end; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 28% 62%; }
.hero img { filter: sepia(.45) saturate(.85) contrast(1.05); }
.hero::before { content: ""; position: absolute; inset: 0; background: #7a4a1f; mix-blend-mode: multiply; opacity: .28; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(22,16,10,.88), rgba(22,16,10,.15) 65%); }
.hero-text { position: relative; z-index: 1; color: #fff; padding: 0 16px 32px; max-width: 960px; margin: 0 auto; width: 100%; }
.eyebrow { margin: 0; font-family: var(--mono); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; opacity: .85; }
.hero h1 { margin: 4px 0 8px; font-family: var(--display); font-style: italic; font-weight: 600; font-variation-settings: "opsz" 72; font-size: clamp(40px, 10vw, 64px); line-height: 1.02; }
.lede { margin: 0; max-width: 34em; font-size: 18px; opacity: .92; }

main { max-width: 960px; margin: 0 auto; padding: 24px 16px 48px; }
body { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 31px, var(--rule) 31px, var(--rule) 32px); }
h2 { font-family: var(--display); font-weight: 600; font-variation-settings: "opsz" 48; font-size: 26px; line-height: 1.15; margin: 0 0 12px; }

.card, .system { background: var(--surface); border: 0; border-top: 2px solid var(--accent); border-radius: 2px 2px 8px 8px; padding: 20px 16px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(40, 28, 14, .08); }
.van-spec { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 24px; margin: 0; }
.van-spec dt { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.van-spec dd { margin: 2px 0 0; font-weight: 600; }

.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 24px; }
.toc a { text-decoration: none; padding: 8px 14px; border-radius: 999px; background: var(--accent-soft); color: var(--ink); font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; }

.system { scroll-margin-top: 16px; }
.status { display: inline-block; margin: 0; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: 14px; }

footer { max-width: 960px; margin: 0 auto; padding: 0 16px 32px; color: var(--muted); font-size: 14px; }

.system > p { margin: 12px 0 0; }
.samples { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 16px; }
.samples figure { margin: 0; }
.samples img { display: block; width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); background: #ecebe6; }
.samples figcaption { margin-top: 6px; font-size: 14px; color: var(--muted); }
.system > p.credit { font-size: 13px; color: var(--muted); }

/* [Brian 2026-10-25] Show the three supplied mockup sheets in the existing site themes. */
.mockup-layout .mockup-eyebrow { margin: 0 0 10px; color: var(--accent); font: 12px var(--mono); text-transform: uppercase; letter-spacing: .12em; }
.mockup-layout h2 { font-size: clamp(28px, 5vw, 40px); }
.mockup-sheets { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 20px; margin-top: 24px; }
.mockup-sheets .mockup-main { grid-column: 1 / -1; width: min(100%, 560px); justify-self: center; }
.mockup-sheets a { display: block; border-radius: 8px; }
.mockup-sheets a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
.mockup-sheets figcaption { color: var(--ink); font-size: 16px; }
.mockup-sheets figcaption span { display: block; margin: 10px 0 2px; font: 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 600px) {
  .mockup-sheets { grid-template-columns: minmax(0, 1fr); }
}

/* ── Amenities menu ───────────────────────────────────────────────────────── */
:root { --warn: #8a5a12; --warn-soft: #fbf1df; }
@media (prefers-color-scheme: dark) { :root { --warn: #e7b866; --warn-soft: #33281a; } }

.intro p { margin: 0; }
.fixed-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.fixed-row:first-of-type { border-top: 0; }
.months input, .qty input { width: 4.6em; font: 500 16px var(--mono); padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--ink); min-height: 44px; }

.system-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.system-head h2 { margin: 0; }
.subtotal { font-family: var(--mono); font-weight: 500; font-size: 17px; white-space: nowrap; color: var(--accent); }

.group { border: 0; padding: 0; margin: 20px 0 0; min-width: 0; }
.group legend { font-family: var(--display); font-weight: 600; font-size: 19px; padding: 0; margin-bottom: 4px; }
.tag { display: inline-block; margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); font-size: 12px; font-weight: 600; vertical-align: 2px; }
.why { margin: 0 0 8px; color: var(--muted); font-size: 14px; font-style: italic; }

.item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.item > input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.item-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
/* Dotted leaders run from the name to the price, like a ledger. */
.item-top { display: flex; align-items: baseline; gap: 6px; }
.item-top::before { content: ""; order: 1; flex: 1 1 12px; min-width: 12px; border-bottom: 1.5px dotted var(--muted); opacity: .55; transform: translateY(-4px); }
.item-top .item-price { order: 2; }
.item-name { font-weight: 600; overflow-wrap: anywhere; }
.item-price { font-family: var(--mono); font-weight: 500; font-size: 15px; white-space: nowrap; }
.qty { color: var(--muted); font-size: 14px; font-family: var(--mono); }
.note { color: var(--muted); font-size: 14px; }
.fit { color: var(--warn); background: var(--warn-soft); border-left: 3px solid var(--warn); border-radius: 0 4px 4px 0; padding: 4px 8px; font-size: 14px; align-self: flex-start; }
.src { margin: 0; font-size: 13px; color: var(--muted); font-variant: small-caps; letter-spacing: .03em; }
.src a { overflow-wrap: anywhere; }
.factory { margin: 20px 0 0; padding: 12px; border-radius: 8px; background: var(--accent-soft); font-size: 14px; }

.totalbar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08); }
.totalbar[hidden] { display: none; }
.total-text { display: flex; flex-direction: column; min-width: 0; }
.total-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.total-amount { font-family: var(--display); font-size: 30px; font-weight: 600; line-height: 1.1; font-variant-numeric: lining-nums tabular-nums; }
.total-split { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.total-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.totalbar button { font: inherit; font-size: 15px; font-weight: 600; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: #fff; cursor: pointer; }
.totalbar button.quiet { background: transparent; color: var(--ink); border-color: var(--line); }
@media (prefers-color-scheme: dark) { .totalbar button { color: var(--bg); } .totalbar button.quiet { color: var(--ink); } }
.reset-row { margin: 0 0 24px; }
.reset-row button { font: inherit; font-size: 15px; min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; }
.labor { align-items: flex-start; flex-wrap: wrap; }
.labor-inputs { display: flex; flex-direction: column; gap: 8px; }
.labor-title { font-weight: 600; }
.labor-inputs label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }

/* ── Workshop: the amenities menu sits on a pegboard ─────────────────────── */
:root { --board: #d6cbb5; --hole: rgba(52, 36, 20, .5); }
@media (prefers-color-scheme: dark) { :root { --board: #2a241b; --hole: rgba(0, 0, 0, .6); } }
.workshop {
  margin: 8px -16px 24px; padding: 0 16px 8px;
  background-color: var(--board);
  background-image: radial-gradient(circle, var(--hole) 2px, transparent 2.6px);
  background-size: 22px 22px; background-position: 11px 11px;
}
.workshop .intro {
  margin: 0 -16px 16px; padding: 64px 16px 24px; min-height: 240px;
  display: flex; flex-direction: column; justify-content: flex-end; color: #fff;
  background: linear-gradient(to top, rgba(14, 12, 10, .88), rgba(14, 12, 10, .2) 75%), url("../assets/img/workshop-900.jpg") center 30% / cover;
}
@media (min-width: 900px) {
  .workshop { margin: 8px 0 24px; border-radius: 16px; overflow: hidden; }
  .workshop .intro { background-image: linear-gradient(to top, rgba(14, 12, 10, .88), rgba(14, 12, 10, .2) 75%), url("../assets/img/workshop.jpg"); }
}
.workshop .intro h2 { font-style: italic; font-size: clamp(32px, 8vw, 46px); margin: 0 0 8px; }
.workshop .intro p { max-width: 36em; opacity: .92; }
.workshop .toc a { background: var(--surface); box-shadow: 0 1px 2px rgba(0, 0, 0, .15); }
.workshop .system, .workshop .card { box-shadow: 0 2px 8px rgba(30, 20, 8, .18); }

/* ── Notepad: the hour log is a ruled pad with a spiral top ──────────────── */
.notepad {
  position: relative; margin: 32px 0 24px; padding: 44px 16px 20px 56px;
  color: #262522; font-size: 17px; line-height: 28px;
  background-color: #fffcf0;
  background-image:
    linear-gradient(90deg, transparent 40px, #e49b9b 40px, #e49b9b 42px, transparent 42px),
    repeating-linear-gradient(to bottom, transparent 0, transparent 27px, #bcd4ea 27px, #bcd4ea 28px);
  background-position: 0 0, 0 16px;
  border-radius: 4px 4px 10px 10px;
  box-shadow: 0 3px 0 #ebe5d2, 0 6px 0 #e0d9c3, 0 14px 28px rgba(0, 0, 0, .18);
}
.notepad::before {
  content: ""; position: absolute; left: 12px; right: 12px; top: -8px; height: 24px;
  background: radial-gradient(circle at 50% 70%, #4a4a48 5px, transparent 5.5px) 0 0 / 26px 24px repeat-x,
              radial-gradient(ellipse at 50% 30%, transparent 5px, #8d8d89 5.5px, #8d8d89 7px, transparent 7.5px) 0 0 / 26px 24px repeat-x;
}
.notepad h2, .notepad .subtotal, .notepad .hour-entry .item-name { font-family: "Caveat", "Segoe Print", cursive; }
.notepad h2 { font-size: 40px; line-height: 56px; margin: 0; }
.notepad .subtotal { font-size: 32px; color: #8c2f2f; }
.notepad .note, .notepad .qty { color: #55524b; font-size: 15px; }
.notepad .item-top::before { border-bottom-color: #8b877d; }
.notepad .subtotal { font-family: "Caveat", cursive; }
.notepad .note { margin: 0 0 12px; }
.hour-cats { margin: 0 0 16px; }
.hour-cat { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; }
.hour-cat.empty { color: #8b877d; }
.hour-cat-hrs { font-variant-numeric: tabular-nums; }
.hour-entries { list-style: none; margin: 0; padding: 0; }
.hour-entry { display: flex; flex-direction: column; padding: 0 0 12px; }
.hour-entry .item-name { font-size: 26px; font-weight: 700; }

.bench { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.bench summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; color: var(--accent); }
.bench-table { overflow-x: auto; margin: 8px 0; }
.bench table { width: 100%; border-collapse: collapse; font-size: 14px; }
.bench th, .bench td { text-align: left; padding: 6px 4px; border-bottom: 1px solid var(--line); vertical-align: top; }
.bench th:not(:first-child), .bench td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bench tr.total td { font-weight: 700; }
.bench .note { margin: 8px 0 0; }
.bench td small { display: block; color: var(--muted); font-size: 12px; line-height: 1.35; }

.factory { border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; }
.status { font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
footer { font-size: 14px; }

/* ── Style picker ─────────────────────────────────────────────────────────── */
.theme-picker { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; }
.theme-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin-right: 4px; }
.theme-picker button { font: 600 14px var(--text); min-height: 44px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; white-space: nowrap; }
.theme-picker button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--surface); }
.spec-line { display: none; margin: 0 0 8px; font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: 15px; opacity: .9; }

/* ── Drawers: each system folds shut to its name, pick count and subtotal ─── */
.drawer > summary { list-style: none; cursor: pointer; min-height: 44px; }
.drawer > summary::-webkit-details-marker { display: none; }
.system-head { align-items: center; }
.system-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.picked-count { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .02em; }
.chevron { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); position: relative; }
.chevron::before { content: ""; position: absolute; left: 9px; top: 8px; width: 8px; height: 8px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s; }
.drawer[open] .chevron::before { transform: translate(0, 4px) rotate(-135deg); }
.drawer-body { padding-top: 4px; }
.drawer > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

/* ── Kit comparison & factory builds ──────────────────────────────────────── */
.compare > .note { margin: 0 0 8px; }
.kit-group { font-family: var(--display); font-size: 20px; margin: 24px 0 10px; }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.kit { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.kit-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.kit-maker { margin: 0; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.kit-name { margin: 2px 0 0; font-size: 17px; line-height: 1.3; }
.kit-price { font-family: var(--mono); font-weight: 500; font-size: 16px; white-space: nowrap; color: var(--accent); }
.kit-fit { align-self: flex-start; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.kit-fit.fits { background: var(--accent-soft); color: var(--accent); }
.kit-fit.unconfirmed { background: var(--warn-soft); color: var(--warn); }
.kit-includes { margin: 0; font-size: 15px; }
.kit .note { font-size: 14px; }
.notfit { margin-top: 16px; }
.notfit summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; color: var(--accent); }
.notfit ul { margin: 0; padding-left: 20px; font-size: 15px; }
.factory-table { overflow-x: auto; margin: 12px -16px 0; padding: 0 16px; -webkit-overflow-scrolling: touch; }
.factory-table table { border-collapse: separate; border-spacing: 0; min-width: 760px; font-size: 14px; }
.factory-table th, .factory-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.factory-table tr:first-child th { font-size: 14px; border-bottom: 2px solid var(--accent); }
.factory-table th small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.factory-table .rowhead, .factory-table .corner { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 110px; max-width: 120px; font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); box-shadow: 1px 0 0 var(--line); }
.factory-table td.np { color: var(--muted); font-style: italic; }
.scroll-hint { font-size: 13px; }
@media (min-width: 900px) { .scroll-hint { display: none; } }
.factory-notes { margin: 12px 0; padding-left: 20px; font-size: 15px; }
.kit-drawer { border-top: 1px solid var(--line); padding: 8px 0; }
.kit-drawer .kit-group { margin: 0; }
.kit-drawer .kit-grid { padding: 8px 0 8px; }
[data-theme="plate"] .kit-drawer .system-head { margin: 0; background: none; border: 0; padding: 0; }

/* ── Loading screen: a percentage in front of the page until it is ready ── */
.loader { display: none; }
html.loading { overflow: hidden; }
html.loading .loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px;
  background: var(--bg); color: var(--ink); transition: opacity .45s ease;
}
.loader.done { opacity: 0; pointer-events: none; }
.loader-inner { width: min(320px, 100%); text-align: center; }
.loader-eyebrow { margin: 0; font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.loader-num { display: block; margin: 6px 0 14px; font-family: var(--display); font-size: 64px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; color: var(--accent); }
.loader-track { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.loader-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; }
.loader-note { margin: 12px 0 0; font-size: 14px; color: var(--muted); }
[data-theme="plate"] .loader-num { font-family: var(--mono); font-weight: 500; }
@media (prefers-reduced-motion: reduce) { .loader { transition: none; } }

/* ── Idea board: "Concepts", a mosaic of photos, each its true shape, opened large in a lightbox ───────────── */
.ideas-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; }
.ideas-head h2 { margin: 0 0 4px; }
.ideas .ideas-lede { margin: 0; color: var(--muted); font-size: 15px; max-width: 34em; }
.concepts-title { margin: 20px 0 10px; font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.ideas .note { margin: 0; }
.ideas-add, .up-send, .up-cancel, .up-pick span { font: inherit; font-size: 15px; font-weight: 600; min-height: 44px; padding: 8px 16px; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--surface); cursor: pointer; display: inline-flex; align-items: center; }
.ideas-add:disabled, .up-send:disabled { opacity: .45; cursor: not-allowed; }
.up-cancel { background: transparent; color: var(--ink); border-color: var(--line); }

/* Justified rows, laid out by js/spec-ideas.js: each row one height, filled edge to edge, every photo its true shape. */
.concepts { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 640px) { .concepts { gap: 8px; } }
.concepts[hidden] { display: none; }
.concepts-row { display: flex; gap: 6px; }
@media (min-width: 640px) { .concepts-row { gap: 8px; } }
.tile { position: relative; min-width: 0; }
.tile-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; border-radius: 4px; overflow: hidden; background: var(--line); cursor: zoom-in; }
.tile-open img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.tile-open:hover img { transform: scale(1.03); }
.tile-open:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.tile-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 6px; color: #fff; font-size: 13px; line-height: 1.3; text-align: left;
  background: linear-gradient(to top, rgba(0, 0, 0, .7), transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.tile-author { display: block; font-size: 12px; }
@media (prefers-reduced-motion: reduce) { .tile-open img { transition: none; } .tile-open:hover img { transform: none; } }

/* The "…" in a photo's top-right corner (and in the lightbox bar), and its little menu. */
.more { position: relative; }
.tile-more { position: absolute; top: 4px; right: 4px; }
.more-btn { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(14, 12, 10, .55); color: #fff; font: 700 20px/1 system-ui, sans-serif; letter-spacing: .02em; }
.more-btn span { transform: translateY(-4px); }
/* A bigger invisible hit area than the dot, so it is easy to tap on a phone. */
.more-btn::before { content: ""; position: absolute; inset: -4px; }
.more-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lb-more .more-btn { width: 48px; height: 48px; background: rgba(255, 255, 255, .12); font-size: 24px; }
.more-menu { position: absolute; top: calc(100% + 4px); right: 0; z-index: 3; min-width: 150px; padding: 4px; border-radius: 10px;
  background: var(--surface); box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.more-menu[hidden] { display: none; }
.more-delete { display: block; width: 100%; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 6px; background: transparent; text-align: left;
  font: 600 15px var(--text); color: #b3261e; cursor: pointer; }
.more-delete:hover, .more-delete:focus-visible { background: rgba(179, 38, 30, .1); outline: 0; }
@media (prefers-color-scheme: dark) { .more-delete { color: #ff8a80; } }
.more-menu.flip { right: auto; left: 0; }

/* The upload modal. */
.idea-upload { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 20px 16px; border: 0; border-radius: 12px;
  background: var(--surface); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.idea-upload::backdrop { background: rgba(14, 12, 10, .55); }
.idea-upload h2 { margin: 0 0 12px; }
.idea-upload .note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }
.up-pick { position: relative; display: inline-block; }
.up-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.up-pick:focus-within span { outline: 2px solid var(--accent); outline-offset: 3px; }
.up-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.up-row { display: grid; grid-template-columns: 64px 1fr 44px; gap: 10px; align-items: center; }
.up-row img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; background: var(--line); }
/* A photo this browser can't draw (a HEIC in Chrome) shows as a labelled tile. */
.thumb-alt { display: grid; place-items: center; width: 100%; height: 100%; min-height: 64px; border-radius: 6px; background: var(--accent-soft);
  color: var(--accent); font: 500 12px var(--mono); letter-spacing: .1em; }
.up-row .thumb-alt { width: 64px; height: 64px; }
.up-row input { width: 100%; min-width: 0; min-height: 44px; padding: 6px 10px; font: 16px var(--text); color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.up-drop { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.up-row.sent { opacity: .5; }
.up-row.failed img { outline: 3px solid var(--warn); }
.up-note { margin: 10px 0 0; color: var(--warn); font-size: 14px; }
.up-note:empty { display: none; }
.up-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }

/* The lightbox: the whole screen, dark, the photo as large as fits. */
.idea-lightbox { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgba(10, 9, 8, .96); color: #f4f1ea; }
.idea-lightbox[open] { display: flex; flex-direction: column; }
.idea-lightbox::backdrop { background: rgba(10, 9, 8, .8); }
.lb-bar { display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 16px; padding-top: max(8px, env(safe-area-inset-top)); }
.lb-original { color: inherit; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; font-size: 14px; }
.lb-count { flex: 1; font-family: var(--mono); font-size: 13px; opacity: .8; }
.lb-close, .lb-prev, .lb-next { width: 48px; height: 48px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 8px; }
.lb-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 2px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }
.lb-prev[hidden], .lb-next[hidden] { display: none; }
.lb-cap { margin: 0; padding: 10px 16px; padding-bottom: max(14px, env(safe-area-inset-bottom)); text-align: center; font-size: 15px; min-height: 1.6em; }
.lb-close:focus-visible, .lb-prev:focus-visible, .lb-next:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* The progress screen: full screen while photos are sent and converted. The photo develops from a blur as it goes up,
   a light sweeps across it while the server converts it, and a strip of dots below ticks each photo off. */
.idea-progress { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 16px; border: 0;
  background: var(--bg); color: var(--ink); }
.idea-progress[open] { display: grid; place-items: center; animation: pg-in .25s ease; }
.idea-progress::backdrop { background: var(--bg); }
@keyframes pg-in { from { opacity: 0; } }
.pg-inner { width: min(340px, 100%); text-align: center; }
.pg-photo { position: relative; width: min(220px, 60vw); aspect-ratio: 4 / 3; margin: 0 auto 18px; border-radius: 10px; overflow: hidden;
  background: var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.pg-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: filter .6s ease, transform .6s ease; }
.idea-progress[data-stage="prepare"] .pg-photo img { filter: blur(10px) saturate(.3); transform: scale(1.08); }
.idea-progress[data-stage="upload"] .pg-photo img { filter: blur(4px) saturate(.7); transform: scale(1.04); }
.pg-photo .thumb-alt { min-height: 0; font-size: 14px; }
.pg-photo::after { content: ""; position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 255, 255, .55) 50%, transparent 70%); transform: translateX(-100%); }
.idea-progress[data-stage="convert"] .pg-photo::after { opacity: 1; animation: pg-sweep 1.3s ease-in-out infinite; }
@keyframes pg-sweep { to { transform: translateX(100%); } }
.pg-count { margin: 0; min-height: 1.4em; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.pg-num { display: block; margin: 2px 0 12px; font-family: var(--display); font-size: 64px; line-height: 1; font-variant-numeric: lining-nums tabular-nums; color: var(--accent); }
.pg-track { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.pg-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; }
.pg-stage { margin: 12px 0 0; min-height: 1.6em; font-size: 15px; color: var(--muted); }
.idea-progress.finished .pg-stage { color: var(--ink); font-weight: 600; }
.pg-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 18px; }
.pg-dot { position: relative; width: 28px; height: 28px; border-radius: 6px; overflow: hidden; background: var(--line); opacity: .45; transition: opacity .3s, transform .3s; }
.pg-dot img, .pg-dot .thumb-alt { width: 100%; height: 100%; min-height: 0; object-fit: cover; font-size: 0; }
.pg-dot.now { opacity: 1; transform: scale(1.15); box-shadow: 0 0 0 2px var(--accent); }
.pg-dot.ok, .pg-dot.bad { opacity: 1; }
.pg-dot.ok::after, .pg-dot.bad::after { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font: 700 15px/1 system-ui, sans-serif; }
.pg-dot.ok::after { content: "\2713"; background: rgba(46, 125, 50, .7); }
.pg-dot.bad::after { content: "!"; background: rgba(179, 38, 30, .75); }
.pg-note { margin: 14px 0 0; color: var(--warn); font-size: 14px; }
.pg-note:empty { display: none; }
.pg-close { margin-top: 16px; font: inherit; font-size: 15px; font-weight: 600; min-height: 44px; padding: 8px 20px; border-radius: 10px;
  border: 1px solid var(--accent); background: var(--accent); color: var(--surface); cursor: pointer; }
[data-theme="plate"] .pg-num { font-family: var(--mono); font-weight: 500; }
@media (prefers-reduced-motion: reduce) {
  .idea-progress[open] { animation: none; }
  .pg-photo img, .pg-dot { transition: none; }
  .idea-progress[data-stage="convert"] .pg-photo::after { animation: none; opacity: 0; }
}
