/* The swamp and its rooms. The house's tokens (--bg, --ink, --heading, --subhead, --muted, --card, --cardLine, --link,
   --strand) come from strand.css and follow the sun; everything here builds on them. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); }
body.fading .veil, body.fading::after { opacity: 1; }
body::after { content: ""; position: fixed; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .7s ease; z-index: 50; }

/* ---- the thumb pad: walking on a phone (Eden and the Updraft) ---- */
.thumbpad { position: absolute; left: 18px; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); width: 112px; height: 112px; border-radius: 50%;
            border: 1px solid rgba(255,255,255,.3); background: rgba(10,8,14,.35); display: none; touch-action: none; }
.thumbpad .nub { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: rgba(228,226,238,.55); }
@media (pointer: coarse) { .thumbpad { display: block; } }

/* ---- a room past Eden's doors ---- */
.swamp-room { min-height: 100%; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; padding: 22px 16px calc(28px + env(safe-area-inset-bottom, 0px)); }
/* on a phone the light switch and the sunset button sit at the top left: the room's name starts below them */
@media (max-width: 560px) { .swamp-room { padding-top: 66px; } }
.swamp-room .sr-head { text-align: center; margin-bottom: 10px; }
.swamp-room h1 { margin: 0; font-size: clamp(28px, 5vw, 40px); }
.swamp-room .sr-line { margin: 4px 0 0; color: var(--subhead); font-style: italic; }
.swamp-room .activity { width: 100%; max-width: 1000px; flex: 1; display: flex; flex-direction: column; align-items: center; }
.swamp-room .quiet { color: var(--muted); font-style: italic; text-align: center; }
.swamp-room .way-out { margin: 18px 0 0; }

/* The Almanac (6 Oct 2026): an almanac's page. Facts in short sections ruled with the strand's grey, the age set large and
   ticking in figures that do not jump about as they change */
