/* Cheese — the album brought out on the living-room table, a winter evening.
   Quiet on purpose: soft colours (nothing above ~40 % saturation), words on every button, no badges, no flourishes.
   Day: linen, paper, warm umber ink. Night: the same room by lamplight. */

:root {
  color-scheme: light;
  --bg: #f3eee6;
  --bg-deep: #ebe4d8;
  --panel: #fbf8f2;
  --panel-2: #f6f1e8;
  --text: #3d342e;
  --muted: #776b62;
  --faint: #a2968b;
  --border: #e1d7c9;
  --border-strong: #cfc2b1;
  --accent: #9f6b64;        /* dusty rose clay */
  --accent-deep: #85544e;
  --accent-soft: #ecdcd6;
  --accent-text: #fffaf6;
  --sage: #87967f;
  --sage-soft: #e2e7dc;
  --slate: #76889a;
  --slate-soft: #dfe5ea;
  --danger: #a1554d;
  --danger-soft: #f1ddd8;
  --print: #fffdf8;         /* the white border of a print */
  --corner: #4a3f38;        /* photo corners */
  --wood: #b49a7c;
  --wood-deep: #8f775d;
  --shadow-s: 0 1px 2px rgba(61, 52, 46, .08);
  --shadow: 0 1px 2px rgba(61, 52, 46, .07), 0 6px 18px -6px rgba(61, 52, 46, .16);
  --shadow-l: 0 2px 4px rgba(61, 52, 46, .08), 0 18px 40px -14px rgba(61, 52, 46, .28);
  --grain-opacity: .045;
  --lamp: transparent;
  /* book cloths */
  --cloth-linen: #d6cab4; --cloth-rose: #c5a19c; --cloth-sage: #a7b29d; --cloth-slate: #9eaab7;
  --cloth-ochre: #cbb085; --cloth-plum: #a995a3; --cloth-moss: #959d85; --cloth-dove: #bcb6ae;
  --display: "Sorts Mill Goudy", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --body: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, sans-serif;
  --radius: .7rem;
  --tabbar: 0px;
  --gutter: clamp(1rem, 3vw, 2.25rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #221d19; --bg-deep: #1b1713; --panel: #2b2520; --panel-2: #312a24;
    --text: #efe6d9; --muted: #b9ab9c; --faint: #887b6e; --border: #3d352d; --border-strong: #52483e;
    --accent: #d2a196; --accent-deep: #e2b8ad; --accent-soft: #4a3632; --accent-text: #2a1f1b;
    --sage: #a7b59e; --sage-soft: #333a2f; --slate: #9eb0c2; --slate-soft: #2f3640;
    --danger: #dc9387; --danger-soft: #4a2f2a;
    --print: #ece4d6; --corner: #191512; --wood: #5b4a3a; --wood-deep: #44372b;
    --shadow-s: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 22px -8px rgba(0, 0, 0, .55);
    --shadow-l: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 44px -14px rgba(0, 0, 0, .7);
    --grain-opacity: .06;
    --lamp: rgba(255, 186, 120, .07);
    --cloth-linen: #6d6352; --cloth-rose: #6e504c; --cloth-sage: #55604f; --cloth-slate: #4f5b68;
    --cloth-ochre: #74623f; --cloth-plum: #5c4b58; --cloth-moss: #4f5643; --cloth-dove: #615b54;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #221d19; --bg-deep: #1b1713; --panel: #2b2520; --panel-2: #312a24;
  --text: #efe6d9; --muted: #b9ab9c; --faint: #887b6e; --border: #3d352d; --border-strong: #52483e;
  --accent: #d2a196; --accent-deep: #e2b8ad; --accent-soft: #4a3632; --accent-text: #2a1f1b;
  --sage: #a7b59e; --sage-soft: #333a2f; --slate: #9eb0c2; --slate-soft: #2f3640;
  --danger: #dc9387; --danger-soft: #4a2f2a;
  --print: #ece4d6; --corner: #191512; --wood: #5b4a3a; --wood-deep: #44372b;
  --shadow-s: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 22px -8px rgba(0, 0, 0, .55);
  --shadow-l: 0 2px 4px rgba(0, 0, 0, .3), 0 20px 44px -14px rgba(0, 0, 0, .7);
  --grain-opacity: .06;
  --lamp: rgba(255, 186, 120, .07);
  --cloth-linen: #6d6352; --cloth-rose: #6e504c; --cloth-sage: #55604f; --cloth-slate: #4f5b68;
  --cloth-ochre: #74623f; --cloth-plum: #5c4b58; --cloth-moss: #4f5643; --cloth-dove: #615b54;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: clamp(16px, 0.35vw + 14.6px, 19px); -webkit-text-size-adjust: 100%; }
html.larger { font-size: clamp(18.5px, 0.4vw + 17px, 22px); }
body {
  margin: 0; min-height: 100svh; background: var(--bg); color: var(--text);
  font-family: var(--body); line-height: 1.55; font-size: 1rem;
  background-image: radial-gradient(ellipse 70% 55% at 12% -5%, var(--lamp), transparent 70%);
  background-attachment: fixed;
}
/* paper grain, very faint */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .3  0 0 0 0 .25  0 0 0 0 .2  0 0 0 1.2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
[hidden] { display: none !important; }
a { color: inherit; text-decoration-color: var(--border-strong); text-underline-offset: .2em; }
a:hover { text-decoration-color: currentColor; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0; letter-spacing: .005em; }
h1 { font-size: clamp(1.9rem, 2.5vw + 1rem, 2.6rem); }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.15rem; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2.5px solid var(--slate); outline-offset: 2px; border-radius: .35rem; }
.ic { width: 1.3em; height: 1.3em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round;
      stroke-linejoin: round; flex: none; }
.ic-fill { fill: currentColor; stroke: none; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .88rem; }
.told { font-family: var(--display); font-style: italic; color: var(--muted); }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Frame: top bar, page, tab bar ---------- */
.top {
  display: flex; align-items: center; gap: 1rem; padding: .7rem var(--gutter);
  border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--bg) 88%, transparent);
  position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px);
}
.brand { font-family: var(--display); font-size: 1.55rem; text-decoration: none; display: flex; align-items: center;
         gap: .5rem; letter-spacing: .01em; }
