:root {
  --bg: #0b0a09;
  --bg-2: #100e0c;
  --panel: #15120f;
  --panel-2: #1b1713;
  --line: rgba(217, 180, 90, 0.16);
  --line-strong: rgba(217, 180, 90, 0.34);
  --gold: #d9b45a;
  --gold-dim: #a8884a;
  --gold-hi: #f3dea0;
  --gold-grad: linear-gradient(180deg, #f6e3a6 0%, #d9b45a 45%, #9c7a34 100%);
  --text: #ede7da;
  --muted: #9d9483;
  --violet: #8b7cf6;
  --radius: 20px;
  --serif: 'Cormorant Garamond', 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --topbar: 0px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; } /* hidden means hidden, whatever a class says */
button, a { -webkit-tap-highlight-color: rgba(217, 180, 90, 0.14); }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(217, 180, 90, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 40%, rgba(139, 124, 246, 0.05), transparent 60%),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.mono { font-family: var(--mono); letter-spacing: 0.02em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 100;
  background: var(--gold); color: #111; padding: 10px 14px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; border-radius: 6px; }

/* ---------- type ---------- */

.display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin: 0;
}

.eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin: 0 0 14px;
}
.eyebrow.gold { color: var(--gold); }

.lede { color: var(--muted); font-size: 17px; max-width: 60ch; margin: 18px 0 0; }

.link { color: var(--gold); text-decoration: none; font-size: 14px; }
.link:hover { color: var(--gold-hi); text-decoration: underline; }

/* ---------- chrome: one floating button, a pop-out menu ---------- */

.chrome { position: fixed; top: 18px; left: 18px; z-index: 50; transition: transform 0.35s ease, opacity 0.35s ease; }
.chrome.tucked { transform: translateY(-150%); opacity: 0; pointer-events: none; }

.orb {
  display: inline-flex; align-items: center; gap: 10px; height: 46px; padding: 0 16px 0 13px;
  border-radius: 999px; border: 1px solid var(--line-strong); cursor: pointer;
  background: rgba(11, 10, 9, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--gold-hi); box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.8);
  transition: border-color 0.2s, background 0.2s;
}
.orb:hover { border-color: var(--gold); background: rgba(21, 18, 15, 0.92); }
.orb .brand-star { width: 20px; height: 20px; flex: none; }
.orb-label { font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; white-space: nowrap; max-width: 44vw; overflow: hidden; text-overflow: ellipsis; }
.orb-burger { display: grid; gap: 4px; width: 16px; margin-left: 2px; }
.orb-burger i { display: block; height: 1.5px; background: var(--gold); border-radius: 2px; transition: transform 0.25s; }
.orb[aria-expanded='true'] .orb-burger i:first-child { transform: translateY(2.75px) rotate(45deg); }
.orb[aria-expanded='true'] .orb-burger i:last-child { transform: translateY(-2.75px) rotate(-45deg); }
.orb-eq { display: none; align-items: flex-end; gap: 2px; height: 14px; }
.orb-eq i { display: block; width: 2.5px; height: 4px; background: var(--gold); border-radius: 2px; animation: eq 0.9s ease-in-out infinite; }
.orb-eq i:nth-child(2) { animation-delay: 0.15s; }
.orb-eq i:nth-child(3) { animation-delay: 0.3s; }
@keyframes eq { 0%, 100% { height: 3px; } 50% { height: 14px; } }
body.is-speaking .orb-eq { display: inline-flex; }

.menu-scrim { position: fixed; inset: 0; z-index: 45; background: rgba(5, 4, 3, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity 0.22s; }
.menu-scrim.open { opacity: 1; }

.menu {
  position: fixed; top: 76px; left: 18px; z-index: 55;
  width: min(420px, calc(100vw - 36px)); max-height: calc(100vh - 96px); overflow: auto; overscroll-behavior: contain;
  padding: 18px 18px 16px; border-radius: 22px; border: 1px solid var(--line-strong);
  background: radial-gradient(420px 240px at 0% 0%, rgba(217, 180, 90, 0.08), transparent 60%), rgba(16, 14, 12, 0.97);
  box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9);
  opacity: 0; transform: translateY(-8px) scale(0.98); transform-origin: top left; transition: opacity 0.22s, transform 0.22s;
}
.menu.open { opacity: 1; transform: none; }
.menu-head { display: flex; align-items: center; gap: 12px; padding: 0 2px 14px; border-bottom: 1px solid var(--line); }
.menu-head .menu-close { margin-left: auto; }
.menu-head .brand-word { white-space: nowrap; }
.menu-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.menu-foot .clock { font-size: 10.5px; }
.menu-close {
  width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--gold-hi); font-size: 20px; line-height: 1; cursor: pointer;
}
.menu-close:hover { border-color: var(--gold); }
.menu-nav { display: grid; gap: 2px; padding: 10px 0; }
.menu-nav a {
  display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; align-items: center;
  padding: 9px 12px; border-radius: 14px; text-decoration: none; transition: background 0.15s;
}
.menu-nav a:hover, .menu-nav a:focus-visible { background: rgba(217, 180, 90, 0.07); }
.menu-nav a[aria-current='page'] { background: rgba(217, 180, 90, 0.11); }
.menu-k { grid-row: span 2; font-size: 11px; color: var(--gold-dim); border: 1px solid var(--line); border-radius: 6px; text-align: center; padding: 3px 0 2px; }
.menu-t { font-size: 28px; line-height: 1.1; color: var(--text); }
.menu-nav a[aria-current='page'] .menu-t { color: var(--gold-hi); }
.menu-d { font-size: 12.5px; color: var(--muted); }
.menu-tools { display: grid; grid-template-columns: 1fr 108px; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.menu-tools input {
  width: 100%; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: #0a0908; color: var(--text); font: inherit; font-size: 15px;
}
.menu-tools input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 180, 90, 0.12); }
.menu-stop input { font-family: var(--mono); letter-spacing: 0.18em; text-align: center; color: var(--gold-hi); }
.menu-hint { margin: 0 4px; font-size: 10.5px; letter-spacing: 0.08em; color: var(--gold-dim); }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-star { width: 22px; height: 22px; fill: var(--gold); filter: drop-shadow(0 0 8px rgba(217, 180, 90, 0.45)); }
.brand-word { font-size: 12px; letter-spacing: 0.34em; color: var(--gold); font-weight: 500; }
.brand-sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--bg);
  background: var(--gold-grad); padding: 2px 7px 1px; border-radius: 4px;
}

.clock { font-size: 11px; color: var(--gold-dim); white-space: nowrap; }

main { position: relative; z-index: 1; min-height: 60vh; outline: none; }
/* An open room lives inside main, whose stacking level the footer shares and, coming later, paints over:
   while a room is open, main rises above it (v0.23: wing X, the last tile, opened its room with the footer showing through). */
.room-open main { z-index: 2; }
#app { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }

.footer {
  position: relative; z-index: 1;
  max-width: 1280px; margin: 96px auto 0; padding: 40px var(--gutter) 56px;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px;
  color: var(--muted); font-size: 14px;
}
.footer-pact p { font-family: var(--serif); font-size: 24px; line-height: 1.3; color: var(--text); margin: 0; max-width: 32ch; }
.footer-credits p { margin: 0 0 8px; }
.footer-credits a { color: var(--gold); text-decoration: none; }
.footer-credits .mono { font-size: 11px; color: var(--gold-dim); margin-top: 16px; }

/* The newsletter (v0.30): the SPARK M!NDS list, joined from the footer of every page and from the menu. The address is
   16px so a phone does not zoom in on it; the robots' trap sits off the page, never seen or reached by Tab. */
.footer-news { grid-column: 1 / -1; max-width: 640px; }
.footer-news-line { font-family: var(--serif); font-size: 22px; line-height: 1.3; color: var(--text); margin: 8px 0 16px; }
.news-form { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.news-form input[type='email'] {
  width: 100%; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: #0a0908; color: var(--text); font: inherit; font-size: 16px;
}
.news-form input[type='email']:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 180, 90, 0.12); }
.news-join:disabled { opacity: 0.6; cursor: progress; }
.news-trap { position: absolute; left: -10000px; top: 0; width: 1px; height: 1px; overflow: hidden; }
.news-status { grid-column: 1 / -1; margin: 2px 0 0; font-size: 13px; line-height: 1.45; color: var(--muted); }
.news-status:empty { display: none; }
.news-status[data-tone='ok'] { color: var(--gold-hi); }
.news-status[data-tone='bad'] { color: #ffa395; }
.news-fine { margin: 10px 0 0; font-size: 12px; color: var(--gold-dim); }
.menu-news { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* The newsletter desk (v0.31, /desk, the owner's only): "From Spark" for the next issue, a preview, a test copy. */
.dk-body { max-width: 760px; }
.dk-next { margin: 0 0 22px; font-size: 12px; letter-spacing: 0.08em; color: var(--gold-hi); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; }
.dk { display: grid; gap: 22px; }
.dk-set { margin: 0; padding: 0; border: 0; display: grid; gap: 8px; min-width: 0; }
.dk-set legend { margin: 0 0 8px; padding: 0; }
.dk-item { display: grid; gap: 6px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.dk-in {
  width: 100%; min-width: 0; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: #0a0908; color: var(--text); font: inherit; font-size: 16px; line-height: 1.5; resize: vertical;
}
.dk-in:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 180, 90, 0.12); }
.dk-title { font-family: var(--serif); font-size: 19px; }
.dk-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dk-actions .btn:disabled { opacity: 0.6; cursor: progress; }
.dk-status { margin: 0; min-height: 1.4em; font-size: 14px; color: var(--muted); }
.dk-status[data-tone='ok'] { color: var(--gold-hi); }
.dk-status[data-tone='bad'] { color: #ffa395; }
.dk-status a { color: var(--gold); }
.dk-log { margin-top: 40px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.dk-last { margin: 6px 0 10px; }
.dk-history { margin: 0; padding-left: 18px; }
.dk-history li { margin: 4px 0; }
.dk-history .mono { color: var(--gold-dim); font-size: 12px; margin-right: 6px; }
.menu-account-desk { display: block; margin: 8px 0 4px; }
.menu-news .eyebrow { margin: 0 0 8px; }


/* ---------- controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(217, 180, 90, 0.04);
  color: var(--gold-hi); text-decoration: none; cursor: pointer;
  font-size: 12px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { background: rgba(217, 180, 90, 0.1); border-color: var(--gold); }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--gold-grad); color: #1a1407; border-color: transparent; font-weight: 600; }
.btn-gold:hover { background: var(--gold-grad); filter: brightness(1.08); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; width: fit-content;
  font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold);
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 5px 11px;
  background: rgba(11, 10, 9, 0.6);
}
.chip-link { text-decoration: none; transition: background 0.2s, color 0.2s; }
.chip-link:hover { background: rgba(217, 180, 90, 0.12); color: var(--gold-hi); }
.chips-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.search { display: flex; gap: 10px; width: 100%; max-width: 760px; margin-top: 24px; }
.search input {
  flex: 1; min-width: 0; min-height: 50px; padding: 0 22px;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 999px;
  font: inherit; font-size: 16px;
}
.search input::placeholder { color: #7d7566; }
.search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217, 180, 90, 0.12); }

.loading { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; padding: 32px 0; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(217, 180, 90, 0.6); animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(217, 180, 90, 0.55); } 70% { box-shadow: 0 0 0 14px rgba(217, 180, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(217, 180, 90, 0); } }

.error-block { padding: 32px 0; color: var(--muted); }
.error-block p { margin: 0 0 14px; }

/* ---------- today ---------- */

.hero {
  display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(28px, 5vw, 72px);
  align-items: center; min-height: calc(88vh - var(--topbar)); padding: 88px 0 24px;
}
.hero > .loading, .hero > .error-block { grid-column: 1 / -1; }
.hero-title {
  font-size: clamp(40px, 6.2vw, 84px);
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.08em;
}
.hero-maker { font-family: var(--serif); font-size: clamp(20px, 2.2vw, 26px); margin: 18px 0 4px; }
.hero-medium { color: var(--muted); margin: 0; font-size: 15px; }
.display.title-long { font-size: clamp(28px, 3vw, 42px); line-height: 1.12; }
.hero-title.title-long { font-size: clamp(32px, 3.6vw, 52px); }
.title-sub { font-family: var(--serif); font-style: italic; font-size: 18px; line-height: 1.4; color: var(--muted); margin: 12px 0 0; max-width: 52ch; }

.hero-art { margin: 0; position: relative; display: flex; flex-direction: column; align-items: center; }
.hero-art img {
  width: auto; max-width: 100%; max-height: 72vh; object-fit: contain;
  border: 1px solid var(--line); border-radius: 6px; background: #0e0d0b;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.9), 0 0 0 10px rgba(217, 180, 90, 0.03);
}
.hero-art figcaption { margin-top: 12px; font-size: 11px; color: var(--gold-dim); text-align: center; }

.manifesto { text-align: center; padding: 72px 0 56px; border-top: 1px solid var(--line); }
.manifesto .display { font-size: clamp(30px, 4.4vw, 56px); }
.manifesto em { font-style: italic; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.manifesto .lede { margin: 22px auto 0; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; text-decoration: none; overflow: hidden; min-width: 0;
  transition: border-color 0.25s, transform 0.25s;
}
a.card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.card-title { font-size: 34px; color: var(--gold-hi); }
.card-text { color: var(--text); font-size: 15px; }
.card-meta { font-size: 11px; color: var(--gold-dim); margin-top: auto; }

.card-tour { padding: 0; }
.card-img { display: block; aspect-ratio: 16 / 10; background: #0e0d0b; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s; }
.card-tour:hover .card-img img { transform: scale(1.03); }
.card-tour .card-body { display: flex; flex-direction: column; gap: 10px; padding: 22px; flex: 1; }
.card-tour .card-title { font-size: 44px; letter-spacing: 0.04em; }

.otd-img { display: block; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #0e0d0b; }
.otd-img img { width: 100%; height: 100%; object-fit: cover; filter: sepia(0.25) saturate(0.9); }
.otd-text { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.35; }

.guide-mini { width: 108px; height: 108px; margin: 6px 0; }

.ask { display: flex; justify-content: center; padding: 56px 0 0; }

/* ---------- page head ---------- */

.page-head { padding: 92px 0 36px; }
.page-head .display { font-size: clamp(38px, 5.6vw, 72px); color: var(--gold-hi); }

/* ---------- tours ---------- */

.tour-list { display: grid; gap: 24px; }
.tour-row {
  display: grid; grid-template-columns: 1fr 1.1fr; overflow: hidden; text-decoration: none;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.25s;
}
.tour-row:hover { border-color: var(--line-strong); }
.tour-row-img { min-height: 320px; background: #0e0d0b; }
.tour-row-img img { width: 100%; height: 100%; object-fit: cover; }
.tour-row-body { display: flex; flex-direction: column; gap: 14px; padding: clamp(22px, 3vw, 40px); }
.tour-row-title { font-size: clamp(44px, 5vw, 68px); letter-spacing: 0.05em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tour-row-sub { font-family: var(--serif); font-size: 24px; line-height: 1.3; }
.tour-row-stops { font-size: 11.5px; color: var(--muted); line-height: 1.9; }
.tour-row .btn { width: fit-content; margin-top: 8px; }

/* ---------- tour player ---------- */

.tour {
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(20px, 3vw, 48px);
  margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter);
}
.tour-stage {
  position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar));
  display: flex; align-items: center; justify-content: center; padding: 28px 0;
}
.stage-figure { margin: 0; height: 100%; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.stage-figure img {
  max-height: calc(100% - 36px); max-width: 100%; object-fit: contain;
  border-radius: 4px; box-shadow: 0 50px 140px -40px rgba(0, 0, 0, 0.95), 0 0 80px rgba(217, 180, 90, 0.06);
}
.stage-figure figcaption { margin-top: 14px; font-size: 11px; }
.stage-figure figcaption a { color: var(--gold-dim); text-decoration: none; }
.stage-figure figcaption a:hover { color: var(--gold); }

.tour-panel { padding: 32px 0 40px; min-width: 0; }
.tour-top { display: flex; justify-content: space-between; align-items: center; font-size: 12px; margin-bottom: 16px; }
.back { color: var(--gold); text-decoration: none; letter-spacing: 0.2em; text-transform: uppercase; font-size: 11px; }
.back:hover { color: var(--gold-hi); }

.rail { list-style: none; padding: 0; margin: 0 0 30px; display: flex; gap: 6px; }
.rail li { flex: 1; }
.rail a { display: block; height: 18px; position: relative; }
.rail a::after { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 3px; border-radius: 3px; background: rgba(217, 180, 90, 0.16); transition: background 0.3s; }
.rail a.is-done::after { background: var(--gold-dim); }
.rail a.is-here::after { background: var(--gold-grad); box-shadow: 0 0 12px rgba(217, 180, 90, 0.5); }
.rail a:hover::after { background: var(--gold); }

.tour-title { font-size: clamp(32px, 3.6vw, 50px); color: var(--gold-hi); }
.tour-maker { font-family: var(--serif); font-size: 21px; margin: 12px 0 0; color: var(--text); }

.player { display: flex; align-items: center; gap: 14px; margin: 28px 0 12px; }
.icon-btn {
  width: 48px; height: 48px; flex: none; display: grid; place-items: center;
  border-radius: 50%; border: 1px solid var(--line-strong); color: var(--gold-hi);
  text-decoration: none; font-size: 18px; transition: border-color 0.2s, background 0.2s;
}
.icon-btn:hover { border-color: var(--gold); background: rgba(217, 180, 90, 0.08); }
.icon-btn.is-disabled { opacity: 0.3; }
.play {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 56px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--gold-grad); color: #1a1407;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  box-shadow: 0 10px 40px -10px rgba(217, 180, 90, 0.55);
}
.play[aria-pressed='true'] { background: transparent; color: var(--gold-hi); border: 1px solid var(--gold); box-shadow: none; }
.play-icon { font-size: 14px; letter-spacing: 0; }

.toggle { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); cursor: pointer; }
.toggle input { accent-color: var(--gold); width: 16px; height: 16px; }

.take { margin: 30px 0 26px; }
.take p:not(.eyebrow) {
  font-family: var(--serif); font-size: 21px; line-height: 1.55; margin: 0 0 16px;
  padding-left: 16px; border-left: 2px solid transparent; transition: color 0.3s, border-color 0.3s;
}
.take p.speaking { color: var(--gold-hi); border-left-color: var(--gold); }

.panel-box { border: 1px solid var(--line); border-radius: 14px; padding: 0 18px; margin-top: 14px; background: rgba(21, 18, 15, 0.6); }
.panel-box summary {
  cursor: pointer; list-style: none; padding: 16px 0;
  font-size: 11px; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold);
  display: flex; justify-content: space-between; align-items: center;
}
.panel-box summary::-webkit-details-marker { display: none; }
.panel-box summary::after { content: '+'; font-size: 18px; letter-spacing: 0; color: var(--gold-dim); }
.panel-box[open] summary::after { content: '−'; }
.panel-box > div, .panel-box > dl, .panel-box > p { padding-bottom: 16px; }
.panel-box .link { display: inline-block; margin-top: 4px; }

.facts-list { margin: 0; display: grid; gap: 10px; }
.facts-list div { display: grid; grid-template-columns: 120px 1fr; gap: 12px; font-size: 14px; }
.facts-list dt { color: var(--muted); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; padding-top: 2px; }
.facts-list dd { margin: 0; }

.receipt-list { margin: 0; display: grid; gap: 8px; font-size: 12px; }
.receipt-list div { display: grid; grid-template-columns: 130px 1fr; gap: 12px; border-bottom: 1px dashed rgba(217, 180, 90, 0.14); padding-bottom: 8px; }
.receipt-list dt { color: var(--gold-dim); }
.receipt-list dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.receipt-list a { color: var(--gold); }
.receipt .small { margin: 12px 0 0; }

.tour-end { margin-top: 36px; padding: 28px; border: 1px solid var(--line-strong); border-radius: var(--radius); text-align: center; }
.tour-end .display { font-size: 34px; color: var(--gold-hi); margin-bottom: 16px; }

/* ---------- explore ---------- */

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 22px; }
.grid > .loading, .grid > .error-block, .grid > .empty { grid-column: 1 / -1; }
.empty .display { font-size: 30px; color: var(--gold-hi); }

.art-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; min-width: 0; }
.art-card-img { display: block; aspect-ratio: 4 / 5; background: #0e0d0b; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.art-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s, filter 0.3s; filter: saturate(0.92); }
.art-card:hover .art-card-img img { transform: scale(1.04); filter: saturate(1.05); }
.art-card-meta { display: flex; flex-direction: column; gap: 3px; }
.art-card-title { font-family: var(--serif); font-size: 19px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.art-card-maker { font-size: 13px; color: var(--muted); }

/* ---------- artwork ---------- */

.art { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 4vw, 64px); padding: 92px 0 0; align-items: start; }
.art > .loading, .art > .error-block { grid-column: 1 / -1; }
.art-figure { margin: 0; position: sticky; top: calc(var(--topbar) + 24px); }
.art-figure img { width: 100%; max-height: calc(100vh - var(--topbar) - 90px); object-fit: contain; border-radius: 4px; box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.9); }
.art-figure figcaption { margin-top: 12px; font-size: 11px; }
.art-figure figcaption a { color: var(--gold-dim); text-decoration: none; }
.no-image { aspect-ratio: 4 / 3; display: grid; place-items: center; border: 1px dashed var(--line-strong); border-radius: 14px; }
.art-title { font-size: clamp(34px, 4vw, 56px); color: var(--gold-hi); }
.art-maker { font-family: var(--serif); font-size: 22px; margin: 14px 0 0; }
.section-label { margin-top: 36px; }
.tour-callout {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; padding: 14px 16px;
  border: 1px solid var(--line-strong); border-radius: 14px; text-decoration: none; font-size: 14px; color: var(--gold-hi);
  background: rgba(217, 180, 90, 0.05);
}

/* ---------- guides ---------- */

.passports { display: grid; gap: 24px; }
.passport {
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: clamp(22px, 3vw, 40px);
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(217, 180, 90, 0.07), transparent 60%),
    linear-gradient(180deg, var(--panel-2), var(--panel));
  max-width: 880px;
}
.passport-head { display: flex; gap: 24px; align-items: center; margin-bottom: 26px; }
.passport-sigil { width: 120px; height: 120px; flex: none; }
.passport-name { font-size: clamp(44px, 5vw, 64px); letter-spacing: 0.06em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.passport-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 28px 0; }
.passport-cols p:not(.eyebrow) { margin: 0; font-size: 15px; }
.pact { margin: 0 0 28px; padding-left: 22px; font-family: var(--serif); font-size: 20px; line-height: 1.45; }
.pact li { margin-bottom: 8px; padding-left: 6px; }
.pact li::marker { color: var(--gold); font-family: var(--mono); font-size: 13px; }

.sigil { width: 100%; height: 100%; }
.sigil .frame { fill: none; stroke: var(--line-strong); stroke-width: 1; }
.sigil .ring { fill: none; stroke: var(--gold-dim); stroke-width: 0.8; stroke-dasharray: 2 3; }
.sigil .web { fill: rgba(217, 180, 90, 0.06); stroke: var(--gold-dim); stroke-width: 0.6; }
.sigil line { stroke: var(--gold); stroke-width: 1.2; stroke-linecap: round; }
.sigil .dot { fill: var(--gold-hi); }
.sigil .core { fill: var(--violet); filter: drop-shadow(0 0 4px var(--violet)); }

/* ---------- pick your guide ---------- */

.section-head { margin-bottom: 28px; }
.section-head .display { font-size: clamp(34px, 4.4vw, 56px); color: var(--gold-hi); }
.picks { padding: 8px 0 56px; }
.picks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.pick {
  display: flex; flex-direction: column; overflow: hidden; min-width: 0;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.25s;
}
.pick:hover { border-color: var(--line-strong); }
.pick-cover { display: block; aspect-ratio: 16 / 9; background: #0e0d0b; overflow: hidden; }
.pick-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s; }
.pick:hover .pick-cover img { transform: scale(1.03); }
.pick-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 26px; flex: 1; }
.pick-guide { display: flex; align-items: center; gap: 14px; }
.pick-guide .eyebrow { margin-bottom: 4px; }
.pick-sigil { width: 64px; height: 64px; flex: none; }
.pick-name { font-size: 32px; letter-spacing: 0.06em; text-decoration: none; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pick-style { margin: 0; color: var(--muted); font-size: 15px; font-style: italic; font-family: var(--serif); font-size: 19px; line-height: 1.4; }
.pick-tour { font-size: clamp(30px, 3vw, 40px); letter-spacing: 0.04em; color: var(--gold-hi); margin-top: 6px; }
.pick-sub { margin: 0; font-size: 15px; }
.pick .actions { margin-top: 10px; }

/* ---------- audio-guide keypad ---------- */

.keypad { display: grid; gap: 12px; max-width: 320px; }
.keypad-screen {
  width: 100%; min-height: 54px; text-align: center; font-size: 28px; letter-spacing: 0.4em;
  background: #0a0908; color: var(--gold-hi); border: 1px solid var(--line-strong); border-radius: 12px;
  box-shadow: inset 0 0 24px rgba(217, 180, 90, 0.08);
}
.keypad-screen::placeholder { color: rgba(217, 180, 90, 0.35); }
.keypad-screen:focus { outline: none; border-color: var(--gold); }
.keypad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.key {
  min-height: 46px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer;
  background: rgba(217, 180, 90, 0.04); color: var(--text); font-family: var(--mono); font-size: 17px;
  transition: background 0.15s, border-color 0.15s;
}
.key:hover { background: rgba(217, 180, 90, 0.12); border-color: var(--line-strong); }
.key:active { transform: translateY(1px); }
.key-go { background: var(--gold-grad); color: #1a1407; border-color: transparent; font-weight: 600; }
.keypad .small { margin: 0; }
.card-keypad .keypad { max-width: none; }
.keypad-section { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; margin-top: 56px; padding: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.keypad-section .display { font-size: clamp(30px, 3.4vw, 44px); color: var(--gold-hi); }

.card-door { background: radial-gradient(400px 220px at 100% 0%, rgba(139, 124, 246, 0.12), transparent 60%), linear-gradient(180deg, var(--panel-2), var(--panel)); }
.door-glyph { font-family: var(--mono); font-size: 44px; color: var(--violet); letter-spacing: 0.1em; margin: 8px 0 4px; text-shadow: 0 0 24px rgba(139, 124, 246, 0.5); }

/* ---------- tour intro ---------- */

.tour-intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 4vw, 56px); padding: 92px 0 20px; align-items: center; }
.tour-intro-cover { aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: #0e0d0b; border: 1px solid var(--line); }
.tour-intro-cover img { width: 100%; height: 100%; object-fit: cover; }
.tour-intro-body .back { display: inline-block; margin-bottom: 18px; }
.tour-intro-title { font-size: clamp(46px, 6vw, 84px); letter-spacing: 0.04em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: 0.05em; }
.tour-intro-sub { font-family: var(--serif); font-size: 24px; line-height: 1.3; margin: 12px 0 0; }
.guide-line { display: flex; align-items: center; gap: 16px; margin-top: 26px; padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(21, 18, 15, 0.6); }
.guide-line .eyebrow { margin-bottom: 2px; }
.guide-line-sigil { width: 64px; height: 64px; flex: none; }
.guide-line-name { font-size: 28px; letter-spacing: 0.06em; color: var(--gold-hi); text-decoration: none; }
.guide-line p { margin: 2px 0 0; }

.stop-list { padding-top: 28px; }
.stop-list ol { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.stop-row {
  display: grid; grid-template-columns: 64px 72px 1fr auto; gap: 18px; align-items: center; padding: 12px 18px 12px 14px;
  border: 1px solid var(--line); border-radius: 16px; text-decoration: none; background: rgba(21, 18, 15, 0.5); transition: border-color 0.2s, background 0.2s;
}
.stop-row:hover { border-color: var(--line-strong); background: rgba(217, 180, 90, 0.05); }
.stop-code { font-size: 20px; color: var(--gold); text-align: center; border-right: 1px solid var(--line); }
.stop-thumb { width: 72px; height: 56px; border-radius: 8px; overflow: hidden; background: #0e0d0b; }
.stop-thumb img { width: 100%; height: 100%; object-fit: cover; }
.stop-text { display: flex; flex-direction: column; min-width: 0; }
.stop-label { font-family: var(--serif); font-size: 22px; color: var(--gold-hi); }
.stop-title { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stop-go { color: var(--gold-dim); font-size: 20px; }

.code-badge { display: inline-block; font-size: 11px; letter-spacing: 0.1em; color: #1a1407; background: var(--gold-grad); border-radius: 5px; padding: 1px 6px 0; margin-right: 8px; }
.player-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; }
.link-btn { background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--gold); font-size: 13px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--gold-hi); }
.take .eyebrow a { color: inherit; }
.actions-center { justify-content: center; }

/* ---------- guides ---------- */

.passports { grid-template-columns: repeat(auto-fit, minmax(min(100%, 520px), 1fr)); align-items: start; }
.passport { max-width: none; }
.passport-sigil { display: block; }
.passport-style { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.4; margin: -6px 0 22px; color: var(--text); }
.passports-foot { margin-top: 20px; }
.page-head-tight { padding: 92px 0 18px; }

/* ---------- for AIs ---------- */

.ai-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; }
.ai-files, .ai-pact, .ai-verify { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 34px); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.file-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.file-list li { display: grid; gap: 3px; padding-bottom: 14px; border-bottom: 1px dashed rgba(217, 180, 90, 0.14); }
.file-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.file-list a { color: var(--gold-hi); font-size: 14px; text-decoration: none; overflow-wrap: anywhere; }
.file-list a:hover { color: var(--gold); text-decoration: underline; }
.file-list span { color: var(--muted); font-size: 14px; }
.ai-verify { margin-top: 28px; }
.code { background: #080706; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; overflow-x: auto; font-size: 13px; line-height: 1.7; color: var(--gold-hi); margin: 14px 0; }

.footer-links { margin-top: 16px !important; font-size: 12px !important; font-family: var(--mono) !important; color: var(--gold-dim) !important; }
.footer-links a { color: var(--gold); text-decoration: none; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 95; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--panel-2); color: var(--gold-hi); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 12px 20px; font-size: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6); transition: opacity 0.25s, transform 0.25s;
  max-width: calc(100vw - 32px); overflow-wrap: anywhere;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- the living homepage ---------- */

.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ff5a4f; box-shadow: 0 0 0 0 rgba(255, 90, 79, 0.6); animation: live 1.8s infinite; vertical-align: middle; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(255, 90, 79, 0.55); } 70% { box-shadow: 0 0 0 9px rgba(255, 90, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 90, 79, 0); } }

/* The stage: a full-screen, auto-rotating "now showing" wall. */
.stage {
  position: relative; overflow: hidden; isolation: isolate;
  height: min(100svh, 1000px); min-height: 560px;
  width: 100vw; margin-left: calc(50% - 50vw);
  background: #060505; touch-action: pan-y;
}
.stage-loading { position: absolute; inset: 0; display: grid; place-items: center; }
/* Today's masthead (v0.26): the day's number as a paper prints it at its head, set between hairline rules across the
   top of the stage, centred between the menu and Sign in; on a phone, at the top left beside Sign in, on two lines. */
.masthead {
  position: absolute; z-index: 4; top: 18px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; min-height: 46px; margin: 0; padding: 0 20px;
  white-space: nowrap; pointer-events: none;
  font-family: var(--serif); font-size: 15px; line-height: 1.3; letter-spacing: 0.06em; color: var(--gold-hi);
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.9), 0 0 3px rgba(0, 0, 0, 0.7);
}
.masthead::before, .masthead::after {
  content: ''; position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgb(217 180 90 / 0.55) 16%, rgb(217 180 90 / 0.55) 84%, transparent);
}
.masthead::before { top: 7px; }
.masthead::after { bottom: 7px; }
.mh-sep { white-space: pre; } /* a flex row would drop the spaces around the dot */
.mh-date { font-style: italic; }
.mh-day { white-space: nowrap; }
@media (max-width: 1060px) { .masthead { font-size: 14px; letter-spacing: 0.03em; padding: 0 14px; } }
/* Below 1000px: beside the menu, clear of Sign in, and onto a second line rather than into it (a wide fallback font).
   --acct-room is the room Sign in takes at the right of the masthead's box (measured by the page, whatever the font or
   whoever is signed in); without it, the fixed allowance it replaced. */
@media (max-width: 1000px) { .masthead { left: 176px; transform: none; max-width: calc(100% - 190px - var(--acct-room, 230px)); flex-wrap: wrap; white-space: normal; padding: 9px 14px; font-size: 13px; } }
@media (max-width: 760px) {
  .masthead {
    top: calc(12px + env(safe-area-inset-top)); left: 16px; transform: none; max-width: calc(100% - 30px - var(--acct-room, 186px));
    min-height: 38px; padding: 4px 0; flex-direction: column; align-items: flex-start; justify-content: center;
    /* a touch smaller than before v0.29 (11.5–13px), so with the room Sign in leaves it stays on two lines: measured
       with GitHub's fallback fonts at 360px, two lines (it was three, and the stage's art lost its room), 19px clear */
    white-space: normal; font-size: clamp(10px, 3.1vw, 12px); line-height: 1.25; letter-spacing: 0.02em;
  }
  .mh-sep { display: none; }
  .masthead::before, .masthead::after { background: linear-gradient(90deg, rgb(217 180 90 / 0.55), transparent); }
  .masthead::before { top: 0; }
  .masthead::after { bottom: 0; }
}
.stage:not(.is-loading) .stage-loading { display: none; }
.stage-slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.9s ease, visibility 0.9s; }
.slide.is-active { opacity: 1; visibility: visible; z-index: 1; }
.slide-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.slide.is-active .slide-bg { animation: kenburns 14s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1.06) translate3d(0, 0, 0); } to { transform: scale(1.16) translate3d(-1.5%, -1%, 0); } }
.slide-art .slide-bg { filter: blur(38px) saturate(1.2) brightness(0.45); transform: scale(1.2); }
.slide-art.is-active .slide-bg { animation: none; }
.slide-shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(6, 5, 5, 0.92) 0%, rgba(6, 5, 5, 0.65) 38%, rgba(6, 5, 5, 0.1) 70%),
  linear-gradient(0deg, rgba(6, 5, 5, 0.85) 0%, rgba(6, 5, 5, 0) 45%); }
