/* The Between's page styles, carried from the 3D garden artifact (six-faces-council relationship-creature, 2026-10-16). */
/* Layout: the room fills the screen. A top strip names the Between and its state; the bottom strip holds what you can do
   where you stand; sheets slide up over the room for writing. */
:root {
  --bg: #15110d;        /* the room's dark stone */
  --panel: #f6f2ea;
  --ink: #1f1a15;
  --muted: #6d645a;
  --line: #d8cfc2;
  --you: #2f8f86;       /* teal: the first hue of the Between */
  --them: #9a4f86;      /* plum: the second hue */
  --accent: #1f6f6a;    /* the board's light accent; white reads on it at 5.9:1 */
  --accent-ink: #ffffff;
  --warn: #9a5a12;
  --soft: #ebe4d8;
  --glass: rgba(24, 19, 15, .72);
  --glass-ink: #f3ece2;
  --glass-muted: #c2b6a6;
  /* the three families (Six-faces-council uu1-three-families), from /ui/tokens.css */
  --display: var(--ui-display, "Marcellus", Georgia, serif);
  --body: var(--ui-body, "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif);
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --panel: #1d1915; --ink: #ede5d9; --muted: #a99d8e; --line: #3a322a; --soft: #2a241e;
  --you: #5fc0b5; --them: #d48bc0; --accent: var(--ui-accent, #5fc2ba); --accent-ink: var(--ui-accent-ink, #0f1a19); --warn: #e2a85c; color-scheme: dark } }
:root[data-theme="dark"] {
  --panel: #1d1915; --ink: #ede5d9; --muted: #a99d8e; --line: #3a322a; --soft: #2a241e;
  --you: #5fc0b5; --them: #d48bc0; --accent: var(--ui-accent, #5fc2ba); --accent-ink: var(--ui-accent-ink, #0f1a19); --warn: #e2a85c; color-scheme: dark }

[hidden] { display: none !important; }
html, body { height: 100%; }
body { background: var(--bg); color: var(--glass-ink); font: 15px/1.5 var(--body); overflow: hidden; margin: 0;
  -webkit-tap-highlight-color: transparent; overscroll-behavior: none; }
#stage { position: fixed; inset: 0; touch-action: none; }
#stage canvas { display: block; width: 100%; height: 100%; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }
button { font: 700 .88rem var(--body); border-radius: 999px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  padding: 9px 15px; cursor: pointer; min-height: 40px; }
button.ghost { background: transparent; color: var(--accent); }
button.quiet { background: transparent; color: var(--muted); border-color: var(--line); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--them); outline-offset: 2px; }
.near button.quiet { color: var(--glass-muted); border-color: rgba(255,255,255,.28); }
.near .small { font-size: .875rem; color: var(--glass-muted); }
.hud button.glassbtn { background: var(--glass); color: var(--glass-ink); border-color: rgba(255,255,255,.18); backdrop-filter: blur(6px); }

/* top strip */
.top { position: fixed; left: 0; right: 0; top: 0; padding: calc(10px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 10px max(16px, env(safe-area-inset-left, 0px));
  display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; pointer-events: none; }
.top > * { pointer-events: auto; }
.namecard { background: var(--glass); backdrop-filter: blur(6px); border-radius: 14px; padding: 8px 12px; display: grid; gap: 2px; min-width: 0; max-width: 62vw; }
.namecard h1 { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.namecard .sub { font-size: .875rem; color: var(--glass-muted); }
.pill { display: inline-flex; gap: 6px; align-items: center; font-size: .875rem; font-weight: 700; }
.pill i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--you); }
.pill.charged i { background: var(--them); }
.pill.stale i { background: #8d857b; }
.topbtns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--them); margin-left: 5px; vertical-align: middle; }

/* bottom strip */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; padding: 10px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  display: grid; gap: 8px; pointer-events: none; }
.bottom > * { pointer-events: auto; }
.near { background: var(--glass); backdrop-filter: blur(6px); border-radius: 14px; padding: 10px 12px; display: grid; gap: 8px; max-width: 560px; }
.near .what { font-size: .9rem; overflow-wrap: anywhere; }
.near .what b { font-family: var(--display); }
.near .what .t { color: var(--glass-muted); font-size: .875rem; display: block; margin-top: 2px; max-height: 4.6em; overflow: auto; white-space: pre-wrap; }
.row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tools { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tools::-webkit-scrollbar { display: none; }
.tools button { white-space: nowrap; flex: none; }
.hint { font-size: .875rem; color: var(--glass-muted); background: var(--glass); border-radius: 10px; padding: 6px 10px; justify-self: start; max-width: 560px; }

/* labels over the room */
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.lab { position: absolute; transform: translate(-50%, -100%); font-size: .875rem; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: rgba(20,16,12,.62); color: #f3ece2; white-space: nowrap; max-width: 44vw; overflow: hidden; text-overflow: ellipsis; }
.lab.you { box-shadow: inset 0 0 0 1.5px var(--c, #5fc0b5); }
.lab.dim { opacity: .55; }
.lab.bubble { background: rgba(246,242,234,.92); color: #1f1a15; font-weight: 400; }

/* sheets */
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 82vh; overflow: auto; background: var(--panel); color: var(--ink);
  border-radius: 18px 18px 0 0; padding: 18px max(16px, env(safe-area-inset-right, 0px)) calc(20px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  box-shadow: 0 -10px 40px rgba(0,0,0,.45); z-index: 10; overscroll-behavior: contain; }
.sheet .inner { max-width: 640px; margin: 0 auto; display: grid; gap: 14px; }
.sheet h2 { font-size: 1.25rem; }
.sheet h3 { font-size: 1rem; }
.sheet .muted { color: var(--muted); }
.sheet .small { font-size: .875rem; }
.sheet label { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; }
.sheet input, .sheet textarea, .sheet select { font: 1rem var(--body); color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 11px; width: 100%; box-sizing: border-box; }
.sheet textarea { min-height: 84px; resize: vertical; }
.sheet a { color: var(--accent); }
.sheet .note { border-radius: 10px; padding: 10px 12px; background: var(--soft); font-size: .92rem; }
.sheet .log { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.sheet .log li { border-left: 2px solid var(--them); padding-left: 10px; overflow-wrap: anywhere; }
.sheet .side { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.sheet .eyebrow { font: 700 .875rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.sheet .stack { display: grid; gap: 10px; }
.sheet .choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.sheet .choice button { background: var(--soft); color: var(--ink); border-color: var(--line); text-align: left; border-radius: 12px; font-weight: 400; }
.sheet .choice button b { display: block; font-family: var(--display); }
.sheet .close { justify-self: end; }
/* the hearth: embers are small glowing dots; a chosen button is outlined */
.sheet .choice button.on, .sheet .dots button.on { border-color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.sheet .dots button { background: var(--soft); color: var(--ink); border-color: var(--line); min-width: 44px; min-height: 44px; display: inline-grid; place-items: center; padding: 6px 10px; }
.ember { display: inline-block; width: var(--s, 14px); height: var(--s, 14px); border-radius: 50%; vertical-align: middle; margin-right: 6px;
  background: radial-gradient(circle at 40% 38%, #fff6e0 0 18%, var(--c, #e2a85c) 55%, transparent 72%); box-shadow: 0 0 calc(var(--s, 14px) * .6) var(--c, #e2a85c); }
.sheet .dots .ember { margin: 0; }
.sheet .credit { font-size: .875rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; }
.scrim { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 9; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); top: calc(76px + env(safe-area-inset-top, 0px)); background: var(--panel); color: var(--ink);
  padding: 9px 14px; border-radius: 10px; font-size: .9rem; max-width: calc(100% - 32px); z-index: 20; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.loading { position: fixed; inset: 0; display: grid; place-items: center; text-align: center; padding: 24px; color: var(--glass-muted); }
.loading h1 { color: var(--glass-ink); font-size: 1.6rem; margin-bottom: 8px; }
@media (max-width: 420px) { .hud button { padding: 8px 12px; font-size: .875rem; } }
/* caption mode (round 4): words wait unseen, keeping their place, and come in a line at a time */
.cw { opacity: 0; transition: opacity .35s ease; }
.cw.on { opacity: 1; }
[data-reading] { cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .cw { transition: none; } }

/* Rooms, part 2: the Next card, the homeroom's sheets, look swatches */
.next { background: var(--glass); backdrop-filter: blur(6px); border-radius: 14px; padding: 8px 10px; display: grid; gap: 4px; max-width: 560px; }
.next .eyebrow { font: 700 .875rem/1 var(--body); letter-spacing: .08em; text-transform: uppercase; color: var(--glass-muted); }
.next button { text-align: left; background: transparent; color: var(--glass-ink); border: 0; padding: 4px 2px; font-weight: 400; border-radius: 8px; min-height: 0; }
.next button b { font-family: var(--display); }
.next button .lane { font-size: .875rem; color: var(--glass-muted); }
.next button .t { display: block; font-size: .875rem; color: var(--glass-muted); }
.next button.nmore { font-size: .875rem; padding-top: 2px; }
.sheet .roomrow { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--line); }
.sheet .roomrow > div:first-child { display: grid; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.sheet .roomrow > button { flex: none; }
.sheet .roomrow .row { flex: none; }
.sheet .dots { display: flex; flex-wrap: wrap; gap: 6px; }
.sheet .dots button { background: var(--soft); color: var(--ink); border-color: var(--line); font-weight: 400; border-radius: 999px; padding: 6px 12px; }
.sheet i.sw { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(0,0,0,.25); }
@media (max-width: 420px) { .sheet .roomrow { flex-direction: column; align-items: stretch; } }
/* part 3: the orientation's tick */
.sheet label.tick { display: flex; align-items: center; gap: 10px; }
.sheet label.tick input { width: 22px; height: 22px; margin: 0; flex: none; }

/* Part 4: the mirror. The screen is the glass: the picture flipped, an oval frame of the mirror's wood around it, the
   choices in a short strip below; the room's labels and tools step aside while you look. */
#mirrorFrame { display: none; position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top, 0px)); width: min(86vw, 46vh); height: 58vh;
  transform: translateX(-50%); border-radius: 50%; pointer-events: none; z-index: 5; border: 12px solid #6a4a30;
  box-shadow: 0 0 0 3px #3e2a1a, inset 0 0 0 3px #8a6a48, inset 0 0 70px rgba(184, 204, 216, .22), 0 0 0 100vmax rgba(14, 10, 8, .84);
  background: linear-gradient(118deg, transparent 22%, rgba(255,255,255,.08) 30%, transparent 38%, transparent 58%, rgba(255,255,255,.05) 62%, transparent 67%); }
body.mirroring #mirrorFrame { display: block; }
body.mirroring #stage canvas { transform: scaleX(-1); }
/* the breath: one fog on the glass between one touch and the changed reflection (touchMirror, garden.js) */
#mirrorBreath { display: none; position: fixed; left: 50%; top: calc(10px + env(safe-area-inset-top, 0px)); width: min(86vw, 46vh); height: 58vh;
  transform: translateX(-50%); border-radius: 50%; pointer-events: none; z-index: 4; opacity: 0; transition: opacity .5s ease-in;
  background: radial-gradient(ellipse at 50% 55%, rgba(236,242,246,.78), rgba(220,230,238,.55) 70%, rgba(220,230,238,.3)); backdrop-filter: blur(6px); }
body.mirroring #mirrorBreath { display: block; }
#mirrorBreath.on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { #mirrorBreath { transition-duration: .01s; } }
body.mirroring #labels, body.mirroring #hud { display: none !important; }
.sheet.dark { --panel: #1f1711; --ink: #f3ece2; --muted: #bcae9b; --line: #4a3a2c; --soft: #31251b; background: #1f1711; color: var(--ink); }
.sheet.mirror { max-height: 40vh; padding-top: 8px; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); border-top: 2px solid #6a4a30; }
.sheet.mirror .inner { gap: 6px; }
.mpanel { display: grid; gap: 6px; }
.mtabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; }
.mtabs::-webkit-scrollbar, .mchips::-webkit-scrollbar { display: none; }
.mtabs button { flex: none; background: transparent; color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 4px 5px; min-height: 34px; font-size: .875rem; }
.mtabs button.on { color: var(--ink); border-bottom-color: #e2a85c; }
.mchips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px 2px; }
.mchip { flex: none; display: grid; justify-items: center; gap: 3px; width: 62px; background: transparent; border: 0; color: var(--ink); padding: 0; min-height: 0; font-weight: 400; font-size: .875rem; line-height: 1.15; text-align: center; }
.mchip i { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); box-shadow: 0 0 0 2px rgba(255,255,255,.12); }
.mchip.on i { box-shadow: 0 0 0 3px #e2a85c, 0 0 16px rgba(226, 168, 92, .55); }
.mnote { font-size: .875rem; color: var(--muted); }
.mbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mstate { flex-basis: 100%; font-size: .875rem; color: #e2a85c; }
.mbar button { padding: 8px 12px; min-height: 38px; }

/* Sat at the hearth (Wendell, 2026-10-24): "Something stirs", the one strip left in the seated moment, is low and see-through
   with no scrim, the fire, the crescent and your seated figure showing through it. */
.sheet.seated { max-height: 44vh; background: linear-gradient(to top, rgba(22,15,10,.86), rgba(22,15,10,.58) 70%, rgba(22,15,10,.18));
  -webkit-backdrop-filter: blur(1.5px); backdrop-filter: blur(1.5px); box-shadow: none; border-radius: 0; padding-top: 22px; }
.sheet.seated .choice button { background: rgba(255,240,220,.08); }
.sheet.seated .row.close { justify-content: flex-end; }
body.seatedmoment .hud .bottom { display: none; }
/* The seated hearth moment, take A (garden.js hmBegin): no card. Its captions sit under the fire; the only words on screen
   besides them are two quiet links low by the fire, and the embers, lantern and hooks are buttons a keyboard or reader reaches. */
body.seatedmoment #labels, body.seatedmoment .hud .namecard { display: none; }
body.seatedmoment .mcap { top: auto; bottom: calc(22vh + env(safe-area-inset-bottom, 0px)); }
.hm { position: fixed; left: 0; right: 0; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); z-index: 5; display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.hm[hidden] { display: none; }
.hmrow { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; pointer-events: auto; }
.hm .hmlink { background: none; border: 0; box-shadow: none; padding: 10px 6px; min-height: 44px; color: rgba(251,239,220,.62); font: italic 400 1rem/1.2 var(--display);
  text-shadow: 0 1px 8px rgba(0,0,0,.8); letter-spacing: .01em; }
.hm .hmlink:hover, .hm .hmlink:focus-visible { color: #fbefdc; }
.hm .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; padding: 0; border: 0; }
.hm .sr:focus-visible { position: static; width: auto; height: auto; clip: auto; clip-path: none; padding: 8px 12px; border-radius: 10px; background: rgba(22,15,10,.7); color: #fbefdc; border: 1px solid #ffcf86; }

/* Part 4: the check-in, walked. The room stays in view, glowing in the feeling's colour. */
.sheet.walk { max-height: 58vh; }
.sheet.walk label { display: block; }   /* the reading pace wraps each word in a span; in a grid every word became its own row and pushed the body scan off the screen */
.sheet.walk label > input, .sheet.walk label > span:last-child:not(.cw) { margin-top: 6px; }
.sheet.walk label > input { display: block; width: 100%; }
body.quiethud .hud .bottom { display: none; }
.sheet .feels { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet .feels button { background: var(--soft); color: var(--ink); border-color: var(--line); font-weight: 400; display: inline-flex; align-items: center; gap: 2px; min-height: 48px; }
.sheet .feels button.on { border-color: #e2a85c; box-shadow: inset 0 0 0 2px #e2a85c; }
.wave h2 { color: var(--c); font-size: 1.5rem; }
.wave .wline { font: 500 1.15rem/1.45 var(--display); }
.wdots { display: flex; gap: 10px; padding: 4px 0; }
.wdots i { width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--c); }
.wdots i.on { background: var(--c); }
.wdots i.now { background: var(--c); box-shadow: 0 0 10px var(--c); transform: scale(1.3); }
.emberbig { display: grid; place-items: center; padding: 6px 0; }
.emberbig .ember { margin: 0; animation: emberBreath 4s ease-in-out infinite; }
@keyframes emberBreath { 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .emberbig .ember { animation: none; } }
/* spirits: each a small glowing orb in its element's colour */
.spiritcard { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.spiritcard > div { display: grid; gap: 2px; min-width: 0; flex: 1; overflow-wrap: anywhere; }
.spiritcard > button { flex: none; }
.spiritcard .orb { flex: none; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 38% 34%, #fff6e0 0 12%, var(--c) 55%, transparent 74%); box-shadow: 0 0 16px var(--c); }
.tembers { display: inline-flex; gap: 2px; margin-left: 6px; vertical-align: middle; }
.tembers .ember { margin: 0; }

/* the satchel (room kit, Still A): a small tray of what you have earned. Tap one, then a glowing spot that fits it. */
.satchel { background: var(--glass); backdrop-filter: blur(6px); border-radius: 14px; padding: 8px; max-width: 640px; }
.satchel[hidden] { display: none; }
.satrow { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.satrow::-webkit-scrollbar { display: none; }
.hud .satitem { flex: none; display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 12px 6px 8px; border-radius: 12px;
  background: #2c1f2c; color: var(--glass-ink); border: 1px solid rgba(255,255,255,.16); font-size: .88rem; white-space: nowrap; }
.satitem svg { width: 26px; height: 26px; flex: none; }
.hud .satitem[aria-pressed="true"] { border-color: #ffcf86; box-shadow: 0 0 0 1px #ffcf86, 0 0 14px rgba(255,207,134,.4); }
.satnone { color: var(--glass-muted); font-size: .875rem; padding: 0 6px; }
.satpouch { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.12); }
.satlab { display: block; color: var(--glass-muted); font-size: .8125rem; letter-spacing: .02em; padding: 0 2px 6px; }
.satpouch ul.satrow { list-style: none; margin: 0; padding: 0; }
.satkeep { flex: none; display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 12px 4px 6px; border-radius: 12px;
  background: rgba(255,207,134,.07); color: var(--glass-ink); border: 1px solid transparent; font-size: .88rem; white-space: nowrap; cursor: default; }
.satkeep svg { width: 24px; height: 24px; flex: none; }
.satrow .glassbtn { flex: none; margin-left: auto; }

/* ---------- room kit, part 2: the first minute's captions and the scroll (homeroom kit, Stills B and C) ---------- */
:root { --paper: #efe2c4; --paper-edge: #d6c19a; --paper-ink: #3a2618; --plum: #9a5a8e; --teal: #3f9e93;
  --hand: "Caveat", "Segoe Print", "Bradley Hand", cursive; --scroll-display: "Marcellus", Georgia, serif; }
/* the minute's caption: the still's own line, large and quiet, over the room */
.mcap { position: fixed; left: 50%; transform: translateX(-50%); top: calc(28vh + env(safe-area-inset-top, 0px)); z-index: 6;
  width: min(560px, calc(100vw - 32px)); text-align: center; pointer-events: none; transition: opacity .9s ease; }
.mcap p { font: italic 400 clamp(1.25rem, 5.4vw, 1.8rem)/1.3 var(--display); color: #fbefdc; text-shadow: 0 2px 14px rgba(0,0,0,.85), 0 0 2px rgba(0,0,0,.7); }
.mcap.out { opacity: 0; }
.mcap .cw { opacity: 0; transition: opacity .5s; } .mcap .cw.on { opacity: 1; }
/* what glows: the satchel while the mirror waits in it */
.hud button.glassbtn.glow, .hud .satitem.glow { border-color: #ffcf86; box-shadow: 0 0 0 1px #ffcf86, 0 0 18px rgba(255,207,134,.55); animation: rkglow 2.2s ease-in-out infinite; }
@keyframes rkglow { 50% { box-shadow: 0 0 0 1px #ffcf86, 0 0 4px rgba(255,207,134,.2); } }
/* the scroll: rods, paper, the seal; it unrolls and rolls back up */
.paper { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; align-content: center; gap: 14px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 16px calc(18px + env(safe-area-inset-bottom, 0px));
  background: radial-gradient(120% 80% at 50% 30%, rgba(40,22,30,.82), rgba(10,6,10,.94)); overflow-y: auto; }
.paper .scroll { width: min(420px, 100%); position: relative; filter: drop-shadow(0 14px 22px rgba(0,0,0,.55)); transition: transform .5s ease, opacity .5s ease; }
.paper .scroll.leaving { transform: translateY(-40px) scale(.6) rotate(-8deg); opacity: 0; }
.paper .rod { height: 22px; border-radius: 11px; background: linear-gradient(#8a5a36, #5a3620 60%, #3e2414); position: relative; z-index: 2; }
.paper .rod::before, .paper .rod::after { content: ""; position: absolute; top: -4px; width: 18px; height: 30px; border-radius: 8px; background: linear-gradient(#c79a5a, #7a5230); }
.paper .rod::before { left: -8px; } .paper .rod::after { right: -8px; }
.paper .psheet { background: linear-gradient(90deg, rgba(120,80,40,.18), transparent 8%, transparent 92%, rgba(120,80,40,.18)), linear-gradient(var(--paper), #e6d4ae);
  color: var(--paper-ink); margin: 0 10px; overflow: hidden; max-height: 0; transition: max-height .9s cubic-bezier(.3,.8,.3,1); }
.paper .scroll.open .psheet { max-height: 640px; }
.paper .pin { padding: 22px 22px 30px; display: grid; gap: 12px; font: 500 1.45rem/1.25 var(--hand); }
.paper .from { font: 400 .9rem/1.3 var(--scroll-display); letter-spacing: .08em; text-transform: uppercase; color: #7a5a3a; }
.paper .pnote { font: .9rem/1.4 var(--body); color: #6a4a32; }
.paper .when { display: flex; flex-wrap: wrap; gap: 8px; }
.paper .when button { font: 500 1.15rem/1.1 var(--hand); background: transparent; border: 1.5px dashed #a98a62; color: var(--paper-ink); border-radius: 999px; padding: 4px 12px; min-height: 36px; }
.paper .when button[aria-pressed="true"] { border-style: solid; background: rgba(255,154,82,.22); border-color: #c06a2a; }
.paper input.hand, .paper .hand { font: 500 1.45rem/1.25 var(--hand); color: #6a4a32; }
.paper input.hand { background: transparent; border: 0; border-bottom: 1.5px dotted #a98a62; border-radius: 0; padding: 2px 0; width: 100%; outline: none; }
.paper input.hand::placeholder { color: #a98a62; opacity: .8; }
.paper input.hand:focus { border-bottom-style: solid; border-bottom-color: #c06a2a; }
.paper .ribbons { display: flex; flex-wrap: wrap; gap: 10px; }
.paper .ribbon { font: 400 .95rem var(--scroll-display); letter-spacing: .06em; color: #fff7ea; border: 0; border-radius: 0; min-height: 40px;
  padding: 8px 18px 8px 14px; clip-path: polygon(0 0, 100% 0, 92% 50%, 100% 100%, 0 100%); }
.paper .ribbon.yes { background: var(--teal); } .paper .ribbon.later { background: #b0803c; } .paper .ribbon.no { background: #6c5a62; }
.paper .seal { position: absolute; right: 26px; bottom: -26px; width: 64px; height: 64px; min-height: 0; padding: 0; border-radius: 50%; border: 0; z-index: 3;
  background: radial-gradient(circle at 38% 32%, color-mix(in srgb, var(--seal, var(--plum)) 55%, #fff), var(--seal, var(--plum)) 55%, color-mix(in srgb, var(--seal, var(--plum)) 60%, #000));
  color: #fbf0e6; font: 400 1.4rem var(--scroll-display); box-shadow: inset 0 -3px 6px rgba(0,0,0,.35), 0 4px 10px rgba(0,0,0,.35); }
.paper .seal:disabled { opacity: 1; filter: saturate(.6) brightness(.85); }
.paper .phint { font: .9rem/1.4 var(--body); color: #e8d8c4; text-align: center; min-height: 1.3em; margin-top: 18px; }
.paper .pclose { background: transparent; color: #d8c8b4; border-color: rgba(255,255,255,.25); }
/* the small calendar drawn on the paper */
.paper .cal { border: 1.5px dashed #a98a62; border-radius: 10px; padding: 8px; font: 500 1.05rem/1 var(--hand); }
.paper .calhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.paper .calnav { background: transparent; border: 0; color: var(--paper-ink); font: 700 1.3rem var(--hand); min-height: 32px; padding: 0 10px; }
.paper .calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.paper .calgrid .dow { color: #7a5a3a; font-size: .95rem; padding: 2px 0; }
.paper .calgrid .day { background: transparent; border: 0; color: var(--paper-ink); font: 500 1.1rem/1 var(--hand); min-height: 34px; padding: 0; border-radius: 50%; }
.paper .calgrid .day:disabled { color: #b8a284; opacity: 1; }
.paper .calgrid .day.today { text-decoration: underline; }
.paper .calgrid .day[aria-pressed="true"] { background: rgba(255,154,82,.3); box-shadow: 0 0 0 1.5px #c06a2a; }
@media (prefers-reduced-motion: reduce) { .paper .psheet, .paper .scroll, .mcap { transition: none; } .hud button.glassbtn.glow, .hud .satitem.glow { animation: none; } }
/* the mirror's one question: written by hand, kept with your goals */
.sheet.mirror .hope textarea.hand { font: 500 1.35rem/1.2 var(--hand); min-height: 64px; }
.sheet.mirror .hope .hask { font: 700 1rem/1.35 var(--display); display: block; }
.sheet.mirror .hope .hask label { display: inline; }
.sheet.mirror .hope textarea.hand { width: 100%; box-sizing: border-box; }

/* The council's scroll (stills round 2026-11-03-council-scroll-ad1): dark rods, a six-sided seal with a trim, the nuggets */
.paper .scroll.council .rod { background: linear-gradient(#4a3c5e, #2a2238 60%, #1a1424); }
.paper .scroll.council .rod::before, .paper .scroll.council .rod::after { background: linear-gradient(#ffcf4a, #b07a06); }
.paper .seal.council { border-radius: 0; clip-path: polygon(25% 3%, 75% 3%, 100% 50%, 75% 97%, 25% 97%, 0 50%); box-shadow: none;
  background: radial-gradient(circle at 38% 32%, color-mix(in srgb, var(--seal) 55%, #fff), var(--seal) 55%, color-mix(in srgb, var(--seal) 60%, #000));
  outline: 3px solid var(--trim); outline-offset: -6px; font-size: 1.6rem; }
.paper .seal.council:disabled { filter: brightness(.94); } /* broken, but the gold stays saturated (his note on ug-scroll-look-1) */
.paper .scroll.council .pin { gap: 14px; }
.paper .nug { display: grid; gap: 4px; padding-bottom: 12px; border-bottom: 1px solid rgba(120,80,40,.22); }
.paper .nug .meta { font: 400 .74rem/1.3 var(--scroll-display); letter-spacing: .08em; text-transform: uppercase; color: #7a5a3a; }
.paper .nug .hand { font-size: 1.32rem; line-height: 1.2; color: #4a2e1c; }
.paper .nug .why, .paper .nug .kept { font: .88rem/1.4 var(--body); color: #5a3e2a; }
.paper .nug .went { font: 700 .86rem/1.4 var(--body); color: #2f6f68; }
.paper .nug .went::before { content: "\2192\00a0"; }
.paper .nug .move { font: .9rem/1.45 var(--body); color: #3a2618; background: rgba(255,255,255,.28); padding: 8px 10px; border-radius: 6px; }
.paper .compost { font: .86rem/1.45 var(--body); color: #6a4a32; border-top: 1.5px dashed #b89a6e; padding-top: 10px; }

/* the check-in's breath ring (shared charge engine, FR-009): 4s in, 6s out; the delay starts it where the breath already is */
.breath { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 0 6px; }
.breath i { display: block; width: 84px; height: 84px; border-radius: 50%; background: radial-gradient(circle, var(--c) 0%, transparent 70%); box-shadow: inset 0 0 0 2px var(--c); transform: scale(.55); opacity: .85; }
.breath.in i { animation: breathIn var(--in) linear forwards; animation-delay: calc(var(--el) * -1); }
.breath.out i { animation: breathOut var(--out) linear forwards; animation-delay: calc((var(--el) - var(--in)) * -1); }
.breath.done i { transform: scale(.55); }
.breath span { font-size: .9rem; color: var(--muted, #b9a995); }
@keyframes breathIn { from { transform: scale(.55); } to { transform: scale(1); } }
@keyframes breathOut { from { transform: scale(1); } to { transform: scale(.55); } }
@media (prefers-reduced-motion: reduce) { .breath i { animation: none !important; transform: scale(.8); } }
.dirs { display: flex; flex-wrap: wrap; gap: 8px; }
.dirs button.on { box-shadow: 0 0 0 2px var(--c, #e8c98a); }