.brand-mark { width: 1.55rem; height: 1.55rem; }
.nav { display: flex; gap: .25rem; margin-left: 1.25rem; }
.nav a { text-decoration: none; padding: .45rem .9rem; border-radius: 2rem; color: var(--muted); font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a[aria-current="page"] { color: var(--text); background: var(--panel); box-shadow: var(--shadow-s);
                              outline: 1px solid var(--border); }
.top .me { margin-left: auto; display: flex; align-items: center; gap: .55rem; text-decoration: none; color: var(--muted);
           padding: .25rem .35rem .25rem .8rem; border-radius: 2rem; }
.top .me:hover { background: var(--panel-2); color: var(--text); }
.page { width: 100%; max-width: 76rem; margin: 0 auto; padding: 1.75rem var(--gutter) calc(3rem + var(--tabbar)); }
.page.narrow { max-width: 44rem; }
.page.mid { max-width: 60rem; }
.tabbar { display: none; }

.sitbar {
  display: flex; align-items: center; gap: .8rem; justify-content: center; flex-wrap: wrap;
  padding: .5rem var(--gutter); background: var(--sage-soft); color: var(--text); font-size: .95rem;
  border-bottom: 1px solid var(--border);
}
.sitbar form { display: inline; }

@media (max-width: 760px) {
  :root { --tabbar: calc(4.1rem + env(safe-area-inset-bottom)); }
  .top { padding: .55rem 1rem; }
  .top .nav { display: none; }
  .top .me .me-name { display: none; }
  .page { padding: 1.2rem 1rem calc(2.5rem + var(--tabbar)); }
  .tabbar {
    display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: color-mix(in srgb, var(--panel) 94%, transparent); backdrop-filter: blur(10px);
    border-top: 1px solid var(--border); padding: .35rem .5rem calc(.35rem + env(safe-area-inset-bottom));
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: .1rem; text-decoration: none;
              color: var(--muted); padding: .35rem 0; border-radius: .8rem; font-size: .92rem; }
  .tabbar a .ic { width: 1.45rem; height: 1.45rem; }
  .tabbar a[aria-current="page"] { color: var(--text); background: var(--bg-deep); font-weight: 600; }
}

/* ---------- Page head ---------- */
.head { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.head .grow { flex: 1 1 16rem; min-width: 0; }
.head .sub { color: var(--muted); margin-top: .35rem; display: flex; gap: .4rem 1.1rem; flex-wrap: wrap; }
.head .sub span { display: inline-flex; align-items: center; gap: .35rem; }
.head .actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.backlink { display: inline-flex; align-items: center; gap: .3rem; color: var(--muted); text-decoration: none;
            margin: -.25rem 0 .8rem -.3rem; padding: .3rem .5rem .3rem .3rem; border-radius: .5rem; }
.backlink:hover { color: var(--text); background: var(--panel-2); }
.section { margin-top: 2.5rem; }
.section > h2 { margin-bottom: 1rem; }
.section-head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 1rem; }
.section-head h2 { margin: 0; }
.section-head .more { margin-left: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 2.75rem; padding: .55rem 1.1rem; border-radius: .65rem; border: 1px solid var(--border-strong);
  background: var(--panel); color: var(--text); text-decoration: none; cursor: pointer; font-weight: 500;
  box-shadow: var(--shadow-s); transition: background .15s, border-color .15s, transform .1s; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: var(--faint); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }
.btn.quiet { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.quiet:hover { background: var(--panel-2); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.big { min-height: 3.4rem; padding: .8rem 1.5rem; font-size: 1.08rem; border-radius: .8rem; }
.btn.wide { width: 100%; }
.btn.icon-only { padding: .55rem; min-width: 2.75rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn .ic { width: 1.2em; height: 1.2em; }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.stack { display: grid; gap: .8rem; }

/* ⋯ menus (details) */
details.dd { position: relative; }
details.dd > summary { list-style: none; }
details.dd > summary::-webkit-details-marker { display: none; }
details.dd .dd-menu {
  position: absolute; right: 0; top: calc(100% + .35rem); z-index: 40; min-width: 15rem; padding: .35rem;
  background: var(--panel); border: 1px solid var(--border); border-radius: .8rem; box-shadow: var(--shadow-l);
  display: grid;
}
details.dd .dd-menu > a, details.dd .dd-menu > button, details.dd .dd-menu form > button {
  display: flex; align-items: center; gap: .65rem; width: 100%; text-align: left; padding: .65rem .8rem;
  border: 0; background: none; border-radius: .55rem; text-decoration: none; cursor: pointer; color: var(--text);
}
details.dd .dd-menu > a:hover, details.dd .dd-menu button:hover { background: var(--panel-2); }
details.dd .dd-menu .danger { color: var(--danger); }
details.dd .dd-menu hr { border: 0; border-top: 1px solid var(--border); margin: .3rem .4rem; }

/* ---------- Forms ---------- */
.field { display: grid; gap: .35rem; }
.field > label, .label { font-weight: 600; font-size: .95rem; }
.field .hint { color: var(--muted); font-size: .88rem; }
.field .err, .err { color: var(--danger); font-size: .92rem; }
.input, input[type="text"], input[type="password"], input[type="search"], input[type="number"], select, textarea {
  width: 100%; min-height: 2.9rem; padding: .6rem .85rem; border-radius: .6rem; border: 1px solid var(--border-strong);
  background: var(--panel); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .04);
}
textarea { min-height: 7rem; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--slate) 70%, transparent);
                                             outline-offset: 0; border-color: var(--slate); }
.form { display: grid; gap: 1.2rem; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 520px) { .form .two { grid-template-columns: 1fr; } }
.check { display: flex; gap: .6rem; align-items: center; cursor: pointer; min-height: 2.4rem; }
.check input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }

