:root {
  --ink: #f1f4fc;
  --soft: #cfd7ee;
  --mute: #aab4d4;
  --gold: #f4c463;
  --gold2: #ffdf9a;
  --glass-bg: linear-gradient(180deg, rgba(24, 28, 64, 0.44), rgba(12, 15, 38, 0.54));
  --glass-line: rgba(220, 228, 255, 0.16);
  --radius: 18px;
  --serif: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --ui: var(--serif); /* one typeface for the whole page; the levels differ by size, weight, capitals and italic */
  --ts: 1;
  --sheet: 0px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #03050f; color: var(--ink); }
body { font: 18px/1.4 var(--ui); -webkit-font-smoothing: antialiased; }
/* EB Garamond's lowercase is small (0.405 of its size; Source Serif's was 0.452), so text is drawn with lowercase 0.445 of
   its size, about one size up, and small text reads as easily as before. !important because every `font:` shorthand on
   the page would reset it. The area names and the big titles keep the font's own size. (sky.js and app.js measure
   text on a canvas, which ignores this, and scale by 0.445 / 0.405 to match.) */
*, *::before, *::after, ::placeholder { font-size-adjust: 0.445 !important; }
.area, #brand, #ptitle, #card .ctt, #loading .lt, #loading .ltag { font-size-adjust: none !important; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--gold2); outline-offset: 3px; border-radius: 12px; }

/* one glass style for every piece of chrome: see-through, the sky behind it blurred with its colours kept, a thin light
   line along the top edge and a fainter one round the rest */
.glass {
  background: var(--glass-bg); border: 1px solid rgba(220, 228, 255, 0.09); border-top-color: rgba(235, 240, 255, 0.24); border-radius: var(--radius);
  backdrop-filter: blur(26px) saturate(165%); -webkit-backdrop-filter: blur(26px) saturate(165%);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.round { width: 48px; height: 48px; border-radius: 50%; display: inline-grid; place-items: center; cursor: pointer; padding: 0; }
.round svg { width: 22px; height: 22px; }
.round:hover { background: rgba(60, 70, 120, 0.7); }

/* ---------- the sky ---------- */
#stage { position: fixed; inset: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
#stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* a soft night fade behind the header, so its words stay readable over bright stars */
#stage::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 170px; pointer-events: none;
  background: linear-gradient(rgba(3, 5, 15, 0.7), rgba(3, 5, 15, 0.35) 55%, rgba(3, 5, 15, 0)); }
#gl { cursor: grab; }
#gl.dragging { cursor: grabbing; }
#fx, #areas { pointer-events: none; }
#areas { position: absolute; inset: 0; overflow: hidden; }
.blabel {
  position: absolute; left: 0; top: 0; white-space: nowrap; pointer-events: none; opacity: 0; will-change: transform, opacity; transform-origin: 50% 50%;
  font: 600 calc(15px * var(--ts)) / calc(20px * var(--ts)) var(--serif); color: #e7ecfa; letter-spacing: 0.01em;
  text-shadow: 0 0 6px #03050f, 0 0 3px #03050f, 0 0 1px #03050f;
}
.blabel:not(.gold):not(.sel) { font-size: calc(14px * var(--ts)); color: rgba(231, 236, 250, 0.7); } /* plain titles: smaller and dimmer than the covers' titles and the area names */
.blabel.gold { color: var(--gold2); }
.blabel.sel { color: #fff; }
.area {
  position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; transition: color 0.3s; pointer-events: none; will-change: transform, opacity; transform-origin: 50% 50%;
  font: 500 calc(15px * var(--ts)) / 1 var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: rgba(214, 224, 255, 0.7);
  text-shadow: 0 0 8px #03050f, 0 0 3px #03050f; padding: 14px 10px; border-radius: 12px;
}
.area.top { font-size: calc(16px * var(--ts)); color: rgba(226, 233, 255, 0.82); }
.area.on { pointer-events: auto; cursor: pointer; }
.area.on.wm { pointer-events: none; } /* zoomed in, the faint names don't block the magnifier */
.area.on:hover, .area.hov { color: #fff; }
.area.big { font-size: calc(20px * var(--ts)); color: #fff; }
/* zoomed out the big areas lead: larger, brighter, tinted with the area's colour, with a soft halo */
.area.top.lead { font-size: calc(18px * var(--ts)); letter-spacing: 0.28em; font-weight: 700; color: color-mix(in srgb, var(--ac, #fff) 28%, #fff);
  text-shadow: 0 0 14px rgba(3, 5, 15, 0.95), 0 0 6px #03050f, 0 0 2px #03050f; }
.area.sub.lead { font-size: calc(17px * var(--ts)); color: #f1f4ff; text-shadow: 0 0 12px #03050f, 0 0 6px #03050f, 0 0 2px #03050f, 0 0 1px #000; }
.area.con { letter-spacing: 0.14em; color: rgba(244, 222, 176, 0.88); font-size: calc(14.5px * var(--ts)); }
.area.con:hover { color: #ffe9bf; }

/* a cover anywhere in the chrome: the atlas copy as the background, the sharp picture over it.
   With neither, the stand-in below. */
.cvbox { position: relative; display: inline-block; flex: none; overflow: hidden; background-repeat: no-repeat; background-color: transparent; }
.cvbox img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity 0.18s ease-out; }
.cvbox img.ok { opacity: 1; }
.cvbox.fresh { animation: fadein 0.18s ease-out both; }
.cvbox.none { display: none !important; }
/* no picture (yet, or at all): the box keeps its size and shows a plain cloth-bound book, the same everywhere and like
   the magnifier's title card: a board washed in the area's colour, a thin frame set in from the edge, a small star and
   two short rules where a title block would be; in a box big enough to read it (the book card), the short title inside
   the frame instead. A real cover fades in over it. (A single big letter read as a picture that failed to load.) */
.cvbox.glyph { container-type: size; display: inline-grid; place-items: center; text-align: center; color: #f1f3fb; overflow: hidden;
  background:
    linear-gradient(rgba(241, 236, 252, 0.5), rgba(241, 236, 252, 0.5)) 50% 66% / 46% 1px no-repeat,
    linear-gradient(rgba(241, 236, 252, 0.32), rgba(241, 236, 252, 0.32)) 50% 72% / 30% 1px no-repeat,
    linear-gradient(160deg, color-mix(in srgb, var(--ac, #8f9bd0) 46%, #171d42), #0c1130) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ac, #8f9bd0) 40%, transparent), 0 2px 8px rgba(0, 0, 0, 0.35) !important; }
.cvbox.glyph::after { content: ""; position: absolute; inset: 7%; border: 1px solid rgba(241, 236, 252, 0.28); border-radius: 2px; pointer-events: none; }
.cvbox.glyph::before { content: "\2726"; margin-bottom: 26%; font: 400 24cqh/1 var(--serif); font-size-adjust: none !important; color: rgba(255, 236, 200, 0.85); }
#card .ccv.glyph { background: linear-gradient(160deg, color-mix(in srgb, var(--ac, #8f9bd0) 46%, #171d42), #0c1130) !important; } /* (its title, no rules) */
@container (min-width: 72px) {
  .cvbox.glyph::before { content: attr(data-t); color: #f1f3fb; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden;
    margin: 0 14%; font: 600 14cqw/1.18 var(--serif); overflow-wrap: anywhere; text-shadow: 0 1px 6px rgba(3, 5, 15, 0.6); }
}

/* covers in the sky (placed by sky.js): large for the best-known few, small for the rest, smaller
   still in the magnifier. Each shows only once a real picture has loaded. */
/* the sky's labels are moved, faded and scaled by sky.js every frame (no CSS transitions on them) */
.cov { position: absolute; left: 0; top: 0; text-align: center; pointer-events: none; opacity: 0; will-change: transform, opacity; transform-origin: 50% 30%; }
.cov .art { position: relative; margin: 0 auto; border-radius: 4px; overflow: hidden; background-repeat: no-repeat;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.13), 0 0 16px -3px color-mix(in srgb, var(--ac, #9fb0ff) 55%, transparent);
  transition: width 0.2s, height 0.2s, box-shadow 0.3s; }
/* a thin sheen of light across the top of each cover, as on glass */
.cov .art::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.04) 32%, transparent 55%); }
.cov .art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.18s; }
.cov .art img.ok { opacity: 1; }
.cov .ctl { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 5px;
  font: 600 calc(15px * var(--ts)) / calc(19px * var(--ts)) var(--serif); color: #eef1fb; text-shadow: 0 0 6px #03050f, 0 0 3px #03050f, 0 0 2px #03050f, 0 0 1px #03050f; } /* (a close halo twice over: Garamond's thin strokes over bright stars) */
.cov.sm .ctl { font-size: calc(14px * var(--ts)); }
.cov.l1 .ctl { display: block; white-space: nowrap; text-overflow: ellipsis; }
.cov.nt .ctl { display: none; }
/* a book with no cover in the magnifier: its title in a small pill, with a star in its area's colour */
.pill { position: absolute; left: 0; top: 0; pointer-events: none; opacity: 0; white-space: nowrap; will-change: transform, opacity; transform-origin: 50% 50%;
  padding: 3px 10px; border-radius: 13px; background: rgba(14, 18, 42, 0.62); border: 1px solid rgba(220, 228, 255, 0.12); border-top-color: rgba(235, 240, 255, 0.24);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font: 600 calc(14px * var(--ts)) / calc(18px * var(--ts)) var(--serif); color: #eef1fb; }
.pill::before { content: "✦ "; color: var(--ac, #cfd7ee); }
.cov.lensed, .pill.lensed { z-index: 2; }
.cov.gold .art { box-shadow: 0 5px 16px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 214, 140, 0.75), 0 0 20px 1px rgba(255, 200, 110, 0.45); }
/* the hovered book's cover, when it is already showing: enlarged in place (sky.js sizes it), on top, a gold ring,
   and its whole title (two lines) with the author and year under it on a soft dark backing; no second picture */
.cov.hk { z-index: 300 !important; }
.cov.hk .art { transition: none; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 220, 150, 0.85), 0 0 26px 3px rgba(255, 205, 120, 0.4); }
.cov .cby { display: none; }
.cov.hot .cwrap { width: fit-content; max-width: 100%; margin: 6px auto 0; padding: 4px 9px 5px; border-radius: 8px; background: rgba(12, 16, 40, 0.55);
  -webkit-backdrop-filter: blur(12px) saturate(150%); backdrop-filter: blur(12px) saturate(150%); border-top: 1px solid rgba(235, 240, 255, 0.18);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35); }
.cov.hot .ctl, .cov.hot.nt .ctl, .cov.hot.l1 .ctl { display: -webkit-box; -webkit-line-clamp: 2; white-space: normal; margin: 0; text-shadow: none;
  font-size: calc(14px * var(--ts)); line-height: 1.2; color: #f1f3fb; }
.cov.hot .cby { display: block; margin-top: 2px; font: 400 calc(12.5px * var(--ts)) / 1.3 var(--ui); color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cov.gold .ctl { color: var(--gold2); }

/* the focus in the magnifier: the book nearest the cursor, big, on top of the other covers */
.focus { position: absolute; left: 0; top: 0; z-index: 200; width: 200px; pointer-events: none; will-change: transform; }
.focus.on { pointer-events: auto; cursor: pointer; }
body.touchsky .focus.on { pointer-events: none; } /* (a finger's touches reach the map; a tap on it is caught there) */
.focus .fin { display: flex; flex-direction: column; align-items: center; opacity: 0; scale: 0.94; transform-origin: 50% 100%;
  transition: opacity 0.12s ease-out, scale 0.12s ease-out; }
.focus.on .fin { opacity: 1; scale: 1; }
.focus .fart { position: relative; border-radius: 5px; overflow: hidden; background-repeat: no-repeat; flex: none;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.3); }
.focus .fart img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.focus .fart img.late { opacity: 0; transition: opacity 0.18s; }
.focus .fart img.late.ok { opacity: 1; }
.focus .fcard { display: none; }
.focus .fart.card { display: flex; align-items: center; justify-content: center; padding: 10px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--ac) 38%, #141a3c), #0d1230); }
.focus .fart.card .fcard { display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere;
  font: 600 14px/1.22 var(--serif); color: #f1f3fb; text-align: center; }
.focus .ftxt { margin-top: 6px; max-width: 100%; padding: 5px 10px 6px; border-radius: 10px; text-align: center;
  background: rgba(10, 14, 34, 0.84); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45); }
.focus .ft { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font: 600 calc(16px * var(--ts)) / 1.2 var(--serif); color: #f1f3fb; }
.focus .fab { margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--soft); }
.focus .fa { font-size: calc(14px * var(--ts)); }
.focus .fy { font-size: calc(12.5px * var(--ts)); color: var(--mute); }
body.still .focus .fin { scale: 1; transition: opacity 0.08s; }


/* ---------- top: name, the one search pill, a quiet suggestion line ---------- */
#top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 8; pointer-events: none; /* above the book card, so the box and its list always show */
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 0; display: flex; align-items: flex-start; gap: 16px; zoom: var(--ts);
}
#brand { flex: 0 0 auto; margin: 12px 0 0 6px; padding: 0; font: 600 24px/1 var(--serif); letter-spacing: 0.02em; color: rgba(241, 244, 252, 0.92); white-space: nowrap; }
/* the mark: a small spiral galaxy (scripts/make_mark.py); the name is there for screen readers and as a tooltip */
#brand img { display: block; width: 44px; height: 44px; filter: drop-shadow(0 0 9px rgba(196, 176, 255, 0.38)); }
#center { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; }
#topspace { flex: 0 1 150px; }
#pill {
  pointer-events: auto; width: min(700px, 100%); min-height: 60px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 6px 8px 6px 14px; border-radius: 30px;
}
#pill:focus-within { border-color: rgba(244, 196, 99, 0.6); }
#pill.full #inputwrap { flex-basis: 100%; }
#pill .sic { width: 22px; height: 22px; color: var(--mute); flex: none; }
#chips { display: contents; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 46px; padding: 0 2px; border-radius: 23px; max-width: 100%;
  background: rgba(244, 196, 99, 0.13); border: 1px solid rgba(244, 196, 99, 0.55);
}
.chip.neg { background: rgba(150, 168, 220, 0.13); border-color: rgba(170, 186, 232, 0.6); }
.chip.unknown { border-style: dashed; opacity: 0.8; }
.chip.err { border-color: #ef8b97; box-shadow: 0 0 0 1px rgba(239, 139, 151, 0.6); } /* the book or word the book math named in its message */
.chip .sg { width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer; background: rgba(244, 196, 99, 0.24); color: var(--gold2); font: 700 24px/1 var(--ui); }
.chip.neg .sg { background: rgba(170, 186, 232, 0.22); color: #e3e9ff; }
.chip .cv { width: 24px; height: 36px; border-radius: 3px; }
.chip .nm { font: 600 18px/1.1 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; padding: 0 2px; }
.chip.word .nm { font: 400 18px/1.1 var(--ui); }
.chip .x { width: 42px; height: 42px; border: none; background: none; color: #e4e9f7; font-size: 24px; cursor: pointer; border-radius: 50%; }
.chip .x:hover, .chip .sg:hover { background: rgba(255, 255, 255, 0.14); }
/* the field is its own clearly drawn box inside the pill, so aiming at the pill means typing */
#inputwrap { flex: 1 1 150px; min-width: 140px; height: 46px; border-radius: 23px; cursor: text; background: rgba(255, 255, 255, 0.08); border: 2px solid rgba(220, 228, 250, 0.42);
  display: flex; align-items: center; }
/* the +/− for the next term, at the left inside the box */
#sgn { flex: none; width: 32px; height: 32px; margin-left: 6px; border-radius: 50%; border: none; cursor: pointer; padding: 0;
  background: rgba(244, 196, 99, 0.2); color: var(--gold2); font: 700 20px/1 var(--ui); }
#sgn.neg { background: rgba(170, 186, 232, 0.22); color: #e3e9ff; }
#sgn:hover { background: rgba(244, 196, 99, 0.32); }
#sgn.neg:hover { background: rgba(170, 186, 232, 0.34); }
#inputwrap:focus-within { border-color: var(--gold); background: rgba(255, 255, 255, 0.12); }
#q { flex: 1; min-width: 0; height: 100%; border: none; outline: none; background: transparent; color: var(--ink); font: 400 19px/1 var(--ui); padding: 0 14px 0 10px; cursor: text; }
#q::placeholder { color: #d0d8ee; opacity: 1; }
#clear { width: 34px; height: 34px; margin-right: 5px; border-radius: 50%; border: 1px solid var(--glass-line); background: none; color: #e4e9f7; cursor: pointer; display: grid; place-items: center; flex: none; }
#clear svg { width: 16px; height: 16px; }
#clear:hover { background: rgba(255, 255, 255, 0.12); }
#acbox { pointer-events: auto; margin: 8px 0 0; width: min(700px, 100%); overflow: hidden; background: rgba(12, 16, 38, 0.96); }
#acbox:has(> #ac[hidden]) { display: none; }
#ac { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow: auto; overscroll-behavior: contain; }
#ac li { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 10px; border-radius: 12px; cursor: pointer; }
#ac li:hover { background: rgba(255, 255, 255, 0.06); }
#ac li.on { background: rgba(244, 196, 99, 0.16); }
#ac li .rt { flex: 1; min-width: 0; }
#ac li .kbd { flex: none; margin-left: auto; padding: 0 4px; font: 600 18px/1 var(--ui); color: var(--gold2); visibility: hidden; }
#ac li.on .kbd { visibility: visible; }
#ac li.lab { min-height: 0; padding: 8px 12px 2px; cursor: default; pointer-events: none; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); }
#ac .tag { font: 400 16px/1 var(--ui); color: #c9d3f2; }
#ac .multi { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 18px; }
#ac .mchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 14px; border: 1px solid rgba(244, 196, 99, 0.5);
  font: 600 17px/1.1 var(--serif); }
#ac .mchip.word { padding-left: 10px; font: 400 17px/1.1 var(--ui); }
#ac .mchip .cv { width: 18px; height: 27px; }
#ac .cv { width: 30px; height: 45px; border-radius: 3px; }
#ac .tt { font: 600 20px/1.15 var(--serif); }
#ac .au { font-size: 17px; color: var(--soft); }
#ac .ttsub { font: 500 17px/1.15 var(--serif); color: var(--soft); }
#ac .near { margin-left: 8px; padding: 1px 7px; border-radius: 9px; border: 1px solid rgba(220, 228, 255, 0.35); font: 400 13px/1.3 var(--ui); color: var(--soft); vertical-align: 2px; }
#ac .wd { font-size: 19px; }
#ac .wd b { color: var(--gold2); font-weight: 700; }
#suggest { pointer-events: auto; margin: 6px 0 0; font-size: 18px; color: var(--soft); text-align: center; text-shadow: 0 0 8px #03050f, 0 0 3px #03050f, 0 0 1px #03050f; }
#suggest .lead { color: var(--soft); font-weight: 500; } /* (the serif's thinner strokes: a step brighter than the muted grey, to read over bright stars) */
#tryit { min-height: 44px; padding: 0 6px; border: none; background: none; cursor: pointer; color: var(--gold2); font: 600 18px/1 var(--ui);
  text-decoration: underline dotted rgba(255, 223, 154, 0.6); text-underline-offset: 6px; }
#tryit:hover { color: #fff1cf; }
#note { pointer-events: auto; margin-top: 8px; padding: 8px 16px; font-size: 18px; }
#note.err { background: rgba(70, 24, 34, 0.9); }
/* undo, for 5 s after removing or flipping a term or clearing the sum */
#toast { pointer-events: auto; display: flex; align-items: center; gap: 14px; margin-top: 8px; padding: 6px 8px 6px 16px; font-size: 17px; }
#toast .undo { min-height: 40px; padding: 0 14px; border: none; border-radius: 20px; background: rgba(244, 196, 99, 0.18); color: var(--gold2); font: 600 17px/1 var(--ui); cursor: pointer; }
#toast .undo:hover { background: rgba(244, 196, 99, 0.3); }
/* the chips: the last one marked by a first Backspace, one that was already there, an example sum */
.chip.armed { box-shadow: 0 0 0 2px var(--gold); }
.chip.pulse { animation: chippulse 0.9s ease-out 1; }
@keyframes chippulse { 0% { box-shadow: 0 0 0 0 rgba(244, 196, 99, 0.9); } 100% { box-shadow: 0 0 0 10px rgba(244, 196, 99, 0); } }
.chip.example { border-style: dashed; }
.chip.example .nm { opacity: 0.85; }
/* waiting for a new answer: the old one stays, dimmed, with a small spinner by the title */
#panel.busy #ptitle::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 10px; vertical-align: 2px; border-radius: 50%;
  border: 2px solid rgba(244, 196, 99, 0.3); border-top-color: var(--gold2); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
body.still #panel.busy #ptitle::after { animation: none; border-color: var(--gold2); border-top-color: rgba(244, 196, 99, 0.3); }
body.still .chip.pulse { animation: none; box-shadow: 0 0 0 2px var(--gold); }

/* ---------- results: a translucent sheet that keeps clear of the answer ---------- */
#panel { position: fixed; right: 16px; top: 120px; bottom: 16px; width: min(calc(380px * var(--ts)), 44vw); z-index: 4; display: flex; flex-direction: column; overflow: hidden; }
#panelgrip { display: none; }
#ptitle { margin: 0; padding: 16px 20px 4px; font: 600 calc(23px * var(--ts)) / 1.2 var(--serif); }
#pstatus { margin: 0; padding: 4px 20px 8px; font-size: calc(18px * var(--ts)); color: var(--gold2); }
#pstatus::before { content: "✦"; display: inline-block; margin-right: 8px; animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: 0.35; transform: scale(0.85); } 50% { opacity: 1; transform: scale(1.1); } }
body.still #pstatus::before { animation: none; }
#panel.busy #results, #panel.busy #imagined, #panel.stale #results, #panel.stale #imagined { opacity: 0.45; transition: opacity 0.3s; }
/* a line for an empty or failed answer (not the busy one): no sparkle, and a way to try again */
#pstatus.msg { color: var(--ink); }
#pstatus.msg::before { content: none; }
#pstatus.err { color: #ffc2ca; }
#pstatus .retry { margin-left: 6px; min-height: 40px; padding: 0 14px; border-radius: 20px; border: 1px solid rgba(244, 196, 99, 0.6); background: rgba(244, 196, 99, 0.14);
  color: var(--gold2); font: 600 16px/1 var(--ui); cursor: pointer; }
#pstatus .retry:hover { background: rgba(244, 196, 99, 0.26); }
#imagined { margin: 0 20px 6px; font-size: calc(18px * var(--ts)); flex: none; }
#imagined summary { min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--soft); list-style: none; border-radius: 12px; padding: 0 6px; margin-left: -6px; width: fit-content; }
#imagined summary::-webkit-details-marker { display: none; }
#imagined summary::before { content: "▸"; color: var(--gold2); transition: transform 0.2s; }
#imagined[open] summary::before { transform: rotate(90deg); }
#imagined summary:hover { background: rgba(255, 255, 255, 0.07); }
#imagined p { margin: 2px 0 8px; padding: 10px 12px; border-left: 2px solid rgba(244, 196, 99, 0.55); line-height: 1.35; background: rgba(255, 255, 255, 0.04); border-radius: 0 12px 12px 0; }
@keyframes rise { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
#results > li, #loved li { animation: rise 0.3s ease-out both; animation-delay: calc(var(--k, 0) * 70ms); } /* (in step with their stars in the sky, sky.js setRoles) */
#results { list-style: none; margin: 0; padding: 8px 10px 14px; overflow: auto; flex: 1; }
#results li.parts { margin: 10px 4px 4px; padding: 10px 6px 4px; border-top: 1px solid var(--glass-line); color: var(--soft); font-size: calc(15px * var(--ts)); }
#results .plab { margin: 0 0 6px; color: var(--mute); }
#results .prow { margin: 0 0 8px; line-height: 1.5; }
#results .pterm { color: var(--ink); font-weight: 600; }
#results .pbook { min-height: 32px; padding: 2px 4px; border: none; border-radius: 8px; background: none; color: var(--soft); font: inherit; text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(220, 228, 255, 0.3); text-underline-offset: 3px; }
#results .pbook:hover { color: var(--ink); background: rgba(255, 255, 255, 0.06); }
#results button.res {
  display: flex; gap: 14px; width: 100%; padding: 10px; border-radius: 14px; align-items: flex-start; text-align: left;
  background: none; border: 1px solid transparent; cursor: pointer; min-height: 48px;
}
#results button.res:hover { background: rgba(255, 255, 255, 0.07); }
#results button.res.first { background: rgba(244, 196, 99, 0.11); border-color: rgba(244, 196, 99, 0.42); }
#results button.res.on { border-color: rgba(255, 255, 255, 0.55); }
#results .cv { width: calc(52px * var(--ts)); height: calc(78px * var(--ts)); border-radius: 4px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5); }
#results .tag { font-size: calc(16px * var(--ts)); color: var(--gold2); letter-spacing: 0.12em; text-transform: uppercase; font-weight: 700; }
#results .tt { font: 600 calc(21px * var(--ts)) / 1.15 var(--serif); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
#results .au { font-size: calc(18px * var(--ts)); color: var(--soft); }
#results .why { font-size: calc(18px * var(--ts)); color: #e3e8f7; margin-top: 4px; line-height: 1.3; transition: opacity 0.6s; }
#results .why.fresh { opacity: 0; transition: none; }
#results button.back { width: 100%; min-height: 48px; margin: 0 0 6px; padding: 8px 12px; border-radius: 14px; border: 1px solid var(--glass-line);
  background: none; color: #e4e9f7; text-align: left; cursor: pointer; font-size: calc(18px * var(--ts)); }
#results button.back:disabled { cursor: default; border-color: transparent; color: var(--soft); }
#results button.back:not(:disabled):hover { background: rgba(255, 255, 255, 0.08); }

/* ---------- the selected book: a card along the bottom, like a planetarium app ---------- */
#card { position: fixed; z-index: 6; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%);
  width: min(calc(560px * var(--ts)), calc(100vw - 24px)); max-height: calc(100vh - 140px); overflow: auto; padding: 16px 18px 14px; } /* (layout() sets the real max-height) */

/* ---------- small round controls in one corner; text size and motion under settings ---------- */
#ctl { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 5; display: flex; flex-direction: column; gap: 10px; }
#ctl .round { color: var(--ink); }
#settings { position: fixed; left: 76px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 7; padding: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 18px; }
#settings .srow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
#settings .srow span { margin-right: 6px; color: var(--soft); }
#settings button { min-width: 52px; height: 48px; padding: 0 14px; border-radius: 24px; border: 1px solid rgba(220, 228, 255, 0.35); background: rgba(255, 255, 255, 0.06); cursor: pointer; }
#settings button:hover { background: rgba(255, 255, 255, 0.14); }
#settings button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold2); }
#settings button:disabled { opacity: 0.45; cursor: default; }
#setb[aria-expanded="true"], #lensb[aria-pressed="true"] { border-color: var(--gold); color: var(--gold2); }

/* "you are here", zoomed in: the area around the middle of the view */
#here { position: fixed; left: 18px; top: 130px; z-index: 4; display: flex; align-items: center; gap: 9px; max-width: calc(100vw - 36px); padding: 6px 14px 6px 10px;
  border-radius: 16px; background: rgba(12, 16, 38, 0.6); border: 1px solid rgba(220, 228, 255, 0.12); pointer-events: none;
  font: 600 calc(13px * var(--ts)) / 1.2 var(--ui); letter-spacing: 0.04em; color: #e3e9fb; padding: 4px 11px 4px 9px;
  opacity: 0; translate: 0 -4px; transition: opacity 0.4s ease-out, translate 0.2s ease-out, top 0.2s ease-out; }
#here.show { opacity: 1; translate: 0 0; }
#here .hdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
#here .htxt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* the book's area, in the card */
/* the small map of the whole galaxy, top-right of the sky, always there: the glow in the areas' colours and a gold
   box for the view, translucent, no words; click or drag it to move; the − folds it to a small button (remembered) */
#minimap { position: fixed; z-index: 4; top: 130px; right: 16px; width: 150px; height: 150px; padding: 0; overflow: hidden; border-radius: 12px; cursor: pointer;
  background: rgba(8, 11, 28, 0.32); border: 1px solid rgba(220, 228, 255, 0.1); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: width 0.2s ease-out, height 0.2s ease-out, opacity 0.2s, top 0.2s ease-out, right 0.2s ease-out; touch-action: none; }
#minimap canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.2s; }
#minimap .mmv { pointer-events: none; }
#mmtoggle { position: absolute; right: 0; top: 0; width: 32px; height: 32px; padding: 0; border: none; border-radius: 0 12px 0 10px; background: rgba(10, 14, 34, 0.55);
  color: var(--soft); cursor: pointer; display: grid; place-items: center; opacity: 0.6; transition: opacity 0.15s; }
#mmtoggle svg { width: 16px; height: 16px; }
#mmtoggle .mmshow { display: none; }
#minimap:hover #mmtoggle, #mmtoggle:focus-visible, body.touchsky #mmtoggle { opacity: 1; }
#mmtoggle:focus-visible { outline: 2px solid var(--gold); outline-offset: -3px; }
#results button:focus-visible, #loved button:focus-visible, #arealist button:focus-visible, #settings button:focus-visible, #savedlist button:focus-visible { outline-offset: -3px; } /* inside a scrolling list: the ring goes inside, so the list's edge can't cut it */
#minimap.small { width: 34px; height: 34px; border-radius: 10px; }
#minimap.small canvas { opacity: 0; }
#minimap.small #mmtoggle { width: 100%; height: 100%; border-radius: 10px; background: none; opacity: 1; color: rgba(231, 236, 250, 0.82); }
#minimap.small #mmtoggle .mmhide { display: none; }
#minimap.small #mmtoggle .mmshow { display: block; width: 18px; height: 18px; }
#minimap.cramped { opacity: 0; pointer-events: none; } /* a phone with no room left for it */
/* the Areas list (and the saved books list, laid out the same) */
#arealist, #savedlist { position: fixed; left: 76px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 7; width: min(calc(420px * var(--ts)), calc(100vw - 100px));
  max-height: min(72vh, 760px); overflow: auto; padding: 10px; }
#arealist h2, #savedlist h2 { margin: 6px 10px 8px; font: 600 calc(22px * var(--ts)) / 1.2 var(--serif); }
#arealist ul, #savedlist ul { list-style: none; margin: 0; padding: 0; }
#arealist button, #savedlist button { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 48px; padding: 9px 10px; border: none; border-radius: 12px;
  background: none; text-align: left; cursor: pointer; color: var(--ink); }