.slide.is-imageless { background: radial-gradient(900px 500px at 70% 30%, rgba(217, 180, 90, 0.14), transparent 60%), radial-gradient(700px 500px at 20% 80%, rgba(139, 124, 246, 0.12), transparent 60%), #0b0a09; }
.slide-art .slide-art {
  position: absolute; right: max(var(--gutter), 5vw); top: 12%; bottom: 16%; width: 44%; margin: 0;
  display: flex; align-items: center; justify-content: center;
}
.slide-art .slide-art img {
  max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px;
  box-shadow: 0 50px 140px -30px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(217, 180, 90, 0.12);
}
.slide.is-active .slide-art img { animation: float-in 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes float-in { from { opacity: 0; transform: translateY(18px) scale(0.985); } to { opacity: 1; transform: none; } }
.slide-content {
  position: absolute; left: max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))); bottom: 120px;
  width: min(620px, 46%); z-index: 2;
}
.slide-photo .slide-content { width: min(760px, 62%); }
.slide.is-active .slide-content > * { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.slide.is-active .slide-content > :nth-child(2) { animation-delay: 0.08s; }
.slide.is-active .slide-content > :nth-child(3) { animation-delay: 0.16s; }
.slide.is-active .slide-content > :nth-child(4) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.slide-kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 16px; font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); }
.kicker-dot { width: 18px; height: 1px; background: var(--gold); }
.slide-title {
  font-size: clamp(34px, 4.6vw, 70px); line-height: 1.04; color: var(--gold-hi); text-wrap: balance;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; padding-bottom: 0.06em;
  text-shadow: 0 4px 40px rgba(0, 0, 0, 0.5);
}
.slide-sub { margin: 14px 0 0; font-family: var(--serif); font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.slide-content .actions { margin-top: 24px; }
.slide-credit { margin: 16px 0 0; font-size: 10.5px; color: var(--muted); letter-spacing: 0.04em; }

.stage-ui {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3;
  padding: 0 max(var(--gutter), calc((100% - 1280px) / 2 + var(--gutter))) 34px;
  display: flex; align-items: center; gap: 22px;
}
.stage-segs { flex: 1; display: flex; gap: 6px; min-width: 0; }
.seg { flex: 1; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; position: relative; }
.seg::before, .seg i { content: ''; position: absolute; left: 0; right: 0; top: 10px; height: 2px; border-radius: 2px; }
.seg::before { background: rgba(237, 231, 218, 0.18); }
.seg i { background: var(--gold-grad); transform: scaleX(0); transform-origin: left; }
.seg.is-done i { transform: scaleX(1); }
.seg.is-active i { animation: segfill 9s linear forwards; }
.stage.paused .seg.is-active i { animation-play-state: paused; }
@keyframes segfill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.stage-controls { display: flex; align-items: center; gap: 10px; flex: none; }
.stage-live { font-size: 10.5px; letter-spacing: 0.2em; color: #ff8a80; margin-right: 8px; }
.stage-count { font-size: 11px; color: var(--muted); margin-right: 6px; }
.stage-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); cursor: pointer;
  background: rgba(11, 10, 9, 0.5); color: var(--gold-hi); font-size: 14px; backdrop-filter: blur(8px);
}
.stage-btn:hover { border-color: var(--gold); background: rgba(21, 18, 15, 0.85); }

/* The ticker: headlines rolling by, like a newsroom crawl. */
.ticker {
  display: flex; align-items: center; gap: 0; height: 46px; overflow: hidden;
  width: 100vw; margin-left: calc(50% - 50vw); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: rgba(16, 14, 12, 0.9);
}
.ticker-label { flex: none; display: flex; align-items: center; gap: 10px; height: 100%; padding: 0 18px 0 var(--gutter); font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); border-right: 1px solid var(--line); background: #0b0a09; }
.ticker-window { flex: 1; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent); }
.ticker-run { display: flex; width: max-content; animation: ticker var(--ticker-dur, 90s) linear infinite; }
.ticker:hover .ticker-run { animation-play-state: paused; }
.ticker-run > div { display: flex; align-items: center; white-space: nowrap; }
.ticker-run a { color: var(--text); text-decoration: none; font-size: 13.5px; padding: 0 4px; }
.ticker-run a:hover { color: var(--gold-hi); }
.ticker-run a b { color: var(--gold); font-weight: 500; margin-right: 6px; }
.ticker-run a span { color: var(--muted); font-size: 12px; margin-left: 4px; }
.ticker-run i { color: var(--gold-dim); font-style: normal; padding: 0 18px; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.picks { padding-top: 72px; }
.section-head em { font-style: italic; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.section-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 32px; }

/* The wire. */
.wire { padding: 16px 0 64px; }
.wire .eyebrow .live-dot { margin-right: 6px; }
.wire-meta { margin: 12px 0 0; font-size: 11.5px; color: var(--gold-dim); }
.wire-filters { margin-top: 0; }
.chip-link[aria-selected='true'] { background: var(--gold-grad); color: #1a1407; border-color: transparent; }
.wire-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.wire-grid > .loading, .wire-grid > p { grid-column: 1 / -1; }
.wire-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; min-width: 0;
  border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, var(--panel-2), var(--panel));
  transition: border-color 0.2s, transform 0.2s;
}
.wire-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.wire-img { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #0e0d0b; }
.wire-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.wire-card:hover .wire-img img { transform: scale(1.04); }
.wire-card.no-img .wire-img { display: none; }
.wire-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 18px; }
.wire-src { font-size: 10.5px; letter-spacing: 0.06em; color: var(--gold-dim); text-transform: uppercase; }
.new-badge { display: inline-block; margin-right: 8px; padding: 1px 6px; border-radius: 4px; background: #ff5a4f; color: #fff; font-weight: 600; letter-spacing: 0.08em; }
.wire-title { font-family: var(--serif); font-size: 21px; line-height: 1.25; color: var(--text); }
.wire-card:hover .wire-title { color: var(--gold-hi); }
.wire-sum { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wire-card.no-img .wire-title { font-size: 24px; }

/* Every kind of art. */
.kinds { padding: 16px 0 64px; }
.kinds-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 8px; margin: 0 0 22px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.kinds-chips .chip { flex: none; }
.kinds-chips:not(.at-end) { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
.art-card-img { position: relative; }
.art-card-dept { position: absolute; left: 10px; top: 10px; z-index: 1; max-width: calc(100% - 20px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-hi); background: rgba(11, 10, 9, 0.78); border: 1px solid var(--line); border-radius: 999px; padding: 3px 9px; }
.kinds-more { display: flex; justify-content: center; margin-top: 28px; }

/* Play: guess the century. */
.game { padding: 16px 0 64px; }
.play-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0; overflow: hidden;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  background: radial-gradient(600px 300px at 100% 0%, rgba(139, 124, 246, 0.1), transparent 60%), linear-gradient(180deg, var(--panel-2), var(--panel));
}
.play-art { min-height: 440px; background: #080706; display: flex; align-items: center; justify-content: center; padding: 28px; }
.play-art img { max-width: 100%; max-height: 520px; object-fit: contain; border-radius: 3px; box-shadow: 0 30px 90px -30px rgba(0, 0, 0, 0.9); }
.play-body { padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; gap: 10px; }
.play-body .display { font-size: clamp(32px, 3.4vw, 46px); color: var(--gold-hi); }
.play-body > .muted { margin: 0 0 8px; }
.play-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.option {
  min-height: 58px; padding: 10px 14px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 1px solid var(--line-strong); background: rgba(217, 180, 90, 0.04); color: var(--text);
  font-family: var(--serif); font-size: 20px; transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.option:hover:not(:disabled) { background: rgba(217, 180, 90, 0.12); border-color: var(--gold); transform: translateY(-1px); }
.option.is-right { background: rgba(88, 196, 130, 0.16); border-color: #58c482; color: #c9f5d9; }
.option.is-wrong { background: rgba(255, 90, 79, 0.14); border-color: #ff5a4f; color: #ffd0cc; }
.option:disabled:not(.is-right):not(.is-wrong) { opacity: 0.45; }
.play-reveal { margin-top: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.play-reveal p { margin: 0 0 6px; }
.reveal-verdict { font-size: 30px; color: var(--gold-hi); }
.play-stats { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: auto; padding-top: 14px; font-size: 11.5px; color: var(--gold-dim); }
.play-stats b { color: var(--gold-hi); }

/* The almanac. */
.almanac { padding: 16px 0 64px; }
.almanac-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.almanac-grid > .loading, .almanac-grid > p { grid-column: 1 / -1; }
.almanac-col { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.almanac-col ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 14px; }
.almanac-col li { font-family: var(--serif); font-size: 18.5px; line-height: 1.4; padding-bottom: 14px; border-bottom: 1px dashed rgba(217, 180, 90, 0.14); }
.almanac-col li:last-child { border-bottom: 0; padding-bottom: 0; }
.almanac-col a { color: var(--text); text-decoration: none; }
.almanac-col a:hover { color: var(--gold-hi); }
.almanac-col .link { color: var(--gold); font-family: var(--sans); }
.almanac-col .year { color: var(--gold); font-size: 13px; margin-right: 6px; }

.tools { padding-bottom: 8px; }
.search-stack { flex-direction: column; margin-top: 8px; }
.search-stack .btn { width: 100%; }

/* ---------- the lens: what homepage artworks do under a pointer, a finger or a key ---------- */
.lens { --rx: 0deg; --ry: 0deg; --gx: 50%; --gy: 50%; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.lens.is-tilting { transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 0.12s linear; }
.lens-img { cursor: zoom-in; }
.lens-glare, .lens-loupe, .lens-dock, .lens-facts, .lens-hint { position: absolute; z-index: 3; }
.lens-glare {
  left: var(--lx, 0); top: var(--ly, 0); width: var(--lw, 0); height: var(--lh, 0); border-radius: 3px; pointer-events: none; opacity: 0; transition: opacity 0.35s;
  background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 244, 214, 0.32), rgba(255, 244, 214, 0) 55%); mix-blend-mode: soft-light;
}
.lens.is-tilting .lens-glare { opacity: 1; }
.lens-loupe {
  left: 0; top: 0; width: 190px; height: 190px; border-radius: 50%; pointer-events: none; opacity: 0; transform: scale(0.85);
  transition: opacity 0.15s, transform 0.15s; background-color: #0b0a09; background-repeat: no-repeat;
  border: 2px solid rgba(243, 222, 160, 0.85); box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65), inset 0 0 0 1px rgba(0, 0, 0, 0.5);
}
.lens.loupe-on .lens-img { cursor: none; }
.lens.loupe-visible .lens-loupe { opacity: 1; transform: none; }
.lens-dock {
  left: calc(var(--lx, 0px) + var(--lw, 0px) / 2); top: calc(var(--ly, 0px) + var(--lh, 0px) - 64px); transform: translate(-50%, 8px);
  display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: rgba(11, 10, 9, 0.74); border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px); opacity: 0; transition: opacity 0.25s, transform 0.25s;
}
.lens:hover .lens-dock, .lens:focus-within .lens-dock { opacity: 1; transform: translate(-50%, 0); }
.lens-dock button {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  color: var(--gold-hi); font: 500 10.5px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap;
}
.lens-dock button span { font-size: 14px; letter-spacing: 0; text-transform: none; }
.lens-dock button span.glyph-i { font-family: var(--serif); font-style: italic; font-size: 17px; font-weight: 600; }
.lens-dock button:hover, .lens-dock button[aria-pressed='true'] { background: rgba(217, 180, 90, 0.18); }
.lens-dock button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.lens-facts {
  left: calc(var(--lx, 0px) + 14px); top: calc(var(--ly, 0px) + 14px); width: min(320px, calc(var(--lw, 320px) - 28px)); max-height: calc(var(--lh, 400px) - 92px); overflow: auto;
  padding: 14px 16px; border-radius: 12px; background: rgba(11, 10, 9, 0.88); border: 1px solid var(--line-strong); backdrop-filter: blur(10px); font-size: 12.5px;
}
.lens-facts .eyebrow { margin: 0 0 8px; font-size: 9.5px; }
.lens-facts .facts-list { margin: 0; }
.lens-facts .facts-list { gap: 6px; }
.lens-facts .facts-list div { grid-template-columns: 86px 1fr; gap: 8px; font-size: 12.5px; }
.lens-facts .facts-list dt { font-size: 9.5px; }
.lens-hint {
  left: calc(var(--lx, 0px) + var(--lw, 0px) / 2); top: calc(var(--ly, 0px) + 14px); transform: translateX(-50%); margin: 0; padding: 6px 12px; border-radius: 999px;
  background: rgba(11, 10, 9, 0.82); color: var(--gold-hi); font-size: 10.5px; letter-spacing: 0.06em; white-space: nowrap; opacity: 0; transition: opacity 0.4s; pointer-events: none;
}
.lens.show-hint .lens-hint { opacity: 1; }
@media (hover: none) {
  .lens-dock { opacity: 1; transform: translate(-50%, 0); top: calc(var(--ly, 0px) + var(--lh, 0px) - 52px); }
  .lens-dock button { padding: 0 11px; }
  .lens-dock button b, .lens-dock .lens-loupe-btn, .lens-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lens, .lens.is-tilting { transform: none !important; } }

/* Quick view on artwork cards, and images that open the viewer. */
.art-card-wrap { position: relative; min-width: 0; display: flex; flex-direction: column; }
.quick-view {
  position: absolute; top: 10px; right: 10px; z-index: 2; width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.74); color: var(--gold-hi); font-size: 15px; backdrop-filter: blur(6px);
  opacity: 0; transform: scale(0.9); transition: opacity 0.2s, transform 0.2s, border-color 0.2s;
}
.art-card-wrap:hover .quick-view, .quick-view:focus-visible { opacity: 1; transform: none; }
.quick-view:hover { border-color: var(--gold); }
@media (hover: none) { .quick-view { opacity: 0.92; transform: none; } }
.is-viewable { cursor: zoom-in; }
figcaption .link-btn { font: inherit; padding: 0; }

/* ---------- the viewer ---------- */
html.viewer-open { overflow: hidden; }
html.viewer-open .chrome { visibility: hidden; }
.viewer { position: fixed; inset: 0; z-index: 90; background: radial-gradient(1200px 800px at 50% 40%, #14110d, #060505 70%); color: var(--text); }
.viewer-canvas { position: absolute; inset: 0; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; cursor: zoom-in; }
.viewer.is-zoomed .viewer-canvas { cursor: grab; }
.viewer-canvas.is-grabbing { cursor: grabbing; }
.viewer-img { position: absolute; max-width: none; transform-origin: 0 0; box-shadow: 0 40px 140px rgba(0, 0, 0, 0.75); transition: opacity 0.3s; -webkit-user-drag: none; }
.viewer-img.animate { transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s; }
.viewer-img.is-loading { opacity: 0.35; }
.viewer-bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px 28px; background: linear-gradient(180deg, rgba(6, 5, 5, 0.85), rgba(6, 5, 5, 0)); pointer-events: none;
}
.viewer-bar > * { pointer-events: auto; }
.viewer-count { margin: 0; font-size: 11px; letter-spacing: 0.12em; color: var(--muted); }
.viewer-tools { display: flex; gap: 6px; margin-left: auto; }
.viewer-btn {
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 999px; cursor: pointer; font-size: 17px; line-height: 1;
  border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.62); color: var(--gold-hi); backdrop-filter: blur(8px);
}
.viewer-btn:hover, .viewer-btn[aria-pressed='true'] { border-color: var(--gold); background: rgba(217, 180, 90, 0.16); }
.viewer-btn:focus-visible, .viewer-nav:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.viewer-zoom { min-width: 64px; font-size: 11px; letter-spacing: 0.06em; }
.viewer-nav {
  position: absolute; top: 50%; z-index: 2; width: 52px; height: 52px; margin-top: -26px; border-radius: 50%; cursor: pointer; font-size: 18px;
  border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.55); color: var(--gold-hi); backdrop-filter: blur(8px); transition: opacity 0.2s;
}
.viewer-prev { left: 16px; }
.viewer-next { right: 16px; }
.viewer.is-zoomed .viewer-nav { opacity: 0.25; }
.viewer.is-zoomed .viewer-nav:hover, .viewer.is-zoomed .viewer-nav:focus-visible { opacity: 1; }
.viewer-caption { position: absolute; left: 22px; bottom: 20px; z-index: 2; max-width: min(640px, 58vw); pointer-events: none; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85); }
.viewer-title { margin: 0; font-size: clamp(20px, 2.2vw, 30px); line-height: 1.15; color: var(--gold-hi); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.viewer-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.viewer-hd { display: inline-block; margin-left: 6px; padding: 1px 6px; border: 1px solid var(--gold-dim); border-radius: 4px; font-size: 9.5px; color: var(--gold); vertical-align: 1px; }
.viewer-mini {
  position: absolute; right: 18px; bottom: 18px; z-index: 2; width: 150px; max-height: 150px; overflow: hidden; cursor: crosshair; background: #000;
  border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}
.viewer-mini img { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0.7; pointer-events: none; }
.viewer-mini i { position: absolute; border: 1.5px solid var(--gold-hi); box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.35); pointer-events: none; }
.viewer-info {
  position: absolute; top: 72px; right: 16px; bottom: 16px; z-index: 3; width: min(380px, calc(100% - 32px)); overflow: auto; padding: 22px;
  border-radius: 18px; background: rgba(16, 14, 12, 0.95); border: 1px solid var(--line-strong); backdrop-filter: blur(12px);
}
.viewer-info .eyebrow { margin: 0; }
.viewer-info-title { margin: 8px 0 4px; font-size: 26px; line-height: 1.15; color: var(--gold-hi); }
.viewer-info .actions { margin-top: 18px; }
.viewer-hint {
  position: absolute; left: 50%; bottom: 22px; z-index: 2; transform: translateX(-50%); margin: 0; padding: 8px 14px; border-radius: 999px; white-space: nowrap;
  background: rgba(11, 10, 9, 0.8); border: 1px solid var(--line); color: var(--gold-hi); font-size: 10.5px; letter-spacing: 0.06em; pointer-events: none; transition: opacity 0.6s;
}
.viewer-hint.gone { opacity: 0; }
@media (max-width: 900px) { .viewer-hint { display: none; } }
@media (max-width: 760px) {
  .viewer-bar { padding: 10px 10px 24px; }
  .viewer-tools { gap: 4px; }
  .viewer-btn { min-width: 36px; height: 36px; padding: 0 8px; font-size: 15px; }
  .viewer-zoom { min-width: 52px; }
  .viewer-nav { display: none; }
  .viewer-caption { left: 14px; right: 14px; bottom: 14px; max-width: none; }
  .viewer-mini { width: 92px; right: 12px; bottom: 92px; }
  .viewer-info { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 72vh; border-radius: 20px 20px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
}

/* ---------- today's rooms: live tiles that open into windows ---------- */
.bento { padding: 44px 0 80px; }
.bento-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; margin-bottom: 22px; }
.bento-head .eyebrow { margin: 0; }
.bento-title { margin: 8px 0 0; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.05; color: var(--gold-hi); }
.bento-search { margin-top: 0; max-width: 460px; flex: 1 1 320px; }
.bento-grid {
  display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 214px;
  grid-template-areas: "wire wire play guides" "wire wire play almanac" "watch watch kinds kinds" "watch watch stop ais" "books books books books";
}
.tile-wire { grid-area: wire; } .tile-play { grid-area: play; } .tile-guides { grid-area: guides; } .tile-almanac { grid-area: almanac; }
.tile-kinds { grid-area: kinds; } .tile-stop { grid-area: stop; } .tile-ais { grid-area: ais; }
.tile {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; min-height: 0; overflow: hidden; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); color: var(--text); text-decoration: none;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.tile:hover, .tile:focus-within { border-color: var(--line-strong); transform: translateY(-2px); box-shadow: 0 26px 60px -32px rgba(0, 0, 0, 0.85); }
.tile-open { all: unset; display: flex; flex-direction: column; gap: 7px; cursor: pointer; padding-right: 76px; }
.tile-open::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.tile-open:focus-visible::after { outline: 2px solid var(--gold); outline-offset: -3px; }
.tile a, .tile form, .tile-list { position: relative; z-index: 2; }
.tile-kicker { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); }
.tile-title { margin: 0; font-size: clamp(19px, 1.55vw, 24px); line-height: 1.15; color: var(--gold-hi); }
.tile-go { position: absolute; top: 18px; right: 18px; z-index: 0; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-dim); transition: color 0.2s, transform 0.2s; pointer-events: none; }
.tile:hover .tile-go, .tile:focus-within .tile-go { color: var(--gold-hi); transform: translate(2px, -2px); }
.tile-foot { margin: auto 0 0; font-size: 10.5px; letter-spacing: 0.04em; color: var(--gold-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-list { list-style: none; margin: 2px 0 0; padding: 0; display: grid; }
.tile-list a { display: grid; gap: 3px; padding: 10px 0; border-top: 1px solid var(--line); color: var(--text); text-decoration: none; }
.tile-list a span:first-child { font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-dim); }
.tile-list a span:last-child { font-family: var(--serif); font-size: 18px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile-list a:hover span:last-child, .tile-list a:focus-visible span:last-child { color: var(--gold-hi); }
.tile-media { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; overflow: hidden; border-radius: 12px; background: #080706; }
.tile-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tile:hover .tile-media img { transform: scale(1.06); }
.tile-guides-list { list-style: none; margin: auto 0 0; padding: 0; display: grid; gap: 10px; }
.tile-guides-list a { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.tile-guides-list a > span:last-child { display: grid; gap: 2px; min-width: 0; }
.tile-guides-list b { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; color: var(--gold-hi); }
.tile-guides-list .muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-thumb { flex: none; width: 42px; height: 42px; overflow: hidden; border-radius: 50%; border: 1px solid var(--line-strong); background: #0e0d0b; }
.tile-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tile-fact { margin: auto 0 0; font-family: var(--serif); font-size: 17.5px; line-height: 1.35; transition: opacity 0.4s; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.tile-fact.is-fading { opacity: 0; }
.tile-fact small { display: block; margin-bottom: 6px; font-family: var(--sans); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-dim); }
.tile-mosaic { flex: 1; min-height: 0; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 8px; }
.tile-mosaic img { width: 100%; height: 100%; min-height: 0; object-fit: cover; border-radius: 10px; background: #0e0d0b; transition: transform 0.6s; }
.tile:hover .tile-mosaic img:first-child { transform: scale(1.03); }
.tile-stop-form { display: flex; gap: 8px; margin-top: auto; }
.tile-stop-form input {
  width: 100%; min-width: 0; height: 48px; border-radius: 12px; border: 1px solid var(--line-strong); background: #0b0a09; color: var(--gold-hi);
  font-size: 22px; letter-spacing: 0.3em; text-align: center;
}
.tile-stop-form input:focus { outline: none; border-color: var(--gold); }
.tile-stop .tile-foot { margin-top: 0; }
.tile-ais .door-glyph { margin: auto 0 0; font-size: 30px; color: var(--gold); }
.tile-ais .tile-foot { margin-top: 0; }

/* The room window. */
html.room-open { overflow: hidden; }
html.room-open .chrome { visibility: hidden; }
.room-scrim { position: fixed; inset: 0; z-index: 78; background: rgba(6, 5, 5, 0.74); backdrop-filter: blur(6px); opacity: 0; transition: opacity 0.3s; }
.room-scrim.is-on { opacity: 1; }
.room {
  position: fixed; z-index: 80; top: 3vh; bottom: 3vh; left: max(3vw, calc(50% - 680px)); right: max(3vw, calc(50% - 680px));
  display: flex; flex-direction: column; overflow: hidden; transform-origin: 0 0;
  border: 1px solid var(--line-strong); border-radius: 24px; background: #0d0c0a; box-shadow: 0 60px 160px -40px rgba(0, 0, 0, 0.9);
}
.room-bar { display: flex; align-items: center; gap: 12px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--line); background: rgba(13, 12, 10, 0.96); }
.room-tabs { flex: 1; display: flex; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.room-tabs::-webkit-scrollbar { display: none; }
.room-tab {
  flex: none; height: 36px; padding: 0 15px; border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer;
  color: var(--muted); font: 500 10.5px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; transition: color 0.2s, border-color 0.2s;
}
.room-tab:hover { color: var(--gold-hi); border-color: var(--line-strong); }
.room-tab[aria-selected='true'] { background: var(--gold-grad); color: #1a1407; border-color: transparent; }
.room-tab:focus-visible, .room-close:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.room-close { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--gold-hi); font-size: 20px; cursor: pointer; }
.room-close:hover { border-color: var(--gold); }
.room-body { flex: 1; overflow: auto; overscroll-behavior: contain; padding: 4px clamp(18px, 3vw, 44px) 44px; }
.room-bar, .room-body { transition: opacity 0.2s 0.05s; }
.room.is-morphing .room-bar, .room.is-morphing .room-body { opacity: 0; transition: none; }
.room-body > .room-section { padding-top: 22px; padding-bottom: 12px; }
.room-body .game .play-card { margin-top: 6px; }

@media (max-width: 1100px) {
  .bento-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "wire wire" "wire wire" "play guides" "play almanac" "watch watch" "watch watch" "kinds kinds" "stop ais" "books books"; }
}
@media (max-width: 640px) {
  .bento { padding: 32px 0 64px; }
  .bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; grid-template-areas: "wire" "watch" "play" "kinds" "guides" "almanac" "stop" "ais" "books"; gap: 12px; }
  .tile-watch { height: 400px; }
  .tile { padding: 16px 16px 18px; }
  .tile-play { height: 360px; }
  .tile-list li:nth-child(n+4) { display: none; }
  .tile-kinds { height: 230px; }
  .tile-almanac { min-height: 190px; }
  .tile-guides-list { margin-top: 6px; }
  .tile-stop .tile-foot, .tile-ais .tile-foot { white-space: normal; }
  .room { top: calc(8px + env(safe-area-inset-top)); bottom: 0; left: 0; right: 0; border-radius: 20px 20px 0 0; border-bottom: 0; }
  .room-bar { padding: 10px 10px 10px 12px; }
  .room-body { padding: 0 16px calc(36px + env(safe-area-inset-bottom)); }
}

/* ---------- watch: video tile, video cards, the player ---------- */
.tile-watch { grid-area: watch; }
.tile [data-play-video] { position: relative; z-index: 2; }
.tile-watch-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.55fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; }
.tile-watch-body > .pulse, .tile-watch-body > p { grid-column: 1 / -1; align-self: center; justify-self: center; }
.tw-item {
  position: relative; display: block; min-height: 0; overflow: hidden; padding: 0; border: 0; border-radius: 12px; cursor: pointer;
  background: #080706; color: var(--text); font: inherit; text-align: left;
}
.tw-item:first-child { grid-row: 1 / span 2; }
/* YouTube's hqdefault thumbnails are 4:3 with the 16:9 picture between black bars (an eighth of the height each).
   A third taller and centred, the cover crop leaves the bars outside the card at any shape; wide cards crop as before. */
.tw-item img { position: absolute; inset: -16.667% 0 auto; width: 100%; height: 133.334%; object-fit: cover; transition: transform 1s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tw-item::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(6, 5, 5, 0.92), rgba(6, 5, 5, 0.05) 62%); }
.tw-item:hover img, .tw-item:focus-visible img { transform: scale(1.06); }
.tw-item:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.tw-cap { position: absolute; left: 12px; right: 12px; bottom: 10px; z-index: 1; display: grid; gap: 3px; }
.tw-cap small { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tw-cap b { font-family: var(--serif); font-weight: 500; font-size: 15px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tw-item:first-child .tw-cap b { font-size: 21px; -webkit-line-clamp: 3; }
.tw-item .video-play { left: auto; top: 12px; right: 12px; transform: none; width: 34px; height: 34px; font-size: 11px; z-index: 1; }
.tw-item:first-child .video-play { width: 52px; height: 52px; font-size: 15px; top: 50%; right: 50%; transform: translate(50%, -50%); }
.tw-item:hover .video-play, .tw-item:focus-visible .video-play { background: var(--gold-grad); color: #1a1407; opacity: 1; }
@media (max-width: 640px) { /* after the rules above, or they win and the lead film hides the other two */
  .tile-watch-body { grid-template-columns: 1fr 1fr; grid-template-rows: 1.5fr 1fr; }
  .tw-item:first-child { grid-row: auto; grid-column: 1 / span 2; }
  .tw-item:first-child .tw-cap b { font-size: 18px; -webkit-line-clamp: 2; }
  .tw-cap b { font-size: 13.5px; }
}

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px 18px; }
.video-grid > .loading, .video-grid > p { grid-column: 1 / -1; }
.video-card { all: unset; display: flex; flex-direction: column; gap: 10px; min-width: 0; cursor: pointer; }
.video-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 14px; }
.video-thumb { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: #080706; }
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.video-card:hover .video-thumb img { transform: scale(1.05); }
.video-play {
  position: absolute; left: 50%; top: 50%; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; transform: translate(-50%, -50%) scale(0.92);
  background: rgba(11, 10, 9, 0.72); border: 1px solid var(--line-strong); color: var(--gold-hi); font-size: 16px; opacity: 0.88; backdrop-filter: blur(6px);
  transition: opacity 0.25s, transform 0.25s, background 0.25s, color 0.25s;
}
.video-card:hover .video-play, .video-card:focus-visible .video-play { opacity: 1; transform: translate(-50%, -50%) scale(1); background: var(--gold-grad); color: #1a1407; }
.video-body { display: grid; gap: 4px; }
.video-meta { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.video-title { font-family: var(--serif); font-size: 18px; line-height: 1.25; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-card:hover .video-title { color: var(--gold-hi); }
.watch-note { margin: 22px 0 0; text-align: center; }

/* ---------- THE THEATRE (v0.28): every film, video, picture and sound, full screen ----------
   A dark room lit by the piece itself (a blur of its picture; for a real video, of its frames), the screen in the
   middle, the caption and the page's own controls below, chapters and what plays next in a side panel. */
html.theatre-open { overflow: hidden; }
html.theatre-open .chrome { visibility: hidden; }
.theatre { position: fixed; inset: 0; z-index: 92; overflow: hidden; background: #040303; color: var(--text); }
.theatre-glow { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.theatre-glow img, .theatre-glow canvas {
  position: absolute; left: 50%; top: 42%; width: 130%; height: 130%; transform: translate(-50%, -50%); object-fit: cover;
  filter: blur(80px) saturate(1.5) brightness(0.55); opacity: 0.7; transition: opacity 1.4s ease;
}
.theatre-glow canvas { opacity: 0; }
.theatre.glow-live .theatre-glow canvas { opacity: 0.9; }
.theatre.glow-live .theatre-glow img { opacity: 0; }
.theatre::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse 70% 62% at 50% 42%, transparent 30%, rgba(4, 3, 3, 0.9) 100%); }
.theatre .viewer-bar { z-index: 4; }
.theatre .viewer-nav { z-index: 4; }
.theatre-brand { display: flex; gap: 6px; align-items: baseline; }
.theatre-brand b { font-weight: 500; letter-spacing: 0.26em; color: var(--gold-hi); }
.theatre-out { display: inline-flex; align-items: center; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none; }
.theatre-stage { position: absolute; inset: 66px 88px 200px; z-index: 2; display: grid; place-items: center; outline: none; }
.theatre-screen { position: relative; width: 100%; height: 100%; display: grid; place-items: center; min-height: 0; }
.theatre-screen.is-film iframe {
  width: min(100%, calc((100vh - 280px) * 16 / 9)); aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; background: #000;
  box-shadow: 0 50px 160px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(217, 180, 90, 0.14);
}
.theatre-screen.is-video video { max-width: 100%; max-height: 100%; border-radius: 12px; background: #000; box-shadow: 0 50px 160px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(217, 180, 90, 0.14); }
.theatre-screen.is-video video::cue { background: rgba(0, 0, 0, 0.72); color: #fff; font-family: var(--sans); }
.theatre-screen.is-audio audio { display: none; }
.theatre-screen.is-image img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; box-shadow: 0 50px 160px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(217, 180, 90, 0.12); animation: art-dolly 20s ease-in-out forwards; }
.theatre-screen.is-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; align-items: center; }
.theatre-screen.is-pair figure { margin: 0; height: 100%; display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 10px; place-items: center; }
.theatre-screen.is-pair img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; box-shadow: 0 30px 100px rgba(0, 0, 0, 0.8); }
.theatre-screen.is-pair figcaption { font-size: 13px; color: var(--muted); text-align: center; }
.theatre-screen.is-pair figcaption b { color: var(--gold-hi); font-weight: 500; }
.theatre-card { max-width: 780px; max-height: 100%; overflow: auto; text-align: center; padding: 8px 18px; }
.theatre-card-by { margin: 0 0 14px; font-size: 11px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--gold); }
.theatre-card h3 { margin: 0 0 18px; font-size: clamp(32px, 4.6vw, 64px); line-height: 1.05; color: var(--gold-hi); }
.theatre-card-text { margin: 0 auto; max-width: 56ch; font-family: var(--serif); font-style: italic; font-size: clamp(19px, 1.8vw, 24px); line-height: 1.45; color: var(--text); }
.theatre-card-quote { margin: 0 auto; max-width: 60ch; text-align: left; font-size: clamp(19px, 1.7vw, 24px); }
.theatre-card-cite { margin: 16px 0 0; font-size: 11px; letter-spacing: 0.08em; color: var(--gold); }
.theatre-listen { display: grid; place-items: center; gap: 22px; }
.theatre-listen img { width: min(320px, 60vw); aspect-ratio: 1; object-fit: cover; border-radius: 18px; box-shadow: 0 40px 120px rgba(0, 0, 0, 0.8); }
.theatre-eq { display: inline-flex; align-items: flex-end; gap: 4px; height: 28px; }
.theatre-eq i { width: 5px; height: 100%; border-radius: 3px; background: var(--gold); transform-origin: bottom; animation: theatre-eq 1s ease-in-out infinite; }
.theatre-eq i:nth-child(2) { animation-delay: -0.35s; }
.theatre-eq i:nth-child(3) { animation-delay: -0.7s; }
@keyframes theatre-eq { 0%, 100% { transform: scaleY(0.3); } 50% { transform: scaleY(1); } }
.theatre-big { position: absolute; left: 50%; top: 50%; width: 88px; height: 88px; margin: -44px 0 0 -44px; border: 0; border-radius: 50%; cursor: pointer; display: grid; place-items: center; background: var(--gold-grad); color: #1a1407; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7); }
.theatre-big svg { width: 34px; height: 34px; }
.theatre-foot { position: absolute; left: 24px; right: 24px; bottom: 16px; z-index: 3; display: grid; gap: 10px; max-width: 1280px; margin: 0 auto; }
.theatre-caption { max-width: 900px; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85); }
.theatre-kicker { margin: 0 0 5px; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.theatre .viewer-title { -webkit-line-clamp: 1; }
.theatre-note { margin: 6px 0 0; display: flex; gap: 10px; align-items: center; font-family: var(--serif); font-style: italic; font-size: 17px; line-height: 1.35; color: var(--gold-hi); }
.theatre .viewer-sub { max-width: 820px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.theatre-controls { display: grid; gap: 4px; }
.theatre-scrub { position: relative; height: 20px; cursor: pointer; touch-action: none; outline-offset: 2px; }
.theatre-scrub::before { content: ''; position: absolute; left: 0; right: 0; top: 8px; height: 4px; border-radius: 4px; background: rgba(237, 231, 218, 0.18); }
.theatre-fill { position: absolute; left: 0; top: 8px; height: 4px; width: 0; border-radius: 4px; background: var(--gold-grad); box-shadow: 0 0 12px rgba(217, 180, 90, 0.45); }
.theatre-ticks i { position: absolute; top: 6px; width: 2px; height: 8px; margin-left: -1px; border-radius: 1px; background: rgba(6, 5, 5, 0.9); }
.theatre-scrub:hover::before, .theatre-scrub:focus-visible::before { height: 6px; top: 7px; }
.theatre-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.theatre-btn {
  min-width: 40px; height: 38px; padding: 0 11px; border-radius: 999px; cursor: pointer; display: inline-grid; place-items: center;
  border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.62); color: var(--gold-hi); font-size: 12px; letter-spacing: 0.06em; backdrop-filter: blur(8px);
}
.theatre-btn svg { width: 18px; height: 18px; }
.theatre-btn:hover, .theatre-btn[aria-pressed='true'] { border-color: var(--gold); background: rgba(217, 180, 90, 0.16); }
.theatre-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.theatre-wide { padding: 0 16px; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; }
.theatre-time { font-size: 11.5px; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }
.theatre-chapter { max-width: 34ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; letter-spacing: 0.08em; color: var(--gold); }
.theatre-spacer { flex: 1; }
.theatre-side {
  position: absolute; top: 66px; right: 16px; bottom: 16px; z-index: 5; width: min(360px, calc(100vw - 32px)); overflow: auto; padding: 18px;
  border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(11, 10, 9, 0.92); backdrop-filter: blur(14px); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7);
}
.theatre-side .eyebrow { margin: 0 0 10px; color: var(--gold-dim); }
.theatre-chapters, .theatre-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 4px; }
.theatre-chapters button, .theatre-list button {
  all: unset; box-sizing: border-box; width: 100%; display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer;
  font-family: var(--serif); font-size: 16px; line-height: 1.25; color: var(--text);
}
.theatre-chapters button .mono { font-size: 11px; color: var(--gold); min-width: 4.5ch; }
.theatre-chapters button:hover, .theatre-list button:hover, .theatre-chapters button:focus-visible, .theatre-list button:focus-visible { background: rgba(217, 180, 90, 0.1); }
.theatre-chapters button[aria-current], .theatre-list button[aria-current] { background: rgba(217, 180, 90, 0.16); color: var(--gold-hi); }
.theatre-list img, .theatre-list-mark { flex: none; width: 76px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; display: grid; place-items: center; background: rgba(217, 180, 90, 0.08); color: var(--gold); }
.theatre-list small { display: block; font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dim); }
.theatre-next {
  position: absolute; right: 24px; bottom: 210px; z-index: 6; width: min(340px, calc(100vw - 48px)); padding: 16px; display: grid; gap: 10px;
  border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(11, 10, 9, 0.94); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.75);
}
.theatre-next img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; }
.theatre-next-k { margin: 0; font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.theatre-next-title { margin: 0; font-family: var(--serif); font-size: 19px; line-height: 1.25; color: var(--gold-hi); }
.theatre-next .actions { margin: 0; }
.theatre-resume { position: absolute; left: 50%; top: 74px; z-index: 6; transform: translateX(-50%); padding: 9px 16px; border-radius: 999px; cursor: pointer; border: 1px solid var(--gold); background: rgba(11, 10, 9, 0.88); color: var(--gold-hi); font-size: 11px; letter-spacing: 0.08em; }
.theatre-picture-row { justify-content: flex-start; }
.theatre .viewer-hint { top: 72px; bottom: auto; z-index: 5; }
.theatre-brand, .theatre-brand span, .theatre-out { white-space: nowrap; }
.theatre .viewer-bar > .theatre-brand { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; display: block; }
.theatre .viewer-tools { flex: none; } /* the buttons never give way; the name does */
@media (max-width: 760px) {
  .theatre-stage { inset: 60px 0 232px; }
  .theatre-screen.is-film iframe { width: 100%; border-radius: 0; }
  .theatre-screen.is-video video { border-radius: 0; }
  .theatre-screen.is-pair { grid-template-columns: 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 12px; }
  .theatre .viewer-nav { display: none; }
  .theatre-foot { left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .theatre-note { font-size: 15px; }
  .theatre-chapter { display: none; }
  .theatre-btn { min-width: 38px; height: 36px; padding: 0 9px; }
  .theatre-next { left: 14px; right: 14px; width: auto; bottom: 246px; }
  .theatre-side { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 70vh; border-radius: 22px 22px 0 0; }
  .theatre-card h3 { font-size: clamp(28px, 9vw, 40px); }
  .theatre-brand { font-size: 10px; }
  .theatre-brand b { letter-spacing: 0.16em; }
  .theatre .viewer-tools { gap: 4px; }
  .theatre .viewer-btn { min-width: 36px; height: 36px; padding: 0 8px; font-size: 15px; }
  .theatre .viewer-btn.theatre-out { font-size: 9.5px; letter-spacing: 0.08em; padding: 0 10px; }
  .theatre [data-t="full"] { display: none; } /* a phone has its own: the film's, or turning the phone */
  .theatre .viewer-hint { display: none; }
}

/* ---------- the menu button: badge, peek, and fading when not in use ---------- */
.orb { position: relative; transition: border-color 0.2s, background 0.2s, opacity 0.6s ease; }
.orb-badge {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; display: grid; place-items: center;
  background: var(--gold-grad); color: #1a1407; font-size: 10px; font-weight: 600; letter-spacing: 0; box-shadow: 0 0 0 3px #0b0a09;
}
@media (hover: hover) and (pointer: fine) {
  .chrome:not(.is-near):not(:hover):not(:focus-within) .orb { opacity: 0.55; }
}
html.is-idle .chrome:not(:hover):not(:focus-within) .orb { opacity: 0.16; }
.stage-ui { transition: opacity 0.6s ease; }
html.is-idle .stage-ui:not(:focus-within) { opacity: 0.2; }
html.is-idle .lens:not(:focus-within) .lens-dock, html.is-idle .lens .lens-hint { opacity: 0; }
html.is-idle .viewer:not(.info-open) .viewer-bar:not(:focus-within),
html.is-idle .viewer:not(.info-open) .viewer-caption,
html.is-idle .viewer:not(.info-open) .viewer-mini,
html.is-idle .viewer .viewer-nav:not(:focus-visible) { opacity: 0; }
/* THE THEATRE's cinema mode, with a mouse only: on a touch screen a tap on the film goes to YouTube, never the page,
   so its bar and controls would not come back (seen on a phone, v0.28.2). */
@media (hover: hover) and (pointer: fine) {
  html.is-idle .theatre.is-playing:not(.is-ended) .viewer-bar:not(:focus-within),
  html.is-idle .theatre.is-playing:not(.is-ended) .theatre-foot:not(:focus-within),
  html.is-idle .theatre.is-playing:not(.is-ended) .viewer-nav:not(:focus-visible) { opacity: 0; }
  html.is-idle .theatre.is-playing:not(.is-ended) { cursor: none; }
}
.viewer-bar, .viewer-caption, .viewer-mini, .viewer-nav, .theatre-foot { transition: opacity 0.5s ease; }

.peek {
  position: absolute; top: calc(100% + 10px); left: 0; width: 340px; padding: 16px 16px 12px; border-radius: 18px;
  background: rgba(16, 14, 12, 0.96); border: 1px solid var(--line-strong); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8); backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top left; transition: opacity 0.18s, transform 0.18s;
}
.peek.open { opacity: 1; transform: none; }
.peek::before { content: ''; position: absolute; left: 0; right: 0; top: -12px; height: 12px; } /* a bridge so the pointer can travel from the button */
.peek-head { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; letter-spacing: 0.14em; color: var(--gold-dim); }
.peek-now { margin: 10px 0 0; font-size: 13px; color: var(--text); }
.peek-label { margin: 14px 0 6px; font-size: 9.5px; }
.peek-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.peek-list a { display: grid; gap: 2px; padding: 8px 10px 8px 12px; border-radius: 10px; text-decoration: none; color: var(--text); border-left: 2px solid transparent; }
.peek-list a:hover, .peek-list a:focus-visible { background: rgba(217, 180, 90, 0.1); }
.peek-list a.is-fresh { border-left-color: var(--gold); }
.peek-list b { font-size: 13px; font-weight: 600; color: var(--gold-hi); }
.peek-list span { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.peek-jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.peek-jump a { padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); text-decoration: none; }
.peek-jump a:hover, .peek-jump a:focus-visible { border-color: var(--gold); color: var(--gold-hi); }
.peek-foot { margin: 10px 0 0; font-size: 10px; color: var(--gold-dim); }
.menu-updates { padding: 10px 0 12px; border-top: 1px solid var(--line); }
.menu-updates .eyebrow { margin: 0 0 6px; }
@media (hover: none) { .peek { display: none !important; } }
@media (max-width: 760px) { .peek { top: auto; bottom: calc(100% + 10px); left: auto; right: 0; transform-origin: bottom right; } .peek::before { top: auto; bottom: -12px; } }

/* ---------- responsive ---------- */

@media (max-width: 1040px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-door { grid-column: 1 / -1; }
}

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 84px; }
  .hero-art { order: -1; }
  .hero-art img { max-height: 56vh; }
  .tour { grid-template-columns: 1fr; gap: 0; }
  .tour-stage { position: relative; top: 0; height: auto; padding: 80px 0 0; }
  .stage-figure img { max-height: 52vh; }
  .tour-panel { padding-top: 22px; }
  .art { grid-template-columns: 1fr; padding-top: 84px; }
  .art-figure { position: relative; top: 0; }
  .art-figure img { max-height: 60vh; }
  .tour-row { grid-template-columns: 1fr; }
  .tour-row-img { min-height: 0; aspect-ratio: 16 / 10; }
  .footer { grid-template-columns: 1fr; gap: 24px; }
  .picks-grid { grid-template-columns: 1fr; }
  .play-card { grid-template-columns: 1fr; }
  .play-art { min-height: 300px; }
  .almanac-grid { grid-template-columns: 1fr; }
  .slide-content, .slide-photo .slide-content { left: var(--gutter); right: var(--gutter); width: auto; bottom: 96px; }
  /* Art slides stack: the artwork takes whatever height the words leave, so they never overlap. */
  .slide.slide-art { display: flex; flex-direction: column; gap: 22px; padding: calc(84px + env(safe-area-inset-top)) var(--gutter) 96px; }
  .slide-art .slide-art { position: relative; inset: auto; flex: 1 1 auto; min-height: 0; width: auto; }
  .slide.slide-art .slide-content { position: relative; inset: auto; width: auto; flex: none; }
  .slide-shade { background: linear-gradient(0deg, rgba(6, 5, 5, 0.96) 0%, rgba(6, 5, 5, 0.75) 42%, rgba(6, 5, 5, 0.05) 75%); }
  .tour-intro { grid-template-columns: 1fr; padding-top: 84px; }
  .ai-grid { grid-template-columns: 1fr; }
  .keypad-section { grid-template-columns: 1fr; gap: 24px; padding: 24px; }
  .keypad-section .keypad { max-width: none; }
}