/* segmented choice */
.seg { display: inline-flex; flex-wrap: wrap; gap: .3rem; padding: .25rem; background: var(--bg-deep);
       border-radius: .75rem; border: 1px solid var(--border); }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: .5rem .9rem; border-radius: .55rem; color: var(--muted); }
.seg input:checked + span { background: var(--panel); color: var(--text); box-shadow: var(--shadow-s); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--slate); }

/* ---------- Paper panels ---------- */
.paper { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-s); }
.paper.pad { padding: 1.4rem; }
.note { padding: .9rem 1.1rem; border-radius: .7rem; background: var(--panel-2); border: 1px solid var(--border);
        display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.note.sage { background: var(--sage-soft); border-color: transparent; }
.empty { text-align: center; padding: 3rem 1rem; color: var(--muted); display: grid; gap: 1rem; justify-items: center; }
.empty h2 { color: var(--text); }

/* ---------- Prints (photos) ---------- */
.print { position: relative; background: var(--print); padding: .4rem; box-shadow: var(--shadow); border-radius: 1px; }
.print img { width: 100%; height: 100%; object-fit: cover; background: var(--bg-deep); }
/* black paper photo corners, as in the albums */
.print.corners::after {
  content: ""; position: absolute; inset: -.18rem; pointer-events: none;
  --c: .85rem;
  background:
    linear-gradient(135deg, var(--corner) 0 calc(var(--c) * .5), transparent 0) top left / var(--c) var(--c) no-repeat,
    linear-gradient(225deg, var(--corner) 0 calc(var(--c) * .5), transparent 0) top right / var(--c) var(--c) no-repeat,
    linear-gradient(45deg, var(--corner) 0 calc(var(--c) * .5), transparent 0) bottom left / var(--c) var(--c) no-repeat,
    linear-gradient(315deg, var(--corner) 0 calc(var(--c) * .5), transparent 0) bottom right / var(--c) var(--c) no-repeat;
  opacity: .82;
}

/* ---------- Faces ---------- */
.face { display: inline-grid; place-items: center; border-radius: 50%; flex: none; overflow: hidden;
        background-color: var(--bg-deep); background-repeat: no-repeat; color: var(--muted);
        font-family: var(--display); border: 2px solid var(--print); box-shadow: var(--shadow-s); }
.face.s { width: 2rem; height: 2rem; font-size: .85rem; border-width: 1.5px; }
.face.m { width: 3rem; height: 3rem; font-size: 1.15rem; }
.face.l { width: 4.5rem; height: 4.5rem; font-size: 1.6rem; }
.face.xl { width: 8.5rem; height: 8.5rem; font-size: 2.8rem; border-width: 4px; }
.face.has-img span { display: none; }

/* person chips and cards */
.who { display: flex; align-items: center; gap: .75rem; text-decoration: none; padding: .45rem .55rem;
       border-radius: .7rem; min-width: 0; }
a.who:hover { background: var(--panel-2); }
.who .nm { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .rel { color: var(--muted); font-size: .9rem; display: block; }
.who-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: .3rem .8rem; }

/* ---------- Sheets (dialogs): a bottom sheet on phones, a card on desktop ---------- */
dialog.sheet {
  border: 1px solid var(--border); border-radius: 1rem; padding: 0; width: min(34rem, calc(100vw - 2rem));
  max-height: min(88svh, 50rem); background: var(--panel); color: var(--text); box-shadow: var(--shadow-l);
}
dialog.sheet.wide { width: min(46rem, calc(100vw - 2rem)); }
dialog.sheet::backdrop { background: rgba(35, 28, 24, .42); }
dialog.sheet[open] { animation: rise .22s ease-out; display: flex; flex-direction: column; }
.sheet-head { display: flex; align-items: center; gap: .5rem; padding: 1rem 1rem .6rem 1.3rem; }
.sheet-head h2 { font-size: 1.35rem; flex: 1; }
.sheet-body { padding: .3rem 1.3rem 1.3rem; overflow: auto; overscroll-behavior: contain; }
.sheet-foot { padding: .8rem 1.3rem 1.1rem; border-top: 1px solid var(--border); display: flex; gap: .6rem;
              justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 760px) {
  dialog.sheet, dialog.sheet.wide { width: 100vw; max-width: 100vw; margin: auto 0 0; border-radius: 1.1rem 1.1rem 0 0;
                  max-height: 92svh; border-bottom: 0; padding-bottom: env(safe-area-inset-bottom); }
  dialog.sheet[open] { animation: slideup .25s ease-out; }
  .sheet-foot .btn { flex: 1; }
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes slideup { from { transform: translateY(30%); opacity: .4; } }

/* quiet message at the bottom */
.toast { position: fixed; left: 50%; bottom: calc(1.2rem + var(--tabbar)); transform: translateX(-50%); z-index: 60;
         background: var(--text); color: var(--bg); padding: .65rem 1.1rem; border-radius: .7rem;
         box-shadow: var(--shadow-l); font-size: .95rem; animation: rise .2s ease-out; max-width: calc(100vw - 2rem); }

/* fuzzy date picker */
.datepick { display: grid; gap: .6rem; }
.datepick .parts { display: flex; gap: .5rem; flex-wrap: wrap; }
.datepick .parts > * { flex: 1 1 6rem; }
.datepick .parts .yr { flex: 1 1 7rem; }

/* typeahead results */
.matches { display: grid; gap: .2rem; margin-top: .4rem; }
.matches button { display: flex; align-items: center; gap: .7rem; text-align: left; width: 100%; background: none;
                  border: 1px solid transparent; border-radius: .7rem; padding: .45rem .55rem; cursor: pointer; }
.matches button:hover, .matches button:focus-visible { background: var(--panel-2); border-color: var(--border); }

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

/* ---------- Albums as cloth-bound books ---------- */
.cloth-linen { --cloth: var(--cloth-linen); } .cloth-rose { --cloth: var(--cloth-rose); }
.cloth-sage { --cloth: var(--cloth-sage); } .cloth-slate { --cloth: var(--cloth-slate); }
.cloth-ochre { --cloth: var(--cloth-ochre); } .cloth-plum { --cloth: var(--cloth-plum); }
.cloth-moss { --cloth: var(--cloth-moss); } .cloth-dove { --cloth: var(--cloth-dove); }
.book {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  aspect-ratio: 4 / 5; padding: 13% 10% 9% 17%; gap: 9%; text-decoration: none; color: #3b322c;
  border-radius: 3px 9px 9px 3px; background-color: var(--cloth, var(--cloth-linen));
  background-image:
    linear-gradient(90deg, rgba(0, 0, 0, .2) 0, rgba(0, 0, 0, .06) 6.5%, rgba(255, 255, 255, .13) 7.6%, rgba(0, 0, 0, .05) 9%, transparent 11%),
    linear-gradient(180deg, rgba(255, 255, 255, .1), transparent 30%, transparent 75%, rgba(0, 0, 0, .07)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .06) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .045) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07), inset -2px 0 5px rgba(0, 0, 0, .1), 2px 3px 0 -1px rgba(0, 0, 0, .12), var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
a.book:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .07), inset -2px 0 5px rgba(0, 0, 0, .1), 2px 3px 0 -1px rgba(0, 0, 0, .12), var(--shadow-l); }
.book .tip-in { width: 74%; aspect-ratio: 4 / 3; transform: rotate(-1.6deg); padding: .3rem; flex: none; }
.book .tip-in.corners::after { --c: .7rem; }
.book .tip-in img, .book .tip-in svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.book .tip-in.blank { background: color-mix(in srgb, var(--print) 70%, var(--cloth)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.book .plate {
  width: 86%; padding: .55rem .5rem .5rem; text-align: center; background: #f6efe2; color: #3b322c;
  border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12), inset 0 0 0 3px #f6efe2, inset 0 0 0 4px rgba(59, 50, 44, .3);
  display: grid; gap: .1rem;
}
.book .plate-title { font-family: var(--display); font-size: 1.08rem; line-height: 1.15; overflow: hidden;
                     display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.book .plate-sub { font-size: .78rem; color: #6d6159; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .book .plate { background: #e4dac8; box-shadow: 0 0 0 1px rgba(0,0,0,.3), inset 0 0 0 3px #e4dac8, inset 0 0 0 4px rgba(59,50,44,.35); } }
:root[data-theme="dark"] .book .plate { background: #e4dac8; box-shadow: 0 0 0 1px rgba(0,0,0,.3), inset 0 0 0 3px #e4dac8, inset 0 0 0 4px rgba(59,50,44,.35); }

/* the shelf: books stand on a wooden ledge, row after row */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); row-gap: 3rem; column-gap: 0;
         padding: 0 .4rem; }
.shelf .slot { position: relative; padding: 0 clamp(.8rem, 1.8vw, 1.5rem) .55rem; }
.shelf .slot::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.45rem; height: .75rem; pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--wood) 85%, white) 0, var(--wood) 30%, var(--wood-deep) 100%);
  box-shadow: 0 6px 10px -4px rgba(40, 30, 20, .35);
}
.shelf .slot:first-child::after { border-radius: 3px 0 0 3px; }
.shelf .slot .book { z-index: 1; }
.shelf .slot.new .book { background: none; box-shadow: none; border: 2px dashed var(--border-strong); color: var(--muted);
                         justify-content: center; gap: .6rem; padding: 10%; text-align: center; }
