/* WY.GONE v2 — one screen, no page scroll.
   Desktop: story left · artwork centre · live pulse right · your WY along the bottom.
   Phone:   artwork on top · one panel at a time · tab bar at the bottom
            (v2.js moves the "your WY" panel into the stage on phones).
   Rules open as an overlay on every size. */

:root {
  /* WY spectrum: obsidian → petrol → ice; cold silver text; violet only as interference.
     (--gold / --ember keep their old names so the rest of the sheet is unchanged;
     they are cyan and violet now.) */
  --bg: #04070b;
  --bg-2: #071018;
  --petrol: #0a2f38;
  --petrol-2: #0d4650;
  --ink: #d6e2e8;
  --ink-soft: rgba(214, 226, 232, 0.8);
  --ink-faint: #a8bac4;
  --gold: #72e7f2;
  --gold-soft: rgba(114, 231, 242, 0.5);
  --ice: #9cf7ff;
  --ash: #8a9aa5;
  --ember: #8a72ff;
  --rule: rgba(114, 231, 242, 0.15);
  --panel: rgba(7, 16, 24, 0.74);
  --serif: 'Cormorant Garamond', 'EB Garamond', Garamond, 'Times New Roman', serif;
  --text: 'EB Garamond', 'Cormorant Garamond', Garamond, Georgia, serif;
  --gutter: clamp(16px, 3.2vw, 56px);
  /* type scales with the SMALLER of width/height so everything fits one screen */
  --u: min(1vw, 1.65vh);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--text); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; }
.hidden { display: none !important; }
h1, h2, p, dd, dt, li, figcaption, .bigLabel, .smallStats span, .clocks span { overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }

/* ---------- frame ---------- */
.app {
  position: relative;
  height: 100vh; height: 100dvh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  background: radial-gradient(ellipse 70% 70% at 52% 46%, var(--bg-2) 0%, var(--bg) 64%);
  overflow: hidden;
}
.heroCanvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.top, .stage, .bottom, .tabs { position: relative; z-index: 2; }

/* ---------- header ---------- */
.top { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 40px); padding: clamp(14px, 2.4vh, 26px) var(--gutter) clamp(8px, 1.4vh, 14px); }
.logo { font-family: var(--serif); font-size: clamp(20px, calc(var(--u) * 1.8), 28px); letter-spacing: .18em; color: var(--ink); text-decoration: none; flex: none; }
.ticker {
  flex: 1; min-width: 0; contain: inline-size; /* takes only the space left over: a long word in any language never pushes the language button out */
  margin: 0; padding-inline-start: clamp(16px, 2.4vw, 40px); border-inline-start: 1px solid var(--rule);
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ticker b { color: var(--ink); font-weight: 500; font-variant-numeric: lining-nums tabular-nums; }
.ticker .sp { color: var(--ember); }
.rulesBtn {
  flex: none; background: none; border: 1px solid var(--gold); padding: 9px 16px; cursor: pointer;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); transition: border-color .4s, color .4s;
}
.rulesBtn:hover, .rulesBtn:focus-visible { border-color: var(--gold); color: var(--gold); outline: none; }

/* ---------- middle: story | (artwork) | pulse ---------- */
.stage { display: grid; grid-template-columns: minmax(280px, 25%) 1fr minmax(220px, 19%); gap: 24px; padding: 0 var(--gutter); min-height: 0; }
.panel { min-height: 0; }
.story { grid-column: 1; align-self: center; padding: 1vh 0; max-height: 100%; }
.pulse { grid-column: 3; align-self: center; }