@media (max-width: 760px) {
  .chrome { top: auto; left: auto; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
  .chrome.tucked { transform: translateY(150%); }
  .menu {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 88vh;
    border-radius: 22px 22px 0 0; border-bottom: 0; padding: 16px 16px calc(18px + env(safe-area-inset-bottom));
    transform: translateY(28px); transform-origin: bottom center;
  }
  .menu-t { font-size: 25px; }
  .stage { height: 92svh; min-height: 540px; }
  .slide-title { font-size: clamp(28px, 8vw, 40px); }
  .slide-sub { font-size: 17px; -webkit-line-clamp: 2; }
  .stage-ui { padding-bottom: 22px; gap: 12px; flex-wrap: wrap; }
  .stage-segs { flex-basis: 100%; }
  .stage-controls { width: 100%; }
  .stage-count { margin-right: auto; }
  .stage-live { margin-right: 4px; }
  .slide-content, .slide-photo .slide-content { bottom: 118px; }
  /* (the art slide's padding on a phone: "The stage on a phone", at the end) */
  .slide-kicker { font-size: 10px; letter-spacing: 0.18em; margin-bottom: 12px; }
  .slide-content .actions .btn { min-height: 40px; padding: 8px 14px; font-size: 11px; }
  .play-options { grid-template-columns: 1fr; }
  .wire-grid { grid-template-columns: 1fr; gap: 12px; }
  /* On phones the lead story stays big; the rest become compact rows. */
  .wire-card:not(:first-child) { display: grid; grid-template-columns: 92px 1fr; border-radius: 14px; }
  .wire-card:not(:first-child) .wire-img { aspect-ratio: auto; height: 100%; min-height: 92px; }
  .wire-card:not(:first-child) .wire-body { padding: 12px 14px; gap: 6px; }
  .wire-card:not(:first-child) .wire-title { font-size: 17px; }
  .wire-card:not(:first-child) .wire-sum { display: none; }
  .wire-card.no-img:not(:first-child) { grid-template-columns: 1fr; }
  .wire-card.no-img:not(:first-child) .wire-title { font-size: 19px; }
  .menu-hint { display: none; }
  .menu-foot { justify-content: flex-end; }
  .hero { padding-top: 24px; }
  .tour-stage { padding-top: 18px; }
  .art, .tour-intro { padding-top: 24px; }
  .page-head { padding-top: 76px; } /* clear of the Sign in bar (v0.20) */
  .page-head-tight { padding-top: 72px; }
  .footer { margin-top: 64px; }
  .cards { grid-template-columns: 1fr; }
  .search { flex-direction: column; }
  .search .btn { width: 100%; }
  .manifesto { padding: 48px 0 40px; }
  .passport-head { flex-direction: column; align-items: flex-start; }
  .passport-cols { grid-template-columns: 1fr; }
  .facts-list div, .receipt-list div { grid-template-columns: 1fr; gap: 2px; }
  .take p:not(.eyebrow) { font-size: 19px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .art-card-title { font-size: 16px; }
  .stop-row { grid-template-columns: 46px 56px 1fr; gap: 12px; padding: 10px 12px 10px 8px; }
  .stop-code { font-size: 16px; }
  .stop-thumb { width: 56px; height: 48px; }
  .stop-label { font-size: 19px; }
  .stop-go { display: none; }
  .pick-body { padding: 18px 18px 22px; }
  .toast { bottom: calc(80px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- MARCUS: the emperor (tile, room, passages, stage quote) ---------- */
.bento-grid { grid-template-areas: "marcus marcus marcus marcus" "wire wire play guides" "wire wire play almanac" "watch watch kinds kinds" "watch watch stop ais" "books books books books"; }
.bento-grid { grid-template-rows: minmax(214px, auto); } /* the MARCUS row grows to hold his passage and its citation; the other rows stay 214px */
.tile-marcus {
  grid-area: marcus; gap: 12px;
  background: radial-gradient(640px 260px at 8% 50%, rgba(217, 180, 90, 0.1), transparent 70%), linear-gradient(180deg, var(--panel-2), var(--panel));
}
.marcus-sigil {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  border: 1px solid var(--gold); font: 600 10px/1 var(--serif); letter-spacing: 0; color: var(--gold-hi);
}
.marcus-tile-body { flex: 1; min-height: 0; display: flex; align-items: center; gap: 22px; }
.marcus-tile-body > .wing-wreath { margin-block: -27px; } /* the laurel is drawn whole but sized like the words, so the row grows only for the words */
.marcus-coin {
  position: relative; flex: none; display: block; width: 96px; height: 96px; overflow: hidden; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a332a, #120f0c); border: 1px solid var(--line-strong);
  box-shadow: 0 0 0 5px rgba(217, 180, 90, 0.06), 0 18px 40px -18px rgba(0, 0, 0, 0.9);
}
/* The museum photo shows the coin small on a grey card: zoom in so the coin fills the circle. */
.marcus-coin img { width: 100%; height: 100%; object-fit: cover; transform: scale(2.05); filter: sepia(0.25) contrast(1.08); }
.marcus-coin-lg { width: 148px; height: 148px; }
.marcus-tile-quote { flex: 1; min-width: 0; margin: 0; }
.marcus-tile-quote .med-text { margin: 0; font-size: clamp(18px, 1.5vw, 22px); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.marcus-tile-quote figcaption { margin-top: 8px; font-size: 10.5px; letter-spacing: 0.06em; color: var(--gold-dim); }
.marcus-tile-foot { display: flex; align-items: center; gap: 10px; position: relative; z-index: 2; }
.tile .marcus-tile-foot .btn, .tile .marcus-tile-foot input { position: relative; z-index: 2; }
.marcus-ask-tile { display: flex; gap: 8px; flex: 1; min-width: 0; max-width: 620px; }
.marcus-ask-tile input {
  flex: 1; min-width: 0; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(11, 10, 9, 0.7); color: var(--text); font: inherit; font-size: 15px;
}
.marcus-ask-tile input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217, 180, 90, 0.12); }

/* A passage: always his words exactly, with the citation under them. */
.med-text { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.45; color: var(--text); }
.med-text p { margin: 0 0 0.6em; }
.med-text p:last-child { margin-bottom: 0; }
.med-text mark { background: none; color: var(--gold-hi); box-shadow: inset 0 -1px 0 var(--gold); }
.med { margin: 0 0 22px; padding: 18px 20px; border: 1px solid var(--line); border-left: 2px solid var(--gold); border-radius: 4px 16px 16px 4px; background: rgba(217, 180, 90, 0.03); }
.med-cite { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 11px; color: var(--gold-dim); }
.med-tools { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 10.5px; letter-spacing: 0.16em; }

/* His room. */
.marcus-head { display: flex; align-items: center; gap: 28px; }
.marcus-head .display { margin: 6px 0 0; font-size: clamp(40px, 5vw, 64px); letter-spacing: 0.06em; color: var(--gold-hi); }
.marcus-head .lede { margin-top: 10px; }
.marcus-rule { max-width: 70ch; margin: 12px 0 0; line-height: 1.55; }
.marcus-head .actions { margin-top: 16px; }
.marcus-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; margin-top: 34px; align-items: start; }
.marcus-ask { margin-top: 0; }
.marcus-topics { margin-top: 14px; }
.marcus-answer { margin-top: 22px; }
.marcus-answer:empty { display: none; }
.marcus-answer > .eyebrow { margin: 18px 0 10px; }
.marcus-silent { font-family: var(--serif); font-size: 20px; color: var(--muted); }
.marcus-rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.marcus-rooms a { display: grid; gap: 2px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; }
.marcus-rooms a:hover { border-color: var(--line-strong); }
.marcus-rooms small { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-dim); }
.marcus-rooms b { font-weight: 500; color: var(--gold-hi); }
.marcus-today { position: sticky; top: 8px; }
.marcus-today .med { margin-top: 10px; }
.med-today .med-text { font-size: 23px; }
.marcus-h3 { margin: 6px 0 0; font-size: clamp(24px, 2.6vw, 34px); color: var(--gold-hi); }
.marcus-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; margin-top: 48px; }
.timeline { list-style: none; margin: 12px 0 14px; padding: 0; border-left: 1px solid var(--line-strong); }
.timeline li { position: relative; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 10px; padding: 8px 0 8px 18px; line-height: 1.5; }
.timeline li::before { content: ''; position: absolute; left: -4px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); }
.timeline .mono { font-size: 12px; color: var(--gold); padding-top: 2px; }
.marcus-work { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; margin-top: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
.marcus-work-img { all: unset; display: block; cursor: zoom-in; border-radius: 10px; overflow: hidden; background: #0e0d0b; align-self: start; }
.marcus-work-img img { display: block; width: 100%; height: auto; transition: transform 0.6s; }
.marcus-work-img:hover img { transform: scale(1.04); }
.marcus-work-img:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.marcus-work-body .eyebrow { margin: 0 0 4px; }
.marcus-work-body .eyebrow + .small, .marcus-work-body p.small { margin: 0 0 10px; }
.marcus-work-title { margin: 0 0 2px; font-family: var(--serif); font-size: 20px; font-weight: 500; color: var(--gold-hi); }
.marcus-page { max-width: 880px; margin: 0 auto 64px; padding: 0 var(--gutter); }

/* On the stage: the day's passage in place of a headline. */
.slide-quote { margin: 0; padding-right: 28px; text-wrap: pretty; font-size: clamp(20px, 1.9vw, 30px); line-height: 1.38; color: var(--text); text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6); display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.slide-cite { margin: 14px 0 0; font-size: 11px; letter-spacing: 0.08em; color: var(--gold); }

@media (max-width: 1100px) {
  .bento-grid { grid-template-areas: "marcus marcus" "wire wire" "wire wire" "play guides" "play almanac" "watch watch" "watch watch" "kinds kinds" "stop ais" "books books"; }
  .tile-marcus { grid-row: auto; }
  .marcus-grid, .marcus-cols { grid-template-columns: 1fr; }
  .marcus-today { position: static; }
}
@media (max-width: 640px) {
  .bento-grid { grid-template-areas: "marcus" "wire" "play" "guides" "almanac" "watch" "kinds" "stop" "ais" "books"; grid-template-rows: none; } /* wing order, I–X */
  .tile-marcus { min-height: 0; }
  .marcus-tile-body { align-items: flex-start; gap: 14px; }
  .marcus-coin { width: 64px; height: 64px; }
  .marcus-tile-quote .med-text { font-size: 18px; -webkit-line-clamp: 5; }
  .marcus-tile-foot { flex-wrap: wrap; }
  .marcus-tile-foot > .btn { display: none; }
  .marcus-head { display: block; }
  .marcus-coin-lg { display: none; } /* the tile already shows the coin; here the question comes first */
  .marcus-head .lede { font-size: 16px; }
  .marcus-head .actions { margin-top: 12px; }
  .marcus-grid { margin-top: 22px; }
  .med { padding: 14px 14px; }
  .med-text { font-size: 19px; }
  .marcus-work { grid-template-columns: 96px minmax(0, 1fr); }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
  .slide-quote { font-size: 19px; -webkit-line-clamp: 6; }
}

/* ---------- the viewer's magnifier ---------- */
.viewer-loupe {
  position: absolute; z-index: 1; left: 0; top: 0; width: 200px; height: 200px; border-radius: 50%; pointer-events: none;
  opacity: 0; transform: scale(0.85); transition: opacity 0.15s, transform 0.15s;
  background-color: #0b0a09; background-repeat: no-repeat;
  border: 2px solid rgba(243, 222, 160, 0.9); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), inset 0 0 0 1px rgba(0, 0, 0, 0.55);
}
.viewer-loupe.is-visible { opacity: 1; transform: none; }
.viewer-loupe b {
  position: absolute; left: 50%; bottom: 9px; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px;
  background: rgba(11, 10, 9, 0.8); color: var(--gold-hi); font-size: 10px; font-weight: 500; letter-spacing: 0.04em;
}
.viewer.loupe-on .viewer-img { cursor: none; }
.viewer-loupe-size { min-width: 40px; font-size: 11px; letter-spacing: 0.08em; }
@media (max-width: 480px) {
  .viewer [data-v="in"], .viewer [data-v="out"] { display: none; } /* pinch does this on a phone, and the toolbar needs the room */
}

/* ---------- the lens dock lives under the artwork, never on it ---------- */
.slide-art .slide-art { padding-bottom: 60px; }
.lens-dock { top: calc(var(--ly, 0px) + var(--lh, 0px) + 12px); transform: translate(-50%, 0); opacity: 0.62; }
.lens:hover .lens-dock, .lens:focus-within .lens-dock { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) {
  .lens-dock { top: calc(var(--ly, 0px) + var(--lh, 0px) + 10px); opacity: 1; }
}
@media (max-width: 1100px) {
  .slide-art .slide-art { padding-bottom: 54px; }
}

/* ---------- MARCUS's space (/marcus): the conversation, your book, his world ---------- */
.mx {
  display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 14px;
  /* wider than the site's usual column (like the homepage stage), up to 1800 px */
  width: min(100vw, 1800px); max-width: none; margin: 0 0 0 calc(50% - min(50vw, 900px));
  padding: calc(72px + env(safe-area-inset-top)) var(--gutter) 24px;
  height: 100svh; min-height: 640px;
}
/* How he speaks: folded into a small button in the chat bar. */
.mx-about { position: relative; }
.mx-about summary { cursor: pointer; list-style: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-dim); transition: border-color 0.2s, color 0.2s; }
.mx-about summary::-webkit-details-marker { display: none; }
.mx-about summary:hover, .mx-about[open] summary { color: var(--gold-hi); border-color: var(--line-strong); }
.mx-about-body { position: absolute; right: 0; top: calc(100% + 8px); z-index: 20; width: min(560px, 86vw); display: grid; gap: 10px; padding: 16px 18px; border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(21, 18, 15, 0.97); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.7); backdrop-filter: blur(12px); }
/* The stage: the conversation and the Portal side by side, filling the screen. */
.mx-stage { display: grid; grid-template-columns: minmax(0, 1fr) var(--portal-w, clamp(360px, 40%, 760px)); gap: 16px; min-height: 0; transition: grid-template-columns 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.mx-rule { margin: 0; line-height: 1.55; }
.mx-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.mx-book { padding: 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(217, 180, 90, 0.03); }
.mx-book .eyebrow { margin: 0 0 6px; }
.mx-book > .small { margin: 0 0 10px; }
.mx-book-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 10px; max-height: 42vh; overflow: auto; overscroll-behavior: contain; }
.mx-note { display: grid; gap: 4px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); }
.mx-note .med-text { font-size: 16px; }
.mx-note .mono { font-size: 10px; letter-spacing: 0.06em; color: var(--gold-dim); }
.mx-note .link-btn { justify-self: start; font-size: 12px; padding: 0; }
.mx-yours { border-style: dashed; }
.mx-yours p { margin: 0; font-size: 15px; line-height: 1.5; white-space: pre-wrap; }
.mx-empty { display: block; border-style: dashed; } /* one sentence, not a grid of pieces */
.mx-write { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.mx-write textarea {
  width: 100%; min-height: 44px; resize: vertical; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: rgba(11, 10, 9, 0.7); color: var(--text); font: inherit; font-size: 15px;
}
.mx-write textarea:focus { outline: none; border-color: var(--gold); }
.mx-book-tools { display: flex; gap: 16px; margin-top: 10px; }

.mx-chat { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: 22px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); overflow: hidden; }
.mx-chat-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mx-chat-bar .eyebrow { margin: 0; }
.mx-chat-tools { display: flex; gap: 8px; }
.mx-chat-tools [aria-pressed='true'] { background: rgba(217, 180, 90, 0.18); border-color: var(--gold); }
.mx-thread-wrap { position: relative; flex: 1; min-height: 0; display: flex; }
.mx-thread { list-style: none; margin: 0; padding: 18px 22px 12px; display: grid; gap: 14px; align-content: start; flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; scroll-behavior: smooth; }
.mx-turn { display: grid; gap: 6px; animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.mx-who { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-dim); }
.mx-you { justify-self: end; max-width: min(78%, 560px); text-align: right; }
.mx-you .mx-who { justify-self: end; }
.mx-you p { margin: 0; padding: 10px 16px; border-radius: 18px 18px 4px 18px; background: rgba(217, 180, 90, 0.14); border: 1px solid var(--line-strong); color: var(--text); font-size: 16px; text-align: left; overflow-wrap: anywhere; }
.mx-museum { justify-self: center; max-width: min(92%, 640px); text-align: center; }
.mx-museum .mx-who { justify-self: center; }
.mx-museum p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); font-style: italic; }
.mx-marcus { max-width: min(96%, 760px); }
.mx-marcus .med { margin: 0 0 8px; }
.med-around { display: grid; gap: 10px; margin: 12px 0 0; padding: 12px 0 0; border-top: 1px dashed var(--line); }
.med-near { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 8px; opacity: 0.8; }
.med-near .mono { padding-top: 4px; font-size: 10.5px; color: var(--gold-dim); }
.med-near .med-text { font-size: 17px; }
.med-tools [aria-pressed='true'] { background: rgba(217, 180, 90, 0.18); border-color: var(--gold); }
.mx-say { display: grid; gap: 8px; padding: 12px 16px 14px; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(11, 10, 9, 0.35)); }
.mx-chips { margin: 4px 0 0; padding: 0 16px 14px; }
.mx-chat[data-mode='living'] .mx-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.mx-chat[data-mode='living'] .mx-chips::-webkit-scrollbar { display: none; }
.mx-chat[data-mode='living'] .mx-chips .chip { flex: none; white-space: nowrap; }

.mx-world { max-width: 1280px; margin: 0 auto; padding: 36px var(--gutter) 90px; border-top: 1px solid var(--line); }
.mx-world > .eyebrow { margin: 0; }
.mx-world-title { margin: 8px 0 24px; font-size: clamp(26px, 3vw, 40px); color: var(--gold-hi); }
.mx-world-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; }
.mx-met-head { margin: 40px 0 4px; }
.mx-met { margin-top: 16px; }

@media (max-width: 980px) {
  .mx-world-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .mx-thread { padding: 14px 12px 6px; }
  .mx-you { max-width: 88%; }
  .mx-marcus { max-width: 100%; }
  .mx-say { padding: 8px 10px 10px; }
  .med-near { grid-template-columns: 1fr; }
}