.shelf .slot.new .book:hover { color: var(--text); border-color: var(--faint); transform: none; }
.shelf .slot.new .book .ic { width: 2rem; height: 2rem; }
@media (max-width: 520px) {
  .shelf { grid-template-columns: repeat(2, 1fr); row-gap: 2.4rem; padding: 0; }
  .shelf .slot { padding: 0 .75rem .5rem; }
  .book .plate-title { font-size: .98rem; }
}

/* ---------- Lists, settings ---------- */
.list { display: grid; }
.list-row { display: flex; gap: .8rem; align-items: center; padding: .8rem 1.1rem; border-top: 1px solid var(--border); }
.list-row:first-child { border-top: 0; }
.grow { flex: 1 1 auto; min-width: 0; }
.push { margin-left: auto; }
.block { display: block; }
.who-card { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.2rem; text-decoration: none; }
.who-card .nm { display: block; font-family: var(--display); font-size: 1.3rem; }
.who-card .push { margin-left: auto; color: var(--faint); }
.link-field { flex: 1 1 14rem; font-size: .9rem; color: var(--muted); }
details.fold > summary { cursor: pointer; color: var(--muted); padding: .3rem 0; width: fit-content; }
details.fold[open] > summary { margin-bottom: .6rem; }
.bigger { font-size: 1.15em; }