.eyebrow { margin: 0 0 1.6vh; min-height: 1em; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); }
.headline {
  margin: 0; min-height: 1.1em; font-family: var(--serif); font-weight: 400;
  font-size: clamp(26px, calc(var(--u) * 3.5), 56px); line-height: 1.08; letter-spacing: .03em; max-width: 100%; overflow-wrap: anywhere;
  text-transform: uppercase; text-shadow: 0 0 40px rgba(0,0,0,.85);
}
.headline.swap { animation: rise 1.2s cubic-bezier(.2,.7,.2,1) both; }
.headline .num { display: inline-block; margin-top: .25em; font-size: .56em; letter-spacing: .06em; color: var(--gold); font-variant-numeric: lining-nums tabular-nums; }
.shortRule { display: block; width: 48px; height: 1px; margin: 2.6vh 0 2.2vh; background: var(--gold); }
.lines p {
  margin: 0 0 .9vh; font-size: clamp(15px, calc(var(--u) * 1.32), 20px); line-height: 1.5; letter-spacing: .015em;
  color: var(--ink-soft); text-shadow: 0 0 18px rgba(0,0,0,.9); animation: rise 1.4s cubic-bezier(.2,.7,.2,1) both;
}
.lines p.italic { font-family: var(--serif); font-style: italic; font-size: clamp(19px, calc(var(--u) * 1.75), 27px); color: #d6e2e8; }
.lines p.warn { color: var(--ember); }
.lines p.delta { color: var(--ink); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .03em; }
.lines p.event { color: var(--ink); }
.lines p.principle { font-family: var(--serif); font-size: clamp(18px, calc(var(--u) * 1.6), 25px); color: var(--ink); margin-bottom: .2vh; }
.lines p.principle.lead { margin-top: 1.2vh; }
.lines p.remembers { margin-top: 1.4vh; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--ice); }
.lines p.mystery { margin-top: 2vh; font-size: 11px; line-height: 1.7; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-faint); max-width: 30em; }
.ctaNote { flex-basis: 100%; margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(14px, calc(var(--u) * 1.2), 17px); color: var(--ink-faint); }
.lines p.counter { font-family: var(--serif); font-size: clamp(26px, calc(var(--u) * 2.9), 44px); color: var(--ink); font-variant-numeric: lining-nums tabular-nums; letter-spacing: .03em; }
/* No filter:blur on text: iOS Safari can leave blurred/animated text invisible. */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.actions { margin-top: 2.6vh; min-height: 52px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cta {
  display: inline-flex; align-items: center; gap: 26px; padding: clamp(13px, 1.9vh, 18px) 34px;
  background: rgba(10, 18, 32, .6); border: 1px solid var(--gold); cursor: pointer;
  font-family: var(--text); font-size: 13px; letter-spacing: .2em; white-space: nowrap; text-transform: uppercase; color: var(--ink);
  box-shadow: inset 0 -1px 0 rgba(114,231,242,.6), 0 12px 30px -18px rgba(114,231,242,.7);
  transition: border-color .5s, box-shadow .5s; animation: rise 1.2s both;
}
.cta:hover, .cta:focus-visible { border-color: var(--gold); outline: none; box-shadow: inset 0 -1px 0 var(--gold), 0 14px 40px -14px rgba(114,231,242,.9); }
.ghost { background: none; border: 0; padding: 8px 0; cursor: pointer; color: var(--ink-faint); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; }
.ghost:hover, .ghost:focus-visible { color: var(--ink); outline: none; }

/* ---------- live pulse (right) ---------- */
.label { display: flex; align-items: center; gap: 12px; margin: 0 0 1.8vh; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.liveDot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); animation: live 2.2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(114,231,242,.55); } 70% { box-shadow: 0 0 0 9px rgba(114,231,242,0); } 100% { box-shadow: 0 0 0 0 rgba(114,231,242,0); } }
.duel { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.pulse { opacity: .9; }
.bigNumber { font-family: var(--serif); font-weight: 400; line-height: .95; font-size: clamp(30px, calc(var(--u) * 3.1), 54px); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); transition: color 1.2s, text-shadow 1.2s; }
.bigNumber.bump { color: #e8fbff; text-shadow: 0 0 28px rgba(114,231,242,.7); }
.spoiled .bigNumber { color: var(--ember); text-shadow: 0 0 26px rgba(138,114,255,.45); }
.spoiled .bigNumber.bump { color: #c4b8ff; text-shadow: 0 0 28px rgba(138,114,255,.8); }
.bigLabel { margin-top: .8vh; font-size: clamp(12px, calc(var(--u) * 1), 14px); line-height: 1.4; color: var(--ink-faint); }
.minor { display: grid; gap: 1.4vh; margin: 2.6vh 0 0; padding-top: 1.8vh; border-top: 1px solid var(--rule); }
.minor div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.minor dt { font-size: 10px; line-height: 1.4; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.minor dd { margin: 0; flex: none; font-family: var(--serif); font-size: clamp(16px, calc(var(--u) * 1.4), 21px); font-variant-numeric: lining-nums tabular-nums; color: var(--ink-soft); }
.minor div.sp dd { color: var(--ember); }
.spoiled .bigLabel { color: var(--ink-soft); }
.ratio { margin: 2vh 0 .9vh; height: 2px; background: linear-gradient(90deg, rgba(114,231,242,.9), rgba(114,231,242,.35)); box-shadow: 0 0 12px rgba(114,231,242,.35); position: relative; overflow: hidden; }
.ratio span { position: absolute; right: 0; top: 0; bottom: 0; width: 0; background: var(--ember); transition: width 2.4s cubic-bezier(.2,.7,.2,1); }
.ratioText { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(16px, calc(var(--u) * 1.45), 21px); color: #d6e2e8; min-height: 1.3em; }
.smallStats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6vh 16px; margin-top: 2.4vh; }
.smallStats div b { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(22px, calc(var(--u) * 2.1), 34px); line-height: 1; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.smallStats div span { display: block; margin-top: .4vh; font-size: clamp(11px, calc(var(--u) * .95), 13px); line-height: 1.35; color: var(--ink-faint); }
.clocks { display: grid; gap: 1.3vh; margin-top: 2.4vh; padding-top: 1.8vh; border-top: 1px dashed var(--rule); }
.clocks div span { display: block; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.clocks div b { display: block; margin-top: .3vh; font-family: var(--serif); font-weight: 400; font-size: clamp(18px, calc(var(--u) * 1.6), 26px); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.clocks div.hot b { color: var(--ember); }
.flash { margin: 1.6vh 0 0; min-height: 1.3em; font-family: var(--serif); font-style: italic; font-size: clamp(15px, calc(var(--u) * 1.3), 19px); color: var(--ember); }
.flash.show { animation: rise 1.2s both; }

/* ---------- bottom: your WY + meta ---------- */
.bottom { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: center; margin: 0 var(--gutter); padding: 1.6vh 0 clamp(12px, 2.2vh, 22px); border-top: 1px solid var(--rule); }
.yours { display: grid; grid-template-columns: auto 1fr auto; gap: 0 28px; align-items: center; }
.yours .label { margin: 0; }
.facts { display: grid; grid-template-columns: repeat(5, auto); gap: 4px 30px; margin: 0; justify-content: start; }
.facts div dt { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; }
.facts div dd { margin: 3px 0 0; font-family: var(--serif); font-size: clamp(17px, calc(var(--u) * 1.55), 24px); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.facts div.bad dd { color: var(--ember); }
.stages { display: flex; align-items: center; gap: 8px; }
.stages figure { margin: 0; text-align: center; }
.stages canvas, .stages .unknown { display: block; width: clamp(48px, 6.4vh, 72px); height: clamp(48px, 6.4vh, 72px); }
.stages figcaption { margin-top: 3px; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); white-space: nowrap; }
.stages .arrow { color: var(--gold-soft); font-size: 13px; }
.unknown { display: grid !important; place-items: center; font-family: var(--serif); font-style: italic; font-size: 26px; color: rgba(114,231,242,.42); border: 1px dashed rgba(114,231,242,.2); border-radius: 50%; }
.meta { text-align: end; }
.footerLine { margin: 0; font-family: var(--serif); font-style: italic; font-size: clamp(14px, calc(var(--u) * 1.25), 18px); color: var(--ink-soft); }
.presence { margin: 4px 0 0; font-size: 11px; letter-spacing: .1em; color: var(--ink-faint); font-variant-numeric: lining-nums tabular-nums; }
.presence.long { color: var(--ember); }

.tabs { display: none; }

/* ---------- rules overlay ---------- */
.rules { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 24px; background: rgba(4, 7, 12, .975); animation: fadeIn .5s both; }
.rulesInner { position: relative; width: min(1080px, 100%); max-height: 100%; overflow-y: auto; padding: 8px 4px; }
.closeBtn { position: absolute; top: 0; inset-inline-end: 0; background: none; border: 1px solid var(--rule); padding: 8px 14px; cursor: pointer; font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-soft); }
.closeBtn:hover, .closeBtn:focus-visible { border-color: var(--gold); color: var(--gold); outline: none; }
.ruleList { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4vh 40px; counter-reset: r; }
.ruleList li { counter-increment: r; font-size: clamp(15px, calc(var(--u) * 1.3), 18px); line-height: 1.5; color: var(--ink-soft); }
.ruleList li::before { content: counter(r, upper-roman); display: block; margin-bottom: 6px; font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--gold); }
.ruleList li strong { display: block; font-weight: 400; font-family: var(--serif); font-size: clamp(20px, calc(var(--u) * 1.9), 26px); line-height: 1.2; color: var(--ink); margin-bottom: 4px; }
.rulesCoda { margin: 4vh 0 0; font-family: var(--serif); font-style: italic; font-size: 22px; color: #d6e2e8; }

/* ---------- leave overlay ---------- */
.leave { position: fixed; inset: 0; z-index: 30; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; background: rgba(4, 7, 12, .96); animation: fadeIn 2.4s both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.leaveBig { margin: 0; font-family: var(--serif); font-size: clamp(36px, 6vw, 92px); letter-spacing: .06em; text-transform: uppercase; }
.leaveSmall { margin: 0; max-width: 560px; font-family: var(--serif); font-style: italic; font-size: clamp(19px, 2vw, 28px); color: #d6e2e8; }

/* ---------- short laptop screens (e.g. 1366×768): tighter vertical rhythm ---------- */
@media (min-width: 861px) and (max-height: 820px) {
  .top { padding-top: 12px; padding-bottom: 6px; }
  .label { margin-bottom: 1.2vh; }
  .bigLabel { margin-top: .5vh; font-size: 12px; }
  .ratio { margin: 1.4vh 0 .6vh; }
  .smallStats { margin-top: 1.6vh; gap: 1.1vh 14px; }
  .smallStats div span { font-size: 11px; }
  .clocks { margin-top: 1.6vh; padding-top: 1.2vh; gap: .9vh; }
  .clocks div b { font-size: 19px; }
  .flash { margin-top: 1vh; font-size: 15px; }
  .bottom { padding-top: 1.1vh; padding-bottom: 10px; }
}

/* ---------- medium screens: tighten the bottom bar ---------- */
@media (max-width: 1280px) {
  .facts { grid-template-columns: repeat(3, auto); }
  .footerLine { display: none; }
}

/* ---------- phone & small tablet: one panel at a time ---------- */
@media (max-width: 860px) {
  :root { --gutter: 18px; }
  .top { gap: 12px; padding-top: max(12px, env(safe-area-inset-top)); }
  .logo { font-size: 20px; }
  .ticker { font-size: 10px; letter-spacing: .1em; padding-left: 12px; white-space: normal; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .rulesBtn { display: none; }
  .bottom { display: none; }

  /* The artwork is drawn in the top ~36% of the stage; panels fill the rest. */
  .stage { display: block; position: relative; padding: 0; }
  /* align/justify-self: stretch — modern browsers apply the desktop
     "align-self: center" to absolutely positioned boxes too. */
  .panel { position: absolute; left: 0; right: 0; bottom: 0; align-self: stretch; justify-self: stretch; padding: 0 var(--gutter) 12px; overflow-y: auto; -webkit-overflow-scrolling: touch; display: none; }
  .story { top: 36%; }
  .pulse, .yours { top: 0; padding-top: 16px; background: linear-gradient(180deg, rgba(7, 12, 20, .9), rgba(7, 12, 20, .96)); }
  /* The artwork only stays bright on the story tab. */
  .heroCanvas { transition: opacity .6s ease; }
  .app:not([data-tab="story"]) .heroCanvas { opacity: .18; }
  .app[data-tab="story"] .story,
  .app[data-tab="pulse"] .pulse,
  .app[data-tab="yours"] .yours { display: block; }

  .eyebrow { font-size: 10px; letter-spacing: .24em; margin-bottom: 8px; }
  .headline { font-size: clamp(26px, 8vw, 38px); letter-spacing: .015em; line-height: 1.1; }
  .shortRule { margin: 14px 0 12px; }
  .lines p { font-size: 16px; margin-bottom: 6px; }
  .lines p.italic { font-size: 19px; }
  .lines p.counter { font-size: clamp(24px, 7.4vw, 32px); }
  .actions { margin-top: 14px; }
  .cta { width: 100%; justify-content: space-between; padding: 15px 18px; gap: 12px; letter-spacing: .18em; font-size: 12px; }

  .label { margin-bottom: 14px; }
  .bigNumber { font-size: clamp(44px, 13vw, 64px); }
  .bigLabel { font-size: 14px; }
  .ratio { margin-top: 16px; }
  .ratioText, .flash { font-size: 18px; }
  .smallStats { margin-top: 18px; gap: 14px; }
  .smallStats div b { font-size: 26px; }
  .smallStats div span { font-size: 12px; }
  .clocks { margin-top: 18px; padding-top: 14px; gap: 10px; }
  .clocks div b { font-size: 21px; }

  .yours .label { margin-bottom: 16px; }
  .facts { grid-template-columns: 1fr 1fr; gap: 16px 14px; }
  .facts div dt { white-space: normal; }
  .facts div dd { font-size: 24px; white-space: normal; }
  .stages { margin-top: 24px; justify-content: center; }
  .stages canvas, .stages .unknown { width: 76px; height: 76px; }

  .tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); background: rgba(5, 8, 13, .94); padding-bottom: env(safe-area-inset-bottom); }
  .tabs button { position: relative; background: none; border: 0; padding: 15px 2px 14px; cursor: pointer; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
  .tabs button[aria-selected="true"] { color: var(--gold); box-shadow: inset 0 2px 0 var(--gold); }
  .tabs button.ping::after { content: ''; position: absolute; top: 8px; right: 12%; width: 6px; height: 6px; border-radius: 50%; background: var(--ember); }

  .ruleList { grid-template-columns: 1fr; gap: 22px; margin-top: 44px; }
  .rules { place-items: start center; padding: max(18px, env(safe-area-inset-top)) 18px 18px; }
}

/* short phones (e.g. 360×740): give the story more room, the artwork less */
@media (max-width: 860px) and (max-height: 780px) {
  .top { padding-bottom: 6px; }
  .story { top: 30%; }
  .eyebrow { margin-bottom: 4px; }
  .headline { font-size: clamp(24px, 7.2vw, 32px); }
  .shortRule { margin: 10px 0 8px; }
  .lines p { font-size: 15px; line-height: 1.42; margin-bottom: 4px; }
  .lines p.italic { font-size: 17px; }
  .lines p.counter { font-size: 24px; }
  .actions { margin-top: 10px; min-height: 0; }
  .cta { padding: 13px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- language selector ---------- */
.lang { position: relative; flex: none; display: inline-flex; align-items: center; border: 1px solid var(--rule); color: var(--ink-soft); cursor: pointer; transition: border-color .4s; }
.lang:hover, .lang:focus-within { border-color: var(--gold); color: var(--gold); }
.langCode { padding: 9px 12px; font-size: 11px; letter-spacing: .2em; pointer-events: none; }
.lang select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.lang:focus-within { outline: 1px solid var(--gold); outline-offset: 2px; }

/* ---------- accessibility ---------- */
:focus-visible { outline: 1px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- RTL (structure ready; no RTL translation is shipped yet) ---------- */
[dir="rtl"] .ratio span { right: auto; left: 0; }
[dir="rtl"] .cta svg { transform: scaleX(-1); }

@media (max-width: 860px) {
  .langCode { padding: 7px 9px; font-size: 10px; letter-spacing: .14em; }
}

/* ---------- rare encounter (SYNCHRONY) — an overlay inside the work's space, never a toast ---------- */
.enc { position: fixed; z-index: 15; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); display: flex; animation: encIn 1.1s cubic-bezier(.2,.7,.2,1) both; }
.enc.min { top: auto; bottom: 24px; transform: translateX(-50%); width: auto; }
@keyframes encIn { from { opacity: 0; transform: translate(-50%, -44%); filter: blur(6px); } to { opacity: 1; transform: translate(-50%, -50%); filter: none; } }
/* the open room docks beside the work (over the live column) so the WY stays visible */
@media (min-width: 861px) {
  .enc[data-view="room"] { left: auto; right: var(--gutter); top: 72px; bottom: 20px; transform: none; width: min(420px, 31vw); max-height: none; animation-name: encSide; }
  @keyframes encSide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
  .enc[data-view="room"] .encCard { display: flex; flex-direction: column; }
  .enc[data-view="room"] .encLog { flex: 1 1 auto; height: auto; min-height: 120px; }
}
.encCard { position: relative; width: 100%; min-height: 0; max-height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 26px 26px 22px; background: linear-gradient(160deg, rgb(9,30,37), rgb(5,9,14) 55%); border: 1px solid var(--rule); box-shadow: 0 30px 90px -30px rgba(114,231,242,.35), inset 0 0 0 1px rgba(138,114,255,.08); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.encCard::before { content: ''; position: absolute; inset: -1px; pointer-events: none; border-top: 1px solid rgba(156,247,255,.45); border-left: 1px solid rgba(138,114,255,.25); clip-path: polygon(0 0, 38% 0, 0 30%); }
.encEyebrow { margin: 0 0 12px; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); }
.encBig { margin: 0 0 14px; font-family: var(--serif); font-weight: 500; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.08; color: var(--ink); outline: none; }
.encLine { margin: 0 0 6px; font-size: 17px; line-height: 1.4; color: var(--ink-soft); }
.encLine.dim, .encSmall { color: var(--ink-faint); }
.encSmall { margin: 10px 0 0; font-size: 13.5px; line-height: 1.45; }
.encSmall a { color: var(--gold); }
.encAsk { margin: 18px 0 0; font-size: 17px; font-style: italic; color: var(--ink); }
.encWarn { margin: 8px 0 0; min-height: 1em; font-size: 13.5px; color: #c9b8ff; }
.encRow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.encBtn { min-height: 42px; padding: 0 18px; background: transparent; border: 1px solid var(--rule); color: var(--ink); font-size: 12px; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; }
.encBtn.primary { border-color: var(--gold-soft); color: var(--ice); }
.encBtn.chosen { border-color: var(--ember); color: #c9b8ff; }
.encBtn:hover, .encBtn:focus-visible { border-color: var(--gold); color: var(--gold); outline: none; }
.encBtn.danger:hover, .encBtn.danger:focus-visible { border-color: var(--ember); color: #c9b8ff; }
.encBtn.link { min-height: 32px; padding: 0 2px; border: none; letter-spacing: .12em; font-size: 11px; color: var(--ink-faint); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule); }
.encBtn.pill { min-height: 38px; background: rgba(4,7,11,.85); border-color: var(--ember); color: #c9b8ff; backdrop-filter: blur(10px); }
.encCheck { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 0; font-size: 15px; line-height: 1.35; color: var(--ink-soft); cursor: pointer; }
.encCheck input { margin-top: 3px; accent-color: var(--gold); }
.encAsks { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--rule); }
.encHuman { margin-top: 10px; min-height: 66px; }
.enc[data-view="room"] .encWyStage { width: 132px; }
.encRoomHead { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.encRoomHead .peer.here { color: var(--gold); }
.encLog { height: min(30vh, 260px); overflow-y: auto; overscroll-behavior: contain; padding: 12px 0; display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: 82%; padding: 8px 12px; font-size: 16px; line-height: 1.35; white-space: pre-wrap; overflow-wrap: anywhere; border: 1px solid var(--rule); }
.msg.mine { align-self: flex-end; border-color: rgba(114,231,242,.3); background: rgba(10,47,56,.35); }
.msg.theirs { align-self: flex-start; border-color: rgba(138,114,255,.3); background: rgba(138,114,255,.06); }
.msg.contact .k { color: var(--gold); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.encForm { display: flex; gap: 8px; margin-top: 6px; }
.encForm input { flex: 1; min-width: 0; min-height: 42px; padding: 0 12px; background: rgba(4,7,11,.7); border: 1px solid var(--rule); color: var(--ink); font: inherit; font-size: 16px; }
.encForm input:focus-visible { outline: none; border-color: var(--gold); }
.encTools { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; }
.encCats { border: none; padding: 0; margin: 8px 0 0; }
.encNote { width: 100%; margin-top: 12px; padding: 10px; background: rgba(4,7,11,.7); border: 1px solid var(--rule); color: var(--ink); font: inherit; font-size: 15px; resize: vertical; }
.encWy { margin: 14px 0 0; }
.encWyStage { position: relative; width: min(200px, 56vw); aspect-ratio: 1; border: 1px solid var(--rule); background: var(--bg); }
.encWyStage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.encWyStage.together img { mix-blend-mode: screen; }
.encWyStage:not(.together) img.mine { display: none; }
.encVideo { margin-top: 12px; }
.encVStage { position: relative; aspect-ratio: 4 / 3; background: #000; border: 1px solid var(--rule); overflow: hidden; }
.encVStage video { pointer-events: none; }
.encVStage .remote { width: 100%; height: 100%; object-fit: cover; }
.encVStage .local { position: absolute; right: 8px; bottom: 8px; width: 28%; border: 1px solid var(--rule); }
.encMark { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; transform: rotate(-24deg); font-size: 13px; letter-spacing: .3em; color: rgba(214,226,232,.13); text-transform: uppercase; white-space: nowrap; }
.encLights { margin: 8px 0 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.encQ { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--rule); }
.encQ .encAsk { margin-top: 8px; }
.encQn { margin-top: 4px; letter-spacing: .2em; }
.encQ .link { margin-top: 12px; }
.encResult { margin: 0; font-family: var(--serif); font-size: clamp(22px, 2.2vw, 28px); letter-spacing: .08em; color: var(--gold); }
.encThread { letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.encRoomHead .thread { color: var(--gold); }
.encTranslate, .encEntry { overflow-wrap: anywhere; }
.encCheck.off { cursor: default; color: var(--ink-faint); }
.encKeep .encBtn { white-space: normal; text-align: start; line-height: 1.3; padding-top: 8px; padding-bottom: 8px; }
.lines p.after { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-faint); }
.encSettings { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--rule); max-width: 560px; }
@media (max-width: 860px) {
  .enc { top: auto; bottom: 0; transform: none; left: 0; width: 100%; max-height: 88dvh; animation-name: encUp; }
  .enc.min { left: 50%; bottom: calc(72px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: auto; }
  @keyframes encUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  .encCard { padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); border-left: none; border-right: none; border-bottom: none; }
  .encLog { height: 30dvh; }
}
@media (prefers-reduced-motion: reduce) { .enc { animation: none; } }
/* rules dialog: recovery + reading pages */
.recover { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--rule); max-width: 560px; }
.recoverText { margin: 6px 0 10px; font-size: 15px; line-height: 1.45; color: var(--ink-faint); }
.recoverRow { display: flex; gap: 8px; flex-wrap: wrap; }
.recoverRow input { flex: 1 1 220px; min-height: 42px; padding: 0 12px; background: rgba(4,7,11,.7); border: 1px solid var(--rule); color: var(--ink); font: inherit; font-size: 16px; }
.recoverRow input:focus-visible { outline: none; border-color: var(--gold); }
.recoverStatus { min-height: 1.2em; margin: 8px 0 0; font-size: 14px; color: var(--gold); }
.rulesNav { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; }
.rulesNav a { color: var(--ink-faint); text-decoration: none; }
.rulesNav a:hover, .rulesNav a:focus-visible { color: var(--gold); outline: none; }

/* ---------- header navigation: WY.WORLD is never hidden ---------- */
.topNav { flex: none; display: flex; align-items: center; gap: clamp(14px, 1.8vw, 28px); }
.topNav a { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; text-decoration: none; color: var(--ink-soft); transition: color .4s; white-space: nowrap; }
.topNav a:hover, .topNav a:focus-visible { color: var(--gold); outline: none; }
.navWorld { position: relative; color: var(--ink) !important; padding-bottom: 3px; }
.navWorld::after { content: ''; position: absolute; left: 0; right: .26em; bottom: -2px; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); opacity: .7; }
@media (max-width: 1280px) { .topNav .navMore { display: none; } }
@media (max-width: 860px) { .topNav a { font-size: 10px; letter-spacing: .2em; } }

/* ---------- the quiet invitation to WY.WORLD (pulse panel) ---------- */
.worldCta { display: inline-flex; flex-direction: column; gap: 4px; margin-top: 2.2vh; text-decoration: none; color: var(--ink-soft); }
.worldCtaText { font-size: 11px; letter-spacing: .28em; color: var(--gold); transition: letter-spacing .6s, color .4s; }
.worldCtaSub { font-family: var(--serif); font-style: italic; font-size: clamp(13px, calc(var(--u) * 1.1), 16px); color: var(--ink-faint, rgba(214, 226, 232, .55)); }
.worldCta:hover .worldCtaText, .worldCta:focus-visible .worldCtaText { letter-spacing: .34em; color: var(--ink); }
.worldCta:focus-visible { outline: 1px solid var(--gold); outline-offset: 4px; }

/* ---------- language button + picker ---------- */
button.lang { background: none; font: inherit; padding: 0; }
.lang:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }
.lp { position: fixed; inset: 0; z-index: 60; background: rgba(2, 5, 8, .35); }
.lp.hidden { display: none; }
.lpBox { position: absolute; width: 300px; max-height: min(70vh, 560px); display: flex; flex-direction: column; padding: 14px 0 8px; background: rgba(5, 12, 16, .96); border: 1px solid var(--rule); box-shadow: 0 24px 60px rgba(0, 0, 0, .6); backdrop-filter: blur(10px); }
.lpTitle { margin: 0 18px 10px; font-size: 10px; letter-spacing: .3em; text-transform: uppercase; color: var(--ink-soft); }
.lpSearch { margin: 0 14px 8px; padding: 9px 12px; background: transparent; border: 1px solid var(--rule); color: var(--ink); font: inherit; font-size: 15px; outline: none; }
.lpSearch:focus { border-color: var(--gold); }
.lpList { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
.lpList li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 18px; cursor: pointer; font-family: var(--serif); font-size: 18px; color: var(--ink-soft); }
.lpList li[hidden] { display: none; }
.lpList li.on, .lpList li:hover { background: rgba(114, 231, 242, .07); color: var(--ink); }
.lpList li[aria-selected="true"] { color: var(--gold); }
.lpList li[aria-selected="true"] .lpNative::after { content: ' ✓'; font-size: 14px; }
.lpCode { font-family: inherit; font-size: 10px; letter-spacing: .2em; color: var(--ink-faint, rgba(214, 226, 232, .45)); }
.lpEmpty { margin: 8px 18px; font-size: 14px; font-style: italic; color: var(--ink-soft); }
.lpEmpty.hidden { display: none; }
@media (max-width: 760px) {
  .lpBox { left: 0 !important; right: 0 !important; top: auto !important; bottom: 0; width: auto; max-height: 82vh; padding-bottom: calc(10px + env(safe-area-inset-bottom)); border-left: 0; border-right: 0; border-bottom: 0; }
  .lpList li { padding: 12px 22px; font-size: 19px; }
}

/* ---------- first entry: the mystery gate (before a browser has a WY) ---------- */
/* While it is open, nothing of the normal page is shown — only the language button stays reachable. */
body.gated .app > *:not(.top), body.gated .top > *:not(.lang) { visibility: hidden; }
body.gated .top { position: relative; z-index: 45; }
body.gated .top .lang { visibility: visible; }
.gate { position: fixed; inset: 0; z-index: 40; overflow-y: auto; background: #000; color: var(--ink); transition: opacity .9s ease; }
.gate.hidden { display: none; }
.gate [hidden] { display: none !important; } /* blocks with their own display (flex) must still honour hidden */
.gate.out { opacity: 0; pointer-events: none; }
.gateAmb { position: fixed; inset: -20%; pointer-events: none; background: radial-gradient(closest-side at 50% 42%, rgba(70, 150, 170, .10), transparent 70%); animation: gateBreath 9s ease-in-out infinite; }
@keyframes gateBreath { 0%, 100% { opacity: .55; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
.gateInner { position: relative; min-height: 100%; max-width: 640px; margin: 0 auto; padding: max(96px, 14vh) 24px 64px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.gateQ { margin: 0; font-family: var(--serif); font-weight: 300; font-size: clamp(110px, 22vw, 200px); line-height: .9; color: rgba(214, 226, 232, .9); animation: fadeIn 3s both; }
.gateTitle { margin: 4vh 0 3vh; font-family: var(--serif); font-size: clamp(17px, 2.2vw, 22px); letter-spacing: .32em; text-wrap: balance; opacity: 0; transition: opacity 2s ease 1s; }
.gateTitle.on { opacity: 1; }
.gateLines { display: flex; flex-direction: column; gap: 10px; }
.gateLines .gl { margin: 0; font-family: var(--serif); font-size: clamp(17px, 1.9vw, 21px); line-height: 1.45; color: rgba(214, 226, 232, .78); text-wrap: balance; opacity: 0; transform: translateY(6px); transition: opacity 1.6s ease, transform 1.6s ease; }
.gateLines .gl.on { opacity: 1; transform: none; }
.gateLines .gl.then, .gateLines .gl.memory { margin-top: 18px; }
.gateLines .gl.then, .gateLines .gl.unique { color: var(--ink); font-style: italic; }
.gateLines .gl.last { margin-bottom: 8px; }
.gateAsk { margin-top: 5vh; display: flex; flex-direction: column; align-items: center; gap: 14px; opacity: 0; transition: opacity 1.8s ease; }
.gateAsk.on { opacity: 1; }
.gateAskQ { margin: 0 0 6px; font-family: var(--serif); font-size: clamp(18px, 2.3vw, 24px); letter-spacing: .26em; text-wrap: balance; }
.gateBtns { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.gateBtns button { min-width: 132px; padding: 14px 26px; background: none; color: var(--ink); font: inherit; font-size: 13px; letter-spacing: .3em; cursor: pointer; border: 1px solid rgba(214, 226, 232, .35); transition: border-color .4s, color .4s, box-shadow .4s; }
.gateBtns .gateYes { border-color: var(--gold); color: var(--gold); }
.gateBtns button:hover, .gateBtns button:focus-visible { outline: none; border-color: var(--ink); color: var(--ink); box-shadow: 0 0 24px rgba(114, 231, 242, .18); }
.gateBtns button:disabled { opacity: .45; cursor: default; }
.gateStatus { margin: 0; min-height: 1.2em; font-size: 14px; color: var(--ember); }
.gateNote { margin: 0; max-width: 34em; font-size: 14px; line-height: 1.55; color: rgba(214, 226, 232, .56); text-wrap: balance; }
.gateLegal { margin: 6px 0 0; font-size: 13px; letter-spacing: .06em; color: rgba(214, 226, 232, .45); }
.gateLegal a { color: rgba(214, 226, 232, .7); }
.gateSkip { margin-top: 6vh; background: none; border: none; font: inherit; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: rgba(214, 226, 232, .4); cursor: pointer; }
.gateSkip:hover, .gateSkip:focus-visible { color: var(--ink); outline: none; }
/* the birth moment */
.gate.birth .gateInner { padding-top: max(64px, 9vh); }
.gateBirth { width: 100%; display: flex; flex-direction: column; align-items: center; }
.gateBirthLines { display: flex; flex-direction: column; gap: 14px; min-height: 9em; }
.gateBirthLines .bl { margin: 0; font-family: var(--serif); opacity: 0; transition: opacity 1.8s ease; text-wrap: balance; }
.gateBirthLines .bl.on { opacity: 1; }
.gateBirthLines .b0, .gateBirthLines .b1 { font-size: clamp(22px, 3.4vw, 36px); letter-spacing: .24em; }
.gateBirthLines .b2 { font-size: clamp(17px, 2vw, 21px); font-style: italic; color: rgba(214, 226, 232, .8); }
.gateWorld { position: relative; width: min(560px, 92vw); aspect-ratio: 1; margin: 2vh 0 0;
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 71%); mask-image: radial-gradient(circle at 50% 50%, #000 52%, transparent 71%); } /* no hard square: the view dissolves into the dark */
.gateWorld canvas { width: 100%; height: 100%; display: block; }
.gateYoursTag { position: absolute; width: 0; height: 0; pointer-events: none; }
.gateYoursTag::after { content: ''; position: absolute; left: -26px; top: -26px; width: 52px; height: 52px; border: 1px solid rgba(255, 216, 154, .7); border-radius: 50%; opacity: 0; transition: opacity 1.4s ease; }
.gateYoursTag.on::after { opacity: 1; }
.gateYours { margin: 1vh 0 0; font-family: var(--serif); font-size: clamp(18px, 2.4vw, 24px); letter-spacing: .3em; color: #ffd89a; opacity: 0; transition: opacity 2s ease 1.2s; }
.gateYours.on { opacity: 1; }
.gateYoursSmall { margin: 10px 0 0; max-width: 30em; font-size: 14px; color: rgba(214, 226, 232, .6); text-wrap: balance; }
.gateCont { margin-top: 3vh; background: none; border: 1px solid rgba(214, 226, 232, .35); padding: 12px 26px; color: var(--ink); font: inherit; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; cursor: pointer; }
.gateCont:hover, .gateCont:focus-visible { outline: none; border-color: var(--gold); color: var(--gold); }
@media (prefers-reduced-motion: reduce) { .gateAmb, .gateQ { animation: none; } .gateLines .gl, .gateAsk, .gateTitle, .gateBirthLines .bl, .gateYours { transition: none; } }

/* ---------- FIRST ARRIVAL (v2/arrival.js): fullscreen WORLD → find your light → consent → WY BEING ----------
   Mobile first: the globe dominates the top, the words and buttons sit at the bottom (thumb reach).
   ≥ 48 px tap targets, body ≥ 16 px, nothing smaller than 13 px. Desktop: words on the left. */
body.arriving { overflow: hidden; }
.arr { position: fixed; inset: 0; z-index: 45; overflow: hidden; background: radial-gradient(120% 80% at 50% 30%, #071722 0%, #02060a 55%, #000 100%); color: var(--ink); font-family: var(--text); transition: opacity .9s ease; }
.arr.out { opacity: 0; pointer-events: none; }
.arrGlobe, .arrBeing { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.arrGlobe { touch-action: none; cursor: grab; transition: opacity 2.2s ease, filter 2.2s ease; }
.arr[data-stage="find"] .arrGlobe { cursor: crosshair; }
.arrBeing { opacity: 0; pointer-events: none; transition: opacity 2.6s ease; }
.arr.beingOn .arrGlobe { opacity: .12; filter: blur(2px); }
.arr.beingOn .arrBeing { opacity: 1; }
.arr.goneOut .arrGlobe, .arr.goneOut .arrBeing, .arr.goneOut .arrTop { opacity: 0; transition: opacity 2.4s ease; }
.arrTop { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; padding: max(14px, env(safe-area-inset-top)) 16px 0; pointer-events: none; }
.arrLogo { font-family: var(--serif); font-weight: 500; font-size: 22px; letter-spacing: .14em; color: #eaf6fa; }
.arrTag { font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-faint); }
.arrCopy { position: absolute; left: 0; right: 0; bottom: 0; padding: 56px 16px max(20px, env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(0,0,0,.88) 0%, rgba(0,0,0,.62) 58%, transparent 100%); }
.arr[data-stage="find"] .arrCopy { pointer-events: none; }
.arrLines { min-height: 0; }
.arrLines .al { margin: 0 0 8px; font-family: var(--serif); font-size: 20px; line-height: 1.22; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); opacity: 0; transform: translateY(6px); transition: opacity 1.1s ease, transform 1.1s ease; }
.arrLines .al.on { opacity: 1; transform: none; }
.arrLines .al.big { font-size: clamp(26px, 7.4vw, 56px); line-height: 1.08; color: #eef8fb; }
.arrLines .al.strong { color: #fff; font-weight: 600; text-shadow: 0 0 24px rgba(114, 231, 242, .35); }
.arrLines .al.huge { font-size: clamp(56px, 18vw, 150px); line-height: 1; letter-spacing: .12em; color: #fff; font-weight: 500; }
.arrLines .al.small { font-family: var(--text); font-size: 17px; text-transform: none; letter-spacing: .02em; color: var(--ink-faint); margin-top: 14px; }
.arrRemember .al { opacity: 1; transform: none; }
.arrActs { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.arrBtn { min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid rgba(114, 231, 242, .45); background: rgba(4, 12, 18, .55); color: #eaf6fa; font: 600 15px/1 var(--text); letter-spacing: .22em; text-transform: uppercase; cursor: pointer; }
.arrBtn.primary { border-color: rgba(156, 247, 255, .9); background: linear-gradient(90deg, rgba(98, 230, 210, .16), rgba(138, 114, 255, .2)); box-shadow: 0 0 0 1px rgba(156, 247, 255, .25), 0 0 34px rgba(114, 231, 242, .35), inset 0 0 24px rgba(138, 114, 255, .22); }
.arrBtn.link { min-height: 48px; border: none; background: none; letter-spacing: .14em; color: var(--ink-faint); text-decoration: underline; text-underline-offset: 5px; }
.arrBtn:disabled { opacity: .5; cursor: default; }
.arrBtn:focus-visible, .arr a:focus-visible, .arrSkip:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
.arrStatus { min-height: 1em; margin: 0; font-size: 16px; color: #c9b8ff; }
.arrNote { margin: 0; font-size: 16px; line-height: 1.45; color: var(--ink-faint); }
.arrLegal { margin: 2px 0 0; font-size: 16px; }
.arrLegal a { display: inline-block; padding: 12px 2px; color: var(--ink-soft); }
.arrHint { position: absolute; left: 16px; right: 16px; bottom: max(28px, env(safe-area-inset-bottom)); margin: 0; text-align: center; font-family: var(--serif); font-size: 20px; letter-spacing: .08em; text-transform: uppercase; color: #eaf6fa; text-shadow: 0 0 18px #000, 0 0 4px #000; opacity: 0; transition: opacity 1s ease; pointer-events: none; }
.arrHint.on { opacity: 1; }
.arrSkip { position: absolute; right: 12px; top: max(10px, env(safe-area-inset-top)); min-height: 44px; min-width: 44px; padding: 0 14px; border: none; background: none; color: var(--ink-faint); font: 15px var(--text); letter-spacing: .14em; text-transform: uppercase; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.arr [hidden] { display: none !important; }
.arr[data-stage="consent"] .arrCopy { max-height: 78dvh; overflow-y: auto; }
.arr[data-stage="gone"] .arrCopy { top: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; background: none; }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .arrTop { padding: 26px 40px 0; gap: 34px; }
  .arrLogo { font-size: 30px; }
  .arrTag { font-size: 14px; }
  .arrCopy { left: 0; right: auto; top: 0; bottom: 0; width: min(560px, 44vw); padding: 0 0 0 clamp(28px, 4vw, 64px); display: flex; flex-direction: column; justify-content: center; background: linear-gradient(to right, rgba(0,0,0,.82), rgba(0,0,0,.45) 70%, transparent); }
  .arrActs { align-items: flex-start; }
  .arrBtn { min-width: 300px; }
  .arrLines .al { font-size: 22px; }
  .arr[data-stage="consent"] .arrCopy { max-height: none; }
  .arr.beingOn .arrCopy { width: min(620px, 46vw); }
}
@media (prefers-reduced-motion: reduce) { .arrLines .al, .arrGlobe, .arrBeing, .arr { transition: none; } }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) { .arrBeing { left: 34%; width: 66%; } }
@media (max-aspect-ratio: 4/5) { .arrBeing { height: 66%; } }
/* the Being never rises into the header: its canvas starts below the brand line (the figure auto-frames inside it) */
.arr.beingOn .arrBeing { top: 84px; height: calc(100% - 84px); }
@media (max-aspect-ratio: 4/5) { .arr.beingOn .arrBeing { top: calc(max(14px, env(safe-area-inset-top)) + 84px); height: calc(66% - 70px); } }
/* first arrival · YOUR WY · collision · chat: the wide geometric sans of the WY.GONE visual reference (Montserrat, self-hosted) */
.arr { --sans: 'Montserrat', 'Segoe UI', system-ui, sans-serif; font-family: var(--sans); }
.arrLogo { font-family: var(--sans); font-weight: 600; letter-spacing: .08em; font-size: 24px; color: #f2fbff; text-shadow: 0 0 18px rgba(114, 231, 242, .35); }
.arrTag { font-family: var(--sans); font-weight: 400; letter-spacing: .14em; font-size: 12.5px; color: #c7d9e2; }
.arrLines .al { font-family: var(--sans); font-weight: 300; letter-spacing: .05em; font-size: 18px; }
.arrLines .al.big { font-weight: 300; font-size: clamp(26px, 6.8vw, 54px); letter-spacing: .03em; line-height: 1.1; }
.arrLines .al.strong { font-weight: 600; color: #fff; text-shadow: 0 0 28px rgba(114, 231, 242, .45); }
.arrLines .al.huge { font-weight: 300; letter-spacing: .08em; }
.arrLines .al.gold { color: #ffcf8a; text-shadow: 0 0 30px rgba(255, 170, 80, .45); }
.arrLines .al.small { font-family: var(--sans); font-weight: 400; font-size: 16px; letter-spacing: .02em; }
.arrBtn { font-family: var(--sans); font-weight: 600; font-size: 14px; letter-spacing: .2em; }
.arrBtn.primary { border: 1.5px solid rgba(190, 160, 255, .9); background: linear-gradient(90deg, rgba(60, 200, 230, .18), rgba(140, 100, 255, .26)); box-shadow: 0 0 0 1px rgba(120, 220, 255, .35), 0 0 42px rgba(140, 110, 255, .45), 0 0 18px rgba(80, 220, 255, .35), inset 0 0 26px rgba(140, 110, 255, .25); }
.arrNote, .arrLegal, .arrStatus, .arrHint, .arrSkip { font-family: var(--sans); }
.arrHint { font-weight: 400; font-size: 17px; letter-spacing: .14em; }
.arr::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(60% 50% at 78% 18%, rgba(120, 80, 255, .10), transparent 70%), radial-gradient(50% 40% at 12% 85%, rgba(40, 160, 220, .08), transparent 70%); }
.arrTop { z-index: 2; }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .arr.beingOn .arrBeing { left: 0; width: 58%; }
  .arr.beingOn .arrCopy { left: auto; right: 0; width: min(620px, 44vw); padding: 0 clamp(28px, 4vw, 64px) 0 0; background: linear-gradient(to left, rgba(0,0,0,.7), rgba(0,0,0,.35) 70%, transparent); }
}
/* first arrival composition (visual pass 3): phone/tablet portrait — the words sit at the top under the brand, the
   globe fills the middle, the action sits at the bottom; desktop — the words a little above the optical centre */
@media (max-aspect-ratio: 4/5), (max-width: 699px) {
  .arr:not(.beingOn) .arrCopy { top: 0; bottom: 0; padding: calc(max(14px, env(safe-area-inset-top)) + 108px) 16px max(22px, env(safe-area-inset-bottom)); display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(to bottom, rgba(0,0,0,.72) 0%, rgba(0,0,0,.2) 34%, transparent 50%, transparent 72%, rgba(0,0,0,.7) 100%); pointer-events: none; }
  .arr:not(.beingOn) .arrCopy > * { pointer-events: auto; }
  .arr:not(.beingOn) .arrLines .al.big { font-size: clamp(28px, 8.4vw, 44px); }
  .arr[data-stage="consent"] .arrCopy { justify-content: flex-start; overflow-y: auto; background: rgba(0,0,0,.78); }
}
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .arr:not(.beingOn) .arrCopy { padding-bottom: 9vh; }
}

/* ---------- rare encounter, staged (approved design): YOUR WY | the moment | the other WY ----------
   A real grid, never pieces on top of each other: wide = three columns with each label under its own figure;
   phones / upright tablets = the figures in one row on top, the words below, the actions last. */
.enc.staged { --sans: 'Montserrat', 'Segoe UI', system-ui, sans-serif; position: fixed; inset: 0; left: 0; top: 0; width: auto; max-height: none; transform: none; display: block; z-index: 15; font-family: var(--sans); color: #eaf6fb; background: radial-gradient(ellipse at 50% 40%, rgba(6, 16, 24, .82), rgba(2, 4, 8, .94) 70%); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: encFade 1.2s ease both; }
@keyframes encFade { from { opacity: 0; } to { opacity: 1; } }
body:has(.enc.staged:not(.hidden)) .top { z-index: 16; }
.encBridge { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.encStage { position: absolute; inset: 0; z-index: 2; display: grid; padding: 96px clamp(16px, 3vw, 48px) 40px; gap: clamp(12px, 2vw, 32px); box-sizing: border-box; }
.encStage .fig { position: relative; display: flex; flex-direction: column; align-items: center; min-height: 0; min-width: 0; margin: 0; }
.encStage .fig canvas { flex: 1 1 auto; width: 100%; min-height: 0; }
.encStage .fig img.shared { display: none; position: absolute; left: 0; top: 0; width: 100%; height: calc(100% - 30px); object-fit: contain; user-select: none; -webkit-user-drag: none; }
.encStage .fig.r.shown canvas { visibility: hidden; }
.encStage .fig.r.shown img.shared { display: block; }
.encStage .lab { margin: 10px 0 0; font: 500 15px/1 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: #eaf6fb; text-align: center; }
.encStage .lab.dim { color: #9fb3bd; }
.encStage.flat .fig { display: none; }
.encStage .mid { display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; min-width: 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.encStage .encEyebrow { margin: 0 0 14px; font: 500 12px/1.3 var(--sans); letter-spacing: .34em; text-transform: uppercase; color: #9fdcec; }
.encStage .encBig { margin: 0; font: 300 clamp(28px, 3vw, 44px)/1.12 var(--sans); letter-spacing: .05em; text-transform: uppercase; color: #f3fbff; }
.encStage .encBig .l { display: block; }
.encStage .encBig .gold { font-weight: 500; color: #ffd08a; }
.encStage .encLine { margin: 14px 0 0; font: 400 14px/1.7 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: #b9ccd6; }
.encStage .encLine.dim { color: #9fb3bd; }
.encStage .encSmall { margin: 14px 0 0; font: 400 14px/1.5 var(--sans); letter-spacing: .03em; color: #9fb3bd; }
.encStage .encAsk { margin: 34px 0 14px; font: 500 15px/1.5 var(--sans); font-style: normal; letter-spacing: .18em; text-transform: uppercase; color: #eef8fb; }
.encStage .encWarn { font-family: var(--sans); }
.encStage .encRow { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; width: 100%; }
.encStage .encRow.acts { flex-direction: column; align-items: center; gap: 8px; }
.encStage .encBtn { min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid rgba(114, 231, 242, .45); background: rgba(4, 12, 18, .55); color: #eaf6fa; font: 600 14px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; cursor: pointer; }
.encStage .encBtn.primary { min-width: min(360px, 100%); border: 1.5px solid rgba(190, 160, 255, .9); background: linear-gradient(90deg, rgba(60, 200, 230, .18), rgba(140, 100, 255, .26)); box-shadow: 0 0 0 1px rgba(120, 220, 255, .35), 0 0 42px rgba(140, 110, 255, .45), inset 0 0 26px rgba(140, 110, 255, .25); }
.encStage .encBtn.chosen { border-color: rgba(201, 184, 255, .8); color: #c9b8ff; }
.encStage .encBtn.link { min-height: 44px; min-width: 0; padding: 0 6px; border: none; background: none; box-shadow: none; font-weight: 500; font-size: 12.5px; letter-spacing: .14em; color: #a9bcc6; text-decoration: underline; text-underline-offset: 5px; }
.encStage .encBtn:hover { border-color: #9cf7ff; color: #fff; }
.encStage .encBtn:focus-visible { outline: 2px solid #9cf7ff; outline-offset: 3px; }
.encStage .encCheck { justify-content: center; font-family: var(--sans); font-size: 15px; }
.encStage .encResult { font: 500 clamp(22px, 2.2vw, 28px)/1.2 var(--sans); letter-spacing: .12em; color: #ffd08a; }
.encStage .encThread { font-family: var(--sans); }
.encStage .seq { opacity: 0; transform: translateY(6px); transition: opacity 1.1s ease, transform 1.1s ease; }
.encStage .seq.on { opacity: 1; transform: none; }
/* questions: the question dominates, between the two WYs; no card */
.encStage.q .fig { opacity: .6; }
.encStage.q .encBig { font-size: 12px; font-weight: 500; letter-spacing: .32em; color: #9fdcec; }
.encStage.q .encLine { margin-top: 6px; font-size: 12px; }
.encStage .encQ { display: flex; flex-direction: column; align-items: center; width: 100%; margin-top: 30px; padding: 0; border: none; }
.encStage .encDots { display: flex; gap: 10px; margin-bottom: 18px; }
.encStage .encDots span { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(160, 220, 255, .7); }
.encStage .encDots span.on { background: #9cf7ff; box-shadow: 0 0 10px #9cf7ff; }
.encStage .encDots span.done { background: rgba(160, 220, 255, .45); }
.encStage .encQn { margin: 0 0 12px; font: 500 12px/1 var(--sans); letter-spacing: .3em; color: #9fdcec; }
.encStage .encQ .encAsk { margin: 0; font: 300 clamp(26px, 2.8vw, 40px)/1.15 var(--sans); letter-spacing: .05em; color: #f3fbff; }
.encStage .encRow.choices { flex-wrap: nowrap; gap: 14px; width: min(520px, 100%); margin-top: 30px; }
.encStage .encRow.choices .encBtn { flex: 1 1 0; min-width: 0; min-height: 64px; padding: 0 12px; font-size: 15px; white-space: normal; line-height: 1.2; }
.encStage .encQ .encBtn.link { margin-top: 8px; }
/* the room: the conversation between the two WYs */
.encStage.c .mid { justify-content: stretch; align-items: stretch; text-align: left; overflow: visible; }
.encStage .encRoomHead { display: block; margin: 0 0 6px; padding: 0; border: none; text-align: center; text-transform: uppercase; }
.encStage .encRoomHead .door { margin: 0; font: 500 12px/1.3 var(--sans); letter-spacing: .3em; color: #ffd08a; }
.encStage .encRoomHead .who { margin: 6px 0 0; font: 500 11px/1.3 var(--sans); letter-spacing: .22em; color: #8aa5b1; }
.encStage .encRoomHead .peer.here { color: #9cf7ff; }
.encStage .encLog { flex: 1 1 auto; height: auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; padding: 12px 2px; }
.encStage .msgRow { display: flex; flex-direction: column; gap: 4px; max-width: 78%; }
.encStage .msgRow .who { font: 500 11px/1 var(--sans); letter-spacing: .24em; color: #8aa5b1; text-transform: uppercase; }
.encStage .msg { max-width: none; align-self: auto; padding: 10px 14px; border-radius: 14px; font: 400 16.5px/1.45 var(--sans); color: #f1f9fc; background: rgba(10, 30, 40, .55); border: 1px solid rgba(114, 231, 242, .32); }
.encStage .msgRow.mine { align-self: flex-start; }
.encStage .msgRow.theirs { align-self: flex-end; align-items: flex-end; text-align: right; }
.encStage .msgRow.theirs .msg { border-color: rgba(255, 190, 110, .32); background: rgba(40, 28, 12, .4); text-align: left; }
.encStage .encSys { align-self: center; max-width: 92%; text-align: center; padding: 10px 4px; border-top: 1px solid rgba(201, 184, 255, .3); border-bottom: 1px solid rgba(201, 184, 255, .3); }
.encStage .encSys b { display: block; font: 600 14px/1.3 var(--sans); letter-spacing: .28em; color: #e5dcff; }
.encStage .encSys span { display: block; margin-top: 4px; font: 400 12.5px/1.5 var(--sans); letter-spacing: .14em; color: #c9b8ff; text-transform: uppercase; }
.encStage .encForm { position: relative; display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.encStage .encForm input { flex: 1; min-width: 0; min-height: 50px; padding: 0 16px; border-radius: 99px; border: 1px solid rgba(114, 231, 242, .3); background: rgba(4, 7, 11, .75); color: #e8f6fa; font: 16px var(--sans); }
.encStage .encForm .encBtn { min-height: 50px; min-width: 0; padding: 0 18px; }
.encStage .encForm .encBtn.more { padding: 0 14px; font-size: 12px; letter-spacing: .14em; }
.encStage .encPop { position: absolute; left: 0; bottom: 60px; display: none; width: min(340px, 100%); max-height: 60vh; overflow-y: auto; padding: 12px; border-radius: 16px; background: rgba(6, 14, 22, .97); border: 1px solid rgba(114, 231, 242, .25); box-shadow: 0 20px 60px rgba(0, 0, 0, .6); z-index: 5; text-align: left; }
.encStage .encPop.open { display: block; }
.encStage .encPop .encTools { display: grid; grid-template-columns: 1fr; gap: 6px; margin: 0; }
.encStage .encPop .encTools .encBtn { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(114, 231, 242, .2); background: none; box-shadow: none; text-decoration: none; text-align: left; font-size: 12px; letter-spacing: .14em; color: #eaf6fa; }
.encStage .encPop .encTools .encBtn.danger { color: #d9ccff; border-color: rgba(201, 184, 255, .28); }
.encStage .encPop .encSmall { margin: 10px 2px 0; font-size: 12.5px; }
.encStage .encCall:empty, .encStage .encAskBox:empty { display: none; }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .encStage { grid-template-columns: minmax(0, 1fr) minmax(360px, 520px) minmax(0, 1fr); grid-template-areas: "l c r"; }
  .encStage.c { grid-template-columns: minmax(0, 1fr) minmax(420px, 600px) minmax(0, 1fr); }
  .encStage.col .mid { justify-content: flex-end; padding-bottom: 4vh; }
  .encStage .fig.l { grid-area: l; }
  .encStage .fig.r { grid-area: r; }
  .encStage .mid { grid-area: c; }
}
@media (max-width: 899px), (max-aspect-ratio: 1/1) {
  .encStage { padding: 84px 16px max(18px, env(safe-area-inset-bottom)); gap: 10px; grid-template-columns: 1fr 1fr; grid-template-rows: minmax(0, 30vh) minmax(0, 1fr); grid-template-areas: "l r" "c c"; }
  .encStage .fig.l { grid-area: l; }
  .encStage .fig.r { grid-area: r; }
  .encStage .mid { grid-area: c; justify-content: flex-start; padding-top: 6px; }
  .encStage .lab { font-size: 12px; letter-spacing: .22em; margin-top: 6px; }
  .encStage .encBig { font-size: clamp(24px, 7.2vw, 34px); }
  .encStage .encLine { font-size: 12.5px; letter-spacing: .14em; margin-top: 12px; }
  .encStage .encAsk { margin: 22px 0 12px; font-size: 13.5px; letter-spacing: .14em; }
  .encStage .encRow.acts .encBtn.primary { width: 100%; }
  .encStage.q { grid-template-rows: minmax(0, 22vh) minmax(0, 1fr); }
  .encStage .encRow.choices { flex-direction: column; gap: 10px; margin-top: 22px; width: 100%; }
  .encStage .encQ .encAsk { font-size: clamp(24px, 7vw, 32px); }
  .encStage.c { grid-template-columns: 1fr; grid-template-rows: minmax(0, 20vh) minmax(0, 1fr); grid-template-areas: "r" "c"; }
  .encStage.c .fig.l { display: none; }
  .encStage.c .fig.r canvas { cursor: pointer; }
  .encStage.c.big { grid-template-rows: minmax(0, 46vh) minmax(0, 1fr); }
  .encStage .msgRow { max-width: 88%; }
  .encStage .msgRow.mine { align-self: flex-end; align-items: flex-end; text-align: right; }
  .encStage .msgRow.mine .msg { text-align: left; }
  .encStage .msgRow.theirs { align-self: flex-start; align-items: flex-start; text-align: left; }
}
.encStage.flat { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr); grid-template-areas: "c"; }
@media (min-width: 900px) and (min-aspect-ratio: 1/1) { .encStage.flat { grid-template-columns: minmax(0, 1fr) minmax(360px, 600px) minmax(0, 1fr); grid-template-areas: ". c ."; } }
@media (prefers-reduced-motion: reduce) { .enc.staged { animation: none; } .encStage .seq { transition: none; } }
.enc.staged.hidden { display: none; }
