/* 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 swamp ---- */
.swamp { position: fixed; inset: 0; overflow: hidden; }
.swamp-view { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.swamp-view:active { cursor: grabbing; }
.swamp .veil { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .7s ease; }
.swamp-help { position: absolute; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); margin: 0;
              color: #e8e2d6; font: 15px Georgia, serif; text-shadow: 0 1px 6px rgba(0,0,0,.8); transition: opacity 1.2s; pointer-events: none; text-align: center; width: min(92vw, 520px); }
.swamp-help.gone { opacity: 0; }
.lanterns { position: absolute; top: 12px; right: 12px; max-height: calc(100% - 24px); overflow: auto; }
.lanterns ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.lanterns button, .lanterns summary { font: 14px Georgia, serif; color: #e8e2d6; background: rgba(10,8,14,.55); border: 1px solid rgba(255,255,255,.22); border-radius: 999px;
                   padding: 6px 12px; cursor: pointer; text-align: left; }
.lanterns summary { list-style: none; width: max-content; margin-left: auto; }
.lanterns summary::-webkit-details-marker { display: none; }
.lanterns summary::after { content: " ▾"; } .lanterns details[open] summary::after { content: " ▴"; }
.lanterns button:hover, .lanterns button:focus-visible, .lanterns summary:hover, .lanterns summary:focus-visible { border-color: #BE5CFF; outline: none; }
.dockbar { position: absolute; left: 50%; top: 18px; transform: translateX(-50%); text-align: center; background: rgba(10,8,14,.62);
           border: 1px solid rgba(255,255,255,.22); border-radius: 14px; padding: 10px 16px 12px; color: #e8e2d6; }
.dockbar .dock-name { margin: 0 0 8px; font: 600 20px/1.2 Fraunces, Georgia, serif; color: #f0e8ff; }
.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(232,226,214,.55); }
@media (pointer: coarse) { .thumbpad { display: block; } .lanterns { top: auto; bottom: calc(60px + env(safe-area-inset-bottom, 0px)); } }
.lost { position: absolute; inset: 0; overflow: auto; background: color-mix(in srgb, var(--bg) 94%, transparent); padding: 24px 16px 40px; z-index: 10; }
.lost h2, .lost > p { text-align: center; max-width: 640px; margin-left: auto; margin-right: auto; }
.lost .stay { display: block; margin: 18px auto 0; }
.no3d { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; padding: 24px; background: var(--bg); }
.no3d[hidden] { display: none; }

/* ---- a room past the glasses ---- */
.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)); }
.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; }
@media (prefers-reduced-motion: reduce) { body::after, .swamp .veil, .swamp-help { 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: bookcases of three shelves, five books to a shelf, newest first; when one fills, the next
   stands beside it (3 Oct: "an expandable library"). Real cloth and leather spines with gilt bands and titles, and a
   library's coloured sticker at the foot of each spine for its kind. A book opens as a page of paper. ---- */
.lib-note { color: var(--subhead); font-style: italic; text-align: center; margin: 0 0 14px; max-width: 640px; }
.shelf-wrap { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.shelf-wrap[hidden], .lib-note[hidden] { display: none; }
/* a shelf to each maker (5 Oct: "The Secret Library needs to be expandable"), their bookcases side by side beneath the name */
.maker { width: 100%; display: flex; flex-direction: column; align-items: center; }
.maker + .maker { margin-top: 18px; }
.maker-h { font: 600 22px/1.2 Georgia, serif; letter-spacing: .03em; color: var(--heading, #BE5CFF); margin: 0; text-align: center; }
.maker-by { color: var(--muted); font-style: italic; font-size: 15px; margin: 2px 0 16px; text-align: center; }
.maker .cases { width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.bookcase { position: relative; width: min(100%, 400px); box-sizing: border-box; padding: 26px 18px 18px; border-radius: 4px 4px 2px 2px;
            /* oak: the grain is fine lines over warm brown, lit from the upper left */
            background: repeating-linear-gradient(92deg, rgba(0,0,0,0) 0 7px, rgba(60,30,10,.12) 7px 8px, rgba(0,0,0,0) 8px 19px, rgba(255,220,170,.06) 19px 20px),
                        linear-gradient(160deg, #8a5a33, #6b4325 45%, #5a371d 75%, #4a2d17);
            box-shadow: inset 0 2px 0 rgba(255,225,180,.25), inset 2px 0 0 rgba(255,225,180,.12), inset -3px 0 0 rgba(0,0,0,.35),
                        0 26px 30px -14px rgba(0,0,0,.65), 0 4px 10px rgba(0,0,0,.35); }
/* the crown along the top */
.bookcase::before { content: ""; position: absolute; left: -8px; right: -8px; top: -12px; height: 16px; border-radius: 3px 3px 1px 1px;
                    background: linear-gradient(#a4703f, #7a4f2b 55%, #5a3a1f); box-shadow: 0 3px 4px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,230,190,.35); }
.shelf-row { position: relative; list-style: none; margin: 0 0 18px; padding: 10px 10px 0; display: flex; justify-content: center; align-items: flex-end; gap: 3px; min-height: 196px;
             /* the dark back of the case, with lamplight falling into it from above */
             background: radial-gradient(ellipse at 50% 0%, rgba(255,214,150,.16), transparent 70%), linear-gradient(#2a1a0f, #1c120a);
             box-shadow: inset 0 10px 14px -6px rgba(0,0,0,.75), inset 6px 0 10px -6px rgba(0,0,0,.6), inset -6px 0 10px -6px rgba(0,0,0,.6); }
/* the shelf board each row stands on: its front edge catches the light */
.shelf-row::after { content: ""; position: absolute; left: -6px; right: -6px; bottom: -14px; height: 14px; border-radius: 1px;
                    background: linear-gradient(#b07b48, #8a5a33 30%, #6b4325); box-shadow: 0 6px 8px -2px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,232,196,.45); }
.shelf-row.bare { min-height: 120px; }
.shelf-row:last-child { margin-bottom: 14px; }
.spine { position: relative; width: var(--w, 52px); height: var(--h, 160px); padding: 18px 0 30px; cursor: pointer; border: 0; border-radius: 3px 3px 1px 1px;
         /* cloth over a rounded spine: dark at both edges, lit just left of centre */
         background: linear-gradient(90deg, rgba(0,0,0,.5), rgba(0,0,0,.08) 22%, rgba(255,255,255,.14) 40%, rgba(0,0,0,0) 58%, rgba(0,0,0,.42)),
                     repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, rgba(0,0,0,.03) 1px 3px), var(--cloth, #4a2466);
         box-shadow: 0 0 0 1px rgba(0,0,0,.35), 2px 0 4px rgba(0,0,0,.45);
         transition: transform .2s ease; display: flex; align-items: center; justify-content: center; }
/* gilt bands near the head and the foot */
.spine::before, .spine::after { content: ""; position: absolute; left: 4px; right: 4px; height: 3px; border-top: 1px solid rgba(232,200,120,.85); border-bottom: 1px solid rgba(232,200,120,.85); }
.spine::before { top: 9px; } .spine::after { bottom: 22px; }
.spine .st { writing-mode: vertical-rl; font: 600 13px/1.15 Georgia, serif; letter-spacing: .05em; color: #ecd9a6; max-height: 100%; overflow: hidden;
             text-shadow: 0 1px 0 rgba(0,0,0,.6), 0 0 1px rgba(255,236,180,.4); }
.spine:hover, .spine:focus-visible { transform: translateY(-12px); outline: 2px solid #BE5CFF; outline-offset: 2px; }
/* the kind's sticker, a library label at the foot of the spine */
.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); }
.spine .sticker { position: absolute; left: 50%; bottom: 6px; margin-left: -6.5px; }
.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 book shelved this week wears a paper tag on a string (shelf.js adds it) */
.new-tag { position: absolute; top: -9px; right: -10px; transform: rotate(14deg); font: italic 11px/1 Georgia, serif; color: #2b2114; background: #f6efdc;
           padding: 3px 5px 4px; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.5); pointer-events: none; }
.bookend { width: 22px; height: 74px; align-self: flex-end; margin-left: 6px; border-radius: 3px 10px 0 0;
           background: linear-gradient(90deg, #6d5527, #d9b768 40%, #8c6a2b); box-shadow: 2px 0 4px rgba(0,0,0,.5); }
.kinds { list-style: none; width: 100%; margin: 4px 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 { 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; }
.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: 430px) { .spine { width: calc(var(--w, 52px) - 6px); } .bookcase { padding: 24px 12px 14px; } .shelf-row { gap: 3px; padding: 10px 4px 0; } .book .page { font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { .spine { transition: none; } .spine:hover, .spine:focus-visible { transform: none; } }

/* ---- 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 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-consent label { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0; cursor: pointer; }
.wx-consent input[type=checkbox] { margin-top: 5px; width: 18px; height: 18px; flex: none; accent-color: #BE5CFF; }
.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-add { cursor: pointer; }
.wx-thumbs { list-style: none; padding: 0; margin: 8px 0; display: flex; gap: 10px; flex-wrap: wrap; }
.wx-thumbs li { position: relative; }
.wx-thumbs img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; display: block; border: 1px solid var(--cardLine); }
.wx-x { position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--cardLine); background: var(--card); color: var(--ink); cursor: pointer; }
.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; }