/* ---------- Home ---------- */
.home { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 3rem; align-items: start; }
.home:not(:has(.home-aside)) { grid-template-columns: 1fr; }
.home-aside { display: grid; gap: 2rem; position: sticky; top: 5.5rem; }
.memory h2, .aside-line h3 { font-size: 1.2rem; margin-bottom: .8rem; color: var(--muted); }
.memory-print { display: block; transform: rotate(.8deg); }
.memory-print img { height: auto; }
.memory-text { margin-top: 1rem; display: grid; gap: .4rem; }
.memory-quote { font-family: var(--display); font-size: 1.15rem; line-height: 1.4; }
.otd { display: flex; gap: .6rem; flex-wrap: wrap; }
.otd-item { display: grid; gap: .2rem; text-decoration: none; font-size: .85rem; color: var(--muted); text-align: center; }
.otd-item img { width: 4.2rem; height: 4.2rem; object-fit: cover; border: 3px solid var(--print); box-shadow: var(--shadow-s); }
.births { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.births li { display: flex; justify-content: space-between; gap: 1rem; }
.births li.today a { font-weight: 600; }
.shelf-hint { margin-top: 2.5rem; text-align: center; }
@media (max-width: 960px) {
  .home { grid-template-columns: 1fr; gap: 2.5rem; }
  .home-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
}

/* ---------- Album page ---------- */
.album-head h1 { font-size: clamp(2rem, 3vw + 1rem, 3rem); }
.album-desc { margin-top: .9rem; max-width: 42rem; font-size: 1.05rem; }
.audience-note { margin-bottom: 1.8rem; }
.seen-by { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; margin: -.4rem 0 1.8rem; }
.seen-by .faces { display: flex; }
.seen-by .faces .face { margin-right: -.45rem; }
.seen-by .faces .face:last-child { margin-right: 0; }
.seen-by[aria-disabled] { pointer-events: none; }
/* prints laid out in rows that keep each photo's shape, like a page of the album */
.prints { display: flex; flex-wrap: wrap; gap: 1.8rem 1.5rem; padding: .5rem .2rem; }
.prints::after { content: ""; flex-grow: 999; }
.print-cell { position: relative; flex: var(--r) 1 calc(var(--r) * 10.5rem); max-width: calc(var(--r) * 19rem);
              text-decoration: none; display: block; transition: transform .2s ease; }
.print-cell .print { display: block; }
.print-cell img { aspect-ratio: var(--r); height: auto; }
.print-cell:hover { transform: translateY(-2px); }
.print-cell:nth-child(5n+2) .print { transform: rotate(.5deg); }
.print-cell:nth-child(7n+4) .print { transform: rotate(-.6deg); }
.print-cell .mover { position: absolute; inset: auto 0 -.9rem 0; display: flex; justify-content: center; gap: .4rem; z-index: 2; }
.prints.arranging .print-cell { cursor: grab; }
.prints.arranging .print-cell.dragging { opacity: .4; }
.prints.arranging .print-cell:hover { transform: none; }
.arrange-bar { margin-bottom: 1.5rem; position: sticky; top: 4.6rem; z-index: 10; box-shadow: var(--shadow); }
@media (max-width: 520px) {
  .prints { gap: 1.1rem .9rem; }
  .print-cell { flex-basis: calc(var(--r) * 7.5rem); }
  .print { padding: .28rem; }
}

/* cover cloth picker */
.cloths { display: flex; gap: .7rem; flex-wrap: wrap; }
.cloth-pick input { position: absolute; opacity: 0; }
.cloth-pick .book { width: 3.2rem; padding: 0; cursor: pointer; }
.cloth-pick input:checked + .book { outline: 3px solid var(--text); outline-offset: 3px; }
.cloth-pick input:focus-visible + .book { outline: 3px solid var(--slate); outline-offset: 3px; }

/* place picker */
.placepick { position: relative; }
.place-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: .3rem; background: var(--panel);
                 border: 1px solid var(--border); border-radius: .8rem; box-shadow: var(--shadow-l); padding: .35rem;
                 max-height: 20rem; overflow: auto; }
.place-results button { display: block; width: 100%; text-align: left; padding: .6rem .7rem; border: 0; background: none;
                        border-radius: .5rem; cursor: pointer; line-height: 1.35; }