.swamp-room .alm-note { max-width: 620px; margin: 4px auto 6px; text-align: center; color: var(--muted); font-style: italic; }
.swamp-room .alm { width: 100%; max-width: 620px; box-sizing: border-box; margin: 12px auto 0; padding: 14px 4px 4px; border-top: 1px solid rgba(var(--strand), .5); }
.swamp-room .alm h2 { margin: 0 0 8px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--subhead); }
.swamp-room .alm-age { margin: 0; font-size: clamp(21px, 3.8vw, 30px); line-height: 1.35; color: var(--heading); font-variant-numeric: tabular-nums; }
.swamp-room .alm-small { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.swamp-room .alm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; line-height: 1.5; font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { body::after { transition: none; } }

/* ---- the Endless Number ---- */
.digits-view { width: min(92vw, 640px); height: min(92vw, 640px); max-height: 62vh; touch-action: manipulation; cursor: pointer; }
.digits-line { font: 22px/1.4 Georgia, serif; letter-spacing: .06em; margin: 10px 0 0; max-width: 92vw; overflow: hidden; white-space: nowrap; text-overflow: clip; direction: rtl; text-align: center; }
/* the line is right-to-left only so an overflow clips the oldest digits; the number inside reads left to right as one piece */
.digits-line .num { direction: ltr; unicode-bidi: isolate; }
.digits-depth { color: var(--muted); margin: 4px 0 10px; }
.digits-ctl { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.digits-hint { color: var(--muted); font-style: italic; font-size: 15px; }

/* ---- the Fridge ---- */
.fridge { width: 100%; display: grid; gap: 18px; }
.door { min-height: 300px; display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 14px 10px; padding: 22px 18px;
        border-radius: 18px 18px 10px 10px; background: linear-gradient(160deg, #e9e6e0, #cfcac2); box-shadow: inset 0 0 0 2px rgba(0,0,0,.08), 0 10px 26px rgba(0,0,0,.28); }
:root[data-theme="dark"] .door { background: linear-gradient(160deg, #3a3842, #2a2830); }
.door .note { transform: translate(var(--nx), var(--ny)) rotate(var(--tilt)); opacity: var(--fade); display: flex; flex-direction: column; gap: 3px; align-self: start;
              background: none; border: 0; border-radius: 0; padding: 0; margin: 0; font-size: inherit; }   /* the house's .note card is for pieces */
.door .line { display: flex; flex-wrap: wrap; gap: 3px; }
.mag { font: 16px/1 Georgia, serif; color: #1c1a17; background: #fbfaf6; border: 0; border-radius: 2px; padding: 5px 7px 6px; box-shadow: 0 1px 2px rgba(0,0,0,.35); cursor: pointer; text-shadow: none; }
.mag-end { background: #f3e7ff; } .mag-mark { background: #e4efff; font-weight: 700; }
.compose { background: var(--card); border: 1px solid var(--cardLine); border-radius: 14px; padding: 12px 14px; }
.compose .row { min-height: 40px; display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 0; border-bottom: 1px dashed var(--cardLine); }
.compose .hint { color: var(--muted); font-style: italic; }
.compose-ctl { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 10px; }
.compose .said { margin: 8px 0 0; color: var(--subhead); font-style: italic; min-height: 1.3em; }
.drawers .tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.drawers .tabs button { font: 15px Georgia, serif; color: var(--ink); background: var(--card); border: 1px solid var(--cardLine); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.drawers .tabs button[aria-selected="true"] { border-color: var(--heading); color: var(--heading); }
.drawers .find { display: flex; gap: 8px; align-items: center; margin: 10px 0; color: var(--muted); }
.drawers .find input { font: 16px Georgia, serif; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(var(--strand), .6); background: var(--bg); color: var(--ink); }
.drawers .tray { display: flex; flex-wrap: wrap; gap: 5px; max-height: 240px; overflow: auto; padding: 4px; }

/* ---- the Night Sky ---- */
.sky-view { width: 100%; height: min(62vh, 560px); border-radius: 14px; display: block; cursor: crosshair; touch-action: manipulation; }
.sky-ctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; margin: 10px 0; }
.sky-count { margin: 0 8px 0 0; color: var(--subhead); }
.sky-name { width: 100%; max-width: 640px; background: var(--card); border: 1px solid var(--cardLine); border-radius: 14px; padding: 12px 14px; }
.sky-name .chosen { font-weight: 700; color: var(--heading); cursor: pointer; }
.sky-name .name-find { display: flex; gap: 8px; align-items: center; color: var(--muted); margin: 8px 0; }
.sky-name .name-find input { font: 16px Georgia, serif; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(var(--strand), .6); background: var(--bg); color: var(--ink); }
.sky-name .name-words { display: flex; flex-wrap: wrap; gap: 5px; min-height: 8px; margin-bottom: 10px; }
.sky-name .said { color: var(--subhead); font-style: italic; min-height: 1.3em; }
/* a button that cannot be used yet looks it (the house's .btn has no disabled look) */
.swamp-room .btn:disabled { opacity: .45; cursor: default; }

/* ---- the Breathing Room ---- */
.breath { position: relative; width: min(80vw, 420px); height: min(80vw, 420px); margin: 10px auto; }
.breath .light { position: absolute; top: 50%; width: 46%; height: 46%; margin-top: -23%; border-radius: 50%;
                 background: radial-gradient(circle, rgba(255,246,220,1) 0%, rgba(190,92,255,.55) 45%, rgba(190,92,255,0) 72%); }
.breath .light.you { left: 27%; }
.breath .light.other { left: 58%; }
.breath .light[hidden] { display: none; }
.breath-word { font: 22px Georgia, serif; color: var(--subhead); margin: 6px 0; }
.breath-note { color: var(--muted); font-style: italic; font-size: 15px; text-align: center; max-width: 520px; }

/* ---- the House, Upside Down ---- */
.upside { width: 100%; height: min(74vh, 900px); border-radius: 14px; overflow: hidden; border: 1px solid var(--cardLine); background: var(--bg); }
.upside-house { display: block; width: 100%; height: 100%; border: 0; transform: rotate(180deg); background: var(--bg); }
.upside-note { color: var(--muted); font-style: italic; font-size: 15px; text-align: center; margin: 10px 0 0; }

/* ---- the Curiosity Cabinet: a wooden cabinet of small drawers, each with a brass plate like the house's frames ---- */
.cab-note { color: var(--subhead); font-style: italic; text-align: center; margin: 0 0 14px; max-width: 640px; }
.cabinet { list-style: none; margin: 0; padding: 16px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; width: 100%; max-width: 980px; box-sizing: border-box;
           background: linear-gradient(135deg, #6b4a2f, #4a321f 45%, #5d3f27 70%, #3c2816); border-radius: 10px;
           box-shadow: inset 0 0 0 3px rgba(0,0,0,.35), 0 18px 36px rgba(0,0,0,.4); }
.cabinet li { display: block; min-width: 0; }
.drawer { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; min-height: 96px; height: 100%; box-sizing: border-box;
          padding: 10px 8px 12px; text-decoration: none; border-radius: 4px; background: linear-gradient(180deg, #8a6240, #6f4c30);
          box-shadow: inset 0 1px 0 rgba(255,255,255,.18), inset 0 -2px 0 rgba(0,0,0,.3), 0 2px 3px rgba(0,0,0,.4); transition: transform .2s ease, box-shadow .2s ease; }
.drawer:hover, .drawer:focus-visible { transform: translateY(4px) scale(1.04); box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 9px 16px rgba(0,0,0,.5); outline: 2px solid #BE5CFF; outline-offset: 2px; }
.drawer .plate { font: 13px/1.3 Georgia, serif; color: #2b2114; text-align: center; background: linear-gradient(#e2c98f, #a98b4f); padding: 5px 7px; border-radius: 2px;
                 box-shadow: 0 1px 2px rgba(0,0,0,.45); overflow-wrap: anywhere; }
.drawer .knob { width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f0d48c, #8c6a2b); box-shadow: 0 1px 2px rgba(0,0,0,.5); }
.cab-small { color: var(--muted); font-size: 14px; text-align: center; margin: 14px 0 0; max-width: 640px; }
@media (max-width: 760px) { .cabinet { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 430px) { .cabinet { grid-template-columns: repeat(2, 1fr); padding: 10px; gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .drawer { transition: none; } .drawer:hover, .drawer:focus-visible { transform: none; } }

/* ---- the Secret Library (8 Oct 2026, his words: "the secret library should list the stories just like the article posts
   on other pages"): the house's own list of pieces (.pieces, in strand.css), numbered in the order the stories came in,
   newest first, each with its cover where it has one (his ask: "like the hero of the story") and a plain cloth cover in
   the house's colours where it has none, and a library's coloured sticker for its kind. A story opens as a page of paper. ---- */
.lib-note { color: var(--subhead); font-style: italic; text-align: center; margin: 0 0 14px; max-width: 640px; }
/* who made these (10 Oct 2026, his ask: say it is directly by AI, and to come with an open mind) */
.ai-note { max-width: 640px; margin: 0 auto 18px; padding: 14px 18px; border: 1px solid var(--hair); border-radius: 12px; text-align: center; font-size: 15.5px; line-height: 1.6; color: var(--ink); text-wrap: pretty; }
.ai-line { margin: 6px 0 0; color: var(--muted); font: italic 14px/1.45 Georgia, serif; }
.shelf-wrap { width: 100%; max-width: 760px; }
.shelf-wrap[hidden], .lib-note[hidden] { display: none; }
.pieces.stories a.with-pic { grid-template-columns: 96px minmax(0, 1fr); }
.pieces.stories .pic.cover { padding: 0; width: 96px; height: 128px; overflow: hidden; border-radius: 2px 4px 4px 2px; box-shadow: 0 6px 14px rgba(0,0,0,.35); }
.pieces.stories .pic.cover img { width: 100%; height: 100%; object-fit: cover; }
/* the plain cloth cover: the title in silver, the kind's sticker at the foot */
.pieces.stories .pic.drawn.cover { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  box-sizing: border-box; padding: 12px 9px 22px; border: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(0,0,0,0) 12%, rgba(255,255,255,.07) 30%, rgba(0,0,0,0) 60%), var(--cloth, #3b2463); }
.pieces.stories .pic.drawn.cover::before { content: ""; position: absolute; inset: 6px; border: 1px solid rgba(220,214,240,.45); border-radius: 1px; }
.pieces.stories .pic.drawn.cover .ct { font: 600 12.5px/1.2 Georgia, serif; letter-spacing: .02em; color: #e8e4f4; text-align: center; hyphens: auto; -webkit-hyphens: auto; }
.pieces.stories .pic.drawn.cover .sticker { position: absolute; bottom: 10px; left: 50%; margin-left: -6.5px; }
.pieces.stories .meta .sticker { width: 11px; height: 11px; margin-right: 6px; vertical-align: -1px; }
/* the kind's sticker, a library label */
.sticker { display: inline-block; width: 13px; height: 13px; border-radius: 50%; vertical-align: -2px; box-shadow: 0 1px 1px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.35); }
.sticker.k-quiet { background: #f1e6cf; } .sticker.k-fable { background: #6fa36a; } .sticker.k-spirit { background: #BE5CFF; }
.sticker.k-question { background: #538CE9; } .sticker.k-far { background: radial-gradient(circle at 35% 35%, #e6f7ff, #8fb8c8); }
.sticker.k-dark { background: #0d0b0e; box-shadow: 0 0 0 1.5px #b3263a, 0 1px 1px rgba(0,0,0,.45); }
/* a story that came in this week says so (shelf.js adds it) */
.new-tag { display: inline-block; margin-left: 4px; padding: 1px 7px 2px; border-radius: 999px; font-size: 11px; letter-spacing: .08em; color: var(--bg); background: var(--heading); }
.kinds { list-style: none; width: 100%; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; color: var(--muted); font-size: 15px; }
.kinds .sticker { margin-right: 6px; }
.book-head .kind { margin: 6px 0 0; color: var(--muted); font-size: 15px; }
.book-head .kind .sticker { margin-right: 7px; }
.book-head .no { margin: 0 0 6px; color: var(--muted); font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; }
.book { width: 100%; max-width: 680px; box-sizing: border-box; background: var(--card); border: 1px solid var(--cardLine); border-radius: 14px;
        padding: 24px clamp(18px, 5vw, 34px) 18px; box-shadow: 0 14px 30px rgba(0,0,0,.25); scroll-margin-top: 12px; }
.book[hidden] { display: none; }
/* the story's cover, at the top of the open book the way a hero sits at the top of an article */
.book-cover { margin: 0 auto 18px; max-width: min(100%, 420px); }
.book-cover img { display: block; width: 100%; height: auto; border-radius: 3px; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.book-head { text-align: center; margin-bottom: 14px; }
.book-head h2 { margin: 0; font-size: clamp(26px, 4.6vw, 34px); }
.book-head h2:focus { outline: none; }
.book-head .by { margin: 4px 0 0; color: var(--muted); font-style: italic; }
.book .page { font: 19px/1.7 Georgia, serif; min-height: 40vh; }
.book .page:focus { outline: none; }
.book .page p { margin: 0 0 1em; }
.turn { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--cardLine); padding-top: 14px; margin-top: 8px; }
.turn .count { color: var(--muted); font-size: 15px; }
.book .back { text-align: center; margin: 12px 0 0; }
.book .to-shelf.done { border-color: var(--heading); color: var(--heading); }
@media (max-width: 480px) { .pieces.stories a.with-pic { grid-template-columns: 72px minmax(0, 1fr); } .pieces.stories .pic.cover { width: 72px; height: 96px; }
  .pieces.stories .pic.drawn.cover { padding: 10px 6px 20px; } .pieces.stories .pic.drawn.cover .ct { font-size: 9.5px; letter-spacing: 0; } .book .page { font-size: 18px; } }

/* ---- the Updraft: a second pair of glasses (feathered), then the sky ---- */
.glasses-table.second { margin: 0; }
.glasses-table.second svg { width: 260px; max-width: 80vw; height: auto; display: block; margin: 8px auto; overflow: visible; }
.glasses-table.second .table, .glasses-table.second .g3d-arm { fill: none; stroke: rgb(var(--strand)); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.glasses-table.second .g3d-frame { fill: #f3ede2; stroke: rgb(var(--strand)); stroke-width: 2.4; stroke-linejoin: round; }
.glasses-table.second .g3d-red { fill: rgba(232, 62, 80, .78); stroke: #a8202f; stroke-width: 1.4; }
.glasses-table.second .g3d-blue { fill: rgba(46, 163, 224, .78); stroke: #1c6f9e; stroke-width: 1.4; }
.glasses-table.second .feather { fill: rgba(190,92,255,.22); stroke: var(--heading); stroke-width: 1.6; stroke-linejoin: round; }
.glasses-table.second .quill { fill: none; stroke: var(--heading); stroke-width: 1.2; stroke-linecap: round; }
.up-line { text-align: center; color: var(--ink); max-width: 560px; }
.up-help, .up-no3d { text-align: center; color: var(--muted); font-style: italic; font-size: 15px; max-width: 560px; }
.up-sky { position: fixed; inset: 0; z-index: 20; background: #000; }
.up-sky[hidden] { display: none; }
.up-view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; outline: none; }
.up-off { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); }
.up-tip { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); margin: 0; width: min(92vw, 560px);
          color: #e8e2d6; font: 15px Georgia, serif; text-align: center; text-shadow: 0 1px 6px rgba(0,0,0,.85); transition: opacity 1.2s; pointer-events: none; }
.up-tip.gone { opacity: 0; }
/* the loops game (17 Oct 2026): the score under the glasses button, a +10 or −5 that rises and fades, a soft flash at the
   edges when the bird bumps a roof, and the last flight's tally back in the room */
.up-score { position: absolute; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); margin: 0; white-space: nowrap;
            padding: 5px 14px; border-radius: 999px; background: rgba(14, 11, 26, .58); color: #f1edff; font: 600 16px/1.3 Fraunces, Georgia, serif; pointer-events: none; }
.up-best { color: #c9bfe6; font-weight: 400; }
.up-pop { position: absolute; left: 50%; top: 36%; transform: translate(-50%, 0); margin: 0; font: 700 36px Fraunces, Georgia, serif; opacity: 0; pointer-events: none;
          text-shadow: 0 2px 10px rgba(20, 12, 40, .8); transition: opacity .25s, transform .9s ease-out; }
.up-pop.on { opacity: 1; transform: translate(-50%, -26px); }
.up-pop.good { color: #e6d9ff; } .up-pop.bad { color: #b8b2c8; }
.up-sky.bumped::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 140px rgba(150, 118, 210, .9); animation: up-bump .5s ease-out forwards; }
@keyframes up-bump { from { opacity: 1; } to { opacity: 0; } }
.up-last { text-align: center; color: var(--subhead); font-style: italic; max-width: 560px; }
.up-last[hidden] { display: none; }

/* ---- the Emotional Weather Station ---- */
.wx-card { width: 100%; max-width: 640px; box-sizing: border-box; background: var(--card); border: 1px solid var(--cardLine); border-radius: 14px; padding: 20px clamp(16px, 4vw, 26px); }
.wx-lead { font: 600 22px/1.3 Fraunces, Georgia, serif; color: var(--heading); margin: 0 0 10px; text-align: center; }
.wx-lead:focus, .wx-big:focus, .wx-figure:focus { outline: none; }
.wx-big { font: 20px/1.5 Georgia, serif; margin: 0 0 10px; }
.wx-quiet { color: var(--muted); font-size: 15px; font-style: italic; }
.wx-more { margin: 14px 0 0; }
.wx-more summary { cursor: pointer; color: var(--muted); text-align: center; }
.wx-label { display: block; color: var(--muted); margin: 8px 0 6px; }
.wx-text { width: 100%; box-sizing: border-box; font: 16px/1.5 Georgia, serif; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(var(--strand), .6); background: var(--bg); color: var(--ink); resize: vertical; }
.wx-said { color: var(--subhead); font-style: italic; min-height: 1.3em; }
.wx-go { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 12px 0 0; }
.wx-go[hidden], .wx-go [hidden] { display: none; }
.wx-log { list-style: none; padding: 0; margin: 0 0 12px; display: flex; flex-direction: column; gap: 10px; max-height: 52vh; overflow: auto; }
.wx-log li { max-width: 85%; padding: 10px 14px; border-radius: 14px; font: 17px/1.5 Georgia, serif; }
.wx-station { white-space: pre-line; align-self: flex-start; background: color-mix(in srgb, var(--heading) 14%, var(--card)); border: 1px solid color-mix(in srgb, var(--heading) 35%, transparent); }
.wx-visitor { align-self: flex-end; background: var(--bg); border: 1px solid var(--cardLine); }
.wx-answer { display: flex; gap: 8px; }
.wx-answer input { flex: 1; min-width: 0; font: 17px Georgia, serif; padding: 9px 12px; border-radius: 10px; border: 1px solid rgba(var(--strand), .6); background: var(--bg); color: var(--ink); }
.wx-result { width: 100%; max-width: 780px; }
.wx-figure { margin: 0; }
.wx-figure svg { width: 100%; height: auto; display: block; border-radius: 18px; box-shadow: 0 14px 30px rgba(0,0,0,.3); }
.wx-care .wx-help { padding-left: 1.2em; } .wx-care .wx-help li { margin: 6px 0; font-size: 18px; }

/* ---- the Cairn ---- */
.clearing { position: relative; width: 100%; }
.cairn-view { width: 100%; height: min(60vh, 560px); display: block; border-radius: 14px; touch-action: none; }
.settling { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); border-radius: 14px; }
.settling[hidden] { display: none; }
.settling p { font: italic 20px Georgia, serif; color: var(--subhead); }
.shelf { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 12px 0 6px; }
.shelf .pick { font: 15px Georgia, serif; color: var(--ink); background: var(--card); border: 1px solid var(--cardLine); border-radius: 10px; padding: 7px 12px; cursor: pointer; }
.shelf .pick:hover, .shelf .pick:focus-visible { border-color: var(--heading); }
.hold-ctl { display: flex; gap: 8px; justify-content: center; margin: 6px 0; }
.hold-ctl[hidden] { display: none; }
.cairn-said { color: var(--subhead); font-style: italic; min-height: 1.3em; text-align: center; }
.cairn-days, .cairn-record { color: var(--muted); font-size: 15px; text-align: center; margin: 2px 0; max-width: 640px; }

/* ---- the Rabbit Hole (8 Oct 2026): Solina's reports, listed like the house's articles and laid out like one (strand.css
   .piece), each closing with where its receipt is in the Office ---- */
.research .article-body ol { padding-left: 1.4em; }
.research .article-body ol li { margin: 0 0 .7em; }
.research .receipt-line { margin-top: 2em; padding-top: 1em; border-top: 1px solid var(--cardLine); color: var(--muted); font-style: italic; }
.research .way-out { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 28px 0 44px; }
.research > .book-cover { margin: 24px auto 0; max-width: min(calc(100% - 32px), 380px); }
/* on a phone the light and sunset buttons float over the top left; a report without a cover starts below them (found 10 Oct 2026) */
@media (max-width: 640px) { .research > .article-hero:first-child { padding-top: 58px; } }

/* ---- Eden: the valley between the hidden rooms (docs/superpowers/specs/2026-10-10-eden-design.md) ---- */
.eden { position: fixed; inset: 0; overflow: hidden; }
.eden-view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.eden-view:active { cursor: grabbing; }
.eden .veil { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .7s ease; }
.eden-help { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); margin: 0; max-width: calc(100% - 32px);
  font: 14px/1.4 Georgia, serif; color: #ece6f6; background: rgba(12,10,22,.5); padding: 6px 14px; border-radius: 999px; text-align: center; transition: opacity 1.2s ease; pointer-events: none; }
.eden-help.gone { opacity: 0; }
/* on a phone the help line speaks of the pad, and sits at the top, clear of the pad and the buttons at the bottom */
.eden-help .for-touch { display: none; }
@media (pointer: coarse) { .eden-help { bottom: auto; top: calc(64px + env(safe-area-inset-top, 0px)); width: max-content; } .eden-help .for-keys { display: none; } .eden-help .for-touch { display: inline; } }
.doors-nav { position: absolute; top: 12px; right: 12px; max-height: calc(100% - 24px); overflow: auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.doors-nav ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.doors-nav button, .doors-nav summary { font: 14px Georgia, serif; color: #ece6f6; background: rgba(12,10,22,.55); border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
  padding: 7px 14px; cursor: pointer; text-align: left; }
.doors-nav summary { list-style: none; width: max-content; margin-left: auto; }
.doors-nav summary::-webkit-details-marker { display: none; }
.doors-nav summary::after { content: " \25BE"; } .doors-nav details[open] summary::after { content: " \25B4"; }
.doors-nav button:hover, .doors-nav button:focus-visible, .doors-nav summary:hover, .doors-nav summary:focus-visible { border-color: #BE5CFF; outline: none; }
/* the way straight out and the flight speed (his asks, 15 Oct 2026): beside the light switch on a desk, top right on a phone */
.eden-ways { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); left: 120px; display: flex; gap: 6px; align-items: center; }
.eden-ways a, .eden-ways .fly-speed { font: 14px Georgia, serif; color: #ece6f6; background: rgba(12,10,22,.55); border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px; padding: 7px 14px; text-decoration: none; white-space: nowrap; }
.eden-ways .fly-speed { display: inline-flex; align-items: center; gap: 2px; padding: 3px 6px 3px 14px; cursor: pointer; }
.eden-ways select { font: inherit; color: inherit; background: transparent; border: 0; padding: 4px 2px; cursor: pointer; }
.eden-ways select option { color: #1a1426; background: #f3eefc; }
.eden-ways a:hover, .eden-ways a:focus-visible, .eden-ways .fly-speed:hover, .eden-ways .fly-speed:focus-within { border-color: #BE5CFF; outline: none; }
.eden-ways .fs-short { display: none; }
@media (pointer: coarse) { .eden-ways .fs-long { display: none; } .eden-ways .fs-short { display: inline; } }
/* on a phone the open list of doors can reach the top; the row steps aside until it shuts */
@media (pointer: coarse) { .eden:has(.door-list[open]) .eden-ways { display: none; } }
@media (pointer: coarse) { .eden-ways { left: auto; right: 10px; gap: 4px; } .eden-ways a, .eden-ways .fly-speed { font-size: 13px; } .eden-ways a { padding: 7px 11px; } .eden-ways .fly-speed { padding-left: 11px; } }
.eden-map { position: absolute; left: 12px; top: calc(68px + env(safe-area-inset-top, 0px)); margin: 0; width: min(340px, 72vw); max-height: calc(100% - 140px); padding: 10px; box-sizing: border-box;
  background: rgba(12,10,22,.62); border: 1px solid rgba(255,255,255,.2); border-radius: 14px; }
.eden-map[hidden] { display: none; }
.eden-map svg { display: block; width: 100%; height: auto; max-height: calc(100vh - 190px); }
.eden-map figcaption { font: 12px/1.3 Georgia, serif; color: #d8d0ea; text-align: center; margin-top: 6px; }
.eden-map .m-land { fill: rgba(167,163,196,.16); stroke: rgba(255,255,255,.25); stroke-width: 1.5; }
.eden-map .m-river { fill: none; stroke: #7f9bd0; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.eden-map .m-path { fill: none; stroke: #e8e4f2; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.eden-map .m-door { cursor: pointer; } .eden-map .m-door circle { fill: #e6d6ff; stroke: #6f5fa0; stroke-width: 2; }
.eden-map .m-door:hover circle, .eden-map .m-door:focus-visible circle { fill: #BE5CFF; } .eden-map .m-door:focus { outline: none; }
.eden-map .m-you path { fill: #ffffff; stroke: #3b2a63; stroke-width: 1.5; }
.doorbar { position: absolute; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); text-align: center; background: rgba(12,10,22,.62);
  border: 1px solid rgba(255,255,255,.2); border-radius: 16px; padding: 10px 16px 12px; max-width: calc(100% - 32px); box-sizing: border-box; }
.doorbar .door-name { margin: 0 0 8px; font: 600 19px/1.2 Fraunces, Georgia, serif; color: #f0e8ff; }
/* the name tag on its string, hung from the lintel of the door in front (Alice's bottle had a label) */
.hang-tag { position: absolute; left: 0; top: 0; pointer-events: none; font: italic 15px/1.2 Georgia, serif; color: #2a2238; background: #f3eff8; padding: 5px 11px 6px;
  border-radius: 3px 3px 10px 10px; box-shadow: 0 2px 6px rgba(0,0,0,.25); white-space: nowrap; margin: 0; translate: -50% 10px; }
.hang-tag::before { content: ""; position: absolute; left: 50%; bottom: 100%; width: 1px; height: 10px; background: rgba(243,239,248,.8); }
.hang-tag[hidden] { display: none; }
/* the thumb pad is the house's own (.thumbpad, shared with the Updraft) */
@media (pointer: coarse) { .doors-nav { top: auto; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); max-height: calc(100% - 72px - env(safe-area-inset-bottom, 0px)); } .doorbar { bottom: calc(246px + env(safe-area-inset-bottom, 0px)); } }
/* a phone held sideways is short: the door's name drops to the bottom, between the pad and the buttons */
@media (pointer: coarse) and (max-height: 500px) { .doorbar { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); } }
.eden .lost { position: absolute; inset: 0; overflow: auto; background: color-mix(in srgb, var(--bg) 94%, transparent); padding: 24px 16px 40px; z-index: 10; }
.eden .lost h2, .eden .lost > p { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.eden .lost ul { list-style: none; padding: 0; margin: 14px auto; max-width: 420px; display: grid; gap: 8px; }
.eden .lost .stay { display: block; margin: 18px auto 0; }
.eden .no3d { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; background: var(--bg); }
.eden .no3d[hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .eden .veil, .eden-help { transition: none; } }

/* the room's walls, peeled away strip by strip when the visitor arrives from the bottle (the visitor stays still while the
   world changes: Keshavarz and Hecht 2011); with less motion asked for, they fade */
.walls { position: fixed; inset: 0; display: flex; z-index: 30; perspective: 1100px; pointer-events: none; }
.walls span { flex: 1; transform-origin: 50% 100%; background: var(--bg) repeating-linear-gradient(90deg, rgba(var(--strand), .07) 0 2px, transparent 2px 26px);
  box-shadow: inset -1px 0 rgba(var(--strand), .18); }
.walls.peel span { animation: eden-peel .95s cubic-bezier(.45, 0, .8, .3) calc(var(--i) * 70ms) forwards; }
.walls.fade { transition: opacity .8s ease; opacity: 0; }
@keyframes eden-peel { 0% { transform: none; } 30% { transform: rotateX(-14deg); } 100% { transform: translateY(30%) rotateX(-80deg); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .walls.peel span { animation: none; } }

/* ---- the walk-around rooms (the Vigil, the Labyrinth, the Wizard's Lab; room3d.js, 12 Oct 2026): the room fills the
   screen, Back to Eden is always at hand, and the help line fades once you have moved ---- */
html.in-r3d, html.in-r3d body { overflow: hidden; }
.r3d { position: fixed; inset: 0; z-index: 30; background: #040309; color: #ece8f6; font: 15px/1.45 Georgia, serif; }
.r3d-view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.r3d-veil { position: absolute; inset: 0; background: #000; pointer-events: none; transition: opacity 1.6s ease; }
.r3d-veil.gone { opacity: 0; }
.r3d-back { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); left: 14px; z-index: 2; }
.r3d-help { position: absolute; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); margin: 0; padding: 8px 16px;
  border-radius: 999px; background: rgba(12, 10, 24, .62); backdrop-filter: blur(6px); max-width: min(92vw, 640px); text-align: center; transition: opacity 1.2s ease; pointer-events: none; }
.r3d-help.gone { opacity: 0; }
.r3d-help .for-touch { display: none; }
@media (pointer: coarse) { .r3d-help { left: auto; right: 14px; transform: none; max-width: calc(100% - 172px); text-align: right; bottom: calc(40px + env(safe-area-inset-bottom, 0px)); } .r3d-help .for-keys { display: none; } .r3d-help .for-touch { display: inline; } }
.r3d-ui { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 2; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; max-width: min(80vw, 380px); }
.r3d-note { margin: 0; padding: 9px 15px; border-radius: 14px; background: rgba(12, 10, 24, .62); backdrop-filter: blur(6px); opacity: 0; transition: opacity .8s ease; text-align: right; }
.r3d-note.on { opacity: 1; }
.r3d .thumbpad { z-index: 2; }
/* a room's own buttons and panels (the Labyrinth's cheat and its middle) */
.r3d [hidden] { display: none !important; }
.r3d-cheat { align-self: flex-end; }
.r3d-panel { width: min(380px, 100%); box-sizing: border-box; padding: 16px 18px; border-radius: 16px; background: rgba(12, 10, 28, .78); backdrop-filter: blur(8px); border: 1px solid rgba(160, 140, 255, .28); }
.r3d-panel p { margin: 0 0 10px; }
.r3d-panel-lead { font-size: 1.25em; color: #d9ceff; }
.r3d-panel-sub { font-size: .9em; color: #c8c3dc; }
.r3d-panel-lab { display: block; font-size: .85em; color: #b7b0d6; margin-bottom: 4px; }
.r3d-panel textarea { width: 100%; box-sizing: border-box; font: inherit; color: #f1eeff; background: rgba(255, 255, 255, .06); border: 1px solid rgba(180, 165, 255, .35); border-radius: 10px; padding: 8px 10px; resize: vertical; }
.r3d-panel-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.r3d-panel-count { font-size: .8em; color: #a9a3c6; }
.r3d-panel-said { min-height: 1.2em; color: #d9ceff; }
/* a narrow screen: the room's own lines sit under Back to Eden, never beside it */
@media (max-width: 600px) { .r3d-ui { top: calc(62px + env(safe-area-inset-top, 0px)); left: 14px; right: 14px; max-width: none; } }

/* the Exquisite Corpse: the story on a night page, each turn in its own fluorescent ink */
.corpse { max-width: 760px; margin: 0 auto; }
.cx-how { font-size: 1.02rem; }
.cx-story-wrap { margin: 18px 0 22px; }
.cx-story { max-height: 62vh; overflow-y: auto; padding: 24px 26px; border-radius: 18px; background: radial-gradient(120% 90% at 30% 0%, #1b1640 0%, #0b0a1c 70%); border: 1px solid rgba(160, 140, 255, .25);
  font: 1.16rem/1.8 Georgia, serif; color: #e6e2f5; box-shadow: inset 0 0 60px rgba(90, 70, 200, .18); }
.cx-entry { color: var(--ink); text-shadow: 0 0 9px color-mix(in srgb, var(--ink) 60%, transparent), 0 0 2px color-mix(in srgb, var(--ink) 40%, transparent); }
.cx-older { margin-bottom: 10px; }
.cx-pen { padding: 18px 20px; border-radius: 16px; border: 1px solid rgba(160, 140, 255, .3); background: rgba(120, 100, 220, .07); }
.cx-step { font-size: 1.05rem; margin: 0 0 10px; }
.cx-step-small, .cx-small { font-size: .88rem; opacity: .85; }
.cx-inks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.cx-ink { display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px 7px 8px; border-radius: 999px; border: 1px solid rgba(160, 140, 255, .35); background: rgba(10, 8, 26, .55); color: #ece8f6; font: inherit; font-size: .92rem; cursor: pointer; }
.cx-ink .cx-swatch { width: 18px; height: 18px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 10px var(--ink); }
.cx-ink[aria-checked="true"] { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.cx-ink:disabled { opacity: .4; cursor: not-allowed; }
.cx-ink small { opacity: .8; }
.cx-write { position: relative; }
.cx-write textarea { width: 100%; box-sizing: border-box; min-height: 9em; font: 1.12rem/1.7 Georgia, serif; color: var(--my-ink, #d6b4ff); text-shadow: 0 0 8px color-mix(in srgb, var(--my-ink, #d6b4ff) 50%, transparent);
  background: #0c0b1e; border: 1px solid var(--my-ink, #b36bff); border-radius: 12px; padding: 12px 14px; resize: vertical; }
.cx-label { display: block; margin: 0 76px 8px 0; font-size: .92rem; }
.cx-tail { font-style: italic; opacity: .85; }
.cx-clock { position: absolute; right: 0; top: -6px; width: 64px; height: 64px; }
.cx-clock svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cx-ring-bg { fill: none; stroke: rgba(160, 140, 255, .2); stroke-width: 4; }
.cx-ring { fill: none; stroke: var(--my-ink, #b36bff); stroke-width: 4; stroke-dasharray: 119.4; stroke-dashoffset: 0; stroke-linecap: round; transition: stroke-dashoffset .25s linear; }
.cx-time { position: absolute; inset: 0; display: grid; place-items: center; font-size: .95rem; font-variant-numeric: tabular-nums; }
.cx-hurry .cx-time { color: #d6b4ff; font-weight: bold; }
.cx-wait { display: flex; align-items: center; gap: 14px; }
.cx-wait[hidden], .cx-choose[hidden], .cx-write[hidden] { display: none; }
.cx-dot { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--wait-ink, #b36bff); box-shadow: 0 0 14px var(--wait-ink, #b36bff); animation: cx-pulse 1.6s ease-in-out infinite; }
@keyframes cx-pulse { 50% { opacity: .35; transform: scale(.8); } }
@media (prefers-reduced-motion: reduce) { .cx-dot { animation: none; } }
.cx-said { min-height: 1.3em; margin: 10px 0 0; }


/* The Unfinished: a gallery of open questions, one card each, in the house's own colours whatever the theme */
.unf { width: 100%; max-width: 1000px; }
.unf-how { max-width: 680px; margin: 0 auto 4px; text-align: center; font-size: 1.04rem; }
.unf-checked { margin: 0 auto 16px; text-align: center; color: var(--muted); font-size: .9rem; font-style: italic; }
.unf-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0 0 20px; }
.unf-tabs button { font: 15px Georgia, serif; color: var(--ink); background: var(--card); border: 1px solid var(--cardLine); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.unf-tabs button[aria-selected="true"] { border-color: var(--heading); color: var(--heading); box-shadow: 0 0 0 1px var(--heading); }
.unf-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.unf-item[hidden] { display: none; }
.unf-card { --acc: #b36bff; width: 100%; height: 100%; text-align: left; font: inherit; color: var(--ink); cursor: pointer; display: flex; flex-direction: column; gap: 8px;
  padding: 18px 18px 14px; border-radius: 16px; background: linear-gradient(165deg, color-mix(in srgb, var(--acc) 12%, var(--card)), var(--card) 60%);
  border: 1px solid color-mix(in srgb, var(--acc) 35%, var(--cardLine)); transition: transform .2s ease, box-shadow .2s ease; }
.unf-card:hover, .unf-card:focus-visible { transform: translateY(-2px); box-shadow: 0 8px 26px color-mix(in srgb, var(--acc) 28%, transparent); }
.unf-numbers { --acc: #b36bff; } .unf-cosmos { --acc: #4f8dff; } .unf-life { --acc: #94a6ff; } .unf-mind { --acc: #d27bff; } .unf-making { --acc: #6f63ff; } .unf-past { --acc: #9aa0b8; }
.unf-field { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--acc, var(--subhead)); }
.unf-q { font-size: 1.2rem; line-height: 1.35; color: var(--heading); }
.unf-name { font-size: .92rem; color: var(--subhead); font-style: italic; }
.unf-foot { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding-top: 6px; border-top: 1px dashed var(--cardLine); }
.unf-since { font-size: .82rem; color: var(--muted); }
.unf-badge { font-size: .78rem; padding: 3px 9px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--acc) 50%, transparent); color: var(--acc); }
.unf-solved { background: color-mix(in srgb, #a4dcff 22%, transparent); border-color: #a4dcff; color: var(--heading); }
.unf-claimed { border-style: dashed; }
.unf-is-solved { border-color: color-mix(in srgb, #a4dcff 60%, var(--cardLine)); }
.unf-is-claimed { border-style: dashed; }
.unf-open { width: min(680px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); box-sizing: border-box; padding: 0; border-radius: 18px; border: 1px solid var(--cardLine); background: var(--bg); color: var(--ink); }
.unf-open::backdrop { background: rgba(8, 6, 20, .66); backdrop-filter: blur(3px); }
.unf-open-in { padding: 22px 24px 18px; }
.unf-open h2 { margin: 4px 0 6px; font-size: clamp(22px, 4vw, 28px); color: var(--heading); }
.unf-open h3 { margin: 18px 0 6px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--subhead); }
.unf-open h4 { margin: 12px 0 4px; font-size: 14px; color: var(--subhead); }
.unf-open p { margin: 0 0 8px; line-height: 1.6; }
.unf-answer { margin-top: 16px; padding: 4px 16px 10px; border-radius: 14px; border-left: 4px solid #a4dcff; background: color-mix(in srgb, #a4dcff 12%, transparent); }
.unf-answer-claimed { border-left-style: dashed; border-left-color: #94a6ff; background: color-mix(in srgb, #94a6ff 10%, transparent); }
.unf-who { color: var(--muted); font-style: italic; }
.unf-what { font-size: 1.1rem; color: var(--heading); }
.unf-src { margin: 4px 0 0; padding-left: 20px; font-size: .9rem; }
.unf-close-row { margin-top: 18px !important; text-align: right; }

/* the Wizard's Lab: what is being made, the jar under the pointer, and the book itself */
.lab-tip { position: fixed; z-index: 3; max-width: 260px; padding: 6px 10px; border-radius: 10px; background: rgba(12, 10, 28, .85); color: #ece8f6; font-size: .85rem; pointer-events: none; }
.lab-tip[hidden] { display: none; }
/* The book docks at the side, the room stays in view beside it, and a picked spell is worked in three steps right there
   (19 Oct 2026, his words: "it's totally unclear how to perform any spells in The Wizards Room. You can open the book but
   it covers the whole page and you have to close the book to get back to the spells. It should be interactive and
   instructive based on what spell you pick"). On a phone it is a sheet over the lower part of the screen. */
.lb-book { position: absolute; inset: 0 0 0 auto; margin: 0; z-index: 5; width: min(470px, 44vw); height: 100%; max-width: none; max-height: none; box-sizing: border-box; padding: 0;
  border: 1px solid rgba(180, 165, 255, .4); border-right: 0; border-radius: 18px 0 0 18px; box-shadow: -12px 0 40px rgba(0, 0, 0, .45);
  background: linear-gradient(170deg, #f1ecfb, #e4dcf5); color: #2a2340; font: 16px/1.6 Georgia, serif; display: none; flex-direction: column; }
.lb-book[open] { display: flex; }
.lb-browse { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.lb-browse[hidden], .lb-guide[hidden] { display: none; }
.r3d.book-open .r3d-ui { right: calc(min(470px, 44vw) + 18px); max-width: min(30vw, 360px); }
.r3d.book-open .lab-open, .r3d.book-open .r3d-ui .lab-download { display: none; }
.r3d.book-open .r3d-help { left: calc((100% - min(470px, 44vw)) / 2); max-width: calc(100% - min(470px, 44vw) - 40px); }
.lb-book.guiding .lb-credit { display: none; }
.lb-book .lb-credit { padding-right: 116px; font-size: .76rem; }
.lb-book :focus { outline: none; } .lb-book :focus-visible { outline: 2px solid #7a3db8; outline-offset: 2px; }
.lb-how { margin: 12px 0; padding: 10px 14px; border-radius: 10px; background: rgba(90, 61, 154, .1); color: #3a2d5a; font-size: .95rem; }
/* the spell being worked: three steps, the one to do now lit, the done ones ticked, the later ones waiting */
.lb-guide { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 22px 76px; outline: none; }
.lb-guide-top { margin: 0 0 6px; }
.lb-guide h2 { margin: 2px 0 6px; color: #5a3d9a; font-size: 1.6rem; font-weight: normal; }
.lb-kicker { margin: 0; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #7a3db8; font-weight: bold; }
.lb-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 10px; }
.lb-step { padding: 10px 14px 12px; border-radius: 12px; border: 1px solid rgba(90, 61, 154, .2); background: rgba(255, 255, 255, .45); transition: opacity .4s ease; }
.lb-step h3 { margin: 0 0 6px; font-size: 1.12rem; color: #2f4f9e; font-weight: normal; display: flex; align-items: center; gap: 10px; }
.lb-num { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .9rem; color: #fff; background: #9a8cc0; }
.lb-step.now { border: 2px solid #7a3db8; background: #fff; box-shadow: 0 4px 18px rgba(90, 61, 154, .18); }
.lb-step.now .lb-num { background: #7a3db8; }
.lb-step.done { opacity: .78; }
.lb-step.done .lb-num { background: #3a5fb0; }
.lb-step.later { opacity: .55; }
.lb-step p { margin: 4px 0; }
.lab-need { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.lb-ing { padding: 8px 12px; border-radius: 10px; background: #f6f2ff; border: 1px solid rgba(90, 61, 154, .22); }
.lb-ing.got { background: #eef1fb; border-color: rgba(58, 95, 176, .4); }
.lb-ing p { margin: 2px 0; font-size: .94rem; }
.lb-care { color: #6a3d8a; font-style: italic; }
.lb-ing-do { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px !important; }
.lb-got { color: #2f4f9e; font-weight: bold; }
.lb-wait { color: #6a6480; font-style: italic; font-size: .92rem; }
.lb-done-note { font-size: 1.05rem; color: #2a2340; padding: 8px 12px; border-left: 4px solid #b36bff; background: rgba(179, 107, 255, .1); border-radius: 0 8px 8px 0; }
.lb-again { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-book .btn.quiet { color: #4a3a7a; border-color: rgba(90, 61, 154, .45); }
.lb-book .btn:disabled { opacity: .45; cursor: default; }
@media (max-width: 760px) {
  .lb-book { inset: auto 0 0 0; width: 100%; height: 60dvh; border-right: 1px solid rgba(180, 165, 255, .4); border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(0, 0, 0, .45); font-size: 15px; }
  .r3d.book-open .r3d-ui { right: 14px; max-width: none; }
  .r3d.book-open .r3d-help { display: none; }
  .lb-head { padding: 8px 12px; } .lb-title { font-size: 1.05rem; } .lb-nav { padding: 8px 12px; } .lb-page, .lb-guide { padding: 10px 14px 72px; }
  .lb-head .lb-download { display: none; }
}
.lb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-bottom: 1px solid rgba(90, 61, 154, .25); }
.lb-title { margin: 0; font-size: 1.3rem; color: #5a3d9a; font-style: italic; }
.lb-head .btn.quiet { color: #4a3a7a; }
.lb-head { flex-wrap: wrap; }
.lb-head .lb-download { margin-left: auto; }
.r3d-ui .lab-download { background: rgba(12, 10, 28, .72); color: #ece8f6; border: 1px solid rgba(180, 165, 255, .45); text-decoration: none; }
.lb-nav { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 18px; border-bottom: 1px solid rgba(90, 61, 154, .2); }
.lb-nav button { font: 14px Georgia, serif; color: #4a3a7a; background: rgba(255, 255, 255, .6); border: 1px solid rgba(90, 61, 154, .3); border-radius: 999px; padding: 4px 11px; cursor: pointer; }
.lb-nav button[aria-current="true"] { background: #5a3d9a; color: #fff; border-color: #5a3d9a; }
.lb-page { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 26px 76px; }
.lb-page h2 { margin: 6px 0 8px; color: #5a3d9a; font-size: 1.7rem; font-weight: normal; }
.lb-page h3 { margin: 18px 0 4px; color: #2f4f9e; font-size: 1.25rem; font-weight: normal; }
.lb-sub, .lb-from, .lb-small { color: #5c5670; font-style: italic; font-size: .92rem; }
.lb-lab { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: #7a3db8; font-weight: bold; margin-right: 6px; }
.lb-page blockquote { margin: 10px 0 4px; padding: 6px 14px; border-left: 3px solid #b36bff; font-style: italic; font-size: 1.08rem; color: #2a2340; }
.lb-alarm { margin: 10px 0; padding: 10px 14px; border-radius: 8px; background: #ece2ff; border: 1px solid #cdb8f2; border-left: 6px solid #7a3db8; }
.lb-alarm strong { color: #5a2d9a; }
.lb-last { font-size: 1.25rem; font-style: italic; color: #7a3db8; margin: 16px 0; }
.lb-entry { padding: 4px 0 14px; border-bottom: 1px dashed rgba(90, 61, 154, .25); }
.lb-make { margin: 6px 0 4px; }
.lb-src { font-size: .82rem; color: #5c5670; padding-left: 20px; margin: 6px 0 0; }
.lb-src a { color: #2f5fb3; }
.lb-jar { padding: 6px 0; border-bottom: 1px dotted rgba(90, 61, 154, .2); }
.lb-jar p { margin: 2px 0; font-size: .92rem; }
.lb-credit { margin: 0; padding: 8px 18px 12px; font-size: .8rem; color: #6a6480; border-top: 1px solid rgba(90, 61, 154, .2); }

/* Eden 2: the Rise button on a phone (hold to fly up), and the map's shaded land, islands and high doors */
.eden .rise { display: none; position: absolute; right: 18px; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); z-index: 4; width: 76px; height: 76px; border-radius: 50%;
  border: 1px solid rgba(220, 210, 255, .6); background: rgba(40, 30, 90, .55); color: #f1ecff; font: 600 16px/1 system-ui, sans-serif; backdrop-filter: blur(4px);
  touch-action: none; user-select: none; -webkit-user-select: none; }
.eden .rise:active { background: rgba(120, 95, 220, .7); }
@media (pointer: coarse) { .eden .rise { display: block; } }
.eden-map .m-relief { opacity: .95; }
.eden-map .m-island { fill: none; stroke: #d6c8ff; stroke-width: 2; stroke-dasharray: 4 3; opacity: .8; }
.eden-map .m-door.m-high circle { fill: none; stroke: #e6d6ff; stroke-width: 4; }

/* the potion's other side (Eden 2): the colours that swirled in the Room With No Name spin down and clear, and the land
   ripples into stillness under them (eden-main.js runs the ripple); with less motion asked for, they only fade */
.fx-defs { position: absolute; width: 0; height: 0; }
.walls.potion-settle { position: fixed; inset: -25%; z-index: 30; pointer-events: none; display: block; perspective: none;
  background: conic-gradient(from 120deg at 50% 50%, #8a5cff, #4f8dff, #d27bff, #6f63ff, #a4dcff, #b36bff, #8a5cff); mix-blend-mode: screen; opacity: .95; }
.walls.potion-settle.peel { animation: potion-settle 2.8s cubic-bezier(.3, 0, .2, 1) forwards; }
.walls.potion-settle.fade { transition: opacity .8s ease; opacity: 0; }
@keyframes potion-settle { 0% { opacity: .95; transform: scale(1.5) rotate(0deg); filter: blur(4px); } 100% { opacity: 0; transform: scale(.6) rotate(-300deg); filter: blur(40px); } }
main.eden.settling .eden-view { filter: url(#eden-melt) saturate(1.5); }

.corpse [hidden] { display: none !important; }
.swamp-room .room-wait { text-align: center; color: var(--muted); font-style: italic; }

/* ---- the Lookout (17 Oct 2026): your surroundings live, one colour a layer ---- */
.lk-lead, .pd-lead { text-align: center; max-width: 640px; color: var(--ink); margin: 0 0 12px; }
.lk-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 720px; margin: 0 0 12px; }
.lk-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--c); background: transparent; color: var(--ink); font: 15px Georgia, serif; cursor: pointer; }
.lk-chip[aria-pressed="false"] { opacity: .45; border-style: dashed; }
.lk-chip .dot, .lk-read .dot { width: 11px; height: 11px; border-radius: 50%; background: var(--c); flex: none; }
.lk-map { width: min(92vw, 640px); aspect-ratio: 1; display: block; }
/* The Lookout on a real map that fills the window (19 Oct 2026, his words: "the lookout needs to have a map", and "All of
   the rooms should take up the full browser screen"): the map under everything, the wind drifting over it, the colours
   along the top and the plain-words readout in a panel that folds away. Dark glass by day and by night, like the map. */
body:has([data-swamp-room="lookout"]) { overflow: hidden; background: #0e0d16; }
[data-swamp-room="lookout"] .lk-map { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; aspect-ratio: auto; z-index: 0; background: #0b0b18; }
[data-swamp-room="lookout"] .lk-air { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 400; pointer-events: none; }
[data-swamp-room="lookout"] .sr-head { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 1000; margin: 0;
  padding: 6px 18px 7px; border-radius: 14px; background: rgba(8, 6, 18, .62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none; white-space: nowrap; }
[data-swamp-room="lookout"] .sr-head h1 { font-size: 24px; color: #f2ecff; }
[data-swamp-room="lookout"] .sr-line { font-size: 14px; color: #cdbff3; }
[data-swamp-room="lookout"] .lk-chips { position: fixed; top: calc(92px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 1000; margin: 0;
  width: max-content; max-width: calc(100vw - 32px); padding: 8px 10px; border-radius: 16px; background: rgba(8, 6, 18, .6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); box-sizing: border-box; }
[data-swamp-room="lookout"] .lk-chip { color: #f2ecff; background: rgba(255, 255, 255, .04); font-size: 14px; padding: 5px 11px; }
[data-swamp-room="lookout"] .lk-panel { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 1000; width: min(440px, calc(100vw - 32px));
  max-height: calc(100vh - 230px); display: flex; flex-direction: column; box-sizing: border-box; border-radius: 18px; background: rgba(8, 6, 18, .72);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .12); color: #ebe5fb; }
[data-swamp-room="lookout"] .lk-fold { all: unset; cursor: pointer; padding: 11px 16px; font: 600 15px Georgia, serif; color: #f2ecff; display: flex; justify-content: space-between; gap: 10px; }
[data-swamp-room="lookout"] .lk-fold::after { content: '\25BE'; color: #BE5CFF; }
[data-swamp-room="lookout"] .lk-fold:focus-visible { outline: 2px solid #BE5CFF; border-radius: 18px; }
[data-swamp-room="lookout"] .lk-panel.folded .lk-fold::after { content: '\25B4'; }
[data-swamp-room="lookout"] .lk-panel.folded .lk-body { display: none; }
[data-swamp-room="lookout"] .lk-body { overflow-y: auto; padding: 0 16px 14px; }
[data-swamp-room="lookout"] .lk-lead { text-align: left; color: #d8cff4; font-size: 14px; margin: 0 0 8px; }
[data-swamp-room="lookout"] .lk-where { text-align: left; color: #cdbff3; margin: 0; }
[data-swamp-room="lookout"] .lk-read { margin: 6px 0 0; max-width: none; }
[data-swamp-room="lookout"] .lk-read li { font-size: 14.5px; color: #ebe5fb; }
[data-swamp-room="lookout"] .lk-quiet { text-align: left; color: #a99fc8; font-size: 12.5px; margin: 10px 0 0; max-width: none; }
[data-swamp-room="lookout"] .way-out { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 1000; margin: 0; }
/* the map's own buttons and credits, in the house's dark dress */
[data-swamp-room="lookout"] .leaflet-bar a { background: rgba(8, 6, 18, .78); color: #f2ecff; border-color: rgba(255, 255, 255, .18); }
[data-swamp-room="lookout"] .leaflet-bar a:hover { background: #2a1846; }
[data-swamp-room="lookout"] .leaflet-container .leaflet-control-attribution { background: rgba(8, 6, 18, .7); color: #b7aed6; font: 11px Georgia, serif; border-radius: 6px 0 0 6px; }
[data-swamp-room="lookout"] .leaflet-container .leaflet-control-attribution a { color: #cfc3ff; }
[data-swamp-room="lookout"] .lk-where:empty { display: none; }
[data-swamp-room="lookout"] .leaflet-bottom.leaflet-right { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; align-items: flex-end; }
.lk-tip { background: rgba(8, 6, 18, .9); color: #f2ecff; border: 1px solid rgba(255, 255, 255, .2); font: 13px Georgia, serif; }
.lk-tip.leaflet-tooltip-top::before { border-top-color: rgba(8, 6, 18, .9); }
.lk-event span { display: block; width: 12px; height: 12px; margin: 2px; background: var(--c); transform: rotate(45deg); box-shadow: 0 0 8px var(--c); }
.lk-iss span { display: block; width: 26px; height: 12px; background: linear-gradient(90deg, var(--c) 0 32%, transparent 32% 40%, var(--c) 40% 60%, transparent 60% 68%, var(--c) 68%); border-radius: 2px; box-shadow: 0 0 10px var(--c); }
@keyframes lk-breathe { 0%, 100% { stroke-opacity: .35; } 50% { stroke-opacity: .95; } }
.lk-quake, .lk-alert { animation: lk-breathe 2.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .lk-quake, .lk-alert { animation: none; } }
@media (max-width: 760px) {
  [data-swamp-room="lookout"] .lk-chips { display: flex; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; width: calc(100vw - 20px); top: calc(118px + env(safe-area-inset-top, 0px)); }
  [data-swamp-room="lookout"] .lk-chip { flex: none; }
  [data-swamp-room="lookout"] .lk-panel { left: 10px; width: calc(100vw - 20px); bottom: calc(66px + env(safe-area-inset-bottom, 0px)); max-height: 50vh; }
  [data-swamp-room="lookout"] .leaflet-bottom.leaflet-right { bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 560px) {
  [data-swamp-room="lookout"] .sr-head { top: calc(66px + env(safe-area-inset-top, 0px)); padding: 5px 12px; }
  [data-swamp-room="lookout"] .sr-head h1 { font-size: 19px; }
  [data-swamp-room="lookout"] .sr-line { display: none; }
}
.lk-where { text-align: center; color: var(--subhead); font-style: italic; min-height: 1.2em; margin: 8px 0 0; }
.lk-read { list-style: none; padding: 0; margin: 10px 0 0; max-width: 640px; width: 100%; display: grid; gap: 8px; }
.lk-read li { display: flex; gap: 10px; align-items: baseline; font: 16px/1.45 Georgia, serif; color: var(--ink); }
.lk-read li .dot { transform: translateY(1px); }
.lk-read li.off { opacity: .45; }
.lk-quiet { max-width: 640px; color: var(--muted); font-size: 14px; font-style: italic; text-align: center; margin: 14px 0 0; }

/* ---- the Puddle (17 Oct 2026): mathematics dropped in water ---- */
.pd-water { width: min(94vw, 720px); aspect-ratio: 1; max-height: 70vh; display: block; border-radius: 22px; touch-action: none; cursor: crosshair; background: #06040d; outline: none; }
.pd-kinds { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 720px; margin: 14px 0 0; }
.pd-kind { padding: 6px 13px; border-radius: 999px; border: 1px solid rgba(var(--strand), .6); background: transparent; color: var(--ink); font: 15px Georgia, serif; cursor: pointer; }
.pd-kind[aria-checked="true"] { background: var(--heading); border-color: var(--heading); color: var(--bg); }
.pd-says { text-align: center; max-width: 600px; color: var(--subhead); font-style: italic; min-height: 2.6em; margin: 10px 0 0; }
.pd-ctl { margin: 6px 0 0; }
.pd-no3d { color: var(--muted); font-style: italic; }
.pd-no3d[hidden] { display: none; }
/* The water fills the whole page and everything else floats over it on dark glass (19 Oct 2026, his words: "The Puddle
   should be fullscreen, with the puddle choices overlaying on top, but the visualization should take up the whole browser
   page, not true fullscreen"). The glass is the same by day and by night, since the water under it is always dark. Words
   that are not buttons let a touch fall through to the water. */
body:has([data-swamp-room="puddle"]) { overflow: hidden; background: #06040d; }
[data-swamp-room="puddle"] .pd-water { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-height: none; aspect-ratio: auto; border-radius: 0; z-index: 0; }
[data-swamp-room="puddle"] .sr-head { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 10; margin: 0;
  padding: 6px 18px 7px; border-radius: 14px; background: rgba(8, 6, 18, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: #f2ecff; pointer-events: none; white-space: nowrap; }
[data-swamp-room="puddle"] .sr-head h1 { font-size: 24px; color: #f2ecff; }
[data-swamp-room="puddle"] .sr-line { font-size: 14px; color: #cdbff3; }
[data-swamp-room="puddle"] .pd-lead { position: fixed; top: calc(92px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 10; margin: 0;
  width: min(560px, calc(100vw - 40px)); box-sizing: border-box; padding: 8px 14px; border-radius: 12px; background: rgba(8, 6, 18, .5); color: #e6defb; font-size: 15px;
  pointer-events: none; transition: opacity .9s ease; }
[data-swamp-room="puddle"] .activity.touched .pd-lead { opacity: 0; }
[data-swamp-room="puddle"] .pd-panel { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 10;
  width: min(940px, calc(100vw - 150px)); box-sizing: border-box; padding: 10px 14px 12px; border-radius: 18px; background: rgba(8, 6, 18, .6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .12); }
[data-swamp-room="puddle"] .pd-says { margin: 0 auto 8px; min-height: 0; max-width: none; color: #d6ccf4; font-size: 15px; }
[data-swamp-room="puddle"] .pd-row { display: flex; align-items: center; gap: 10px; }
[data-swamp-room="puddle"] .pd-kinds { margin: 0; max-width: none; flex: 1; }
[data-swamp-room="puddle"] .pd-kind { color: #f2ecff; border-color: rgba(255, 255, 255, .38); background: rgba(255, 255, 255, .04); }
[data-swamp-room="puddle"] .pd-kind[aria-checked="true"] { background: #BE5CFF; border-color: #BE5CFF; color: #fff; }
[data-swamp-room="puddle"] .pd-clear { color: #ece6ff; border-color: rgba(255, 255, 255, .45); white-space: nowrap; }
[data-swamp-room="puddle"] .way-out { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 10; margin: 0; }
[data-swamp-room="puddle"] .pd-no3d { position: fixed; inset: auto 0 45% 0; z-index: 10; text-align: center; color: #e6defb; }
/* the light switch and the sunset button in the corner stay easy to see on the dark water, by day as well */
body:has([data-swamp-room="puddle"]) .theme.floating, body:has([data-swamp-room="puddle"]) .dusk.floating { color: #f2ecff; background: rgba(8, 6, 18, .55); border-color: rgba(255, 255, 255, .32); }
/* on a phone: the title keeps clear of the corner buttons, the choices run in one row that scrolls sideways, and the panel
   sits above the round sound buttons */
@media (max-width: 760px) {
  [data-swamp-room="puddle"] .pd-panel { width: calc(100vw - 20px); bottom: calc(66px + env(safe-area-inset-bottom, 0px)); padding: 8px 10px 10px; }
  [data-swamp-room="puddle"] .pd-row { flex-direction: column; align-items: stretch; gap: 8px; }
  [data-swamp-room="puddle"] .pd-kinds { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 2px; scrollbar-width: none; }
  [data-swamp-room="puddle"] .pd-kind { flex: none; }
  [data-swamp-room="puddle"] .pd-clear { align-self: center; }
  [data-swamp-room="puddle"] .pd-says { font-size: 13.5px; }
}
@media (max-width: 560px) {
  /* the corner buttons and Back to Eden share the top row, so the name sits just under them */
  [data-swamp-room="puddle"] .sr-head { top: calc(66px + env(safe-area-inset-top, 0px)); padding: 5px 12px; }
  [data-swamp-room="puddle"] .sr-head h1 { font-size: 19px; }
  [data-swamp-room="puddle"] .sr-line { display: none; }
  [data-swamp-room="puddle"] .pd-lead { top: calc(112px + env(safe-area-inset-top, 0px)); font-size: 14px; }
}

/* ---- the house's sounds (17 Oct 2026): one switch, a round button in a hidden room's corner, a word in Eden's top bar ---- */
.sound.floating { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 45; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28); background: rgba(14, 11, 26, .6); color: #ece6f6; cursor: pointer; display: grid; place-items: center; }
.sound.floating:hover, .sound.floating:focus-visible { border-color: #BE5CFF; outline: none; }
.sound svg, .sound-word svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sound svg path:first-child, .sound-word svg path:first-child { fill: currentColor; }
.eden-ways .sound-word { display: inline-flex; align-items: center; gap: 6px; font: 14px Georgia, serif; color: #ece6f6; background: rgba(12,10,22,.55); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.eden-ways .sound-word:hover, .eden-ways .sound-word:focus-visible { border-color: #BE5CFF; outline: none; }
.eden-ways .sound-word svg { width: 16px; height: 16px; }
/* on a phone the top bar has no room for it (it ran into the sunset button), so it is a round button beside Rise, the one
   spot clear of the pad, the doors, the door's name and the help, upright or sideways */
@media (pointer: coarse) { .eden-ways .sound-word { position: fixed; right: 104px; bottom: calc(167px + env(safe-area-inset-bottom, 0px)); z-index: 4;
  width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 50%; } .eden-ways .sound-word span { display: none; }
  .eden-ways .sound-word svg { width: 20px; height: 20px; } }
/* Repeat (18 Oct 2026, his words: "Songs or groups of songs should play on repeat but have an option to turn off"): only
   where a page has music, beside the sound switch, in the same dress; turned off, its loop is struck through and dimmed */
.repeat.floating { position: fixed; right: 66px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 45; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .28); background: rgba(14, 11, 26, .6); color: #ece6f6; cursor: pointer; display: grid; place-items: center; }
.repeat.floating:hover, .repeat.floating:focus-visible { border-color: #BE5CFF; outline: none; }
.repeat svg, .repeat-word svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.repeat[aria-pressed="false"], .repeat-word[aria-pressed="false"] { color: #a79fb8; }
.eden-ways .repeat-word { display: inline-flex; align-items: center; gap: 6px; font: 14px Georgia, serif; color: #ece6f6; background: rgba(12,10,22,.55); border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 5px 12px; cursor: pointer; }
.eden-ways .repeat-word[aria-pressed="false"] { color: #a79fb8; }
.eden-ways .repeat-word:hover, .eden-ways .repeat-word:focus-visible { border-color: #BE5CFF; outline: none; }
.eden-ways .repeat-word svg { width: 16px; height: 16px; }
/* on a phone, a round button just left of the sound switch (above it, it ran into the way-home card) */
@media (pointer: coarse) { .eden-ways .repeat-word { position: fixed; right: 152px; bottom: calc(167px + env(safe-area-inset-bottom, 0px)); z-index: 4;
  width: 42px; height: 42px; padding: 0; justify-content: center; border-radius: 50%; } .eden-ways .repeat-word span { display: none; }
  .eden-ways .repeat-word svg { width: 20px; height: 20px; } }

/* ---- the Last Light (18 Oct 2026): the end of everything, on a line through time ---- */
/* The Last Light as a balloon game (25 Oct 2026): the window is the playfield, the score sits in one card at the top left
   (under the title on a phone). Always a bright sky, by day and night, since it is a toy. */
body:has([data-swamp-room="last-light"]) { overflow: hidden; background: #8fd0ff; }
[data-swamp-room="last-light"] .ll-view { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; display: block; z-index: 0; touch-action: none; cursor: pointer;
  background: linear-gradient(#6fb8ff, #bfe6ff 55%, #e8e4ff); }
[data-swamp-room="last-light"] .sr-head { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 10; margin: 0;
  padding: 6px 18px 7px; border-radius: 14px; background: rgba(8, 6, 18, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none; white-space: nowrap; }
[data-swamp-room="last-light"] .sr-head h1 { font-size: 24px; color: #f2ecff; }
[data-swamp-room="last-light"] .sr-line { display: none; }
[data-swamp-room="last-light"] .way-out { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 10; margin: 0; }
.ll-card { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 14px; z-index: 10; width: min(310px, calc(100vw - 28px)); box-sizing: border-box; padding: 12px 16px 12px;
  border-radius: 16px; background: rgba(8, 6, 18, .66); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .14); color: #f2ecff; pointer-events: none; }
.ll-lead { margin: 0 0 8px; font: 15px/1.45 Georgia, serif; color: #e6defb; }
[data-swamp-room="last-light"] .activity.touched .ll-lead { display: none; }
.ll-big { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.ll-max { font: 700 54px/1 Fraunces, Georgia, serif; color: #f6f0ff; min-width: .8em; }
.ll-cap { font: 14px/1.3 Georgia, serif; color: #cdbff3; }
.ll-small { margin: 6px 0 0; font: 14px Georgia, serif; color: #e6defb; }
.ll-quip { margin: 4px 0 0; font: italic 14px Georgia, serif; color: #cdbff3; min-height: 1.2em; }
body:has([data-swamp-room="last-light"]) .theme.floating, body:has([data-swamp-room="last-light"]) .dusk.floating { color: #f2ecff; background: rgba(8, 6, 18, .55); border-color: rgba(255, 255, 255, .32); }
@media (max-width: 760px) {
  .ll-card { top: calc(112px + env(safe-area-inset-top, 0px)); left: 10px; width: calc(100vw - 20px); padding: 8px 13px 9px; }
  .ll-lead { font-size: 13.5px; margin-bottom: 4px; }
  .ll-max { font-size: 40px; }
  .ll-small, .ll-quip { margin-top: 2px; }
}
@media (max-width: 560px) {
  [data-swamp-room="last-light"] .sr-head { top: calc(66px + env(safe-area-inset-top, 0px)); padding: 5px 12px; }
  [data-swamp-room="last-light"] .sr-head h1 { font-size: 19px; }
}

/* ---- Every room fills the window (19 Oct 2026, his words: "All of the rooms should take up the full browser screen") ----
   The rooms that are a picture (the Endless Number, the Night Sky, the Breathing Room, the House Upside Down) put it under
   the whole window with their words and buttons on dark glass, the way the Puddle does. The rooms that are lists and
   tools (the Fridge, the Cabinet, the Secret Library, the Rabbit Hole, the Unfinished, the Almanac, the Weather Station,
   the Exquisite Corpse) spread across the window; a story or a report being read keeps a column a person can read. Back
   to Eden is always in the top right corner. */
.swamp-room[data-swamp-room] .activity { max-width: none; }
.swamp-room[data-swamp-room] .way-out { position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 20; margin: 0; }
@media (max-width: 860px) { .swamp-room[data-swamp-room] { padding-top: calc(66px + env(safe-area-inset-top, 0px)); } }

/* the picture rooms */
body:has(:is([data-swamp-room="endless-number"], [data-swamp-room="night-sky"], [data-swamp-room="breathing-room"], [data-swamp-room="house-upside-down"])) { overflow: hidden; background: #050409; }
:is([data-swamp-room="endless-number"], [data-swamp-room="night-sky"], [data-swamp-room="breathing-room"], [data-swamp-room="house-upside-down"]) .sr-head {
  position: fixed; top: calc(14px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 10; margin: 0; padding: 6px 18px 7px; border-radius: 14px;
  background: rgba(8, 6, 18, .55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); pointer-events: none; white-space: nowrap; }
:is([data-swamp-room="endless-number"], [data-swamp-room="night-sky"], [data-swamp-room="breathing-room"], [data-swamp-room="house-upside-down"]) .sr-head h1 { font-size: 24px; color: #f2ecff; }
:is([data-swamp-room="endless-number"], [data-swamp-room="night-sky"], [data-swamp-room="breathing-room"], [data-swamp-room="house-upside-down"]) .sr-line { font-size: 14px; color: #cdbff3; }
body:has(:is([data-swamp-room="endless-number"], [data-swamp-room="night-sky"], [data-swamp-room="breathing-room"], [data-swamp-room="house-upside-down"], [data-swamp-room="last-light"])) :is(.theme.floating, .dusk.floating) {
  color: #f2ecff; background: rgba(8, 6, 18, .55); border-color: rgba(255, 255, 255, .32); }
.digits-panel, .sky-panel, .upside-note { position: fixed; z-index: 10; box-sizing: border-box; border-radius: 18px; background: rgba(8, 6, 18, .62);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border: 1px solid rgba(255, 255, 255, .12); color: #ebe5fb; }
/* the Endless Number: the spiral is the window */
[data-swamp-room="endless-number"] .digits-view { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-height: none; z-index: 0; }
.digits-panel { left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); width: min(760px, calc(100vw - 150px)); padding: 10px 18px 12px; text-align: center; }
.digits-panel .digits-line { max-width: 100%; margin: 0; color: #f6f0ff; }
.digits-panel .digits-depth { color: #cdbff3; margin: 2px 0 8px; }
.digits-panel .digits-said:empty { display: none; }
.digits-panel .digits-hint { color: #b7aed6; font-size: 14px; margin: 8px 0 0; }
.digits-panel .btn.quiet { color: #ece6ff; border-color: rgba(255, 255, 255, .4); }
/* the Night Sky: the sky is the window, and the naming sits on glass beside it */
[data-swamp-room="night-sky"] .sky-view { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; border-radius: 0; z-index: 0; }
.sky-panel { right: 16px; top: calc(80px + env(safe-area-inset-top, 0px)); bottom: calc(70px + env(safe-area-inset-bottom, 0px)); width: min(380px, 34vw); padding: 12px 14px; overflow-y: auto; }
.sky-panel .sky-ctl { justify-content: flex-start; margin: 0 0 10px; }
.sky-panel .sky-count { color: #cdbff3; }
.sky-panel .sky-name { max-width: none; background: transparent; border: 0; padding: 0; color: #ebe5fb; }
.sky-panel .btn.quiet { color: #ece6ff; border-color: rgba(255, 255, 255, .4); }
.sky-panel .name-find input { background: rgba(255, 255, 255, .06); color: #f2ecff; }
/* the Breathing Room: the light in the middle of the whole window */
[data-swamp-room="breathing-room"] .breath { position: fixed; left: 50%; top: 47%; transform: translate(-50%, -50%); width: min(78vmin, 640px); height: min(78vmin, 640px); margin: 0; z-index: 0; }
.breath-panel { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 10; width: min(560px, calc(100vw - 150px)); text-align: center; }
.breath-panel .breath-word { margin: 0 0 6px; }
.breath-panel .breath-note { margin: 0 auto; }
body:has([data-swamp-room="breathing-room"]) { background: radial-gradient(70% 60% at 50% 47%, #140d24 0%, #050409 70%); }
/* the House, Upside Down: the whole house, filling the window, the other way up */
[data-swamp-room="house-upside-down"] .upside { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; border: 0; border-radius: 0; z-index: 0; }
.upside-note { left: 50%; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); margin: 0; padding: 7px 16px; width: max-content; max-width: calc(100vw - 150px); font-style: italic; font-size: 15px; text-align: center; pointer-events: none; }
@media (max-width: 760px) {
  .digits-panel { width: calc(100vw - 20px); bottom: calc(66px + env(safe-area-inset-bottom, 0px)); padding: 8px 12px 10px; }
  .digits-panel .digits-hint { font-size: 13px; }
  .sky-panel { left: 10px; right: 10px; top: auto; bottom: calc(66px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: 42vh; padding: 10px 12px; }
  .breath-panel { width: calc(100vw - 20px); bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
  .upside-note { bottom: calc(70px + env(safe-area-inset-bottom, 0px)); max-width: calc(100vw - 20px); }
}
@media (max-width: 560px) {
  :is([data-swamp-room="endless-number"], [data-swamp-room="night-sky"], [data-swamp-room="breathing-room"], [data-swamp-room="house-upside-down"]) .sr-head { top: calc(66px + env(safe-area-inset-top, 0px)); padding: 5px 12px; }
  :is([data-swamp-room="endless-number"], [data-swamp-room="night-sky"], [data-swamp-room="breathing-room"], [data-swamp-room="house-upside-down"]) .sr-head h1 { font-size: 19px; }
  :is([data-swamp-room="endless-number"], [data-swamp-room="night-sky"], [data-swamp-room="breathing-room"], [data-swamp-room="house-upside-down"]) .sr-line { display: none; }
}

/* the Fridge: the door is the window's height, the magnets and the drawers of words beside it */
@media (min-width: 900px) {
  [data-swamp-room="fridge"] .fridge { grid-template-columns: minmax(0, 1fr) min(460px, 36vw); grid-template-rows: auto minmax(0, 1fr); height: calc(100dvh - 140px); }
  [data-swamp-room="fridge"] .door { grid-column: 1; grid-row: 1 / 3; min-height: 0; overflow: auto; }
  [data-swamp-room="fridge"] .compose { grid-column: 2; grid-row: 1; }
  [data-swamp-room="fridge"] .drawers { grid-column: 2; grid-row: 2; min-height: 0; display: flex; flex-direction: column; }
  [data-swamp-room="fridge"] .drawers .tray { flex: 1; max-height: none; min-height: 0; }
}
@media (max-width: 899px) { [data-swamp-room="fridge"] .door { min-height: 46vh; } }
/* the Curiosity Cabinet: as wide as the window, as many drawers to a row as fit */
[data-swamp-room="curiosity-cabinet"] .cabinet { max-width: none; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
/* the Secret Library and the Rabbit Hole: the shelf spreads across the window; a story being read keeps its column */
:is([data-swamp-room="secret-library"], [data-swamp-room="rabbit-hole"]) .shelf-wrap { max-width: none; }
:is([data-swamp-room="secret-library"], [data-swamp-room="rabbit-hole"]) .pieces.stories { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 14px; }
:is([data-swamp-room="secret-library"], [data-swamp-room="rabbit-hole"]) .pieces.stories li, :is([data-swamp-room="secret-library"], [data-swamp-room="rabbit-hole"]) .pieces.stories li:last-child {
  border: 1px solid var(--cardLine); border-radius: 14px; background: color-mix(in srgb, var(--card) 70%, transparent); }
:is([data-swamp-room="secret-library"], [data-swamp-room="rabbit-hole"]) .pieces.stories a { padding: 12px 14px; height: 100%; box-sizing: border-box; }
/* the Unfinished: as many cards to a row as the window holds */
[data-swamp-room="unfinished"] .unf { max-width: none; }
[data-swamp-room="unfinished"] .unf-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); }
/* the Almanac: its sections side by side across the window */
[data-swamp-room="almanac"] .activity { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 0 36px; align-items: start; }
[data-swamp-room="almanac"] .alm-note { grid-column: 1 / -1; }
[data-swamp-room="almanac"] .alm { max-width: none; margin: 12px 0 0; }
/* the Weather Station: the instruments in the middle of the window, the talk filling its height */
[data-swamp-room="weather-station"] .activity { justify-content: center; }
[data-swamp-room="weather-station"] .wx-card { max-width: min(1000px, 100%); }
[data-swamp-room="weather-station"] .wx-chat { min-height: calc(100dvh - 190px); display: flex; flex-direction: column; }
[data-swamp-room="weather-station"] .wx-chat .wx-log { flex: 1; max-height: calc(100dvh - 300px); }
[data-swamp-room="weather-station"] .wx-result { max-width: min(1100px, 100%); }
/* the Exquisite Corpse: the story fills the window's height; your turn beside it on a wide screen */
[data-swamp-room="exquisite-corpse"] .corpse { max-width: none; width: 100%; }
[data-swamp-room="exquisite-corpse"] .cx-story { max-height: none; height: calc(100dvh - 330px); min-height: 260px; }
[data-swamp-room="exquisite-corpse"] .cx-story > * { max-width: 72ch; margin-left: auto; margin-right: auto; }
[data-swamp-room="exquisite-corpse"] :is(.cx-how, .cx-small) { max-width: 90ch; }
@media (max-width: 760px) { [data-swamp-room="exquisite-corpse"] .cx-story { height: 46vh; } }
@media (min-width: 1000px) {
  [data-swamp-room="exquisite-corpse"] .corpse { display: grid; grid-template-columns: minmax(0, 1fr) min(440px, 34vw); gap: 0 26px; align-items: start; }
  [data-swamp-room="exquisite-corpse"] .cx-how, [data-swamp-room="exquisite-corpse"] .cx-small { grid-column: 1 / -1; }
  [data-swamp-room="exquisite-corpse"] .cx-story-wrap { grid-column: 1; margin: 6px 0 12px; }
  [data-swamp-room="exquisite-corpse"] .cx-pen { grid-column: 2; margin-top: 6px; }
  [data-swamp-room="exquisite-corpse"] .cx-story { height: calc(100dvh - 270px); }
}

/* ---- Eden's real sky (19 Oct 2026): what it is and where it comes from, the names of the bright stars, and one line on
   the first dark visit saying the stars are real (his words: "Make sure it is at least credited that it is the actual
   night sky somewhere, so people know to look and explore") ---- */
.eden-sky { position: absolute; left: 12px; top: calc(68px + env(safe-area-inset-top, 0px)); width: min(380px, calc(100vw - 24px)); max-height: calc(100% - 140px); overflow-y: auto; box-sizing: border-box;
  padding: 12px 16px 14px; border-radius: 14px; background: rgba(12, 10, 22, .78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .2);
  color: #e9e3f7; font: 14.5px/1.5 Georgia, serif; z-index: 4; }
.eden-sky[hidden] { display: none; }
.eden-sky h2 { margin: 0 0 6px; font: 600 18px/1.3 Fraunces, Georgia, serif; color: #f2ecff; }
.eden-sky p { margin: 0 0 8px; }
.eden-sky .sky-wx { color: #cfe0ff; }
.eden-sky .sky-small { font-size: 12.5px; color: #b9b0d6; margin: 6px 0 0; }
.eden-sky a { color: #cfc3ff; }
.eden-sky .sky-names { font: 14px Georgia, serif; color: #ece6f6; background: rgba(190, 92, 255, .18); border: 1px solid rgba(190, 92, 255, .6); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.eden-sky .sky-names[aria-pressed="true"] { background: #BE5CFF; color: #1a0f26; }
.eden-sky .sky-names:focus-visible { outline: 2px solid #f2ecff; outline-offset: 2px; }
.star-tags { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 2; }
.star-tags span { position: absolute; left: 0; top: 0; margin: 8px 0 0 8px; font: italic 13px Georgia, serif; color: #f2ecff; text-shadow: 0 0 4px #000, 0 0 2px #000; white-space: nowrap; }
.star-tags span[hidden] { display: none; }
.sky-hint { position: absolute; left: 50%; top: calc(64px + env(safe-area-inset-top, 0px)); transform: translateX(-50%); margin: 0; padding: 8px 16px; border-radius: 999px; background: rgba(12, 10, 22, .62);
  color: #f2ecff; font: italic 15px Georgia, serif; pointer-events: none; transition: opacity 1.6s ease; z-index: 3; max-width: calc(100vw - 32px); text-align: center; }
.sky-hint[hidden] { display: none; } .sky-hint.gone { opacity: 0; }
@media (pointer: coarse) { .eden-sky { top: auto; bottom: calc(118px + env(safe-area-inset-bottom, 0px)); max-height: 50vh; } .sky-hint { top: calc(110px + env(safe-area-inset-top, 0px)); } }
