/* Burning Rainbow, journey edition.
   One page, thirteen worlds. Each world is built around one artwork from the
   Muugart gallery: its palette (.wN), its opening screen, the plates between
   sections and the fill of its signpost lines all come from that one piece. */

:root {
  --serif: "TeX Gyre Pagella", "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sign: "Barlow Semi Condensed", Bahnschrift, "DIN Alternate", "Roboto Condensed", "Arial Narrow", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --rainbow: linear-gradient(90deg, #ff4d2e, #ff9a3c, #ffd84a, #7bd65c, #3fc8c0, #4f8dff, #8a63ff, #e05aa8);
  --hud-h: 46px;
  --hud-bg: rgba(14, 10, 9, .8);
  --hud-ink: #f3e6d8;
  color-scheme: light dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--hud-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #170b06; color: #f6e7d6;
  font-family: var(--serif); font-size: clamp(1.09rem, .55vw + .98rem, 1.3rem); line-height: 1.72;
  overflow-x: hidden; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; cursor: pointer; }
.skip { position: fixed; left: 8px; top: -60px; z-index: 100; background: #fff; color: #111; padding: 8px 12px; border-radius: 6px; }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--accent, #ff9a3c); outline-offset: 3px; border-radius: 4px; }

/* ---------- worlds: palettes taken from each leg's artwork ---------- */
.w0  { --bg: #170b06; --ink: #f6e7d6; --accent: #ff8a3c; --dot: #ff8a3c; --next: #eef1f6; }
.w1  { --bg: #eef1f6; --ink: #1c2433; --accent: #3a569a; --dot: #9fb4dc; --next: #2a070b; }
.w2  { --bg: #2a070b; --ink: #f8e6e2; --accent: #ff6a5c; --dot: #ff5a4d; --next: #0c1304; }
.w3  { --bg: #0c1304; --ink: #f1f6df; --accent: #c9e04a; --dot: #c9e04a; --next: #f4ede1; }
.w4  { --bg: #f4ede1; --ink: #2a1a12; --accent: #a2301a; --dot: #d9603f; --next: #0d1b2e; }
.w5  { --bg: #0d1b2e; --ink: #e8f0f8; --accent: #ff9a4a; --dot: #ff9a4a; --next: #06141f; }
.w6  { --bg: #06141f; --ink: #e3f1fa; --accent: #5cc8f0; --dot: #5cc8f0; --next: #e9eef0; }
.w7  { --bg: #e9eef0; --ink: #1c2529; --accent: #37606d; --dot: #b9c6cb; --next: #0d0a2a; }
.w8  { --bg: #0d0a2a; --ink: #f0eaff; --accent: #ffc46b; --dot: #ffc46b; --next: #efeaff; }
.w9  { --bg: #efeaff; --ink: #1d1540; --accent: #4a2fc0; --dot: #8f7bff; --next: #14102a; }
.w10 { --bg: #14102a; --ink: #fbeedd; --accent: #ffb23e; --dot: #ffb23e; --next: #fff7ef; }
.w11 { --bg: #fff7ef; --ink: #2b1d18; --accent: #b83a27; --dot: #ffd9c2; --next: #ead9bd; }
.w12 { --bg: #ead9bd; --ink: #2e2012; --accent: #7a4a1a; --dot: #d2ae7a; --next: #f1ece6; }

.world {
  position: relative; background-color: var(--bg); color: var(--ink);
  --soft: color-mix(in srgb, var(--ink) 66%, var(--bg));
  --card: color-mix(in srgb, var(--ink) 7%, var(--bg));
  --tint: color-mix(in srgb, var(--accent) 13%, var(--bg));
}
/* the leg's artwork never fully leaves: it stays behind the text, held in
   place while you read, at a fraction of its strength under the leg's colour */
.world-bg { position: sticky; top: 0; height: 100vh; margin-bottom: -100vh; z-index: 0; pointer-events: none; opacity: 0; transition: opacity 1.6s; }
.art-on .world-bg { opacity: .16; }
.world.light.art-on .world-bg { opacity: .13; }
/* the thread: one photographed strand down the left margin, a different
   material in every leg, cross-fading where two legs meet */
.thread { position: absolute; top: -34vh; bottom: 0; left: -20px; width: 190px; z-index: 2; pointer-events: none;
  background: repeat-y 50% 0 / 190px auto;
  -webkit-mask-image: linear-gradient(transparent, #000 34vh, #000 calc(100% - 46vh), transparent calc(100% - 8vh));
  mask-image: linear-gradient(transparent, #000 34vh, #000 calc(100% - 46vh), transparent calc(100% - 8vh)); }
.thread-obj { position: absolute; left: 0; width: 190px; max-width: none; }
@media (max-width: 1040px) { .thread { left: -72px; z-index: 0; opacity: .4; } }
.quiet .thread { display: none; }

/* the crossing: each world dissolves into the next one's colour */
.world::after { content: ""; display: block; position: relative; z-index: 1; height: 55vh; margin-top: 6rem; background: linear-gradient(transparent, var(--next) 88%); }
.world.w7 { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.world.w8 { background-image: radial-gradient(circle 30rem at var(--mx, 50%) var(--my, 40vh), rgba(255, 196, 107, .14), transparent 70%); background-repeat: no-repeat; }

.col { position: relative; z-index: 1; max-width: 41rem; margin: 0 auto; padding: 0 1.25rem; }
.col > p, .col > ul, .col > ol, .col > blockquote, .col > div { margin: 0 0 1.35em; }
.col a { color: var(--accent); text-underline-offset: .18em; }
.col p, .col li { overflow-wrap: anywhere; }
.col strong { font-weight: 700; }
.col h3, .col h4, .col h5, .col h6 { font-family: var(--sign); line-height: 1.12; margin: 3em 0 .8em; text-wrap: balance; }
.col h3 { font-size: clamp(1.9rem, 4.4vw, 2.9rem); font-stretch: 85%; letter-spacing: .005em; }
.col h4 { font-size: 1.5em; color: var(--accent); }
.col h5 { font-size: 1.22em; }
.col h6 { font-size: 1.02em; text-transform: uppercase; letter-spacing: .12em; color: var(--soft); }
.col ul, .col ol { padding-left: 1.3em; }
/* each leg opens its text with a drop cap in the artwork's accent */
.col > p.lead::first-letter { font-family: var(--sign); font-weight: 700; font-size: 3.6em; line-height: .82; float: left; padding: .08em .12em 0 0; color: var(--accent); }

/* the book's own typographic voices, carried over from the plain edition */
.centered-statement, .align-center { text-align: center; font-size: 1.2em; line-height: 1.45; margin: 2.6em 0 !important; text-wrap: balance; font-style: italic; }
.align-right { text-align: right; }
.voice-comic { font-family: "Comic Sans MS", "Comic Sans", cursive; font-style: normal; }
.voice-bold-serif { font-family: "Britannic Bold", Georgia, serif; font-weight: 700; font-style: normal; }
.voice-techy { font-family: var(--mono); letter-spacing: .04em; font-style: normal; }
.voice-basier, .voice-heavy { font-family: var(--sign); font-weight: 700; }
.voice-caption { font-family: var(--sign); font-size: .86em; color: var(--soft); }
.voice-condensed-bold { font-family: var(--sign); font-stretch: 80%; font-weight: 700; }
.voice-bookman { font-family: "Bookman Old Style", Georgia, serif; }
.directive-block { font-family: var(--mono); font-size: .86em; line-height: 1.5; background: #03080d; color: #d7e3f4; padding: 1.5rem 1.6rem; border-radius: 4px; box-shadow: 0 0 0 1px rgba(92, 200, 240, .3), 0 30px 70px -20px rgba(0,0,0,.7); }
.directive-block p { margin: 0 0 .5em; }
.directive-block p:last-child { margin: 0; }
.directive-block p:last-child::after { content: "▌"; margin-left: .2em; animation: blink 1.1s steps(1) infinite; }

/* signpost lines: big type, filled with the leg's artwork on dark worlds */
.col > .sign { font-family: var(--sign); font-weight: 700; font-stretch: 78%; font-size: clamp(2.2rem, 8.5vw, 5.2rem); line-height: .98; letter-spacing: .02em; text-align: center; color: var(--accent); margin: 1.4em -2rem .35em; text-wrap: balance; font-style: normal; }
.col > .sign + .sign { margin-top: 0; }
.world.dark.art-on .col > .sign { background: linear-gradient(color-mix(in srgb, var(--accent) 52%, transparent), color-mix(in srgb, var(--accent) 52%, transparent)), var(--art) var(--bp, 30% 40%) / 340% auto; -webkit-background-clip: text; background-clip: text; color: transparent; filter: saturate(1.3) brightness(1.35); }
.w6 .col { counter-reset: step; }
.col > .step { counter-increment: step; position: relative; padding-left: 3.6rem; }
.col > .step::before { content: counter(step); position: absolute; left: 0; top: -.05em; font-family: var(--sign); font-weight: 700; font-size: 2.4em; line-height: 1; color: var(--accent); font-stretch: 80%; }
.col > .creed { font-family: var(--sign); font-size: clamp(1.3rem, 3.4vw, 1.9rem); line-height: 1.2; text-align: center; margin: 0 0 1em; text-wrap: balance; }
.col > .phrase { padding: 1.2rem 0 1.2rem 1.4rem; box-shadow: inset 3px 0 0 var(--accent); }
.col > .phrase::first-line { font-family: var(--sign); font-weight: 700; font-size: 1.25em; color: var(--accent); }
.principle-head { font-family: var(--sign); font-weight: 700; font-stretch: 85%; font-size: clamp(1.7rem, 4vw, 2.5rem) !important; line-height: 1.12; margin: 1.2em 0 .8em !important; scroll-margin-top: calc(var(--hud-h) + 30px); text-wrap: balance; }

/* ---------- hero ---------- */
.hero { -webkit-mask-image: linear-gradient(#000 74%, transparent); mask-image: linear-gradient(#000 74%, transparent); position: relative; z-index: 1; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: calc(var(--hud-h) + 2rem) 1.25rem 5rem; overflow: hidden; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: .55; animation: drift 46s ease-in-out infinite alternate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; background: radial-gradient(ellipse 60% 46% at 50% 54%, rgba(23, 11, 6, .82), transparent 75%), linear-gradient(transparent 62%, #170b06 98%); }
.fire { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; mix-blend-mode: screen; }
.hero-inner { position: relative; z-index: 2; max-width: 46rem; margin-top: 9vh; }
.hero-kicker { font-family: var(--sign); text-transform: uppercase; letter-spacing: .26em; font-size: .78em; margin: 0 0 1.2rem; color: #ffe2bd; }
.hero-title { font-family: var(--sign); font-weight: 700; font-stretch: 78%; text-transform: uppercase; font-size: clamp(3.2rem, 14vw, 9.5rem); line-height: .88; margin: 0; background: var(--rainbow); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 6px 30px rgba(255, 90, 40, .45)); }
.hero-meta { margin-top: 1.4rem; font-size: .95em; }
.hero-meta p { margin: .15em 0; }
.title-page-subtitle { font-family: var(--sign); letter-spacing: .22em; text-transform: uppercase; }
.title-page-yearversion { color: #d6c0aa; font-size: .85em; }
.hero-route { font-family: var(--sign); letter-spacing: .14em; text-transform: uppercase; font-size: .76em; color: #d6c0aa; margin: 1.6rem 0 1.2rem; }
.hero-actions { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; margin: 0; }
.hero-scroll { position: absolute; z-index: 2; bottom: 1.6rem; left: 50%; width: 1px; height: 3rem; background: linear-gradient(#ffb070, transparent); animation: drip 2.4s ease-in-out infinite; }
.btn { display: inline-block; font-family: var(--sign); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; text-decoration: none; padding: .85rem 1.5rem; border-radius: 2px; border: 0; background: #ff8a3c; color: #1a0d08; }
.btn.ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
.btn:hover { filter: brightness(1.1); }
.w0 .col { padding-top: 3rem; }
.w0 .centered-statement { font-size: 1.55em; font-style: normal; }

/* ---------- stations: the leg's artwork, full screen ---------- */
.station { position: relative; min-height: 100svh; display: flex; align-items: flex-end; margin-bottom: 2rem; padding: 0 clamp(1.25rem, 15vw, 170px) clamp(3.5rem, 11vh, 8rem); }
.station-art { position: absolute; inset: 0; -webkit-mask-image: linear-gradient(#000 58%, transparent 99%); mask-image: linear-gradient(#000 58%, transparent 99%); }
.station-art img { width: 100%; height: 116%; max-width: none; object-fit: cover; translate: 0 calc(var(--p, 0) * 7% - 7%); }
.station-art::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(var(--bg), transparent 20%),
  linear-gradient(transparent 34%, color-mix(in srgb, var(--bg) 72%, transparent) 64%, color-mix(in srgb, var(--bg) 80%, transparent)); }
.station-text { position: relative; z-index: 3; max-width: 56rem; }
.st1 .station-text { margin-left: auto; text-align: right; }
.st2 .station-text { margin: 0 auto; text-align: center; }
.station-leg { font-family: var(--sign); letter-spacing: .24em; text-transform: uppercase; font-size: .74em; margin: 0 0 .7rem; color: var(--ink); opacity: .85; }
.station-leg::before { content: ""; display: inline-block; width: 2.6rem; height: 1px; background: var(--accent); vertical-align: middle; margin-right: .9rem; }
.st1 .station-leg::before, .st2 .station-leg::before { display: none; }
/* small lines stay readable on any artwork: a soft halo in the leg's own colour */
.station-leg, .station-kicker { text-shadow: 0 0 3px var(--bg), 0 0 10px var(--bg), 0 0 22px var(--bg); }
.station-title.long { font-size: clamp(2.1rem, 6.2vw, 4.6rem); line-height: .95; }
.station-kicker { font-style: italic; color: var(--accent); margin: 0 0 .2rem; font-size: 1.25em; }
.station-title { font-family: var(--sign); font-weight: 700; font-stretch: 76%; text-transform: uppercase; font-size: clamp(2.6rem, 9.5vw, 7.4rem); line-height: .9; margin: 0; text-wrap: balance; }
.art-credit { position: absolute; z-index: 1; right: 3.2rem; bottom: .9rem; margin: 0; font-family: var(--sign); font-size: .64rem; letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.st1 .art-credit { right: auto; left: 1rem; }
.arrival > p.art-credit { right: 1rem; }

/* ---------- plates: other parts of the same artwork, between sections ---------- */
.plate { position: relative; width: 100vw; height: 40vh; margin: 6rem 0 2.2rem calc(50% - 50vw) !important; overflow: hidden;
  -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent); }
.plate img { width: 100%; height: 124%; max-width: none; object-fit: cover; scale: var(--z, 1.6); translate: 0 calc(var(--p, 0) * 9% - 9%); }
.plate.pl1 { height: 28vh; -webkit-mask-image: linear-gradient(100deg, transparent 6%, #000 34%, #000 66%, transparent 94%); mask-image: linear-gradient(100deg, transparent 6%, #000 34%, #000 66%, transparent 94%); }
.plate.pl2 { height: 52vh; -webkit-mask-image: radial-gradient(ellipse 62% 50% at 50% 50%, #000 38%, transparent 100%); mask-image: radial-gradient(ellipse 62% 50% at 50% 50%, #000 38%, transparent 100%); }
.plate + h3, .plate + .principle-head, .plate + h4 { margin-top: 0 !important; }

/* ---------- postcards: the archive images ---------- */
.postcards { display: flex; flex-wrap: wrap; gap: 1.6rem; justify-content: center; margin: 3rem -1rem !important; }
.postcard { margin: 0; background: #fbf7ef; padding: .55rem .55rem 0; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.25), 0 26px 50px -16px rgba(0,0,0,.55); max-width: min(100%, 32rem); rotate: var(--tilt, 0deg); translate: 0 var(--drift, 0px); }
.postcard.wide { max-width: 100%; }
.postcard.small { max-width: min(100%, 22rem); }
.postcards.many .postcard { max-width: min(100%, 19rem); }
.postcard img { background: #ddd; }
.postcard figcaption { font-family: var(--sign); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: #8b7d6a; text-align: right; padding: .35rem .2rem .4rem; }
.tilt0 { --tilt: -1.6deg; } .tilt1 { --tilt: 1.2deg; } .tilt2 { --tilt: -.7deg; } .tilt3 { --tilt: 2deg; }
.postcard:hover { rotate: 0deg; transition: rotate .3s; }

/* ---------- reveal ---------- */
.js .reveal { opacity: 0; }
.js .reveal.in { opacity: 1; animation: rise-in 1s cubic-bezier(.2,.7,.2,1) both; }
.js .postcard.reveal.in { animation-name: card-in; }
.js .plate.reveal.in { animation-name: fade-in; animation-duration: 1.6s; }
.js .creed, .js .sign { opacity: 0; transition: opacity 1.1s, scale 1.1s; scale: .97; }
.js .creed.in, .js .sign.in { opacity: 1; scale: 1; }

/* ---------- explainers: closed until asked for ---------- */
.explainer { margin: 2.4rem 0 !important; }
.explainer.ex1 { text-align: right; }
.explainer summary { list-style: none; display: inline-flex; align-items: center; gap: .85rem; cursor: pointer; padding: .3rem 1.2rem .3rem .3rem; border-radius: 999px; background: var(--card); font-family: var(--sign); font-weight: 700; font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; transition: background .3s; }
.explainer summary::-webkit-details-marker { display: none; }
.explainer summary:hover { background: var(--tint); }
.ex-chip { width: 2.7rem; height: 2.7rem; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px var(--accent), 0 0 0 4px var(--bg), 0 0 0 5px color-mix(in srgb, var(--accent) 40%, transparent); flex: none; }
.ex-chip img { width: 100%; height: 100%; object-fit: cover; transition: scale .6s, rotate .6s; }
.explainer summary:hover .ex-chip img, .explainer[open] .ex-chip img { scale: 1.5; rotate: 25deg; }
.ex-plus { position: relative; width: .8rem; height: .8rem; flex: none; }
.ex-plus::before, .ex-plus::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: var(--accent); transition: rotate .35s; }
.ex-plus::after { rotate: 90deg; }
.explainer[open] .ex-plus::after { rotate: 0deg; }
.ex-body { text-align: left; margin-top: 1rem; padding: 1.3rem 1.5rem; background: var(--tint); border-radius: 3px; box-shadow: inset 3px 0 0 var(--accent); animation: rise-in .5s cubic-bezier(.2,.7,.2,1) both; font-size: .97em; }
.explainer.ex1 .ex-body { box-shadow: inset -3px 0 0 var(--accent); }
.ex-body p { margin: 0 0 .9em; }
.ex-body p:last-child { margin: 0; }

/* ---------- video ---------- */
.video { margin: 3rem 0 !important; }
.video-play, .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 3px; }
.video-play { position: relative; overflow: hidden; background: var(--art, var(--card)) 50% 30% / cover; box-shadow: 0 26px 50px -16px rgba(0,0,0,.55); }
.video-play::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .35); transition: background .3s; }
.video-play:hover::before { background: rgba(0, 0, 0, .15); }
.video-play span { position: absolute; left: 50%; top: 50%; width: 5rem; height: 5rem; translate: -50% -50%; border-radius: 50%; background: rgba(255, 255, 255, .92); }
.video-play span::after { content: ""; position: absolute; left: 54%; top: 50%; translate: -50% -50%; border-left: 1.5rem solid #111; border-top: .95rem solid transparent; border-bottom: .95rem solid transparent; }
.video-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.2rem; margin: 1rem 0 0; }
.col .video-bar .btn { background: var(--accent); color: var(--bg); text-decoration: none; }
.video-note { font-family: var(--sign); font-size: .72rem; letter-spacing: .08em; color: var(--soft); }

/* ---------- you are here ---------- */
.here-card { background: var(--card); padding: 1.4rem 1.5rem 1.5rem; margin: 4rem 0 !important; font-family: var(--sign); font-size: .86rem; line-height: 1.35; border-radius: 3px; box-shadow: inset 0 2px 0 var(--accent); }
.here-title { margin: 0 0 1rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-size: .72rem; color: var(--accent); }
.here-card ol { list-style: none; margin: 0; padding: 0; }
.here-dots { display: flex; align-items: center; margin-bottom: 1.1rem !important; }
.here-dots li { flex: 1; display: flex; align-items: center; }
.here-dots li::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--ink) 25%, transparent); }
.here-dots li:last-child { flex: none; }
.here-dots li:last-child::after { display: none; }
.here-dots a { display: block; width: 9px; height: 9px; border-radius: 50%; background: color-mix(in srgb, var(--ink) 35%, transparent); flex: none; }
.here-dots a.past { background: var(--ink); }
.here-dots a.cur { width: 17px; height: 17px; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.here-chapter { margin: 0 0 .7rem; font-weight: 700; font-size: 1.05rem; }
.here-chapter span { color: var(--soft); font-weight: 400; margin-right: .6rem; letter-spacing: .1em; }
.col .here-secs a { display: block; padding: .28rem .7rem; color: var(--soft); text-decoration: none; border-radius: 2px; }
.col .here-secs a:hover { color: var(--ink); }
.here-secs li.lv2 a { padding-left: 1.9rem; font-size: .94em; }
.col .here-secs li.cur a { background: var(--accent); color: var(--bg); font-weight: 700; }

/* ---------- widgets ---------- */
.widget { background: var(--card); border-radius: 3px; padding: 1.5rem; margin: 3rem 0 !important; }
.widget-kicker { font-family: var(--sign); font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-size: .72rem; color: var(--accent); margin: 0 0 1.1rem; }
.widget button { border: 0; background: none; }
.widget-more { margin-top: 1rem; font-size: .88em; }
.widget-more summary { cursor: pointer; font-family: var(--sign); color: var(--soft); }
.widget-more img { margin-top: .8rem; }

.layers { margin-left: -1rem !important; margin-right: -1rem !important; }
.layers-grid { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.layer-tabs { display: grid; gap: .5rem; }
.widget .layer-tab { text-align: left; padding: .85rem 1rem; border-radius: 2px; display: grid; gap: .15rem; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent); transition: translate .25s, box-shadow .25s; }
.widget .layer-global { background: transparent; }
.widget .layer-domain { background: color-mix(in srgb, var(--ink) 12%, transparent); }
.widget .layer-local { background: color-mix(in srgb, var(--ink) 26%, transparent); }
.widget .layer-tab[aria-selected="true"] { box-shadow: inset 0 0 0 2px var(--accent); translate: 6px 0; }
.layer-name { font-family: var(--sign); font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.layer-sub { font-size: .74em; line-height: 1.3; color: var(--soft); }
.layer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; font-family: var(--sign); font-weight: 700; margin: 0 0 .7rem; }
.layer-panel ul { margin: 0; padding-left: 1.1em; font-size: .9em; line-height: 1.5; }
.layer-panel li { margin-bottom: .3em; }
.pane { width: 1.4rem; height: 1.4rem; box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent); }
.pane-global { background: transparent; }
.pane-domain { background: color-mix(in srgb, var(--accent) 45%, transparent); }

.lenses { text-align: center; }
.lens-stage { display: grid; place-items: center; margin-bottom: 1.1rem; }
.lens { width: 14rem; height: 14rem; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1px var(--ink), 0 0 0 9px var(--bg), 0 0 0 10px color-mix(in srgb, var(--ink) 35%, transparent), 0 30px 60px -20px rgba(0,0,0,.6); }
.lens-tiles { width: 100%; height: 100%; background: var(--art, var(--accent)) 50% 50% / cover; transition: scale 1.2s cubic-bezier(.3,.7,.2,1), filter 1.2s; scale: 4.5; filter: blur(7px); }
.lens-tiles i { display: none; }
[data-lens="1"] .lens-tiles { scale: 2.2; filter: blur(2.5px); }
[data-lens="2"] .lens-tiles { scale: 1; filter: none; }
.lens-range { width: min(100%, 18rem); accent-color: var(--accent); }
.lens-labels { display: flex; justify-content: space-between; width: min(100%, 19rem); margin: .2rem auto 1rem; font-family: var(--sign); font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); }
.lens-text p { margin: 0; text-align: left; }

.dispute label { display: flex; gap: .9rem; align-items: flex-start; padding: .9rem 1rem; cursor: pointer; margin-bottom: .4rem; background: color-mix(in srgb, var(--ink) 6%, transparent); border-radius: 2px; transition: background .3s; }
.dispute label:has(:checked) { background: color-mix(in srgb, var(--accent) 26%, transparent); }
.dispute input { width: 1.2rem; height: 1.2rem; margin-top: .35em; accent-color: var(--accent); flex: none; }
.dispute-result p:last-child { margin: 0; }

.agree { background: none; padding: 0; }
.agree-box { background: #fff; color: #1b1e25; border-radius: 10px; padding: 1.2rem; box-shadow: 0 40px 80px -24px rgba(20, 30, 60, .5), 0 0 0 1px rgba(20,30,60,.08); max-width: 26rem; margin: 0 auto; }
.agree-terms { height: 7.5rem; overflow-y: auto; padding: .7rem; background: #f3f4f6; border-radius: 6px; display: grid; gap: 5px; align-content: start; }
.agree-terms i { height: 3px; background: #c3c7cf; border-radius: 2px; }
.agree-terms i:nth-child(4n) { width: 62%; } .agree-terms i:nth-child(5n) { width: 88%; } .agree-terms i:nth-child(7n) { width: 34%; margin-bottom: 6px; }
.agree-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
.widget .agree-yes { background: #2f4fd6; color: #fff; padding: .6rem 1.3rem; border-radius: 8px; font-weight: 600; }
.widget .agree-no { color: #6b7280; padding: .6rem .9rem; font-size: .85em; }
.agree-out { margin: 1rem 0 0; font-weight: 600; min-height: 1.6em; }
.agree-out:empty { display: none; }

.pillars { background: none; padding: 0; margin-left: -.5rem !important; margin-right: -.5rem !important; }
.pillars-roof { height: 2px; background: var(--ink); margin-bottom: .5rem; }
.pillars-floor { height: 2px; background: var(--ink); margin-top: .5rem; }
.pillars-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: clamp(.4rem, 2vw, 1rem); }
.widget .pillar { position: relative; overflow: hidden; min-height: 19rem; padding: .9rem .2rem; display: flex; flex-direction: column; align-items: center; gap: .8rem; color: #fff; background: var(--art, var(--accent)) calc(var(--i) * 25%) 50% / 520% auto; transform-origin: bottom; transition: rotate .5s, filter .4s; filter: saturate(.9) brightness(.8); }
.pillar:nth-child(1) { --i: 0; } .pillar:nth-child(2) { --i: 1; } .pillar:nth-child(3) { --i: 2; } .pillar:nth-child(4) { --i: 3; } .pillar:nth-child(5) { --i: 4; }
.widget .pillar::before { content: ""; position: absolute; inset: 0; background: linear-gradient(rgba(20, 12, 50, .25), rgba(20, 12, 50, .7)); }
.pillar-n, .pillar-t { position: relative; }
.pillar-n { font-family: var(--sign); font-weight: 700; font-size: 1.7rem; }
.pillar-t { writing-mode: vertical-rl; font-family: var(--sign); font-weight: 700; letter-spacing: .06em; font-size: clamp(.82rem, 2.4vw, 1rem); line-height: 1.15; text-align: left; }
.pillars-row:hover .pillar:not(:hover) { rotate: 1.2deg; }
.pillars-row:hover .pillar:hover ~ .pillar { rotate: -1.2deg; }
.widget .pillar:hover, .widget .pillar:focus-visible { filter: none; rotate: 0deg; }

.rest { text-align: center; margin: 5rem 0 !important; }
.rest-orb { display: block; width: 6.5rem; height: 6.5rem; margin: 0 auto 1.4rem; border-radius: 50%; background: var(--art, var(--accent)) 50% 50% / 300% auto; box-shadow: 0 0 60px color-mix(in srgb, var(--accent) 45%, transparent); animation: breathe 9s ease-in-out infinite; }
.rest-text { font-family: var(--sign); font-weight: 700; font-size: 1.4em; margin: 0 0 1rem; }
.rest-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }
.rest-actions button { font-family: var(--sign); letter-spacing: .12em; text-transform: uppercase; font-size: .76rem; padding: .65rem 1.2rem; border-radius: 2px; border: 0; background: none; box-shadow: inset 0 0 0 1px var(--accent); }
.rest-actions button:hover { background: var(--accent); color: var(--bg); }
.again { animation: again 2.4s ease-out; }

.voice-refuse { cursor: pointer; display: inline-block; position: relative; transition: opacity .5s, rotate .5s; }
.voice-refuse.refused { opacity: .38; rotate: -2deg; text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: #ff8a3c; }

/* ---------- arrival ---------- */
.arrival { position: relative; overflow: hidden; background: #f1ece6; color: #2a2010; text-align: center; padding: 6rem 1.25rem 8rem; min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.arrival-art { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; scale: 1.25; transition: scale 7s cubic-bezier(.2,.6,.2,1), opacity 3s; opacity: .2; }
.arrival.in .arrival-art { scale: 1; opacity: 1; }
.arrival::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(#f1ece6, transparent 22%), radial-gradient(ellipse 50% 40% at 50% 50%, rgba(241, 236, 230, .78), transparent 80%); }
.arrival > p { position: relative; z-index: 2; }
.arrival-line { font-size: clamp(1.5rem, 3.8vw, 2.6rem); line-height: 1.25; max-width: 22ch; margin: 0 0 2.4rem; text-wrap: balance; font-style: italic; }
.arrival-actions { display: flex; gap: .7rem; flex-wrap: wrap; justify-content: center; margin: 0; }
.arrival .btn { background: #2a2010; color: #fffbf2; }
.arrival .btn.ghost { background: none; color: #2a2010; }
.arrival > p.art-credit { position: absolute; color: #5d5145; }

/* ---------- HUD, route, sheets ---------- */
.hud { position: fixed; inset: 0 0 auto 0; height: var(--hud-h); z-index: 50; display: flex; align-items: center; gap: .9rem; padding: 2px .9rem 0; background: var(--hud-bg); color: var(--hud-ink); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-family: var(--sign); font-size: .8rem; }
.spectrum { position: absolute; inset: 0 0 auto 0; height: 2px; background: rgba(255,255,255,.1); }
.spectrum span { display: block; height: 100%; background: var(--rainbow); background-size: 100vw 100%; width: 0; }
.hud-home { color: #cbb6a2; text-decoration: none; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.hud-home:hover { color: #fff; }
.hud-sep { color: #8f8072; margin: 0 -.4rem; }
.hud-me { margin-left: .2rem; }
.hud .mbar-search { color: inherit; }
.mark-talk { display: inline-block; margin: .35rem 0 0; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; }
.mark-talk[hidden] { display: none; }
.drawer-links { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.4rem; }
.drawer-links a { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; text-decoration: none; padding: .55rem .8rem; border-radius: 2px; box-shadow: inset 0 0 0 1px currentColor; }
.arrival-where { font-family: var(--sign); font-size: .78rem; letter-spacing: .26em; text-transform: uppercase; margin: 0 0 1rem; }
.arrival-more { font-family: var(--sign); font-size: .8rem; letter-spacing: .06em; margin: 1.6rem 0 0; }
.arrival-more a, .arrival-more .link { color: #2a2010; }
.hud-brand { color: inherit; text-decoration: none; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; white-space: nowrap; }
.hud-here { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #cbb6a2; letter-spacing: .06em; border: 0; background: none; text-align: left; padding: .45rem .3rem; }
.hud-here:hover { color: #fff; }
.hud-btn { border: 0; background: none; padding: .45rem .6rem; border-radius: 2px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.hud-btn:hover { background: rgba(255,255,255,.1); }
.hud-ico { margin-right: .35rem; }
.hud-count { color: #ffb86b; }

.route { position: fixed; right: .6rem; top: 50%; translate: 0 -50%; z-index: 40; display: none; }
.route ol { list-style: none; margin: 0; padding: .7rem .45rem; border-radius: 999px; background: var(--hud-bg); display: grid; gap: .5rem; }
.route a { display: flex; align-items: center; justify-content: flex-end; position: relative; text-decoration: none; }
.route .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dot); opacity: .45; transition: scale .3s, opacity .3s; }
.route a.here .dot { opacity: 1; scale: 1.7; box-shadow: 0 0 12px var(--dot); }
.route-label { position: absolute; right: 1.7rem; white-space: nowrap; font-family: var(--sign); font-size: .75rem; letter-spacing: .06em; background: var(--hud-bg); color: var(--hud-ink); padding: .25rem .6rem; border-radius: 2px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.route a:hover .route-label, .route a:focus-visible .route-label { opacity: 1; }
@media (min-width: 1180px) { .route { display: block; right: max(.6rem, calc(50% - var(--stage) / 2 + .2rem)); } }

.sheet { border: 0; border-radius: 4px; padding: 1.8rem; width: min(34rem, calc(100vw - 1.5rem)); max-height: min(44rem, calc(100svh - 2rem)); background: #14100e; color: #f3e6d8; font-family: var(--sign); }
.sheet::backdrop, .drawer::backdrop { background: rgba(8, 5, 4, .66); backdrop-filter: blur(4px); }
.sheet h2, .drawer h2 { margin: 0; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .2em; }
.sheet-sub { margin: .2rem 0 1.2rem; color: #cbb6a2; }
.sheet-x { position: absolute; right: .9rem; top: .8rem; border: 0; background: none; font-size: 1.8rem; line-height: 1; color: #cbb6a2; }
.sheet-foot { margin: 1.2rem 0 0; font-size: .82rem; color: #8f8072; }
.sheet a, .drawer a, .link { color: #ffb86b; }
.link { border: 0; background: none; padding: 0; text-decoration: underline; }
.stamps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(7.2rem, 1fr)); gap: .9rem; }
.stamp { position: relative; overflow: hidden; aspect-ratio: 1; border-radius: 50%; display: grid; place-content: center; text-align: center; padding: .6rem; color: rgba(243, 230, 216, .32); box-shadow: inset 0 0 0 1px rgba(243, 230, 216, .16); }
.stamp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .8s; }
.stamp-n, .stamp-t { position: relative; }
.stamp-n { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.stamp-t { font-size: .6rem; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; margin-top: .25rem; }
.stamp.got { color: #fff; box-shadow: inset 0 0 0 2px var(--dot); text-shadow: 0 1px 6px #000, 0 0 2px #000; }
.stamp.got img { opacity: .75; }
.stamp.fresh { animation: stamp .6s cubic-bezier(.3,1.6,.5,1); }

/* the index: a quiet drawer, each leg shown by its artwork */
.drawer { border: 0; padding: 0; margin: 0 0 0 auto; height: 100dvh; max-height: none; width: min(27rem, 94vw); background: #100c0b; color: #f3e6d8; font-family: var(--sign); overflow-y: auto; }
.drawer[open] { animation: slide-in .45s cubic-bezier(.2,.8,.2,1); }
.drawer-in { position: relative; padding: 1.6rem 1.4rem 3rem; }
.drawer h2 { margin-bottom: 1.2rem; }
.scroll-add { margin: 0 0 1rem; }
.scroll-btn { font-family: var(--sign); letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; padding: .7rem 1.1rem; border: 0; border-radius: 2px; background: none; color: #ffb86b; box-shadow: inset 0 0 0 1px #ffb86b; width: 100%; }
.scroll-btn:hover { background: #ffb86b; color: #100c0b; }
.marks { list-style: none; margin: 0 0 1.4rem; padding: 0; }
.marks:empty { display: none; }
.marks li { display: grid; grid-template-columns: 1fr auto; gap: .3rem .5rem; padding: .7rem .8rem .8rem 1.7rem; margin-bottom: .5rem; background: rgba(255,255,255,.05); position: relative; }
.marks li::before { content: ""; position: absolute; left: .6rem; top: 0; width: .55rem; height: 1.5rem; background: #ff8a3c; clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }
.drawer .marks a { font-weight: 700; font-size: .92rem; line-height: 1.3; color: #f3e6d8; text-decoration: none; }
.marks button { border: 0; background: none; font-size: 1.2rem; line-height: 1; color: #8f8072; }
.marks textarea { grid-column: 1 / -1; font-family: var(--serif); font-size: .9rem; line-height: 1.4; padding: .45rem .55rem; border: 0; border-radius: 2px; background: rgba(255,255,255,.08); color: inherit; resize: vertical; }
.menu { list-style: none; margin: 0; padding: 0; }
.drawer .menu > li > a { display: grid; grid-template-columns: 3.4rem 1fr auto; gap: .9rem; align-items: center; padding: .35rem; color: inherit; text-decoration: none; font-size: .98rem; line-height: 1.2; }
.menu > li > a:hover { background: rgba(255,255,255,.06); }
.menu-thumb { width: 3.4rem; height: 3.4rem; object-fit: cover; filter: saturate(.75) brightness(.8); transition: filter .3s; }
.menu > li.cur .menu-thumb, .menu > li > a:hover .menu-thumb { filter: none; }
.menu > li.cur > a { box-shadow: inset 2px 0 0 #ffb86b; background: rgba(255,255,255,.05); }
.menu-n { display: block; color: #ffb86b; font-size: .68rem; letter-spacing: .18em; margin-bottom: .15rem; }
.menu-min { color: #8f8072; font-size: .72rem; white-space: nowrap; padding-right: .3rem; }
.menu ul { list-style: none; margin: .3rem 0 .8rem 4.6rem; padding: 0; font-size: .82rem; display: none; }
.menu > li.cur ul { display: block; }
.drawer .menu ul a { color: #a89a8c; text-decoration: none; display: block; padding: .2rem .5rem; }
.drawer .menu ul a:hover { color: #fff; }
.drawer .menu ul a.here { background: #ffb86b; color: #100c0b; font-weight: 700; }
.menu li.lv2 { margin-left: 1rem; }
.offline-line .link { font: inherit; }
.scroll-foot { margin: 1.2rem 0 0; font-size: .76rem; color: #8f8072; letter-spacing: .04em; }
.marked { position: relative; }
.marked::before { content: ""; position: absolute; left: -1.5rem; top: .25em; width: .6rem; height: 1.7rem; background: var(--accent); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 72%, 0 100%); }

.toast { position: fixed; left: 50%; bottom: 3.4rem; translate: -50% 150%; z-index: 60; background: #14100e; color: #f3e6d8; font-family: var(--sign); letter-spacing: .14em; text-transform: uppercase; font-size: .72rem; padding: .75rem 1.3rem; border-radius: 2px; box-shadow: 0 14px 40px rgba(0,0,0,.5); transition: translate .5s cubic-bezier(.3,1.3,.5,1), opacity .4s; opacity: 0; max-width: calc(100vw - 2rem); text-align: center; }
.toast.on { translate: -50% 0; opacity: 1; }
.veil { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; padding: 2rem; text-align: center; background: rgba(233, 238, 240, .74); color: #1b1e25; font: 600 clamp(1.2rem, 3.5vw, 1.9rem)/1.35 system-ui, sans-serif; opacity: 0; pointer-events: none; transition: opacity .5s; text-wrap: balance; }
.denied .veil { opacity: 1; pointer-events: auto; }
.denied main { filter: blur(7px) grayscale(1); transition: filter .5s; }
main { transition: filter .8s; }

/* ---------- the company ---------- */
.company { position: fixed; left: 0; right: 0; bottom: 2px; height: 0; z-index: 30; pointer-events: none; --h: 32px; }
.pet { position: absolute; left: 0; bottom: 0; height: calc(var(--h) * var(--k, 1)); aspect-ratio: 96 / 68; will-change: transform; image-rendering: pixelated;
  background: url(sprites/cat.png?v=f942ef6d79) 0 0 / 600% 400% no-repeat; filter: drop-shadow(0 0 1px rgba(255, 255, 255, .75)) drop-shadow(0 0 3px rgba(255, 255, 255, .35)); }
.pet.dog { background-image: url(sprites/dog.png?v=0de6133a0d); background-size: 600% 300%; --k: .8; }
.pet.c1 { background-image: url(sprites/cat-1.png?v=9a6dbab6cb); --k: 1.15; }
.pet.c2 { background-image: url(sprites/cat-2.png?v=1f8e95f81a); --k: .78; }
.pet.c3 { background-image: url(sprites/cat-3.png?v=90b5bb2d34); --k: .95; }
.pet.c4 { background-image: url(sprites/cat-4.png?v=29c1fb924d); --k: 1.15; }
.pet.c5 { background-image: url(sprites/cat-5.png?v=6cee0df236); --k: .95; }
.pet.c6 { background-image: url(sprites/cat-6.png?v=c4f05be4b4); --k: .95; }
.pet.c2, .pet.c5, .pet.c6 { filter: drop-shadow(0 0 1px rgba(0, 0, 0, .7)) drop-shadow(0 0 3px rgba(0, 0, 0, .3)); }
.pet.walk { background-position-y: 0; }
.pet.idle { background-position-y: 33.333%; animation: frames 3.2s steps(6, jump-none) infinite; }
.pet.sit { background-position-y: 66.667%; animation: frames 4.5s steps(6, jump-none) infinite; }
.pet.run { background-position-y: 100%; }
.pet.pounce { background-position-y: 100%; animation: pounce .5s cubic-bezier(.3, 1.6, .5, 1); }
.pet.dog.idle { background-position-y: 50%; }
.pet.dog.sit { background-position-y: 100%; }
.paws { display: flex; justify-content: center; gap: 2.4rem; margin: 0 0 2em !important; height: 1.6rem; }
.paws.left { justify-content: flex-start; padding-left: 12%; }
.paws svg { width: .8rem; height: .8rem; fill: var(--accent); rotate: 90deg; opacity: 0; transition: opacity .5s; }
.paws svg:nth-child(odd) { translate: 0 .5rem; }
.paws.in svg { opacity: .42; }
.paws.in svg:nth-child(2) { transition-delay: .25s; } .paws.in svg:nth-child(3) { transition-delay: .5s; }
.paws.in svg:nth-child(4) { transition-delay: .75s; } .paws.in svg:nth-child(5) { transition-delay: 1s; } .paws.in svg:nth-child(6) { transition-delay: 1.25s; }
.quiet .company, .quiet .paws { display: none; }

/* ---------- the stage ----------
   Artwork and thread keep one optimal width (the layout reads best around
   1080px). On wider screens the stage stays that wide in the middle and its
   edges fade into the leg's colour instead of the art stretching out. */
:root { --stage: 1080px; --side: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
@media (min-width: 1081px) {
  .world-bg { width: var(--stage); margin-left: auto; margin-right: auto; -webkit-mask-image: var(--side); mask-image: var(--side); }
  .station-art, .hero-art, .arrival-art { left: calc(50% - var(--stage) / 2); right: auto; width: var(--stage); }
  .station-art { -webkit-mask-image: linear-gradient(#000 58%, transparent 99%), var(--side); mask-image: linear-gradient(#000 58%, transparent 99%), var(--side); -webkit-mask-composite: source-in; mask-composite: intersect; }
  .hero-art, .arrival-art { -webkit-mask-image: var(--side); mask-image: var(--side); }
  .plate { width: var(--stage); margin-left: calc(50% - var(--stage) / 2) !important; }
  .plate.pl0 { -webkit-mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent), var(--side); mask-image: linear-gradient(transparent, #000 30%, #000 70%, transparent), var(--side); -webkit-mask-composite: source-in; mask-composite: intersect; }
  .station { padding-left: calc(50% - var(--stage) / 2 + 170px); padding-right: calc(50% - var(--stage) / 2 + 170px); }
  .thread { left: calc(50% - var(--stage) / 2 - 20px); }
  .hud { padding-left: calc(50% - var(--stage) / 2); padding-right: calc(50% - var(--stage) / 2); }
  .fire { left: calc(50% - var(--stage) / 2); width: var(--stage); -webkit-mask-image: var(--side); mask-image: var(--side); }
  .art-credit { right: calc(50% - var(--stage) / 2 + 3.2rem); }
  .st1 .art-credit { left: calc(50% - var(--stage) / 2 + 170px); right: auto; }
}

/* ---------- things that move ---------- */
/* the artwork behind the text drifts, very slowly */
.world-bg { overflow: hidden; background: none; }
.world-bg::before { content: ""; position: absolute; inset: -7%; background: var(--art) 50% 50% / cover no-repeat; animation: bgdrift 80s ease-in-out infinite alternate; }
/* the strand leans with your scrolling and sways a little at rest */
.thread.live { transform: translateX(var(--sway, 0px)); animation: sway 9s ease-in-out infinite alternate; }
/* the points of light in the knowledge leg twinkle */
.twinkle { position: sticky; top: 0; display: block; height: 100vh; background: repeat-y 50% 0 / 190px auto; filter: brightness(2.6) saturate(1.5) blur(.6px); mix-blend-mode: screen;
  -webkit-mask-image: repeating-linear-gradient(transparent 0, transparent 70px, #000 100px, transparent 130px, transparent 210px); mask-image: repeating-linear-gradient(transparent 0, transparent 70px, #000 100px, transparent 130px, transparent 210px);
  -webkit-mask-size: 100% 210px; mask-size: 100% 210px; animation: twinkle 5.5s linear infinite; }
.w8.art-on .twinkle { background-image: url(thread/08.webp); }
@keyframes bgdrift { from { scale: 1; translate: -1.5% -1%; } to { scale: 1.12; translate: 1.5% 1.5%; } }
@keyframes sway { from { translate: -2.5px 0; } to { translate: 2.5px 0; } }
@keyframes twinkle { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: 0 -210px; mask-position: 0 -210px; } }

/* ---------- motion ---------- */
@keyframes pounce { 0% { translate: 0 0; } 40% { translate: 0 -14px; } 100% { translate: 0 0; } }
@keyframes frames { from { background-position-x: 0%; } to { background-position-x: 100%; } }
@keyframes rise-in { from { opacity: 0; translate: 0 28px; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes card-in { from { opacity: 0; scale: .92; rotate: 0deg; } }
@keyframes slide-in { from { translate: 100% 0; } }
@keyframes drift { from { scale: 1; } to { scale: 1.14; translate: -1.5% 1%; } }
@keyframes breathe { 0%, 100% { scale: .72; opacity: .75; } 45%, 55% { scale: 1.12; opacity: 1; } }
@keyframes again { 0% { background: var(--tint); box-shadow: 0 0 0 .6rem var(--tint); } 100% { background: transparent; box-shadow: 0 0 0 .6rem transparent; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes drip { 0% { scale: 1 0; transform-origin: top; } 60% { scale: 1 1; opacity: 1; } 100% { opacity: 0; } }
@keyframes stamp { from { scale: 2.2; opacity: 0; } }

@media (max-width: 640px) {
  .layers-grid { grid-template-columns: 1fr; }
  .widget .layer-tab[aria-selected="true"] { translate: 0; }
  .hud-btn-t, .hud-here, .hud-sep, .hud-brand { display: none; }
  .hud { gap: .5rem; }
  .hud-home { flex: 1; color: inherit; font-weight: 700; }
  .postcards { margin: 2.4rem 0 !important; }
  .col > .sign { margin-left: 0; margin-right: 0; }
  .company { --h: 26px; }
  .marked::before { left: -1rem; width: .45rem; }
  .plate { height: 30vh; } .plate.pl2 { height: 38vh; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .creed, .js .sign { opacity: 1; scale: 1; }
  .postcard { translate: none; }
  .twinkle { display: none; }
  .arrival-art { scale: 1; opacity: 1; }
}
@media print {
  .hud, .route, .toast, .veil, .fire, .hero-art, .hero-scroll, .company, .paws, .plate, .station-art, .arrival-art, .world-bg, .thread { display: none !important; }
  .js .reveal, .js .creed, .js .sign { opacity: 1 !important; }
  .world, .arrival { background: #fff !important; color: #000 !important; }
  .world::after { display: none; }
  .station { min-height: 0; }
}

/* selected text takes the chapter's own colour, not the browser's blue */
.w0 ::selection { background: rgba(255,138,60,.42); color: #fff; text-shadow: 0 0 10px rgba(255,138,60,.8); }
.w1 ::selection { background: rgba(58,86,154,.26); color: #1c2433; text-shadow: none; }
.w2 ::selection { background: rgba(255,106,92,.42); color: #fff; text-shadow: 0 0 10px rgba(255,106,92,.8); }
.w3 ::selection { background: rgba(201,224,74,.42); color: #fff; text-shadow: 0 0 10px rgba(201,224,74,.8); }
.w4 ::selection { background: rgba(162,48,26,.26); color: #2a1a12; text-shadow: none; }
.w5 ::selection { background: rgba(255,154,74,.42); color: #fff; text-shadow: 0 0 10px rgba(255,154,74,.8); }
.w6 ::selection { background: rgba(92,200,240,.42); color: #fff; text-shadow: 0 0 10px rgba(92,200,240,.8); }
.w7 ::selection { background: rgba(55,96,109,.26); color: #1c2529; text-shadow: none; }
.w8 ::selection { background: rgba(255,196,107,.42); color: #fff; text-shadow: 0 0 10px rgba(255,196,107,.8); }
.w9 ::selection { background: rgba(74,47,192,.26); color: #1d1540; text-shadow: none; }
.w10 ::selection { background: rgba(255,178,62,.42); color: #fff; text-shadow: 0 0 10px rgba(255,178,62,.8); }
.w11 ::selection { background: rgba(184,58,39,.26); color: #2b1d18; text-shadow: none; }
.w12 ::selection { background: rgba(122,74,26,.26); color: #2e2012; text-shadow: none; }
.arrival ::selection { background: rgba(122,74,26,.24); color: #2a2010; text-shadow: none; }

/* the thread, one strand per leg (site/journey/thread) */
.w1.art-on .thread { background-image: url(thread/01.webp); }
.w2.art-on .thread { background-image: url(thread/02.webp); }
.w3.art-on .thread { background-image: url(thread/03.webp); }
.w4.art-on .thread { background-image: url(thread/04.webp); }
.w5.art-on .thread { background-image: url(thread/05.webp); }
.w6.art-on .thread { background-image: url(thread/06.webp); }
.w7.art-on .thread { background-image: url(thread/07.webp); }
.w8.art-on .thread { background-image: url(thread/08.webp); }
.w9.art-on .thread { background-image: url(thread/09.webp); }
.w10.art-on .thread { background-image: url(thread/10.webp); }
.w11.art-on .thread { background-image: url(thread/11.webp); }
.w12.art-on .thread { background-image: url(thread/12.webp); }