.place-results button:hover, .place-results button:focus-visible { background: var(--panel-2); }
.place-results .grp { font-size: .82rem; color: var(--faint); padding: .4rem .7rem .2rem; }
.place-results .new { color: var(--accent-deep); }
fieldset.datepick { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.datepick legend { padding: 0; margin-bottom: .35rem; }

/* ---------- Photo page ---------- */
.page.wide { max-width: 100rem; }
.viewer { display: grid; grid-template-columns: minmax(0, 1fr) 23rem; gap: 2.2rem; align-items: start; }
.stage-col { min-width: 0; position: sticky; top: 4.6rem; }
.stage { position: relative; height: calc(100svh - 12.5rem); min-height: 18rem; overflow: hidden; touch-action: pan-y;
         user-select: none; border-radius: .6rem; }
.strip { position: absolute; inset: 0; will-change: transform; }
.slide { position: absolute; inset: 0; display: grid; place-items: center; container-type: size; padding: .9rem; }
.slide[data-pos="-1"] { transform: translateX(-100%); }
.slide[data-pos="1"] { transform: translateX(100%); }
.frame { padding: clamp(.35rem, 1vw, .7rem); }
.frame.corners::after { --c: 1.25rem; }
.pic { --ar: 1; position: relative; aspect-ratio: var(--ar);
       width: min(100cqw - 2rem, (100cqh - 2rem) * (var(--ar))); max-height: calc(100cqh - 2rem); }
.pic img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--bg-deep); -webkit-user-drag: none; }
.stage-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; border: 1px solid var(--border);
               background: color-mix(in srgb, var(--panel) 88%, transparent); color: var(--text); width: 2.9rem; height: 2.9rem;
               border-radius: 50%; display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow-s); }
.stage-arrow:hover { background: var(--panel); }
.stage-arrow[disabled] { opacity: 0; pointer-events: none; }
.stage-arrow.prev { left: .4rem; } .stage-arrow.next { right: .4rem; }
.stage-bar { display: flex; align-items: center; gap: .6rem; margin-top: .8rem; flex-wrap: wrap; }
.stage.is-full { height: 100vh; background: #1b1713; border-radius: 0; }
.stage.is-full .frame { padding: .5rem; }
.stage.naming { touch-action: none; }
.stage.naming .pic { cursor: crosshair; }

/* names on the photo */
.tag-layer { position: absolute; inset: 0; pointer-events: none; }
.naming .tag-layer { pointer-events: auto; }
.tag { position: absolute; transform: translate(-50%, -50%); border-radius: 50%; border: 2px solid rgba(255, 253, 248, .95);
       box-shadow: 0 0 0 1px rgba(40, 30, 25, .35), 0 2px 8px rgba(0, 0, 0, .25); opacity: 0; transition: opacity .2s; }
.show-tags .tag, .tag.lit, .tag.pending { opacity: 1; }
.tag.lit { border-color: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent), 0 2px 10px rgba(0, 0, 0, .3); }
.tag.unknown { border-style: dashed; }
.tag.pending { border-style: dashed; animation: none; }
.tag-name { position: absolute; top: calc(100% + .3rem); left: 50%; transform: translateX(-50%); white-space: nowrap;
            background: rgba(40, 33, 28, .82); color: #f6efe4; padding: .12rem .5rem; border-radius: .4rem; font-size: .85rem;
            pointer-events: none; }
.naming .tag { cursor: move; touch-action: none; }
.tag-size { position: absolute; right: -2px; bottom: -2px; width: 1.1rem; height: 1.1rem; border-radius: 50%;
            background: var(--print); border: 2px solid var(--accent); cursor: nwse-resize; transform: translate(35%, 35%); }

/* the side panel */
.panel { display: grid; gap: 1.8rem; padding-top: 2.4rem; }
.panel-top { display: flex; align-items: flex-start; gap: .6rem; }
.facts { flex: 1; display: grid; gap: .4rem; }
.fact { display: flex; align-items: center; gap: .55rem; font-size: 1.05rem; }
.fact .ic { color: var(--faint); }
.panel h3 { font-size: 1.15rem; margin-bottom: .6rem; color: var(--muted); }
.name-list { list-style: none; margin: 0 0 .8rem; padding: 0; display: grid; gap: .1rem; }
.name-list li { border-radius: .6rem; }
.name-list .who { padding: .35rem .5rem; display: block; }
.name-list .who.unknown .nm { color: var(--muted); font-weight: 500; }
.desc { font-size: 1.12rem; line-height: 1.6; white-space: normal; }
.description .told { margin: .4rem 0 .8rem; }
.description { display: grid; justify-items: start; }
.stories { display: grid; gap: .8rem; justify-items: start; }
.story-list { display: grid; gap: 1.1rem; width: 100%; }
.story { display: grid; gap: .45rem; padding: 0 0 0 .9rem; border-left: 2px solid var(--border-strong); }
.story-text { font-size: 1.05rem; line-height: 1.6; }
.also a { color: inherit; }
button.link { background: none; border: 0; padding: 0; color: var(--accent-deep); cursor: pointer; text-decoration: underline;
              text-underline-offset: .2em; font-size: inherit; }
.suggest { margin-top: -.6rem; }
.hide-s { }
@media (max-width: 960px) {
  .viewer { grid-template-columns: 1fr; gap: .5rem; }
  .stage-col { position: static; }
  .stage { height: min(62svh, 34rem); transition: height .25s ease; }
  .panel { padding-top: 1rem; }
}
@media (max-width: 760px) {
  body.photo-page .page { padding-left: .5rem; padding-right: .5rem; }
  body.photo-page .backlink, body.photo-page .stage-bar, body.photo-page .panel { margin-left: .5rem; margin-right: .5rem; }
  .slide { padding: .4rem; }
  .stage-arrow { display: none; }
  .hide-s { display: none; }
}

/* voice */
.voice { display: flex; align-items: center; gap: .8rem; width: 100%; max-width: 24rem; }
.voice-play { width: 3rem; height: 3rem; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-text);
              display: grid; place-items: center; cursor: pointer; flex: none; box-shadow: var(--shadow-s); }
