/* The Atlas of Cities - one stylesheet, no external fonts or requests. */
:root {
  --ink: #17202b;
  --muted: #536072;
  --bg: #f7f5f0;
  --paper: #ffffff;
  --line: #e4dfd4;
  --brand: #23396b;
  --gold: #f0b13c;
  --night: #142039;
  --cream: #fff6e2;
  --cream-line: #f0dcae;
  --roman: #b3431d;
  --modern: #2459c4;
  --elven: #2f7d34;
  --future: #00798c;
  --egypt: #95650f;
  --heaven: #6a4fb3;
  --accent: var(--brand);
  --focus: #1a5fd0;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
.world-roman  { --accent: var(--roman); }
.world-modern { --accent: var(--modern); }
.world-elven  { --accent: var(--elven); }
.world-future { --accent: var(--future); }
.world-egypt  { --accent: var(--egypt); }
.world-heaven { --accent: var(--heaven); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 1.0625rem/1.6 var(--sans); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.4rem + 3vw, 3.25rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1.1vw, 2rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1rem; font-family: var(--sans); margin-top: 1.1em; }
p { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip:focus { top: 1rem; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.section { padding-block: clamp(2rem, 1.2rem + 3vw, 3.5rem); }
.lead { font-size: 1.15rem; color: #2f3a48; max-width: 62ch; }
.small { font-size: .9rem; }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin: 0 0 .4rem; }
.plain { padding-left: 1.1rem; }
.btn { display: inline-block; background: var(--accent); color: #fff; padding: .7rem 1.2rem; border-radius: 999px; font: 600 1rem/1.2 var(--sans); text-decoration: none; border: 2px solid var(--accent); cursor: pointer; }
.btn:hover { filter: brightness(1.08); }
.btn-quiet { background: transparent; color: var(--accent); }
.home .btn { --accent: var(--brand); }

/* Header and footer */
.site-header { background: rgb(255 255 255 / .94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); box-shadow: 0 1px 12px rgb(20 32 57 / .06); position: sticky; top: 0; z-index: 20; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; padding-block: .6rem; }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font: 700 1.15rem/1.1 var(--serif); }
.site-header ul { display: flex; flex-wrap: wrap; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.site-header nav a { display: block; padding: .4rem .55rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.site-header nav a:hover { background: #eef1f8; }
.site-header nav a[aria-current="page"] { background: var(--brand); color: #fff; }
.site-header nav a[aria-current="true"] { background: #e2e8f4; }
.nav-roman { box-shadow: inset 0 -3px 0 var(--roman); }
.nav-modern { box-shadow: inset 0 -3px 0 var(--modern); }
.nav-elven { box-shadow: inset 0 -3px 0 var(--elven); }
.nav-future { box-shadow: inset 0 -3px 0 var(--future); }
.nav-egypt { box-shadow: inset 0 -3px 0 var(--egypt); }
.nav-heaven { box-shadow: inset 0 -3px 0 var(--heaven); }
.site-footer { background: var(--night); color: #dfe6f2; padding-block: 2rem; margin-top: 2rem; }
.site-footer a { color: var(--gold); }
.footer-inner { display: flex; align-items: center; gap: 1rem 1.6rem; }
.footer-inner p { margin: .3rem 0; }
.footer-logo { flex: none; width: 110px; height: auto; }
@media (max-width: 600px) { .footer-inner { flex-direction: column; align-items: flex-start; } .footer-logo { width: 92px; } }

/* Home */
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.aside-note { margin-top: 1rem; max-width: 75ch; }
.aside-note h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.setting-note { background: var(--paper); border-left: 4px solid var(--accent); padding: .8rem 1rem; border-radius: 0 10px 10px 0; max-width: 75ch; }
.world-cards { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.world-card a { display: flex; flex-direction: column; height: 100%; background: var(--paper); border: 1px solid var(--line); border-top: 6px solid var(--accent); border-radius: var(--radius); overflow: hidden; color: var(--ink); text-decoration: none; transition: box-shadow .2s, transform .2s; }
.world-card a:hover { box-shadow: 0 10px 28px rgb(0 0 0 / .12); transform: translateY(-2px); }
.world-card-art { display: block; padding: 1rem 1rem .25rem; background: linear-gradient(rgb(255 253 249 / .55), rgb(255 253 249 / .9)), var(--tex) center / 160px; }
.world-card-text { display: flex; flex-direction: column; gap: .35rem; padding: 1rem 1.1rem 1.25rem; flex: 1; }
.world-card-name { font: 700 1.4rem/1.15 var(--serif); }
.world-card-lead { color: var(--muted); font-size: .95rem; flex: 1; }
.world-card-go { font-weight: 700; color: var(--accent); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; padding: 0; list-style: none; counter-reset: s; }
.steps li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.1rem 3.4rem; position: relative; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 1rem; top: 1rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.panel-later { border-style: dashed; }

/* World pages */
.world-hero { position: relative; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, #fff), var(--bg)); overflow: hidden; }
.world-horizon img { width: 100%; height: clamp(120px, 22vw, 300px); object-fit: cover; object-position: center bottom; }
.world-hero-text { padding-block: 1.5rem .5rem; }
.hint { color: var(--muted); }
.toggle { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; cursor: pointer; }
.toggle input { width: 1.15rem; height: 1.15rem; accent-color: var(--accent); }

/* City map: a section with a toolbar, a pannable/zoomable view and an info strip. */
.map-section { padding-block: clamp(1.5rem, 1rem + 2vw, 2.5rem) 0; }
.map-head { display: flex; justify-content: space-between; align-items: end; gap: .5rem 1.5rem; flex-wrap: wrap; }
.map-head .hint { margin-bottom: .6rem; }
.map-links { font-weight: 600; margin: 0 0 .6rem; }
.map-shell { background: radial-gradient(ellipse at 50% 55%, color-mix(in srgb, var(--accent) 13%, var(--bg)), var(--bg) 70%); border-block: 1px solid var(--line); margin-bottom: 1.5rem; }
.map-tools { display: flex; justify-content: space-between; align-items: center; gap: .6rem 1rem; flex-wrap: wrap; padding-block: .8rem .2rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font: 600 .86rem/1 var(--sans); padding: .55rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.map-ctrl { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.zoom { display: inline-flex; gap: .25rem; }
.ctrl { min-width: 2.5rem; height: 2.5rem; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 700 .95rem/1 var(--sans); cursor: pointer; }
.ctrl:hover { border-color: var(--accent); color: var(--accent); }
.map-view { overflow: auto; scrollbar-width: thin; }
.map-view.can-drag { cursor: grab; }
.map-view.dragging { cursor: grabbing; user-select: none; }
.map-view.zoomed { max-height: min(82vh, 980px); }
.map-info { display: flex; align-items: center; gap: 1rem; min-height: 5.5rem; padding-block: .4rem 1rem; }
.map-info img { width: 76px; height: 76px; object-fit: contain; flex: none; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.map-info p { margin: 0; }
.map-info .mi-name { font: 700 1.15rem/1.2 var(--serif); }
.map-info .mi-cat { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.map-info-empty { color: var(--muted); }
.map-shell:fullscreen { background: var(--bg); overflow: auto; display: flex; flex-direction: column; }
.map-shell:fullscreen .map-view { flex: 1; max-height: none; }
.map-shell:fullscreen .city { width: calc(min(100vw - 2rem, (100vh - 10rem) * 1.45) * var(--zoom, 1)); }

/* The isometric city: an n x n diamond grid (--n), with --y0 of headroom for tall pieces at the back.
   Sizes use container units (cqw) so the whole map scales with its width. Buildings take --s of their
   cell, leaving streets between them. */
.city { container-type: inline-size; position: relative; margin: 1rem auto 1.5rem; max-width: 1000px; --s: .7; --road: #cdbb9b; --curb: #f4ead6; }
.city-6 { max-width: 1180px; }
.map-view .city { width: calc(min(100%, 1280px) * var(--zoom, 1)); max-width: none; margin: .5rem auto 0; aspect-ratio: 100 / 62; }
.world-modern .city { --road: #6b6e73; --curb: #d9d6cf; }
.world-elven .city { --road: #b8996a; --curb: #8fb36a; }
.world-future .city { --road: #3d4a57; --curb: #6fe0f0; }
.world-egypt .city { --road: #cfae74; --curb: #f1dfb0; }
.world-heaven .city { --road: #d9b24c; --curb: #f6f0e1; }
.city-ground { --cell: calc(70.71cqw / var(--n)); --rw: calc(var(--cell) * .32);
  position: absolute; left: 50cqw; top: calc((var(--y0) + 25) * 1cqw); width: 70.71cqw; height: 70.71cqw;
  transform: translate(-50%, -50%) rotateX(60deg) rotateZ(45deg);
  background: var(--tex) 0 0 / var(--cell) var(--cell);
  box-shadow: 0 0 0 calc(var(--rw) / 2) var(--road), 0 0 0 calc(var(--rw) / 2 + .5cqw) var(--curb), 1.5cqw 1.5cqw 4cqw rgb(0 0 0 / .28); border-radius: 2px; }
/* Streets: the world's crossroads texture, one tile per grid corner, shown only along the grid lines
   (and half a street beyond the edge), so every corner gets a crossing. */
.city-ground::before, .hq::before { content: ""; position: absolute; inset: calc(var(--rw) / -2);
  background: var(--roadtex) calc(var(--rw) / 2 - var(--cell) / 2) calc(var(--rw) / 2 - var(--cell) / 2) / var(--cell) var(--cell);
  -webkit-mask: linear-gradient(90deg, #000 var(--rw), transparent 0) 0 0 / var(--cell) var(--cell), linear-gradient(#000 var(--rw), transparent 0) 0 0 / var(--cell) var(--cell);
  mask: linear-gradient(90deg, #000 var(--rw), transparent 0) 0 0 / var(--cell) var(--cell), linear-gradient(#000 var(--rw), transparent 0) 0 0 / var(--cell) var(--cell); }
.world-future .city-ground { box-shadow: 0 0 0 calc(var(--rw) / 2) var(--road), 0 0 0 calc(var(--rw) / 2 + .5cqw) var(--curb), 0 0 4cqw rgb(111 224 240 / .45); }
.city-tiles { list-style: none; margin: 0; padding: 0; }
.tile { position: absolute; width: calc(var(--s) * 96cqw / var(--n));
  left: calc((50 + (var(--i) - var(--j)) * 50 / var(--n) - var(--s) * 48 / var(--n)) * 1cqw);
  top: calc((var(--y0) + (var(--i) + var(--j) + 1 + var(--s)) * 25 / var(--n) + var(--s) * 4.8 / var(--n)) * 1cqw);
  transform: translateY(-100%); z-index: calc(var(--i) + var(--j) + 1); transition: opacity .2s, filter .2s; }
.tile-tree { --s: .62; }
.tile-btn { all: unset; display: block; position: relative; cursor: pointer; border-radius: 8px; }
.tile > img { width: 100%; pointer-events: none; }
.tile-btn img { width: 100%; transition: transform .2s, filter .2s; -webkit-user-drag: none; }
.tile-btn:hover img, .tile-btn:focus-visible img { transform: translateY(-4%) scale(1.04); filter: drop-shadow(0 .6cqw .9cqw rgb(0 0 0 / .35)) brightness(1.06); }
.tile-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.tile:has(.tile-btn:hover), .tile:has(.tile-btn:focus-visible) { z-index: 50; }
.tile-label { position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); white-space: nowrap; background: rgb(29 35 43 / .9); color: #fff; font: 600 clamp(.6rem, 1.35cqw, .9rem)/1.2 var(--sans); padding: .2em .6em; border-radius: 999px; opacity: 0; pointer-events: none; transition: opacity .15s; }
.tile-btn:hover .tile-label, .tile-btn:focus-visible .tile-label, .show-labels .tile-label { opacity: 1; }
/* People and vehicles stand on the streets: --u and --v are grid points (whole numbers are streets). */
.decor { left: calc((50 + (var(--u) - var(--v)) * 50 / var(--n)) * 1cqw); top: calc((var(--y0) + (var(--u) + var(--v)) * 25 / var(--n) + .5) * 1cqw);
  transform: translate(-50%, -100%); z-index: var(--z); }
/* --sc evens out people pictures framed differently; a vehicle is --w % of the map wide, and --b is how far down
   its picture the wheels reach, so they touch the street. */
.decor-person { width: calc(4.8cqw * var(--sc, 1)); }
.decor-car { width: calc(var(--w, 6) * 1cqw); transform: translate(-50%, calc(var(--b, 1) * -100%)); }
.decor .tile-label { bottom: -1.2em; font-size: clamp(.55rem, 1.1cqw, .8rem); }
.show-labels .decor .tile-label, .city.hide-decor .decor { display: none; }
.show-labels .decor-person .tile-label { display: none; }
/* Highlighting one group: everything else fades. */
.city.filtering .tile:not(.on) { opacity: .28; filter: grayscale(.8); }
.city.filtering .tile.on .tile-label { opacity: 1; }
.city.filtering .tile.on { z-index: 40; }
.city.filtering .tile.on img { filter: drop-shadow(0 0 .5cqw #fff) drop-shadow(0 .5cqw .8cqw rgb(0 0 0 / .3)); }

/* Directory */
.places { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.1rem; }
.place { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; scroll-margin-top: 90px; }
.place-art { background: color-mix(in srgb, var(--accent) 8%, #fff); border-radius: 10px; padding: .5rem; margin-bottom: .75rem; }
.place-art img { margin-inline: auto; max-height: 200px; width: auto; }
.place h3 { margin-bottom: .25rem; }
.what { color: var(--muted); }
details summary { cursor: pointer; font-weight: 700; color: var(--accent); padding: .3rem 0; }
.place-body h4:first-child { margin-top: .4rem; }
.ask { font-weight: 600; border-left: 3px solid var(--accent); padding-left: .7rem; }
.cite { font-size: .88rem; color: var(--muted); }
.badge { display: inline-block; font: 700 .68rem/1 var(--sans); letter-spacing: .05em; text-transform: uppercase; padding: .3em .5em; border-radius: 4px; vertical-align: .12em; margin-right: .3rem; }
.badge-fact { background: #1d4f3a; color: #fff; }
.badge-art { background: #fdeccb; color: #6b4a00; }
.badge-spec { background: #123f4a; color: #fff; }
.badge-belief { background: #4a3a8c; color: #fff; }
.sources { padding-left: 1.2rem; }
.sources li { margin-bottom: .35rem; }
.world-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.world-link { display: inline-block; padding: .55rem 1rem; border: 2px solid var(--accent); border-radius: 999px; font-weight: 700; text-decoration: none; background: var(--paper); }

/* Compare */
.page-head h1 { margin-bottom: .3em; }
.big-q { font: 600 clamp(1.25rem, 1rem + 1.2vw, 1.7rem)/1.35 var(--serif); max-width: 40ch; }
.jump { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.jump a { display: inline-block; padding: .4rem .9rem; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; }
.cmp-row { padding-block: 1.75rem; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.cmp-q { font-size: 1.1rem; color: #333b45; }
.cmp-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.cmp-cell { background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--accent); border-radius: var(--radius); padding: .9rem 1rem; }
.cmp-art { aspect-ratio: 1; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 8%, #fff); border-radius: 10px; overflow: hidden; margin-bottom: .6rem; }
.cmp-art img { max-height: 100%; width: auto; }
.cmp-art .tex-img { width: 100%; height: 100%; object-fit: cover; }
.cmp-cell h3 { margin-top: 0; font-family: var(--serif); font-size: 1.1rem; }
.cmp-cell p:last-child { margin: 0; }
.cmp-more { margin-top: .5rem; font-weight: 600; font-size: .92rem; }
.discuss ul { padding-left: 1.2rem; }
.later-list { padding: 0; list-style: none; }
.later-list li { border-left: 4px solid var(--accent); background: var(--paper); padding: .7rem 1rem; margin-bottom: .6rem; border-radius: 0 10px 10px 0; }

/* Roman building directory: cards are links */
.cat { margin-top: 2rem; scroll-margin-top: 80px; }
.cat h3 { font-size: 1.35rem; margin-bottom: .2rem; }
.place-link { padding: 0; }
.place-link a { display: flex; flex-direction: column; height: 100%; padding: 1rem 1.1rem; color: var(--ink); text-decoration: none; border-radius: var(--radius); }
.place-link a:hover { box-shadow: 0 8px 22px rgb(0 0 0 / .1); }
.place-link .place-art { display: block; }
.place-name { font: 700 1.15rem/1.2 var(--serif); margin-bottom: .3rem; color: var(--accent); overflow-wrap: anywhere; hyphens: auto; }
.place .what, .cmp-cell, .art-title { overflow-wrap: anywhere; }
.place-link .what { font-size: .95rem; }
/* Related places: small cards with the picture beside the words, so a row never ends with one lonely card. */
.places-3 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: .8rem; }
.places-3 .place-link a { display: grid; grid-template-columns: 96px minmax(0, 1fr); grid-template-rows: auto auto 1fr; align-content: start; column-gap: .9rem; padding: .75rem .9rem; }
.places-3 .place-art { grid-row: 1 / -1; align-self: start; margin: 0; padding: .3rem; }
.places-3 .place-art img { max-height: 86px; }
.places-3 .tag { margin: 0 0 .1rem; }
.places-3 .place-name { font-size: 1.08rem; }
.places-3 .what { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .9rem; }
#cross-h { margin-top: 2.4rem; }
/* Find it on the map, Listen */
.b-tools { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; }
.b-tools:not(:has(> :not([hidden]))) { display: none; }
.btn-sm { padding: .45rem .95rem; font-size: .92rem; }
.reading { border-radius: 6px; background: color-mix(in srgb, var(--gold) 28%, transparent); box-shadow: 0 0 0 .3em color-mix(in srgb, var(--gold) 28%, transparent); }
.city .tile.found { z-index: 46; }
.city .tile.found img { filter: drop-shadow(0 0 .5cqw #fff) drop-shadow(0 0 1.6cqw var(--gold)); animation: found 1.4s ease-in-out 3; }
.city .tile.found .tile-label { opacity: 1; }
@keyframes found { 50% { transform: translateY(-6%) scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .city .tile.found img { animation: none; } }

/* Building page */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 1rem 0 0; margin: 0; font-size: .92rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: .3rem; color: #b5ab9b; }
.b-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 2rem; align-items: center; padding-block: 1.5rem 2rem; }
.b-art { background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--accent) 16%, #fff), color-mix(in srgb, var(--accent) 5%, var(--bg)) 70%); border-radius: 20px; padding: 1.25rem; }
.b-art .lb img { margin-inline: auto; max-height: 460px; width: auto; }
.latin { color: var(--muted); margin-top: -.3rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1.2rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.2rem 0 0; }
.facts dt { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.facts dd { margin: 0; font-weight: 600; }
.b-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.b-toc { position: sticky; top: 80px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; font-size: .93rem; }
.toc-h { font-weight: 700; margin-bottom: .4rem; }
.b-toc ol { margin: 0; padding-left: 1.1rem; }
.b-toc li { margin-bottom: .3rem; }
.b-body { max-width: 760px; }
.read { scroll-margin-top: 80px; margin-bottom: 1.8rem; }
.read h2 { font-size: clamp(1.4rem, 1.2rem + .8vw, 1.8rem); margin-top: .4rem; }
.read h3 { margin-top: 1.2rem; font-size: 1.1rem; }
.read p, .read li { font-size: 1.08rem; }
.read-list li { margin-bottom: .35rem; }
.photo { margin: 0 0 2rem; }
.photo .lb { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; }
.photo img { width: 100%; height: auto; border-radius: 12px; }
.photo figcaption { font-size: .95rem; color: #3b434d; margin-top: .5rem; }
.credit { display: block; font-size: .78rem; color: var(--muted); margin-top: .15rem; }
.photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.photo-grid .photo { margin: 0; }
.photo-grid img { aspect-ratio: 4 / 3; object-fit: cover; }
.art-box, .sources-box { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem 1.4rem; }
.art-box { border-left: 5px solid var(--gold); }
.questions li { font-weight: 600; margin-bottom: .5rem; }
.words { display: grid; gap: .5rem; margin: 0; }
.words div { display: grid; grid-template-columns: 9rem 1fr; gap: 1rem; border-bottom: 1px dashed var(--line); padding-bottom: .4rem; }
.words dt { font-weight: 700; }
.words dd { margin: 0; }
.sources-box .sources li { font-size: .95rem; }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center; margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.pager a { color: var(--ink); text-decoration: none; font-weight: 700; }
.pager a span { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.pager a[rel="next"] { text-align: right; }
.pager-all { border: 2px solid var(--accent); border-radius: 999px; padding: .5rem 1rem; color: var(--accent) !important; }
.story-pager { margin: 1.5rem 0 2.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }

/* Lightbox (Roman pages and Artwork) */
button.lb { cursor: zoom-in; background: none; border: 0; padding: 0; display: block; width: 100%; border-radius: 12px; }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: #14110e; color: #f3eee6; }
.lightbox[open] { display: flex; flex-direction: column; }
.lightbox::backdrop { background: #14110e; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .6rem 1rem; flex-wrap: wrap; }
.lb-title { margin: 0; font-weight: 600; }
.lb-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.lightbox .btn-quiet { color: #f3eee6; border-color: #6b6258; padding: .45rem .9rem; font-size: .95rem; }
.lb-close { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 0; background: #f3eee6; color: #14110e; font-size: 1.5rem; cursor: pointer; }
.lb-stage { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .5rem; padding: 0 .5rem; }
.lb-img { max-width: 100%; max-height: 100%; width: auto; height: auto; margin: auto; object-fit: contain; background: repeating-conic-gradient(#2a2622 0 25%, #221e1a 0 50%) 0 0 / 24px 24px; }
.lb-stage:fullscreen { background: #14110e; }
.lb-step { width: 3rem; height: 3rem; border-radius: 50%; border: 1px solid #6b6258; background: transparent; color: #f3eee6; font-size: 1.4rem; cursor: pointer; }
.lb-credit { margin: 0; padding: .5rem 1rem .9rem; font-size: .85rem; color: #c9c0b3; }
.print-sheet { display: none; }

/* Artwork page */
.art-world { padding-block: 1.5rem; border-top: 1px solid var(--line); scroll-margin-top: 70px; }
.art-world h2 .count { font: 600 .9rem var(--sans); color: var(--muted); margin-left: .4rem; }
.art-world h3 { margin-top: 1.4rem; font-size: 1.15rem; color: var(--accent); }
.art-grid { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .9rem; }
.art-card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: .6rem; display: flex; flex-direction: column; }
.art-thumb { display: block; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: repeating-conic-gradient(#f1ece3 0 25%, #fbf8f2 0 50%) 0 0 / 16px 16px; }
.art-thumb img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.art-title { margin: .5rem 0 .2rem; font-weight: 600; font-size: .95rem; line-height: 1.3; flex: 1; }
.art-more { display: block; font-weight: 500; font-size: .85rem; }
.art-actions { margin: 0; display: flex; gap: .9rem; font-size: .9rem; }
.linkish { all: unset; color: var(--accent); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.linkish:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Photo credits */
.credit-list { list-style: none; padding: 0; }
.credit-row { display: grid; grid-template-columns: 120px 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.credit-row img { width: 120px; height: 80px; object-fit: cover; border-radius: 6px; }
.credit-row p { margin: 0 0 .2rem; font-size: .93rem; }

/* Responsive */
@media (max-width: 960px) {
  .world-cards { grid-template-columns: repeat(2, 1fr); }
  .cmp-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .b-hero, .b-layout { grid-template-columns: 1fr; }
  .b-toc { position: static; }
}
@media (max-width: 760px) {
  .hero-inner, .two-col { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: 1fr; }
  .words div { grid-template-columns: 1fr; gap: .1rem; }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager-all { grid-column: 1 / -1; grid-row: 2; justify-self: center; }
  .lb-stage { grid-template-columns: minmax(0, 1fr); }
  .lb-step { display: none; }
  .city-6:not(.show-labels) .tile-label { display: none; }
  .city-6 .tile-label { font-size: .55rem; padding: .1em .35em; }
  .hero-art { max-width: 420px; margin-inline: auto; }
  .steps { grid-template-columns: 1fr; }
  .site-header { position: static; }
}
@media (max-width: 520px) {
  .world-cards { grid-template-columns: 1fr; }
  .places { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
  /* related places are side-by-side cards already: one to a row */
  .places-3 { grid-template-columns: minmax(0, 1fr); }
  .place { padding: .7rem; }
  .place h3 { font-size: 1.02rem; }
  .what { font-size: .92rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
  .tile-btn:hover img, .tile-btn:focus-visible img, .world-card a:hover { transform: none; }
}
@media print {
  .site-header, .site-footer, .skip, .jump, .js-print, .hero-actions, .b-toc, .pager, .lightbox { display: none; }
  /* Printing one artwork: only the print sheet appears. */
  body.print-one > *:not(.print-sheet) { display: none !important; }
  body.print-one .print-sheet { display: block; text-align: center; }
  .print-sheet img { max-width: 100%; max-height: 92vh; margin: 0 auto; }
  .print-sheet p { font: 11pt var(--sans); margin-top: .5rem; }
  body { background: #fff; font-size: 11pt; }
  .cmp-row { break-inside: avoid; }
  .cmp-cell, .panel { border-color: #999; }
}

/* Teachers & Schools */
.guide-grid { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1rem; }
.guide-card a { display: flex; flex-direction: column; gap: .35rem; height: 100%; background: var(--paper); border: 1px solid var(--line); border-top: 5px solid var(--brand); border-radius: var(--radius); padding: 1rem 1.1rem; color: var(--ink); text-decoration: none; }
.guide-card a:hover { box-shadow: 0 8px 22px rgb(0 0 0 / .1); }
.guide-card .tag { --accent: var(--brand); margin: 0; }
.guide-title { font: 700 1.12rem/1.25 var(--serif); color: var(--brand); overflow-wrap: anywhere; }
.guide-card .what { font-size: .93rem; }
.teachers { --accent: var(--brand); }
.guide-head { padding-block: 1rem 1.5rem; max-width: 900px; }
.guide-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 1.2rem; }
.share-note { margin: -.5rem 0 1.2rem; color: var(--muted); font-size: .95rem; }
.week-plan { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 165px), 1fr)); gap: 1rem; }
.week-plan li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.week-plan b { display: block; font-family: var(--serif); font-size: 1.12rem; margin-bottom: .25rem; }
.quick-answer { background: var(--cream); border: 1px solid var(--cream-line); border-left: 6px solid var(--gold); border-radius: var(--radius); padding: 1rem 1.3rem; }
.quick-answer h2 { font-size: 1.15rem; margin-bottom: .4rem; }
.quick-answer p { margin: 0; font-size: 1.1rem; }
.faq-item { border-bottom: 1px dashed var(--line); padding-block: .6rem; }
.faq-item h3 { font-size: 1.05rem; margin-bottom: .3rem; }
.plain-points { padding-left: 1.2rem; }
@media (max-width: 760px) { .guide-meta { grid-template-columns: 1fr; } }
@media print { .guide-grid, #pages { display: none; } }
.teach-box { background: var(--cream); border: 1px solid var(--cream-line); border-radius: var(--radius); padding: 1rem 1.3rem; }

/* ---------- Home ---------- */
.home .hero-actions .btn-quiet { background: var(--paper); }
.eyebrow { font: 700 .82rem/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.hero-free { color: var(--muted); font-size: .95rem; margin-top: .8rem; }

.stats { background: linear-gradient(90deg, var(--night), #1f3160); color: #f3f5fa; }
.stats-list { list-style: none; margin: 0 auto; padding: 1.1rem 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .8rem; text-align: center; }
.stats strong { display: block; font: 700 clamp(1.5rem, 1.1rem + 1.4vw, 2.2rem)/1 var(--serif); color: var(--gold); }
.stats span { font-size: .85rem; color: #c8d2e3; }

.band { background: var(--paper); border-block: 1px solid var(--line); padding-block: clamp(2rem, 1.2rem + 3vw, 3.5rem); }


.band-road { background: linear-gradient(180deg, var(--paper) 0 60%, #d9cdb6 60% 62%, #8f8a84 62% 78%, #d9cdb6 78% 80%, var(--paper) 80%); }
.road { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.road a { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--ink); }
.road img { width: 88%; transition: transform .3s; filter: drop-shadow(0 10px 8px rgb(0 0 0 / .25)); }
.road a:hover img { transform: translateX(6%); }
.era { font: 700 .78rem/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--accent); padding: .4rem .7rem; border-radius: 999px; }
.veh-name, .p-name { font: 700 1.05rem/1.2 var(--serif); color: var(--accent); margin-top: .2rem; }
.road .veh-name { background: var(--paper); padding: .1rem .5rem; border-radius: 6px; }
.road .what { background: var(--paper); padding: 0 .5rem; border-radius: 6px; font-size: .88rem; }

.crowd { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .6rem;
  background: linear-gradient(180deg, transparent 70%, #e6dccb 70%); border-radius: 14px; }
.crowd a { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--ink); padding-bottom: .5rem; }
.crowd img { transition: transform .2s; }
.crowd a:hover img { transform: translateY(-6%); }
.crowd .p-name { font-size: .92rem; }
.crowd .what { font-size: .8rem; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2rem 3rem; align-items: center; }
.water4 { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.water4 li { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--paper); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 12px; padding: .5rem; }
.cmp-mini { aspect-ratio: 1; display: grid; place-items: center; }
.cmp-mini img { max-height: 100%; width: auto; }
.water4 .p-name { font-size: .92rem; }
.water4 .what { font-size: .8rem; }
.band-teach { background: var(--cream); }
.mosaic { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
.mosaic li { background: color-mix(in srgb, var(--accent) 12%, #fff); border-radius: 12px; padding: 4px; }
.mosaic li:nth-child(3n+1) { transform: rotate(-2deg); }
.mosaic li:nth-child(3n) { transform: rotate(2deg); }

/* ---------- Tours ---------- */
.tour-grid { list-style: none; padding: 0; margin: 1rem 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1rem; }
.tour-head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.5rem 2.5rem; align-items: center; padding-block: 1rem 2rem; }
.guide-bubble { margin: 0; display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 1rem; align-items: end; }
.guide-pic { background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--accent) 22%, #fff), transparent 70%); }
.guide-bubble figcaption { display: flex; flex-direction: column; gap: .2rem; }
.bubble { position: relative; display: block; margin-top: .5rem; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1.1rem; font-size: 1.05rem; }
.bubble::before { content: ""; position: absolute; left: -9px; bottom: 18px; width: 16px; height: 16px; background: var(--paper); border-left: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg); }
.stops { list-style: none; padding: 0; margin: 0 0 2rem; position: relative; }
.stops::before { content: ""; position: absolute; left: 110px; top: 0; bottom: 0; border-left: 4px dotted color-mix(in srgb, var(--accent) 45%, #fff); }
.stop { position: relative; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.5rem; align-items: center; margin-bottom: 1.5rem; scroll-margin-top: 80px; }
.stop-art { position: relative; z-index: 1; background: radial-gradient(circle at 50% 55%, color-mix(in srgb, var(--accent) 16%, #fff), var(--bg) 70%); border-radius: 20px; padding: .5rem; }
.stop-text { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.3rem; }
.stop-text h2 { font-size: 1.4rem; margin-bottom: .3rem; }
.stop-num { font: 700 .78rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #fff; background: var(--accent); display: inline-block; padding: .35rem .6rem; border-radius: 999px; margin-bottom: .5rem; }
.stop-say { font-size: 1.08rem; }
.b-toc .plain-ol { padding-left: 0; list-style: none; }

/* ---------- People pages ---------- */
.people { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 1.1rem; }
.person { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 1rem; align-items: center; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1.1rem .8rem .6rem; scroll-margin-top: 80px; }
.person:target { outline: 3px solid var(--accent); }
.person-art { background: radial-gradient(circle at 50% 60%, color-mix(in srgb, var(--accent) 20%, #fff), transparent 70%); border-radius: 50%; }
.person-text h2 { font-size: 1.3rem; margin-bottom: .1rem; }
.person-text p { margin-bottom: .5rem; }
.person-where { font-size: .93rem; }
.rear-view { margin: 1rem 0; max-width: 280px; }
.rear-view figcaption { font-size: .9rem; color: var(--muted); text-align: center; }

@media (max-width: 1060px) {
  .wcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-list { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .crowd { grid-template-columns: repeat(4, minmax(0, 1fr)); background: none; }
}
@media (max-width: 860px) {
  .hero3-inner, .split, .tour-head { grid-template-columns: minmax(0, 1fr); }
  .road { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .band-road { background: var(--paper); }
  .stops::before { display: none; }
  .stop { grid-template-columns: minmax(0, 1fr); gap: .5rem; }
  .stop-art { max-width: 260px; margin-inline: auto; }
}
@media (max-width: 760px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem; max-width: 100%; }
  .map-tools { flex-direction: column; align-items: stretch; }
  .map-ctrl { justify-content: space-between; }
}
@media (max-width: 560px) {
  .wcards { grid-template-columns: minmax(0, 1fr); }
  .stats-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .crowd { gap: .3rem; }
  .water4, .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person { grid-template-columns: 96px minmax(0, 1fr); }
  .guide-bubble { grid-template-columns: 90px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .wcard:hover, .road a:hover img, .crowd a:hover img { transform: none; }
}
@media print { .stops::before, .tour-grid, .map-tools, .map-info { display: none; } .stop { break-inside: avoid; } }

/* ---------- Home: hero city made of all four worlds ---------- */
.hero3 { position: relative; overflow: hidden; border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse 60% 45% at 72% 62%, rgb(255 255 255 / .75), transparent 70%),
    linear-gradient(100deg, #f6e6cf 0%, #e4ecf6 38%, #e3f0dd 68%, #d9eef1 100%); }
.hero3::after { content: ""; position: absolute; inset: auto 0 0; height: 90px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
.hero3-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.35fr); gap: 1rem 2rem; align-items: center; padding-block: clamp(1.5rem, .5rem + 3vw, 3rem) 1rem; }
/* the logo with the site's title beside it, then the question the site asks */
.hero-brand { display: flex; align-items: center; gap: .5rem 1.1rem; margin-bottom: .9rem; }
.hero-title { margin: 0; font-size: clamp(1.75rem, 1rem + 1.6vw, 2.4rem); line-height: 1.08; color: var(--brand); text-wrap: balance; }
.hero-q { font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.4rem); line-height: 1; margin-bottom: .35em; }
.hero-q span { background: linear-gradient(90deg, var(--egypt), var(--roman) 20%, var(--modern) 40%, var(--elven) 60%, var(--future) 80%, var(--heaven)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero3 .lead { font-size: 1.2rem; }
.hero-logo { flex: none; display: block; width: clamp(120px, 11vw, 170px); height: auto; margin-left: -.3rem; filter: drop-shadow(0 6px 12px rgb(20 32 57 / .16)); }
.hero3-map .city { margin: 0 -4% 0 0; width: 108%; max-width: none; aspect-ratio: 100 / 61; --s: .8; }
.hero-ground { background: none !important; box-shadow: 0 0 0 1cqw #efe4cf, 0 0 0 1.4cqw #fff, 2cqw 2.5cqw 5cqw rgb(0 0 0 / .25) !important; }
.hq { position: absolute; width: 50%; height: 50%; --cell: calc(70.71cqw / var(--n)); --rw: calc(var(--cell) * .32); background: var(--tex) 0 0 / var(--cell) var(--cell); }
.hq.world-roman { --road: #cdbb9b; --curb: #f4ead6; }
.hq.world-modern { --road: #6b6e73; --curb: #d9d6cf; }
.hq.world-elven { --road: #b8996a; --curb: #8fb36a; }
.hq.world-future { --road: #3d4a57; --curb: #6fe0f0; }
.hq.world-egypt { --road: #cfae74; --curb: #f1dfb0; }
.hq.world-heaven { --road: #d9b24c; --curb: #f6f0e1; }
.hero-city .decor-person { width: calc(4.4cqw * var(--sc, 1)); }
.hero-city .tile-label { font-size: clamp(.62rem, 1.7cqw, .85rem); }
.hero-legend { justify-content: center; gap: .4rem; margin: .4rem 0 0; }
.hero-legend .world-link { font-size: .85rem; padding: .4rem .8rem; }
.hero-free { color: var(--muted); font-size: .95rem; margin-top: .8rem; }

/* Section headings: title with a short line under it. */
.sec-head { margin-bottom: 1.4rem; max-width: 70ch; }
.sec-head h2 { margin: 0 0 .3rem; font-size: clamp(1.7rem, 1.3rem + 1.4vw, 2.4rem); }
.sec-head p { margin: 0; color: var(--muted); font-size: 1.08rem; }

/* World cards: a scene (sky, building, resident) over a short description. */
.wcards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.wcard { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.wcard:hover { box-shadow: 0 16px 36px rgb(0 0 0 / .14); transform: translateY(-4px); }
.wcard-top { position: relative; display: block; height: 250px; overflow: hidden; background: color-mix(in srgb, var(--accent) 12%, #fff); }
.wcard-ground { position: absolute; inset: 112px 0 0; overflow: hidden; }
.wcard-floor { position: absolute; left: 50%; bottom: -400px; width: 800px; height: 800px; transform: translateX(-50%) rotateX(60deg) rotateZ(45deg); background: var(--tex) 0 0 / 165px 165px; box-shadow: inset 0 0 80px rgb(0 0 0 / .18); }
.wcard-sky { position: relative; z-index: 1; display: block; }
.wcard-sky img { width: 100%; height: 150px; object-fit: cover; object-position: center bottom; -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent); }
.wcard-art { position: absolute; left: 50%; bottom: -4px; width: 74%; transform: translateX(-50%); z-index: 1; transition: transform .3s; }
.wcard:hover .wcard-art { transform: translateX(-50%) scale(1.04); }
.wcard-art img { filter: drop-shadow(0 12px 14px rgb(0 0 0 / .25)); }
.wcard-person { position: absolute; right: 4%; bottom: 2px; width: 22%; z-index: 2; }
.wcard-text { padding: 1rem 1.2rem 1.2rem; display: flex; flex-direction: column; flex: 1; border-top: 5px solid var(--accent); }
.wcard-text .tag { margin-bottom: .2rem; }
.wcard-text h3 { font-size: 1.5rem; margin-bottom: .3rem; }
.wcard-text h3 a { color: var(--ink); text-decoration: none; }
.wcard-text h3 a::after { content: ""; position: absolute; inset: 0; }
.wcard-text .what { font-size: .95rem; margin-bottom: .7rem; }
.wcard-links { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .35rem; flex: 1; align-content: flex-start; }
.wcard-links a { position: relative; z-index: 2; display: inline-block; font-size: .82rem; font-weight: 600; text-decoration: none; padding: .3rem .6rem; border-radius: 999px; background: color-mix(in srgb, var(--accent) 10%, #fff); }
.wcard-links a:hover { background: color-mix(in srgb, var(--accent) 20%, #fff); }
.wcard-go { margin: 0; font-weight: 700; }
.wcard-go a { position: relative; z-index: 2; text-decoration: none; }

/* Dark band (tours). */
.band-dark { background: radial-gradient(ellipse at 15% 0%, #2a3f73, transparent 60%), radial-gradient(ellipse at 90% 100%, #0f4a57, transparent 55%), var(--night); color: #f3f5fa; border: 0; }
.band-dark .sec-head p { color: #c8d2e3; }
.band-dark h2 { color: #fff; }

/* Tour cards: guide on top, then the tour. */
.tour-card a { position: relative; display: flex; flex-direction: column; height: 100%; background: var(--paper); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; color: var(--ink); text-decoration: none; transition: box-shadow .2s, transform .2s; }
.tour-card a:hover { box-shadow: 0 12px 28px rgb(0 0 0 / .18); transform: translateY(-3px); }
.tour-guide { display: grid; place-items: center; height: 150px; background: radial-gradient(circle at 50% 70%, color-mix(in srgb, var(--accent) 30%, #fff), color-mix(in srgb, var(--accent) 12%, #fff) 70%); border-bottom: 5px solid var(--accent); }
.tour-guide img { width: 130px; }
.tour-text { display: flex; flex-direction: column; gap: .2rem; padding: .9rem 1.1rem 1.1rem; flex: 1; }
.tour-text .tag { margin: 0; }
.tour-title { font: 700 1.25rem/1.2 var(--serif); color: var(--accent); }
.tour-text .what { font-size: .93rem; flex: 1; }
.tour-by { font-size: .85rem; font-weight: 600; margin-top: .3rem; }

@media (max-width: 860px) {
  .hero3-inner { grid-template-columns: minmax(0, 1fr); }
  .hero3-map .city { width: 100%; margin: 0 auto; }
}
@media (max-width: 560px) { .stats-list li:last-child { grid-column: 1 / -1; } }
/* the logo on the About page and the missing-page page */
.about-logo { float: right; width: 220px; height: auto; margin: -.4rem 0 1rem 1.6rem; }
.nf-logo { display: block; width: 170px; height: auto; margin-bottom: .6rem; }
@media (max-width: 640px) { .about-logo { float: none; display: block; width: 180px; margin: 0 auto 1rem; } }
@media (max-width: 560px) {
  .hero-title { font-size: 1.7rem; }
  .hero-q { font-size: 2.4rem; }
  .wcard-top { height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .tour-card a:hover, .wcard:hover .wcard-art { transform: none; }
  .wcard:hover .wcard-art { transform: translateX(-50%); }
}
@media (max-width: 1060px) { .wcards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .wcards { grid-template-columns: minmax(0, 1fr); } }

.btn-big { font-size: 1.15rem; padding: .9rem 1.6rem; }
.support-band { background: var(--cream); }
.support-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap; }
.support-inner h2 { margin-bottom: .2rem; }
.support-inner p { margin: 0; }

/* ---------- Page changes: a soft cross-fade between pages (supporting browsers only) ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }

/* ---------- Header: search button and the phone menu ---------- */
.hdr-tools { display: flex; align-items: center; gap: .4rem; }
.hdr-search { display: inline-flex; align-items: center; gap: .4rem; padding: .42rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.hdr-search:hover { border-color: var(--brand); color: var(--brand); }
.menu-btn:not([hidden]) { display: none; }
/* six worlds and five more links: below this width the menu folds behind the Menu button */
@media (max-width: 1180px) {
  .menu-btn:not([hidden]) { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font: 700 .95rem/1 var(--sans); cursor: pointer; }
  .menu-icon, .menu-icon::before, .menu-icon::after { display: block; position: relative; width: 16px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, background .2s; }
  .menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
  .menu-icon::before { top: -5px; }
  .menu-icon::after { top: 5px; }
  .menu-open .menu-icon { background: transparent; }
  .menu-open .menu-icon::before { transform: translateY(5px) rotate(45deg); }
  .menu-open .menu-icon::after { transform: translateY(-5px) rotate(-45deg); }
  .has-menu .header-inner { flex-wrap: wrap; }
  .has-menu nav { display: none; order: 3; width: 100%; padding: .2rem 0 .4rem; }
  .has-menu.menu-open nav { display: block; }
  .has-menu nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; }
  .has-menu nav a { padding: .7rem .9rem; background: var(--bg); }
}
@media (max-width: 760px) {
  .hdr-search { padding: .5rem .6rem; }
  .hdr-search span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---------- Search box (over the page) ---------- */
.search-dlg { width: min(660px, 100% - 24px); max-height: min(82vh, 680px); margin: 7vh auto auto; padding: 0; border: 0; border-radius: 18px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 70px rgb(20 32 57 / .4); overflow: hidden; }
.search-dlg[open] { display: flex; }
.search-dlg::backdrop { background: rgb(20 32 57 / .5); backdrop-filter: blur(3px); }
.sd-box { display: flex; flex-direction: column; width: 100%; min-height: 0; }
.sd-top { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem .7rem 1rem; border-bottom: 1px solid var(--line); }
.sd-top svg { flex: none; color: var(--muted); }
.sd-top input { flex: 1; min-width: 0; border: 0; padding: .45rem 0; background: none; color: var(--ink); font: 500 1.15rem/1.3 var(--sans); }
.sd-top input:focus { outline: none; }
.sd-close { flex: none; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); padding: .35rem .75rem; font: 600 .85rem/1 var(--sans); color: var(--muted); cursor: pointer; }
.sd-results { list-style: none; margin: 0; padding: .4rem; overflow: auto; flex: 1; min-height: 0; }
.sd-results a { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: .8rem; align-items: center; padding: .45rem .6rem; border-radius: 12px; color: var(--ink); text-decoration: none; }
.sd-results a:hover, .sd-results a:focus-visible { background: color-mix(in srgb, var(--accent) 10%, #fff); outline: 2px solid color-mix(in srgb, var(--accent) 45%, #fff); outline-offset: 0; }
.sd-art, .az-art { display: grid; place-items: center; width: 54px; height: 54px; overflow: hidden; border-radius: 10px; background: color-mix(in srgb, var(--accent) 10%, #fff); }
.sd-art img, .az-art img { max-width: 90%; max-height: 90%; width: auto; height: auto; object-fit: contain; }
.sd-icon, .az-icon { font: 700 1.3rem/1 var(--serif); color: var(--accent); }
.sd-name { display: block; font: 700 1.05rem/1.25 var(--serif); }
.sd-meta { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.sd-desc { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: .9rem; color: var(--muted); }
.sd-label { padding: .5rem .7rem .2rem; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sd-none { padding: 1rem .8rem; color: var(--muted); }
.sd-foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: .7rem 1rem; border-top: 1px solid var(--line); background: var(--bg); font-size: .92rem; font-weight: 600; }
.sd-foot a, .sd-foot .linkish { color: var(--brand); }

/* ---------- Search page (A to Z) ---------- */
.sp-form { display: flex; flex-wrap: wrap; gap: .6rem; max-width: 720px; margin: 1.2rem 0 .3rem; }
.sp-form input { flex: 1; min-width: 220px; padding: .8rem 1.2rem; border: 2px solid var(--line); border-radius: 999px; background: var(--paper); color: var(--ink); font: 500 1.15rem/1.3 var(--sans); }
.sp-form input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgb(35 57 107 / .15); }
.sp-count { min-height: 1.6em; color: var(--muted); font-weight: 600; }
.az-jump { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 0; padding: 0; }
.az-jump a { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); color: var(--ink); font-weight: 700; text-decoration: none; }
.az-jump a:hover { border-color: var(--brand); color: var(--brand); }
.az-sec { padding-block: .9rem; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.az-sec h2 { color: var(--brand); font-size: 1.6rem; margin-bottom: .6rem; }
.az { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: .5rem; margin: 0; padding: 0; }
.az a { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: .75rem; align-items: center; height: 100%; padding: .45rem .7rem .45rem .45rem; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); color: var(--ink); text-decoration: none; }
.az a:hover { border-color: var(--accent); box-shadow: 0 6px 16px rgb(0 0 0 / .07); }
.az-name { display: block; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.az-meta { display: block; font-size: .82rem; color: var(--muted); }

/* ---------- Play: activity cards (play hub and home page) ---------- */
.band-play { background: linear-gradient(180deg, #edf2fa, var(--bg)); }
.play-cards { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin: 1.2rem 0 0; padding: 0; }
.play-card a { display: flex; flex-direction: column; height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--ink); text-decoration: none; transition: box-shadow .2s, transform .2s; }
.play-card a:hover { box-shadow: 0 16px 36px rgb(0 0 0 / .14); transform: translateY(-4px); }
.play-text { display: flex; flex-direction: column; flex: 1; gap: .3rem; padding: 1rem 1.2rem 1.2rem; }
.play-title { font: 700 1.4rem/1.2 var(--serif); color: var(--brand); }
.play-text .what { flex: 1; }
.play-go { font-weight: 700; color: var(--brand); }
.pa { position: relative; display: block; height: 200px; overflow: hidden; }
.pa img { max-width: none; }
.pa-build { background: radial-gradient(ellipse at 50% 65%, #fff 0, #e3ebf5 70%); }
.pa-ground { position: absolute; left: 50%; top: 116px; width: 150px; height: 150px; transform: translate(-50%, -50%) rotateX(60deg) rotateZ(45deg); background: #c9d6c2 url(/assets/worlds/modern/ground-grass.webp) 0 0 / 75px 75px; box-shadow: 0 0 0 7px #6b6e73, 0 0 0 10px #d9d6cf, 8px 8px 20px rgb(0 0 0 / .25); }
.pa-tile { position: absolute; left: calc(50% + (var(--i) - var(--j)) * 53px); top: calc(108px + (var(--i) + var(--j)) * 26.5px); z-index: calc(var(--i) + var(--j) + 1); width: 84px; transform: translate(-50%, -100%); transition: transform .3s; }
.pa-tile img { width: 100%; height: auto; filter: drop-shadow(0 6px 6px rgb(0 0 0 / .25)); }
.play-card a:hover .pa-tile { transform: translate(-50%, -104%); }
.pa-quiz { display: grid; place-items: center; background: radial-gradient(circle at 50% 42%, #fff, #f6e6cf 72%); }
.pa-quiz > img { width: 150px; height: auto; margin-top: -34px; filter: drop-shadow(0 8px 8px rgb(0 0 0 / .2)); }
.pa-q { position: absolute; top: 16px; right: calc(50% - 118px); width: 56px; height: 56px; border-radius: 50%; background: var(--gold); color: var(--night); font: 700 2rem/56px var(--serif); text-align: center; box-shadow: 0 6px 14px rgb(0 0 0 / .2); transform: rotate(10deg); }
.pa-opts { position: absolute; left: 50%; bottom: 16px; display: flex; gap: 7px; transform: translateX(-50%); }
.pa-opts span { width: 58px; height: 16px; border: 2px solid var(--line); border-radius: 999px; background: #fff; }
.pa-opts span:nth-child(2) { border-color: #2f7d34; background: #d6eed9; }
.pa-pass { display: flex; align-items: center; justify-content: center; gap: 2px; background: #f7efdf repeating-linear-gradient(0deg, transparent 0 27px, rgb(150 120 70 / .1) 27px 28px); }
.pa-stamp { display: grid; place-items: end center; width: 82px; height: 82px; overflow: hidden; border: 4px double var(--accent); border-radius: 50%; background: color-mix(in srgb, var(--accent) 14%, #fff); transform: rotate(-9deg); }
.pa-stamp:nth-child(even) { transform: rotate(8deg) translateY(12px); }
.pa-stamp img { width: 62px; height: auto; }

/* ---------- City builder ---------- */
.builder-head { padding-block: .6rem .4rem; }
.builder-head h1 { margin-bottom: .2rem; }
.builder-head .lead { margin-bottom: .6rem; }
.builder { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(290px, 1fr); grid-template-areas: "main pal" "needs pal" "act pal"; gap: 1rem 1.5rem; align-items: start; padding-bottom: 1rem; }
.b-main { grid-area: main; }
.b-palette { grid-area: pal; position: sticky; top: 74px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.b-needs { grid-area: needs; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.b-actions { grid-area: act; display: flex; flex-wrap: wrap; gap: .6rem; }
.b-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin-bottom: .5rem; }
.b-tools, .b-ground { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.b-label { margin-right: .15rem; font-size: .9rem; font-weight: 700; color: var(--muted); }
.b-tool[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ctrl:disabled { opacity: .45; cursor: default; }
.ctrl:disabled:hover { border-color: var(--line); color: var(--ink); }
.b-stage { overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: radial-gradient(ellipse at 50% 58%, #fff, #e9eef4 75%); }
.builder-city { width: 100%; max-width: none; margin: 0; aspect-ratio: 100 / 66; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.bcells { position: absolute; inset: 0; }
.bcell { all: unset; position: absolute; box-sizing: border-box; left: calc(var(--i) * 100% / 6); top: calc(var(--j) * 100% / 6); width: calc(100% / 6); height: calc(100% / 6); cursor: pointer; }
.bcell-g { position: absolute; inset: calc(var(--rw) / 2); border-radius: 2px; background: 0 0 / var(--cell) var(--cell); }
.bcell.has-g .bcell-g { box-shadow: inset 0 0 1cqw rgb(0 0 0 / .32); }
.bcell.hot .bcell-g { outline: .45cqw solid #fff; background-color: rgb(255 255 255 / .3); box-shadow: 0 0 2cqw rgb(255 255 255 / .9); }
.builder-city.placing-g .bcell.hot .bcell-g { background-image: var(--gprev) !important; }
.builder-city.erasing .bcell.hot .bcell-g { outline-color: #e2483d; background-color: rgb(226 72 61 / .3); }
.bcell:focus-visible { outline: none; }
.bcell:focus-visible .bcell-g { outline: .6cqw solid var(--focus); }
.builder-city .tile > img { pointer-events: auto; }
.builder-city .tile.ghost { opacity: .6; }
.builder-city .tile.ghost img { pointer-events: none; filter: drop-shadow(0 0 .6cqw #fff); }
.builder-city .tile.pop img { animation: pop .35s ease-out; }
@keyframes pop { from { transform: translateY(-12%) scale(.85); opacity: .3; } to { transform: none; opacity: 1; } }
.b-status { min-height: 3.2em; margin: .6rem .2rem 0; font-weight: 600; }
.pal-tabs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
@media (max-width: 560px) { .pal-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.pal-tab { padding: .8rem .2rem; border: 0; border-bottom: 3px solid transparent; background: none; color: var(--muted); font: 700 .88rem/1 var(--sans); cursor: pointer; }
.pal-tab:hover { color: var(--accent); }
.pal-tab[aria-selected="true"] { border-bottom-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, #fff); color: var(--accent); }
.pal-panel { max-height: min(74vh, 660px); overflow: auto; padding: .6rem; scrollbar-width: thin; }
.pal-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: .45rem; margin: 0; padding: 0; }
.piece { display: flex; flex-direction: column; align-items: center; gap: .25rem; width: 100%; height: 100%; padding: .4rem .25rem .5rem; border: 2px solid transparent; border-radius: 12px; background: color-mix(in srgb, var(--accent) 6%, #fff); color: var(--ink); font: 600 .78rem/1.15 var(--sans); text-align: center; cursor: pointer; }
.piece:hover { border-color: color-mix(in srgb, var(--accent) 40%, #fff); }
.piece[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, #fff); box-shadow: 0 4px 12px rgb(0 0 0 / .12); }
.piece img { width: 64px; height: 64px; object-fit: contain; }
.piece-tex { width: 52px; height: 52px; margin: 6px; border-radius: 4px; background: center / cover; transform: rotateX(55deg) rotateZ(45deg); box-shadow: 0 4px 6px rgb(0 0 0 / .25); }
.piece span { overflow-wrap: anywhere; }
.b-needs h2 { font-size: 1.3rem; margin-bottom: .1rem; }
.b-score { margin: 0 0 .6rem; color: var(--muted); font-weight: 600; }
.b-score strong { font: 700 1.7rem/1 var(--serif); color: var(--brand); }
.needs { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .7rem; padding: 0; }
.need { display: inline-flex; align-items: center; gap: .4rem; padding: .38rem .8rem .38rem .45rem; border: 2px dashed #c3bcae; border-radius: 999px; color: var(--muted); font-size: .92rem; font-weight: 600; cursor: default; }
.need::before { content: ""; display: grid; place-items: center; box-sizing: border-box; width: 1.15rem; height: 1.15rem; border: 2px solid currentColor; border-radius: 50%; font-size: .7rem; font-weight: 800; }
.need.met { border: 2px solid #2f7d34; background: #e5f3e6; color: #1b4d21; }
.need.met::before { content: "\2713"; border: 0; background: #2f7d34; color: #fff; }
.b-done { margin: 0 0 .6rem; padding: .6rem .9rem; border: 1px solid var(--cream-line); border-left: 5px solid var(--gold); border-radius: 12px; background: var(--cream); font-weight: 600; }
.b-needs .small { margin: 0; }

/* ---------- Quiz ---------- */
.quiz > * { max-width: 900px; }
.quiz h1 { margin-bottom: .3rem; }
.qmodes { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0 0; padding: 0; }
.qmode { display: flex; flex-direction: column; gap: .3rem; width: 100%; height: 100%; overflow: hidden; padding: 0 0 1.1rem; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); color: var(--ink); font: inherit; text-align: left; cursor: pointer; transition: box-shadow .2s, transform .2s; }
.qmode:hover { box-shadow: 0 12px 28px rgb(0 0 0 / .12); transform: translateY(-3px); }
.qmode-art { display: flex; justify-content: center; align-items: flex-end; gap: .4rem; height: 140px; padding: .7rem .5rem 0; background: linear-gradient(180deg, #eef3fb, #f6efe2); }
.qmode-art img { width: auto; height: 118px; filter: drop-shadow(0 6px 6px rgb(0 0 0 / .2)); }
.qmode-title { padding: .5rem 1.1rem 0; font: 700 1.25rem/1.2 var(--serif); color: var(--brand); }
.qmode .what { padding: 0 1.1rem; font-size: .95rem; }
.qbest { padding: 0 1.1rem; font-size: .9rem; font-weight: 700; color: #2f7d34; }
.quiz-play { padding: 1.2rem 1.4rem 1.4rem; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.q-top { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-weight: 700; }
.q-top p { margin: 0; }
.q-bar { height: 8px; margin: .5rem 0 1rem; overflow: hidden; border-radius: 999px; background: #ece6da; }
.q-bar span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--egypt), var(--roman), var(--modern), var(--elven), var(--future), var(--heaven)); transition: width .3s; }
.q-ask { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.75rem); }
.q-ask:focus, .q-result:focus { outline: none; }
.q-pic figure { max-width: 360px; margin: 0 auto 1rem; padding: 1rem; border-radius: 18px; background: radial-gradient(circle at 50% 55%, #fff, #efe9dd 72%); }
.q-pic img { width: auto; max-height: 270px; margin-inline: auto; }
.q-pic figcaption { margin-top: .4rem; font-weight: 700; text-align: center; }
.q-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.q-opt { display: flex; align-items: center; gap: .7rem; padding: .9rem 1rem; border: 2px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--ink); font: 700 1.05rem/1.25 var(--sans); text-align: left; cursor: pointer; }
.q-opt:hover:not(:disabled) { border-color: var(--brand); background: #f3f6fb; }
.q-world .q-opt { border-left: 8px solid var(--accent); }
.q-job .q-opt { padding: .5rem .9rem .5rem .5rem; }
.q-job .q-opt img { flex: none; width: 70px; height: 70px; object-fit: contain; }
.q-opt.right { border-color: #2f7d34; background: #e5f3e6; }
.q-opt.wrong { border-color: #c0392b; background: #fbe6e3; }
.q-opt.right::after, .q-opt.wrong::after { margin-left: auto; padding-left: .5rem; font-size: 1.2rem; }
.q-opt.right::after { content: "\2713"; color: #2f7d34; }
.q-opt.wrong::after { content: "\2717"; color: #c0392b; }
.q-opt:disabled { cursor: default; }
.q-opt:disabled:not(.right):not(.wrong) { opacity: .55; }
.q-feedback { min-height: 3.4em; margin-top: 1rem; }
.q-feedback p { margin: 0 0 .3rem; }
.fb-ok, .fb-no { font: 700 1.25rem/1.3 var(--serif); }
.fb-ok { color: #1d6b2a; }
.fb-no { color: #a5281b; }
.q-next-row { margin: .4rem 0 0; }
.quiz-end { padding: 1.4rem 1.5rem; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); }
.q-result { font-size: clamp(1.7rem, 1.3rem + 2vw, 2.5rem); }
.q-review { list-style: none; display: grid; gap: .5rem; margin: .5rem 0 0; padding: 0; }
.q-review li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 12px; }
.q-mark { display: grid; place-items: center; flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; color: #fff; font-weight: 800; }
.q-review .ok .q-mark { background: #2f7d34; }
.q-review .no .q-mark { background: #c0392b; }
.q-review a { display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }
.q-review img { width: 42px; height: 42px; object-fit: contain; }

/* ---------- Passport ---------- */
.pp-total { font-size: 1.15rem; font-weight: 600; }
.pp-total strong { font: 700 2rem/1 var(--serif); color: var(--brand); }
.pp-world { padding-block: 1.5rem; border-top: 1px solid var(--line); }
.pp-head { display: flex; align-items: center; gap: 1.3rem; margin-bottom: 1rem; }
.pp-head h2 { margin: 0; }
.pp-head h2 a { color: var(--accent); text-decoration: none; }
.pp-stamp { display: grid; place-content: center; flex: none; width: 96px; height: 96px; margin: 0; border: 5px double var(--accent); border-radius: 50%; background: color-mix(in srgb, var(--accent) 8%, #fff); color: var(--accent); line-height: 1; text-align: center; transform: rotate(-8deg); }
.pp-n { font: 700 2.1rem/1 var(--serif); }
.pp-of { font-size: .75rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.pp-world.complete .pp-stamp { background: var(--accent); color: #fff; }
.pp-line { margin: .25rem 0 .45rem; color: var(--muted); font-weight: 600; }
.pp-bar, .pp-mini { display: block; overflow: hidden; width: min(380px, 100%); height: 10px; border-radius: 999px; background: #ebe4d6; }
.pp-bar span, .pp-mini span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .5s; }
.pp-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .6rem; margin: 0; padding: 0; }
.pp-grid a { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; height: 100%; padding: .5rem .4rem .6rem; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); color: var(--muted); font-size: .85rem; font-weight: 600; text-align: center; text-decoration: none; }
.pp-grid a:hover { border-color: var(--accent); color: var(--ink); }
.pp-art { display: grid; place-items: center; width: 84px; height: 84px; }
.pp-grid img { width: auto; max-height: 84px; filter: grayscale(1); opacity: .35; transition: filter .3s, opacity .3s; }
.pp-grid a:hover img { opacity: .7; }
.pp-grid .got a { border-color: color-mix(in srgb, var(--accent) 45%, #fff); background: color-mix(in srgb, var(--accent) 6%, #fff); color: var(--ink); }
.pp-grid .got img { filter: none; opacity: 1; }
.place-link a { position: relative; }
.pp-grid .got a::after, .place.got > a::after { content: "\2713"; position: absolute; top: .45rem; right: .45rem; display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border: 2px solid #fff; border-radius: 50%; background: var(--accent); color: #fff; font-size: .8rem; font-weight: 800; box-shadow: 0 2px 6px rgb(0 0 0 / .25); transform: rotate(-12deg); }
.pp-note { margin: 1rem 0 0; padding: .55rem .9rem; border: 1px dashed color-mix(in srgb, var(--accent) 55%, #fff); border-radius: 12px; background: color-mix(in srgb, var(--accent) 7%, #fff); font-size: .95rem; font-weight: 600; }
.pp-check { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; margin-right: .15rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: .75rem; }
.pp-progress { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .7rem; color: var(--muted); font-weight: 600; }
.pp-progress .pp-mini { width: 140px; }
.wcard-pp { display: flex; align-items: center; gap: .5rem; margin: -.3rem 0 .7rem; color: var(--accent); font-size: .85rem; font-weight: 700; }
.wcard-pp .pp-mini { width: 90px; height: 8px; }
.pp-foot p { color: var(--muted); }

@media (max-width: 1000px) {
  .builder { grid-template-columns: minmax(0, 1fr); grid-template-areas: "main" "pal" "needs" "act"; }
  .b-palette { position: static; }
  .pal-panel { max-height: none; overflow-x: auto; overflow-y: hidden; }
  .pal-grid { grid-auto-flow: column; grid-template-columns: none; grid-template-rows: repeat(2, auto); grid-auto-columns: 96px; }
}
@media (max-width: 760px) {
  .play-cards, .qmodes { grid-template-columns: minmax(0, 1fr); }
  .qmode { display: grid; grid-template-columns: 120px minmax(0, 1fr); grid-template-rows: auto auto 1fr; padding: 0; }
  .qmode-art { grid-row: 1 / -1; height: auto; padding: .5rem .3rem; align-items: center; }
  .qmode-art span + span { display: none; }
  .qmode-art img { width: 92px; height: auto; }
  .qmode-title { padding-top: .8rem; }
  .qmode .what, .qbest { padding-bottom: .2rem; }
  .pp-head { gap: .9rem; }
  .pp-stamp { width: 78px; height: 78px; }
  .pp-n { font-size: 1.7rem; }
}
@media (max-width: 560px) {
  .q-options { grid-template-columns: minmax(0, 1fr); }
  .quiz-play, .quiz-end { padding: 1rem; }
  .pp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
  .pp-art { width: 64px; height: 64px; }
  .pp-grid img { max-height: 64px; }
  .b-bar { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .play-card a:hover, .qmode:hover { transform: none; }
  .play-card a:hover .pa-tile { transform: translate(-50%, -100%); }
  .builder-city .tile.pop img { animation: none; }
}
@media print {
  .builder-page .crumbs, .builder-head .lead, .b-bar, .b-palette, .b-actions, .b-status, .b-think, .b-needs .small, .hdr-tools { display: none !important; }
  .builder { display: block; }
  .b-stage { border: 0; background: none; }
  .b-needs { border: 0; padding: 0; margin-top: 1rem; }
  .need { border-style: solid; }
  .quiz-start, .q-next-row, .sd-foot { display: none; }
}
@media (max-width: 420px) {
  .menu-btn:not([hidden]) { padding: .55rem .65rem; }
  .menu-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (max-width: 560px) {
  .b-bar .ctrl { height: 2.25rem; padding: 0 .5rem; font-size: .88rem; }
  .b-tools, .b-ground { gap: .3rem; }
  .b-bar .chip { padding: .45rem .65rem; }
  .builder-head h1 { font-size: 2rem; }
}
.try-it { margin: .9rem 0 0; padding: .65rem 1rem; border: 1px dashed color-mix(in srgb, var(--brand) 55%, #fff); border-radius: 12px; background: #eef2fa; }
.try-it a { font-weight: 700; }

/* ---------- Play cards: map hunt, memory, word search, world cards for the hunt ---------- */
.pa-hunt { background: #dfe9d6 url(/assets/worlds/elven/ground-grass.webp) 0 0 / 90px 90px; }
.pa-lens { position: absolute; left: 50%; top: 46%; display: grid; place-items: center; width: 132px; height: 132px; overflow: hidden; border: 9px solid #23396b; border-radius: 50%; background: radial-gradient(circle, #fff 45%, #eef3f8); transform: translate(-50%, -50%); box-shadow: 0 10px 22px rgb(0 0 0 / .3), inset 0 0 0 3px #fff; }
.pa-lens img { width: 112px; height: auto; transform: scale(1.18); transition: transform .3s; }
.play-card a:hover .pa-lens img { transform: scale(1.32); }
.pa-handle { position: absolute; left: calc(50% + 42px); top: calc(46% + 42px); width: 64px; height: 18px; border-radius: 9px; background: linear-gradient(#3a4f86, #23396b); transform: rotate(45deg); transform-origin: 0 50%; box-shadow: 0 6px 10px rgb(0 0 0 / .25); }
.pa-mem { display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #eef3fb, #f6efe2); }
.pa-card { display: grid; place-items: center; width: 92px; height: 122px; margin: 0 -10px; border: 3px solid #fff; border-radius: 12px; background: #fff; box-shadow: 0 8px 16px rgb(0 0 0 / .18); transform: rotate(-8deg); }
.pa-card:nth-child(2) { position: relative; z-index: 1; transform: translateY(-8px); }
.pa-card:nth-child(3) { transform: rotate(8deg); }
.pa-card img { width: 78px; height: auto; }
.pa-card-back { background: radial-gradient(circle at 50% 40%, #2a3f73, var(--night)); }
.pa-card-back img { width: 44px; }
.pa-words { display: grid; place-items: center; background: linear-gradient(160deg, #fff6e2, #f3e8d6); }
.pa-letters { display: grid; grid-template-columns: repeat(6, 26px); gap: 3px; padding: 10px; border-radius: 12px; background: #fff; box-shadow: 0 8px 18px rgb(0 0 0 / .14); transform: rotate(-3deg); }
.pa-letters span { display: grid; place-items: center; height: 26px; border-radius: 5px; color: #536072; font: 700 .9rem/1 var(--sans); }
.pa-letters .on { background: var(--gold); color: var(--night); }
.pa-world { background: color-mix(in srgb, var(--accent) 14%, #fff); }
.pa-sky img { width: 100%; height: 120px; object-fit: cover; object-position: center bottom; }
.pa-big { position: absolute; left: 50%; bottom: 6px; width: 132px; transform: translateX(-50%); }
.pa-big img { width: 100%; height: auto; filter: drop-shadow(0 8px 8px rgb(0 0 0 / .25)); }
.hunt-cards .play-title { color: var(--accent); }
.hunt-cards .play-go { color: var(--accent); }

/* ---------- Map hunt (on the world maps) ---------- */
.hunt-bar { margin-block: .6rem .2rem; padding: .9rem 1.2rem; border: 2px solid var(--accent); border-radius: 16px; background: var(--paper); box-shadow: 0 6px 18px rgb(0 0 0 / .08); }
.hunt-top { margin: 0 0 .2rem; color: var(--accent); font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.hunt-clue { margin: 0 0 .4rem; font: 600 clamp(1.1rem, 1rem + .6vw, 1.4rem)/1.35 var(--serif); }
.hunt-clue:focus { outline: none; }
.hunt-msg { min-height: 1.5em; margin: 0 0 .5rem; color: var(--muted); font-weight: 600; }
.hunt-msg.ok { color: #1d6b2a; }
.hunt-msg.no { color: #a5281b; }
.hunt-acts, .hunt-others { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: 0; }
.hunt-others { margin-top: .5rem; font-weight: 600; }
.city.hunting .tile-label { display: none !important; }
.city .tile.hunt-ok img { filter: drop-shadow(0 0 .5cqw #fff) drop-shadow(0 0 1.4cqw #2fbf4a) !important; }
.city .tile.hunt-show img { filter: drop-shadow(0 0 .5cqw #fff) drop-shadow(0 0 1.4cqw var(--gold)) !important; }
.city .tile.hunt-ok, .city .tile.hunt-show { z-index: 45; }
.city .tile.hunt-no img { animation: shake .4s; filter: drop-shadow(0 0 1.2cqw #e2483d); }
@keyframes shake { 25% { transform: translateX(-5%); } 75% { transform: translateX(5%); } }

/* ---------- Memory match ---------- */
.memory > * { max-width: 900px; }
.mem-grid { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin: .8rem 0; padding: 0; max-width: 720px; }
.mem-card { display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 14px; background: none; font: inherit; color: inherit; cursor: pointer; perspective: 900px; }
.mem-inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.mem-card.open .mem-inner, .mem-card.done .mem-inner { transform: rotateY(180deg); }
.mem-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; padding: .4rem; overflow: hidden; border-radius: 14px; -webkit-backface-visibility: hidden; backface-visibility: hidden; text-align: center; }
.mem-back { background: radial-gradient(circle at 50% 35%, #2f4a85, var(--night)); box-shadow: 0 6px 14px rgb(0 0 0 / .18); }
.mem-back img { width: 34%; opacity: .9; }
.mem-card:hover .mem-back { background: radial-gradient(circle at 50% 35%, #3a5799, var(--night)); }
.mem-front { border: 3px solid color-mix(in srgb, var(--accent) 45%, #fff); background: color-mix(in srgb, var(--accent) 6%, #fff); transform: rotateY(180deg); }
.mem-front img { width: auto; max-width: 80%; max-height: 62%; }
.mem-front.face-pic img { max-height: 86%; }
.mem-name { font: 700 .88rem/1.15 var(--sans); overflow-wrap: anywhere; }
.mem-front.face-name .mem-name { font: 700 clamp(1rem, .8rem + 1vw, 1.35rem)/1.2 var(--serif); color: var(--accent); }
.mem-world { color: var(--accent); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.mem-card.done .mem-front { border-color: #2f7d34; box-shadow: 0 0 0 3px #bfe3c4; }
.mem-card:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.mem-status { min-height: 1.6em; font-weight: 600; }
.mem-actions { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Word search ---------- */
.ws-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; margin: .4rem 0 1rem; }
.ws-actions { display: flex; gap: .4rem; margin: 0; }
.ws-play { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.ws-grid { display: grid; gap: 3px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); touch-action: none; -webkit-user-select: none; user-select: none; }
.ws-row { display: grid; grid-template-columns: repeat(var(--n, 12), minmax(0, 1fr)); gap: 3px; }
.ws-cell { display: grid; place-items: center; aspect-ratio: 1; border-radius: 7px; background: #f4f1ea; color: var(--ink); font: 700 clamp(.85rem, .6rem + 1.2vw, 1.25rem)/1 var(--sans); cursor: pointer; }
.ws-cell:hover { background: #e9e3d6; }
.ws-cell:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.ws-cell.sel { background: var(--brand); color: #fff; }
.ws-cell.got { color: #fff; }
.f1 { --hl: #b3431d; } .f2 { --hl: #2459c4; } .f3 { --hl: #2f7d34; } .f4 { --hl: #00798c; } .f5 { --hl: #8a5a00; } .f6 { --hl: #7a3d8f; }
.ws-cell.got { background: var(--hl); }
.ws-count { margin: 0 0 .6rem; font-weight: 700; }
.ws-words { display: grid; gap: .45rem; margin: 0; padding-left: 1.4rem; }
.ws-words li { padding: .3rem .5rem; border-radius: 8px; }
.ws-word { display: block; font: 700 1.05rem/1.2 var(--serif); }
.ws-mean { display: block; color: var(--muted); font-size: .9rem; }
.ws-words li.got { background: color-mix(in srgb, var(--hl) 10%, #fff); }
.ws-words li.got .ws-word { color: var(--hl); text-decoration: line-through; text-decoration-thickness: 2px; }

/* ---------- City builder: challenges ---------- */
.builder { grid-template-areas: "main pal" "needs pal" "chal pal" "act pal"; }
.b-chal { grid-area: chal; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 18px; background: var(--paper); }
.b-chal h2 { font-size: 1.3rem; margin-bottom: .1rem; }
.chal-list { display: flex; flex-wrap: wrap; gap: .4rem; }
.chal-chip.done::before { content: "\2713  "; color: #2f7d34; font-weight: 800; }
.chal-chip.done[aria-pressed="true"]::before { color: #fff; }
.chal-card { margin-top: .8rem; padding: .8rem 1rem; border: 1px solid var(--cream-line); border-left: 5px solid var(--gold); border-radius: 12px; background: var(--cream); }
.chal-title { margin: 0; font: 700 1.15rem/1.25 var(--serif); }
.chal-text { margin: .1rem 0 .5rem; }
.chal-goals { list-style: none; display: grid; gap: .3rem; margin: 0; padding: 0; font-weight: 600; }
.chal-goals li::before { content: ""; display: inline-grid; place-items: center; box-sizing: border-box; width: 1.1rem; height: 1.1rem; margin-right: .45rem; border: 2px solid #b5ab9b; border-radius: 50%; vertical-align: -.15em; font-size: .7rem; }
.chal-goals li.met { color: #1b4d21; }
.chal-goals li.met::before { content: "\2713"; border: 0; background: #2f7d34; color: #fff; font-weight: 800; }
.chal-done { margin: .6rem 0 0; color: #1d6b2a; font-weight: 700; }

/* ---------- Passport badges and the new-badge note ---------- */
.pp-badges { padding-bottom: 1rem; }
.badges { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; margin: .6rem 0 0; padding: 0; }
.medal { display: flex; flex-direction: column; align-items: center; gap: .3rem; padding: .8rem .6rem; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); text-align: center; }
.medal-art { display: grid; place-items: center; width: 84px; height: 84px; overflow: hidden; border: 4px solid #d8d1c3; border-radius: 50%; background: #f1ede5; }
.medal-art img { width: 70px; height: auto; filter: grayscale(1); opacity: .4; }
.medal-name { font: 700 1rem/1.2 var(--serif); color: var(--muted); }
.medal-how { color: var(--muted); font-size: .82rem; }
.medal.got { border-color: #e7c977; background: linear-gradient(180deg, #fffaf0, #fff); }
.medal.got .medal-art { border-color: var(--gold); background: radial-gradient(circle, #fff, #fbefd2); box-shadow: 0 0 0 3px #fff, 0 0 0 5px #f0d48f; }
.medal.got .medal-art img { filter: none; opacity: 1; }
.medal.got .medal-name { color: var(--ink); }
.medal.got .medal-how { color: #8a5a00; font-weight: 700; }
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; align-items: center; gap: .7rem; max-width: min(360px, calc(100% - 32px)); padding: .7rem .8rem; border: 2px solid var(--gold); border-radius: 16px; background: var(--paper); box-shadow: 0 14px 34px rgb(20 32 57 / .3); animation: toast-in .4s ease-out; }
.toast img { flex: none; width: 52px; height: 52px; object-fit: contain; }
.toast p { margin: 0; font-weight: 700; }
.toast a { display: block; font-weight: 600; }
.toast-x { align-self: flex-start; flex: none; width: 2rem; height: 2rem; border: 0; border-radius: 50%; background: #f1ede5; font-size: 1.2rem; line-height: 1; cursor: pointer; }
.toast-out { opacity: 0; transform: translateY(12px); transition: opacity .4s, transform .4s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px); } }

/* ---------- Teachers: classroom tools, worksheets, glossary, question bank ---------- */
.tools { padding-bottom: .5rem; }
.tool-card a { border-top-color: var(--gold); }
.sheet-head { padding-block: .8rem 1rem; }
.sheet-head > *, .sheet-wrap > * { max-width: 860px; }
.sheet-btns { display: flex; flex-wrap: wrap; gap: .5rem; }

.sheet { margin-bottom: 1.2rem; padding: 2rem 2.2rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 6px 20px rgb(0 0 0 / .07); color: #111; }
.sheet h2 { font-size: 1.5rem; margin-bottom: .3rem; }
.sheet h3 { font-size: 1.05rem; margin: .4rem 0; }
.sheet-name { display: flex; gap: 2rem; margin-bottom: 1.2rem; font-weight: 600; }
.sheet-name span { flex: 1; border-bottom: 1px solid #555; padding-bottom: .2rem; }
.sheet-name span + span { flex: .6; }
.sheet-do { font-weight: 600; }
.sheet-credit, .sheet-tip { margin: 1.2rem 0 0; color: #666; font-size: .8rem; }
.sheet-key-box summary { margin-bottom: .6rem; }
.blank { display: inline-block; width: 2.2rem; border-bottom: 1px solid #333; }
.vocab, .match { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 1.5rem; }
.vocab-words { display: grid; gap: .65rem; padding-left: 1.6rem; font-weight: 700; }
.vocab-means { list-style: none; display: grid; gap: .55rem; padding: 0; }
.key-list { display: grid; gap: .4rem; padding-left: 1.4rem; }
.key-from { color: #666; }
.wsp { border-collapse: collapse; margin: .5rem 0 1rem; }
.wsp td { width: 2.1rem; height: 2.1rem; border: 1px solid #c9c2b4; font: 700 1.05rem/1 var(--sans); text-align: center; }
.wsp-key td.k { background: #ffe5a3; outline: 2px solid #8a5a00; outline-offset: -2px; }
.wsp-words { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .3rem 1.5rem; padding-left: 1.2rem; font-size: .95rem; }
.chart { width: 100%; border-collapse: collapse; table-layout: fixed; }
.chart th, .chart td { border: 1px solid #999; padding: .4rem; vertical-align: top; text-align: left; }
.chart thead th { font-size: .85rem; text-align: center; }
.chart thead img { display: block; width: 56px; height: auto; margin: 0 auto .2rem; }
.chart tbody th { width: 22%; font-size: .9rem; }
.chart tbody th span { display: block; margin-top: .2rem; color: #555; font-weight: 400; font-size: .78rem; }
.chart td { height: 6.5rem; }
.chart-key td { height: auto; font-size: .85rem; }
.match-list { list-style: none; display: grid; gap: .6rem; padding: 0; }
.match-list li { display: flex; align-items: center; gap: .6rem; min-height: 64px; padding: .3rem .5rem; border: 1px solid #ccc; border-radius: 10px; }
.match-list img { flex: none; width: 56px; height: 56px; object-fit: contain; }
.match > div:last-child .match-list li { flex-direction: row-reverse; justify-content: flex-end; }
.lines { height: 5.5rem; background: repeating-linear-gradient(transparent 0 1.75rem, #999 1.75rem calc(1.75rem + 1px)); }
.plan-grid { border-collapse: collapse; margin: .5rem auto 1.2rem; }
.plan-grid td { width: 4.6rem; height: 4.6rem; border: 6px solid #d8d2c6; background: #fff; }
.plan-needs { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
.plan-needs th, .plan-needs td { border: 1px solid #999; padding: .45rem .5rem; text-align: left; }
.plan-needs td { height: 2.2rem; }
.plan-needs tbody th { width: 24%; }
.gl-list { margin: 0; }
.gl-item { padding: .55rem 0; border-bottom: 1px dashed var(--line); }
.gl-item dt { font: 700 1.1rem/1.25 var(--serif); }
.gl-item dd { margin: .1rem 0 0; }
.gl-from { display: block; margin-top: .15rem; color: var(--muted); font-size: .85rem; }
.qotd { max-width: 760px; margin: 1rem 0; padding: 1rem 1.3rem; border: 1px solid var(--cream-line); border-left: 6px solid var(--gold); border-radius: var(--radius); background: var(--cream); }
.qotd .tag { --accent: #8a5a00; }
.qotd-q { margin: 0 0 .3rem; font: 600 clamp(1.15rem, 1rem + .7vw, 1.45rem)/1.35 var(--serif); }
.qotd-from { margin: 0 0 .4rem; color: var(--muted); font-size: .92rem; }
.qotd p:last-child { margin: 0; }
.qb-world { padding-block: 1.2rem; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.qb-world h2 { color: var(--accent); }
.qb-cat h3 { margin: 1rem 0 .4rem; font-size: 1.1rem; }
.qb-list { display: grid; gap: .35rem; margin: 0; padding-left: 1.2rem; }
.qb-from { font-size: .85rem; font-weight: 600; white-space: nowrap; }

@media (max-width: 1000px) {
  .builder { grid-template-areas: "main" "pal" "needs" "chal" "act"; }
}
@media (max-width: 760px) {
  .ws-play { grid-template-columns: minmax(0, 1fr); }
  .mem-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
  .vocab, .match { grid-template-columns: minmax(0, 1fr); }
  .sheet { padding: 1.2rem 1rem; }
  .wsp td { width: 1.6rem; height: 1.6rem; font-size: .85rem; }
  .wsp-words { grid-template-columns: minmax(0, 1fr); }
  .chart thead img { width: 36px; }
  .chart th, .chart td { padding: .25rem; font-size: .75rem; }
  .plan-grid td { width: 2.3rem; height: 2.3rem; border-width: 4px; }
  .hunt-bar { padding: .7rem .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .mem-inner { transition: none; }
  .toast { animation: none; }
  .city .tile.hunt-no img { animation: none; }
  .play-card a:hover .pa-lens img { transform: scale(1.18); }
}
@media print {
  .wsearch .crumbs, .ws-bar, .wsearch .lead, .ws-mean a, .memory, .hunt-bar, .toast { display: none !important; }
  .ws-play { display: block; }
  .ws-grid { max-width: 15cm; border: 0; }
  .ws-cell { background: none !important; color: #000 !important; border: 1px solid #bbb; }
  .worksheet .crumbs, .worksheet .sheet-head, .worksheet main > section:last-child { display: none !important; }
  .worksheet .sheet-wrap { max-width: none; width: auto; }
  .worksheet .sheet { margin: 0; padding: 0; border: 0; box-shadow: none; }
  .worksheet .sheet-key-box { display: none; }
  .worksheet.print-key .sheet-key-box { display: block; break-before: page; }
  .worksheet.print-key .sheet-key-box summary { display: none; }
  .question-bank .qotd, .glossary .sp-form, .glossary .az-jump, .search-page .az-jump { display: none; }
}
.mem-play { max-width: 720px !important; }
.mem-front.face-pic, .mem-front.face-name { --accent: var(--brand); }
.hunt-bar { position: sticky; top: 8px; z-index: 30; }
.q-opt img { flex: none; width: 70px; height: 70px; object-fit: contain; }
.q-people .q-opt { padding: .5rem .9rem .5rem .5rem; }
.q-words .q-ask { font-size: clamp(1.2rem, 1.05rem + .8vw, 1.55rem); }

/* ---------- Shop (/shop/, the product pages and the home band) ---------- */
.shop-top { padding-block: clamp(2rem, 1.2rem + 3vw, 3.6rem); }
.shop-top:not(.shop-top-dark) { background: var(--cream); }
.shop-top-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 2rem 3rem; align-items: center; }
.shop-top h1 { font-size: clamp(2.4rem, 1.8rem + 3vw, 3.8rem); margin: 0 0 .2em; }
.shop-top-pic img { display: block; width: 100%; height: auto; }
.shop-top-dark h1 { color: #fff; }
.shop-top-dark .lead { color: #d6dcea; }
.shop-top-dark .tag, .shop-home .tag { color: #f0c674; }
.shop-top-dark .shop-top-pic { text-align: center; }
.shop-phone { display: inline-block !important; width: min(250px, 66%) !important; border-radius: 26px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.shop-soon { display: inline-block; margin: .5rem 0 0; padding: .5rem 1.2rem; border: 2px solid var(--brand); border-radius: 999px; color: var(--brand); font-weight: 700; }
.shop-top-dark .shop-soon, .band-dark .shop-soon { border-color: #f0c674; color: #f0c674; }
.shop-top-dark .btn, .shop-home .btn { background: #f0c674; border-color: #f0c674; color: #1d1608; }
.shop-top-dark .shop-note, .shop-top-dark .shop-note a { color: #d6dcea; }
.shop-facts { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem .6rem; }
.shop-facts li { font-size: .9rem; font-weight: 600; padding: .25rem .75rem; border-radius: 999px; background: rgba(35, 57, 107, .08); }
.shop-top-dark .shop-facts li { background: rgba(255, 255, 255, .1); color: #e8ecf5; }
.shop-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.shop-steps li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; }
.shop-steps b { display: block; font-family: var(--serif); font-size: 1.15rem; margin-bottom: .2rem; }
.shop-step-n { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: .6rem; }
.shop-gallery { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 300px)); justify-content: center; gap: 1.4rem; }
.shop-gallery figure { margin: 0; }
.shop-gallery img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 10px 28px rgba(20, 32, 57, .18); }
.shop-life-rpg .shop-gallery img { background: #0e0c14; border-radius: 18px; }
.shop-gallery figcaption { margin-top: .6rem; text-align: center; font-weight: 600; }
.shop-feats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 1rem; }
.shop-feats li { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: grid; grid-template-columns: auto 1fr; gap: .1rem .8rem; }
.shop-feat-icon { grid-row: span 2; font-size: 1.6rem; line-height: 1.2; }
.shop-feats b { font-family: var(--serif); font-size: 1.05rem; }
.shop-feats span:last-child { color: var(--muted); font-size: .95rem; }
.shop-worlds { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.shop-worlds li { margin: 0; }
.shop-worlds img { display: block; width: 100%; height: auto; border-radius: 12px; border: 3px solid var(--accent); }
.shop-worlds span { display: block; margin-top: .45rem; text-align: center; font-weight: 700; color: var(--accent); }
.shop-faq details { border-bottom: 1px solid var(--line); padding: .85rem 0; }
.shop-faq summary { cursor: pointer; font-weight: 700; font-size: 1.05rem; }
.shop-faq p { margin: .5rem 0 0; color: #2f3a48; }
.shop-again { background: var(--cream); text-align: center; }
.shop-again h2 { margin: 0 0 .4rem; }
.shop-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 1.2rem; }
.shop-card a { display: flex; flex-direction: column; height: 100%; background: var(--paper); color: var(--ink); text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.shop-card a:hover .shop-name { text-decoration: underline; }
.shop-card-pic { aspect-ratio: 16 / 9; background: var(--cream); display: grid; place-items: center; overflow: hidden; }
.shop-card-pic img { width: 100%; height: 100%; object-fit: contain; }
.shop-card-text { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.1rem 1.1rem; flex: 1; }
.shop-kind { font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.shop-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; }
.shop-line { color: #2f3a48; }
.shop-state { margin-top: auto; padding-top: .5rem; font-weight: 700; color: var(--brand); }
.shop-home .sec-head p { color: #c8d2e3; }
.shop-home-more { margin: 1.4rem 0 0; text-align: center; }
@media (max-width: 760px) {
  .shop-top-inner { grid-template-columns: 1fr; }
  .shop-steps { grid-template-columns: 1fr; }
  .shop-worlds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-phone { width: min(240px, 66%) !important; }
}

/* ---------- Shop: buying facts, who it is for, page by page, shelves ---------- */
.shop-trust { list-style: none; padding: 0; margin: .6rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .9rem; font-weight: 600; color: #2f3a48; }
.shop-trust li::before { content: "\2713"; color: #1f7a4d; font-weight: 800; margin-right: .35rem; }
.shop-top-dark .shop-trust { color: #d6dcea; }
.shop-top-dark .shop-trust li::before { color: #9fe0b8; }
.shop-perfect { margin: .9rem 0 0; font-size: .95rem; color: var(--muted); }
.shop-top-dark .shop-perfect { color: #c8d2e3; }
.shop-pagelist { list-style: none; padding: 0; margin: 1rem 0 0; border-top: 1px solid var(--line); }
.shop-pagelist li { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.shop-pg { font-weight: 700; color: var(--brand); }
.shop-jump { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.shop-jump a { display: inline-block; padding: .4rem .9rem; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-weight: 600; text-decoration: none; color: var(--ink); }
.shop-jump a:hover { border-color: var(--brand); color: var(--brand); }
.shop-shelf { padding-top: 1.2rem; }
.shop-how { background: var(--cream); }
.shop-card-life-rpg .shop-card-pic img { object-fit: cover; }
@media (max-width: 560px) { .shop-pagelist li { grid-template-columns: 1fr; gap: .2rem; } }
.shop-promo { background: var(--cream); }
.shop-promo .tag { color: var(--brand); }

/* ---------- More games: cards on the play hub ---------- */
.play-more { margin: 1.4rem 0 0; text-align: center; }
.pa-sort { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: linear-gradient(160deg, #eef3fb, #f6efe2); }
.pa-sortcard { display: grid; place-items: center; width: 100px; height: 100px; border-radius: 18px; background: #fff; box-shadow: 0 8px 16px rgb(0 0 0 / .15); transform: rotate(-6deg); transition: transform .3s; }
.pa-sortcard img { width: 84px; height: auto; }
.play-card a:hover .pa-sortcard { transform: rotate(4deg) translateY(10px); }
.pa-bins { display: flex; gap: 6px; }
.pa-bins span { width: 34px; height: 26px; border-radius: 8px 8px 12px 12px; background: var(--accent); box-shadow: inset 0 -5px 0 rgb(0 0 0 / .12); }
.pa-shadow { display: flex; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle at 30% 55%, #fffaf0 0, #f2e3c2 62%, #e6d1a4); }
.pa-shadow img { width: 118px; height: auto; }
.pa-sil img { filter: brightness(0) opacity(.85); }
.pa-col { opacity: .35; transition: opacity .35s; }
.play-card a:hover .pa-col { opacity: 1; }
.pa-zoom { display: grid; place-items: center; background: linear-gradient(160deg, #eaf2fb, #f5ecdd); }
.pa-zf { position: relative; display: block; width: 150px; height: 150px; overflow: hidden; border-radius: 20px; background: radial-gradient(circle, #fff, #efe9dd); box-shadow: 0 10px 22px rgb(0 0 0 / .18); }
.pa-zf img { width: 100%; height: 100%; object-fit: contain; transform: scale(2.7); transform-origin: 50% 42%; transition: transform .6s; }
.play-card a:hover .pa-zf img { transform: scale(1.1); }
/* corner marks, like a camera's viewfinder */
.pa-zf::after { content: ""; position: absolute; inset: 12px; filter: drop-shadow(0 1px 2px rgb(0 0 0 / .45));
  background: linear-gradient(#fff 0 0) top left / 22px 4px, linear-gradient(#fff 0 0) top left / 4px 22px, linear-gradient(#fff 0 0) top right / 22px 4px, linear-gradient(#fff 0 0) top right / 4px 22px,
    linear-gradient(#fff 0 0) bottom left / 22px 4px, linear-gradient(#fff 0 0) bottom left / 4px 22px, linear-gradient(#fff 0 0) bottom right / 22px 4px, linear-gradient(#fff 0 0) bottom right / 4px 22px;
  background-repeat: no-repeat; }
.pa-odd { display: grid; place-items: center; background: linear-gradient(160deg, #f6efe2, #eef3fb); }
.pa-oddgrid { display: grid; grid-template-columns: repeat(2, 76px); gap: 9px; }
.pa-oddgrid span { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 14px; background: #fff; box-shadow: 0 4px 10px rgb(0 0 0 / .12); }
.pa-oddgrid img { width: 64px; height: auto; }
.pa-oddgrid .odd { box-shadow: 0 0 0 4px #e2483d, 0 4px 10px rgb(0 0 0 / .12); transform: rotate(5deg); }
.pa-puzzle { display: grid; place-items: center; background: linear-gradient(160deg, #fdf3dc, #eef3fb); }
.pa-pz { display: grid; grid-template-columns: repeat(3, 48px); gap: 3px; padding: 3px; border-radius: 10px; background: #d9d2c4; box-shadow: 0 8px 18px rgb(0 0 0 / .15); }
.pa-pz span { width: 48px; height: 48px; border-radius: 4px; background-color: #f7ecd2; background-size: 300%; background-repeat: no-repeat; transition: transform .3s; }
.pa-pz .out { transform: translate(20px, -16px) rotate(9deg); box-shadow: 0 6px 12px rgb(0 0 0 / .25); }
.play-card a:hover .pa-pz .out { transform: none; box-shadow: none; }

/* ---------- Shadow match, Zoom detective and Odd one out (quiz.js) ---------- */
.qmode-shadow span:first-child img { filter: brightness(0) opacity(.82); }
.qmode-zoom span:first-child { align-self: center; overflow: hidden; border: 4px solid #fff; border-radius: 16px; background: #fff; box-shadow: 0 6px 14px rgb(0 0 0 / .16); }
.qmode-zoom span:first-child img { height: 104px; transform: scale(2.5); filter: none; }
.q-sil img { filter: brightness(0) opacity(.85); transition: filter .8s; }
.q-sil.lit img { filter: none; }
.q-pic .q-close { padding: 0; overflow: hidden; }
.q-close-box { display: block; aspect-ratio: 1; max-height: 330px; margin-inline: auto; overflow: hidden; }
.q-pic .q-close img { width: 100%; height: 100%; max-height: none; object-fit: contain; will-change: transform; }
.q-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.q-cards .q-opt { flex-direction: column; justify-content: flex-start; gap: .4rem; padding: .7rem .5rem .8rem; text-align: center; font-size: 1rem; }
.q-cards .q-opt img { width: 100%; max-width: 130px; height: auto; aspect-ratio: 1; object-fit: contain; }
.q-cards .q-opt.right::after, .q-cards .q-opt.wrong::after { margin: 0; padding: 0; }
@media (max-width: 640px) {
  .q-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-cards .q-opt img { max-width: 96px; }
}

/* ---------- World sort (sort.js) ---------- */
.sort-stage { position: relative; display: grid; place-items: center; min-height: 290px; margin: .3rem 0 1rem; }
.sort-card { width: 240px; margin: 0; padding: 1rem 1rem .8rem; border: 3px solid var(--line); border-radius: 22px; background: radial-gradient(circle at 50% 42%, #fff, #f1ece2 75%); box-shadow: 0 12px 28px rgb(0 0 0 / .12); text-align: center; }
.sort-card img { width: 180px; height: 180px; margin-inline: auto; object-fit: contain; }
.sort-card figcaption { margin-top: .3rem; font: 700 1.1rem/1.25 var(--sans); }
.sort-in { animation: sort-in .22s ease-out; }
@keyframes sort-in { from { transform: scale(.7); opacity: 0; } }
.sort-fly { transform: translate(var(--fx, 0), var(--fy, 0)) scale(.25); opacity: 0; transition: transform .26s ease-in, opacity .26s ease-in; }
.sort-no { border-color: #c0392b; animation: shake .4s; }
.sort-streak { position: absolute; top: .3rem; right: 0; margin: 0; padding: .35rem .85rem; border-radius: 999px; background: var(--gold); color: var(--night); font-weight: 800; opacity: 0; pointer-events: none; }
.sort-streak.pop { animation: streak .9s ease-out; }
@keyframes streak { 0% { opacity: 0; transform: scale(.6); } 20% { opacity: 1; transform: scale(1.12); } 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.sort-bins { display: grid; gap: .6rem; }
.bins-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bins-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sort-bin { display: flex; align-items: center; gap: .6rem; min-height: 3.6rem; padding: .7rem .9rem; border: 2px solid var(--accent); border-radius: 16px; background: color-mix(in srgb, var(--accent) 12%, #fff); color: var(--ink); font: 700 1.05rem/1.2 var(--sans); text-align: left; cursor: pointer; transition: transform .12s, background .12s; }
.sort-bin:hover { background: color-mix(in srgb, var(--accent) 22%, #fff); }
.sort-bin:active { transform: scale(.97); }
.sort-key { display: grid; place-items: center; flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--accent); color: #fff; font-size: .9rem; }
.sort-bin.hit { border-color: #2f7d34; background: #e5f3e6; }
.sort-bin.show { border-color: #c98a00; background: #fff3c4; box-shadow: 0 0 0 4px rgb(240 180 0 / .35); }
.bin-past { --accent: var(--roman); }
.bin-today { --accent: var(--modern); }
.bin-future { --accent: var(--future); }
.bin-imagined { --accent: var(--heaven); }
.sort-tip { margin: .8rem 0 0; color: var(--muted); font-size: .9rem; }
.sort-play.hurry .sort-bar span { background: #d9534f; }
.sort-play.hurry .sort-time { color: #b3261e; }
.sort-missed li { gap: .6rem; }
@media (max-width: 640px) {
  .bins-6, .bins-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sort-stage { min-height: 236px; }
  .sort-card { width: 196px; }
  .sort-card img { width: 140px; height: 140px; }
}
@media (hover: none) { .sort-tip { display: none; } }

/* ---------- Picture puzzle (puzzle.js) ---------- */
.pz-sizes { margin: .2rem 0 1.1rem; }
.pz-picks { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin: 0; padding: 0; }
.pz-pick { display: flex; flex-direction: column; align-items: center; gap: .15rem; width: 100%; height: 100%; padding: .6rem .5rem .8rem; border: 1px solid var(--line); border-top: 5px solid var(--accent); border-radius: 16px; background: var(--paper); color: var(--ink); font: inherit; text-align: center; cursor: pointer; transition: box-shadow .2s, transform .2s; }
.pz-pick:hover { box-shadow: 0 10px 24px rgb(0 0 0 / .12); transform: translateY(-3px); }
.pz-pick img { width: 110px; height: 110px; object-fit: contain; }
.pz-pick-name { font-weight: 700; }
.pz-pick .what { font-size: .85rem; }
.pz-pick .qbest { padding: 0; font-size: .8rem; }
.pz-stage { position: relative; width: min(100%, 540px); margin: .4rem auto 0; }
.pz-board { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: 3px; aspect-ratio: 1; padding: 3px; border-radius: 14px; background: #d9d2c4; transition: gap .4s, padding .4s; }
.pz-piece { display: block; width: 100%; aspect-ratio: 1; padding: 0; border: 0; border-radius: 6px; background-color: #eee; background-size: calc(var(--n, 3) * 100%); background-repeat: no-repeat; cursor: grab; touch-action: none; transition: box-shadow .15s, transform .15s, border-radius .4s; }
.pz-piece:focus-visible { position: relative; z-index: 2; outline: 3px solid var(--focus); outline-offset: 2px; }
.pz-piece.sel { position: relative; z-index: 1; transform: scale(.9); box-shadow: 0 0 0 4px var(--gold), 0 8px 18px rgb(0 0 0 / .25); }
.pz-piece.ok { cursor: default; box-shadow: inset 0 0 0 3px rgb(47 125 52 / .9); }
.pz-piece.drag { position: relative; z-index: 5; cursor: grabbing; box-shadow: 0 14px 28px rgb(0 0 0 / .35); transition: none; }
.pz-piece.pop { animation: pz-pop .25s ease-out; }
@keyframes pz-pop { 50% { transform: scale(1.06); } }
.pz-board.won { gap: 0; padding: 0; }
.pz-board.won .pz-piece { border-radius: 0; box-shadow: none; cursor: default; }
.pz-peek { position: absolute; inset: 0; z-index: 6; border-radius: 14px; background: center / cover no-repeat; box-shadow: 0 10px 30px rgb(0 0 0 / .3); }
.pz-say { min-height: 1.6em; margin: .8rem 0 0; font-weight: 700; text-align: center; }
.pz-actions { margin: .5rem 0 0; text-align: center; }
.pz-won { margin-top: 1rem; padding: 1rem 1.2rem; border-radius: 16px; background: #e5f3e6; text-align: center; }
.pz-won-msg { font: 700 1.25rem/1.3 var(--serif); }
@media (prefers-reduced-motion: reduce) {
  .sort-in, .sort-no, .pz-piece.pop { animation: none; }
  .sort-streak.pop { animation: none; opacity: 1; }
  .sort-fly, .pz-board, .pz-piece, .q-sil img { transition: none; }
}

/* ---------- World pages: the world at a glance; people on the map and on tour ---------- */
.glance { list-style: none; display: flex; flex-wrap: wrap; gap: .45rem; margin: 1rem 0 0; padding: 0; }
.glance li { padding: .35rem .8rem; border: 1px solid color-mix(in srgb, var(--accent) 30%, #fff); border-radius: 999px; background: color-mix(in srgb, var(--accent) 8%, #fff); font-size: .92rem; }
.glance strong { color: var(--accent); }
.glance a { font-weight: 700; }
.person-more { margin: .4rem 0 0; font-size: .92rem; font-weight: 600; }
.play-line { margin: .8rem 0 0; }
/* Egypt and Heaven people pictures leave more room above the head (PEOPLE_SCALE in build/people.php), so they are
   drawn a little bigger wherever people stand side by side with the other worlds'. */
.crowd .world-egypt img, .crowd .world-heaven img, .tour-card.world-egypt .tour-guide img, .tour-card.world-heaven .tour-guide img,
.person.world-egypt .person-art img, .person.world-heaven .person-art img { transform: scale(1.12); transform-origin: 50% 100%; }
.crowd .world-egypt a:hover img, .crowd .world-heaven a:hover img { transform: translateY(-6%) scale(1.12); }

/* ---------- Under every game: how to play, what you learn, more games ---------- */
.game-about { border-top: 1px solid var(--line); }
.game-about-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2.4rem; max-width: 980px; }
.game-about h2 { font-size: 1.35rem; margin-bottom: .3rem; }
.game-about p { margin: 0; }
.more-games-h { margin-top: 1.6rem; }
.more-games { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; margin: .6rem 0 1.2rem; padding: 0; }
.more-games a { display: flex; flex-direction: column; gap: .15rem; height: 100%; padding: .8rem 1rem; border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 14px; background: var(--paper); color: var(--ink); text-decoration: none; }
.more-games a:hover { border-color: var(--brand); box-shadow: 0 8px 18px rgb(0 0 0 / .08); }
.more-games strong { font: 700 1.05rem/1.2 var(--serif); color: var(--brand); }
.more-games span { color: var(--muted); font-size: .92rem; }
@media (max-width: 700px) { .game-about-grid, .more-games { grid-template-columns: minmax(0, 1fr); } }