#arealist button:hover, #arealist button:focus-visible, #savedlist button:hover, #savedlist button:focus-visible { background: rgba(255, 255, 255, 0.08); }
#arealist .adot, #savedlist .adot { width: 14px; height: 14px; border-radius: 50%; flex: none; margin-top: 5px; }
#arealist .aname, #savedlist .aname { display: block; font: 700 calc(18px * var(--ts)) / 1.25 var(--ui); }
#arealist .aex, #savedlist .aex { display: block; font: 400 calc(16px * var(--ts)) / 1.3 var(--ui); color: var(--soft); margin-top: 2px; }
#areasb[aria-expanded="true"] { border-color: var(--gold); }
/* the broad genres in the Areas list, with their big areas under them */
#arealist .agrp + .agrp, with their big areas under them */
#savedlist .agrp + .agrp { margin-top: 4px; }
#arealist button.gname, #savedlist button.gname { display: block; min-height: 40px; padding: 10px 10px 4px; font: 700 calc(13px * var(--ts)) / 1.3 var(--ui); letter-spacing: 0.14em; text-transform: uppercase;
  color: color-mix(in srgb, var(--ac, #fff) 45%, #fff); }
#arealist .agrp ul, #savedlist .agrp ul { list-style: none; margin: 0; padding: 0 0 0 10px; }
/* languages */
#langnudge { pointer-events: auto; margin-top: 8px; min-height: 44px; padding: 0 18px; color: var(--gold2); cursor: pointer; font-size: 18px; }
#langrow { flex-wrap: wrap; max-width: 380px; }
#langrow .langs { display: flex; flex-wrap: wrap; gap: 6px; }
#langrow button[aria-pressed="true"] { border-color: var(--gold); color: var(--gold2); }
.ten, .cten { font-size: calc(16px * var(--ts)); color: var(--mute); margin-top: 1px; }
.cten:empty { display: none; }
#embedcount { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 5; padding: 10px 18px; font-size: 18px; text-align: center; }
/* ---------- the galaxy forming (loading): from the first frame, the deep-space background and a soft picture of the
   galaxy (inline in index.html, placed where the sky's opening view draws it) with the name and a tagline; the sky fades
   in over that same picture, its stars arriving brightest first, and drifts in; then the names, the covers and the
   search box. No progress bar: only a quiet line if it is slow. */
html, body { background: linear-gradient(rgb(4, 6, 18), rgb(10, 8, 26)) #03050f; }
:root { --ldk: 0.8; }
@media (prefers-reduced-motion: reduce) { :root { --ldk: 1; } }
#ldsky { position: fixed; inset: 0; overflow: hidden; pointer-events: none; background: linear-gradient(rgb(4, 6, 18), rgb(10, 8, 26)); }
#ldglow { position: absolute; max-width: none; --s0: calc(var(--ldk) * min(100vw / var(--ldA), 100dvh / var(--ldB)));
  width: calc(var(--s0) * var(--ldH) * 2); height: calc(var(--s0) * var(--ldH) * 2); left: calc(50vw - var(--s0) * var(--ldH)); top: calc(50dvh - var(--s0) * var(--ldH));
  mix-blend-mode: plus-lighter; }
#gl { opacity: 0; transition: opacity 0.5s ease-out; }
body.skyon #gl { opacity: 1; }
#loading { position: fixed; inset: 0; z-index: 9; display: grid; place-content: center; text-align: center; pointer-events: none; transition: opacity 0.7s ease-out; }
/* (until the web font arrives the name and tagline are in Georgia scaled to the same width, so the swap doesn't shift them) */
@font-face { font-family: "MR Title Fallback"; src: local("Georgia Bold"), local("Georgia-Bold"); font-weight: 600; size-adjust: 80.8%; ascent-override: 124.7%; descent-override: 36.9%; line-gap-override: 0%; }
@font-face { font-family: "MR Tag Fallback"; src: local("Georgia Italic"), local("Georgia-Italic"); font-style: italic; size-adjust: 83.4%; ascent-override: 120.8%; descent-override: 35.7%; line-gap-override: 0%; } /* (Georgia sized to EB Garamond's width; the overrides are scaled by size-adjust and come out at EB Garamond's 100.7% and 29.8%) */
#loading .lt { font: 600 clamp(32px, 6vw, 46px) / 1.1 "EB Garamond", "MR Title Fallback", Georgia, serif; letter-spacing: 0.01em; color: #f1f4fc; opacity: 0;
  text-shadow: 0 0 22px rgba(3, 5, 15, 0.95), 0 0 8px #03050f; animation: ldin 0.9s 0.05s ease-out forwards; }
#loading .ltag { margin-top: 10px; font: 400 italic clamp(17px, 2.6vw, 20px) / 1.3 "EB Garamond", "MR Tag Fallback", Georgia, serif; color: #d6ddf2; opacity: 0;
  text-shadow: 0 0 14px #03050f, 0 0 4px #03050f; animation: ldin 0.9s 0.35s ease-out forwards; }
#loading .lt, #loading .ltag { animation-play-state: paused; } /* (they fade in once their font is here, or after half a second) */
body.ldfont #loading .lt, body.ldfont #loading .ltag { animation-play-state: running; }
#loading .lslow { margin-top: 18px; font-size: 15px; line-height: 1.3; color: var(--mute); text-shadow: 0 0 8px #03050f; opacity: 0; transition: opacity 0.6s ease-out; } /* (its room is kept, so showing it moves nothing) */
#loading .lslow.on { opacity: 1; }
@keyframes ldin { from { opacity: 0; translate: 0 6px; } to { opacity: 1; translate: 0 0; } }
body.formed #loading { opacity: 0; }
/* the search box and the rest of the page come in at the end, as the tagline goes */
body.forming #top, body.forming #ctl, body.forming #minimap, body.forming #panel, body.forming #embedcount { opacity: 0; visibility: hidden; }
body.formed #top, body.formed #ctl { transition: opacity 0.6s ease-out; }
body.formed #panel { transition: opacity 0.45s ease-out, filter 0.34s var(--soft-ease), display 0.45s allow-discrete, max-height 0.4s ease; }
body.formed #minimap { transition: opacity 0.6s ease-out, width 0.2s ease-out, height 0.2s ease-out, top 0.2s ease-out, right 0.2s ease-out; }
body.embed #brand { font-size: 20px; }
body.embed #brand img { width: 34px; height: 34px; }
body.no3d #stage { background: radial-gradient(ellipse at 50% 30%, #121a40, #03050f 70%); }
body.no3d #ctl, body.no3d #minimap { display: none; }
@media (max-width: 1100px) and (min-width: 761px) { #topspace { display: none; } }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  /* the suggestion list goes over everything: the round buttons and the small map step aside while it's open */
  body.acopen #ctl, body.acopen #settings, body.acopen #menu, body.acopen #here, body.acopen #minimap { visibility: hidden; }
  #acbox { position: relative; z-index: 6; }
  #top { padding: calc(8px + env(safe-area-inset-top, 0px)) 10px 0; flex-direction: column; align-items: stretch; gap: 0; }
  #topspace { display: none; }
  #brand { margin: 4px 0 8px 6px; font-size: 21px; }
  #brand img { width: 38px; height: 38px; }
  #pill { padding: 5px 6px 5px 12px; gap: 5px; }
  .chip .sg, .chip .x { width: 40px; }
  #suggest { font-size: 17px; }
  #howto { display: none; }
  #panel { left: 0; right: 0; top: auto !important; bottom: 0; width: auto; max-height: 50vh; border-radius: var(--radius) var(--radius) 0 0; padding-bottom: env(safe-area-inset-bottom, 0px); transition: max-height 0.4s ease; }
  #panel.min { max-height: 236px; }
  #panel.min #imagined { display: none; } /* the short sheet shows the sum and the answer */
  #ptitle { touch-action: none; }
  #panelgrip { touch-action: none; }
  body.ctlrow #ctl { flex-direction: row; gap: 8px; } /* no room for the column under a tall box: a row */
  body.ctlrow #settings, body.ctlrow #arealist, body.ctlrow #savedlist { left: 10px; right: 10px; bottom: calc(var(--sheet) + 70px + env(safe-area-inset-bottom, 0px)); }
  body.ctlcramped #ctl, body.ctlcramped #settings { visibility: hidden; } /* not even room for a row: step aside */
  body.popopen #here, body.popopen #minimap { visibility: hidden; } /* Settings or Areas open over them */
  #panelgrip { display: block; height: 30px; border: none; background: none; cursor: pointer; flex: none; }
  #panelgrip span { display: block; width: 52px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.45); margin: 0 auto; }
  #ptitle { padding-top: 0; font-size: calc(20px * var(--ts)); }
  #card { left: 8px; right: 8px; width: auto; transform: none; bottom: calc(var(--sheet) + 8px + env(safe-area-inset-bottom, 0px)); padding: 14px 14px 12px; }
  .chip .nm { max-width: 92px; }
  #inputwrap { flex: 1 1 110px; min-width: 110px; }
  #clear { width: 34px; height: 34px; }
  #ctl { left: auto; right: 10px; bottom: calc(var(--sheet) + 12px + env(safe-area-inset-bottom, 0px)); }
  #settings { left: auto; right: 68px; bottom: calc(var(--sheet) + 12px + env(safe-area-inset-bottom, 0px)); }
  #arealist, #savedlist { left: 10px; right: 68px; width: auto; bottom: calc(var(--sheet) + 12px + env(safe-area-inset-bottom, 0px)); max-height: 60vh; }
  #here { left: 10px; font-size: calc(15px * var(--ts)); }
  #here .htxt { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  #minimap { width: 96px; height: 96px; right: 10px; }
  #mmtoggle { width: 28px; height: 28px; }
  .focus { width: 160px; }
  .focus .fart.card { padding: 6px; }
  .focus .fart.card .fcard { font-size: 12px; -webkit-line-clamp: 5; }
  body.cardopen #ctl, body.cardopen #settings { display: none; }
  #embedcount { bottom: calc(var(--sheet) + 12px + env(safe-area-inset-bottom, 0px)); left: 12px; transform: none; width: calc(100% - 84px); font-size: 17px; }
}
/* reduced motion (the system setting, or "Pause motion"): no slides or glides, just quick fades */
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
body.still #results > li, body.still #loved li { animation: fadein 0.12s ease-out both; animation-delay: 0s; }
/* short screens (200% browser zoom, a phone on its side): the round buttons in a row along the bottom, the
   panels above them; layout() also caps every panel at the room between the header and the buttons */
@media (max-height: 560px) {
  #ctl { flex-direction: row; gap: 8px; }
  #settings, #arealist, #savedlist { left: 16px; bottom: calc(16px + 58px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-height: 560px) and (max-width: 760px) {
  #ctl { right: 10px; left: auto; bottom: calc(var(--sheet) + 10px + env(safe-area-inset-bottom, 0px)); }
  #settings, #arealist, #savedlist { left: 10px; right: 10px; bottom: calc(var(--sheet) + 66px + env(safe-area-inset-bottom, 0px)); }
}
/* Settings and Areas: the panel holds still, its list scrolls inside it */
#settings, #arealist, #savedlist { display: flex; flex-direction: column; overflow: hidden; }
#settings .sscroll { display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
#arealist > ul, #savedlist > ul { overflow-y: auto; overscroll-behavior: contain; flex: 1 1 auto; min-height: 0; }
body.pophere #here, body.popmm #minimap { visibility: hidden; } /* Settings or Areas open over them */
body.acopen #minimap { visibility: hidden; } /* the suggestion list goes over it */

@media (prefers-reduced-motion: reduce) {
  #panel.busy #ptitle::after { animation: none; }
  .chip.pulse { animation: none; box-shadow: 0 0 0 2px var(--gold); }
  * { transition-duration: 0.09s !important; }
  #pstatus::before { animation: none; }
  #results > li, #loved li { animation: fadein 0.12s ease-out both; animation-delay: 0s; }
}

/* titles in any script read in their own direction (Arabic and Hebrew right to left, the "…" at their end) */
.blabel, .cov .ctl, .pill, .focus .ft, #results .tt, #card .ct, .chip .nm, #ac .tt, #loved .lt { unicode-bidi: plaintext; }
/* mid-width windows: with a book open, the small map and "you are here" step aside for the card */
@media (min-width: 761px) and (max-width: 1100px) { body.cardopen #minimap, body.cardopen #here { visibility: hidden; } }
/* "you are here" wraps to two lines on tablets (as on phones) rather than cutting the name */
@media (max-width: 1100px) { #here .htxt { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; } }
/* anything the open card would cover steps aside (measured in layout()) */
.undercard { visibility: hidden !important; }
/* a short card (small screen, big text): its buttons stay in view at the bottom while the rest scrolls */

/* ---------------------------------------------------------------- a calmer page (2026-11-08)
   Only the search box and the sky stay in view: + and − and one menu button, the small map inside the
   Areas panel, "you are here" only while moving, a lighter results list, one border on the search box. */
/* area names: the main way to find your bearings, above the books in the visual order. In the page's serif, with the
   level in the lettering as on an atlas: the broad genres and the big areas in spaced capitals, the small areas in
   italic, the books upright as written. Near-full brightness tinted with the area's colour, a close dark halo */
.area.top.lead { font-size: calc(18px * var(--ts)); letter-spacing: 0.14em; font-weight: 600; color: color-mix(in srgb, var(--ac, #fff) 30%, #fff);
  text-shadow: 0 0 12px rgba(3, 5, 15, 0.85), 0 0 4px rgba(3, 5, 15, 0.95), 0 0 1px #03050f; }
/* small areas (mid zoom): fully opaque italic, a light tint of the area's colour and a close, strong dark halo; one on a
   bright cluster of stars gets a soft dark backdrop (sky.js picks the darkest spot near its densest part first) */
.area.sub.lead { font-size: calc(18px * var(--ts)); letter-spacing: 0.01em; text-transform: none; font-style: italic; font-weight: 500; color: color-mix(in srgb, var(--ac, #fff) 18%, #fff);
  text-shadow: 0 0 1px #03050f, 0 0 2px #03050f, 0 0 3px #03050f, 0 0 6px rgba(3, 5, 15, 0.95), 0 0 12px rgba(3, 5, 15, 0.9), 0 0 22px rgba(3, 5, 15, 0.7); }
.area.sub.lead::before { content: ""; position: absolute; inset: 8px 0; z-index: -1; border-radius: 999px; background: rgba(5, 8, 22, 0.66);
  box-shadow: 0 0 14px 6px rgba(5, 8, 22, 0.5); opacity: 0; transition: opacity 0.3s; }
.area.sub.lead.dark::before { opacity: 1; }
@media (max-width: 760px) { .area.sub.lead { font-size: calc(16px * var(--ts)); } }
.area.top.wm { font-size: calc(13px * var(--ts)); letter-spacing: 0.16em; font-weight: 600; color: color-mix(in srgb, var(--ac, #fff) 35%, #fff); }
/* the broad genres (the whole view): the first names you read, a little larger, tinted with their colour family; a long
   one in two lines */
.area.grp { white-space: pre-line; text-align: center; line-height: 1.2; }
.area.grp.lead { font-size: calc(20px * var(--ts)); letter-spacing: 0.15em; font-weight: 600; color: color-mix(in srgb, var(--ac, #fff) 34%, #fff);
  text-shadow: 0 0 12px rgba(3, 5, 15, 0.85), 0 0 4px rgba(3, 5, 15, 0.95), 0 0 1px #03050f; }
@media (max-width: 760px) { .area.grp.lead { font-size: calc(16px * var(--ts)); letter-spacing: 0.12em; } }
.area { transition: color 0.3s, font-size 0.3s; }
.mini { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: rgba(12, 16, 38, 0.34); border: 1px solid rgba(220, 228, 255, 0.14); color: rgba(231, 236, 250, 0.82);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.mini svg { width: 18px; height: 18px; }
.mini:hover, .mini[aria-expanded="true"] { background: rgba(40, 48, 92, 0.6); color: #fff; }
#ctl { gap: 6px; }
#menu { position: fixed; left: 74px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 9; overflow-y: auto; padding: 6px; display: flex; flex-direction: column; gap: 2px; min-width: 200px; }
#menu .mrow { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px 0 10px; border: none; border-radius: 10px; background: none;
  color: var(--ink); font: 500 calc(17px * var(--ts)) / 1 var(--ui); text-align: left; cursor: pointer; }
#menu .mrow svg { width: 20px; height: 20px; flex: none; color: var(--soft); }
#menu .mrow:hover, #menu .mrow:focus-visible { background: rgba(255, 255, 255, 0.08); }
#menu .mrow[aria-pressed="true"] span::after { content: " · on"; color: var(--gold2); }
@media (min-width: 761px) { #settings, #arealist, #savedlist { left: 74px; } }
@media (max-height: 560px) and (min-width: 761px) { #menu, #settings, #arealist, #savedlist { left: 16px; bottom: calc(16px + 58px + env(safe-area-inset-bottom, 0px)); } } /* (the buttons are a row there) */
@media (max-width: 760px) { #settings, #arealist, #savedlist { right: 10px; left: 10px; bottom: calc(var(--sheet) + 54px + env(safe-area-inset-bottom, 0px)); } } /* (above the menu button) */
@media (max-width: 760px) {
  #menu { left: auto; right: 10px; bottom: calc(var(--sheet) + 54px + env(safe-area-inset-bottom, 0px)); }
}
/* the search box: one border; flatter chips with a small +/− at their start; × on hover or focus (always on touch) */
#inputwrap { background: none; border: none; height: 42px; }
#inputwrap:focus-within { background: none; }
#pill:focus-within { border-color: rgba(244, 196, 99, 0.7); }
.chip { height: 38px; gap: 2px; padding: 0 4px 0 2px; border-radius: 10px; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(220, 228, 255, 0.14); }
.chip.neg { background: rgba(150, 168, 220, 0.08); border-color: rgba(170, 186, 232, 0.28); }
.chip .sg { width: 26px; height: 26px; border-radius: 7px; background: none; font: 700 18px/1 var(--ui); color: var(--gold2); }
.chip.neg .sg { background: none; color: #b9c6ee; }
.chip .nm { font-size: 17px; }
.chip.word .nm { font-size: 17px; }
.chip .cv { width: 20px; height: 30px; }
.chip .x { width: 30px; height: 30px; font-size: 20px; opacity: 0; transition: opacity 0.15s; }
.chip:hover .x, .chip:focus-within .x, body.touchsky .chip .x { opacity: 1; }
#sgn { display: inline-flex; flex: none; margin-left: 4px; padding: 2px; gap: 2px; border-radius: 9px; background: rgba(255, 255, 255, 0.06); }
#sgn button { width: 26px; height: 26px; border: none; border-radius: 7px; padding: 0; cursor: pointer; background: none; color: var(--mute); font: 700 17px/1 var(--ui); }
#sgn #sgnp[aria-pressed="true"] { background: rgba(244, 196, 99, 0.26); color: var(--gold2); }
#sgn #sgnm[aria-pressed="true"] { background: rgba(170, 186, 232, 0.3); color: #eef2ff; }
#sgn button:hover { color: var(--ink); }
#suggest { font-size: 16px; }
#suggest .tryex { border: none; background: none; padding: 4px 6px; min-height: 32px; cursor: pointer; color: var(--gold2); font: 500 16px/1 var(--ui); text-shadow: inherit;
  text-decoration: underline dotted rgba(244, 196, 99, 0.6); text-underline-offset: 4px; }
#suggest .tryex:hover { color: #fff; }
#suggest .sep { color: var(--mute); margin: 0 2px; }
#tip { pointer-events: none; margin: 6px 0 0; font-size: 15px; color: var(--soft); text-align: center; text-shadow: 0 0 8px #03050f, 0 0 3px #03050f; }
/* one message at a time, small, at the bottom in the middle */
#toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; z-index: 8; margin: 0 !important; width: max-content; max-width: min(92vw, 520px) !important;
  padding: 4px 6px 4px 14px; gap: 10px; font-size: 15px; }
#toast .undo { min-height: 34px; padding: 0 12px; font-size: 15px; }
@media (max-width: 760px) { #toast { bottom: calc(var(--sheet) + 12px + env(safe-area-inset-bottom, 0px)); } }
/* the results: no "the answer" label (the first row is a little larger), small covers, title and author on one
   line where they fit, the reason small and grey in two lines; "the book you described" behind a small ⓘ */
#phead { display: flex; align-items: baseline; gap: 6px; padding: 14px 18px 2px; }
#phead #ptitle { padding: 0; flex: 0 1 auto; font-size: calc(20px * var(--ts)); }
#infob { flex: none; width: 28px; height: 28px; border: none; border-radius: 50%; background: none; color: var(--mute); font-size: 17px; cursor: pointer; }
#infob:hover, #infob[aria-expanded="true"] { color: var(--gold2); background: rgba(255, 255, 255, 0.06); }
#shareb { flex: none; align-self: center; margin-left: auto; width: 36px; height: 36px; padding: 0; border: none; border-radius: 50%; background: none; color: var(--mute); display: grid; place-items: center; cursor: pointer; }
#shareb svg { width: 19px; height: 19px; }
#shareb:hover, #shareb:focus-visible { color: var(--gold2); background: rgba(255, 255, 255, 0.06); }
#imagined summary { display: none; }
#imagined p { margin-top: 6px; font-size: calc(15px * var(--ts)); }
#results button.res { gap: 12px; padding: 7px 8px; }
/* only the open book's row has a box, with a faint white glow (as the open book has in the sky); the best match needs no
   mark of its own, being first in the list */
#results button.res.first { background: none; border-color: transparent; }
#results button.res.on { background: rgba(255, 255, 255, 0.08); border-color: rgba(235, 240, 255, 0.5); box-shadow: 0 0 14px rgba(235, 240, 255, 0.12); }
#results .cv { width: calc(27px * var(--ts)); height: calc(40px * var(--ts)); border-radius: 3px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5); }
#results .first .cv { width: calc(33px * var(--ts)); height: calc(50px * var(--ts)); }
#results .line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
#results .tt { font-size: calc(17px * var(--ts)); -webkit-line-clamp: 2; }
#results .first .tt { font-size: calc(19px * var(--ts)); }
#results .au { font-size: calc(14px * var(--ts)); color: var(--mute); }
#results .why { font-size: calc(14px * var(--ts)); color: #b9c3e0; margin-top: 2px; } /* (whole: the reasons are written short, never cut off) */
#results li.parts { font-size: calc(14px * var(--ts)); margin-top: 6px; }
@media (max-width: 760px) { #panel.min { max-height: 228px; } #panel.min .why, #panel.min li.parts { display: none; } } /* the peek: the top two answers, title and author */

/* ---------------------------------------------------------------- no scrollbars anywhere (scrolling still works); a soft
   fade at the edge of anything with more to scroll to: the bottom, and the top once scrolled (app.js fadeEdges) */
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; width: 0; height: 0; }
.fades { --ft: 0px; --fb: 0px; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 var(--ft), #000 calc(100% - var(--fb)), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 var(--ft), #000 calc(100% - var(--fb)), transparent 100%); }
.fadex { --fl: 0px; --fr: 0px; -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fl), #000 calc(100% - var(--fr)), transparent 100%); }
/* the book card: it holds still and its inside scrolls (its close and locate buttons stay put) */
#card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
#card .cscroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 18px 14px; }
@media (max-width: 760px) { #card .cscroll { padding: 14px 14px 12px; } }

/* ---------------------------------------------------------------- the book card (2026-11-08): cover, title with a small
   link out, author and year, its area as a plain tag; three lines of description; the main action; a row of covers */
#card .ctools { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 2px; }
#card .ctool { width: 36px; height: 36px; padding: 0; border: none; border-radius: 50%; background: none; color: var(--mute); display: grid; place-items: center; cursor: pointer; }
#card .ctool svg { width: 18px; height: 18px; }
#card .ctool:hover { background: rgba(255, 255, 255, 0.08); color: var(--ink); }
#card .cbody { display: flex; gap: 16px; padding-right: 64px; }
#card .ccv { width: calc(88px * var(--ts)); height: calc(132px * var(--ts)); border-radius: 6px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5); }
#card .ctext { min-width: 0; padding-top: 2px; }
#card .ct { margin: 0; font: 600 calc(24px * var(--ts)) / 1.18 var(--serif); overflow-wrap: anywhere; }
#card .cgr { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-left: 4px; vertical-align: 1px; border-radius: 7px; color: var(--mute); }
#card .cgr svg { width: 15px; height: 15px; }
#card .cgr:hover { color: var(--gold2); background: rgba(255, 255, 255, 0.08); }
#card .ca { margin-top: 4px; font-size: calc(16px * var(--ts)); color: var(--soft); }
#card .cnw { white-space: nowrap; }
.careachip { display: inline-flex; align-items: flex-start; gap: 7px; min-height: 32px; margin-top: 4px; padding: 0; border: none; background: none;
  color: var(--soft); font: 400 calc(14px * var(--ts)) / 1.3 var(--ui); text-align: left; cursor: pointer; }
.careachip:hover .atx { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.careachip .adot { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: calc(0.65em - 4px); } /* (on the first line when the tag wraps) */
#card .cw { margin-top: 4px; font-size: calc(15px * var(--ts)); line-height: 1.3; color: var(--gold2); }
#card .cw:empty, #card .cb:empty { display: none; }
#card .cdesc { margin-top: 12px; }
#card .cb { margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
  font-size: calc(16px * var(--ts)); line-height: 1.42; color: #e2e7f6; }
#card .cdesc.open .cb { display: block; -webkit-line-clamp: unset; }
#card .cmore { min-height: 30px; padding: 2px 0; border: none; background: none; color: var(--gold2); font: 600 calc(15px * var(--ts)) / 1 var(--ui); cursor: pointer; }
#card .cmore:hover { text-decoration: underline; text-underline-offset: 3px; }
/* the buttons: one main action; the in-sum state names itself with two small changes beside it */
/* (the buttons stay at the card's bottom while the text above them scrolls, on a short card: big text, a small screen;
   only then do they get a dark backing, which is also the card's fade there) */
#card .cact { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; padding: 10px 0 2px; position: sticky; bottom: -14px; z-index: 1; }
#card .cact.stuck { padding-bottom: 14px; background: linear-gradient(rgba(14, 18, 42, 0), rgb(14, 18, 42) 10px); }
@media (max-width: 760px) { #card .cact { bottom: -12px; } #card .cact.stuck { padding-bottom: 12px; } }
#card .cact > button { min-height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid var(--glass-line); background: none; color: var(--ink);
  font: 500 calc(16px * var(--ts)) / 1 var(--ui); cursor: pointer; }
#card .cact > button:hover { background: rgba(255, 255, 255, 0.08); }
#card .cact .primary { background: rgba(244, 196, 99, 0.9); border-color: var(--gold); color: #1a1205; font-weight: 700; }
#card .cact .primary:hover { background: var(--gold2); }
#card .cact .small { min-height: 36px; padding: 0 12px; font-size: calc(14px * var(--ts)); color: var(--soft); }
#card .cin { margin-right: 4px; font: 600 calc(16px * var(--ts)) / 1.2 var(--ui); color: var(--gold2); }
#card .cin.neg { color: #c9d4f5; }
#card .chint { margin: 8px 0 0; font-size: calc(14px * var(--ts)); line-height: 1.35; color: var(--mute); }
/* Readers also loved / Similar books: a row of small covers with two-line titles, scrolling sideways */
#loved { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(220, 228, 255, 0.12); }
#loved h4 { margin: 0 0 8px; font: 700 calc(13px * var(--ts)) / 1.2 var(--ui); letter-spacing: 0.14em; text-transform: uppercase; color: var(--mute); }
#loved ul { list-style: none; margin: 0 -4px; padding: 0 4px 2px; display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; }
#loved li { flex: none; width: calc(78px * var(--ts)); }
#loved button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; padding: 4px 2px 6px; border: none; border-radius: 10px;
  background: none; color: var(--ink); font: 600 calc(13px * var(--ts)) / 1.25 var(--serif); text-align: center; cursor: pointer; }
#loved button:hover { background: rgba(255, 255, 255, 0.07); }
#loved .cv { width: calc(56px * var(--ts)); height: calc(84px * var(--ts)); border-radius: 4px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.5); }
#loved .lt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; width: 100%; }
@media (max-width: 760px) {
  #card { padding: 0; }
  #card .cbody { gap: 12px; padding-right: 60px; }
  #card .ccv { width: 60px; height: 90px; }
  #card .ct { font-size: calc(21px * var(--ts)); }
  #card .cact > button { flex: 1 1 0; padding: 0 10px; } /* full width: the two buttons share the row */
  #card .cact .primary { flex-grow: 1.5; }
  #card .cact .cin { flex: 1 0 100%; }
  #loved li { width: calc(68px * var(--ts)); }
  #loved .cv { width: calc(48px * var(--ts)); height: calc(72px * var(--ts)); }
}

/* saved books: the bookmark on the card and on each result, the count in the menu, the list (laid out like Areas) */
#card .csave[aria-pressed="true"], .rsave[aria-pressed="true"] { color: var(--gold2); }
#card .csave[aria-pressed="true"] path, .rsave[aria-pressed="true"] path, #savedb .mcount { fill: currentColor; }
#results li { position: relative; }
#results li:has(.rsave) button.res { padding-right: 44px; }
.rsave { position: absolute; top: 4px; right: 4px; width: 36px; height: 36px; padding: 0; border: none; border-radius: 50%; background: none;
  color: var(--mute); display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity 0.15s; }
.rsave svg { width: 18px; height: 18px; }
#results li:hover .rsave, #results li:focus-within .rsave, .rsave[aria-pressed="true"] { opacity: 1; }
.rsave:hover { color: #fff; }
@media (hover: none) { .rsave { opacity: 0.75; } }
#menu .mcount { margin-left: auto; padding-left: 8px; color: var(--gold2); font-weight: 700; }
#menu .mcount:empty { display: none; }
#savedlist li { display: flex; align-items: center; gap: 2px; }
#savedlist button.sopen { flex: 1 1 auto; min-width: 0; align-items: center; }
#savedlist .cv { width: calc(30px * var(--ts)); height: calc(45px * var(--ts)); border-radius: 3px; flex: none; }
#savedlist button.srm { flex: none; width: 44px; min-height: 44px; padding: 0; justify-content: center; align-items: center; color: var(--mute); }
#savedlist button.srm:hover { color: #fff; }
#savedlist .srm svg { width: 16px; height: 16px; }
#savedlist .sempty { margin: 0 10px 10px; color: var(--soft); font-size: calc(16px * var(--ts)); line-height: 1.35; }
#savedlist .sfoot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; flex: none; padding: 10px 10px 4px; margin-top: 6px; border-top: 1px solid var(--glass-line); }
#savedlist .sfoot button { width: auto; min-height: 40px; padding: 0 16px; border: 1px solid var(--glass-line); border-radius: 20px; justify-content: center; align-items: center; font-weight: 600; }
#savedlist .snote { color: var(--mute); font-size: calc(14px * var(--ts)); }

/* ---------------------------------------------------------------- a lighter, softer page (2026-11-08)
   The card, the results and the menus come in from blurred and faint to sharp, and leave the same way, without moving (the page measures where they are to
   place the undo note and keep the sky's names clear of them): the browser keeps
   them drawn while they go (display with allow-discrete), so the code that opens and closes them is unchanged. With
   motion paused they only fade, quickly. */
:root { --soft-ease: cubic-bezier(0.2, 0.7, 0.2, 1); }
#card, #menu, #arealist, #savedlist, #settings {
  transition: opacity 0.3s ease-out, filter 0.34s var(--soft-ease), display 0.34s allow-discrete; }
#card[hidden], #panel[hidden], #menu[hidden], #arealist[hidden], #savedlist[hidden], #settings[hidden] {
  opacity: 0; filter: blur(12px); pointer-events: none; }
@starting-style {
  #card, #panel, #menu, #arealist, #savedlist, #settings { opacity: 0; filter: blur(12px); }
}
body.still :is(#card, #panel, #menu, #arealist, #savedlist, #settings) { filter: none !important; transition-duration: 0.09s; }
@media (prefers-reduced-motion: reduce) { :is(#card, #panel, #menu, #arealist, #savedlist, #settings) { filter: none !important; } }
/* the results panel on a computer: no box edge, its glass fades into the sky over its outer 28 px (the glass is drawn
   behind the list, so the list itself stays sharp to its edges) */
@media (min-width: 761px) {
  #panel.glass { background: none; border-color: transparent; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  #panel.glass::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
    background: var(--glass-bg); backdrop-filter: blur(26px) saturate(165%); -webkit-backdrop-filter: blur(26px) saturate(165%);
    -webkit-mask: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent), linear-gradient(transparent, #000 28px, #000 calc(100% - 28px), transparent);
    -webkit-mask-composite: source-in;
    mask: linear-gradient(to right, transparent, #000 28px, #000 calc(100% - 28px), transparent), linear-gradient(transparent, #000 28px, #000 calc(100% - 28px), transparent);
    mask-composite: intersect; }
}

/* an author's constellation, on hover: their name, then their best-known books' covers in the order they came out */
#concard { position: fixed; left: 0; top: 0; z-index: 7; pointer-events: none; padding: 12px 14px 12px; max-width: min(600px, calc(100vw - 24px)); }
#concard .cchead { display: flex; align-items: baseline; gap: 10px; margin: 0 2px 10px; }
#concard .ccname { font: 600 calc(19px * var(--ts)) / 1.2 var(--serif); color: #f4f6fd; }
#concard .ccsub { font: italic 400 calc(14px * var(--ts)) / 1.2 var(--serif); color: var(--soft); white-space: nowrap; }
#concard .ccrow { display: flex; gap: 9px; margin: 0; padding: 0; list-style: none; }
#concard li { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: none; }
#concard .cv { width: 44px; height: 66px; border-radius: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45); }
#concard li.on .cv { outline: 2px solid var(--gold2); outline-offset: 2px; }
#concard .ccy { font: 400 calc(12px * var(--ts)) / 1 var(--serif); color: var(--mute); }
#concard li.on .ccy { color: var(--gold2); }
#concard { transition: opacity 0.25s ease-out, filter 0.28s var(--soft-ease), display 0.28s allow-discrete; }
#concard[hidden] { opacity: 0; filter: blur(10px); }
@starting-style { #concard { opacity: 0; filter: blur(10px); } }
body.still #concard { filter: none !important; transition-duration: 0.09s; }

/* ---------------------------------------------------------------- zoom (2026-11-10)
   + and − with a rail between them: the glowing dot shows how far in the view is (top: book by book, bottom: the whole
   galaxy), and the rail can be dragged, clicked or scrolled. Where the buttons are a row (short screens, or a phone whose
   header is tall) it's just + and −. */
#ctl { align-items: center; }
#zrail { position: relative; width: 48px; border-radius: 24px; display: flex; flex-direction: column; align-items: center; padding: 3px 0; }
#zrail .zb { width: 42px; height: 42px; border: none; border-radius: 50%; background: none; color: var(--ink); display: grid; place-items: center; padding: 0; cursor: pointer; }
#zrail .zb svg { width: 20px; height: 20px; }
#zrail .zb:hover { background: rgba(60, 70, 120, 0.55); }
#ztrack { position: relative; width: 30px; height: 118px; margin: 2px 0; cursor: pointer; touch-action: none; border-radius: 10px; }
#ztrack::before { content: ""; position: absolute; left: 14px; top: 7px; bottom: 7px; width: 2px; border-radius: 2px; background: linear-gradient(180deg, rgba(235, 240, 255, 0.55), rgba(235, 240, 255, 0.12)); }
#ztrack::after { content: ""; position: absolute; left: 11px; top: 7px; bottom: 7px; width: 8px; --tk: linear-gradient(rgba(235, 240, 255, 0.35), rgba(235, 240, 255, 0.35));
  background: var(--tk) 0 0 / 8px 1px no-repeat, var(--tk) 0 25% / 8px 1px no-repeat, var(--tk) 0 50% / 8px 1px no-repeat, var(--tk) 0 75% / 8px 1px no-repeat, var(--tk) 0 100% / 8px 1px no-repeat; }
#ztrack .zdot { position: absolute; z-index: 1; left: 8px; top: calc(var(--zt, 1) * (100% - 14px)); width: 14px; height: 14px; border-radius: 50%; pointer-events: none;
  background: #fff6dc; box-shadow: 0 0 10px 3px rgba(255, 214, 140, 0.55), 0 0 24px 8px rgba(255, 214, 140, 0.18); }
#ztrack:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }
#zrail .zend { position: absolute; left: calc(100% + 10px); white-space: nowrap; pointer-events: none; line-height: 1;
  font: italic 400 calc(15px * var(--ts)) / 1 var(--serif); color: rgba(207, 215, 238, 0.8); text-shadow: 0 0 6px #03050f, 0 0 6px #03050f, 0 0 2px #03050f; }
#zrail .zend.zin { top: 44px; }
#zrail .zend.zout { bottom: 44px; }
@media (max-width: 760px) { #zrail .zend { display: none; } }
@media (max-height: 560px) { #zrail { flex-direction: row; width: auto; padding: 0 3px; } #ztrack, #zrail .zend { display: none; } }
body.ctlrow #zrail { flex-direction: row; width: auto; padding: 0 3px; }
body.ctlrow #ztrack, body.ctlrow #zrail .zend { display: none; }
/* how to zoom in, at the bottom of the open sky until the first zoom (layout() places it and hides it over an open book or
   the undo note) */
#zoomhint { position: fixed; z-index: 4; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); translate: -50% 0; display: flex; align-items: center; gap: 12px;
  padding: 10px 20px 10px 14px; border-radius: 999px; white-space: nowrap; pointer-events: none; font: 400 calc(18px * var(--ts)) / 1.25 var(--serif); color: var(--ink);
  transition: opacity 0.4s ease-out, filter 0.45s var(--soft-ease), display 0.45s allow-discrete; }
#zoomhint[hidden] { opacity: 0; filter: blur(12px); }
@starting-style { #zoomhint { opacity: 0; filter: blur(12px); } }
body.still #zoomhint { filter: none !important; transition-duration: 0.09s; }
#zoomhint svg { width: 30px; height: 30px; flex: none; stroke: rgba(235, 240, 255, 0.9); }
#zoomhint .zh-g { stroke: #ffd68c; }
#zoomhint em { color: rgba(207, 215, 238, 0.72); }
#zoomhint .zh-pinch { display: none; }
@media (hover: none) and (pointer: coarse) { #zoomhint .zh-mouse { display: none; } #zoomhint .zh-pinch { display: block; } } /* (a touch screen pinches) */
@media (max-width: 760px) {
  #zoomhint { left: 10px !important; right: 68px; translate: none; justify-content: center; white-space: normal; text-align: center; font-size: calc(17px * var(--ts));
    padding: 8px 14px 8px 10px; border-radius: 22px; bottom: calc(var(--sheet) + 14px + env(safe-area-inset-bottom, 0px)); }
  #zoomhint .zh-t { display: flex; flex-direction: column; } /* (two lines: how, then what's there) */
  #zoomhint .zh-dot { display: none; }
}