.voice-play .pause-i { display: none; }
.voice.on .voice-play .play-i { display: none; }
.voice.on .voice-play .pause-i { display: block; }
.voice-bar { flex: 1; height: .45rem; background: var(--bg-deep); border-radius: 1rem; overflow: hidden; cursor: pointer; }
.voice-fill { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 1rem; }
.voice-time { min-width: 2.6rem; text-align: right; font-variant-numeric: tabular-nums; }

/* the "tell its story" sheet */
.tell { gap: 1.2rem; }
.tell-mode { justify-self: start; }
.recorder { display: flex; align-items: center; gap: 1.2rem; padding: 1rem 0; }
.rec-btn { width: 5rem; height: 5rem; border-radius: 50%; border: 3px solid var(--border-strong); background: var(--panel);
           display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); flex: none; }
.rec-dot { width: 2rem; height: 2rem; border-radius: 50%; background: var(--danger); transition: border-radius .2s, transform .2s; }
.recording .rec-dot { border-radius: .35rem; transform: scale(.85); }
.recording .rec-btn { border-color: var(--danger); }
.rec-info { display: grid; }
.rec-label { font-size: 1.2rem; font-weight: 600; }
.rec-time { font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.rec-review audio { width: 100%; }

/* the name picker */
.picker { display: grid; gap: .6rem; }
.picker .nm { display: block; font-weight: 600; }
.picker .rel { display: block; color: var(--muted); font-size: .9rem; }
.picker-more { display: grid; gap: .4rem; margin-top: .4rem; }

/* ---------- People ---------- */
.people-search { max-width: 24rem; margin-bottom: 1rem; }
.people-sec h2 { font-size: 1.25rem; color: var(--muted); margin-bottom: .6rem; }
.people-sec:first-of-type { margin-top: 0; }
.who.gone .nm { font-weight: 500; }
.in-memory { --accent: var(--slate); --accent-deep: color-mix(in srgb, var(--slate) 75%, var(--text)); }
.person-head { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; }
.person-head .grow { flex: 1 1 16rem; }
.person-head h1 { font-size: clamp(2.1rem, 3vw + 1rem, 3.1rem); }
.person-sub { color: var(--muted); display: flex; gap: 1rem; flex-wrap: wrap; font-family: var(--display); font-size: 1.15rem; }
.person-years { display: flex; gap: .5rem; font-size: 1.05rem; margin: .3rem 0; }
.person-head .actions { display: flex; gap: .5rem; align-self: flex-start; }
.in-memory .person-head .face.xl { filter: saturate(.6); }
.about p { font-size: 1.08rem; max-width: 42rem; line-height: 1.65; }
.memories .story-list { max-width: 44rem; }
.memories .story { border-left-color: var(--slate); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: 1.1rem; }
.print.thumb { display: block; aspect-ratio: 1; padding: .3rem; }
.print.mini { display: block; width: 3.4rem; height: 3.4rem; padding: .18rem; flex: none; }
.print.mini img { width: 100%; height: 100%; }
.voice-row { display: flex; gap: 1rem; align-items: flex-start; }
.voice-row .story { flex: 1; }
.fam-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.4rem 2rem; }
.fam-col { display: grid; gap: .2rem; align-content: start; }
.fam-col h3 { font-family: var(--body); font-size: .9rem; font-weight: 600; color: var(--muted); text-transform: none; margin-bottom: .2rem; }
.add-rel { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); text-decoration: none; padding: .45rem .55rem;
           border-radius: .6rem; font-size: .95rem; }
.add-rel:hover { color: var(--text); background: var(--panel-2); }
.form-title { margin-bottom: 1.5rem; }
.already { padding: .8rem; border-radius: .8rem; background: var(--sage-soft); }
.already .nm { display: block; font-weight: 600; } .already .rel { display: block; color: var(--muted); font-size: .9rem; }
fieldset.plain { border: 0; padding: 0; margin: 0; }
.invite { display: grid; gap: 1.2rem; justify-items: start; }
.howto ol { padding-left: 1.3rem; display: grid; gap: .5rem; margin: 0; }
.dupe { display: grid; gap: .8rem; }
.dupe-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.merge-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.merge-pair .keep { outline: 2px solid var(--sage); }
@media (max-width: 620px) { .dupe-pair, .merge-pair { grid-template-columns: 1fr; } }

/* tree */
.tree { display: grid; gap: 2.4rem; justify-items: center; padding: 1rem 0 2rem; overflow-x: auto; }
.gen { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; position: relative; }
.gen + .gen::before { content: ""; position: absolute; top: -1.6rem; left: 50%; width: 1px; height: 1.1rem; background: var(--border-strong); }
.gen-small .node .face { width: 2.4rem; height: 2.4rem; font-size: .95rem; }
.branch { display: flex; gap: .8rem; padding: .4rem .8rem; border-radius: 1rem; background: var(--panel-2); }
.couple { display: flex; gap: .3rem; align-items: center; padding: .6rem 1rem; border-radius: 1.2rem; background: var(--panel);
          border: 1px solid var(--border); box-shadow: var(--shadow-s); }
.node { display: grid; justify-items: center; gap: .15rem; text-decoration: none; text-align: center; padding: .4rem .5rem;
        border-radius: .8rem; min-width: 5.5rem; }
.node:hover { background: var(--panel-2); }
.node-name { font-weight: 600; }
.node.center .node-name { font-family: var(--display); font-size: 1.3rem; font-weight: 400; }
.node-rel, .node-years { font-size: .82rem; color: var(--muted); }
.node.side { opacity: .9; }