/* ---------- MARCUS's library: the shelf, the volumes, the curios, the reader ---------- */
.marcus-library { margin-top: 48px; }
.marcus-library > .small, .mx-library > .small { margin: 6px 0 0; }
.mx-library { margin: 0 0 44px; }
.library { margin-top: 22px; }
.shelves { display: grid; gap: 46px; padding-bottom: 16px; }
.shelf-wrap { position: relative; }
.shelf-wrap::after { /* the ledge each row stands on */
  content: ''; position: absolute; left: -8px; right: -8px; bottom: -16px; height: 14px; border-radius: 3px; pointer-events: none;
  background: linear-gradient(180deg, #4a3820 0%, #2b2012 55%, #17110a 100%);
  box-shadow: 0 22px 30px -14px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(243, 222, 160, 0.28);
}
.shelf { list-style: none; margin: 0; padding: 0 10px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(12px, 2vw, 28px); align-items: end; perspective: 1600px; }
.shelf-slot { display: flex; justify-content: center; align-items: flex-end; min-width: 0; }
.vol {
  all: unset; box-sizing: border-box; position: relative; display: flex; flex-direction: column; align-items: center; gap: 7%;
  width: 100%; max-width: 172px; aspect-ratio: 2 / 3; padding: 11% 9% 8% 15%; cursor: pointer; border-radius: 3px 10px 10px 3px;
  color: var(--gold-hi); text-align: center; transform-origin: left center; transform-style: preserve-3d;
  background:
    radial-gradient(120% 70% at 35% 15%, rgba(255, 255, 255, 0.09), transparent 60%),
    linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0, rgba(0, 0, 0, 0.2) 6%, rgba(255, 244, 214, 0.08) 8%, transparent 13%),
    var(--leather, #3a1f1a);
  box-shadow: inset 0 0 0 1px rgba(243, 222, 160, 0.16), inset -8px 0 18px -10px rgba(0, 0, 0, 0.6), 0 26px 40px -20px rgba(0, 0, 0, 0.95);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.4s;
}
/* Each volume its own leather (set here, not inline: the CSP forbids inline styles). */
.vol[data-vol="1"] { --leather: #4a1d1a; }
.vol[data-vol="2"] { --leather: #1d3a2f; }
.vol[data-vol="3"] { --leather: #1b2a45; }
.vol[data-vol="4"] { --leather: #4b3417; }
.vol[data-vol="5"] { --leather: #3b1f3e; }
.vol[data-vol="6"] { --leather: #2b3b2a; }
.vol[data-vol="7"] { --leather: #522a1f; }
.vol[data-vol="8"] { --leather: #1f343e; }
.vol[data-vol="9"] { --leather: #3e2b12; }
.vol[data-vol="10"] { --leather: #2a2445; }
.vol[data-vol="11"] { --leather: #44201f; }
.vol[data-vol="12"] { --leather: #1f3b36; }
.vol::before { /* the gold tooling */
  content: ''; position: absolute; inset: 5% 6% 5% 12%; border: 1px solid rgba(217, 180, 90, 0.5); border-radius: 2px; pointer-events: none;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.12), inset 0 0 0 4px rgba(217, 180, 90, 0.18);
}
.vol::after { /* the page block, just visible at the fore-edge */
  content: ''; position: absolute; right: -4px; top: 2.5%; bottom: 2.5%; width: 4px; border-radius: 0 2px 2px 0; pointer-events: none;
  background: repeating-linear-gradient(180deg, #e8dfc6 0 1px, #c9bd9c 1px 2px);
}
.vol:hover, .vol:focus-visible { transform: translateY(-12px) rotateY(-14deg); box-shadow: inset 0 0 0 1px rgba(243, 222, 160, 0.3), inset -8px 0 18px -10px rgba(0, 0, 0, 0.6), 18px 36px 50px -22px rgba(0, 0, 0, 0.95); }
.vol:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }
.vol.is-opening { animation: vol-open 0.4s cubic-bezier(0.45, 0.05, 0.3, 1) forwards; }
@keyframes vol-open { to { transform: translateY(-16px) rotateY(-105deg) scale(1.06); opacity: 0.15; } }
.vol-num { font-family: var(--serif); font-size: clamp(17px, 1.7vw, 24px); font-weight: 600; letter-spacing: 0.08em; line-height: 1; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); }
.vol-plate {
  flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; overflow: hidden; border-radius: 2px;
  background: radial-gradient(circle at 50% 40%, #1c1712, #0a0807); box-shadow: 0 0 0 1px rgba(217, 180, 90, 0.55), 0 0 0 4px rgba(0, 0, 0, 0.35), inset 0 0 18px rgba(0, 0, 0, 0.8);
}
.vol-plate img { width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.6s; }
.vol.has-cover .vol-plate img { opacity: 1; }
.vol-title { font-family: var(--serif); font-size: clamp(10px, 0.95vw, 13px); letter-spacing: 0.24em; text-transform: uppercase; line-height: 1; }
.vol-meta { font-size: clamp(8px, 0.7vw, 9.5px); letter-spacing: 0.08em; color: rgba(243, 222, 160, 0.62); min-height: 1em; }
.vol-yours {
  --leather: #d8cbad; color: #3b2d17; max-width: 150px; justify-content: center; gap: 10%;
  background: radial-gradient(120% 70% at 35% 15%, rgba(255, 255, 255, 0.35), transparent 60%), linear-gradient(90deg, rgba(0, 0, 0, 0.25) 0, transparent 10%), var(--leather);
}
.vol-yours::before { border-color: rgba(90, 64, 25, 0.45); box-shadow: none; }
.vol-yours .vol-num { font-size: 26px; color: #8a6421; text-shadow: none; }
.vol-yours-title { font-family: var(--serif); font-size: clamp(14px, 1.3vw, 18px); line-height: 1.15; font-style: italic; }
.vol-yours .vol-meta { color: rgba(59, 45, 23, 0.7); }
.shelf-own { grid-template-columns: 1fr minmax(0, 150px) 1fr; justify-items: center; }
.curio { all: unset; box-sizing: border-box; display: grid; justify-items: center; gap: 10px; cursor: pointer; max-width: 200px; text-align: center; }
.curio:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; border-radius: 8px; }
.curio-art { display: block; overflow: hidden; background: #0e0c0a; transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); }
.curio-art img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s; }
.curio-art img[src] { opacity: 1; }
.curio-coin .curio-art { width: clamp(84px, 9vw, 120px); aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 0 1px var(--line-strong), 0 0 0 6px rgba(217, 180, 90, 0.07), 0 20px 34px -16px rgba(0, 0, 0, 0.95); }
.curio-coin .curio-art img { transform: scale(2.05); filter: sepia(0.25) contrast(1.08); }
.curio-frame .curio-art { width: clamp(120px, 13vw, 180px); aspect-ratio: 5 / 4; border: 7px solid #5b451d; outline: 1px solid rgba(243, 222, 160, 0.45); outline-offset: -3px; transform: rotate(-2.5deg); box-shadow: 0 24px 36px -18px rgba(0, 0, 0, 0.95); }
.curio:hover .curio-art, .curio:focus-visible .curio-art { transform: translateY(-6px) rotate(0deg); }
.curio-label { font-size: 11.5px; line-height: 1.35; color: var(--muted); max-width: 180px; }

.reader { animation: rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.reader-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 14px; }
.reader-title { margin: 0; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.reader-books { display: flex; gap: 8px; }
.reader-books .btn:disabled, .reader-turn:disabled { opacity: 0.3; cursor: default; }
.reader-paper {
  padding: clamp(22px, 3.2vw, 44px) clamp(22px, 4vw, 56px); border-radius: 6px 14px 14px 6px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.35), transparent 2%, transparent 49.2%, rgba(0, 0, 0, 0.38) 50%, transparent 50.8%, transparent 98%, rgba(0, 0, 0, 0.3)), linear-gradient(180deg, #17130e, #120f0b);
  box-shadow: inset 0 0 0 1px var(--line), 0 30px 60px -30px rgba(0, 0, 0, 0.9);
}
.reader-pages { position: relative; height: min(62vh, 640px); column-count: 2; column-gap: clamp(48px, 7vw, 108px); column-fill: auto; overflow: hidden; outline: none; touch-action: pan-y; /* sideways swipes turn pages */ }
.reader-pages:focus-visible { box-shadow: inset 0 -1px 0 rgba(217, 180, 90, 0.35); } /* a quiet mark: the page is where the keys go */
.reader-titlepage { break-after: column; height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 6px; }
.reader-titlepage .eyebrow { margin: 0; }
.reader-numeral { margin: 6px 0 0; font-size: clamp(64px, 8vw, 110px); line-height: 1; color: var(--gold-hi); }
.reader-book-name { margin: 0; font-size: clamp(24px, 2.6vw, 34px); color: var(--gold-hi); }
.reader-titlepage .small { margin: 4px 0 0; }
.reader-note { margin: 14px 0 0; font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--text); }
.reader-credit { max-width: 32ch; }
.reader-passage { margin: 0 0 1.15em; }
.reader-passage .med-text { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.62; }
.reader-passage .med-text p { margin: 0 0 0.55em; }
.reader-ref { display: block; margin: 0 0 3px; font-size: 10.5px; letter-spacing: 0.08em; color: var(--gold-dim); }
.reader-passage.is-focus { background: rgba(217, 180, 90, 0.12); box-shadow: 0 0 0 8px rgba(217, 180, 90, 0.12); border-radius: 2px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
.reader-yours p { margin: 0; font-size: 16px; line-height: 1.6; white-space: pre-wrap; }
.reader-end { break-before: column; padding-top: 22%; text-align: center; display: grid; justify-items: center; gap: 14px; }
.reader-end-title { margin: 0; font-size: clamp(22px, 2.4vw, 30px); color: var(--gold-hi); }
.reader-foot { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; }
.reader-count { margin: 0; min-width: 150px; text-align: center; font-size: 11px; letter-spacing: 0.08em; color: var(--muted); }
.reader-turn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.6); color: var(--gold-hi); font-size: 22px; line-height: 1; cursor: pointer; }
.reader-turn:hover:not(:disabled) { border-color: var(--gold); }
.reader-turn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (max-width: 1100px) {
  .shelf { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 760px) {
  .shelf:not(.shelf-own) { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 38%; overflow-x: auto; scroll-snap-type: x mandatory; padding: 16px 10px 6px; margin: -16px 0 0; scrollbar-width: none; }
  .shelf:not(.shelf-own)::-webkit-scrollbar { display: none; }
  .shelf:not(.shelf-own) .shelf-slot { scroll-snap-align: start; }
  .shelf-own { grid-template-columns: 1fr minmax(0, 120px) 1fr; gap: 10px; }
  .vol-num { font-size: 20px; }
  .vol-title { font-size: 10.5px; }
  .vol-meta { font-size: 9px; }
  .reader-paper { padding: 20px 18px; background: linear-gradient(180deg, #17130e, #120f0b); }
  .reader-pages { column-count: 1; height: 60svh; column-gap: 40px; }
  .reader-books .btn { padding: 6px 12px; }
}

/* ---------- MARCUS alive: HANDS OF GOD in his space ---------- */
/* One voice, MARCUS, in two ways: alive through HANDS OF GOD (gold with a violet edge: his mind and
   hands at work) or from his book alone. Every step he takes draws itself into a timeline. */
.mx-chat { position: relative; transition: border-color 0.5s, box-shadow 0.5s; }
.mx-chat[data-mode='living'] { border-color: rgba(139, 124, 246, 0.28); box-shadow: 0 0 0 1px rgba(139, 124, 246, 0.06), 0 30px 80px -40px rgba(139, 124, 246, 0.35); }
.mx-chat[data-mode='book'] .hog-only, .mx-chat[data-mode='living'] .book-only { display: none; }
.mx-chat::before {
  content: ''; position: absolute; inset: 0 0 auto; height: 1px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, var(--violet), var(--gold-hi), transparent); background-size: 50% 100%; background-repeat: no-repeat;
}
.mx-chat.is-working::before { opacity: 1; animation: hog-sweep 1.6s cubic-bezier(0.5, 0, 0.5, 1) infinite; }
@keyframes hog-sweep { from { background-position: -60% 0; } to { background-position: 160% 0; } }

.mx-modes { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; border: 1px solid var(--line); background: rgba(11, 10, 9, 0.55); }
.mx-mode {
  display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 5px 14px 5px 7px; border: 1px solid transparent; border-radius: 999px;
  background: none; color: var(--muted); font: inherit; text-align: left; cursor: pointer; transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.mx-mode:hover { color: var(--text); }
.mx-mode:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mx-mode[aria-checked='true'] { color: var(--gold-hi); background: rgba(217, 180, 90, 0.12); border-color: var(--line-strong); }
.mx-mode[data-mx-mode='living'][aria-checked='true'] { background: linear-gradient(120deg, rgba(139, 124, 246, 0.2), rgba(217, 180, 90, 0.12)); border-color: rgba(139, 124, 246, 0.45); }
.mx-mode-text { display: grid; line-height: 1.15; }
.mx-mode-text b { font-size: 11px; font-weight: 600; letter-spacing: 0.2em; }
.mx-mode-text small { font-size: 10.5px; letter-spacing: 0.02em; color: var(--muted); }
.mx-mode .marcus-sigil { width: 26px; height: 26px; font-size: 12px; flex: none; }
.hog-mark { display: inline-grid; place-items: center; width: 26px; height: 26px; flex: none; border-radius: 50%; border: 1px solid rgba(139, 124, 246, 0.6); color: var(--gold-hi); background: radial-gradient(circle at 50% 35%, rgba(139, 124, 246, 0.35), transparent 70%); }
.hog-mark svg { width: 16px; height: 16px; }
.mx-chat.is-working .mx-mode[data-mx-mode='living'] .hog-mark, .mx-living.is-live .hog-mark { animation: hog-breathe 1.8s ease-in-out infinite; }
@keyframes hog-breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(139, 124, 246, 0); } 50% { box-shadow: 0 0 0 6px rgba(139, 124, 246, 0.16), 0 0 18px rgba(217, 180, 90, 0.25); } }

.mx-say .btn.is-stop { background: rgba(11, 10, 9, 0.7); color: var(--gold-hi); border-color: rgba(139, 124, 246, 0.6); }
.mx-say .btn.is-stop::before { content: ''; width: 9px; height: 9px; border-radius: 2px; background: currentColor; }

/* A turn from the AI: who's driving, the timeline, the answer, the receipt. */
.mx-living { max-width: min(98%, 780px); gap: 10px; }
.mx-living .mx-who { color: var(--gold); }
.mx-living .mx-who > .marcus-sigil { width: 22px; height: 22px; box-shadow: 0 0 0 3px rgba(217, 180, 90, 0.08); }
.mx-living.is-live .mx-who > .marcus-sigil { animation: hog-breathe 1.8s ease-in-out infinite; }
.hog-note .hog-glyph .marcus-sigil { width: 16px; height: 16px; border: 0; font-size: 9px; }
.hog-model { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 4px; border-radius: 999px; border: 1px solid rgba(139, 124, 246, 0.35); font-size: 9.5px; letter-spacing: 0.08em; text-transform: none; color: #c9c0ff; background: rgba(139, 124, 246, 0.08); }
.hog-model .hog-mark { width: 16px; height: 16px; border: 0; }
.hog-model .hog-mark svg { width: 11px; height: 11px; }
.hog-model-name { color: var(--text); letter-spacing: 0.04em; }
.hog-model.is-set { background: linear-gradient(90deg, rgba(139, 124, 246, 0.08) 0%, rgba(243, 222, 160, 0.35) 50%, rgba(139, 124, 246, 0.08) 100%) 0 0 / 250% 100%; animation: hog-arrive 1.1s ease-out 1 both; }
@keyframes hog-arrive { from { background-position: 100% 0; } to { background-position: 0 0; } }

.hog-trace { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; }
.hog-trace:empty { display: none; }
.hog-step { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; padding: 0 0 12px; animation: hog-in 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hog-step::before { content: ''; position: absolute; left: 12.5px; top: 28px; bottom: 2px; width: 1px; background: linear-gradient(180deg, rgba(139, 124, 246, 0.5), rgba(217, 180, 90, 0.18)); transform-origin: top; animation: hog-line 0.6s ease-out both; }
.hog-step:last-child::before { display: none; }
@keyframes hog-in { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: none; } }
@keyframes hog-line { from { transform: scaleY(0); } }
.hog-glyph { position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--gold); }
.hog-glyph svg { width: 14px; height: 14px; }
.hog-glyph svg * { stroke-dasharray: 1; stroke-dashoffset: 0; animation: hog-draw 0.9s ease-out both; }
@keyframes hog-draw { from { stroke-dashoffset: 1; } }
.hog-step[data-state='running'] .hog-glyph { border-color: var(--violet); color: var(--gold-hi); }
.hog-step[data-state='running'] .hog-glyph::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid transparent; border-top-color: var(--violet); border-right-color: rgba(217, 180, 90, 0.5); animation: hog-spin 0.9s linear infinite; }
@keyframes hog-spin { to { transform: rotate(360deg); } }
.hog-step[data-state='ok'] .hog-glyph { border-color: var(--gold); }
.hog-step[data-state='fail'] .hog-glyph { border-color: rgba(255, 120, 100, 0.6); color: #ffb2a6; }
.hog-step-body { min-width: 0; padding-top: 3px; }
.hog-step-head { margin: 0; font-size: 13px; line-height: 1.4; color: var(--text); }
.hog-step-head b { font-weight: 600; letter-spacing: 0.02em; }
.hog-step[data-state='running'] .hog-step-head b {
  background: linear-gradient(90deg, var(--muted) 0%, var(--gold-hi) 45%, #c9c0ff 55%, var(--muted) 100%) 0 0 / 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: hog-shimmer 1.4s linear infinite;
}
@keyframes hog-shimmer { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.hog-args { color: var(--muted); overflow-wrap: anywhere; }
.hog-sum { margin: 3px 0 0; font-size: 10.5px; letter-spacing: 0.04em; color: var(--gold-dim); }
.hog-view:empty { display: none; }
.hog-view { margin-top: 8px; }
.hog-note p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); font-style: italic; }
.hog-think summary { cursor: pointer; padding-top: 3px; font-family: var(--serif); font-size: 16px; font-style: italic; color: #c9c0ff; list-style: none; }
.hog-think summary::-webkit-details-marker { display: none; }
.hog-think summary::after { content: ' ›'; color: var(--muted); }
.hog-think details[open] summary::after { content: ' ⌄'; }
.hog-think[data-state='running'] summary { animation: hog-glow 1.6s ease-in-out infinite; }
@keyframes hog-glow { 50% { color: var(--gold-hi); } }
.hog-think-text {
  margin: 6px 0 0; max-height: 9.5em; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.6; color: var(--muted);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 1.6em); mask-image: linear-gradient(180deg, transparent 0, #000 1.6em);
}
.hog-think[data-state='done'] .hog-think-text { max-height: 16em; -webkit-mask-image: none; mask-image: none; }

.hog-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hog-chip, .q-seal {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: rgba(217, 180, 90, 0.06); color: var(--gold-hi); font: 500 10.5px/1.3 var(--mono); letter-spacing: 0.04em; cursor: pointer; transition: background 0.2s, border-color 0.2s;
}
.hog-chip:hover, .q-seal:hover { background: rgba(217, 180, 90, 0.14); border-color: var(--gold); }
.q-seal { padding: 1px 8px; vertical-align: 1px; }
.q-warn { display: inline-block; padding: 1px 8px; border-radius: 999px; border: 1px solid rgba(255, 120, 100, 0.5); color: #ffb2a6; font: 500 10.5px/1.4 var(--mono); letter-spacing: 0.04em; vertical-align: 1px; }
p.q-warn { display: block; width: fit-content; margin: 0 0 12px; }
.hog-works { display: grid; grid-auto-flow: column; grid-auto-columns: 128px; gap: 10px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.hog-work { display: grid; gap: 4px; align-content: start; text-decoration: none; color: var(--text); }
.hog-work img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--panel-2); transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.3s; }
.hog-work:hover img { transform: translateY(-2px); border-color: var(--gold); }
.hog-work-title { font-size: 12px; line-height: 1.3; }
.hog-work small { font-size: 10.5px; color: var(--muted); }
.hog-cred { margin: 6px 0 0; font-size: 11px; }
.hog-sources { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.hog-sources > .mono { font-size: 10px; letter-spacing: 0.08em; color: #c9c0ff; margin-right: 4px; }
.hog-source { padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(139, 124, 246, 0.35); font-size: 11.5px; color: var(--text); text-decoration: none; background: rgba(139, 124, 246, 0.06); }
.hog-source:hover { border-color: var(--violet); }
.hog-image { margin: 0; max-width: 440px; }
.hog-image img { display: block; width: 100%; border-radius: 12px; border: 1px solid rgba(139, 124, 246, 0.4); animation: hog-develop 1.4s ease-out both; }
@keyframes hog-develop { from { opacity: 0; filter: blur(14px) saturate(0.2); } to { opacity: 1; filter: none; } }
.hog-image figcaption { margin-top: 6px; font-size: 10px; letter-spacing: 0.06em; color: #c9c0ff; }

/* His answer, in his voice: the serif of his book, a little larger than the museum's own lines. */
.hog-answer { font-family: var(--serif); font-size: 20px; line-height: 1.5; color: var(--text); overflow-wrap: anywhere; }
.hog-answer .med-text { font-size: 20px; }
.hog-answer code, .hog-answer .q-seal, .hog-answer .q-warn { font-family: var(--mono); }
.hog-answer .btn { font-family: var(--sans); }
.hog-answer:empty { display: none; }
.mx-living.is-live .hog-answer:empty { display: block; height: 1.2em; width: min(260px, 60%); border-radius: 6px; background: linear-gradient(90deg, rgba(217, 180, 90, 0.05), rgba(139, 124, 246, 0.18), rgba(217, 180, 90, 0.05)) 0 0 / 200% 100%; animation: hog-shimmer 1.4s linear infinite; }
.hog-answer p, .hog-answer ul, .hog-answer ol { margin: 0 0 0.8em; }
.hog-answer > :last-child { margin-bottom: 0; }
.hog-answer ul, .hog-answer ol { padding-left: 1.3em; }
.hog-answer li { margin: 0.2em 0; }
.hog-answer h4 { margin: 1em 0 0.4em; font: 600 11px/1.3 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.hog-answer strong { color: var(--gold-hi); font-weight: 600; }
.hog-answer code { padding: 1px 5px; border-radius: 4px; background: rgba(217, 180, 90, 0.08); font: 0.88em var(--mono); }
.hog-answer a { color: var(--gold-hi); text-decoration: underline; text-decoration-color: rgba(217, 180, 90, 0.4); text-underline-offset: 3px; }
.hog-answer .q { color: var(--text); }
.hog-quote { margin: 4px 0 14px; }
/* A "> quotation" in model text (v0.19.7): set as a quote, never as a raw mark. In his answer one that is
   his book's gives way to the sealed passage; what stays is someone else's words, so it reads as theirs. */
.typed-quote { margin: 6px 0 14px; padding: 2px 0 2px 16px; border-left: 2px solid var(--gold-dim); font-style: italic; }
.typed-quote p { margin: 0 0 8px; }
.typed-quote p:last-child { margin-bottom: 0; }
.typed-quote .q-warn { font-style: normal; }
.hog-seal { margin: 0 0 6px; font-size: 10px; letter-spacing: 0.1em; color: var(--gold); }
.hog-quote .med { margin: 0; animation: hog-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.mx-living.is-live .hog-quote .med { animation: none; }
/* A passage he cited without looking it up says so (api/hands.js audits every answer). */
.hog-memory { color: var(--gold-dim); letter-spacing: 0.04em; }
.q-seal.q-memory { border-style: dashed; }
.q-seal.q-memory::after { content: ' · from memory'; color: var(--gold-dim); }
/* A long passage folds to the part that fits a screen; every word stays on the page, one tap away. */
.med.is-folded .med-fold { display: none; }
.med.is-folded [data-cut-before]::before { content: '… '; color: var(--gold-dim); }
.med.is-folded [data-cut-after]::after { content: ' …'; color: var(--gold-dim); }
.med-whole { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin-top: 8px; padding: 6px 0; border: 0; background: none; font: 600 10.5px/1.3 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); cursor: pointer; }
.med-whole::after { content: '↓'; letter-spacing: 0; transition: transform 0.2s; }
.med-whole[aria-expanded='true']::after { transform: rotate(180deg); }
.med-whole:hover, .med-whole:focus-visible { color: var(--gold-hi); }
.hog-caret { display: inline-block; width: 0.5em; height: 1.05em; margin-left: 2px; vertical-align: -0.16em; border-radius: 1px; background: linear-gradient(180deg, var(--gold-hi), var(--violet)); animation: hog-blink 1s steps(2, jump-none) infinite; }
@keyframes hog-blink { 50% { opacity: 0; } }
.hog-error { margin: 0; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255, 120, 100, 0.35); background: rgba(255, 120, 100, 0.06); color: #ffcdc4; font-size: 13.5px; }
.hog-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 10.5px; letter-spacing: 0.04em; color: var(--muted); }
.hog-foot:empty { display: none; }
.hog-foot .btn { min-height: 36px; padding: 6px 14px; }
.hog-foot [aria-pressed='true'] { background: rgba(139, 124, 246, 0.16); border-color: var(--violet); }

/* What his tools bring back. */
.hog-vision { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; margin: 0; padding: 10px; border: 1px solid rgba(139, 124, 246, 0.3); border-radius: 12px; background: rgba(139, 124, 246, 0.04); }
.hog-vision img { width: 96px; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); animation: hog-develop 1.2s ease-out both; }
.hog-vision-head { margin: 0 0 4px; font-size: 10px; letter-spacing: 0.08em; color: #c9c0ff; }
.hog-vision-text { max-height: 12em; overflow: auto; font-size: 13.5px; line-height: 1.55; color: var(--text); }
.hog-vision-text p { margin: 0 0 0.6em; }
/* Words that are not his (vision, a scholar, a web answer) arrive as markdown: small headings, lists, bold. */
.hog-vision-text h4, .hog-scholar h4, .portal-answer h4 { margin: 0.9em 0 0.35em; font: 600 10.5px/1.3 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; color: #c9c0ff; }
.hog-vision-text h4:first-child, .portal-answer h4:first-child { margin-top: 0; }
.portal-answer h4 { color: var(--gold); }
.hog-vision-text ul, .hog-vision-text ol, .hog-scholar ul, .hog-scholar ol, .portal-answer ul, .portal-answer ol { margin: 0 0 0.6em; padding-left: 1.2em; }
.hog-vision-text li, .hog-scholar li, .portal-answer li { margin: 0.2em 0; }
.hog-vision-text strong, .hog-scholar strong { color: #e4defc; font-weight: 600; }
.portal-answer strong { color: var(--gold-hi); font-weight: 600; }
.hog-vision-text code, .hog-scholar code, .portal-answer code { padding: 1px 4px; border-radius: 4px; background: rgba(139, 124, 246, 0.1); font: 0.88em var(--mono); }
.hog-vision figcaption { margin-top: 6px; font-size: 11px; }
.hog-rooms, .hog-headlines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hog-rooms a, .hog-headlines a { display: grid; gap: 1px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--text); transition: border-color 0.2s, background 0.2s; }
.hog-rooms a:hover, .hog-headlines a:hover { border-color: var(--gold); background: rgba(217, 180, 90, 0.05); }
.hog-rooms small, .hog-headlines small { font-size: 10.5px; letter-spacing: 0.06em; color: var(--gold-dim); }
.hog-rooms b, .hog-headlines b { font-size: 13.5px; font-weight: 500; }
.hog-room-about { font-size: 12px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.hog-headlines { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.hog-videos { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 260px); gap: 10px; overflow-x: auto; padding-bottom: 4px; }
.hog-scholar { padding: 8px 12px; border: 1px dashed rgba(139, 124, 246, 0.4); border-radius: 10px; font-size: 13.5px; line-height: 1.55; }
.hog-scholar summary { cursor: pointer; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: #c9c0ff; }
.hog-scholar p { margin: 8px 0 0; }
.hog-film { margin: 0; max-width: 440px; }
.hog-film-frame { position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 12px; border: 1px solid rgba(139, 124, 246, 0.4); background: var(--panel-2); aspect-ratio: 16 / 10; }
.hog-film-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(0.4) brightness(0.55); }
.hog-film-frame video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.hog-film-status { position: relative; padding: 6px 12px; border-radius: 999px; background: rgba(11, 10, 9, 0.75); font-size: 11px; letter-spacing: 0.06em; color: var(--gold-hi); }
.hog-film:not([data-ready]) .hog-film-frame::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(201, 192, 255, 0.18) 50%, transparent 70%) 0 0 / 250% 100%; animation: hog-shimmer 1.8s linear infinite; }
.hog-film figcaption { margin-top: 6px; font-size: 10px; letter-spacing: 0.06em; color: #c9c0ff; }

@media (max-width: 640px) {
  .mx-chat-bar { padding: 10px 12px; }
  .hog-answer, .hog-answer .med-text { font-size: 18px; }
  .hog-vision { grid-template-columns: 72px minmax(0, 1fr); }
  .hog-vision img { width: 72px; }
  .mx-modes { width: 100%; }
  .mx-mode { flex: 1; min-width: 0; padding-right: 8px; }
  .mx-mode-text small { display: none; }
  .mx-mode-text b { font-size: 10.5px; letter-spacing: 0.14em; }
  .mx-chat-tools { width: 100%; gap: 6px; }
  .mx-chat-tools .btn { flex: 1; min-width: 0; padding: 8px 10px; letter-spacing: 0.12em; }
  .mx-long { display: none; }
  .mx-chips .chip { white-space: nowrap; }
  .mx-living { max-width: 100%; }
  .hog-answer { font-size: 15px; }
  .hog-works { grid-auto-columns: 112px; }
}

/* ---------- MARCUS's chat, pro: the composer, the tree of thoughts, vines, actions, files ---------- */
.mx-chat { min-height: 0; height: 100%; }
.mx-chat-tools { align-items: center; gap: 6px; }
.mx-tool {
  display: inline-flex; align-items: center; gap: 7px; min-height: 40px; min-width: 40px; justify-content: center; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(11, 10, 9, 0.45); color: var(--gold-hi); cursor: pointer;
  font: 500 11px/1 var(--sans); letter-spacing: 0.16em; text-transform: uppercase; transition: border-color 0.2s, background 0.2s, transform 0.2s;
}
.mx-tool svg { width: 17px; height: 17px; }
.mx-tool:hover { border-color: var(--gold); background: rgba(217, 180, 90, 0.08); }
.mx-tool:focus-visible, .mx-icon:focus-visible, .mx-act:focus-visible, .mx-leaf:focus-visible, .mx-vine:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mx-tool[aria-pressed='true'] { background: rgba(217, 180, 90, 0.16); border-color: var(--gold); }
.mx-portal-toggle { display: inline-flex; position: relative; }
.mx-portal-toggle.has-new::after { content: ''; position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.25); animation: pulse 1.8s infinite; }
.mx-latest {
  position: absolute; right: 18px; bottom: 14px; z-index: 3; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: rgba(21, 18, 15, 0.92); color: var(--gold-hi); cursor: pointer; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
  animation: hog-in 0.3s ease-out both;
}
.mx-latest svg { width: 18px; height: 18px; }
.mx-latest[hidden] { display: none; }

/* The composer: one line that grows, with its tools inside it. */
.mx-composer {
  display: flex; align-items: flex-end; gap: 6px; padding: 6px; border-radius: 26px; border: 1px solid var(--line-strong);
  background: rgba(11, 10, 9, 0.72); transition: border-color 0.25s, box-shadow 0.25s;
}
.mx-composer:focus-within { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217, 180, 90, 0.1), 0 20px 50px -30px rgba(217, 180, 90, 0.5); }
.mx-chat[data-mode='living'] .mx-composer:focus-within { border-color: rgba(201, 192, 255, 0.7); box-shadow: 0 0 0 4px rgba(139, 124, 246, 0.12), 0 20px 50px -30px rgba(139, 124, 246, 0.6); }
.mx-composer textarea {
  flex: 1; min-width: 0; min-height: 44px; max-height: 220px; resize: none; padding: 11px 6px; border: 0; background: none; color: var(--text);
  font: inherit; font-size: 16px; line-height: 1.45; outline: none;
}
.mx-composer textarea::placeholder { color: var(--muted); }
.mx-icon {
  flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid transparent;
  background: none; color: var(--gold-dim); cursor: pointer; transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.2s;
}
.mx-icon svg { width: 20px; height: 20px; }
.mx-icon:hover { color: var(--gold-hi); background: rgba(217, 180, 90, 0.08); }
.mx-icon[aria-pressed='true'] { color: var(--gold-hi); border-color: rgba(139, 124, 246, 0.55); background: rgba(139, 124, 246, 0.14); }
.mx-chat.is-listening [data-mx='dictate'] { color: #ffb2a6; border-color: rgba(255, 120, 100, 0.6); animation: live 1.4s infinite; }
.mx-send { flex: none; min-height: 44px; }
.mx-editing { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 6px 12px; border-radius: 10px; background: rgba(139, 124, 246, 0.1); font-size: 12px; letter-spacing: 0.08em; color: #c9c0ff; }
.mx-editing[hidden] { display: none; }

/* Files waiting to be sent. */
.mx-tray { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.mx-tray[hidden] { display: none; }
.mx-tray-item {
  position: relative; flex: none; display: flex; align-items: center; gap: 10px; max-width: 260px; padding: 6px 34px 6px 6px;
  border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(21, 18, 15, 0.9); animation: hog-in 0.35s ease-out both;
}
.mx-tray-item img, .mx-tray-item .mx-file-icon { width: 44px; height: 44px; flex: none; border-radius: 10px; object-fit: cover; }
.mx-tray-text { display: grid; min-width: 0; }
.mx-tray-text b { font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-tray-text small { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-tray-item[data-state='reading'] .mx-tray-text small { background: linear-gradient(90deg, var(--muted) 0%, var(--gold-hi) 50%, var(--muted) 100%) 0 0 / 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: hog-shimmer 1.4s linear infinite; }
.mx-tray-item[data-state='failed'] { border-color: rgba(255, 120, 100, 0.5); }
.mx-tray-item[data-state='failed'] .mx-tray-text small { color: #ffb2a6; }
.mx-tray-x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(237, 231, 218, 0.08); color: var(--text); cursor: pointer; font-size: 15px; line-height: 1; }
.mx-tray-x:hover { background: rgba(255, 120, 100, 0.25); }
.mx-file-icon { display: grid; place-items: center; background: rgba(217, 180, 90, 0.08); color: var(--gold); }
.mx-file-icon svg { width: 22px; height: 22px; }

/* Dropping files onto the conversation. */
.mx-drop { position: absolute; inset: 0; z-index: 30; display: none; place-items: center; border-radius: inherit; border: 2px dashed rgba(201, 192, 255, 0.7); background: rgba(11, 10, 9, 0.82); backdrop-filter: blur(6px); pointer-events: none; }
.mx-drop span { display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-hi); }
.mx-drop svg { width: 22px; height: 22px; }
.mx-chat.is-dropping .mx-drop { display: grid; }

/* Files inside your message. */
.mx-files { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.mx-file {
  position: relative; display: grid; gap: 4px; width: 132px; padding: 5px; border-radius: 14px; border: 1px solid var(--line-strong);
  background: rgba(21, 18, 15, 0.9); color: var(--text); cursor: pointer; text-align: left; transition: border-color 0.2s, transform 0.25s;
}
.mx-file:hover { border-color: var(--gold); transform: translateY(-2px); }
.mx-file img, .mx-file .mx-file-icon { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.mx-file-play { position: absolute; top: 34px; left: 50%; transform: translateX(-50%); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(11, 10, 9, 0.7); color: var(--gold-hi); font-size: 12px; }
.mx-file-name { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-file small { font-size: 10px; color: var(--muted); }

/* The actions under a message: quiet until you look for them. */
.mx-acts { display: inline-flex; flex-wrap: wrap; gap: 2px; }
.mx-you .mx-acts { justify-self: end; opacity: 0; transition: opacity 0.2s; }
.mx-you:hover .mx-acts, .mx-you:focus-within .mx-acts { opacity: 1; }
.mx-act {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 10px; border-radius: 999px; border: 1px solid transparent;
  background: none; color: var(--muted); cursor: pointer; font: 500 10.5px/1 var(--sans); letter-spacing: 0.08em; transition: color 0.2s, background 0.2s, border-color 0.2s;
}
.mx-act svg { width: 15px; height: 15px; }
.mx-act:hover { color: var(--gold-hi); background: rgba(217, 180, 90, 0.07); border-color: var(--line); }
.mx-act[aria-pressed='true'] { color: var(--gold-hi); border-color: rgba(139, 124, 246, 0.5); background: rgba(139, 124, 246, 0.12); }
.hog-foot { justify-content: space-between; row-gap: 4px; }
.hog-receipt:empty { display: none; }

/* A fresh conversation: a tree of thoughts grows beneath the first words. */
.mx-tree { list-style: none; display: grid; gap: 14px; padding: 8px 0 4px; animation: hog-in 0.6s ease-out both; }
.mx-tree-title { margin: 0; display: grid; justify-items: center; gap: 2px; text-align: center; }
.mx-tree-title .display { font-size: clamp(22px, 2.2vw, 30px); color: var(--gold-hi); }
.mx-tree-title small { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dim); }
.mx-tree-leaves { position: relative; list-style: none; margin: 0 auto; padding: 4px 0; width: min(100%, 720px); display: grid; grid-template-columns: 1fr 1fr; column-gap: 44px; row-gap: 10px; }
.mx-tree-leaves::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px; transform: translateX(-1px); border-radius: 2px;
  background: linear-gradient(180deg, var(--gold-hi), rgba(139, 124, 246, 0.7) 60%, transparent); transform-origin: top; animation: tree-grow 0.9s cubic-bezier(0.3, 0.7, 0.2, 1) both;
}
@keyframes tree-grow { from { transform: translateX(-1px) scaleY(0); } }
.mx-tree-leaves li { position: relative; display: flex; animation: hog-in 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.mx-tree-leaves li:nth-child(odd) { justify-content: flex-end; }
/* Each leaf hangs from the stem on a short branch, with a glowing node where it meets the stem. */
.mx-tree-leaves li::before { content: ''; position: absolute; top: 50%; width: 22px; border-top: 1.5px solid rgba(217, 180, 90, 0.5); }
.mx-tree-leaves li::after { content: ''; position: absolute; top: calc(50% - 3px); width: 7px; height: 7px; border-radius: 50%; background: var(--gold-hi); box-shadow: 0 0 10px rgba(243, 222, 160, 0.7); }
.mx-tree-leaves li:nth-child(odd)::before { right: -22px; }
.mx-tree-leaves li:nth-child(odd)::after { right: -25.5px; }
.mx-tree-leaves li:nth-child(even)::before { left: -22px; }
.mx-tree-leaves li:nth-child(even)::after { left: -25.5px; }
.mx-tree-leaves li:nth-child(2) { animation-delay: 0.08s; } .mx-tree-leaves li:nth-child(3) { animation-delay: 0.16s; } .mx-tree-leaves li:nth-child(4) { animation-delay: 0.24s; }
.mx-tree-leaves li:nth-child(5) { animation-delay: 0.32s; } .mx-tree-leaves li:nth-child(6) { animation-delay: 0.4s; } .mx-tree-leaves li:nth-child(7) { animation-delay: 0.48s; }
.mx-tree-leaves li:nth-child(n+8) { animation-delay: 0.56s; }
.mx-leaf, .mx-vine {
  display: inline-flex; align-items: center; gap: 9px; max-width: 100%; padding: 10px 16px 10px 12px; border-radius: 16px 16px 16px 4px;
  border: 1px solid var(--line-strong); background: linear-gradient(135deg, rgba(217, 180, 90, 0.08), rgba(139, 124, 246, 0.06)); color: var(--text);
  font: 400 14px/1.35 var(--sans); text-align: left; cursor: pointer; transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s, background 0.25s;
}
.mx-leaf svg, .mx-vine svg { width: 16px; height: 16px; flex: none; color: var(--gold); transition: transform 0.4s; }
.mx-leaf:hover, .mx-vine:hover { border-color: var(--gold); transform: translateY(-2px); box-shadow: 0 16px 36px -22px rgba(217, 180, 90, 0.7); background: linear-gradient(135deg, rgba(217, 180, 90, 0.14), rgba(139, 124, 246, 0.1)); }
.mx-leaf:hover svg, .mx-vine:hover svg { transform: rotate(-18deg) scale(1.1); }
.mx-tree-leaves li:nth-child(odd) .mx-leaf { border-radius: 16px 16px 4px 16px; }

/* Vines: the thoughts that grow from an answer. Only the latest answer keeps its vines. */
.mx-vines { position: relative; display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 2px 22px; }
.mx-vines::before { content: ''; position: absolute; left: 8px; top: -2px; bottom: 50%; width: 12px; border-left: 1.5px solid rgba(139, 124, 246, 0.5); border-bottom: 1.5px solid rgba(139, 124, 246, 0.5); border-bottom-left-radius: 12px; transform-origin: top; animation: tree-grow 0.6s ease-out both; }
.mx-vine { padding: 7px 13px 7px 10px; font-size: 13px; animation: hog-in 0.45s ease-out both; }
.mx-vine:nth-child(2) { animation-delay: 0.1s; } .mx-vine:nth-child(3) { animation-delay: 0.2s; }
.mx-thread > li:not(:last-child) .mx-vines { display: none; }

@media (max-width: 640px) {
  .mx-tree-leaves { grid-template-columns: 1fr; padding-left: 26px; }
  .mx-tree-leaves::before { left: 8px; transform: none; }
  @keyframes tree-grow { from { transform: scaleY(0); } }
  .mx-tree-leaves li, .mx-tree-leaves li:nth-child(odd) { justify-content: flex-start; transform: none; }
  .mx-tree-leaves li:nth-child(even) { transform: none; }
  .mx-tree-leaves li::before, .mx-tree-leaves li:nth-child(odd)::before, .mx-tree-leaves li:nth-child(even)::before { left: -17px; right: auto; width: 16px; }
  .mx-tree-leaves li::after, .mx-tree-leaves li:nth-child(odd)::after, .mx-tree-leaves li:nth-child(even)::after { left: -21px; right: auto; }
  .mx-leaf { font-size: 13.5px; }
  /* On a phone the words get the whole first line; the tools and Ask sit beneath them. */
  .mx-composer { flex-wrap: wrap; border-radius: 22px; padding: 4px 6px 6px; }
  .mx-composer textarea { order: -1; flex-basis: 100%; padding: 10px 8px 4px; }
  .mx-send { margin-left: auto; min-height: 40px; padding: 8px 18px; }
  .mx-icon { width: 40px; height: 40px; }
  .mx-tool span { display: none; }
  .mx-tool[data-mx='owner'] span, .mx-portal-toggle span { display: inline; }
  .mx-act span { display: none; }
  .hog-model-name { display: none; }
  .mx-you .mx-acts { opacity: 1; }
}

/* ---------- THE PORTAL: MARCUS's screen ---------- */
.mx-portal {
  position: relative; display: flex; flex-direction: column; min-height: 0; height: 100%; overflow: hidden;
  border: 1px solid rgba(139, 124, 246, 0.3); border-radius: 22px;
  background: radial-gradient(120% 60% at 50% 0%, rgba(139, 124, 246, 0.1), transparent 60%), linear-gradient(180deg, #17130f, #0e0c0a);
  box-shadow: inset 0 0 0 1px rgba(217, 180, 90, 0.05), 0 30px 80px -50px rgba(139, 124, 246, 0.5);
}
.mx-portal::before { /* a faint grid, like a sighting screen */
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0.35;
  background-image: linear-gradient(rgba(217, 180, 90, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(217, 180, 90, 0.05) 1px, transparent 1px);
  background-size: 28px 28px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); mask-image: linear-gradient(180deg, #000, transparent 70%);
}
.portal-bar { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px 10px 16px; border-bottom: 1px solid rgba(139, 124, 246, 0.2); }
.portal-title { display: inline-flex; align-items: center; gap: 9px; margin: 0; font: 600 11px/1 var(--mono); letter-spacing: 0.32em; color: var(--gold-hi); }
.portal-live { width: 8px; height: 8px; border-radius: 50%; background: #ff5a4f; animation: live 1.8s infinite; }
.mx-stage:has(.mx-chat.is-working) .portal-live { background: var(--violet); animation-duration: 0.9s; }
.portal-tabs { display: inline-flex; gap: 2px; margin-left: auto; padding: 3px; border-radius: 999px; border: 1px solid var(--line); background: rgba(11, 10, 9, 0.5); }
.portal-tabs button { min-height: 32px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: pointer; font: 500 10.5px/1 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; transition: color 0.2s, background 0.2s; }
.portal-tabs button:hover { color: var(--text); }
.portal-tabs button[aria-selected='true'] { color: var(--gold-hi); background: rgba(217, 180, 90, 0.12); }
.portal-tabs button:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.portal-panel { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; padding: 12px; overflow: auto; overscroll-behavior: contain; }
.portal-panel[hidden] { display: none; }

/* The screen: corner brackets, a soft scan, and whatever is showing. */
.portal-screen {
  --br: rgba(243, 222, 160, 0.6);
  position: relative; flex: none; min-height: 240px; max-height: 58%; overflow: auto; padding: 18px 20px; border-radius: 16px;
  border: 1px solid rgba(217, 180, 90, 0.14);
  background:
    linear-gradient(var(--br), var(--br)) 8px 8px / 18px 1.5px no-repeat, linear-gradient(var(--br), var(--br)) 8px 8px / 1.5px 18px no-repeat,
    linear-gradient(var(--br), var(--br)) calc(100% - 8px) 8px / 18px 1.5px no-repeat, linear-gradient(var(--br), var(--br)) calc(100% - 8px) 8px / 1.5px 18px no-repeat,
    linear-gradient(var(--br), var(--br)) 8px calc(100% - 8px) / 18px 1.5px no-repeat, linear-gradient(var(--br), var(--br)) 8px calc(100% - 8px) / 1.5px 18px no-repeat,
    linear-gradient(var(--br), var(--br)) calc(100% - 8px) calc(100% - 8px) / 18px 1.5px no-repeat, linear-gradient(var(--br), var(--br)) calc(100% - 8px) calc(100% - 8px) / 1.5px 18px no-repeat,
    radial-gradient(90% 70% at 50% 40%, rgba(217, 180, 90, 0.06), rgba(11, 10, 9, 0.6));
}
.portal-screen.is-changing .portal-body, .portal-screen.is-changing .portal-idle { animation: portal-tune 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes portal-tune { from { opacity: 0; filter: blur(8px) brightness(1.6); transform: scale(0.985); } to { opacity: 1; filter: none; transform: none; } }
.portal-kicker { margin: 0 0 4px; font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: #c9c0ff; }
.portal-caption { margin: 0 0 10px; font: italic 18px/1.4 var(--serif); color: var(--gold-hi); }
.portal-body { display: grid; gap: 12px; }
.portal-body .med { margin: 0; }
.portal-art { margin: 0; display: grid; gap: 10px; }
.portal-art img { width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; background: rgba(11, 10, 9, 0.6); animation: hog-develop 1s ease-out both; }
.portal-art figcaption { display: grid; gap: 2px; }
.portal-art b { font: 500 20px/1.25 var(--serif); color: var(--text); }
.portal-art span { font-size: 13px; color: var(--muted); }
.portal-art small { font-size: 10px; letter-spacing: 0.08em; color: var(--gold-dim); }
.portal-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.portal-acts svg { width: 15px; height: 15px; }
.portal-film video, .portal-film .video-card { width: 100%; }
.portal-film video { border-radius: 12px; background: #000; max-height: 340px; }
.portal-source { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color 0.2s; }
.portal-source:hover { border-color: var(--gold); }
.portal-source b { display: block; font-size: 15px; font-weight: 500; }
.portal-source small { font-size: 11.5px; color: var(--gold-dim); }
.portal-mono { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, rgba(217, 180, 90, 0.18), rgba(139, 124, 246, 0.18)); color: var(--gold-hi); font: 600 18px/1 var(--serif); }
.portal-mono svg { width: 20px; height: 20px; }
.portal-answer { font-size: 13.5px; line-height: 1.6; color: var(--text); }
.portal-answer p { margin: 0 0 0.6em; }
.portal-text { margin: 0; max-height: 300px; overflow: auto; padding: 12px; border-radius: 10px; background: rgba(11, 10, 9, 0.6); font: 12px/1.6 var(--mono); color: var(--text); white-space: pre-wrap; overflow-wrap: anywhere; }
.portal-fileinfo { display: flex; align-items: center; gap: 12px; }
.portal-fileinfo img { width: 96px; border-radius: 10px; }
.portal-fileinfo p { margin: 0; display: grid; }
.portal-fileinfo small { color: var(--muted); font-size: 12px; }
.portal-idle, .portal-searching { display: grid; justify-items: center; gap: 6px; padding: 24px 8px; text-align: center; }
.portal-idle .display { margin: 8px 0 0; font-size: 26px; letter-spacing: 0.18em; color: var(--gold-hi); }
.portal-idle .small { max-width: 34ch; margin: 0; }
.portal-radar { position: relative; width: 88px; height: 88px; border-radius: 50%; border: 1px solid rgba(217, 180, 90, 0.35); background: radial-gradient(circle, rgba(217, 180, 90, 0.08) 0 30%, transparent 31%), repeating-radial-gradient(circle, transparent 0 13px, rgba(217, 180, 90, 0.12) 13px 14px); overflow: hidden; }
.portal-radar::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, rgba(139, 124, 246, 0.55), transparent 28%); animation: hog-spin 2.6s linear infinite; }
.portal-meter { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.portal-meter b { color: var(--gold-hi); font-weight: 600; }

/* The feed: everything he found, newest first. */
.portal-feed, .portal-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.portal-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 10px 6px 6px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(11, 10, 9, 0.35); color: var(--text); cursor: pointer; text-align: left; transition: border-color 0.2s, background 0.2s, transform 0.2s;
  animation: hog-in 0.4s ease-out both;
}
.portal-item:hover { border-color: var(--gold); transform: translateX(2px); }
.portal-item.is-on { border-color: rgba(201, 192, 255, 0.6); background: rgba(139, 124, 246, 0.1); }
.portal-thumb { flex: none; display: grid; place-items: center; width: 44px; height: 44px; overflow: hidden; border-radius: 9px; background: rgba(217, 180, 90, 0.07); color: var(--gold); }
.portal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.portal-thumb svg { width: 20px; height: 20px; }
.portal-item-text { display: grid; min-width: 0; }
.portal-item-text b { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-item-text small { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-empty { margin: 8px 4px; }
.portal-search { display: flex; gap: 8px; }
.portal-search input { flex: 1; min-width: 0; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.7); color: var(--text); font: inherit; font-size: 15px; }
.portal-search input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 124, 246, 0.14); }
.portal-results { display: grid; gap: 16px; }
.portal-section { display: grid; gap: 8px; animation: hog-in 0.4s ease-out both; }
.mx-portal .mx-book { padding: 4px 2px; border: 0; background: none; }
.mx-portal .mx-book-list { max-height: none; overflow: visible; }
.mx-said { border-color: rgba(139, 124, 246, 0.35); }
.mx-said-text { font: 16px/1.5 var(--serif); }
.mx-said-text p { margin: 0 0 0.5em; }
/* A passage he quoted, inside something kept (your book, the library, Favorites) or his narration:
   the book's own words, set from the book, with a gold rule like every passage of his. */
.kept-quote { margin: 0.35em 0 0.75em; padding: 2px 0 2px 12px; border-left: 2px solid var(--gold-dim); }
.kept-quote .med-text { font-size: 16px; line-height: 1.5; }
.kept-quote .med-text p { margin: 0 0 0.5em; }
.kept-quote .med-text p:last-child { margin-bottom: 0.3em; }
.kept-cite { margin: 0; font: 500 10px/1.5 var(--mono); letter-spacing: 0.06em; color: var(--gold-dim); }
.q-ref { font: 500 0.8em/1.4 var(--mono); color: var(--gold-dim); }
.hog-vision-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(139, 124, 246, 0.12); color: #c9c0ff; }
.hog-vision-icon svg { width: 20px; height: 20px; }
.hog-vision-upload, .hog-doc { grid-template-columns: 40px minmax(0, 1fr); }
.hog-doc { display: grid; gap: 12px; margin: 0; padding: 10px; border: 1px solid var(--line); border-radius: 12px; }
.hog-doc-text { margin: 0; max-height: 8em; overflow: auto; font: 12px/1.55 var(--mono); color: var(--muted); white-space: pre-wrap; }
.hog-portal-note { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; line-height: 1.45; color: var(--text); }
.hog-portal-note .hog-vision-icon { width: 28px; height: 28px; }
.hog-portal-note .hog-vision-icon svg { width: 15px; height: 15px; }
.reader-said { border-left: 2px solid rgba(139, 124, 246, 0.5); padding-left: 12px; }

/* The Chats tab: every conversation, kept, named, found again. */
.chats-head { display: flex; align-items: center; gap: 8px; }
.chats-find { flex: 1; min-width: 0; display: flex; }
.chats-find input { flex: 1; min-width: 0; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.7); color: var(--text); font: inherit; font-size: 15px; }
.chats-find input:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(139, 124, 246, 0.14); }
.chats-new { flex: none; display: inline-flex; align-items: center; gap: 6px; }
.chats-new svg { width: 15px; height: 15px; }
.chats-status { display: flex; align-items: flex-start; gap: 8px; margin: 0 2px; line-height: 1.5; color: var(--muted); }
.chats-status svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--gold); }
.chats-status[data-cloud='on'] { color: var(--text); }
.chats-status[data-cloud='syncing']::before { content: ''; flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--violet); animation: live 1s infinite; }
.chats-status code { font: 11.5px/1.4 var(--mono); color: var(--gold-hi); overflow-wrap: anywhere; }
.chats-owner { display: block; margin-top: 8px; padding: 10px 12px; border-radius: 12px; border: 1px dashed rgba(217, 180, 90, 0.4); color: var(--text); }
.chats-list { display: grid; align-content: start; gap: 16px; }
.chats-group, .chats-rows { display: grid; gap: 6px; }
.chats-rows { list-style: none; margin: 0; padding: 0; }
.chats-when, .chats-found { margin: 0 4px; font-size: 10px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-dim); }
.chat-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; border-radius: 14px; border: 1px solid var(--line);
  background: rgba(11, 10, 9, 0.35); transition: border-color 0.2s, background 0.2s;
}
.chat-row:hover { border-color: rgba(217, 180, 90, 0.45); }
.chat-row.is-current { border-color: rgba(201, 192, 255, 0.55); background: rgba(139, 124, 246, 0.09); }
.chat-open { display: grid; gap: 3px; min-width: 0; padding: 10px 4px 10px 14px; border: 0; border-radius: 14px; background: none; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.chat-open:focus-visible, .chat-more:focus-visible, .chat-act:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.chat-name { display: flex; align-items: center; gap: 6px; min-width: 0; }
.chat-name b { overflow: hidden; font: 500 15.5px/1.3 var(--serif); text-overflow: ellipsis; white-space: nowrap; }
.chat-pin { flex: none; display: inline-grid; color: var(--gold); }
.chat-pin svg { width: 13px; height: 13px; }
.chat-line { display: -webkit-box; overflow: hidden; font-size: 12.5px; line-height: 1.45; color: var(--muted); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.chat-meta { font-size: 10px; letter-spacing: 0.06em; color: var(--gold-dim); }
.chat-meta em { font-style: normal; color: #c9c0ff; }
.chat-row mark { padding: 0 1px; border-radius: 3px; background: rgba(217, 180, 90, 0.28); color: var(--gold-hi); }
.chat-more { display: grid; place-items: center; width: 36px; height: 36px; margin: 6px 6px 0 0; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; }
.chat-more:hover, .chat-more[aria-expanded='true'] { color: var(--gold-hi); background: rgba(217, 180, 90, 0.1); }
.chat-more svg { width: 18px; height: 18px; }
.chat-acts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 0 10px 10px; }
.chat-act { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(11, 10, 9, 0.5); color: var(--text); font: 500 12px/1 var(--sans); cursor: pointer; }
.chat-act:hover { border-color: var(--gold); }
.chat-act svg { width: 14px; height: 14px; }
.chat-act[aria-pressed='true'] { border-color: rgba(217, 180, 90, 0.55); color: var(--gold-hi); }
.chat-act-del:hover, .chat-delete { border-color: rgba(255, 120, 100, 0.6); color: #ffb2a6; }
.chat-confirm span { flex-basis: 100%; font-size: 13px; color: var(--text); }
.chat-rename { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; padding: 8px 4px 8px 10px; }
.chat-rename input { flex: 1 1 160px; min-width: 0; min-height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--violet); background: rgba(11, 10, 9, 0.8); color: var(--text); font: 15px/1.2 var(--serif); }
.chat-rename input:focus { outline: none; box-shadow: 0 0 0 4px rgba(139, 124, 246, 0.14); }
.chats-empty { display: grid; justify-items: center; gap: 6px; padding: 28px 12px; text-align: center; }
.chats-empty .display { margin: 0; font-size: 22px; color: var(--gold-hi); }
.chats-empty .small { max-width: 36ch; margin: 0; }
.chats-tools { display: flex; justify-content: center; padding: 2px 0 8px; }

/* Narrower screens: the Portal slides in as a drawer from the right. */
@media (max-width: 1100px) {
  .mx-stage { grid-template-columns: minmax(0, 1fr); }
  .mx-portal-toggle { display: inline-flex; }
  .mx-portal {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 60; width: min(100%, 560px); height: auto; border-radius: 22px 0 0 22px;
    transform: translateX(104%); visibility: hidden; transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.45s;
    padding-top: env(safe-area-inset-top);
  }
  .mx-portal.is-open { transform: none; visibility: visible; transition: transform 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); box-shadow: -30px 0 80px -20px rgba(0, 0, 0, 0.8); }
  .portal-tabs { margin-left: 0; order: 3; width: 100%; justify-content: space-between; }
  .portal-tabs button { flex: 1; }
}
@media (max-width: 640px) {
  .mx-portal { border-radius: 0; width: 100%; }
  .portal-screen { max-height: 62%; }
  .portal-panel { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .portal-tabs button { padding: 0 6px; letter-spacing: 0.08em; white-space: nowrap; }
  .tab-your { display: none; } /* five tabs share a phone's width: "Your book" reads "Book" */
  .portal-bar { row-gap: 14px; }
  .portal-title { margin-left: calc(var(--chrome-right, 96px) - 4px); } /* the menu button keeps its corner */
}

/* ---------- The nine wings of Today's rooms ----------
   Every tile, and the room window it opens, is a wing with its own palette, lettering, motif and
   motion. A wing re-scopes the house tokens (--gold, --gold-hi, --gold-dim, --gold-grad, --line,
   --line-strong), so everything inside it takes the wing's colours with no extra rules. The gold
   frame and the black ground stay the house's. The numbers and Latin names live in app.js (WINGS). */
@property --wing-h { syntax: '<number>'; inherits: true; initial-value: 290; }
:root {
  --wing-marcus: #e8c66c; --wing-wire: #ff7a57; --wing-play: #57d9a3; --wing-guides: #b7a9ff; --wing-almanac: #a5c8ff;
  --wing-watch: #ff7d9d; --wing-stop: #ffb45e; --wing-ais: #6ee6ff; --wing-books: #f1dca8;
  --wing-spectrum: conic-gradient(from 0deg, #ff6b6b, #ffd166, #6ee7a8, #6ecbff, #b69cff, #ff7ac8, #ff6b6b);
  --f-roman: 'Cinzel', var(--serif);
  --f-press: 'UnifrakturMaguntia', var(--serif);
  --f-didone: 'Bodoni Moda', var(--serif);
  --f-marquee: 'Limelight', var(--serif);
  --f-soft: 'Fraunces', var(--serif);
  --f-fell: 'IM Fell English', var(--serif);
  --f-cook: 'UnifrakturCook', var(--f-press);
}
[data-wing] {
  --line: color-mix(in srgb, var(--gold) 17%, transparent);
  --line-strong: color-mix(in srgb, var(--gold) 40%, transparent);
}
/* I · IMPERATOR: gold on Tyrian purple, the purple Rome's emperors wore. */
[data-wing='marcus'] {
  --gold: var(--wing-marcus); --gold-hi: #f8e6ad; --gold-dim: #bb9d5e; --wing-2: #b0469c; --wing-base: #150d16;
  --gold-grad: linear-gradient(180deg, #f8e6ad 0%, #e2bd60 45%, #a07d36 100%);
  --wing-ground: radial-gradient(620px 300px at 6% 55%, rgb(150 52 132 / 0.34), transparent 70%), radial-gradient(520px 260px at 100% 0%, rgb(232 198 108 / 0.1), transparent 70%), linear-gradient(180deg, #1d1220, #120b13);
}
/* II · NVNTIVS: ink and vermilion, off the press. */
[data-wing='wire'] {
  --gold: var(--wing-wire); --gold-hi: #ffd8c9; --gold-dim: #cd8a73; --wing-2: #ffd9a8; --wing-base: #150e0c;
  --gold-grad: linear-gradient(180deg, #ffd6c4 0%, #ff8c68 50%, #d9502f 100%);
  --wing-ground: radial-gradient(520px 320px at 100% 0%, rgb(255 122 87 / 0.12), transparent 70%), linear-gradient(180deg, #1c1310, #130d0b);
}
/* III · LVDVS: casino felt with brass trim. */
[data-wing='play'] {
  --gold: var(--wing-play); --gold-hi: #c8f7e2; --gold-dim: #72ad93; --wing-2: #e0bf6a; --wing-base: #0b1813;
  --gold-grad: linear-gradient(180deg, #d2fae8 0%, #62dcaa 50%, #1f9a6c 100%);
  --wing-ground: radial-gradient(120% 90% at 50% 28%, #133b2d 0%, #0c2019 60%, #09140f 100%);
}
/* IV · DVCES: the violet of voices in your ear. */
[data-wing='guides'] {
  --gold: var(--wing-guides); --gold-hi: #e8e3ff; --gold-dim: #938ace; --wing-2: #6ec8ff; --wing-base: #110f1d;
  --gold-grad: linear-gradient(180deg, #ece8ff 0%, #b3a4ff 50%, #6f5fd8 100%);
  --wing-ground: radial-gradient(380px 260px at 12% 110%, rgb(139 124 246 / 0.32), transparent 70%), radial-gradient(300px 200px at 100% 0%, rgb(110 200 255 / 0.1), transparent 70%), linear-gradient(180deg, #18152b, #0f0d1a);
}
/* V · FASTI: midnight blue and moonlight. */
[data-wing='almanac'] {
  --gold: var(--wing-almanac); --gold-hi: #e3eeff; --gold-dim: #8299c2; --wing-2: #f3dca0; --wing-base: #0a0f1e;
  --gold-grad: linear-gradient(180deg, #eef4ff 0%, #a9c9ff 50%, #5577c4 100%);
  --wing-ground: radial-gradient(420px 260px at 88% 8%, rgb(120 150 255 / 0.22), transparent 70%), linear-gradient(180deg, #111b37, #0a1020);
}
/* VI · SPECTACVLA: velvet curtains and projector light. */
[data-wing='watch'] {
  --gold: var(--wing-watch); --gold-hi: #ffd9e2; --gold-dim: #c97f91; --wing-2: #ffc478; --wing-base: #170a10;
  --gold-grad: linear-gradient(180deg, #ffe0e8 0%, #ff8aa6 50%, #d43d65 100%);
  --wing-ground: repeating-linear-gradient(90deg, rgb(0 0 0 / 0.24) 0, rgb(255 125 157 / 0.05) 17px, rgb(0 0 0 / 0.24) 34px), radial-gradient(520px 260px at 50% -10%, rgb(255 196 120 / 0.12), transparent 70%), linear-gradient(180deg, #2a0f1a, #15090f);
}
/* VII · ARTES: every kind of art, so every colour, turning slowly round the wheel. */
[data-wing='kinds'] {
  --gold: hsl(var(--wing-h) 85% 77%); --gold-hi: hsl(var(--wing-h) 90% 90%); --gold-dim: hsl(var(--wing-h) 38% 64%); --wing-2: hsl(calc(var(--wing-h) + 150) 80% 70%); --wing-base: #121015;
  --gold-grad: linear-gradient(180deg, hsl(var(--wing-h) 90% 90%) 0%, hsl(var(--wing-h) 85% 74%) 50%, hsl(var(--wing-h) 60% 50%) 100%);
  --wing-ground: radial-gradient(520px 260px at 0% 0%, hsl(var(--wing-h) 70% 60% / 0.13), transparent 70%), radial-gradient(420px 240px at 100% 100%, hsl(calc(var(--wing-h) + 150) 70% 60% / 0.1), transparent 70%), linear-gradient(180deg, #19161d, #111014);
}
/* The tile turns; in the room only the heading does, so dozens of cards aren't restyled every frame. */
.tile[data-wing='kinds'], [data-room='kinds'] .section-head .display { animation: wing-hue 48s linear infinite; }
@keyframes wing-hue { from { --wing-h: 290; } to { --wing-h: 650; } }
/* VIII · VOX: brass and the amber glow of an old audio guide. */
[data-wing='stop'] {
  --gold: var(--wing-stop); --gold-hi: #ffe4c2; --gold-dim: #c4925a; --wing-2: #ff8a4c; --wing-base: #150f09;
  --gold-grad: linear-gradient(180deg, #ffe2bd 0%, #ffb45e 50%, #c9762c 100%);
  --wing-ground: repeating-linear-gradient(0deg, rgb(255 255 255 / 0.018) 0 1px, transparent 1px 3px), radial-gradient(300px 220px at 100% 100%, rgb(255 170 80 / 0.14), transparent 70%), linear-gradient(160deg, #231a11, #140e09);
}
/* IX · MENTES: machine light for the minds that read this museum. */
[data-wing='ais'] {
  --gold: var(--wing-ais); --gold-hi: #d6f9ff; --gold-dim: #62a9ba; --wing-2: #7dffc4; --wing-base: #071117;
  --gold-grad: linear-gradient(180deg, #dcfaff 0%, #6ee6ff 50%, #1f9fc2 100%);
  --wing-ground: linear-gradient(rgb(110 230 255 / 0.05) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(90deg, rgb(110 230 255 / 0.05) 1px, transparent 1px) 0 0 / 22px 22px, linear-gradient(180deg, #0a1a22, #061015);
}

/* X · LIBRI: Spark's books. Lantern light on oxblood night, the colours of his press: parchment for
   the words, gold for the furniture, oxblood for the ground (WAR OF WONDER's own palette). */
[data-wing='books'] {
  --gold: var(--wing-books); --gold-hi: #fff4d6; --gold-dim: #bfa676; --wing-2: #c7a84a; --wing-3: #b5483a; --wing-base: #0d0807;
  --gold-grad: linear-gradient(180deg, #fff4d6 0%, #e9cf8e 50%, #b08a3e 100%);
  --wing-ground: radial-gradient(560px 300px at 10% 105%, rgb(181 72 58 / 0.34), transparent 70%), radial-gradient(460px 260px at 94% -10%, rgb(199 168 74 / 0.13), transparent 70%), linear-gradient(180deg, #170b09, #0c0706);
}

/* Every wing tile: its ground, a lit top edge, and a light that follows the pointer. */
.tile[data-wing] {
  isolation: isolate; background: var(--wing-ground); box-shadow: inset 0 1px 0 color-mix(in srgb, var(--gold-hi) 12%, transparent);
}
.tile[data-wing]:hover, .tile[data-wing]:focus-within {
  box-shadow: inset 0 1px 0 color-mix(in srgb, var(--gold-hi) 22%, transparent), 0 26px 60px -32px rgba(0, 0, 0, 0.85), 0 22px 70px -40px color-mix(in srgb, var(--gold) 60%, transparent);
}
.tile[data-wing]::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; opacity: 0.5; transition: opacity 0.4s;
  background: radial-gradient(380px circle at var(--mx, 78%) var(--my, -12%), color-mix(in srgb, var(--gold) 17%, transparent), transparent 65%);
}
.tile[data-wing]:hover::before, .tile[data-wing]:focus-within::before { opacity: 1; }
.wing-mark { position: absolute; z-index: -1; pointer-events: none; white-space: nowrap; user-select: none; }

/* The wing plate: number and Latin name up the right edge, like a label on a museum wall.
   Hover and it translates itself. */
.wing-plate {
  position: absolute; right: 6px; bottom: 18px; z-index: -1; display: grid; pointer-events: none; user-select: none;
  writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap;
  font: 500 8.5px/1 var(--f-roman); letter-spacing: 0.34em; color: var(--gold-dim);
}
.wing-plate > span { grid-area: 1 / 1; transition: opacity 0.45s, transform 0.45s; }
.wing-en { opacity: 0; transform: translateX(3px); font-family: var(--serif); font-style: italic; font-size: 10.5px; letter-spacing: 0.1em; color: var(--gold-hi); }
.tile:hover .wing-la, .tile:focus-within .wing-la { opacity: 0; transform: translateX(-3px); }
.tile:hover .wing-en, .tile:focus-within .wing-en { opacity: 1; transform: none; }

/* The legend beside "Today's rooms": one light per wing. */
.wing-dots { display: inline-flex; gap: 5px; margin-left: 10px; vertical-align: 1px; }
.wing-dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 8px var(--dot); }
[data-wing-dot='marcus'], [data-room-tab='marcus'] { --dot: var(--wing-marcus); }
[data-wing-dot='wire'], [data-room-tab='wire'] { --dot: var(--wing-wire); }
[data-wing-dot='play'], [data-room-tab='play'] { --dot: var(--wing-play); }
[data-wing-dot='guides'], [data-room-tab='guides'] { --dot: var(--wing-guides); }
[data-wing-dot='almanac'], [data-room-tab='almanac'] { --dot: var(--wing-almanac); }
[data-wing-dot='watch'], [data-room-tab='watch'] { --dot: var(--wing-watch); }
[data-wing-dot='kinds'], [data-room-tab='kinds'] { --dot: #f2c9ff; }
[data-wing-dot='stop'] { --dot: var(--wing-stop); }
[data-wing-dot='ais'] { --dot: var(--wing-ais); }
[data-wing-dot='books'], [data-room-tab='books'] { --dot: var(--wing-books); }
.wing-dots [data-wing-dot='kinds'] { background: var(--wing-spectrum); }

/* I · MARCUS: Roman capitals, a laurel round the coin, his name cut into the wall. */
.tile-marcus .tile-kicker { font-family: var(--f-roman); font-weight: 600; font-size: 11px; letter-spacing: 0.22em; }
.wing-wreath { position: relative; flex: none; display: grid; place-items: center; width: 142px; height: 142px; color: var(--gold); }
.wing-laurel { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.82; filter: drop-shadow(0 0 10px color-mix(in srgb, var(--gold) 35%, transparent)); transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.4s; }
.tile-marcus:hover .wing-laurel, .tile-marcus:focus-within .wing-laurel { opacity: 1; transform: scale(1.035); }
.tile-marcus .marcus-coin { box-shadow: 0 0 0 4px rgb(150 52 132 / 0.22), 0 0 34px -4px rgb(176 70 156 / 0.55), 0 18px 40px -18px rgba(0, 0, 0, 0.9); }
.tile-marcus .marcus-coin::after {
  content: ''; position: absolute; inset: 0; border-radius: 50%; transform: translateX(-130%); transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1);
  background: linear-gradient(115deg, transparent 35%, rgb(255 240 200 / 0.38) 50%, transparent 65%);
}
.tile-marcus:hover .marcus-coin::after { transform: translateX(130%); }
.wing-name { right: -6px; bottom: -34px; font: 600 clamp(90px, 12vw, 170px)/1 var(--f-roman); letter-spacing: 0.08em; color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--gold) 17%, transparent); }

/* II · The wire: a blackletter nameplate, a halftone sky, and a press line that never stops. */
.tile-wire .tile-title { font-family: var(--f-press); font-size: clamp(23px, 1.9vw, 29px); font-weight: 400; line-height: 1.1; }
.tile-wire::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.7;
  background: radial-gradient(color-mix(in srgb, var(--gold) 26%, transparent) 0.9px, transparent 1.3px) 0 0 / 7px 7px;
  -webkit-mask-image: radial-gradient(110% 75% at 100% 0%, #000, transparent 62%); mask-image: radial-gradient(110% 75% at 100% 0%, #000, transparent 62%);
}
.tile-wire .tile-open::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--gold), var(--wing-2), transparent) no-repeat -45% 0 / 45% 100%; animation: wing-press 5.5s cubic-bezier(0.5, 0, 0.3, 1) infinite;
}
@keyframes wing-press { from { background-position: -45% 0; } 70%, to { background-position: 145% 0; } }
.tile-wire .tile-list li:first-child a span:last-child { font-size: 20.5px; }

/* III · Play: a playing card on casino felt. The question mark lifts as you lean in. */
.tile-play .tile-title { font-family: var(--f-didone); font-style: italic; font-weight: 500; font-size: clamp(22px, 1.8vw, 27px); letter-spacing: -0.005em; }
.tile-play::after { content: ''; position: absolute; inset: 7px; z-index: -1; pointer-events: none; border-radius: 15px; border: 1px solid color-mix(in srgb, var(--wing-2) 26%, transparent); }
.tile-play .tile-media { border: 1px solid color-mix(in srgb, var(--wing-2) 30%, transparent); transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tile-play:hover .tile-media { transform: perspective(700px) rotateY(-5deg) rotateX(2deg); }
.tile-play .tile-media::after {
  content: '?'; position: absolute; right: 12px; bottom: 2px; pointer-events: none; transition: opacity 0.5s, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  font: italic 500 68px/1 var(--f-didone); color: var(--gold-hi); text-shadow: 0 4px 26px rgb(0 0 0 / 0.7);
}
.tile-play:hover .tile-media::after { opacity: 0; transform: translateY(-12px) rotate(14deg); }

/* IV · Guides: italic voices, and sound rings breathing out of the corner. */
.tile-guides .tile-title { font-style: italic; font-weight: 500; font-size: clamp(21px, 1.7vw, 26px); }
.tile-guides::after {
  content: ''; position: absolute; left: -130px; bottom: -210px; width: 380px; height: 380px; z-index: -1; pointer-events: none; border-radius: 50%;
  background: repeating-radial-gradient(circle, transparent 0 21px, color-mix(in srgb, var(--gold) 15%, transparent) 21px 22px);
  -webkit-mask-image: radial-gradient(circle, #000 25%, transparent 70%); mask-image: radial-gradient(circle, #000 25%, transparent 70%);
  animation: wing-breathe 7s ease-in-out infinite;
}
@keyframes wing-breathe { 50% { transform: scale(1.09); opacity: 0.65; } }
.tile-guides .tile-thumb { transition: box-shadow 0.4s; }
.tile-guides-list a:hover .tile-thumb, .tile-guides-list a:focus-visible .tile-thumb { box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 20%, transparent), 0 0 0 9px color-mix(in srgb, var(--gold) 8%, transparent); }

/* V · Almanac: old English printing type, today's date with the moon going round it, and stars. */
.tile-almanac .tile-kicker { font-family: var(--f-fell); font-size: 11.5px; letter-spacing: 0.06em; text-wrap: balance; } /* wraps, never under "Almanac ↗" */
.tile-almanac .tile-fact { font-size: 18px; }
.wing-day { right: 34px; top: 58px; display: grid; justify-items: center; font: 400 60px/0.9 var(--f-fell); color: color-mix(in srgb, var(--gold-hi) 24%, transparent); } /* a watermark: the day's fact is read over it */
.wing-day small { margin-top: 5px; font: 500 9.5px/1 var(--f-roman); letter-spacing: 0.34em; text-transform: uppercase; color: color-mix(in srgb, var(--gold-dim) 60%, transparent); }
.wing-day::before, .wing-day::after { content: ''; position: absolute; left: 50%; top: 42%; pointer-events: none; }
.wing-day::before { width: 108px; height: 108px; margin: -54px 0 0 -54px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--gold) 18%, transparent); }
.wing-day::after { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; border-radius: 50%; background: var(--wing-2); box-shadow: 0 0 12px var(--wing-2); animation: wing-moon 40s linear infinite; transform: rotate(-60deg) translateX(54px); }
@keyframes wing-moon { from { transform: rotate(-60deg) translateX(54px); } to { transform: rotate(300deg) translateX(54px); } }
@keyframes wing-moon-sm { from { transform: rotate(-60deg) translateX(42px); } to { transform: rotate(300deg) translateX(42px); } }
.tile-almanac::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; animation: wing-twinkle 5s ease-in-out infinite alternate;
  background: radial-gradient(1.1px 1.1px at 12% 26%, #fff 50%, transparent 55%), radial-gradient(1px 1px at 31% 12%, #fff 50%, transparent 55%), radial-gradient(1.3px 1.3px at 47% 34%, #dfe9ff 50%, transparent 55%),
    radial-gradient(1px 1px at 58% 16%, #fff 50%, transparent 55%), radial-gradient(1.2px 1.2px at 72% 58%, #fff 50%, transparent 55%), radial-gradient(1px 1px at 22% 48%, #cfe0ff 50%, transparent 55%),
    radial-gradient(1px 1px at 91% 82%, #fff 50%, transparent 55%), radial-gradient(1.2px 1.2px at 64% 88%, #fff 50%, transparent 55%), radial-gradient(1px 1px at 8% 70%, #fff 50%, transparent 55%);
}
@keyframes wing-twinkle { from { opacity: 0.35; } to { opacity: 0.8; } }

/* VI · Watch: a movie-palace marquee over velvet; the bulbs chase when you arrive. */
.tile-watch .tile-title { font-family: var(--f-marquee); font-size: clamp(18px, 1.45vw, 22px); letter-spacing: 0.02em; }
.tile-watch::after {
  content: ''; position: absolute; left: 16px; right: 16px; top: 6px; height: 4px; z-index: -1; pointer-events: none; opacity: 0.5;
  background: radial-gradient(circle, var(--wing-2) 0 1.5px, transparent 2px) 0 0 / 12px 4px repeat-x; filter: drop-shadow(0 0 3px var(--wing-2));
}
.tile-watch:hover::after, .tile-watch:focus-within::after { opacity: 1; animation: wing-chase 0.8s steps(3) infinite; }
@keyframes wing-chase { to { background-position: 12px 0; } }

/* VII · Every kind of art: a spectrum edge and a title in every colour, turning. */
.tile-kinds { border-color: transparent; }
.tile-kinds::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; padding: 1px; opacity: 0.6; transition: opacity 0.4s;
  background: conic-gradient(from calc(var(--wing-h) * 1deg), #ff6b6b, #ffd166, #6ee7a8, #6ecbff, #b69cff, #ff7ac8, #ff6b6b);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.tile-kinds:hover::after, .tile-kinds:focus-within::after { opacity: 1; }
.tile-kinds .tile-title {
  font-family: var(--f-soft); font-style: italic; font-weight: 500; font-size: clamp(20px, 1.6vw, 25px); letter-spacing: -0.01em;
  background: linear-gradient(90deg, hsl(var(--wing-h) 90% 82%), hsl(calc(var(--wing-h) + 70) 90% 80%), hsl(calc(var(--wing-h) + 140) 85% 80%)); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.14em; margin-bottom: -0.14em; /* the fill must reach the descenders of g, y and p */
}
.tile-kinds .tile-mosaic img { transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.6s; }
.tile-kinds:hover .tile-mosaic img { transform: translateY(-4px); box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--gold) 70%, transparent); }
.tile-kinds:hover .tile-mosaic img:nth-child(2) { transition-delay: 0.05s; }
.tile-kinds:hover .tile-mosaic img:nth-child(3) { transition-delay: 0.1s; }
.tile-kinds:hover .tile-mosaic img:nth-child(4) { transition-delay: 0.15s; }

/* VIII · Audio guide: a brass speaker grille and a stop number glowing like a valve display. */
.tile-stop .tile-title { font-family: var(--mono); font-size: 16px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.tile-stop::after {
  content: ''; position: absolute; right: 16px; top: 16px; width: 62px; height: 62px; z-index: -1; pointer-events: none; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--gold) 34%, transparent) 1.1px, transparent 1.6px) 0 0 / 6px 6px;
  -webkit-mask-image: radial-gradient(circle, #000 62%, transparent 71%); mask-image: radial-gradient(circle, #000 62%, transparent 71%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 24%, transparent);
}
.tile-stop:focus-within::after { animation: wing-speak 0.45s ease-in-out infinite alternate; }
@keyframes wing-speak { to { transform: scale(1.06); } }
.tile-stop .tile-stop-form input {
  border-color: color-mix(in srgb, var(--gold) 34%, transparent); background: radial-gradient(120% 140% at 50% 0%, #21160b, #0b0805);
  box-shadow: inset 0 2px 12px rgb(0 0 0 / 0.85), inset 0 0 0 1px rgb(255 255 255 / 0.03);
  color: var(--gold-hi); text-shadow: 0 0 6px var(--gold), 0 0 18px color-mix(in srgb, var(--gold) 70%, transparent);
}
.tile-stop .tile-stop-form input::placeholder { color: color-mix(in srgb, var(--gold) 38%, transparent); text-shadow: none; }
.tile-stop .tile-stop-form input:focus { border-color: var(--gold); }

/* IX · For AIs: a terminal prompt, scan lines, and a cursor waiting at the door. */
.tile-ais .tile-title { font-family: var(--mono); font-size: 15.5px; font-weight: 500; line-height: 1.45; letter-spacing: 0; }
.tile-ais .tile-title::before { content: '> '; color: var(--gold); }
.tile-ais .door-glyph { text-shadow: 0 0 20px color-mix(in srgb, var(--gold) 60%, transparent); }
.tile-ais .door-glyph::after { content: '▍'; margin-left: 4px; font-size: 0.7em; vertical-align: 0.12em; animation: hog-blink 1.1s steps(1, end) infinite; }
.tile-ais::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--gold) 16%, transparent), transparent) 0 -80px / 100% 70px no-repeat, repeating-linear-gradient(180deg, rgb(255 255 255 / 0.028) 0 1px, transparent 1px 3px);
}
.tile-ais:hover::after, .tile-ais:focus-visible::after { animation: wing-scan 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
@keyframes wing-scan { to { background-position: 0 calc(100% + 80px), 0 0; } }

/* The room windows take the wing of the room that is open: ground, edge light, tabs and headings. */
.room[data-wing] {
  border-color: var(--line-strong);
  background: radial-gradient(1100px 520px at 8% -12%, color-mix(in srgb, var(--gold) 11%, transparent), transparent 62%), radial-gradient(900px 520px at 110% 112%, color-mix(in srgb, var(--wing-2) 9%, transparent), transparent 60%), var(--wing-base);
  box-shadow: 0 60px 160px -40px rgba(0, 0, 0, 0.9), 0 0 140px -40px color-mix(in srgb, var(--gold) 30%, transparent);
}
.room[data-wing] {
  --panel: color-mix(in srgb, var(--gold) 3%, var(--wing-base)); --panel-2: color-mix(in srgb, var(--gold) 7%, var(--wing-base));
}
[data-wing] .btn:hover { background: color-mix(in srgb, var(--gold) 11%, transparent); }
[data-wing] .btn-gold:hover { background: var(--gold-grad); }
[data-wing] .chip-link:hover { background: color-mix(in srgb, var(--gold) 13%, transparent); }
[data-wing] .option:hover:not(:disabled) { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.room[data-wing] .room-bar { position: relative; background: color-mix(in srgb, var(--wing-base) 92%, transparent); }
.room[data-wing] .room-bar::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, var(--gold), var(--wing-2), transparent); opacity: 0.75; }
.room-scrim[data-wing] { background: radial-gradient(80% 70% at 50% 35%, color-mix(in srgb, var(--gold) 9%, rgba(6, 5, 5, 0.72)), rgba(6, 5, 5, 0.8)); }
.room-tab::before { content: attr(data-wing-n); content: attr(data-wing-n) / ''; margin-right: 7px; font: 600 10px/1 var(--f-roman); letter-spacing: 0.08em; color: var(--dot, var(--gold-dim)); }
.room-tab[aria-selected='true']::before { color: rgb(26 20 7 / 0.7); }
[data-room='marcus'] .marcus-head .display { font-family: var(--f-roman); font-weight: 600; letter-spacing: 0.12em; }
[data-room='wire'] .section-head .display { font-family: var(--f-press); font-weight: 400; }
[data-room='watch'] .section-head .display { font-family: var(--f-marquee); font-size: clamp(30px, 3.6vw, 48px); }
[data-room='play'] .play-body .display { font-family: var(--f-didone); font-style: italic; font-weight: 500; }
[data-room='almanac'] .section-head .display { font-family: var(--f-fell); }
[data-room='kinds'] .section-head .display {
  font-family: var(--f-soft); font-style: italic; font-weight: 500;
  background: linear-gradient(90deg, hsl(var(--wing-h) 90% 82%), hsl(calc(var(--wing-h) + 70) 90% 80%), hsl(calc(var(--wing-h) + 140) 85% 80%)); -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-bottom: 0.14em; margin-bottom: -0.14em; /* the fill must reach the descenders of g, y and p */
}
/* Every department its own colour; "Everything" wears them all. */
.kinds-chips [data-dept] { border-color: hsl(var(--chip-h, 40) 70% 70% / 0.45); color: hsl(var(--chip-h, 40) 75% 80%); }
.kinds-chips [data-dept]:hover { background: hsl(var(--chip-h, 40) 70% 70% / 0.14); color: hsl(var(--chip-h, 40) 90% 88%); }
.kinds-chips [data-dept][aria-selected='true'] { background: hsl(var(--chip-h, 40) 80% 76%); color: #15110d; }
.kinds-chips [data-dept='all'][aria-selected='true'] { background: linear-gradient(90deg, #ffb3b3, #ffe08a, #a8f0c8, #a8dcff, #cfbfff, #ffb3e0); }

@media (max-width: 640px) {
  .wing-wreath { width: 92px; height: 92px; }
  .marcus-tile-body > .wing-wreath { margin-block: 0; } /* on a phone the tile is as tall as it needs */
  .wing-name { font-size: 84px; bottom: -18px; }
  .wing-day { top: 66px; font-size: 46px; right: 30px; }
  .wing-day::before { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
  .wing-day::after { animation-name: wing-moon-sm; transform: rotate(-60deg) translateX(42px); }
  .wing-plate { right: 4px; }
  .tile-stop::after { width: 46px; height: 46px; top: 12px; right: 14px; }
  .tile-watch::after { left: 12px; right: 12px; }
}

/* ---------- /marcus, edge to edge (v0.15) ----------
   The conversation and the Portal fill the whole window: no title block, no boxes, no margins. The
   site's menu button sits in the chat bar's corner (top left at every size here), and the bar
   leaves it room (--chrome-right is measured by the page). */
.mx { width: 100vw; margin: 0 0 0 calc(50% - 50vw); padding: 0; gap: 0; grid-template-rows: minmax(0, 1fr); height: 100svh; min-height: 560px; }
.mx-stage { gap: 0; height: 100%; }
.mx-chat { border: 0; border-radius: 0; background: radial-gradient(900px 420px at 30% -10%, rgba(217, 180, 90, 0.05), transparent 60%); }
.mx-portal { border: 0; border-left: 1px solid rgba(139, 124, 246, 0.22); border-radius: 0; box-shadow: none; }
.mx-chat-bar { position: relative; min-height: 76px; padding: 14px 18px 14px calc(var(--chrome-right, 190px) + 16px); }
html.mx-page .chrome { top: 15px; left: 16px; right: auto; bottom: auto; }
/* A readable column in the middle of the wide conversation, like a page. */
.mx-thread { padding: 22px max(22px, calc((100% - 880px) / 2)) 14px; }
.mx-say { padding: 12px max(16px, calc((100% - 912px) / 2)) 16px; }
.mx-about > summary.mx-tool { list-style: none; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: inherit; letter-spacing: 0; text-transform: none; color: var(--gold-hi); }
.mx-about > summary.mx-tool::-webkit-details-marker { display: none; }
.mx-about[open] > summary.mx-tool { border-color: var(--gold); background: rgba(217, 180, 90, 0.12); }
.mx-about-body { z-index: 30; }

/* Signed out: the door to the conversation. */
.mx-chat:not([data-auth='in']) .mx-say, .mx-chat[data-auth='out'] .mx-thread-wrap, .mx-chat[data-auth='off'] .mx-thread-wrap { display: none; }
.mx-signin {
  flex: 1; min-height: 0; display: grid; align-content: center; justify-items: center; gap: 12px; padding: 32px 24px 48px; text-align: center; overflow: auto;
  background: radial-gradient(520px 320px at 50% 38%, rgba(217, 180, 90, 0.09), transparent 70%);
}
.mx-signin .marcus-coin { width: 104px; height: 104px; margin-bottom: 6px; }
.mx-signin .eyebrow { margin: 0; }
.mx-signin-title { margin: 0; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; color: var(--gold-hi); }
.mx-signin-text { max-width: 42ch; margin: 0 0 8px; color: var(--muted); font-size: 16px; line-height: 1.55; }
.mx-signin-note { max-width: 46ch; margin: 4px 0 0; }
/* Google's own dark button: its G, its words. */
.mx-google {
  display: inline-flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 22px 0 16px; border-radius: 999px; border: 1px solid #8e918f;
  background: #131314; color: #e3e3e3; font: 500 15px/1 var(--sans); letter-spacing: 0.01em; text-decoration: none; transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.mx-google:hover { background: #1c1c1e; border-color: #c4c7c5; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.9); }
.mx-google:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.g-logo { width: 20px; height: 20px; flex: none; }

/* Signed in: your face in the corner, and a small menu. */
.mx-account { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; padding: 0; overflow: visible; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--gold-hi); font: 600 15px/1 var(--serif); cursor: pointer; }
.mx-account img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; } /* fixed: a picture of any shape stays a circle */
.mx-account:hover, .mx-account[aria-expanded='true'] { border-color: var(--gold); }
.mx-account:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.mx-owner-dot { position: absolute; right: -2px; bottom: -2px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold-grad); box-shadow: 0 0 0 2px var(--bg), 0 0 10px rgba(217, 180, 90, 0.6); }
.mx-account-menu {
  position: absolute; right: 16px; top: calc(100% - 4px); z-index: 30; width: min(300px, calc(100vw - 32px)); display: grid; gap: 6px; padding: 16px;
  border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(21, 18, 15, 0.97); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.75); backdrop-filter: blur(12px);
}
.mx-account-name { margin: 0; font-family: var(--serif); font-size: 20px; color: var(--gold-hi); }
.mx-account-mail { margin: 0; overflow-wrap: anywhere; }
.mx-account-owner { margin: 4px 0 6px; font-size: 13px; line-height: 1.45; color: var(--text); }
.mx-account-owner b { color: var(--gold-hi); font-weight: 600; }
.mx-account-menu .btn { justify-self: start; margin-top: 6px; gap: 8px; }
.mx-account-menu .btn svg { width: 15px; height: 15px; }

@media (max-width: 760px) {
  html.mx-page .chrome { top: calc(12px + env(safe-area-inset-top)); }
  html.mx-page .chrome.tucked { transform: translateY(-150%); }
  html.mx-page .orb-label { display: none; }
  .mx-chat-bar { min-height: 0; padding: calc(12px + env(safe-area-inset-top)) 12px 10px; }
  .mx-chat-tools { order: -1; width: 100%; justify-content: flex-end; min-height: 46px; padding-left: calc(var(--chrome-right, 90px) + 4px); }
  .mx-portal-toggle span { display: none; }
  .mx-signin { padding: 20px 20px 36px; }
}
@media (max-width: 640px) {
  .mx-thread { padding: 14px 12px 6px; }
  .mx-say { padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); }
  .mx-tool, .mx-account { min-width: 38px; width: 38px; min-height: 38px; height: 38px; padding: 0; }
  .mx-about > summary.mx-tool { padding: 0; }
  .mx-signin .marcus-coin { width: 80px; height: 80px; }
}

/* ---------- accounts, everywhere (v0.16): Sign in · Sign up, the window, you in the menu ---------- */
.acct { position: fixed; top: 18px; right: 18px; z-index: 50; display: flex; align-items: center; gap: 8px; visibility: hidden; transition: opacity 0.6s ease; }
.acct.is-ready { visibility: visible; }
.acct-in, .acct-up {
  height: 44px; padding: 0 20px; border-radius: 999px; cursor: pointer; font: 500 11px/1 var(--sans); letter-spacing: 0.2em; text-transform: uppercase;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color 0.2s, background 0.2s, filter 0.2s;
}
.acct-in { border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.72); color: var(--gold-hi); }
.acct-in:hover { border-color: var(--gold); background: rgba(21, 18, 15, 0.92); }
.acct-up { border: 1px solid transparent; background: var(--gold-grad); color: #1a1407; font-weight: 600; box-shadow: 0 12px 32px -14px rgba(217, 180, 90, 0.6); }
.acct-up:hover { filter: brightness(1.08); }
.acct-in:focus-visible, .acct-up:focus-visible, .acct-me:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 3px; }
.acct-me {
  position: relative; display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.72); color: var(--gold-hi); font: 600 17px/1 var(--serif);
}
.acct-me:hover, .acct-me[aria-expanded='true'] { border-color: var(--gold); }
.acct-me img, .acct-face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.acct-dot { position: absolute; right: -1px; bottom: -1px; width: 13px; height: 13px; border-radius: 50%; background: var(--gold-grad); box-shadow: 0 0 0 2px var(--bg), 0 0 10px rgba(217, 180, 90, 0.6); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(300px, calc(100vw - 32px)); display: grid; gap: 6px; padding: 18px;
  border: 1px solid var(--line-strong); border-radius: 18px; background: rgba(21, 18, 15, 0.97); box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8); backdrop-filter: blur(12px);
}
.acct-name { margin: 0; font-family: var(--serif); font-size: 21px; color: var(--gold-hi); }
.acct-mail { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.acct-owner { margin: 4px 0 2px; font-size: 13px; line-height: 1.45; }
.acct-owner b { color: var(--gold-hi); font-weight: 600; }
.acct-link { margin: 6px 0 4px; font-size: 14px; color: var(--gold); text-decoration: none; }
.acct-link:hover { color: var(--gold-hi); }
.acct-menu .btn { justify-self: start; }
html.viewer-open .acct, html.room-open .acct, html.theatre-open .acct, html.mx-page .acct, html.auth-open .acct { visibility: hidden; }
html.is-idle .acct.is-in:not(:hover):not(:focus-within) { opacity: 0.35; } /* Sign in and Sign up never fade */

/* The window: sign in, or make an account (with Google, it's the same step). */
.auth-scrim { position: fixed; inset: 0; z-index: 90; background: rgba(6, 5, 5, 0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity 0.25s; }
.auth-scrim.open { opacity: 1; }
.auth-modal {
  position: fixed; z-index: 91; left: 50%; top: 50%; width: min(440px, calc(100vw - 32px)); max-height: calc(100svh - 32px); overflow: auto;
  display: grid; justify-items: center; gap: 10px; padding: 44px 32px 28px; text-align: center;
  border: 1px solid var(--line-strong); border-radius: 24px; background: radial-gradient(420px 240px at 50% 0%, rgba(217, 180, 90, 0.13), transparent 70%), #110f0d;
  box-shadow: 0 60px 140px -40px rgba(0, 0, 0, 0.95), 0 0 0 1px rgba(217, 180, 90, 0.05);
  opacity: 0; transform: translate(-50%, -46%) scale(0.98); transition: opacity 0.25s, transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.auth-modal.open { opacity: 1; transform: translate(-50%, -50%); }
.auth-close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: transparent; color: var(--gold-hi); font-size: 20px; line-height: 1; cursor: pointer; }
.auth-close:hover { border-color: var(--gold); }
.auth-star { width: 34px; height: 34px; fill: var(--gold); filter: drop-shadow(0 0 14px rgba(217, 180, 90, 0.55)); }
.auth-modal .eyebrow { margin: 4px 0 0; }
.auth-title { margin: 0; font-size: clamp(30px, 4vw, 40px); line-height: 1.05; color: var(--gold-hi); }
.auth-sub { max-width: 34ch; margin: 0 0 12px; color: var(--muted); line-height: 1.55; }
.auth-google { width: 100%; justify-content: center; }
.auth-google[hidden] { display: none; }
.auth-note { max-width: 36ch; margin: 0; font-size: 14px; color: var(--gold-hi); }
.auth-switch { margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.auth-switch .link-btn { color: var(--gold-hi); font-size: 14px; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
.auth-fine { max-width: 36ch; margin: 12px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); }

/* You, in the pop-out menu. */
.menu-account { display: grid; gap: 10px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.menu-account-text { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.menu-account-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.menu-account-actions .btn { justify-content: center; }
.menu-account-me { display: flex; align-items: center; gap: 12px; min-width: 0; }
.acct-face { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; overflow: hidden; border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--gold-hi); font: 600 16px/1 var(--serif); }
.menu-account-id { display: grid; gap: 2px; min-width: 0; }
.menu-account-id b { font-weight: 500; color: var(--gold-hi); }
.menu-account-id small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-badge { margin-left: auto; padding: 4px 9px; border-radius: 999px; background: var(--gold-grad); color: #1a1407; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.menu-account-out { justify-self: start; padding: 0; font-size: 13px; }

@media (max-width: 760px) {
  .acct { top: calc(12px + env(safe-area-inset-top)); right: 12px; gap: 6px; }
  .acct-in, .acct-up { height: 38px; padding: 0 14px; letter-spacing: 0.14em; }
  .acct-me { width: 40px; height: 40px; }
  .auth-modal { padding: 40px 22px 24px; }
}

/* ---------- THE PORTAL, alive (v0.17): open, close, widen, fill the window; live; previews ----------
   On a computer the Portal glides open and shut beside the conversation (its contents keep their
   width while it moves), its edge drags to any width, and it can fill the window. A live line says
   what MARCUS is doing; web pages arrive as cards; pictures open large; several things stand side
   by side. On narrower screens it stays a drawer that a swipe to the right closes. */
.mx-stage.is-resizing, .mx-stage.no-anim { transition: none; }
.mx-stage.portal-closed { grid-template-columns: minmax(0, 1fr) 0px; }
.mx-stage.portal-closed .mx-portal { border-left-color: transparent; }
.mx-portal { min-width: 0; }
.mx-stage.portal-closed .mx-portal > :not(.portal-split), .mx-stage.portal-opening .mx-portal > :not(.portal-split) { min-width: var(--pw-frozen, 460px); }
.mx-portal-toggle.is-on { border-color: rgba(139, 124, 246, 0.6); background: rgba(139, 124, 246, 0.12); }
.mx-portal-toggle.is-on:hover { background: rgba(139, 124, 246, 0.2); }

/* Its edge: drag to widen or narrow it. */
.portal-split { position: absolute; top: 0; bottom: 0; left: 0; z-index: 6; width: 10px; cursor: col-resize; touch-action: none; }
.portal-split::after { content: ''; position: absolute; top: 50%; left: 3px; width: 4px; height: 48px; margin-top: -24px; border-radius: 4px; background: rgba(201, 192, 255, 0.45); opacity: 0; transition: opacity 0.2s; }
.portal-split:hover::after, .portal-split:focus-visible::after, .mx-stage.is-resizing .portal-split::after { opacity: 1; }
.portal-split:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.mx-stage.is-resizing { cursor: col-resize; user-select: none; }

/* Its own controls: fill the window, close. */
.portal-ctl { display: inline-flex; gap: 6px; }
.portal-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; border: 1px solid var(--line); background: rgba(11, 10, 9, 0.5); color: var(--gold-hi); cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.portal-btn:hover, .portal-btn[aria-pressed='true'] { border-color: rgba(139, 124, 246, 0.7); background: rgba(139, 124, 246, 0.14); }
.portal-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.portal-btn svg { width: 17px; height: 17px; }

/* Filling the window: a screen and its feed, side by side on a wide display. */
html.portal-full-open { overflow: hidden; }
.mx-stage.portal-full .mx-portal {
  position: fixed; inset: 0; z-index: 70; width: auto; height: auto; min-width: 0; border: 0; border-radius: 0; transform: none; visibility: visible;
  padding-top: env(safe-area-inset-top); animation: portal-rise 0.45s cubic-bezier(0.2, 0.7, 0.2, 1) both; box-shadow: none;
}
@keyframes portal-rise { from { opacity: 0; transform: scale(0.975); } }
.mx-stage.portal-full .portal-split { display: none; }
.mx-stage.portal-full .portal-screen { max-height: none; }
@media (min-width: 900px) {
  .mx-stage.portal-full #ppanel-live:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); grid-template-rows: auto minmax(0, 1fr); gap: 12px 16px; overflow: hidden; }
  .mx-stage.portal-full #ppanel-live .portal-screen { grid-row: 1 / span 2; height: 100%; min-height: 0; padding: 26px 30px; }
  .mx-stage.portal-full #ppanel-live .portal-meter { grid-column: 2; }
  .mx-stage.portal-full #ppanel-live .portal-feed { grid-column: 2; min-height: 0; overflow: auto; align-content: start; }
  .mx-stage.portal-full .portal-art img { max-height: min(68vh, 900px); }
  .mx-stage.portal-full .portal-link-media img { max-height: min(52vh, 620px); }
}

/* The live line: what he is doing right now. */
.portal-now {
  position: relative; display: flex; align-items: center; gap: 10px; margin: 0; padding: 8px 16px; border-bottom: 1px solid rgba(139, 124, 246, 0.16);
  background: linear-gradient(90deg, rgba(139, 124, 246, 0.14), transparent 75%); font: 12px/1.4 var(--mono); color: var(--text); animation: hog-in 0.3s ease-out both;
}
.portal-now[hidden] { display: none; }
.portal-now b { font-weight: 600; color: #d4ccff; }
.portal-now-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-now-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px rgba(217, 180, 90, 0.6); }
.portal-now.is-busy .portal-now-dot { background: var(--violet); box-shadow: 0 0 10px rgba(139, 124, 246, 0.8); animation: live 0.9s infinite; }
.portal-now.is-busy::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--violet), transparent) no-repeat; background-size: 40% 100%; animation: hog-sweep 1.4s linear infinite;
}

/* Following him, or showing your pick. */
.portal-follow-slot { position: absolute; top: 20px; right: 24px; z-index: 3; }
.portal-follow, .portal-following {
  display: inline-flex; align-items: center; gap: 7px; min-height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(139, 124, 246, 0.5);
  background: rgba(21, 18, 15, 0.92); color: #ddd6ff; font: 500 10.5px/1 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; backdrop-filter: blur(8px);
}
.portal-follow { cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.portal-follow:hover { background: rgba(139, 124, 246, 0.2); border-color: var(--violet); }
.portal-follow:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.portal-follow svg { width: 14px; height: 14px; }
.portal-following { border-color: rgba(139, 124, 246, 0.3); color: var(--muted); }
.portal-following i { width: 7px; height: 7px; border-radius: 50%; background: var(--violet); animation: live 1.2s infinite; }
.portal-screen .portal-kicker { padding-right: 170px; }

/* Pictures open large. */
.portal-zoom { display: block; width: 100%; padding: 0; border: 0; border-radius: 12px; background: none; cursor: zoom-in; }
.portal-zoom:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.portal-zoom img { display: block; }

/* A web page, as a card. */
.portal-link { display: grid; overflow: hidden; border-radius: 14px; border: 1px solid var(--line); background: rgba(11, 10, 9, 0.55); animation: hog-in 0.35s ease-out both; }
.portal-link-media { display: block; padding: 0; border: 0; background: #0b0a09; cursor: zoom-in; }
.portal-link-media[hidden], .portal-link img[hidden], .hog-link img[hidden] { display: none; }
.portal-link-media:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.portal-link-media img { display: block; width: 100%; max-height: 280px; object-fit: cover; animation: hog-develop 0.9s ease-out both; }
.portal-link-body { display: grid; gap: 6px; padding: 12px 14px 14px; min-width: 0; }
.portal-link-site { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-dim); }
.portal-link-icon { width: 18px; height: 18px; border-radius: 4px; object-fit: contain; }
.portal-link-mono { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }
.portal-link-title { font: 500 19px/1.3 var(--serif); color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.portal-link-title:hover { color: var(--gold-hi); }
.portal-link-title:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.portal-link-desc { margin: 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.portal-link-meta { margin: 0; font-size: 10.5px; letter-spacing: 0.06em; color: var(--muted); }
.portal-skeleton { height: 2.9em; border-radius: 6px; background: linear-gradient(90deg, rgba(217, 180, 90, 0.05), rgba(217, 180, 90, 0.13), rgba(217, 180, 90, 0.05)); background-size: 200% 100%; animation: portal-shimmer 1.2s linear infinite; }
@keyframes portal-shimmer { to { background-position: -200% 0; } }
.portal-link.is-compact .portal-link-media img { max-height: 150px; }
.portal-link.is-compact .portal-link-title { font-size: 15px; }
.portal-link.is-compact .portal-link-desc { font-size: 12.5px; }

/* Several things side by side. */
.portal-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.portal-cell { display: grid; gap: 6px; align-content: start; min-width: 0; animation: hog-in 0.4s ease-out both; }
.portal-cell:nth-child(2) { animation-delay: 0.06s; } .portal-cell:nth-child(3) { animation-delay: 0.12s; } .portal-cell:nth-child(4) { animation-delay: 0.18s; }
.portal-cell .portal-zoom img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; background: rgba(11, 10, 9, 0.6); }
.portal-cell-icon { display: grid; place-items: center; aspect-ratio: 4 / 3; border-radius: 10px; border: 1px dashed var(--line); color: var(--gold); }
.portal-cell-icon svg { width: 30px; height: 30px; }
/* A passage side by side shows his own words (the start of it); a click opens the whole passage. */
.portal-cell-quote { display: block; width: 100%; margin: 0; padding: 14px 16px; border-radius: 10px; border: 1px solid var(--line); background: rgba(217, 180, 90, 0.04); color: var(--text); font: italic 400 14.5px/1.55 var(--serif); text-align: left; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
/* the clamp lives on the text, not the padded box, so no eighth line peeks out below the seventh */
.portal-cell-quote > span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7; overflow: hidden; }
.portal-cell-quote:hover { border-color: var(--gold); background: rgba(217, 180, 90, 0.08); }
.portal-cell-quote:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.hog-think-text p { margin: 0 0 0.5em; }
.hog-think-text > :last-child, .hog-note-text > :last-child { margin-bottom: 0; }
.portal-cell-name { display: grid; gap: 2px; padding: 2px; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; border-radius: 6px; }
.portal-cell-name:hover b { color: var(--gold-hi); }
.portal-cell-name:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.portal-cell-name b { font: 500 15px/1.3 var(--serif); }
.portal-cell-name small { font-size: 10.5px; color: var(--muted); }
.mx-stage.portal-full .portal-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* A page he read, in the conversation's timeline. */
.hog-link { display: flex; gap: 12px; align-items: center; max-width: 600px; padding: 8px; border-radius: 12px; border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color 0.2s; }
.hog-link:hover { border-color: var(--gold); }
.hog-link img, .hog-link-mono { flex: none; width: 104px; height: 68px; border-radius: 8px; object-fit: cover; }
.hog-link-mono { display: grid; place-items: center; background: linear-gradient(135deg, rgba(217, 180, 90, 0.18), rgba(139, 124, 246, 0.18)); font: 600 22px/1 var(--serif); color: var(--gold-hi); }
.hog-link > span { flex: 1; display: grid; gap: 3px; min-width: 0; }
.hog-link small { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-dim); }
.hog-link b { font-weight: 500; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hog-link em { font-style: normal; font-size: 12.5px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* A Wikipedia article he looked up (v0.29): its own picture, which opens large, beside what it is. */
.hog-wiki { display: flex; gap: 14px; align-items: flex-start; max-width: 620px; margin: 0; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); }
.hog-wiki-pic { flex: none; width: 132px; aspect-ratio: 4 / 3; padding: 0; border: 0; border-radius: 8px; overflow: hidden; cursor: zoom-in; background: var(--panel-2); }
.hog-wiki-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s ease; }
.hog-wiki-pic:hover img, .hog-wiki-pic:focus-visible img { transform: scale(1.05); }
.hog-wiki-pic:focus-visible { outline: 2px solid var(--gold-hi); outline-offset: 2px; }
.hog-wiki figcaption { flex: 1; display: grid; gap: 4px; min-width: 0; }
.hog-wiki small { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-dim); }
.hog-wiki-title { font-weight: 500; font-size: 15px; color: var(--gold-hi); text-decoration: none; }
.hog-wiki-title:hover { text-decoration: underline; }
.hog-wiki em { font-style: italic; font-size: 13px; color: var(--text); }
.hog-wiki-text { font-size: 12.5px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hog-wiki-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; }
.hog-wiki-links a { color: var(--gold); text-decoration: none; }
.hog-wiki-links a:hover { color: var(--gold-hi); text-decoration: underline; }
@media (max-width: 560px) { .hog-wiki-pic { width: 96px; } }
@media (prefers-reduced-motion: reduce) { .hog-wiki-pic img { transition: none; } }

/* The chat bar keeps to one line when the conversation is narrow (a tablet with the Portal open). */
.mx-chat { container: mxchat / inline-size; }
@container mxchat (max-width: 900px) {
  .mx-mode-text small { display: none; }
  .mx-mode { min-height: 40px; padding: 4px 12px 4px 6px; gap: 7px; }
  .mx-portal-toggle span { display: none; }
  .mx-chat-bar { gap: 8px; }
}
@container mxchat (max-width: 640px) {
  .mx-mode-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; } /* still read aloud */
  .mx-mode { padding: 4px; min-height: 40px; }
  .mx-chat-tools { gap: 4px; }
}
@media (min-width: 1101px) and (max-width: 1500px) {
  html.mx-page:has(.mx-stage:not(.portal-closed)) .chrome .orb-label { display: none; }
}
/* Filling the window, the Portal has the screen to itself: the menu button and account bar step aside. */
html.portal-full-open .chrome, html.portal-full-open .acct { visibility: hidden; }
/* A narrow Portal: its title and buttons on one line, the tabs across the next. */
.mx-portal { container: portal / inline-size; }
@container portal (max-width: 720px) {
  .portal-tabs { margin-left: 0; order: 3; width: 100%; justify-content: space-between; }
  .portal-tabs button { flex: 1; padding: 0 6px; }
  .portal-ctl { margin-left: auto; }
}
@media (max-width: 1100px) {
  .portal-split { display: none; }
  .portal-ctl { margin-left: auto; }
}
@media (max-width: 640px) {
  .portal-ctl [data-mx='portal-full'] { display: none; }
  .portal-follow-slot { top: 16px; right: 18px; }
  .portal-screen .portal-kicker { padding-right: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  .mx-stage { transition: none; }
  .mx-stage.portal-full .mx-portal, .portal-now, .portal-link, .portal-cell { animation: none; }
}

/* ---------- Favorites: a heart on anything, and the page that keeps them (v0.19) ---------- */
.fav-btn svg { width: 17px; height: 17px; flex: none; transition: transform 0.25s cubic-bezier(0.3, 1.6, 0.5, 1), fill 0.2s, color 0.2s; }
.fav-btn[aria-pressed='true'] svg { fill: currentColor; color: #ff6b8a; }
.fav-btn[aria-pressed='true'] { color: var(--text); }
.fav-btn.is-popping svg { animation: fav-pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
@keyframes fav-pop { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .fav-btn.is-popping svg { animation: none; } }
/* On a card's picture: a round heart in the corner. */
.fav-on-card {
  position: absolute; top: 10px; left: 10px; z-index: 2; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.74); color: var(--gold-hi); backdrop-filter: blur(6px);
  opacity: 0; transform: scale(0.9); transition: opacity 0.2s, transform 0.2s, border-color 0.2s;
}
.fav-on-card:hover { border-color: var(--gold); }
.fav-on-card:focus-visible { opacity: 1; transform: none; outline: 2px solid var(--gold); outline-offset: 2px; }
.art-card-wrap:hover .fav-on-card, .wire-card-wrap:hover .fav-on-card, .video-card-wrap:hover .fav-on-card, .fav-on-card[aria-pressed='true'] { opacity: 1; transform: none; }
@media (hover: none) { .fav-on-card { opacity: 0.92; transform: none; } }
.wire-card-wrap, .video-card-wrap { position: relative; display: flex; flex-direction: column; min-width: 0; }
.wire-card-wrap > .wire-card, .video-card-wrap > .video-card { flex: 1; }
.wire-card-wrap .fav-on-card { left: auto; right: 10px; }
.wire-card-wrap:has(.wire-card.no-img) .fav-on-card { top: 12px; right: 12px; }
.video-card-wrap .fav-on-card { left: auto; right: 10px; }
.fav-slide { width: 44px; padding: 0; }
.fav-slide svg { width: 18px; height: 18px; }
.fav-inline { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.fav-inline svg { width: 15px; height: 15px; }
.viewer-fav { display: contents; }
.viewer-btn.fav-btn { display: grid; place-items: center; }
.menu-count { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(255, 107, 138, 0.16); color: #ffb3c3; font-size: 12px; font-weight: 500; letter-spacing: 0.04em; vertical-align: 6px; }

.favs-head .lede { max-width: 60ch; }
.favs-heart svg { width: 1em; height: 1em; vertical-align: -0.12em; color: #ff6b8a; fill: currentColor; }
.favs-status { margin: 14px 0 0; color: var(--gold-dim); }
.favs-status[data-cloud='on'] { color: var(--text); }
.favs { padding: 0 0 72px; }
.favs-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; margin-bottom: 22px; }
.favs-kinds { display: flex; flex-wrap: wrap; gap: 8px; }
.favs-bar > * { min-width: 0; max-width: 100%; }
.favs-kinds .chip { cursor: pointer; font: inherit; font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; }
.favs-n:not(:empty) { margin-left: 4px; font-size: 10px; letter-spacing: 0; opacity: 0.8; }
.favs-find { flex: 1 1 260px; max-width: 420px; display: flex; }
.favs-find input { flex: 1; min-width: 0; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.7); color: var(--text); font: inherit; font-size: 15px; }
.favs-find input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(217, 180, 90, 0.14); }
.favs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; align-items: start; }
.favs-grid > .favs-empty { grid-column: 1 / -1; }
.fav-card { display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); transition: border-color 0.2s, transform 0.2s; }
.fav-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.fav-open { all: unset; display: flex; flex-direction: column; min-width: 0; cursor: pointer; }
div.fav-open { cursor: default; }
.fav-open:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; border-radius: 16px; }
.fav-img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #0e0d0b; }
.fav-card[data-kind='film'] .fav-img, .fav-card[data-kind='article'] .fav-img { aspect-ratio: 16 / 9; }
.fav-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.fav-card[data-kind='art'] .fav-img img { object-fit: contain; padding: 10px; }
.fav-card:hover .fav-img img { transform: scale(1.03); }
.fav-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 10px; }
.fav-kind { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-dim); }
.fav-title { font-family: var(--serif); font-size: 20px; line-height: 1.25; color: var(--text); overflow-wrap: anywhere; }
.fav-open:hover .fav-title { color: var(--gold-hi); }
.fav-sub { font-size: 13px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fav-quote { margin: 4px 0 0; font-size: 16px; line-height: 1.5; }
.fav-quote p { margin: 0 0 0.5em; }
.fav-said { font: 15px/1.5 var(--serif); color: var(--text); }
.fav-said p { margin: 0 0 0.5em; }
/* A card stays a card: a long passage he quoted fades after a few lines (the text itself, never its
   padded box, so nothing peeks below; every word is still there for readers and the armor). */
.fav-said .kept-quote .med-text { max-height: 9em; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 62%, transparent); mask-image: linear-gradient(to bottom, #000 62%, transparent); }
.fav-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding: 6px 12px 14px; }
.fav-act { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(11, 10, 9, 0.4); color: var(--text); font: 500 12px/1 var(--sans); text-decoration: none; cursor: pointer; }
.fav-act:hover { border-color: var(--gold); }
.fav-act svg { width: 15px; height: 15px; }
.fav-act:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.favs-empty { display: grid; justify-items: center; gap: 8px; padding: 56px 16px; text-align: center; }
.favs-empty .display { margin: 0; font-size: 30px; color: var(--gold-hi); }
.favs-empty .muted { max-width: 44ch; margin: 0; }
.favs-empty .actions { margin-top: 12px; }
.favs-empty-heart svg { width: 46px; height: 46px; color: #ff6b8a; }
.favs-tools { display: flex; justify-content: center; margin-top: 28px; }
@media (max-width: 640px) {
  .favs-bar { flex-direction: column; align-items: stretch; }
  .favs-find { flex: none; max-width: none; }
  .favs-kinds { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .favs-kinds .chip { flex: none; }
  .favs-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .fav-title { font-size: 17px; }
  .fav-sub { display: none; }
  .fav-act span { display: none; }
  .fav-act { padding: 0 10px; }
}

/* ---------- the museum's games (/play, v0.20) ----------
   Each game is a museum material: --gm-ground, --gm-ink and --gm-accent come from GAMES in data.js
   (set from JavaScript, so the colours live in one place and the armor checks their contrast). */
.play-more { margin: 4px 0 0; font-size: 14px; }
.play-more a { color: var(--gold); }

.gm-hub-head .lede { max-width: 62ch; }
.gm-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 20px; padding-bottom: 28px; }
.gm-card {
  --gm-ground: #1b1713; --gm-ink: var(--text); --gm-accent: var(--gold);
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: var(--gm-ground); color: var(--gm-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08) inset, 0 24px 60px -34px rgba(0, 0, 0, 0.9);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.gm-card:hover { transform: translateY(-3px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 30px 70px -30px rgba(0, 0, 0, 0.95); }
.gm-card-main { display: flex; flex-direction: column; gap: 12px; padding: 24px 24px 18px; color: inherit; text-decoration: none; flex: 1; }
.gm-card-main:focus-visible { outline: 3px solid var(--gm-accent); outline-offset: -6px; border-radius: 20px; }
.gm-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.gm-card-name { font-size: clamp(30px, 3vw, 38px); line-height: 1; letter-spacing: -0.01em; }
.gm-icon { flex: none; display: inline-flex; width: 56px; height: 56px; color: var(--gm-accent); }
.gm-icon svg { width: 100%; height: 100%; }
.gm-card-line { font-size: 16.5px; line-height: 1.4; max-width: 30ch; }
.gm-card-foot { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; margin-top: auto; padding-top: 10px; font-size: 15px; }
.gm-card-credit { font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gm-accent); }
.gm-card-bar { display: flex; align-items: center; gap: 14px; padding: 12px 24px; border-top: 1px solid rgba(255, 255, 255, 0.14); background: rgba(0, 0, 0, 0.16); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; }
.gm-card[data-game="four"] .gm-card-bar { border-top-color: rgba(0, 0, 0, 0.18); background: rgba(0, 0, 0, 0.08); }
.gm-card-status { font-weight: 600; }
.gm-card.is-done .gm-card-status { color: var(--gm-accent); }
.gm-card-archive { margin-left: auto; color: inherit; text-underline-offset: 3px; }
.gm-free { padding: 28px 0 72px; border-top: 1px solid var(--line); margin-top: 20px; }
.gm-free .lede { margin-top: 0; }
.gm-free .lede a { color: var(--gold); }
.gm-dim { color: var(--muted); }

/* One game's page. */
.gm-page { --gm-ground: #1b1713; --gm-ink: var(--text); --gm-accent: var(--gold); padding: 84px 0 72px; }
.gm-head {
  position: relative; border-radius: 26px; padding: clamp(24px, 4vw, 44px); padding-right: clamp(96px, 12vw, 150px);
  background: var(--gm-ground); color: var(--gm-ink);
}
.gm-head .eyebrow { color: var(--gm-accent); margin-bottom: 10px; }
.gm-head h1 { font-size: clamp(40px, 6vw, 76px); line-height: 0.95; margin: 0; }
.gm-head .gm-icon { position: absolute; top: clamp(22px, 4vw, 40px); right: clamp(22px, 4vw, 40px); width: clamp(56px, 8vw, 88px); height: clamp(56px, 8vw, 88px); }
.gm-back { display: inline-block; margin-bottom: 18px; color: inherit; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; opacity: 0.85; }
.gm-back:hover { opacity: 1; text-decoration: underline; }
.gm-date { margin: 12px 0 0; font-size: 18px; font-weight: 600; }
.gm-how { margin: 12px 0 0; max-width: 62ch; font-size: 16px; line-height: 1.5; }
.gm-how summary { cursor: pointer; width: max-content; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gm-accent); }
.gm-how p { margin: 8px 0 0; }
.gm-board { margin-top: 26px; }
.gm-board > .loading, .gm-board > .error-block { padding: 40px 0; }
.gm-ask { font-size: clamp(28px, 3vw, 40px); color: var(--gold-hi); margin: 0; }
.gm-q { margin: 0; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-dim); }
.gm-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 4px; }
.gm-options-list { grid-template-columns: 1fr; }
.gm-option {
  min-height: 56px; padding: 10px 16px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 1px solid var(--line-strong); background: rgba(217, 180, 90, 0.04); color: var(--text);
  font-family: var(--serif); font-size: 20px; line-height: 1.2; transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.gm-option b { display: block; font-weight: 600; }
.gm-option span { display: block; margin-top: 2px; font-family: var(--sans); font-size: 13px; color: var(--muted); }
.gm-option:hover:not(:disabled) { background: rgba(217, 180, 90, 0.12); border-color: var(--gold); transform: translateY(-1px); }
.gm-option.is-right { background: rgba(88, 196, 130, 0.16); border-color: #58c482; color: #c9f5d9; }
.gm-option.is-wrong { background: rgba(255, 90, 79, 0.14); border-color: #ff5a4f; color: #ffd0cc; text-decoration: line-through; text-decoration-thickness: 1px; }
.gm-option:disabled:not(.is-right):not(.is-wrong) { opacity: 0.5; cursor: default; }
.gm-reveal { margin-top: 14px; padding-top: 16px; border-top: 1px solid var(--line); }
.gm-reveal p { margin: 0 0 6px; }
.gm-verdict-line { font-size: 28px; color: var(--gold-hi); }
.gm-work a { color: var(--gold-hi); text-decoration: none; }
.gm-work a:hover { text-decoration: underline; }
.gm-reveal-acts, .gm-done-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.gm-fav { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--gold-hi); cursor: pointer; font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; }
.gm-fav svg { width: 18px; height: 18px; }

/* Century and Which Room? */
.gm-quiz { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 24px; overflow: hidden; background: var(--panel); }
.gm-dots { grid-column: 1 / -1; display: flex; gap: 8px; margin: 0; padding: 16px 20px; list-style: none; border-bottom: 1px solid var(--line); }
.gm-dots li { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.1); }
.gm-dots li.is-now { background: var(--gm-accent); opacity: 0.6; }
.gm-dots li.is-right { background: var(--gold); }
.gm-dots li.is-wrong { background: #5a524a; }
.gm-quiz-art { margin: 0; min-height: 420px; display: flex; align-items: center; justify-content: center; padding: 24px; background: #080706; }
.gm-quiz-art img { max-width: 100%; max-height: 520px; object-fit: contain; border-radius: 3px; box-shadow: 0 30px 90px -30px rgba(0, 0, 0, 0.9); }
.gm-quiz-body { display: flex; flex-direction: column; gap: 10px; padding: clamp(20px, 3vw, 36px); }

/* Look Closer. */
.gm-closer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: start; }
.gm-closer-frame { position: relative; margin: 0; aspect-ratio: 1 / 1; overflow: hidden; border-radius: 22px; background: #080706; border: 1px solid var(--line); }
.gm-closer-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.gm-closer-frame.is-whole .gm-closer-img { object-fit: contain; }
.gm-step { position: absolute; left: 12px; bottom: 12px; padding: 5px 10px; border-radius: 999px; background: rgba(0, 0, 0, 0.72); color: var(--gold-hi); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.gm-closer-body { display: flex; flex-direction: column; gap: 10px; }
.gm-closer-body > .small { margin: 0; }

/* Four Rooms. */
.gm-four { max-width: 760px; margin: 0 auto; }
.gm-bands { display: grid; gap: 10px; }
.gm-bands:empty { display: none; }
.gm-band { border-radius: 16px; padding: 12px 14px; background: #e3c06b; color: #1a1205; }
.gm-band[data-band="1"] { background: #9fc6e8; color: #0b1622; }
.gm-band[data-band="2"] { background: #c7b2ec; color: #1a1028; }
.gm-band[data-band="3"] { background: #9ed6b4; color: #0b1d12; }
.gm-band-name { margin: 0 0 8px; font-size: 15px; letter-spacing: 0.04em; }
.gm-band-shown { font-size: 12px; opacity: 0.8; }
.gm-band-works { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.gm-band-works a { display: block; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden; background: rgba(0, 0, 0, 0.2); }
.gm-band-works img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.gm-tile { position: relative; aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 12px; overflow: hidden; background: #080706; cursor: pointer; outline-offset: 3px; transition: transform 0.15s ease; }
.gm-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.15s; }
.gm-tile:hover { transform: translateY(-2px); }
.gm-tile[aria-pressed="true"] { box-shadow: 0 0 0 4px var(--gold) inset; }
.gm-tile[aria-pressed="true"]::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #1a1407; font: 700 14px/24px var(--sans); text-align: center; }
.gm-tile[aria-pressed="true"] img { opacity: 0.72; }
.gm-note { min-height: 1.5em; margin: 14px 0 0; text-align: center; font-family: var(--serif); font-size: 22px; color: var(--gold-hi); }
.gm-mistakes { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 0; color: var(--muted); }
.gm-pip { width: 12px; height: 12px; border-radius: 50%; border: 1px solid var(--gold-dim); }
.gm-pip.is-on { background: var(--gold); border-color: var(--gold); }
.gm-four-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.gm-four-acts .btn:disabled { opacity: 0.45; cursor: default; }

/* The Missing Word. */
.gm-wordgame { max-width: 760px; margin: 0 auto; }
.gm-passage { margin: 0; padding: clamp(22px, 4vw, 40px); border-radius: 24px; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--gm-accent); font-family: var(--serif); font-size: clamp(21px, 2.3vw, 27px); line-height: 1.5; color: var(--text); white-space: pre-line; }
.gm-blank { display: inline-block; padding: 0 6px; border-bottom: 2px solid var(--gm-accent); color: var(--gm-accent); font-family: var(--mono); font-size: 0.72em; letter-spacing: 0.06em; white-space: nowrap; }
.gm-word { padding: 0 4px; border-radius: 4px; background: rgba(217, 180, 90, 0.22); color: var(--gold-hi); }
.gm-word.is-missed { background: rgba(255, 90, 79, 0.18); color: #ffd0cc; }
.gm-cite { margin: 12px 0 0; font-size: 12px; letter-spacing: 0.08em; color: var(--gold-dim); }
.gm-guesses { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.gm-guesses li { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-strong); font-family: var(--mono); font-size: 13px; }
.gm-guesses li.is-wrong { text-decoration: line-through; color: var(--muted); }
.gm-guesses li.is-right { border-color: var(--gold); color: var(--gold-hi); }
.gm-wordform { display: flex; gap: 10px; margin-top: 18px; }
.gm-wordform input { flex: 1; min-width: 0; min-height: 52px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--line-strong); background: rgba(217, 180, 90, 0.04); color: var(--text); font: 500 19px var(--mono); letter-spacing: 0.06em; }
.gm-wordform input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(217, 180, 90, 0.2); }
.gm-wordgame > .small { margin: 10px 0 0; }

/* Finished: the verdict, marks, stats and share. */
.gm-done { margin-top: 28px; padding: clamp(22px, 3vw, 34px); border-radius: 24px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-strong); text-align: center; }
.gm-verdict { margin: 0; font-size: clamp(32px, 4vw, 48px); color: var(--gold-hi); }
.gm-marks { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 0; }
.gm-marks-row { display: inline-flex; gap: 6px; }
.gm-mark { width: 22px; height: 22px; border-radius: 5px; background: #3a342d; }
.gm-mark.is-right { background: var(--gold); }
.gm-marks b { font-size: 15px; color: var(--gold-hi); }
.gm-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; max-width: 520px; margin: 20px auto 0; }
.gm-stats div { padding: 12px 6px; border-radius: 14px; background: rgba(217, 180, 90, 0.05); }
.gm-stats dt { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dim); }
.gm-stats dd { margin: 4px 0 0; font-size: 30px; color: var(--gold-hi); }
.gm-done-acts { justify-content: center; }
.gm-done > .small { margin: 14px auto 0; max-width: 52ch; }

/* The archive: every day since the museum was built. */
.gm-archive { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.gm-archive h2 { font-size: 32px; color: var(--gold-hi); margin: 0; }
.gm-archive > .small { margin: 8px 0 0; }
.gm-days { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 18px 0 0; padding: 0; list-style: none; }
.gm-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 14px; border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color 0.15s, background 0.15s; }
.gm-day:hover { border-color: var(--gold); background: rgba(217, 180, 90, 0.06); }
.gm-day-w, .gm-day-m { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.gm-day-n { font-size: 26px; line-height: 1; color: var(--gold-hi); }
.gm-day-s { min-height: 1.2em; font-size: 11px; color: var(--gm-accent); }
.gm-day.is-done { background: rgba(217, 180, 90, 0.08); border-color: var(--line-strong); }
.gm-day.is-here { border-color: var(--gm-accent); box-shadow: 0 0 0 1px var(--gm-accent) inset; }
.gm-credit { margin: 28px 0 0; color: var(--gold-dim); letter-spacing: 0.06em; }

@media (max-width: 860px) {
  .gm-quiz { grid-template-columns: 1fr; }
  .gm-quiz-art { min-height: 0; padding: 16px; }
  .gm-quiz-art img { max-height: 46vh; }
  .gm-closer { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .gm-page { padding-top: 64px; }
  .gm-head { border-radius: 20px; padding: 20px 20px 22px; padding-right: 84px; }
  .gm-head .gm-icon { top: 18px; right: 18px; width: 52px; height: 52px; }
  .gm-back { margin-bottom: 12px; }
  .gm-date { font-size: 16px; margin-top: 8px; }
  .gm-options { grid-template-columns: 1fr; }
  .gm-option { min-height: 50px; font-size: 18px; }
  .gm-grid, .gm-band-works { gap: 6px; }
  .gm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gm-stats dd { font-size: 26px; }
  .gm-wordform { flex-direction: column; }
  .gm-card-main { padding: 20px 20px 16px; }
  .gm-card-bar { padding: 12px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .gm-card, .gm-closer-img, .gm-tile, .gm-option { transition: none; }
}

/* ---------- today's games everywhere (v0.21): the Play tile, the Play window, the hub's day line ---------- */
/* The Play tile: five squares, one per game in its own colour (set from data.js), ✓ once played. */
.tile-games { display: flex; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.tile-games li { flex: 1; min-width: 0; }
.tg {
  --gm-ground: #1b1713; --gm-ink: var(--text); --gm-accent: var(--gold);
  position: relative; display: grid; place-items: center; height: 38px; border-radius: 10px;
  background: var(--gm-ground); color: var(--gm-accent); text-decoration: none;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.tg:hover, .tg:focus-visible { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--gm-accent); }
.tg-icon { display: inline-flex; width: 22px; height: 22px; }
.tg-icon svg { width: 100%; height: 100%; }
.tg.is-done .tg-icon { opacity: 0.55; }
.tg-mark { position: absolute; top: -5px; right: -5px; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); color: #1a1407; font: 700 11px/18px var(--sans); text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.tg.is-started::after { content: ''; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--gm-accent); }
.tile-play .tile-foot { margin-top: 8px; }

/* The Play window on Today: today's five games first, then free play. */
.play-today { margin-bottom: 26px; }
.play-today-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.play-today-head .display { margin: 0; font-size: clamp(30px, 3.2vw, 44px); color: var(--gold-hi); }
.play-today-line { margin: 10px 0 14px; font-size: 12px; letter-spacing: 0.04em; color: var(--gold-dim); }
.gm-cards-room { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: 12px; padding-bottom: 0; }
.gm-card.is-compact .gm-card-main { padding: 16px 16px 12px; gap: 8px; }
.gm-card.is-compact .gm-card-name { font-size: 24px; }
.gm-card.is-compact .gm-icon { width: 34px; height: 34px; }
.gm-card.is-compact .gm-card-line { font-size: 14px; }
.gm-card.is-compact .gm-card-bar { padding: 9px 16px; gap: 10px; font-size: 10.5px; }
.play-card .play-body h3.display { font-size: clamp(28px, 3vw, 40px); color: var(--gold-hi); margin: 0; }

/* The hub's day line: progress ring, what's next, the streak, the countdown. */
.gm-dayline { display: flex; align-items: center; gap: 18px; margin: 0 0 22px; padding: 16px 20px; border-radius: 20px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.gm-ring { position: relative; flex: none; width: 60px; height: 60px; }
.gm-ring svg { width: 100%; height: 100%; }
.gm-ring-track { fill: none; stroke: rgba(217, 180, 90, 0.16); stroke-width: 5; }
.gm-ring-fill { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; }
.gm-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; color: var(--gold-hi); }
.gm-dayline-text p { margin: 0; }
.gm-dayline-main { font-family: var(--serif); font-size: 22px; line-height: 1.3; color: var(--text); }
.gm-dayline-main a { color: var(--gold); white-space: nowrap; }
.gm-dayline-sub { margin-top: 4px !important; font-size: 12px; letter-spacing: 0.04em; color: var(--gold-dim); }

/* Results: how often each score came up, today's score lit. */
.gm-dist { max-width: 420px; margin: 18px auto 0; text-align: left; }
.gm-dist-title { margin: 0 0 6px; font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dim); text-align: center; }
.gm-dist-row { display: grid; grid-template-columns: 18px 1fr; align-items: center; gap: 8px; margin-top: 4px; }
.gm-dist-row > .mono { font-size: 12px; color: var(--muted); text-align: right; }
.gm-dist-bar { display: flex; justify-content: flex-end; min-width: 28px; width: 28px; padding: 2px 8px; border-radius: 6px; background: #3a342d; transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.gm-dist-bar b { font-size: 11px; font-weight: 600; color: var(--text); }
.gm-dist-row.is-today .gm-dist-bar { background: var(--gold); }
.gm-dist-row.is-today .gm-dist-bar b { color: #1a1407; }
.gm-next-in { margin: 14px 0 0; }
.gm-keys { margin: 2px 0 0; color: var(--muted); letter-spacing: 0.04em; }
@media (hover: none) { .gm-keys { display: none; } }
@media (max-width: 520px) {
  .gm-dayline { padding: 14px 16px; gap: 14px; }
  .gm-dayline-main { font-size: 19px; }
  .gm-cards-room { grid-template-columns: 1fr 1fr; }
  .gm-card.is-compact .gm-card-line { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tg, .gm-dist-bar { transition: none; } }

/* ---------- X · LIBRI: Spark's shelf (wing X on Today, its room, and /books) ----------
   The book's own faces: Cormorant for the roman, UnifrakturCook for WONDER, as its cover sets them. */
.bk-bl { font-family: var(--f-cook); font-weight: 700; color: var(--wing-2, #c7a84a); letter-spacing: 0.01em; }

/* The tile: the cover, the day's Great Spark, the front. */
.tile-books { grid-area: books; gap: 10px; }
.tile-books .tile-kicker { font-family: var(--serif); font-size: 11px; letter-spacing: 0.26em; }
.tile-books .tile-title { font-family: var(--serif); font-weight: 500; font-size: clamp(22px, 2vw, 30px); letter-spacing: 0.04em; color: var(--gold-hi); }
.tile-books .tile-title .bk-bl { font-size: 1.12em; }
.tile-books .wing-letter { right: 16%; bottom: -46px; font: 700 230px/1 var(--f-cook); color: rgb(181 72 58 / 0.14); transition: transform 1.2s cubic-bezier(0.2, 0.7, 0.2, 1), color 0.6s; }
.tile-books:hover .wing-letter, .tile-books:focus-within .wing-letter { transform: translateY(-8px) rotate(-3deg); color: rgb(181 72 58 / 0.22); }
.tile-books-body { flex: 1; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 18px; }
.tile-books-cover { display: block; height: 80px; aspect-ratio: 560 / 760; border-radius: 3px; overflow: hidden; box-shadow: 0 18px 40px -16px #000, 0 0 0 1px rgb(199 168 74 / 0.28); transform: rotate(-2deg); transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.tile-books-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.tile-books:hover .tile-books-cover, .tile-books:focus-within .tile-books-cover { transform: rotate(0deg) translateY(-4px) scale(1.03); }
/* The day beside the cover: the Great Spark, then the front in a column of its own where there is room. */
.tile-books-day { min-width: 0; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); grid-template-rows: auto 1fr; grid-auto-flow: column; gap: 4px 26px; }
.tile-books-day p { margin: 0; }
.tile-books-k { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-dim); }
.tile-books-spark { font-family: var(--serif); font-size: 17px; line-height: 1.35; color: var(--text); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tile-books-spark b { color: var(--gold-hi); font-weight: 600; }
.tile-books-front { font-family: var(--serif); font-size: 20px; line-height: 1.25; font-style: italic; color: var(--gold-hi); }
.tile-books-day > :nth-child(3), .tile-books-day > :nth-child(4) { padding-left: 18px; border-left: 1px solid var(--line); }
.tile-books .tile-foot { margin: 0; font-size: 10px; letter-spacing: 0.06em; color: var(--gold-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* The volume: the cover as a bound book, its spine, a gilt edge that catches the light. */
.bk-head { padding-bottom: 18px; }
.bk-head .display { color: var(--gold-hi); }
.bk-shelf { margin: 0 auto 72px; }
.bk-volume { display: grid; grid-template-columns: minmax(200px, 300px) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; padding: clamp(22px, 3vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--wing-ground, var(--panel)); }
.bk-cover { position: relative; display: block; perspective: 1200px; border-radius: 4px 6px 6px 4px; text-decoration: none; }
.bk-cover img { position: relative; display: block; width: 100%; height: auto; border-radius: 3px 5px 5px 3px; box-shadow: 0 40px 80px -28px #000, 0 0 0 1px rgb(199 168 74 / 0.3); transform: rotateY(-14deg); transform-origin: left center; transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bk-cover:hover img, .bk-cover:focus-visible img { transform: rotateY(-4deg) translateY(-6px); }
.bk-spine { position: absolute; z-index: 1; left: -16px; top: 2%; bottom: 2%; width: 18px; display: grid; place-items: center; border-radius: 3px 0 0 3px; background: linear-gradient(90deg, #2a1310, #4a1f19 60%, #2a1310); box-shadow: inset 0 0 0 1px rgb(199 168 74 / 0.25); }
.bk-spine b { writing-mode: vertical-rl; transform: rotate(180deg); font: 500 8px/1 var(--f-roman); letter-spacing: 0.3em; color: #c7a84a; white-space: nowrap; }
.bk-gilt { position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: 3px 5px 5px 3px; background: linear-gradient(105deg, transparent 38%, rgb(255 236 180 / 0.16) 48%, transparent 58%); background-size: 260% 100%; background-position: 120% 0; transition: background-position 1.2s ease; }
.bk-cover:hover .bk-gilt, .bk-cover:focus-visible .bk-gilt { background-position: -40% 0; }
.bk-about .eyebrow { margin: 0 0 10px; color: var(--gold-dim); }
.bk-title { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(38px, 5vw, 66px); line-height: 1; letter-spacing: 0.03em; color: var(--gold-hi); }
.bk-title .bk-bl { display: block; font-size: 1.06em; line-height: 1.05; }
.bk-line { margin: 14px 0 6px; font-family: var(--serif); font-style: italic; font-size: clamp(18px, 1.7vw, 22px); line-height: 1.4; color: var(--text); }
.bk-author { margin: 0 0 18px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-dim); }
.bk-epigraph { margin: 0 0 16px; padding: 2px 0 2px 16px; border-left: 2px solid var(--wing-3, #b5483a); }
.bk-epigraph p { margin: 0; font-family: var(--serif); font-size: clamp(19px, 1.8vw, 24px); line-height: 1.35; font-style: italic; color: var(--gold-hi); }
.bk-epigraph footer { margin-top: 4px; font-size: 12px; letter-spacing: 0.1em; color: var(--gold-dim); }
.bk-live { margin: 0 0 18px; color: var(--muted); max-width: 52ch; }

/* The day's Great Spark, the front, and the Halls with their codes. */
.bk-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.bk-grid > article { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.bk-grid .eyebrow { margin: 0 0 12px; color: var(--gold-dim); }
.bk-spark-face { display: flex; gap: 18px; align-items: flex-start; }
/* The numeral in the roman: a blackletter XVIII reads as XDIII. */
.bk-num { flex: none; min-width: 58px; font: 600 44px/1 var(--serif); letter-spacing: 0.02em; text-align: center; color: var(--wing-3, #c25a49); text-shadow: 0 0 24px rgb(181 72 58 / 0.35); }
.bk-spark-name { margin: 0 0 6px; font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.15; color: var(--gold-hi); }
.bk-spark-text { margin: 0; }
.bk-spark-text p { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.42; color: var(--text); }
.bk-src { margin: 12px 0 0; font-size: 10.5px; letter-spacing: 0.06em; color: var(--gold-dim); }
.bk-spark .actions { margin-top: 16px; }
.bk-spark .small { margin: 12px 0 0; }
.bk-front-name { margin: 0 0 10px; font-family: var(--serif); font-weight: 500; font-style: italic; font-size: 28px; line-height: 1.15; color: var(--gold-hi); }
.bk-front .small { margin: 0 0 16px; }
.bk-hall-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 2px; }
.bk-hall-list a { display: flex; gap: 12px; align-items: baseline; padding: 6px 8px; border-radius: 8px; color: var(--text); text-decoration: none; font-family: var(--serif); font-size: 16.5px; line-height: 1.25; }
.bk-hall-list a:hover, .bk-hall-list a:focus-visible { background: rgb(199 168 74 / 0.08); color: var(--gold-hi); }
.bk-code { flex: none; font-size: 12px; color: var(--gold); }
.bk-halls .small { margin: 0; }
.bk-papers { margin-top: 16px; padding: 14px 20px; border: 1px solid var(--line); border-radius: var(--radius); }
.bk-papers summary { cursor: pointer; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-dim); }
.bk-papers .facts { margin: 14px 0 6px; }
.bk-papers .small { margin: 6px 0 0; }

/* The shelf in readers' accounts (v0.24): the First Printing, and the author's desk. */
.bk-printing { margin: -6px 0 18px; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dim); }
.bk-printing b { color: var(--gold-hi); font-weight: 600; }
.bk-desk { margin-top: 16px; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--line-strong); border-radius: var(--radius); background: linear-gradient(180deg, var(--panel-2), var(--panel)); }
.bk-desk .eyebrow { margin: 0 0 8px; color: var(--gold-dim); }
.bk-desk .display { margin: 0 0 10px; font-size: clamp(26px, 3vw, 38px); color: var(--gold-hi); }
.bk-desk code { font-size: 0.85em; color: var(--gold); }
.bk-desk-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.bk-desk-list li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; }
.bk-desk-list li[data-status='ruled'] { border-color: var(--line-strong); }
.bk-desk-what { margin: 0 0 6px; font-family: var(--serif); font-size: 19px; color: var(--text); }
.bk-desk-what b { color: var(--gold-hi); font-weight: 600; }
.bk-desk-state { margin-left: 8px; font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-dim); }
.bk-desk textarea { width: 100%; margin: 6px 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(0, 0, 0, 0.25); color: var(--text); font: 16px/1.4 var(--serif); resize: vertical; }

/* On the stage: the day's Great Spark beside the book's cover. */
.slide-book .slide-book, .slide.slide-book .slide-book { position: absolute; right: max(var(--gutter), 7vw); top: 13%; bottom: 17%; width: 36%; margin: 0; display: flex; align-items: center; justify-content: center; perspective: 1400px; }
.slide.slide-book { background: radial-gradient(900px 520px at 72% 40%, rgb(181 72 58 / 0.2), transparent 62%), radial-gradient(700px 480px at 18% 90%, rgb(199 168 74 / 0.1), transparent 60%), #0a0605; }
.slide-book .slide-book img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 3px; box-shadow: 0 50px 140px -30px #000, 0 0 0 1px rgb(199 168 74 / 0.25); transform: rotateY(-10deg); }
.slide.is-active .slide-book img { animation: book-arrive 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes book-arrive { from { opacity: 0; transform: rotateY(-34deg) translateY(16px); } to { opacity: 1; transform: rotateY(-10deg); } }
.slide-book .slide-kicker, .slide-book .slide-cite { color: #e9cf8e; }
.slide-book .kicker-dot { background: #b5483a; }
.slide-book .book-spark-name { font-size: clamp(30px, 3.6vw, 56px); -webkit-line-clamp: 2; color: #fff1cf; }
/* The card's words: like MARCUS's passage on the stage, but never .slide-quote (that is his, checked word for word). */
.slide-verse { margin: 14px 0 0; padding-right: 28px; text-wrap: pretty; font-family: var(--serif); font-style: italic; font-size: clamp(20px, 1.9vw, 30px); line-height: 1.38; color: var(--text); text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6); display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.slide-verse p { margin: 0; }

/* In the almanac: Venus tonight, a band across the room. */
.almanac-sky { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px 28px; align-items: baseline; }
.almanac-sky .eyebrow { grid-column: 1 / -1; margin: 0 0 6px; }
.almanac-sky .sky-line { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.35; color: var(--text); }
.almanac-sky .sky-deg { font-size: 34px; font-weight: 500; color: var(--gold-hi); margin-right: 4px; }
.almanac-sky .small { margin: 0; }
.almanac-sky p.small:not(.muted) { font-family: var(--serif); font-size: 18px; line-height: 1.4; color: var(--text); }
.almanac-sky .muted { grid-column: 1 / -1; margin-top: 8px; }

@media (max-width: 1100px) {
  .bk-grid { grid-template-columns: 1fr 1fr; }
  .bk-spark { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .slide.slide-book { display: flex; flex-direction: column; gap: 22px; padding: calc(84px + env(safe-area-inset-top)) var(--gutter) 96px; }
  .slide-book .slide-book, .slide.slide-book .slide-book { position: relative; inset: auto; flex: 1 1 auto; min-height: 0; width: auto; }
  .slide.slide-book .slide-content { position: relative; inset: auto; width: auto; flex: none; }
  .almanac-sky { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .slide.slide-book { padding-top: calc(28px + env(safe-area-inset-top)); padding-bottom: 118px; }
  .slide-book .slide-verse { -webkit-line-clamp: 4; font-size: 18px; }
}
@media (max-width: 640px) {
  .tile-books { min-height: 0; }
  .tile-books-body { gap: 14px; }
  .tile-books-cover { height: 104px; }
  .tile-books-day { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-auto-flow: row; gap: 3px; }
  .tile-books-day > :nth-child(3) { margin-top: 8px; }
  .tile-books-day > :nth-child(3), .tile-books-day > :nth-child(4) { padding-left: 0; border-left: 0; }
  .tile-books-spark { -webkit-line-clamp: 5; }
  .tile-books .tile-foot { white-space: normal; }
  .bk-volume { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .bk-cover { width: min(240px, 70vw); }
  .bk-epigraph { text-align: left; }
  .bk-volume .actions { justify-content: center; }
  .bk-grid { grid-template-columns: 1fr; }
  .bk-spark-face { flex-direction: column; gap: 4px; }
  .bk-num { min-width: 0; text-align: left; font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) { .bk-cover img, .tile-books-cover, .slide-book .slide-book img { transform: none; } }
.gm-where { margin: 6px 0 0; color: var(--gold-dim); }

/* ---------- The stage on a phone (v0.26.1): the picture first ----------
   A work of art, or the book's cover, stands at the top with the words under it. It used to take whatever height the
   words left (131px beside a MARCUS passage at 400×781, less on a real iPhone, where Safari's bars make the stage
   shorter), and the cover started under the masthead. Now the picture keeps at least 46% of the room between the
   masthead and the stage's controls, and the words tighten to fit; on a short stage (the stage is a size container,
   so its own height decides) they tighten again. */
@media (max-width: 760px) {
  .stage { container: stage / size; }
  .slide.slide-art, .slide.slide-book {
    display: flex; flex-direction: column; gap: 8px; /* the picture's own foot holds its tools (View, Facts) */
    padding: max(calc(62px + env(safe-area-inset-top)), calc(var(--mast-b, 0px) + 10px)) var(--gutter) 106px;
  }
  .slide-art .slide-art, .slide.slide-book .slide-book { position: relative; inset: auto; flex: 1 1 auto; min-height: 46%; width: auto; }
  .slide.slide-art .slide-content, .slide.slide-book .slide-content { position: relative; inset: auto; width: auto; flex: none; }
  .slide.slide-art .slide-kicker, .slide.slide-book .slide-kicker { margin-bottom: 10px; }
  .slide.slide-art .slide-content .actions, .slide.slide-book .slide-content .actions { margin-top: 14px; }
  .slide.slide-art .slide-credit, .slide.slide-book .slide-credit { margin-top: 10px; }
  .slide-art .slide-quote { font-size: 18px; -webkit-line-clamp: 4; padding-right: 0; }
  .slide.slide-art .slide-title { font-size: 27px; -webkit-line-clamp: 2; }
  .slide.slide-art .slide-sub { margin-top: 8px; font-size: 16px; }
  .slide.slide-art .slide-content .actions { gap: 8px; }
  .slide.slide-art .slide-content .actions .btn { min-height: 36px; padding: 7px 12px; font-size: 10.5px; }
  .slide.slide-art .slide-cite, .slide.slide-book .slide-cite { margin-top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .slide-book .slide-kicker { letter-spacing: 0.08em; }
  .slide-book .book-spark-name { font-size: 28px; -webkit-line-clamp: 1; }
  .slide-book .slide-verse { margin-top: 8px; padding-right: 0; font-size: 17px; -webkit-line-clamp: 3; }
  .slide-book .slide-content .actions { gap: 6px; flex-wrap: nowrap; }
  .slide-book .slide-content .actions .btn { flex: none; padding: 8px 11px; font-size: 10.5px; letter-spacing: 0.06em; }
}
@container stage (max-height: 680px) {
  .slide-art .slide-art, .slide.slide-book .slide-book { min-height: 38%; }
  .slide-book .slide-kicker { font-size: 9.5px; letter-spacing: 0.04em; }
  .slide-art .slide-quote { -webkit-line-clamp: 3; }
  .slide-book .slide-verse { -webkit-line-clamp: 2; }
  .slide.slide-art .slide-title { font-size: 24px; }
  .slide.slide-art .slide-sub { -webkit-line-clamp: 1; }
}

/* ---------- The stage in motion (v0.27) ----------
   A film previews itself and the day's video plays behind the words (createStage: motion): the moving layer sits
   over the still and fades in only once it really plays. A slide that moves stays 16 s instead of 9. Photographs
   move to their shape (lib.stillMove: across a wide one, down a tall one, otherwise in or out); a work of art draws
   slowly nearer and holds still under the visitor's pointer or magnifier; the book's cover turns gently in its light.
   A visitor who asks for less motion gets none of it (the reduced-motion rule above stops every animation). */
.slide-motion { position: absolute; inset: 0; overflow: hidden; opacity: 0; transition: opacity 1.2s ease; pointer-events: none; }
.slide.is-moving .slide-motion { opacity: 1; }
.slide-motion iframe { position: absolute; left: 50%; top: 50%; width: var(--fw, 100%); height: var(--fh, 100%); border: 0; transform: translate(-50%, -50%) scale(1.12); }
.slide-motion video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.seg.is-long.is-active i { animation-duration: 16s; }
.seg.is-film.is-active i { animation-duration: 20s; } /* a film's preview shows after five seconds' play (lib.PREVIEW_SETTLE) */

.slide.is-active .slide-bg[data-move] { animation-duration: 15s; animation-timing-function: ease-in-out; animation-fill-mode: forwards; animation-iteration-count: 1; }
.slide.is-active .slide-bg[data-move^='pan'] { animation-duration: 11s; }
.slide.is-active .slide-bg[data-move='pan-x'] { animation-name: still-pan-x; }
.slide.is-active .slide-bg[data-move='pan-x-rev'] { animation-name: still-pan-x-rev; }
.slide.is-active .slide-bg[data-move='pan-y'] { animation-name: still-pan-y; }
.slide.is-active .slide-bg[data-move='push-c'] { animation-name: still-push; transform-origin: 50% 50%; }
.slide.is-active .slide-bg[data-move='push-l'] { animation-name: still-push; transform-origin: 28% 38%; }
.slide.is-active .slide-bg[data-move='push-r'] { animation-name: still-push; transform-origin: 72% 38%; }
.slide.is-active .slide-bg[data-move='pull'] { animation-name: still-pull; transform-origin: 50% 45%; }
@keyframes still-pan-x { from { object-position: 0% 50%; transform: scale(1.03); } to { object-position: 100% 50%; transform: scale(1.07); } }
@keyframes still-pan-x-rev { from { object-position: 100% 50%; transform: scale(1.03); } to { object-position: 0% 50%; transform: scale(1.07); } }
@keyframes still-pan-y { from { object-position: 50% 0%; transform: scale(1.03); } to { object-position: 50% 100%; transform: scale(1.07); } }
@keyframes still-push { from { transform: scale(1.04); } to { transform: scale(1.17); } }
@keyframes still-pull { from { transform: scale(1.17); } to { transform: scale(1.04); } }

.slide.is-active .slide-art .lens-img { animation: float-in 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) both, art-dolly 16s 1.2s ease-in-out forwards; }
.slide-art [data-dolly='t'] .lens-img { transform-origin: 50% 28%; }
.slide-art [data-dolly='b'] .lens-img { transform-origin: 50% 72%; }
.lens:hover .lens-img, .lens.loupe-on .lens-img, .lens.is-tilting .lens-img { animation-play-state: paused; }
@keyframes art-dolly { from { transform: scale(1); } to { transform: scale(1.04); } }

.slide.is-active.slide-book .slide-book img { animation: book-arrive 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) both, book-sway 8s 1.4s ease-in-out infinite alternate; }
@keyframes book-sway { from { transform: rotateY(-10deg); } to { transform: rotateY(-4deg) translateY(-4px); } }

/* THE THEATRE's doors (v0.28): MARCUS's programme card, the Watch room's door, an AI film's button, the menu's Now playing. */
.hog-theatre { margin: 10px 0 0; display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line-strong); border-radius: 16px; background: radial-gradient(420px 160px at 20% 0%, rgba(217, 180, 90, 0.12), transparent 70%), rgba(11, 10, 9, 0.6); }
.hog-theatre-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.hog-theatre-strip img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 8px; }
.hog-theatre figcaption { display: grid; gap: 4px; }
.hog-theatre figcaption small { font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.hog-theatre figcaption b { font-family: var(--serif); font-size: 21px; font-weight: 500; line-height: 1.2; color: var(--gold-hi); }
.hog-theatre figcaption em { font-family: var(--serif); font-size: 16px; line-height: 1.4; color: var(--text); }
.hog-theatre figcaption span { font-size: 10.5px; letter-spacing: 0.06em; color: var(--muted); }
.hog-theatre .btn { justify-self: start; }
.hog-film-theatre { all: unset; cursor: pointer; color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }
.watch-theatre { margin-top: 12px; }
.menu-now { margin: 0 0 14px; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(217, 180, 90, 0.07); }
.menu-now-k { margin: 0 0 4px; font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); }
.menu-now-t { margin: 0 0 10px; font-family: var(--serif); font-size: 17px; line-height: 1.3; color: var(--gold-hi); }
.menu-now-acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- MARCUS on the road (v0.32): places, what is around, maps and routes ---------- */
/* Near me: the 📍 button glows while the browser asks; the line above the box says he knows where you are. */
.mx-icon.is-asking { color: var(--gold-hi); animation: hog-breathe 1.4s ease-in-out infinite; }
.mx-here { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 6px 12px; border-radius: 10px; background: rgba(217, 180, 90, 0.09); border: 1px solid rgba(217, 180, 90, 0.28); font-size: 12px; line-height: 1.45; color: var(--text); }
.mx-here[hidden] { display: none; }
.mx-here-text { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mx-here-text svg { flex: none; width: 16px; height: 16px; color: var(--gold-hi); }
.mx-here b { color: var(--gold-hi); font-weight: 600; }
.mx-here .link-btn { flex: none; }
@media (prefers-reduced-motion: reduce) { .mx-icon.is-asking { animation: none; } }
/* "Where are you?" in his timeline: share it from there. */
.hog-where { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0; }
.hog-where svg { width: 15px; height: 15px; }
.hog-where small { font-size: 12px; color: var(--muted); }
/* Places from Google Maps: each one by its own name, linked to Google Maps. */
.hog-places { display: grid; gap: 8px; max-width: 640px; }
.hog-places-note { margin: 0; }
.hog-place-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.hog-place-list li { display: grid; gap: 2px; }
.hog-place { display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.015); color: var(--text); text-decoration: none; transition: border-color 0.2s; }
.hog-place:hover { border-color: var(--gold); }
.hog-place-pin { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: rgba(217, 180, 90, 0.1); color: var(--gold-hi); }
.hog-place-pin svg { width: 16px; height: 16px; }
.hog-place b { flex: 1; min-width: 0; font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hog-place small { flex: none; font-size: 10.5px; letter-spacing: 0.06em; color: var(--gold-dim); }
.hog-place-review { margin-left: 48px; color: var(--muted); text-decoration: none; font-style: italic; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hog-place-review:hover { color: var(--gold-hi); }
.hog-places-answer summary { cursor: pointer; font-size: 12px; color: var(--gold); }
.hog-places-answer div { margin-top: 6px; font-size: 13px; line-height: 1.55; color: var(--muted); }
.hog-places-answer div p { margin: 0 0 0.5em; }
/* What is around a point, from Wikipedia: nearest first, with how far. */
.hog-nearby { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; max-width: 680px; }
.hog-nearby a { display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color 0.2s; }
.hog-nearby a:hover { border-color: var(--gold); }
.hog-nearby img, .hog-nearby-icon { flex: none; width: 52px; height: 52px; border-radius: 9px; object-fit: cover; }
.hog-nearby-icon { display: grid; place-items: center; background: rgba(217, 180, 90, 0.08); color: var(--gold); }
.hog-nearby-icon svg { width: 20px; height: 20px; }
.hog-nearby a > span { display: grid; gap: 1px; min-width: 0; }
.hog-nearby b { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hog-nearby small { font-size: 11px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hog-nearby em { font-style: normal; font-size: 10.5px; color: var(--gold-dim); }
/* A map he drew: its Google Maps links, under the line that says it's on the Portal. */
.hog-map-links { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 0 38px; font-size: 11px; }
.hog-map-links a { color: var(--gold); text-decoration: none; }
.hog-map-links a:hover { color: var(--gold-hi); text-decoration: underline; }
/* Under his answer: the places Google Maps gave, by name, as Google Maps asks. */
.hog-maps-credit { margin: 10px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--muted); }
.hog-maps-credit .mono { font-size: 10.5px; letter-spacing: 0.08em; color: var(--gold-dim); margin-right: 4px; }
.hog-maps-credit a { color: var(--gold); text-decoration: none; }
.hog-maps-credit a:hover { color: var(--gold-hi); text-decoration: underline; }
/* On the Portal: the map itself (Google's, or OpenStreetMap's), a place, a route, places to pick from. */
.portal-map { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--line); background: rgba(11, 10, 9, 0.6); aspect-ratio: 4 / 3; max-height: 420px; }
.portal-map iframe { display: block; width: 100%; height: 100%; border: 0; }
.portal-map-none { display: flex; align-items: center; gap: 14px; aspect-ratio: auto; padding: 18px; }
.portal-map-none > span { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: linear-gradient(135deg, rgba(217, 180, 90, 0.18), rgba(139, 124, 246, 0.18)); color: var(--gold-hi); }
.portal-map-none > span svg { width: 26px; height: 26px; }
.portal-map-none p { margin: 0; display: grid; gap: 4px; }
.portal-map-none b { font: 500 18px/1.3 var(--serif); }
.portal-map-none small { font-size: 12.5px; color: var(--muted); }
.portal-map-credit { margin: -6px 0 0; font-size: 10px; color: var(--muted); }
.portal-map-credit a { color: var(--gold-dim); }
.portal-place { margin: 0; display: grid; gap: 10px; }
.portal-place figcaption { display: grid; gap: 2px; }
.portal-place figcaption img { width: 96px; border-radius: 10px; margin-bottom: 6px; }
.portal-place b { font: 500 20px/1.25 var(--serif); color: var(--text); }
.portal-place small { font-size: 12.5px; color: var(--muted); }
.portal-route { list-style: none; margin: 0; padding: 0 0 0 4px; display: grid; gap: 0; counter-reset: stop; }
.portal-route li { position: relative; display: grid; padding: 6px 0 6px 30px; counter-increment: stop; }
.portal-route li::before { content: counter(stop); position: absolute; left: 0; top: 6px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(217, 180, 90, 0.16); color: var(--gold-hi); font: 600 11px/1 var(--mono); }
.portal-route li:not(:last-child)::after { content: ''; position: absolute; left: 9.5px; top: 28px; bottom: -4px; width: 1px; background: rgba(217, 180, 90, 0.3); }
.portal-route b { font-size: 14px; font-weight: 500; }
.portal-route small { font-size: 11.5px; color: var(--muted); }
.portal-route-note { margin: -4px 0 0; }
.portal-places { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
@media (max-width: 560px) { .portal-map { aspect-ratio: 1 / 1; } .hog-map-links { margin-left: 0; } }

/* ---------- MARCUS's workshop (v0.33): what he builds, in a sealed frame ---------- */
.hog-ui { margin: 0; display: grid; gap: 10px; }
.hog-ui-head { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; line-height: 1.4; color: var(--text); }
.hog-ui-head .hog-vision-icon { width: 28px; height: 28px; background: rgba(217, 180, 90, 0.14); color: var(--gold-hi); }
.hog-ui-head .hog-vision-icon svg { width: 15px; height: 15px; }
.hog-ui-head span:last-child { display: grid; gap: 1px; min-width: 0; }
.hog-ui-head small { font-size: 11px; color: var(--muted); }
.ws-shell { position: relative; border-radius: 14px; border: 1px solid var(--line-strong); background: linear-gradient(180deg, rgba(27, 23, 19, 0.9), rgba(16, 14, 12, 0.9)); overflow: hidden; }
.ws-shell.is-building { border-color: rgba(217, 180, 90, 0.5); box-shadow: 0 0 0 1px rgba(217, 180, 90, 0.08), 0 0 28px rgba(217, 180, 90, 0.08); }
.ws-shell.is-building::after { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--gold-grad); animation: ws-sweep 1.6s ease-in-out infinite; }
@keyframes ws-sweep { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .ws-shell.is-building::after { animation: none; } }
.ws-frame { display: block; width: 100%; height: 420px; max-height: 2400px; border: 0; background: transparent; transition: height 0.25s ease-out; }
.ws-shell.is-big .ws-frame { min-height: 320px; }
.ws-status { margin: 0; padding: 0 12px 8px; font-size: 10.5px; letter-spacing: 0.08em; color: var(--gold-dim); }
.ws-status:empty { display: none; }
.ws-status[data-tone="bad"] { color: #ff9a8a; }
.ws-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.ws-acts svg { width: 15px; height: 15px; }
.portal-ui { display: grid; }

/* ---------- MARCUS's instruments (v0.33): THE ABACUS ---------- */
.hog-calc { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin: 0; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(217, 180, 90, 0.06); font-size: 14px; }
.hog-calc-line { font-size: 12px; color: var(--muted); }
.hog-calc-eq { color: var(--gold-dim); }
.hog-calc b { font: 500 20px/1.2 var(--serif); color: var(--gold-hi); }
.hog-calc small { flex-basis: 100%; font-size: 11.5px; color: var(--muted); }
.hog-calc small.hog-cred { font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em; color: var(--gold-dim); margin: 0; }
.portal-tools { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-top: 14px; }
.portal-tools .mono { font-size: 10px; letter-spacing: 0.14em; color: var(--gold-dim); }
.portal-tools .btn svg { width: 14px; height: 14px; }
.ab { display: grid; gap: 12px; }
.ab-line { display: flex; gap: 8px; }
.ab-input { flex: 1 1 auto; min-width: 0; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.6); color: var(--text); font: 500 16px/1.3 var(--mono); }
.ab-input:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.ab-go { font: 600 20px/1 var(--serif); padding: 0 18px; }
.ab-out { min-height: 44px; display: grid; gap: 4px; }
.ab-result { margin: 0; font: 500 34px/1.15 var(--serif); color: var(--gold-hi); overflow-wrap: anywhere; }
.ab-result.is-empty { font-size: 16px; color: var(--muted); font-family: var(--sans); }
.ab-detail { margin: 0; }
.ab-err { margin: 0; font-size: 13px; color: #ff9a8a; }
.ab-keys { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.ab-key { padding: 10px 4px; border-radius: 10px; border: 1px solid var(--line); background: rgba(21, 18, 15, 0.9); color: var(--text); font: 500 14px/1 var(--mono); cursor: pointer; }
.ab-key.is-num { font-size: 16px; color: var(--gold-hi); background: rgba(217, 180, 90, 0.08); }
.ab-key:hover { border-color: var(--line-strong); background: rgba(217, 180, 90, 0.14); }
.ab-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ab-chip { padding: 6px 11px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: 12px/1.2 var(--mono); cursor: pointer; }
.ab-chip:hover { color: var(--gold-hi); border-color: var(--line-strong); }
.ab-chip.is-mode { color: var(--gold); border-color: var(--line-strong); text-transform: uppercase; letter-spacing: 0.1em; }
.ab-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.ab-history button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 7px 10px; border-radius: 10px; border: 1px solid transparent; background: rgba(255, 255, 255, 0.02); color: var(--text); font-size: 13px; text-align: left; cursor: pointer; }
.ab-history button:hover { border-color: var(--line); }
.ab-history .mono { color: var(--muted); font-size: 12px; }
.ab-history b { font-weight: 500; color: var(--gold-hi); }
.ab-note { margin: 0; }

/* ---------- THE HOURGLASS, THE CHRONICLE, THE LOTS (v0.33) ---------- */
.hg { display: grid; gap: 12px; }
.hg-modes { display: flex; gap: 6px; }
.hg-face { position: relative; display: grid; justify-items: center; gap: 2px; padding: 22px 12px 16px; border-radius: 16px; border: 1px solid var(--line); background: radial-gradient(ellipse at 50% 0%, rgba(217, 180, 90, 0.12), transparent 70%), rgba(11, 10, 9, 0.5); overflow: hidden; }
.hg-sand { position: absolute; left: 0; right: 0; bottom: 0; height: calc(var(--sand, 1) * 100%); background: linear-gradient(180deg, rgba(217, 180, 90, 0.06), rgba(217, 180, 90, 0.14)); transition: height 0.2s linear; pointer-events: none; }
.hg-face.is-done { border-color: var(--gold); box-shadow: 0 0 28px rgba(217, 180, 90, 0.25); }
.hg-clock { position: relative; margin: 0; font: 500 56px/1 var(--mono); letter-spacing: 0.02em; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.hg-under { position: relative; margin: 0; }
.hg-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.hg-set { display: flex; gap: 8px; }
.hg-laps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 180px; overflow: auto; }
.hg-laps li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 10px; border-radius: 8px; background: rgba(255, 255, 255, 0.02); font-size: 13px; }
.hg-laps b { font-weight: 500; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.hg-laps .mono { color: var(--muted); font-size: 11px; }
.ch { display: grid; gap: 10px; }
.ch-title { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.6); color: var(--gold-hi); font: 500 18px/1.3 var(--serif); }
.ch-draw { display: grid; gap: 8px; color: var(--gold); }
.ch-svg { display: block; width: 100%; height: auto; font-family: var(--sans); }
.ch-svg text { fill: var(--text); }
.ch-empty { margin: 0; padding: 18px 12px; border: 1px dashed var(--line); border-radius: 12px; text-align: center; }
.ch-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 13px; color: var(--text); }
.ch-list li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 4px 8px; border-radius: 8px; }
.ch-list li:nth-child(odd) { background: rgba(255, 255, 255, 0.02); }
.ch-list .mono { color: var(--gold-dim); font-size: 11.5px; }
.ch-bad { margin: 0; color: #ff9a8a; }
.ch-text { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: rgba(11, 10, 9, 0.6); color: var(--text); font: 14px/1.5 var(--mono); resize: vertical; }
.lt { display: grid; gap: 12px; }
.lt-dice { margin: 0; font-size: 44px; line-height: 1; color: var(--gold-hi); letter-spacing: 0.1em; }
.lt-result { font-size: 40px; }
@media (prefers-reduced-motion: reduce) { .hg-sand { transition: none; } }

/* ---------- THE SCRIBE and THE SCALES (v0.34) ---------- */
.sc { display: grid; gap: 10px; }
.sc-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sc-cell { display: grid; gap: 2px; padding: 8px 6px; border-radius: 10px; border: 1px solid var(--line); background: rgba(217, 180, 90, 0.05); text-align: center; }
.sc-cell b { font: 500 20px/1.1 var(--serif); color: var(--gold-hi); overflow-wrap: anywhere; }
.sc-cell small { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sc-common { margin: 0; line-height: 1.8; }
.sc-common .mono { font-size: 10px; letter-spacing: 0.1em; color: var(--gold-dim); margin-right: 4px; }
.sc-common span:not(.mono) { display: inline-block; padding: 1px 8px; margin: 0 2px 2px 0; border-radius: 999px; border: 1px solid var(--line); }
.sc-common span small { margin-left: 4px; color: var(--muted); }
.sc-cipher { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.sc-shift { width: 72px; padding: 8px 10px; }
.sc-pre { margin: 0; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: rgba(11, 10, 9, 0.6); font: 13px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.sl { display: grid; gap: 10px; }
.sl-draw { display: grid; gap: 8px; color: var(--gold); }
.sl-svg { display: block; width: 100%; height: auto; font-family: var(--sans); }
.sl-svg .c-gray { fill: rgba(157, 148, 131, 0.25); stroke: var(--muted); }
.sl-svg .c-violet { fill: rgba(139, 124, 246, 0.22); stroke: var(--violet); }
.sl-svg .c-gold { fill: rgba(217, 180, 90, 0.22); stroke: var(--gold); }
.sl-svg .t-text { fill: var(--text); } .sl-svg .t-muted { fill: var(--muted); }
.sl-words { margin: 0; font: 500 16px/1.4 var(--serif); color: var(--gold-hi); }
@media (max-width: 480px) { .sc-counts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
