/* Waymark design system
   The map fills the screen; glass controls and parchment cards float over it.
   One border (1px), two corner radii (14px large, 10px small), two typefaces:
   Cormorant Garamond for anything you read, Inter for anything you press. */
:root {
  --cream: #f6ecd6; --dim: #cdbf9f; --gold: #dcae52; --gold-hi: #f3d58a; --red: #a63d2f; --ink: #3a2a18; --brown: #8a5a22;
  --glass: rgba(28, 19, 11, .58); --panel: rgba(26, 18, 11, .95); --line: rgba(220, 174, 82, .34); --line-soft: rgba(246, 236, 214, .2);
  --r: 14px; --r-sm: 10px;
  --read: 'Cormorant Garamond', Georgia, serif; --ui: Inter, system-ui, sans-serif;
  --ease: cubic-bezier(.65, 0, .25, 1);
  --pad: 28px; --st: 0px; --sb: 0px; --colw: 0px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #1b140d; color: var(--cream); font: 13px/1.45 var(--ui); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
button:disabled { opacity: .3; cursor: default; }
:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.ic { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); margin: 0; }
.msg { color: var(--dim); font: 400 14px/1.5 var(--ui); }
.msg button, .retry { margin-left: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--gold-hi); font: 500 12px var(--ui); }
/* parchment: the facts card, its More view and tooltips */
.parch { background: linear-gradient(180deg, #f8edd3, #ecd9ae); border: 1px solid #c9ab6b; color: var(--ink); border-radius: var(--r); }

/* ================= map ================= */
#mapwrap { position: fixed; inset: 0; z-index: 0; overflow: hidden; transition: clip-path .85s var(--ease); }
#tiles { position: absolute; inset: 0; overflow: hidden; background: #24424f; filter: sepia(.3) saturate(.82) contrast(1.04) brightness(1.06); }
#tiles img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; pointer-events: none; opacity: 0; transition: opacity .35s; }
#tiles img.ok { opacity: 1; }
body:not([data-style="terrain"]) #tiles { display: none; }
#map { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#map:active { cursor: grabbing; }

/* satellite: imagery under light labels */
.sea { fill: #a9c4bd; }
.grat { fill: none; stroke: rgba(255, 255, 255, .25); stroke-width: .6; vector-effect: non-scaling-stroke; }
.land-glow { fill: none; stroke: rgba(255, 250, 235, .5); stroke-width: 7; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.land { fill: #eedfba; stroke: #b0935c; stroke-width: 1; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lake { fill: #94b9bb; stroke: #6d989c; stroke-width: 1; vector-effect: non-scaling-stroke; }
.river { fill: none; stroke: #86b1b8; stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
body[data-style="terrain"] :is(.sea, .grat, .land, .land-glow, .land-wash, .rings, .hills, .lake, .river) { display: none; }
body:not([data-style="parchment"]) :is(.land-wash, .rings, .hills, #paper, #rose) { display: none; }
.region { font: 600 14px var(--ui); letter-spacing: .3em; text-anchor: middle; pointer-events: none; fill: rgba(255, 244, 214, .75); paint-order: stroke; stroke: rgba(30, 18, 8, .45); stroke-width: 3px; }
.region.small { font-size: 9.5px; letter-spacing: .22em; }
.region.sea-l { font: italic 500 18px var(--read); letter-spacing: .3em; fill: rgba(214, 236, 240, .7); stroke: rgba(10, 30, 40, .35); }
.region.sea-l.small { font-size: 12px; }
.rlabel { font: italic 500 10px var(--read); fill: #d9f0f4; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: rgba(10, 30, 40, .6); stroke-width: 2.5px; }
.rlabel.lake-l { text-anchor: end; }
#map[data-z="near"] .region:not(.small) { opacity: 0; }
#map:not([data-z="near"]) .lake-l, #map[data-z="far"] .rlabel, #map[data-z="far"] .lm:not(.major) text { opacity: 0; }
.lm { cursor: pointer; filter: drop-shadow(0 2px 2px rgba(20, 10, 0, .5)); }
.lm.off { display: none; }
.lm .art { transition: transform .25s; }
.lm:hover .art { transform: scale(1.18); }
#map[data-z="far"] .lm:not(.major) .art { transform: scale(.72); }
.lm text { font: 600 9.5px var(--ui); fill: var(--cream); text-anchor: middle; paint-order: stroke; stroke: rgba(30, 18, 8, .85); stroke-width: 3px; transition: opacity .3s; }
.trail-case { fill: none; stroke: rgba(255, 246, 224, .85); stroke-linecap: round; stroke-linejoin: round; }
.trail-bg { fill: none; stroke: rgba(255, 246, 224, .8); stroke-width: 2.2; stroke-dasharray: 1 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.trail { fill: none; stroke: #b5392a; stroke-linecap: round; stroke-linejoin: round; }
.wp circle { fill: var(--cream); stroke: #8f2f24; stroke-width: 2; }
.wp text, .ev-label { font: 600 10.5px var(--ui); fill: var(--cream); paint-order: stroke; stroke: rgba(40, 14, 8, .9); stroke-width: 3.2px; }
.ev-label { font: 600 14px var(--read); }
.fuzz { fill: rgba(220, 174, 82, .16); stroke: var(--gold-hi); stroke-width: 1.6; stroke-dasharray: 7 7; vector-effect: non-scaling-stroke; }
.pulse { fill: none; stroke: var(--gold-hi); stroke-width: 2; animation: pulse 2.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pulse { from { transform: scale(.7); opacity: .95; } to { transform: scale(2.4); opacity: 0; } }
.medal { fill: url(#gMedal); stroke: var(--gold-hi); stroke-width: 1.8; }
.medal.light { fill: #f6ecd6; stroke: #8f2f24; }
.glyph { color: #fbefd2; fill: currentColor; }
.medal.light + .glyph { color: #7c241b; }
.ev-pin, .traveler { filter: drop-shadow(0 3px 4px rgba(20, 8, 0, .55)); }
.ev-pin { cursor: pointer; }

/* modern (the default): warm and flat, sea-green water, sand land, deep red route */
body[data-style="modern"] #mapwrap { background: #9fbab9; }
body[data-style="modern"] .sea { fill: #9fbab9; }
body[data-style="modern"] .grat { stroke: rgba(60, 80, 78, .1); }
body[data-style="modern"] .land-glow { display: none; }
body[data-style="modern"] .land { fill: #efe3c9; stroke: #a89886; stroke-width: 1; filter: drop-shadow(0 1.5px 3px rgba(79, 95, 92, .38)); }
body[data-style="modern"] .lake { fill: #9fbab9; stroke: #a89886; stroke-width: .8; }
body[data-style="modern"] .river { stroke: #7ea3a3; stroke-width: 1.7; }
body[data-style="modern"] .region { font: 600 12px var(--ui); letter-spacing: .42em; fill: #8a7e6c; stroke: none; }
body[data-style="modern"] .region.small { font-size: 10px; letter-spacing: .34em; }
body[data-style="modern"] .region.sea-l { font: italic 600 16px var(--read); letter-spacing: .14em; fill: #587a7d; stroke: none; }
body[data-style="modern"] .rlabel { font: italic 600 11.5px var(--read); fill: #587a7d; stroke: rgba(239, 227, 201, .9); }
body[data-style="modern"] .lm { filter: drop-shadow(0 1px 2px rgba(58, 42, 24, .35)); }
body[data-style="modern"] .lm text { font: 700 12.5px var(--read); fill: #3a2a18; stroke: rgba(239, 227, 201, .95); stroke-width: 3.4px; }
body[data-style="modern"] :is(.ev-label, .wp text) { font: 700 15px var(--read); fill: #3a2a18; stroke: rgba(239, 227, 201, .95); stroke-width: 3.6px; }
body[data-style="modern"] .trail { stroke: #a8301f; }
body[data-style="modern"] .trail-case { stroke: rgba(246, 236, 214, .85); }
body[data-style="modern"] .trail-bg { stroke: #a8301f; stroke-width: 2.6; stroke-dasharray: .1 7; }
body[data-style="modern"] .wp circle { fill: #fbf3df; stroke: #a8301f; stroke-width: 2.2; }
body[data-style="modern"] .fuzz { fill: rgba(168, 48, 31, .08); stroke: #a8301f; }

/* old map: an engraved, hand-coloured chart */
body[data-style="parchment"] { --paper-c: #efe2c4; --sea-c: #d1d6bc; --ink-c: #5b3f25; }
body[data-style="parchment"] #mapwrap { background: var(--sea-c); }
body[data-style="parchment"] .sea { fill: var(--sea-c); }
body[data-style="parchment"] .grat { stroke: rgba(91, 63, 37, .16); stroke-dasharray: 2 4; }
.ring { fill: none; stroke: #61796c; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.ring-gap { fill: none; stroke: #d1d6bc; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
body[data-style="parchment"] .land-glow { display: none; }
body[data-style="parchment"] .land { fill: var(--paper-c); stroke: var(--ink-c); stroke-width: 1.3; }
.land-wash { fill: none; stroke: #a3ae72; stroke-opacity: .42; stroke-width: 16; stroke-linejoin: round; vector-effect: non-scaling-stroke; pointer-events: none; }
body[data-style="parchment"] .lake { fill: var(--sea-c); stroke: var(--ink-c); stroke-width: 1.1; }
body[data-style="parchment"] .river { stroke: #5f7d7a; stroke-width: 1.7; }
.hill { pointer-events: none; }
.hill .h1 { fill: #e6d3a8; stroke: #5b3f25; stroke-width: .9; }
.hill .h2 { fill: none; stroke: #5b3f25; stroke-width: .6; }
#map[data-z="far"] .hill.fine { display: none; }
#map[data-z="near"] .hill:not(.fine) { opacity: .5; }
body[data-style="parchment"] .region { font: italic 400 16px 'IM Fell English', Georgia, serif; letter-spacing: .38em; fill: rgba(91, 63, 37, .72); stroke: rgba(239, 226, 196, .85); stroke-width: 3px; }
body[data-style="parchment"] .region.small { font-size: 11px; }
body[data-style="parchment"] .region.sea-l { font: italic 400 22px 'IM Fell English', Georgia, serif; letter-spacing: .3em; fill: rgba(60, 84, 74, .62); stroke: none; }
body[data-style="parchment"] .rlabel { font: italic 400 11px 'IM Fell English', Georgia, serif; fill: #3f6a66; stroke: rgba(239, 226, 196, .85); }
body[data-style="parchment"] .lm { filter: drop-shadow(0 1px 1px rgba(60, 35, 10, .35)); }
body[data-style="parchment"] .lm text { font: 400 11.5px 'IM Fell English', Georgia, serif; fill: #3a2614; stroke: rgba(239, 226, 196, .9); stroke-width: 3px; }
body[data-style="parchment"] :is(.ev-label, .wp text) { font-family: 'IM Fell English', Georgia, serif; font-style: italic; fill: #7a2614; stroke: rgba(239, 226, 196, .92); }
body[data-style="parchment"] .trail-bg { stroke: rgba(122, 38, 20, .35); }
body[data-style="parchment"] .trail-case { stroke: rgba(239, 226, 196, .9); }
body[data-style="parchment"] .fuzz { fill: rgba(168, 67, 42, .1); stroke: #a8432a; }
#paper { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; opacity: .55;
  background: radial-gradient(circle at 78% 22%, rgba(150, 100, 50, .18), transparent 30%), radial-gradient(circle at 18% 80%, rgba(150, 100, 50, .16), transparent 34%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .37 0 0 0 0 .22 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
#rose { position: fixed; left: 24px; bottom: 120px; width: 76px; height: 84px; z-index: 1; pointer-events: none; opacity: .8; transition: opacity .4s; }
#rose circle { stroke: #5b3f25; stroke-width: .8; }
#rose .pt path { fill: #5b3f25; } #rose .pt path.lt { fill: #efe2c4; stroke: #5b3f25; stroke-width: .6; }
#rose .pt.red path { fill: #a8432a; } #rose .pt.red path.lt { fill: #efe2c4; }
#rose text { font: 14px 'IM Fell English', serif; fill: #5b3f25; }
body:not([data-mode="map"]) #rose { opacity: 0; }

/* ================= scrims: soft fades at the top and bottom keep the controls readable ================= */
#scrim-top, #scrim-bottom { position: fixed; left: 0; right: 0; z-index: 5; pointer-events: none; transition: opacity .5s; }
#scrim-top { top: 0; height: 230px; background: linear-gradient(to bottom, rgba(28, 19, 11, .84), rgba(28, 19, 11, .62) 55%, rgba(28, 19, 11, 0)); }
#scrim-bottom { bottom: 0; height: 230px; background: linear-gradient(to top, rgba(28, 19, 11, .88), rgba(28, 19, 11, .55) 48%, rgba(28, 19, 11, 0)); }
#dim { position: fixed; inset: 0; z-index: 4; pointer-events: none; opacity: 0; transition: opacity .6s; background: linear-gradient(to right, rgba(32, 22, 13, .32), rgba(32, 22, 13, .5) 60%, rgba(32, 22, 13, .62)); }
body:is([data-mode="read"], [data-mode="ask"]) #dim { opacity: 1; }
body:is([data-mode="read"], [data-mode="ask"]) #scrim-bottom { opacity: 0; }
#brand, #lockup, #ruler, #meta, #chnav { text-shadow: 0 1px 10px rgba(20, 12, 6, .55); }

/* ================= top: timeline ruler, brand, date lockup, modes ================= */
#ruler { position: fixed; z-index: 13; left: 0; right: 0; top: 0; height: 62px; overflow: hidden; cursor: grab; touch-action: none; user-select: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); }
#ruler.drag { cursor: grabbing; }
#rtrack { position: absolute; left: 50%; top: 0; height: 62px; width: 7200px; transition: transform .6s var(--ease); }
#ruler.drag #rtrack { transition: none; }
#rtrack .tk { position: absolute; left: -107.5px; right: 0; top: 21px; height: 7px; background: repeating-linear-gradient(90deg, rgba(246, 236, 214, .34) 0 1px, transparent 1px 21.5px); }
#rtrack .eh { position: absolute; top: 20px; height: 1.5px; opacity: .7; transition: opacity .4s; }
#rtrack .eh.on { opacity: 1; }
#rtrack .mj { position: absolute; top: 21px; width: 1px; height: 12px; background: rgba(246, 236, 214, .6); }
#rtrack .nm { position: absolute; top: 40px; transform: translateX(-50%); white-space: nowrap; font: italic 500 15px/1 var(--read); color: rgba(246, 236, 214, .85); opacity: 0; transition: opacity .4s, top .3s, font-size .3s, color .2s; }
#rtrack .nm:hover { color: var(--gold-hi); }
#rtrack .nm.cur { font: italic 700 18px/1 var(--read); color: var(--gold-hi); top: 38px; }
#rtrack .el { position: absolute; top: 7px; font: 600 8.5px/1 var(--ui); letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; opacity: 0; transition: opacity .4s; pointer-events: none; }
#ruler .needle { position: absolute; left: 50%; top: 12px; width: 2px; height: 24px; margin-left: -1px; background: var(--gold); box-shadow: 0 0 10px rgba(220, 174, 82, .7); z-index: 2; pointer-events: none; }
#ruler .needle::before { content: ''; position: absolute; left: 50%; top: 3px; width: 8px; height: 8px; background: var(--gold); transform: translate(-50%, 0) rotate(45deg); border-radius: 1px; }
#pruler { display: none; }

#brand { position: fixed; z-index: 14; left: var(--pad); top: 66px; display: flex; align-items: center; gap: 10px; pointer-events: none; }
#brand b { font: 600 22px/1 var(--read); letter-spacing: .015em; }
#brand svg { width: 28px; height: 28px; }
#lockup { position: fixed; z-index: 14; left: var(--pad); top: 106px; cursor: pointer; touch-action: pan-y; user-select: none; }
#lockup .d { font: 600 36px/1 var(--read); display: flex; align-items: center; gap: 10px; font-variant-numeric: lining-nums; }
#lockup .d .chev { font-size: 15px; color: var(--gold-hi); margin-top: 5px; }
#lockup:hover .d .chev { color: #fff; }
#lockup .s { margin-top: 7px; font: italic 500 17px/1 var(--read); color: rgba(246, 236, 214, .88); display: flex; align-items: baseline; gap: 9px; white-space: nowrap; }
#lockup .s b { font: 600 9.5px/1 var(--ui); letter-spacing: .17em; text-transform: uppercase; }
#lockup .s u { text-decoration: none; color: rgba(246, 236, 214, .35); }
@keyframes in-r { from { opacity: 0; transform: translateX(26px); } }
@keyframes in-l { from { opacity: 0; transform: translateX(-26px); } }
#lockup.in-r > div { animation: in-r .35s var(--ease); }
#lockup.in-l > div { animation: in-l .35s var(--ease); }

#tabs { position: fixed; z-index: 14; right: 80px; top: 62px; height: 44px; display: flex; padding: 4px; gap: 2px; border-radius: var(--r); background: var(--glass); backdrop-filter: blur(16px) saturate(1.1); -webkit-backdrop-filter: blur(16px) saturate(1.1); border: 1px solid var(--line); }
.tb { display: flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: var(--r-sm); font: 500 13.5px/1 var(--ui); color: rgba(246, 236, 214, .8); border: 1px solid transparent; transition: background .2s, color .2s; }
.tb .ic { font-size: 17px; }
.tb:hover { color: #fff6e0; background: rgba(246, 236, 214, .08); }
.tb.on { background: rgba(220, 174, 82, .24); border-color: rgba(220, 174, 82, .6); color: #fff6e0; box-shadow: 0 0 14px -2px rgba(220, 174, 82, .35); }
.tb.on .ic { color: var(--gold-hi); }
#layers { position: fixed; z-index: 14; right: var(--pad); top: 62px; width: 44px; height: 44px; border-radius: var(--r); display: flex; align-items: center; justify-content: center; font-size: 20px; color: rgba(246, 236, 214, .9); background: var(--glass); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line); }
#layers:hover, #layers.on { background: rgba(220, 174, 82, .24); border-color: rgba(220, 174, 82, .6); }

/* ================= popovers ================= */
.pop { position: fixed; z-index: 25; width: 270px; padding: 14px; border-radius: var(--r); background: rgba(26, 18, 11, .94); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line); box-shadow: 0 20px 50px -10px rgba(0, 0, 0, .6); opacity: 0; transform: translateY(-6px) scale(.97); pointer-events: none; transition: opacity .2s, transform .2s; transform-origin: top right; }
.pop.show { opacity: 1; transform: none; pointer-events: auto; }
.pop h5 { font: 600 9.5px/1 var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin: 2px 0 8px; }
.pop .seg { display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap; }
.pop .seg button { flex: 1; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--line-soft); font: 500 12px var(--ui); color: var(--dim); display: flex; align-items: center; justify-content: center; }
.pop .seg button .ic { font-size: 15px; }
.pop .seg button:hover { color: var(--cream); border-color: var(--line); }
.pop .seg button.on { background: rgba(220, 174, 82, .22); border-color: rgba(220, 174, 82, .6); color: #fff6e0; }
.pop .seg.wrap button { flex: 0 0 calc(33.3% - 3px); }
.pop .note { font: 500 11px/1.45 var(--ui); color: var(--dim); display: flex; gap: 7px; }
.pop .note .ic { font-size: 14px; color: var(--gold); margin-top: 1px; }
.pop .phone-only { display: none; }
#pop-layers { right: var(--pad); top: 114px; }
#pop-more { right: var(--pad); bottom: 70px; transform-origin: bottom right; }

/* ================= key facts ================= */
#card { position: fixed; z-index: 10; right: var(--pad); top: 126px; width: 310px; padding: 15px 16px 12px; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .6), 0 2px 0 rgba(255, 255, 255, .35) inset; cursor: pointer; opacity: 0; transform: scale(.5); transform-origin: top right; pointer-events: none; transition: opacity .3s, transform .45s var(--ease); }
#card::before, #factmore::before { content: ''; position: absolute; left: -1px; right: -1px; top: -1px; height: 4px; border-radius: var(--r) var(--r) 0 0; background: linear-gradient(90deg, #b98a35, var(--gold-hi), #b98a35); }
body.facts-open:is([data-mode="map"], [data-mode="watch"]):not(.no-facts) #card { opacity: 1; transform: none; pointer-events: auto; }
#card.pop-in { animation: card-in .5s var(--ease); }
@keyframes card-in { from { opacity: 0; transform: translateY(-8px) scale(.96); } }
#card .k { font: 600 9.5px/1.25 var(--ui); letter-spacing: .15em; color: var(--brown); text-transform: uppercase; display: flex; align-items: flex-start; gap: 8px; padding-top: 2px; }
#card .k span { flex: 1; }
#card .k button { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--brown); margin: -5px -5px -5px 0; }
#card button:hover { background: rgba(138, 90, 34, .14); }
#card p { font: 600 17.5px/1.3 var(--read); margin: 8px 0 10px; }
#card .f { display: flex; align-items: center; gap: 6px; }
#card .dots { display: flex; gap: 5px; align-items: center; }
#card .dots button { width: 7px; height: 7px; border-radius: 4px; background: rgba(58, 42, 24, .25); transition: width .25s, background .25s; }
#card .dots button.on { width: 20px; background: #a67a2c; }
#card .mr { margin-left: auto; font: 600 11.5px var(--ui); color: var(--brown); display: flex; align-items: center; gap: 3px; }
#card .ar { display: flex; gap: 2px; margin-left: 6px; }
#card .ar button { width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--brown); border: 1px solid rgba(138, 90, 34, .35); }
#chip { position: fixed; z-index: 10; right: var(--pad); top: 126px; display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 15px 0 11px; border-radius: 18px; background: rgba(28, 19, 11, .7); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(220, 174, 82, .5); font: 500 12.5px var(--ui); color: var(--gold-hi); transform-origin: top right; transition: opacity .25s .1s, transform .35s var(--ease); }
#chip .ic { font-size: 18px; }
body:is(.facts-open, .no-facts, [data-mode="read"], [data-mode="ask"]) #chip { opacity: 0; transform: scale(.6); pointer-events: none; transition: opacity .15s; }

/* More: a popover under the card on desktop, a bottom sheet on a phone */
#factmore { position: fixed; z-index: 30; right: var(--pad); top: 126px; width: 400px; max-height: calc(100% - 220px); overflow-y: auto; padding: 22px 24px 18px; box-shadow: 0 30px 80px -10px rgba(0, 0, 0, .7); opacity: 0; transform: translateY(-6px) scale(.97); transform-origin: top right; pointer-events: none; transition: opacity .2s, transform .3s var(--ease); }
body.more-open #factmore { opacity: 1; transform: none; pointer-events: auto; }
#factmore .k { font: 600 10px/1.2 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--brown); padding-right: 30px; }
#factmore h3 { font: 600 28px/1.1 var(--read); margin: 8px 0 12px; }
#factmore p { font: 500 18px/1.42 var(--read); margin: 0 0 10px; }
#factmore .lead { font-weight: 700; }
#factmore .x { position: absolute; right: 10px; top: 12px; width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--brown); }
#factmore .x:hover, #factmore .nav button:hover { background: rgba(138, 90, 34, .14); }
#factmore .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
#factmore .acts button { height: 36px; padding: 0 14px; border-radius: 18px; background: var(--ink); color: var(--cream); font: 600 12px var(--ui); display: flex; align-items: center; gap: 7px; }
#factmore .acts button:hover { background: #54391c; }
#factmore .acts .ic { font-size: 15px; color: var(--gold-hi); }
#factmore .nav { display: flex; gap: 6px; margin-top: 16px; align-items: center; font: 500 11px var(--ui); color: var(--brown); }
#factmore .nav button { width: 28px; height: 28px; border-radius: 50%; border: 1px solid rgba(138, 90, 34, .4); display: flex; align-items: center; justify-content: center; font-size: 15px; }
#shade { position: fixed; inset: 0; z-index: 29; background: rgba(14, 9, 5, .55); opacity: 0; pointer-events: none; transition: opacity .3s; }

/* ================= subtitle: the verse being read, no box, the spoken word lit ================= */
#sub { position: fixed; z-index: 12; left: calc(50% - var(--colw) / 2); bottom: 64px; transform: translateX(-50%); width: min(920px, 90vw); text-align: center; margin-bottom: 14px; transition: opacity .4s; cursor: ns-resize; touch-action: none; user-select: none; }
body:is([data-mode="read"], [data-mode="ask"]) #sub { opacity: 0; pointer-events: none; }
#subcur { font: 600 28px/1.28 var(--read); color: #fff6e0; text-shadow: 0 2px 16px rgba(0, 0, 0, .6); text-wrap: balance; will-change: transform, opacity; }
#subcur.mid { font-size: 25px; } #subcur.long { font-size: 21px; } #subcur.xlong { font-size: 18px; line-height: 1.3; }
#subcur .vn { display: inline-block; font: 600 15px/1 var(--ui); color: var(--gold-hi); background: rgba(28, 19, 11, .55); border: 1px solid rgba(220, 174, 82, .55); border-radius: var(--r-sm); padding: 4px 7px; margin-right: 10px; vertical-align: .3em; text-shadow: none; font-variant-numeric: tabular-nums; }
body.speaking #subcur .w { color: rgba(246, 236, 214, .6); }
body.speaking #subcur .w.s { color: #fff6e0; }
.w.n { color: var(--gold-hi) !important; text-shadow: 0 0 18px rgba(243, 213, 138, .55), 0 2px 16px rgba(0, 0, 0, .55); }

/* ================= player ================= */
#prog { position: fixed; z-index: 13; left: 0; right: var(--colw); bottom: var(--sb); height: 28px; transition: right .6s var(--ease); }
#prog .ln { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(246, 236, 214, .24); pointer-events: none; }
#prog .fl { position: absolute; left: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, #b98a35, var(--gold-hi)); pointer-events: none; }
#prog .tkb { position: absolute; bottom: 0; height: 28px; }
#prog .tkb i { position: absolute; left: calc(50% - .5px); bottom: 3px; width: 1px; height: 6px; background: rgba(246, 236, 214, .45); transition: height .15s; }
#prog .tkb.p i { background: rgba(243, 213, 138, .9); }
#prog .tkb:hover i { height: 12px; background: #fff; }
#prog .tkb .vl { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font: 600 10px/1 var(--ui); color: rgba(246, 236, 214, .45); white-space: nowrap; opacity: 0; pointer-events: none; }
#prog .tkb.lb .vl, #prog .tkb:hover .vl { opacity: 1; }
#prog .tkb:hover .vl { color: #1b140d; background: var(--gold-hi); padding: 4px 7px; border-radius: 6px; bottom: 18px; z-index: 2; }
#prog .kn { position: absolute; bottom: -3px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 0 3px rgba(243, 213, 138, .28); pointer-events: none; }
#play { position: fixed; z-index: 14; left: var(--pad); bottom: calc(var(--sb) + 32px); width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 22px; box-shadow: 0 6px 18px -4px rgba(220, 174, 82, .55), inset 0 1px 0 rgba(255, 255, 255, .5); transition: transform .15s; }
#play:active { transform: scale(.94); }
#chnav { position: fixed; z-index: 14; left: calc(50% - var(--colw) / 2); bottom: calc(var(--sb) + 42px); transform: translateX(-50%); display: flex; align-items: center; gap: 2px; font: 600 12.5px/1 var(--ui); white-space: nowrap; transition: left .6s var(--ease); }
#chnav button { height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--r-sm); color: var(--cream); }
#chnav #c-prev, #chnav #c-next { width: 30px; font-size: 16px; color: rgba(246, 236, 214, .8); }
#c-name { padding: 0 10px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
#chnav button:not(:disabled):hover { background: rgba(246, 236, 214, .14); }
#meta { position: fixed; z-index: 14; right: calc(var(--colw) + var(--pad)); bottom: calc(var(--sb) + 42px); display: flex; align-items: center; gap: 8px; font: 500 11.5px/1 var(--ui); color: rgba(246, 236, 214, .75); letter-spacing: .03em; font-variant-numeric: tabular-nums; transition: right .6s var(--ease); }
#more { width: 32px; height: 30px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-size: 22px; color: rgba(246, 236, 214, .85); }
#more:hover, #more.on { background: rgba(246, 236, 214, .14); }
#attrib { position: fixed; z-index: 14; right: calc(var(--colw) + var(--pad)); bottom: calc(var(--sb) + 76px); font: 400 9.5px var(--ui); color: rgba(246, 236, 214, .5); pointer-events: none; }

/* ================= book and chapter picker ================= */
#pick { position: fixed; z-index: 31; left: calc(50% - var(--colw) / 2); bottom: calc(var(--sb) + 80px); width: 380px; height: min(480px, 70%); display: flex; flex-direction: column; background: rgba(26, 18, 11, .97); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 24px 60px -10px rgba(0, 0, 0, .7); opacity: 0; transform: translate(-50%, 8px) scale(.98); pointer-events: none; transition: opacity .2s, transform .3s var(--ease); transform-origin: bottom center; overflow: hidden; }
body.pick-open #pick { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#pick .pt { display: flex; align-items: center; gap: 8px; padding: 14px 16px 10px; border-bottom: 1px solid rgba(220, 174, 82, .2); flex: none; }
#pick .pt b { font: 600 24px/1 var(--read); flex: 1; }
#pick .pt button { display: flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; border-radius: var(--r-sm); font: 500 12px var(--ui); color: var(--dim); border: 1px solid var(--line-soft); }
#pick .pt button:hover { color: var(--cream); }
#pick .bl { overflow-y: auto; flex: 1; padding: 4px 8px 16px; scrollbar-width: thin; }
#pick .bl h6 { font: 600 9.5px/1 var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); padding: 14px 10px 6px; margin: 0; }
#pick .bl button { display: flex; justify-content: space-between; align-items: baseline; width: 100%; padding: 8px 10px; border-radius: var(--r-sm); font: 500 19px/1.2 var(--read); color: rgba(246, 236, 214, .85); }
#pick .bl button:hover { background: rgba(246, 236, 214, .08); }
#pick .bl button.on { color: var(--gold-hi); background: rgba(220, 174, 82, .12); }
#pick .bl button small { font: 500 11px var(--ui); color: var(--dim); }
#pick .gridc { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 7px; padding: 14px 16px; overflow-y: auto; flex: 1; align-content: start; }
#pick .gridc button { position: relative; height: 44px; border-radius: var(--r-sm); border: 1px solid var(--line-soft); font: 500 14px var(--ui); text-align: center; }
#pick .gridc button:hover { border-color: var(--gold); }
#pick .gridc button.on { background: rgba(220, 174, 82, .25); border-color: var(--gold); color: #fff6e0; }
#pick .gridc button.has::after, #pick .legend i { content: ''; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--gold); }
#pick .legend { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px 16px 14px; font: 500 11px var(--ui); color: var(--dim); border-top: 1px solid rgba(220, 174, 82, .14); }
#pick .legend i { position: static; margin: 0; width: 5px; height: 5px; }

/* ================= Watch: the stage fills the screen; the map lives on in a round inset ================= */
#scene { position: fixed; inset: 0; z-index: 3; overflow: hidden; visibility: hidden; background: #1c120a; clip-path: circle(0 at var(--cx, 50%) var(--cy, 50%)); transition: clip-path .55s cubic-bezier(.6, 0, .8, .4), visibility 0s .55s; }
#scene.open { visibility: visible; clip-path: circle(150vmax at var(--cx, 50%) var(--cy, 50%)); transition: clip-path 1.1s cubic-bezier(.55, 0, .2, 1), visibility 0s; }
#stage { position: absolute; display: block; cursor: pointer; transform: scale(1.1); transition: transform .55s; }
#scene.open #stage { transform: none; transition: transform 1.3s cubic-bezier(.2, .7, .2, 1); }
body.inset #mapwrap { z-index: 6; pointer-events: none; }
#ring { position: fixed; z-index: 7; border-radius: 50%; border: 1px solid var(--line); box-shadow: 0 0 0 5px rgba(32, 22, 13, .5), 0 10px 30px rgba(0, 0, 0, .35); opacity: 0; pointer-events: none; transition: opacity .25s; }
body.inset #ring { opacity: 1; pointer-events: auto; transition: opacity .4s .5s; }
#ring:hover { box-shadow: 0 0 0 5px rgba(32, 22, 13, .5), 0 0 0 7px rgba(243, 213, 138, .55), 0 10px 30px rgba(0, 0, 0, .35); }
#inset-cap { position: fixed; z-index: 7; display: flex; align-items: center; gap: 6px; font: 500 11.5px/1 var(--ui); color: #fff6e0; text-shadow: 0 1px 3px rgba(20, 12, 6, .8), 0 0 12px rgba(20, 12, 6, .7); white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .3s; }
#inset-cap .ic { font-size: 13px; color: var(--gold-hi); }
body.inset #inset-cap { opacity: 1; transition: opacity .4s .6s; }
body[data-mode="watch"] #scrim-top { height: 190px; }
body[data-mode="watch"] #card { width: 280px; padding: 13px 14px 10px; }
body[data-mode="watch"] #card p { font-size: 16px; margin: 6px 0 8px; }

/* ================= Read and Ask: one column on desktop ================= */
body:is([data-mode="read"], [data-mode="ask"]) { --colw: min(440px, 46vw); }
#col { position: fixed; z-index: 9; right: 0; top: 0; bottom: 0; width: min(440px, 46vw); background: linear-gradient(to left, rgba(26, 18, 11, .95), rgba(26, 18, 11, .9)); backdrop-filter: blur(24px) saturate(1.1); -webkit-backdrop-filter: blur(24px) saturate(1.1); border-left: 1px solid rgba(220, 174, 82, .2); display: flex; flex-direction: column; overflow: hidden; transform: translateX(102%); transition: transform .6s var(--ease); }
body:is([data-mode="read"], [data-mode="ask"]) #col { transform: none; }
#grab { display: none; }
.pane { display: none; flex-direction: column; flex: 1; min-height: 0; }
body[data-mode="read"] #p-read, body[data-mode="ask"] #p-ask { display: flex; }
.ch { padding: 132px 40px 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.ch .a { display: block; font: 600 10px/1 var(--ui); letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.ch .h { display: flex; align-items: center; gap: 8px; font: 600 40px/1 var(--read); margin-top: 8px; white-space: nowrap; }
.ch .h .ic { font-size: 16px; color: var(--dim); }
.ch em { display: block; font: italic 500 18px/1 var(--read); color: var(--dim); margin-top: 8px; min-height: 18px; }
.ch .ttl { display: block; }
.ch .ttl:hover .h { color: var(--gold-hi); }
.ch .tl button { height: 28px; padding: 0 10px; border-radius: var(--r-sm); font: 500 12px var(--ui); color: var(--dim); border: 1px solid var(--line-soft); }
.ch .tl button:hover { color: var(--cream); background: rgba(246, 236, 214, .1); }
#verses { position: relative; padding: 8px 40px 90px; overflow-y: auto; flex: 1; scrollbar-width: none; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 3%, #000 88%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 3%, #000 88%, transparent); }
#verses::-webkit-scrollbar { display: none; }
.vs { position: relative; padding: 9px 0; font: 500 20.5px/1.46 var(--read); color: rgba(246, 236, 214, .82); cursor: pointer; transition: background .3s; }
.vs:hover { color: #fff6e0; }
.vs sup { font: 600 12px var(--ui); color: var(--gold); margin-right: 7px; vertical-align: .45em; line-height: 0; }
.vs.on { margin: 0 -40px; padding: 11px 40px; background: linear-gradient(90deg, rgba(220, 174, 82, .16), rgba(220, 174, 82, .04)); box-shadow: inset 2px 0 0 var(--gold); color: #fff6e0; }
body.speaking .vs.on .w { color: rgba(246, 236, 214, .62); }
body.speaking .vs.on .w.s { color: #fff6e0; }
.vs .eq { position: absolute; right: 16px; top: 16px; display: none; gap: 2px; align-items: flex-end; height: 14px; }
body.playing .vs.on .eq { display: flex; }
.vs .eq i { width: 2.5px; background: var(--gold); border-radius: 1px; height: 6px; animation: eq .9s ease-in-out infinite alternate; }
.vs .eq i:nth-child(2) { animation-delay: .2s; } .vs .eq i:nth-child(3) { animation-delay: .4s; }
@keyframes eq { from { height: 4px; } to { height: 14px; } }
/* facts between the verses (narrow screens) or beside them (wide) */
.pn { display: none; width: 100%; margin: 2px 0 10px; padding: 6px 0 6px 12px; border-left: 1px solid var(--gold); text-align: left; }
.pn b { display: block; font: 600 8.5px/1.2 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-hi); margin-bottom: 5px; }
.pn span { font: italic 500 15px/1.32 var(--read); color: var(--cream); }
.pn em { font: 600 11px var(--ui); font-style: normal; color: var(--gold); margin-left: 6px; white-space: nowrap; }
#notes { position: fixed; z-index: 8; inset: 0; pointer-events: none; }
.mn { position: absolute; width: 262px; text-align: right; pointer-events: auto; opacity: 0; transition: opacity .5s, top .3s; }
body:not([data-mode="read"]) .mn, .mn:not(.vis) { pointer-events: none; }
body[data-mode="read"] .mn.vis { opacity: 1; }
.mn .k { display: block; font: 600 9px/1.2 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-hi); margin-bottom: 6px; }
.mn .p { display: block; font: italic 500 16px/1.32 var(--read); color: var(--cream); }
.mn .mr { display: inline-block; margin-top: 6px; font: 600 10.5px var(--ui); color: var(--gold); letter-spacing: .03em; }
.mn::after { content: ''; position: absolute; right: -36px; top: var(--ly, 5px); width: 30px; height: 1px; background: var(--gold); }
.mn::before { content: ''; position: absolute; right: -39px; top: calc(var(--ly, 5px) - 2.5px); width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.mn .bg { position: absolute; inset: -10px -4px -10px -30px; background: linear-gradient(to left, rgba(28, 19, 11, .62), rgba(28, 19, 11, .5) 70%, rgba(28, 19, 11, 0)); z-index: -1; transition: background .2s; }
.mn:hover .bg { background: linear-gradient(to left, rgba(28, 19, 11, .8), rgba(28, 19, 11, .7) 70%, rgba(28, 19, 11, 0)); }
@media (max-width: 1099px) { #notes { display: none; } .pn { display: block; } }

/* Ask: honest about not being connected yet */
#thread { padding: 4px 40px 14px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; scrollbar-width: none; min-height: 0; }
#thread::-webkit-scrollbar { display: none; }
.me { align-self: flex-end; max-width: 84%; padding: 10px 15px; border-radius: 14px 14px 4px 14px; background: rgba(246, 236, 214, .14); font: 500 13.5px/1.4 var(--ui); }
.gd .who { display: flex; align-items: center; gap: 8px; font: 600 10px/1 var(--ui); letter-spacing: .18em; color: var(--gold); text-transform: uppercase; margin-bottom: 9px; }
.gd .who .ic { font-size: 13px; }
.gd p { margin: 0; font: 500 19px/1.4 var(--read); color: var(--dim); }
#sug { display: flex; gap: 8px; flex-wrap: wrap; padding: 0 40px 14px; }
#sug button { min-height: 30px; padding: 6px 13px; border-radius: 15px; border: 1px solid var(--line-soft); font: 500 12px/1.3 var(--ui); color: var(--dim); text-align: left; }
#sug button:hover { border-color: var(--gold); color: var(--cream); }
#inp { margin: 0 28px 100px; height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 7px 0 18px; border-radius: var(--r); background: rgba(246, 236, 214, .08); border: 1px solid var(--line-soft); }
#inp:focus-within { border-color: rgba(220, 174, 82, .7); }
#inp input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; font: 400 13.5px var(--ui); }
#inp input::placeholder { color: rgba(246, 236, 214, .5); }
#inp .go { width: 36px; height: 36px; border-radius: var(--r-sm); background: var(--gold); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 18px; }

/* ================= History: a colour-coded drawer from the top ================= */
#catch { position: fixed; inset: 0; z-index: 10; display: none; }
body.drawer-open #catch { display: block; }
#drawer { position: fixed; z-index: 11; left: 0; right: 0; top: 0; max-height: 90%; overflow-y: auto; background: rgba(26, 18, 11, .9); backdrop-filter: blur(26px) saturate(1.1); -webkit-backdrop-filter: blur(26px) saturate(1.1); border-bottom: 1px solid var(--line); transform: translateY(-102%); transition: transform .55s var(--ease); padding-bottom: 24px; }
body.drawer-open #drawer { transform: none; }
#drawer .hd { padding-top: 76px; text-align: center; font: 600 10px/1 var(--ui); letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
#drawer .dh { display: none; }
#drawer .cols { margin: 100px var(--pad) 0; display: grid; grid-template-columns: repeat(9, 1fr); gap: 20px; }
#drawer .ec { position: relative; padding-top: 14px; }
#drawer .ec::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--c); opacity: .75; }
#drawer .ec.on::before { opacity: 1; box-shadow: 0 0 12px var(--c); }
#drawer .ec b { display: block; font: 600 10px/1.2 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--c); }
#drawer .ec small { display: block; margin: 6px 0 10px; font: 500 10.5px/1.2 var(--ui); color: var(--dim); }
#drawer .ec ol { list-style: none; margin: 0; padding: 0; }
#drawer .ec li button { display: block; width: 100%; padding: 5px 0; font: italic 500 16px/1.15 var(--read); color: rgba(246, 236, 214, .7); position: relative; }
#drawer .ec li button:hover { color: #fff; }
#drawer .ec li button em { display: none; }
#drawer .ec li.on button { color: var(--gold-hi); font-weight: 700; padding-left: 14px; }
#drawer .ec li.on button::before { content: ''; position: absolute; left: 0; top: 11px; width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); border-radius: 1px; }
#drawer .gr { display: block; margin: 18px auto 0; width: 40px; height: 12px; background: linear-gradient(rgba(246, 236, 214, .3), rgba(246, 236, 214, .3)) center / 40px 3px no-repeat; }
@media (max-width: 1180px) and (min-width: 701px) { #drawer .cols { grid-template-columns: repeat(5, 1fr); row-gap: 26px; } }

#tip { position: fixed; z-index: 30; pointer-events: none; padding: 8px 12px; border-radius: var(--r-sm); font: 13px/1.4 var(--ui); max-width: 250px; opacity: 0; transition: opacity .15s; }
#tip b { display: block; font: 700 16px var(--read); } #tip span { color: #7a5a34; }
#toast { position: fixed; z-index: 40; left: 50%; bottom: 120px; transform: translate(-50%, 10px); padding: 10px 16px; border-radius: 12px; background: rgba(26, 18, 11, .92); border: 1px solid var(--line); font: 500 12.5px var(--ui); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; white-space: nowrap; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ================= phone ================= */
@media (max-width: 700px) {
  :root { --pad: 12px; --st: env(safe-area-inset-top, 0px); --sb: env(safe-area-inset-bottom, 0px); }
  body:is([data-mode="read"], [data-mode="ask"]) { --colw: 0px; }
  #scrim-top { height: calc(var(--st) + 190px); }
  #scrim-bottom { height: 300px; }
  #ruler { display: none; }
  #brand { left: 12px; top: calc(var(--st) + 14px); }
  #brand svg { width: 26px; height: 26px; }
  #brand b { display: none; }
  #lockup { left: 46px; top: calc(var(--st) + 10px); }
  #lockup > div { max-width: 140px; }
  #lockup .d { font-size: 21px; }
  #lockup .d .chev { display: none; }
  #lockup .s { display: block; font-size: 13px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
  #lockup .s u, #lockup .s b { display: none; }
  #tabs { right: 8px; top: calc(var(--st) + 8px); height: 42px; padding: 3px; gap: 0; border-radius: 13px; }
  .tb { flex-direction: column; gap: 2px; justify-content: center; padding: 0; width: 44px; height: 34px; font-size: 9px; letter-spacing: .02em; border-radius: 9px; }
  .tb .ic { font-size: 16px; }
  #layers, #attrib { display: none; }
  .pop .phone-only { display: block; margin-top: 14px; }
  .pop .phone-only .seg { margin-bottom: 0; }
  #pruler { display: flex; position: fixed; z-index: 13; left: 6px; right: 6px; top: calc(var(--st) + 58px); height: 24px; align-items: center; gap: 2px; }
  #pruler .pa { width: 26px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 16px; color: rgba(246, 236, 214, .75); flex: none; }
  #pruler .pa.dis { opacity: .2; pointer-events: none; }
  #pruler .pd { flex: 1; position: relative; display: flex; justify-content: space-between; align-items: center; height: 24px; cursor: pointer; }
  #pruler .pd::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: rgba(246, 236, 214, .22); }
  #pruler .pd i { position: relative; width: 5px; height: 5px; border-radius: 50%; opacity: .85; transition: all .3s; }
  #pruler .pd i.c { width: 11px; height: 11px; background: var(--gold) !important; box-shadow: 0 0 0 3px rgba(220, 174, 82, .35); opacity: 1; }
  #card, #chip { right: 12px; top: calc(var(--st) + 94px); }
  #card { width: min(262px, calc(100% - 24px)); padding: 13px 14px 10px; }
  #card p { font-size: 16px; margin: 7px 0 9px; }
  #chip { height: 34px; }
  body[data-mode="watch"] #card { width: min(238px, calc(100% - 128px)); }
  body[data-mode="watch"] #card p { font-size: 14.5px; }
  #factmore { top: auto !important; right: 0 !important; bottom: 0; left: 0; width: 100%; max-height: 82%; border-radius: 22px 22px 0 0; padding: 24px 22px calc(var(--sb) + 30px); transform: translateY(40px); transform-origin: bottom center; }
  #factmore h3 { font-size: 26px; } #factmore p { font-size: 17.5px; }
  body:is(.more-open, .pick-open) #shade { opacity: 1; pointer-events: auto; }
  #inset-cap { font-size: 10.5px; }
  #sub { left: 50%; width: calc(100% - 40px); bottom: calc(var(--sb) + 112px); }
  #subcur { font-size: 22px; line-height: 1.25; }
  #subcur.mid { font-size: 19.5px; } #subcur.long { font-size: 17px; } #subcur.xlong { font-size: 15px; }
  #subcur .vn { font-size: 13px; padding: 3px 6px; margin-right: 8px; }
  #play { left: 16px; bottom: calc(var(--sb) + 40px); width: 46px; height: 46px; font-size: 20px; }
  #chnav { left: 50%; bottom: calc(var(--sb) + 48px); font-size: 12px; }
  #chnav #c-prev, #chnav #c-next { width: 26px; }
  #c-name { padding: 0 6px; max-width: 150px; }
  #meta { right: 8px; bottom: calc(var(--sb) + 48px); gap: 2px; font-size: 10.5px; }
  #prog { left: 16px; right: 16px; bottom: calc(var(--sb) + 14px); }
  #pop-more { right: 12px; bottom: calc(var(--sb) + 92px); width: min(290px, calc(100% - 24px)); }
  #pick { left: 0; right: 0; bottom: 0; width: auto; height: 74%; border-radius: 22px 22px 0 0; transform: translateY(40px); }
  body.pick-open #pick { transform: none; }
  #pick .legend { padding-bottom: calc(var(--sb) + 16px); }
  /* Read and Ask: a half-height sheet you can drag up to full */
  #col { left: 0; right: 0; width: auto; top: var(--sh, 50%); bottom: 0; border-left: 0; border-radius: 22px 22px 0 0; border-top: 1px solid rgba(220, 174, 82, .22); background: var(--panel); transform: translateY(104%); transition: transform .6s var(--ease), top .4s var(--ease); }
  #col.dragging { transition: transform .6s var(--ease); }
  #grab { display: flex; justify-content: center; align-items: center; height: 26px; flex: none; cursor: grab; touch-action: none; }
  #grab i { width: 40px; height: 4px; border-radius: 2px; background: rgba(246, 236, 214, .35); }
  .ch { padding: 2px 22px 8px; touch-action: none; }
  .ch .h { font-size: 28px; margin-top: 5px; }
  .ch em { display: none; }
  #verses { padding: 4px 22px 130px; }
  .vs { font-size: 18px; line-height: 1.42; padding: 8px 0; }
  .vs.on { margin: 0 -22px; padding: 9px 22px; }
  #thread { padding: 10px 20px 12px; gap: 13px; }
  .gd p { font-size: 17.5px; line-height: 1.36; }
  #sug { padding: 0 14px 10px; gap: 6px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  #sug button { white-space: nowrap; flex: none; }
  #inp { margin: 0 14px calc(var(--sb) + 104px); height: 46px; }
  body:is([data-mode="read"], [data-mode="ask"]) #scrim-bottom { opacity: 1; height: calc(var(--sb) + 130px); z-index: 10; background: linear-gradient(to top, rgba(26, 18, 11, 1) 62%, rgba(26, 18, 11, 0)); }
  /* History: one full-height list of every era and its stories */
  #drawer { inset: 0; max-height: none; transform: translateY(104%); padding: 0; z-index: 28; background: rgba(22, 15, 9, .98); border: 0; }
  #drawer .hd, #drawer .gr { display: none; }
  #drawer .dh { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2; padding: calc(var(--st) + 16px) 18px 14px; background: linear-gradient(rgba(22, 15, 9, 1) 85%, rgba(22, 15, 9, 0)); }
  #drawer .dh b { display: block; font: 600 28px/1 var(--read); }
  #drawer .dh small { display: block; font: 600 9.5px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin-top: 6px; }
  #drawer .dh .x { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: center; font-size: 18px; }
  #drawer .cols { display: block; margin: 0 20px; padding-bottom: calc(var(--sb) + 40px); }
  #drawer .ec { padding: 18px 0 4px; }
  #drawer .ec::before { display: none; }
  #drawer .ec b { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; }
  #drawer .ec b::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
  #drawer .ec small { display: inline-block; margin: 0 0 4px 10px; }
  #drawer .ec li button { font-size: 21px; padding: 11px 0; display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border-bottom: 1px solid rgba(246, 236, 214, .08); text-align: left; }
  #drawer .ec li button em { display: block; font: 500 11px var(--ui); font-style: normal; color: var(--dim); white-space: nowrap; }
  #drawer .ec li.on button { font-size: 22px; padding-left: 18px; }
  #drawer .ec li.on button::before { top: 21px; }
  #toast { bottom: calc(var(--sb) + 120px); }
}
