/* Earth: a light, paper-and-cards look (fonts and tones in the spirit of geo.tobiasbuilds.com). The globe itself is
   styled in earth.js; this file is only the chrome around it. */
:root {
  --font: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bricolage Grotesque", var(--font);
  --font-mono: "Martian Mono", ui-monospace, Menlo, monospace;
  --font-serif: "Instrument Serif", Georgia, serif;
  --paper: #efece6; --paper-2: #f6f4ef; --panel: #fbfaf7; --line: #e2ddd3; --line-2: #ece8e0;
  --fg: #2f3b45; --dim: #687682; --accent: #e8743b; --accent-deep: #cf3a2f; --accent-soft: #fbe6dc; --teal: #2f7d8c; --ice: #d8e7f0;
  --radius: 14px; --radius-s: 9px; --radius-l: 22px;
  --drawer-w: clamp(460px, 40vw, 620px); /* the lesson drawer; earth.js/lessons.js read its real width */
  --shadow: 0 6px 18px rgba(46,56,66,.14); --shadow-s: 0 2px 6px rgba(46,56,66,.1); --shadow-l: 0 10px 26px rgba(46,56,66,.18);
  --ease: cubic-bezier(.22,.61,.36,1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height:100%; margin:0; }
body { background:#050506; color:var(--fg); font-family:var(--font); font-weight:400; overflow:hidden; -webkit-font-smoothing:antialiased; }
/* The globe hangs in black space among stars (Manny, Nov 15): #stars is a canvas under the map (stars.js), and the map's
   own canvas is clear outside the globe. The panels and buttons stay light, floating over the night. */
#stars { position:fixed; inset:0; width:100%; height:100%; display:block; }
/* The light look (Manny, Nov 16; the sun or moon among the map's buttons): the sky is paper in the tan of the lesson path,
   and the stars are faint brown specks on it. */
html[data-sky="light"] body { background:#f5efe2; }
html[data-sky="light"] #stars { filter:invert(1) sepia(1) saturate(1.6) hue-rotate(-12deg); opacity:.34; }
body, #stars { transition:background-color .5s ease, opacity .5s ease; }
#map { position:fixed; inset:0; background:transparent; }
/* Arriving from the film at /timeline/ (?arrive=1, earth.js): black, then the stars, then the Earth grows from a speck
   to its place while two lines are said; only then do the buttons come in. */
.top, .bottom, .maplibregl-control-container, .coords { transition:opacity 1.4s ease; }
body.arriving .top, body.arriving .bottom, body.arriving .maplibregl-control-container, body.arriving .coords { opacity:0; pointer-events:none; }
body.arriving #map { transform:scale(.03); opacity:0; pointer-events:none; }
body.arriving.arriving-in #map { transform:none; opacity:1; transition:transform 7.5s cubic-bezier(.22,.5,.12,1), opacity .9s ease; } /* it is growing from the first moment, fast at first and settling gently */
.arrive-veil { position:fixed; inset:0; z-index:40; background:#000; pointer-events:none; transition:opacity 1.3s ease; }
.arrive-veil.gone { opacity:0; }
.arrive-sub { position:fixed; left:50%; bottom:74px; z-index:41; translate:-50% 0; width:min(880px, calc(100vw - 40px)); margin:0; text-align:center; font:400 clamp(19px, 2.5vw, 29px)/1.3 "Instrument Serif", Georgia, serif; color:#f6f2e9; text-shadow:0 2px 18px #000, 0 0 3px rgba(0,0,0,.9); opacity:0; transition:opacity .6s ease; pointer-events:none; }
.arrive-sub.on { opacity:1; }
#map canvas { outline:none; }
button { font-family:inherit; }

/* labels in small mono caps, like the reference's "COUNTRY" / "CAPITAL" */
.label, .card small, .lesson-head small, .lesson-body small, .lesson-card small, .help h3, .tl-ticks span, .drawer-head small {
  font-family:var(--font-mono); font-size:10px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:var(--dim);
}

/* Top bar */
.top { position:fixed; top:0; left:0; right:0; display:flex; align-items:center; gap:10px; padding:12px 14px; pointer-events:none; z-index:5; }
.top > * { pointer-events:auto; }
.brand { display:flex; align-items:center; gap:8px; cursor:default; user-select:none; font-family:var(--font-display); font-weight:800; font-size:17px; letter-spacing:-.01em; color:var(--fg); text-decoration:none; padding:6px; background:var(--panel); border:1px solid var(--line); border-radius:999px; box-shadow:var(--shadow-s); white-space:nowrap; }
.brand b { font-weight:800; color:var(--accent-deep); }
.brand em { font-family:var(--font-serif); font-style:italic; font-weight:400; font-size:19px; color:var(--teal); margin-left:0; }
.brand-logo { width:22px; height:22px; border-radius:6px; display:block; } /* the Recess R alone; "Earth" was dropped Nov 4 */
/* The layer chips stay tucked behind the layers button (bottom bar, right of the Timeline button) and peel out from it,
   left to right, on hover or tap. With the layers gone from the top bar, My Timeline and then Moments, Ideas and People sit at its right end. */
.top .bag-tlbtn { margin-left:auto; } .top .bag-tlbtn ~ .bag-tlbtn { margin-left:0; } /* My Memory Palace sits beside My Timeline */
.layers { display:flex; flex-wrap:nowrap; gap:6px; }
.layers .chip { opacity:0; transform:translateX(-18px) scale(.92); pointer-events:none; transition:opacity .18s var(--ease), transform .22s var(--ease), background .2s, border-color .2s, color .2s; transition-delay:calc(var(--i, 0) * 15ms); }
.bottom.layers-open .layers .chip { opacity:1; transform:none; pointer-events:auto; transition-delay:calc(var(--i, 0) * 35ms); }
.layers-btn { display:grid; place-items:center; transition:background .2s, border-color .2s, color .2s; }
.layers-btn svg { display:block; }
.bottom.layers-open .layers-btn { background:var(--fg); border-color:var(--fg); color:#fff; }
.chip { font-family:var(--font); font-size:13px; font-weight:500; color:var(--fg); background:var(--panel); border:1px solid var(--line); border-radius:999px; padding:8px 13px; cursor:pointer; box-shadow:var(--shadow-s); transition:background var(--ease) .2s, border-color .2s, color .2s; }
.chip:hover { border-color:#cfc8bb; }
.chip[aria-pressed="true"] { background:var(--fg); border-color:var(--fg); color:#fff; }
.icon { width:36px; height:36px; border-radius:50%; border:1px solid var(--line); background:var(--panel); color:var(--fg); font-family:var(--font-display); font-weight:800; font-size:16px; cursor:pointer; box-shadow:var(--shadow-s); }
.icon:hover { border-color:#cfc8bb; }
.icon.small { width:30px; height:30px; font-size:14px; }

/* Place / event card */
.card { position:fixed; left:14px; bottom:60px; width:min(380px, calc(100vw - 28px)); padding:18px 20px 20px; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-l); box-shadow:var(--shadow-l); z-index:5; }
.card[hidden] { display:none; }
.card small { color:var(--accent-deep); }
.card h2 { font-family:var(--font-display); font-weight:800; font-size:30px; line-height:1.02; letter-spacing:-.02em; margin:6px 0 10px; }
.card p { margin:0; color:var(--fg); font-size:15px; line-height:1.55; }
.close { position:absolute; top:10px; right:10px; width:32px; height:32px; flex:none; padding:0; border-radius:50%; border:1px solid var(--line); background:var(--panel); color:var(--dim); font-size:0; line-height:0; cursor:pointer; }
/* the X is two crossed lines, so it sits exactly in the middle whatever the font */
.close::before, .close::after { content:""; position:absolute; left:50%; top:50%; width:42%; height:1.6px; border-radius:2px; background:currentColor; transform:translate(-50%, -50%) rotate(45deg); }
.close::after { transform:translate(-50%, -50%) rotate(-45deg); }
.close:hover { color:var(--fg); border-color:#cfc8bb; }

/* Bottom-left bits */
.bottom { position:fixed; left:14px; bottom:14px; display:flex; align-items:center; gap:8px; z-index:5; transition:left .42s var(--ease); }
.coords { position:fixed; right:49px; bottom:10px; z-index:5; pointer-events:none; display:flex; align-items:center; justify-content:center; height:31px; padding:0 12px; min-width:150px; font-family:var(--font-mono); font-size:11px; color:var(--dim); background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-s); box-shadow:var(--shadow-s); } /* beside the buttons at the bottom right, the same height as one */
.coords:empty { display:none; }
.land-tip { position:fixed; z-index:6; pointer-events:none; font-family:var(--font-display); font-weight:700; font-size:14px; color:var(--fg); background:var(--panel); border:1px solid var(--line); border-radius:999px; padding:6px 12px; box-shadow:var(--shadow-s); white-space:nowrap; } /* names the colored land under the mouse (Nov 7) */
.land-tip[hidden] { display:none; }
/* Map credits: MapLibre's own line is hidden; earth.js adds an "i" button built like the zoom buttons, last in their stack,
   which opens the credits as a small panel to its left (Manny, Nov 14). The mouse coordinates sit beside the stack. */
.maplibregl-ctrl-attrib { display:none !important; }
.credits { position:relative; }
.credits-btn { display:grid; place-items:center; padding:0; color:#333; }
.credits-btn svg { display:block; }
.credits-btn[aria-expanded="true"] { background:var(--fg); color:#fff; border-radius:calc(var(--radius-s) - 1px); }
.credits-pop { position:absolute; right:calc(100% + 8px); bottom:-1px; width:max-content; max-width:min(300px, calc(100vw - 70px)); padding:11px 14px 12px; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-s); box-shadow:var(--shadow); text-align:left; animation:credits-in .18s var(--ease); }
.credits-pop[hidden] { display:none; }
@keyframes credits-in { from { opacity:0; transform:translateX(6px); } }
.credits-pop small { display:block; margin-bottom:7px; font-family:var(--font-mono); font-size:10px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:var(--dim); }
.credits-pop ul { list-style:none; margin:0; padding:0; }
.credits-pop li { font-family:var(--font); font-size:12.5px; line-height:1.7; color:var(--fg); }
.credits-pop a { color:inherit; text-decoration:underline; text-decoration-color:#cfc8bb; text-underline-offset:3px; }
.credits-pop a:hover { text-decoration-color:var(--fg); }
.pill { font-family:var(--font); font-size:13px; font-weight:500; color:var(--fg); background:var(--panel); border:1px solid var(--line); border-radius:999px; padding:9px 14px; cursor:pointer; box-shadow:var(--shadow-s); }
.pill:hover { border-color:#cfc8bb; }
.pill.done { border-color:var(--teal); color:var(--teal); }
.pill.gold { background:var(--accent); border-color:var(--accent); color:#fff; }
.pill.gold:hover { background:#d9682f; }
.pill-tl[aria-pressed="true"] { background:var(--teal); border-color:var(--teal); color:#fff; }

/* Modal sheets (help, accuracy, lesson chooser) */
.help { position:fixed; inset:0; z-index:10; background:rgba(47,59,69,.35); display:flex; align-items:center; justify-content:center; padding:16px; backdrop-filter:blur(3px); }
.help[hidden] { display:none; }
.help-box { position:relative; width:min(640px, 100%); max-height:100%; overflow:auto; padding:26px 30px 30px; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-l); box-shadow:var(--shadow-l); }
.help h2 { font-family:var(--font-display); font-weight:800; font-size:38px; line-height:1; letter-spacing:-.02em; margin:0 0 12px; }
.help h3 { margin:22px 0 6px; color:var(--accent-deep); }
.help p { color:var(--fg); font-size:15px; line-height:1.55; margin:8px 0; }
.help b { font-weight:600; }
.help code { font-family:var(--font-mono); font-size:12px; color:var(--teal); }
.help pre { background:var(--paper-2); border:1px solid var(--line); border-radius:var(--radius-s); padding:10px 12px; font-family:var(--font-mono); font-size:12px; overflow:auto; color:var(--teal); }

/* Timeline bar */
.tl { position:fixed; left:14px; right:14px; bottom:60px; z-index:6; padding:12px 16px 8px; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-l); box-shadow:var(--shadow-l); transition:left .42s var(--ease); }
.tl[hidden] { display:none; }
.tl-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.tl-play { width:36px; height:36px; border-radius:50%; border:0; background:var(--accent); color:#fff; font-size:13px; cursor:pointer; flex:none; box-shadow:var(--shadow-s); }
.tl-year { font-family:var(--font-display); font-weight:800; font-size:28px; line-height:1; min-width:120px; letter-spacing:-.02em; }
.tl-chips { display:flex; gap:6px; flex-wrap:wrap; }
.tl-chips .chip { box-shadow:none; }
.tl-note { font-family:var(--font-mono); font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--dim); flex-basis:100%; order:10; margin-top:4px; }
#tl-info-btn { margin-left:auto; }
.tl .close { position:relative; top:auto; right:auto; width:30px; height:30px; }
.tl input[type=range] { width:100%; margin:10px 0 2px; accent-color:var(--accent); cursor:pointer; }
.tl-ticks { position:relative; height:16px; }
.tl-ticks span { position:absolute; transform:translateX(-50%); white-space:nowrap; }
.tl-ticks span:first-child { transform:none; }
.tl-ticks span:last-child { transform:translateX(-100%); }
body.tl-on .card { bottom:200px; }
body.tl-on .bottom { z-index:7; }

/* Lessons: a drawer that slides in from the left, opened by the Lessons button at the top left of the screen */
.drawer { position:fixed; top:0; left:0; bottom:0; width:min(var(--drawer-w), 100vw); display:flex; flex-direction:column; background:var(--panel); border-right:1px solid var(--line); box-shadow:var(--shadow-l); z-index:8; transform:translateX(-100%); transition:transform .42s var(--ease); }
body.drawer-open .drawer { transform:none; }
.drawer-tab { display:inline-flex; align-items:center; gap:8px; padding:9px 16px; background:var(--accent); color:#fff; border:0; border-radius:999px; cursor:pointer; box-shadow:var(--shadow-s); font-family:var(--font-display); font-weight:700; font-size:14px; letter-spacing:.02em; white-space:nowrap; } /* a button at the top left; the open drawer slides over it (Manny, Nov 4) */
.drawer-tab:hover { background:#d9682f; }
.drawer-head { display:flex; align-items:center; gap:10px; padding:20px 26px 14px; border-bottom:1px solid var(--line-2); }
.drawer-head h2 { font-family:var(--font-display); font-weight:800; font-size:30px; letter-spacing:-.02em; margin:0; }
.drawer-head .close { position:relative; top:auto; right:auto; margin-left:auto; width:34px; height:34px; }
/* a lesson's page: its name in the header, after a round back button (Manny, Nov 25) */
.dh-list { display:flex; align-items:center; gap:12px; min-width:0; }
.dh-back { flex:none; width:38px; height:38px; display:grid; place-items:center; padding:0 0 2px; border-radius:50%; border:1px solid var(--line); background:var(--panel); color:var(--fg); font:500 19px/1 var(--font); cursor:pointer; transition:background-color .15s, border-color .15s; }
.dh-back[hidden] { display:none; } .dh-back:hover { background:var(--paper-2); border-color:var(--fg); }
.drawer.covering .drawer-head h2 { font-size:24px; line-height:1.1; }
.drawer-body { flex:1; overflow:auto; }
/* The list and a course's page are plain rows divided by lines across the drawer (Manny, Nov 7; were rounded cards). */
.lesson-list { display:flex; flex-direction:column; }
.lesson-list[hidden], .course-page[hidden] { display:none; }
.course-head, .lesson-card { display:flex; align-items:center; gap:14px; width:100%; padding:18px 26px; background:transparent; border:0; border-bottom:1px solid var(--line-2); border-radius:0; color:var(--fg); cursor:pointer; text-align:left; transition:background-color .15s; }
.course-head:hover, .lesson-card:hover { background:var(--paper-2); }
.course-head:hover .chev, .lesson-card:hover .chev { color:var(--accent); transform:translateX(3px); }
.course-head:focus-visible, .lesson-card:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.course-num { font-family:var(--font-mono); font-weight:500; font-size:13px; color:var(--accent-deep); min-width:20px; }
.course-name { flex:1; font-family:var(--font-display); font-weight:800; font-size:22px; letter-spacing:-.01em; }
.course-count { font-family:var(--font-mono); font-size:11px; letter-spacing:.1em; text-transform:uppercase; color:var(--dim); }
.chev { font-size:24px; line-height:1; color:#b9b2a6; transition:transform .15s, color .15s; }
/* a finished part or lesson: a green check where the arrow was; a finished course says so in green (lessons.js: paintDone) */
.chev[hidden], .lc-done[hidden] { display:none; }
.lc-done { flex:none; display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:#2f8f55; color:#fff; font-size:15px; font-weight:800; line-height:1; }
.lesson-card.done h3 { color:var(--dim); }
.course-head.done .course-count { color:#2f8f55; font-weight:600; }
.course-page { display:flex; flex-direction:column; padding-bottom:20px; }
/* The path: the new lesson as a road of stops, in the drawer's own paper-and-ink look (Manny, Nov 15). */
.path[hidden] { display:none; }
.path-head { padding:20px 26px 6px; }
.path-head small, .stop-text small, .path-older small, .path-back small { font-family:var(--font-mono); font-size:10px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:var(--accent-deep); }
.path-head h3 { margin:0 0 6px; font-family:var(--font-display); font-weight:800; font-size:30px; letter-spacing:-.02em; line-height:1.05; }
.path-head p { margin:0; font-size:15px; line-height:1.5; color:var(--dim); }
/* the list of stories (Nov 16): a row to jump between Spaces, a heading for each Space, and plain stops for the stories
   that have no photograph yet */
.path-jump { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:16px; }
.path-jump small { margin-right:4px; color:#9a8b72; }
.path-jump button { min-width:30px; height:30px; padding:0 8px; border-radius:999px; border:1px solid #e2d6bf; background:#fff; color:#7d5a30; font-family:var(--font-mono); font-size:11px; cursor:pointer; transition:border-color .15s, background-color .15s, color .15s; }
.path-jump button:hover { background:#bd935d; border-color:#bd935d; color:#fff; }
.path-space { border-top:1px solid var(--line-2); margin-top:14px; }
.space-head { padding:20px 26px 0; }
.space-head small { font-family:var(--font-mono); font-size:10px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:#b98a4a; }
.space-head b { display:block; margin-top:5px; font-family:var(--font-display); font-weight:800; font-size:22px; letter-spacing:-.01em; line-height:1.15; }
.space-head p { margin:6px 0 0; font-size:14.5px; line-height:1.45; color:var(--dim); }
.stop.plain { background:#f6efe1; box-shadow:0 0 0 6px var(--panel), 0 0 0 9px #eadfca; }
/* Chapter 0, the intro film: an orange stop with a play sign */
.stop.film { background:var(--accent); box-shadow:0 0 0 6px var(--panel), 0 0 0 9px var(--accent), 0 10px 22px rgba(86,62,30,.22); }
.stop .stop-play { width:0; height:0; margin-left:7px; border-style:solid; border-width:15px 0 15px 25px; border-color:transparent transparent transparent #fff; }
.stop.plain b { font-size:24px; color:#c2ae88; }
.stop-text:hover { background:var(--paper-2); }
/* a long time ("0.4 million years after the Big Bang") goes under the title on one line, not beside it, so the title keeps its room */
.stop-text:has(.stop-year.long) { flex-direction:column; align-items:flex-start; gap:7px; }
.stop-year.long > span { flex-wrap:wrap; gap:3px 6px; white-space:normal; }
.stop-year.long b { font-size:19px; letter-spacing:-.02em; white-space:normal; line-height:1.15; } /* a long one (a chapter's span of years) may run onto a second line; it used to be cut off at the edge */
.stop-year.long i { letter-spacing:.12em; }
.stop-go { white-space:nowrap; }
/* a lesson that is finished: a brown ring and a check on its stop, and a quiet "Watch again" */
.stop.has img { background:#f4eee1; } /* drawings with a clear background sit on paper */
.stop.fin { box-shadow:0 0 0 6px var(--panel), 0 0 0 9px #bd935d, 0 10px 22px rgba(86,62,30,.22); }
.stop.fin b { color:#a67c45; }
.stop-go.again { margin-top:7px; padding:6px 13px; background:none; border:1px solid #e2d6bf; color:#7d5a30; font-size:12.5px; cursor:pointer; }
/* a story's cover */
.cover { padding:18px 26px 30px; }
.cover-back { margin-bottom:18px; }
.cover-pic { margin:0 0 20px; } .cover-pic img { display:block; width:100%; max-height:300px; object-fit:cover; border-radius:var(--radius); background:#f3ecdd; }
.cover-pic figcaption { margin-top:7px; font-size:12px; line-height:1.4; color:#9a8b72; }
.cover > small, .cover-tag small, .cover-nav small { font-family:var(--font-mono); font-size:10px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:#b98a4a; }
.cover h3 { margin:8px 0 12px; font-family:var(--font-display); font-weight:800; font-size:34px; letter-spacing:-.02em; line-height:1.04; }
.cover-text { margin:0; font-size:17px; line-height:1.6; }
.cover-tag { margin:18px 0 0; } .cover-tag b { display:block; margin-top:4px; font-family:var(--font-display); font-weight:700; font-size:17px; color:#7d5a30; }
.cover-soon { margin:24px 0 0; padding:14px 16px; border:1px dashed #d6c5a4; border-radius:var(--radius); background:#fdfaf3; font-size:14px; line-height:1.45; color:var(--dim); } .cover-soon b { display:block; margin-bottom:2px; font-family:var(--font-display); font-weight:700; font-size:15px; color:var(--fg); }
.cover-watch { display:inline-flex; align-items:center; gap:10px; margin-top:24px; padding:14px 26px 14px 20px; border-radius:999px; background:var(--accent); color:#fff; font-family:var(--font-display); font-weight:700; font-size:17px; text-decoration:none; box-shadow:var(--shadow); transition:transform .15s; } .cover-watch:hover { transform:scale(1.04); }
.cover-len { margin:10px 0 0; font-size:13.5px; color:var(--dim); }
.cover-nav { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:22px; }
.cover-nav button { padding:12px 14px; border-radius:var(--radius); border:1px solid #e2d6bf; background:#fff; color:var(--fg); text-align:left; cursor:pointer; font-family:var(--font); transition:border-color .15s; } .cover-nav button:hover { border-color:#bd935d; }
.cover-nav button:last-child { text-align:right; } .cover-nav b { display:block; margin-top:4px; font-weight:600; font-size:14px; line-height:1.25; }
.path-prog { display:flex; align-items:center; gap:12px; margin-top:16px; }
.path-prog span { flex:1; height:6px; border-radius:99px; background:#ece2cf; overflow:hidden; }
.path-prog i { display:block; height:100%; border-radius:99px; background:#b98f5a; transition:width .6s var(--ease); }
.path-prog em { font-style:normal; font-family:var(--font-mono); font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:#9a8b72; white-space:nowrap; }
.path-map { position:relative; margin:14px 0 10px; }
/* one road for every chapter (the "mix" curriculum): a chapter's name sits beside the road, above its first stop */
.path-space.one { border-top:0; margin-top:6px; }
.path-chap { position:absolute; left:248px; right:18px; pointer-events:none; } /* in line with the lessons' titles */
.stop-info > .stop-chap { display:block; margin:0 0 6px; color:#b98a4a; } /* the chapter's number, above its lesson's title */
.path-chap small { display:block; font-family:var(--font-mono); font-size:10px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:#b98a4a; }
.path-chap b { display:block; margin-top:3px; font-family:var(--font-display); font-weight:800; font-size:17px; letter-spacing:-.01em; line-height:1.15; }
.path-map > svg { position:absolute; inset:0; width:100%; height:100%; overflow:visible; pointer-events:none; }
.path-map path { fill:none; stroke-linecap:round; stroke-linejoin:round; }
/* the trail: pale tan where you have not been, a browner tan where you have, each with a faint dotted middle */
.path-map .road { stroke:#eadfca; stroke-width:30; }
.path-map .road-dash { stroke:#d6c5a4; stroke-width:2.5; stroke-dasharray:.1 13; }
.path-map .walked { stroke:#bd935d; stroke-width:30; }
.path-map .walked-dash { stroke:rgba(255,248,232,.7); stroke-width:2.5; stroke-dasharray:.1 13; }
.stop { position:absolute; width:96px; height:96px; margin:-48px 0 0 -48px; padding:0; border-radius:50%; overflow:visible; display:grid; place-items:center; cursor:pointer; background:var(--panel); border:0; box-shadow:0 0 0 6px var(--panel), 0 0 0 9px #bd935d, 0 10px 22px rgba(86,62,30,.22); color:var(--dim); transition:transform .25s var(--ease), box-shadow .25s; }
.stop img { position:absolute; inset:0; width:100%; height:100%; border-radius:50%; object-fit:cover; display:block; }
.stop b { font-family:var(--font-display); font-weight:800; font-size:28px; color:var(--fg); }
.stop:hover:not(.locked) { transform:scale(1.05); }
.stop.now { box-shadow:0 0 0 6px var(--panel), 0 0 0 9px #bd935d, 0 12px 26px rgba(86,62,30,.28); animation:stop-now 2.4s ease-out infinite; } /* the same brown ring as every stop (Manny, Nov 25: not orange); only the pulse marks the lesson to do next */
@keyframes stop-now { 0% { box-shadow:0 0 0 6px var(--panel), 0 0 0 9px #bd935d, 0 0 0 9px rgba(189,147,93,.55), 0 12px 26px rgba(86,62,30,.28); } 70%, 100% { box-shadow:0 0 0 6px var(--panel), 0 0 0 9px #bd935d, 0 0 0 26px rgba(189,147,93,0), 0 12px 26px rgba(86,62,30,.28); } }
.stop.locked { background:#f3ecdd; box-shadow:0 0 0 6px var(--panel), 0 0 0 9px #eadfca; color:#b9a886; cursor:default; }
.stop.locked svg { width:26px; height:26px; }
.stop.shake { animation:check-shake .4s ease; }
.stop-tick { position:absolute; right:-3px; bottom:-3px; width:30px; height:30px; border-radius:50%; background:#7d5a30; border:3px solid var(--panel); }
.stop-tick::after { content:""; position:absolute; left:9px; top:4.5px; width:5px; height:11px; border:solid #fff; border-width:0 2.5px 2.5px 0; transform:rotate(45deg); }
.stop-text { position:absolute; right:18px; translate:0 -50%; display:flex; align-items:center; gap:10px; padding:14px 16px; border-radius:16px; border:1px solid transparent; cursor:pointer; line-height:1.2; transition:background-color .2s, border-color .2s, box-shadow .2s; }
.stop-text.done:hover { background:var(--paper-2); }
/* the lesson to do next looks like every other stop (Manny, Nov 25: no white box round it); it only has the Start button, under its years */
.stop-text.now { flex-direction:column; align-items:flex-start; gap:7px; } .stop-text.now .stop-go { margin-top:3px; } /* the box of the lesson to do next: title, years, then Start at the bottom; and it stands clear of its circle, which is larger while it pulses */
.stop-info { flex:1; min-width:0; }
.stop-info > b { display:block; margin:0; font-family:var(--font-display); font-weight:800; font-size:20px; letter-spacing:-.01em; line-height:1.12; color:var(--fg); }
.stop-text small { color:#9a8b72; }
.stop-text.locked { cursor:default; } .stop-text.locked .stop-info > b { color:#b3a892; } .stop-text.locked small { color:#c2b8a3; }
.stop-go { display:inline-block; margin-top:9px; padding:8px 16px; border-radius:999px; background:#9a6f3d; /* brown, like the rings (Manny, Nov 25: not orange); a shade darker so the white words read */ color:#fff; font-family:var(--font-display); font-weight:700; font-size:13.5px; }
.stop-note { display:inline-flex; margin-top:7px; align-items:center; gap:6px; font-size:13px; color:#b3a892; }
.stop-note.got { color:#7d5a30; font-weight:600; }
.stop-note.got::before { content:""; width:4px; height:8px; margin:-3px 2px 0 3px; border:solid currentColor; border-width:0 2px 2px 0; transform:rotate(45deg); }
/* the year, large and faint, at the right edge of the row */
.stop-year { flex:none; text-align:left; color:#dbcfb8; line-height:1; }
.stop-year small { display:block; margin-bottom:6px; }
.stop-year > span { display:inline-flex; align-items:baseline; gap:5px; white-space:nowrap; }
.stop-year b { font-family:var(--font-display); font-weight:800; font-size:30px; letter-spacing:-.03em; font-variant-numeric:tabular-nums; }
.stop-year i { font-style:normal; font-family:var(--font-mono); font-size:10px; letter-spacing:.18em; }
.stop-text.now .stop-year { color:#cdb994; }
.stop-text.locked .stop-year { color:#e8dfcd; }
@media (max-width: 520px) { .stop-year b { font-size:22px; } .stop-info > b { font-size:17px; } .stop-text { right:8px; padding:12px; } }
.path-done { margin:0 26px 16px; padding:14px 16px; border-radius:var(--radius); background:var(--accent-soft); font-size:15px; line-height:1.5; } .path-done a { color:var(--accent-deep); font-weight:600; }
.path-older { display:flex; align-items:center; gap:14px; width:100%; margin-top:10px; padding:18px 26px; background:transparent; border:0; border-top:1px solid var(--line-2); color:var(--fg); cursor:pointer; text-align:left; font-family:var(--font); transition:background-color .15s; }
.path-older > span:first-child { flex:1; } .path-older small { color:var(--dim); } .path-older b { display:block; margin-top:4px; font-weight:500; font-size:15px; }
.path-older:hover { background:var(--paper-2); } .path-older:hover .chev { color:var(--accent); transform:translateX(3px); }
/* "My memory palace", under the path's title: the wall of pictures hung so far (films/palace/) */
body.palace-on .top .bag-opens { display:none; } /* Moments, Ideas, People: hidden for now (Manny, Nov 25); My Memory Palace stands there (lessons.js) */
.path-palace + .path-palace { margin-top:8px; }
.path-palace { display:flex; align-items:center; gap:14px; width:calc(100% - 52px); margin:14px 26px 4px; padding:14px 16px; background:var(--paper-2); border:1px solid var(--line-2); border-radius:14px; color:var(--fg); cursor:pointer; text-align:left; font-family:var(--font); transition:border-color .15s; }
.path-palace > span:first-child { flex:1; } .path-palace small { font-family:var(--font-mono); font-size:10px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:var(--dim); } .path-palace b { display:block; margin-top:4px; font-weight:500; font-size:15px; }
.path-palace:hover { border-color:var(--accent); } .path-palace:hover .chev { color:var(--accent); transform:translateX(3px); }
.path-back h3 { margin:2px 0 0; font-family:var(--font-display); font-weight:800; font-size:18px; } .path-back:hover .chev { transform:translateX(-3px); }
@media (prefers-reduced-motion: reduce) { .stop.now { animation:none; } }
.course-page .lesson-intro { margin:0; padding:18px 26px 14px; font-size:15px; line-height:1.5; color:var(--dim); border-bottom:1px solid var(--line-2); }
.grade-pick { display:flex; gap:24px; padding:0 26px; border-bottom:1px solid var(--line-2); } /* a course in grade bands: pick one, its lessons show below */
.grade-btn { padding:12px 0 10px; background:transparent; border:0; border-bottom:2px solid transparent; margin-bottom:-1px; color:var(--dim); font-family:var(--font-display); font-weight:700; font-size:15px; cursor:pointer; }
.grade-btn:hover { color:var(--fg); }
.grade-btn[aria-pressed="true"] { color:var(--fg); border-bottom-color:var(--accent); }
.grade-level { display:flex; flex-direction:column; }
.grade-level[hidden] { display:none; }
.lc-text { flex:1; min-width:0; }
.lesson-card small { color:var(--accent-deep); }
.lesson-card h3 { font-family:var(--font-display); font-weight:800; font-size:21px; line-height:1.15; letter-spacing:-.015em; margin:5px 0 0; }
.lesson-card p { margin:5px 0 0; color:var(--dim); font-size:15px; line-height:1.45; }

.lesson { display:flex; flex-direction:column; height:100%; }
.lesson[hidden] { display:none; }
.lesson-head { display:flex; align-items:center; gap:10px; padding:16px 26px 12px; }
.lesson-head small { color:var(--accent-deep); line-height:1.4; }
.lesson-head .back { font-family:var(--font); font-size:14px; font-weight:500; color:var(--dim); background:transparent; border:1px solid var(--line); border-radius:999px; padding:5px 10px; cursor:pointer; white-space:nowrap; }
.lesson-head .back:hover { color:var(--fg); border-color:#cfc8bb; }
.lesson-fig { margin:0 0 16px; background:var(--paper); position:relative; min-height:120px; border-radius:var(--radius); overflow:hidden; border:1px solid var(--line); }
.lesson-fig[hidden] { display:none; }
.lesson-fig img { display:block; width:100%; max-height:min(300px, 31vh); object-fit:cover; transition:opacity .3s; }
.lesson-fig.loading img { opacity:0; }
.lesson-fig.loading::after { content:"…"; position:absolute; inset:0; display:grid; place-items:center; color:var(--dim); font-size:28px; }
.lesson-fig figcaption { padding:8px 14px; font-size:13px; line-height:1.4; color:var(--dim); background:var(--panel); }
.lesson-fig figcaption a { color:var(--dim); }
.lesson-body { flex:1; overflow:auto; padding:18px 26px 14px; }
.lesson-body h2 { font-family:var(--font-display); font-weight:800; font-size:36px; line-height:1.05; letter-spacing:-.02em; margin:6px 0 10px; }
.lesson-body p { margin:0; font-size:18px; line-height:1.65; color:var(--fg); }
.lesson-body p b { font-weight:600; color:var(--accent-deep); }
/* Read-along: the word being read (lessons with word timings) */
.w { border-radius:4px; }
.read-along .w { cursor:pointer; }
.w.hov { background:#fff5cc; box-shadow:0 0 0 3px #fff5cc; } /* the sentence under the mouse: click to hear it again */
.w.on { background:#ffe27a; box-shadow:0 0 0 3px #ffe27a; }
.lesson-body dfn { font-style:normal; font-weight:600; color:var(--teal); text-decoration:underline dotted; text-underline-offset:3px; cursor:pointer; border-radius:3px; }
.lesson-body dfn:hover, .lesson-body dfn:focus-visible { background:#e1eef1; outline:none; }
.lesson-body p b.place { text-decoration:underline dotted; text-underline-offset:3px; cursor:pointer; border-radius:3px; }
.lesson-body p b.place:hover, .lesson-body p b.place:focus-visible { background:var(--accent-soft); outline:none; }
.def-card { position:fixed; z-index:20; padding:14px 16px 16px; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow-l); }
.def-card[hidden] { display:none; }
.def-card small { font-family:var(--font-mono); font-size:10px; font-weight:500; letter-spacing:.14em; text-transform:uppercase; color:var(--teal); }
.def-card h4 { font-family:var(--font-display); font-weight:800; font-size:23px; letter-spacing:-.01em; margin:4px 28px 6px 0; }
.def-card p { margin:0; font-size:16px; line-height:1.5; color:var(--fg); }
.def-card .close { top:8px; right:8px; width:26px; height:26px; }
/* Checks: a question under the step; Next is locked until it is right */
.check { margin:18px 0 4px; padding:14px 16px 14px; background:var(--accent-soft, #fbeee4); border:1px solid #efd9c6; border-radius:var(--radius); }
.check small { color:var(--accent-deep); }
.check-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:10px; } .check-head .check-q { margin:0 !important; flex:1; } .check-head .check-play { flex:none; margin-top:1px; }
.check-play { width:26px; height:26px; border-radius:50%; border:1px solid var(--line); background:var(--panel); cursor:pointer; padding:0; display:grid; place-items:center; }
.check-play::before { content:""; width:0; height:0; border-style:solid; border-width:5px 0 5px 8px; border-color:transparent transparent transparent var(--accent); margin-left:2px; }
.check-play:hover { border-color:#cfc8bb; }
.check-q { margin:4px 0 10px !important; font-size:17px !important; font-weight:600; line-height:1.45 !important; }
.check-opts { display:grid; gap:7px; }
.check-row { display:flex; align-items:center; gap:8px; }
.check-row .check-opt { flex:1; }
.check-play.opt { flex:none; }
.check-opt { font-family:var(--font); font-size:15px; text-align:left; line-height:1.35; color:var(--fg); background:var(--panel); border:1px solid var(--line); border-radius:10px; padding:9px 12px; cursor:pointer; }
.check-opt:hover:not(:disabled) { border-color:#cfc8bb; }
.check-opt.wrong { opacity:.45; text-decoration:line-through; cursor:default; }
.check-opt.right { background:var(--teal); border-color:var(--teal); color:#fff; }
.check-form { display:flex; gap:8px; }
.check-form input { flex:1; min-width:0; font-family:var(--font); font-size:16px; color:var(--fg); background:var(--panel); border:1px solid var(--line); border-radius:999px; padding:9px 14px; }
.check-form input:focus { outline:2px solid var(--teal); outline-offset:1px; border-color:var(--teal); }
.check-form input:disabled { color:var(--teal); font-weight:600; }
.check-form .pill { padding:9px 16px; font-size:14px; }
.check-fb { margin:9px 0 0 !important; font-size:14px !important; line-height:1.45 !important; color:var(--accent-deep); min-height:0; }
.check-fb:empty { display:none; }
.check.ok { background:#e6f1ef; border-color:#bcd9d2; }
.check.ok small, .check.ok .check-fb { color:var(--teal); }
.check.shake { animation:check-shake .4s ease; }
@keyframes check-shake { 0%, 100% { transform:translateX(0); } 25% { transform:translateX(-6px); } 50% { transform:translateX(6px); } 75% { transform:translateX(-3px); } }
.lesson-foot .pill.locked { opacity:.45; cursor:not-allowed; }
.lesson-foot { display:flex; align-items:center; gap:12px; padding:14px 22px 18px; border-top:1px solid var(--line-2); } .lesson-foot .pill { flex:none; white-space:nowrap; }
.lesson-foot .pill { font-size:16px; padding:11px 18px; }
.lesson-body small, .lesson-head small { font-size:12px; }
/* Listen: reads the step aloud; a pulsing dot while it plays */
.lesson-meta { display:flex; align-items:center; justify-content:flex-end; gap:10px; } #ls-count { display:none; } /* no "Step 1 of 5" over the title (Manny, Nov 24): the dots at the bottom count the steps */
.listen { display:inline-flex; align-items:center; gap:7px; font-family:var(--font); font-size:13px; font-weight:600; color:var(--fg); background:var(--panel); border:1px solid var(--line); border-radius:999px; padding:6px 12px 6px 9px; cursor:pointer; box-shadow:var(--shadow-s); transition:background .2s, border-color .2s, color .2s; }
.listen:hover { border-color:#cfc8bb; }
.listen-group { display:flex; align-items:center; gap:6px; }
.listen-ctl { display:inline-flex; align-items:center; justify-content:center; gap:2px; height:30px; min-width:30px; padding:0 7px; border-radius:999px; border:1px solid var(--line); background:var(--panel); color:var(--fg); cursor:pointer; font-family:var(--font); font-size:11px; font-weight:600; box-shadow:var(--shadow-s); }
.listen-ctl svg { width:15px; height:15px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.listen-ctl:hover { border-color:#cfc8bb; }
.listen-ico { width:0; height:0; border-style:solid; border-width:5px 0 5px 8px; border-color:transparent transparent transparent var(--accent); }
.listen.playing { background:var(--accent); border-color:var(--accent); color:#fff; }
.listen.playing .listen-ico { width:8px; height:8px; border:0; border-radius:50%; background:#fff; animation:listen-pulse 1.2s ease-in-out infinite; }
@keyframes listen-pulse { 0%, 100% { transform:scale(.7); opacity:.6; } 50% { transform:scale(1.1); opacity:1; } }
.lesson-foot .pill:disabled { opacity:.35; cursor:default; }
.lesson-dots { display:flex; gap:6px; flex:1; min-width:0; justify-content:center; flex-wrap:wrap; }
.lesson-dots .dot { flex:none; width:11px; height:11px; min-width:11px; border-radius:50%; border:1px solid #cfc8bb; background:transparent; padding:0; cursor:pointer; }
.lesson-dots .dot.on { background:var(--accent); border-color:var(--accent); }
.lesson-intro { margin:0 0 4px; padding:0 4px; font-size:15px; line-height:1.5; color:var(--dim); }
body.drawer-open .tl { left:calc(var(--drawer-w) + 14px); }
body.tl-hidden .tl { display:none; } /* a lesson with timeline: "hidden" drives the map by year without showing the bar */
body.drawer-open .card { display:none; }
body.drawer-open .bottom { left:calc(var(--drawer-w) + 14px); } /* the layers stay within reach in a lesson, clear of the drawer */
body.drawer-open #tl-toggle { display:none; }
@media (max-width: 900px) { body.drawer-open .bottom { display:none; } }

/* The drawer's top bar: "Lessons" on the list, "← All lessons" and the lesson's name while a lesson is open. */
.dh-course { display:none; flex-direction:column; align-items:flex-start; gap:8px; min-width:0; }
.dh-course h2 { font-size:26px; line-height:1.1; }
body.course-on:not(.lesson-on) .dh-list { display:none; }
body.course-on:not(.lesson-on) .dh-course { display:flex; }
.dh-course .back { font-family:var(--font); font-size:14px; font-weight:500; color:var(--dim); background:transparent; border:1px solid var(--line); border-radius:999px; padding:5px 12px; cursor:pointer; white-space:nowrap; }
.dh-course .back:hover { color:var(--fg); border-color:#cfc8bb; }
.dh-lesson { display:none; flex-direction:column; align-items:flex-start; gap:6px; min-width:0; }
body.lesson-on .dh-list { display:none; }
body.lesson-on .dh-lesson { display:flex; }
body.lesson-on .drawer-head { padding:14px 26px 12px; }
.dh-lesson small { display:none; } /* the red course line at the very top of a lesson is gone (Manny, Nov 15) */
.dh-lesson small.unused { font-family:var(--font-mono); font-size:12px; font-weight:500; letter-spacing:.12em; text-transform:uppercase; color:var(--accent-deep); line-height:1.4; }
.dh-lesson .back { font-family:var(--font); font-size:14px; font-weight:500; color:var(--dim); background:transparent; border:1px solid var(--line); border-radius:999px; padding:5px 12px; cursor:pointer; white-space:nowrap; }
.dh-lesson .back:hover { color:var(--fg); border-color:#cfc8bb; }
.drawer-head .close { align-self:center; }
body.lesson-on .lesson-fig { margin-top:0; }

/* MapLibre's own bits */
.maplibregl-ctrl-group { background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-s); box-shadow:var(--shadow-s); }
.maplibregl-ctrl-group button + button { border-top-color:var(--line); }
.maplibregl-ctrl-attrib { background:rgba(251,250,247,.8); color:var(--dim); font-family:var(--font-mono); font-size:9px; max-width:calc(100vw - 360px); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.maplibregl-ctrl-attrib:hover { white-space:normal; }
.maplibregl-ctrl-attrib a { color:var(--dim); }
.maplibregl-popup-content { background:var(--panel); color:var(--fg); border:1px solid var(--line); border-radius:var(--radius-s); font:500 13px var(--font); padding:8px 12px; }

@media (max-width: 900px) {
  /* on a phone the drawer is a bottom sheet, so the globe stays in view above it */
  .drawer { top:auto; height:60vh; width:100%; border-right:0; border-top:1px solid var(--line); border-radius:var(--radius-l) var(--radius-l) 0 0; transform:translateY(100%); }
  body.drawer-open .drawer { transform:none; }
  body.drawer-open .tl { display:none; }
  .coords { display:none; } /* mouse coordinates are moot on a phone */
  .lesson-fig img { max-height:140px; }
}
@media (max-width: 640px) {
  .top { flex-wrap:wrap; gap:8px; }
  .brand { font-size:15px; }
  .top .icon { order:1; }
  .layers { position:absolute; left:0; bottom:calc(100% + 8px); max-width:calc(100vw - 28px); overflow-x:auto; padding-bottom:4px; scrollbar-width:none; display:none; } /* on a phone the chips open as a row above the bar */
  .bottom.layers-open .layers { display:flex; }
  .chip { padding:7px 10px; font-size:12px; flex:none; }
  .card { bottom:64px; }
  .tl { left:6px; right:6px; padding:8px 10px 4px; }
  .tl-year { font-size:22px; min-width:90px; }
  body.tl-on .card { bottom:236px; }
  .tl-ticks span:first-child { display:none; }
}
@media (prefers-reduced-motion: reduce) { * { transition:none !important; } }

/* Spots: a yellow tag with a pointer on a place; a click opens its pictures (the gallery below) */
.spot-wrap { display:grid; place-items:center; }
.spot { position:relative; transform-origin:50% 100%; border:0; cursor:pointer; font:600 13px var(--font); color:#1b1408; background:#f2b33d; padding:4px 10px; border-radius:999px; box-shadow:var(--shadow-s); margin-bottom:8px; }
.spot::after { content:""; position:absolute; left:50%; top:100%; transform:translateX(-50%); border:7px solid transparent; border-top-color:#f2b33d; border-bottom:0; }
.spot:hover, .spot:focus-visible { background:#ffc74d; outline:none; }
.spot.static { cursor:default; }
.spot.static:hover { background:#f2b33d; }
.gal { position:fixed; inset:0; z-index:9; display:grid; place-items:center; background:rgba(27,20,8,.22); }
.gal[hidden] { display:none; }
body.drawer-open .gal { left:min(var(--drawer-w), 100vw); }
.gal.pre { visibility:hidden; } /* laid out but unseen while the first picture decodes */
.gal-card { width:min(580px, calc(100% - 32px)); max-height:calc(100% - 32px); overflow:auto; position:relative; will-change:transform, opacity; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-l); box-shadow:var(--shadow-l); padding:16px 18px 14px; }
.gal-head { display:flex; align-items:center; gap:10px; margin:0 28px 10px 0; }
.gal-card h4 { margin:0; font-family:var(--font-display); font-weight:800; font-size:24px; line-height:1.05; }
.gal-card figure { margin:0; }
.gal-card img { display:block; width:100%; aspect-ratio:3 / 2; max-height:50vh; object-fit:cover; border-radius:var(--radius-s); background:#e8e2d6; } /* a fixed shape: the card never reflows while it opens */
.gal-card figcaption { margin-top:9px; font-size:16px; line-height:1.4; color:var(--fg); }
.gal-credit { color:var(--dim); font-size:12px; margin-left:6px; }
.gal-nav { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; }
.gal-count { color:var(--dim); font-family:var(--font-mono); font-size:12px; }
.gal-close { top:12px; right:12px; width:34px; height:34px; z-index:1; }
/* Narrow screens: the story is a sheet across the bottom 60vh, so the picture card stays in the top half over the globe
   and never covers the text (Nov 4: with the card open, a tap on a sentence hit the card's backdrop instead). */
@media (max-width: 900px) { body.drawer-open .gal { left:0; bottom:50vh; } body.drawer-open .gal-card img { max-height:calc(50vh - 190px); } }

/* Peek: a picture a cue shows for a moment over the globe (narration only), then it goes away by itself */
.peek { position:fixed; z-index:9; left:50%; top:50%; transform:translate(-50%, -50%); width:min(440px, calc(100vw - 32px)); margin:0; background:var(--panel); border:1px solid var(--line); border-radius:var(--radius-l); box-shadow:var(--shadow-l); padding:12px 12px 10px; pointer-events:none; }
body.drawer-open .peek { left:calc(min(var(--drawer-w), 100vw) + (100vw - min(var(--drawer-w), 100vw)) / 2); }
.peek[hidden] { display:none; }
.peek img { display:block; width:100%; max-height:52vh; object-fit:contain; border-radius:var(--radius-s); background:#e8e2d6; } /* the whole picture, whatever its shape */
.peek figcaption { margin-top:8px; font-size:15px; line-height:1.4; color:var(--fg); }
.peek-credit { color:var(--dim); font-size:11px; margin-left:6px; }
@media (max-width: 900px) {
  /* on a phone or tablet the story is a bottom sheet (60vh), so the picture stays inside the globe area above it */
  body.drawer-open .peek { left:50%; top:20vh; width:min(440px, calc(100vw - 32px)); max-height:calc(40vh - 20px); overflow:hidden; }
  body.drawer-open .peek img { max-height:calc(40vh - 96px); }
}

/* Start screen: a lesson opened from a link shows only this until the child presses Start */
.start { position:fixed; inset:0; z-index:30; display:grid; place-items:center; background:#050506; color:#f1ece1; } /* the same night as the sky behind the globe */
.start-btn { font-family:var(--font-display); font-weight:800; font-size:34px; letter-spacing:-.01em; color:#fff; background:var(--accent); border:0; border-radius:999px; padding:22px 64px; cursor:pointer; box-shadow:var(--shadow-l); transition:transform .15s; }
.start-btn:hover, .start-btn:focus-visible { transform:scale(1.04); outline:none; }
.finished-card { display:grid; justify-items:center; gap:14px; text-align:center; padding:24px; max-width:520px; }
.finished-mark { width:96px; height:96px; border-radius:50%; display:grid; place-items:center; background:var(--accent); color:#fff; font-size:56px; font-weight:800; box-shadow:var(--shadow-l); }
.finished-card h2 { font-family:var(--font-display); font-weight:800; font-size:44px; letter-spacing:-.02em; margin:0; }
.finished-card p { margin:0; font-size:20px; line-height:1.5; color:inherit; }
.finished-btns { display:flex; flex-wrap:wrap; justify-content:center; gap:12px; margin-top:10px; }
.finished .start-btn { font-size:22px; padding:16px 36px; }
.finished-again { font-family:var(--font-display); font-weight:700; font-size:18px; padding:16px 28px; background:var(--panel); border:1px solid var(--line); border-radius:999px; color:var(--fg); cursor:pointer; }
.finished-again:hover { border-color:var(--accent); }

/* the Earth as a stage for a film (?stage=1, earth.js): only the globe, its marks and its route */
body.stage > :not(#map):not(#stars) { display:none !important; }
body.stage .maplibregl-ctrl-top-right, body.stage .maplibregl-ctrl-top-left, body.stage .maplibregl-ctrl-bottom-left { display:none !important; }
body.stage .maplibregl-ctrl-group, body.stage .maplibregl-ctrl-bottom-right > :not(.maplibregl-ctrl-attrib) { display:none !important; } /* no zoom, compass or help buttons; the credits stay */
.stage-mark { display:flex; align-items:center; gap:10px; pointer-events:none; }
.stage-mark i { flex:none; width:18px; height:18px; border-radius:50%; background:#e3bd72; border:3px solid #fff8e6; box-shadow:0 0 0 6px rgba(227,189,114,.28), 0 0 26px rgba(255,236,190,.9); animation:stage-pulse 2.2s ease-out infinite; }
.stage-mark span { padding:7px 12px 8px; border-radius:11px; background:rgba(8,8,10,.82); border:1px solid rgba(241,236,225,.22); color:#f1ece1; white-space:nowrap; }
.stage-mark b { display:block; font:400 21px/1.1 "Instrument Serif", Georgia, serif; }
.stage-mark small { display:block; margin-top:3px; font:500 9.5px "Martian Mono", monospace; letter-spacing:.16em; text-transform:uppercase; color:#e3bd72; } .stage-mark small:empty { display:none; }
.stage-head { display:block; width:16px; height:16px; border-radius:50%; background:#fff8e6; box-shadow:0 0 0 5px rgba(227,189,114,.45), 0 0 30px 8px rgba(255,236,190,.9); }
@keyframes stage-pulse { 0% { box-shadow:0 0 0 0 rgba(227,189,114,.6), 0 0 26px rgba(255,236,190,.9); } 100% { box-shadow:0 0 0 16px rgba(227,189,114,0), 0 0 26px rgba(255,236,190,.9); } }