/* add */
.add-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.add-card { display: grid; gap: .35rem; padding: 1.4rem; text-decoration: none; transition: border-color .15s, transform .15s; }
.add-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.add-card .ic { width: 2rem; height: 2rem; color: var(--accent); margin-bottom: .4rem; }
.add-t { font-family: var(--display); font-size: 1.35rem; }
.add-s { font-size: .95rem; }

/* history, staff */
.history { display: grid; gap: 1rem; }
.history-old { padding: .6rem .8rem; background: var(--panel-2); border-radius: .5rem; }
.meter { height: .7rem; background: var(--bg-deep); border-radius: 1rem; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--sage); }
code { font-size: 1rem; letter-spacing: .05em; }

/* ---------- Upload, scan ---------- */
.drop { position: relative; display: grid; justify-items: center; gap: .4rem; padding: 2.4rem 1rem; border: 2px dashed var(--border-strong);
        border-radius: 1rem; cursor: pointer; text-align: center; background: var(--panel); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--panel-2); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .ic { width: 2.4rem; height: 2.4rem; color: var(--accent); }
.drop-t { font-family: var(--display); font-size: 1.4rem; }
.up-list { display: grid; gap: .5rem; }
.up-row { display: flex; align-items: center; gap: .9rem; padding: .5rem .7rem; border-radius: .7rem; background: var(--panel);
          border: 1px solid var(--border); }
.up-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.up-bar { display: block; height: .35rem; background: var(--bg-deep); border-radius: 1rem; margin-top: .35rem; overflow: hidden; }
.up-bar span { display: block; height: 100%; width: 0; background: var(--sage); transition: width .2s; }
.up-row.ok .up-bar span { width: 100%; }
.up-row.bad .up-state { color: var(--danger); }
.scan-stage { position: relative; width: 100%; max-height: 70svh; display: grid; place-items: center; background: var(--bg-deep);
              border-radius: .8rem; overflow: hidden; touch-action: none; }
.scan-stage canvas { max-width: 100%; max-height: 70svh; display: block; }
.scan-stage .quads { position: absolute; }
.scan-stage { container-type: inline-size; }
.quads { inset: 0; width: 100%; height: 100%; }
.q-area { fill: color-mix(in srgb, var(--accent) 18%, transparent); stroke: #fffaf2; stroke-width: 3; vector-effect: non-scaling-stroke; }
.q-h { fill: #fffaf2; stroke: var(--accent-deep); stroke-width: 3; vector-effect: non-scaling-stroke; cursor: grab; }
.q-num circle { fill: rgba(40, 32, 27, .75); } .q-num text { fill: #fffaf2; text-anchor: middle; font-family: var(--body); font-weight: 700; }
.q-del circle { fill: #fffaf2; stroke: var(--danger); stroke-width: 2; vector-effect: non-scaling-stroke; cursor: pointer; }
.q-del path { stroke: var(--danger); stroke-width: 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.scan .row .btn.primary.big { min-width: 12rem; }

/* ---------- Who is this? ---------- */
.who-session { display: grid; grid-template-columns: minmax(0, 1fr) 22rem; gap: 2.2rem; align-items: start; }
.who-stage { height: calc(100svh - 10rem); }
.who-side { display: grid; gap: 1rem; padding-top: 1rem; }
.who-side h1 { font-size: clamp(2rem, 2.5vw + 1rem, 2.8rem); }
.who-actions { display: grid; gap: .5rem; margin-top: .5rem; }
.who-session .tag { opacity: 1; }
@media (max-width: 960px) {
  .who-session { grid-template-columns: 1fr; gap: 1rem; }
  .who-stage { height: min(60svh, 32rem); }
}

/* ---------- The slideshow ---------- */
body.play { background: #17130f; color: #efe6d9; }
body.play::before { display: none; }
body.play .page { max-width: none; padding: 0; }
.show { position: fixed; inset: 0; overflow: hidden; cursor: none; }
.show.awake { cursor: auto; }
.show-stage { position: absolute; inset: 0 0 0 0; }
.show-img { position: absolute; inset: 3vh 3vw 15vh; width: 94vw; height: 82vh; object-fit: contain; opacity: 0;
            transition: opacity 1.3s ease; }
.show-img.in { opacity: 1; }
.show-img.out { opacity: 0; }
.show-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.2rem 6vw calc(1.6rem + env(safe-area-inset-bottom));
                text-align: center; display: grid; gap: .3rem; background: linear-gradient(transparent, rgba(23, 19, 15, .85) 35%); }
.show-caption.empty { background: none; }
.show-text { font-family: var(--display); font-size: clamp(1.2rem, 1.2vw + .8rem, 2.1rem); line-height: 1.35; max-width: 60rem;
             margin: 0 auto; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.show-facts, .show-people { color: #b9ab9c; font-size: clamp(.95rem, .5vw + .8rem, 1.25rem); }
.show-controls { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: .4rem;
                 padding: .8rem 1rem; background: linear-gradient(rgba(23, 19, 15, .8), transparent); opacity: 0;
                 transition: opacity .3s; }
.show.awake .show-controls, .show.paused .show-controls { opacity: 1; }
.show-controls .btn.quiet { color: #efe6d9; }
.show-controls .btn.quiet:hover { background: rgba(255, 255, 255, .08); }
.show .pause-i { display: block; } .show .play-i { display: none; }
.show.paused .pause-i { display: none; } .show.paused .play-i { display: block; }
.voice-opt { color: #b9ab9c; }
@media (max-width: 760px) { .show-controls .btn span, .voice-opt { font-size: .9rem; } }
