/* Shabna² — the page is the invitation to the Shaaban gathering.
   Colours come from the materials: mashrabiya wood, invitation paper, the Shabna brown,
   and the green paint of Jeddah's old rawashin for the one action. */
:root {
  --wood: #20140e;
  --wood-2: #2d1e16;
  --paper: #f4eee2;
  --paper-2: #e8dfcd;
  --ink: #3b2a23;
  --ink-soft: #6a5a51;
  --green: #2f6a5a;
  --green-2: #255547;
  --on-dark: #f4eee2;
  --display: "Amiri", "Noto Naskh Arabic", serif;
  --ui: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --margin: clamp(20px, 3vw, 40px);
  --gap: clamp(120px, 14vw, 200px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--wood); color: var(--on-dark); font-family: var(--display); font-size: 19px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, input { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1.05; letter-spacing: 0; text-wrap: balance; }
h2 { font-size: clamp(44px, 6.2vw, 96px); }
h1 sup, h2 sup { font-size: .45em; vertical-align: .9em; line-height: 0; margin-inline-start: .05em; }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 30px; border: 0; border-radius: 0; font-family: var(--display); font-size: 21px; font-weight: 700; text-decoration: none; cursor: pointer; transition: background-color .2s, transform .15s var(--ease); }
.btn:active { transform: translateY(1px); }
.btn-ink { background: var(--green); color: var(--paper); }
.btn-ink:hover { background: var(--green-2); }
.btn-link { border: 0; background: none; padding: 8px 4px; font-family: var(--display); font-size: 19px; color: var(--ink); cursor: pointer; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.btn-link:hover { color: var(--green); }

/* ================= the house (3D stage) ================= */
.stage { position: relative; height: 100svh; min-height: 640px; overflow: hidden; background: var(--wood); isolation: isolate; }
#scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
body.exploring { overflow: hidden; }
body.exploring .stage { position: fixed; inset: 0; z-index: 50; height: 100%; }
body.exploring #scene { touch-action: none; cursor: grab; }
body.exploring #scene.dragging { cursor: grabbing; }

.loader { position: absolute; inset: 0; z-index: 20; display: grid; place-content: center; justify-items: center; gap: 28px; background: var(--wood); transition: opacity 1s var(--ease), visibility 1s; }
.loader.done { opacity: 0; visibility: hidden; }
.loader-logo { width: min(260px, 56vw); }
.loader-bar { width: 220px; height: 3px; background: var(--wood-2); }
.loader-bar span { display: block; height: 100%; width: 0; background: var(--paper); transition: width .3s; }
.loader-text { margin: 0; font-size: 18px; color: var(--on-dark); }

.bars i { position: absolute; left: 0; right: 0; height: 10vh; background: #000; z-index: 12; transform: scaleY(0); transition: transform 1.1s var(--ease); pointer-events: none; }
.bars i:first-child { top: 0; transform-origin: top; }
.bars i:last-child { bottom: 0; transform-origin: bottom; }
.cinema .bars i { transform: scaleY(1); }
.captions { position: absolute; inset: 0; z-index: 13; pointer-events: none; display: grid; place-items: center; }
.cap { grid-area: 1 / 1; margin: 0; padding: 0 var(--margin); text-align: center; opacity: 0; font-size: clamp(40px, 6.4vw, 96px); font-weight: 700; line-height: 1.1; color: var(--paper); }
.cap-logo { display: flex; align-items: flex-start; gap: 6px; }
.cap-logo img { width: clamp(240px, 36vw, 520px); }
.cap-logo sup { font-size: .5em; line-height: 1; }
.skip { position: absolute; z-index: 14; bottom: calc(10vh + 20px); left: var(--margin); min-height: 46px; padding: 0 20px; border: 0; border-radius: 0; background: var(--paper); color: var(--ink); font-family: var(--display); font-size: 18px; cursor: pointer; }
.skip:hover { background: var(--paper-2); }

.topbar { position: absolute; z-index: 15; top: env(safe-area-inset-top, 0px); left: 0; right: 0; display: flex; align-items: center; gap: 36px; padding: 22px var(--margin); opacity: 0; pointer-events: none; transition: opacity .8s var(--ease); }
.topbar.show { opacity: 1; pointer-events: auto; }
.top-mark img { width: 104px; }
.top-links { display: flex; gap: 28px; }
.top-links a { font-size: 20px; text-decoration: none; color: var(--on-dark); padding: 6px 0; }
.top-links a:hover { text-decoration: underline; text-underline-offset: 7px; text-decoration-thickness: 2px; }
.tb-btn { min-height: 46px; padding: 0 18px; border: 0; border-radius: 0; background: var(--paper); color: var(--ink); font-family: var(--ui); font-size: 15px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.tb-btn:hover { background: var(--paper-2); }
.sound-btn { margin-inline-start: auto; }
.sound-btn[aria-pressed="false"] .wave { opacity: .2; }
body.exploring .top-links { display: none; }

/* the invitation card, standing in the house */
.invite-wrap { position: absolute; z-index: 10; inset: 0; display: flex; align-items: center; padding: 96px var(--margin) 40px; pointer-events: none; }
.invite {
  pointer-events: auto; width: min(480px, 100%); padding: 96px 44px 40px;
  background: var(--paper); color: var(--ink); text-align: center;
  border-radius: 240px 240px 0 0 / 150px 150px 0 0;   /* the arch of a Jeddah roshan */
  box-shadow: 0 30px 80px rgba(0, 0, 0, .45);           /* it floats over the scene */
}
.invite-mark { width: 220px; margin: 0 auto 26px; }
.invite-from { margin: 0 0 14px; font-size: 19px; }
.invite h1 { font-size: clamp(46px, 4.6vw, 66px); line-height: 1.1; color: var(--ink); }
.invite-when { margin: 22px 0 0; display: grid; gap: 2px; font-size: clamp(26px, 2.4vw, 34px); font-weight: 700; color: var(--green); }
.invite-when span + span { font-size: .72em; color: var(--ink); }
.invite-lead { margin: 22px auto 0; max-width: 32ch; font-size: 19px; }
.invite-actions { margin-top: 30px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.invite-actions .btn { width: 100%; }
.invite-rsvp { margin: 24px -44px -40px; padding: 16px 44px; font-size: 17px; background: var(--paper-2); }

/* labels over the scene */
.labels { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.lbl { position: absolute; left: 0; top: 0; padding: 2px 8px; font-family: var(--ui); font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--wood); color: var(--paper); direction: ltr; will-change: transform; transition: opacity .2s; }
.lbl.booked { color: #b9a99c; text-decoration: line-through; }

/* HUD: solid panels, square corners */
.hud { position: absolute; inset: 0; z-index: 9; pointer-events: none; font-family: var(--ui); }
.hud > * { pointer-events: auto; }
.hud-modes { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 88px); right: var(--margin); display: flex; background: var(--wood); }
.hud-modes button { min-height: 46px; padding: 0 22px; border: 0; border-radius: 0; background: transparent; cursor: pointer; font-size: 15px; color: var(--on-dark); }
.hud-modes button[aria-pressed="true"] { background: var(--paper); color: var(--ink); font-weight: 600; }
.hud-search { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 88px); left: var(--margin); display: flex; align-items: center; gap: 8px; width: min(300px, calc(100vw - 280px)); padding: 0 14px; background: var(--wood); color: var(--on-dark); }
.hud-search:focus-within { outline: 3px solid var(--green); }
.hud-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; height: 46px; font-size: 16px; color: var(--on-dark); }
.hud-msg { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 140px); left: var(--margin); margin: 0; padding: 8px 12px; background: #8e2e22; color: #fff; font-size: 14px; }
.hud-msg:empty { display: none; }
.hud-legend { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); right: calc(var(--margin) + 216px); display: flex; flex-wrap: wrap; gap: 4px; max-width: 560px; justify-content: flex-end; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 0; background: var(--wood); color: var(--on-dark); font-size: 14px; cursor: pointer; transition: background-color .2s; }
.chip i { width: 10px; height: 10px; }
.chip:hover { background: var(--wood-2); }
.chip[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
.chip small { font-size: 12px; font-variant-numeric: tabular-nums; }
.zoom { position: absolute; display: none; flex-direction: column; gap: 4px; top: 50%; transform: translateY(-50%); left: var(--margin); }
.aerial .zoom { display: flex; }
.zoom button { width: 52px; height: 52px; border: 0; border-radius: 0; background: var(--wood); color: var(--on-dark); cursor: pointer; display: grid; place-items: center; transition: background-color .2s; }
.zoom button:hover { background: var(--wood-2); }
.minimap { position: absolute; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); left: var(--margin); width: 180px; height: 180px; background: var(--wood); }
.minimap canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
.hud-hint { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 146px); left: 50%; transform: translateX(-50%); margin: 0; padding: 10px 16px; background: var(--wood); font-size: 14px; color: var(--on-dark); white-space: nowrap; transition: opacity .6s; }
.hud-hint:empty { display: none; }
.joystick { position: absolute; display: none; bottom: calc(230px + env(safe-area-inset-bottom, 0px)); left: max(28px, env(safe-area-inset-left, 0px)); width: 116px; height: 116px; border-radius: 50%; background: rgba(32, 20, 14, .6); touch-action: none; }
.joystick i { position: absolute; left: 50%; top: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: var(--paper); }
.walking.touch .joystick { display: block; }

/* booth card: a paper slip that floats over the house */
.card { position: absolute; z-index: 11; top: calc(env(safe-area-inset-top, 0px) + 150px); right: var(--margin); width: 340px; max-height: calc(100% - 300px); overflow: auto; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .5); animation: card-in .4s var(--ease); font-family: var(--display); }
@keyframes card-in { from { opacity: 0; transform: translateY(14px); } }
.card-img { aspect-ratio: 16 / 10; background: var(--paper-2) center / contain no-repeat; }
.card-img.diagram { display: grid; place-items: center; }
.card-body { padding: 18px 22px 22px; display: grid; gap: 4px; }
.card-en { display: none; }
.card-name { font-size: 26px; font-weight: 700; line-height: 1.2; }
.card-id { font-family: var(--ui); font-weight: 600; font-size: 46px; line-height: 1; direction: ltr; text-align: right; margin: 6px 0 10px; color: var(--ink); }
.card-rows { margin: 0; display: grid; gap: 2px; font-family: var(--ui); }
.card-rows div { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; background: var(--paper-2); font-size: 15px; }
.card-rows dt { color: var(--ink-soft); }
.card-rows dd { margin: 0; font-weight: 600; }
.pill { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 600; }
.pill i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.free { color: var(--green); }
.pill.booked { color: #8e2e22; }
.card-brand { margin-top: 8px; padding: 12px 14px; background: var(--paper-2); font-size: 16px; color: var(--ink-soft); }
.card-brand strong { display: block; color: var(--ink); font-size: 19px; }
.card .btn { margin-top: 14px; width: 100%; font-size: 18px; }
.card-close { position: absolute; top: 0; left: 0; z-index: 1; width: 46px; height: 46px; border: 0; border-radius: 0; background: var(--wood); color: var(--paper); cursor: pointer; display: grid; place-items: center; }
.card-tabs { display: flex; gap: 4px; padding: 12px 22px 0; }
.card-tabs button { flex: 1; min-height: 42px; border: 0; border-radius: 0; background: var(--paper-2); color: var(--ink); font-family: var(--display); font-size: 17px; cursor: pointer; }
.card-tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); }
.card-desc { margin: 10px 0 0; font-size: 16px; }

/* ================= the page ================= */
main { position: relative; }

/* story: a statement with the photographs set inside it */
.story { background: var(--paper); color: var(--ink); padding: var(--gap) var(--margin); display: grid; justify-items: center; gap: 48px; text-align: center; }
.story-line { margin: 0; max-width: 24em; font-size: clamp(24px, 2.6vw, 36px); line-height: 1.6; }
.story-photos { width: 100%; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; margin-top: 32px; text-align: start; }
.story-photos figure { margin: 0; display: grid; gap: 10px; }
.story-photos img { width: 100%; object-fit: cover; }
.story-photos figcaption { font-size: 16px; color: var(--ink-soft); }
.st-a { grid-column: 1 / 8; }
.st-a img { aspect-ratio: 4 / 3; }
.st-b { grid-column: 8 / -1; margin-top: 120px; }
.st-b img { aspect-ratio: 4 / 5; }

/* season one: a total and its slip */
.season { background: var(--wood); padding: var(--gap) var(--margin); display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(40px, 6vw, 96px); align-items: end; }
.season-total { display: grid; gap: 22px; }
.season-note { margin: 0; max-width: 34ch; font-size: 20px; }
.season-figure { margin: 40px 0 0; display: grid; gap: 6px; font-size: 22px; }
.season-figure span { font-size: clamp(96px, 15vw, 240px); font-weight: 700; line-height: .9; color: var(--paper); }
.slip { background: var(--paper); color: var(--ink); padding: 40px 34px 0;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 16px), 95% 100%, 90% calc(100% - 16px), 85% 100%, 80% calc(100% - 16px), 75% 100%, 70% calc(100% - 16px), 65% 100%, 60% calc(100% - 16px), 55% 100%, 50% calc(100% - 16px), 45% 100%, 40% calc(100% - 16px), 35% 100%, 30% calc(100% - 16px), 25% 100%, 20% calc(100% - 16px), 15% 100%, 10% calc(100% - 16px), 5% 100%, 0 calc(100% - 16px)); }
.slip h3 { font-size: 28px; margin-bottom: 18px; }
.slip dl { margin: 0; display: grid; gap: 14px; }
.slip dl div { display: flex; align-items: baseline; gap: 10px; font-size: 20px; }
.slip dl div::before { content: ""; order: 2; flex: 1; border-bottom: 4px dotted var(--paper-2); transform: translateY(-6px); }
.slip dt { order: 1; }
.slip dd { order: 3; margin: 0; font-weight: 700; white-space: nowrap; }
.slip-total { margin: 26px -34px 0; padding: 14px 34px 34px; display: flex; justify-content: space-between; background: var(--ink); color: var(--paper); font-size: 20px; font-weight: 700; }

.crowd { margin: 0; position: relative; overflow: hidden; }
.crowd img { width: 100%; height: min(86svh, 820px); object-fit: cover; object-position: center 35%; }
.crowd figcaption { position: absolute; bottom: 18px; right: var(--margin); padding: 6px 12px; background: var(--wood); font-size: 16px; }

/* spaces: a printed list on the roshan green */
.spaces { background: var(--green); padding: var(--gap) var(--margin); display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.spaces-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; position: sticky; top: 40px; }
.spaces-photos img { width: 100%; object-fit: cover; }
.sp-a { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.sp-b { aspect-ratio: 4 / 5; }
.sp-c { aspect-ratio: 4 / 5; margin-top: 56px; }
.sp-d { grid-column: 1 / -1; aspect-ratio: 16 / 8; }
.sheet { background: var(--paper); color: var(--ink); padding: 64px clamp(26px, 4vw, 56px) 72px;
  clip-path: polygon(0 14px, 4% 0, 8% 14px, 12% 0, 16% 14px, 20% 0, 24% 14px, 28% 0, 32% 14px, 36% 0, 40% 14px, 44% 0, 48% 14px, 52% 0, 56% 14px, 60% 0, 64% 14px, 68% 0, 72% 14px, 76% 0, 80% 14px, 84% 0, 88% 14px, 92% 0, 96% 14px, 100% 0, 100% calc(100% - 14px), 96% 100%, 92% calc(100% - 14px), 88% 100%, 84% calc(100% - 14px), 80% 100%, 76% calc(100% - 14px), 72% 100%, 68% calc(100% - 14px), 64% 100%, 60% calc(100% - 14px), 56% 100%, 52% calc(100% - 14px), 48% 100%, 44% calc(100% - 14px), 40% 100%, 36% calc(100% - 14px), 32% 100%, 28% calc(100% - 14px), 24% 100%, 20% calc(100% - 14px), 16% 100%, 12% calc(100% - 14px), 8% 100%, 4% calc(100% - 14px), 0 100%); }
.sheet h2 { font-size: clamp(44px, 4.8vw, 72px); text-align: center; }
.sheet-lead { margin: 18px auto 0; max-width: 34ch; text-align: center; font-size: 19px; }
.sheet-group { margin-top: 48px; display: grid; gap: 6px; }
.sheet-group h3 { font-size: 26px; margin-bottom: 6px; color: var(--green); }
.item { display: grid; grid-template-columns: auto 1fr auto; align-items: baseline; column-gap: 10px; width: calc(100% + 20px); padding: 12px 10px; margin: 0 -10px; border: 0; border-radius: 0; background: transparent; text-align: start; cursor: pointer; font-family: var(--display); color: var(--ink); transition: background-color .2s; }
.item::after { content: ""; grid-column: 2; grid-row: 1; border-bottom: 4px dotted var(--paper-2); transform: translateY(-6px); }
.it-name { grid-column: 1; grid-row: 1; font-size: 23px; font-weight: 700; }
.it-val { grid-column: 3; grid-row: 1; font-size: 20px; font-weight: 700; }
.it-note { grid-column: 1 / -1; font-size: 16px; color: var(--ink-soft); max-width: 46ch; }
.item:hover, .item:focus-visible { background: var(--paper-2); }
.item:hover .it-name { color: var(--green); }

/* brands of season one */
.brands { background: var(--paper); color: var(--ink); padding: var(--gap) var(--margin); display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: start; }
.brands h2 { grid-column: 1 / 8; }
.brands-note { grid-column: 8 / -1; margin: 0; align-self: end; font-size: 20px; }
.br-a { grid-column: 1 / 7; aspect-ratio: 3 / 2; object-fit: cover; width: 100%; margin-top: 40px; }
.br-b { grid-column: 7 / 10; aspect-ratio: 2 / 3; object-fit: cover; width: 100%; margin-top: 140px; }
.br-c { grid-column: 10 / -1; aspect-ratio: 3 / 4; object-fit: cover; width: 100%; margin-top: 40px; }

/* the reply card */
.reply { background: var(--wood); padding: var(--gap) var(--margin); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; }
.reply-dome { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }
.reply-card { background: var(--paper); color: var(--ink); padding: 56px clamp(28px, 4vw, 56px); transform: rotate(-1.5deg); display: grid; gap: 16px; justify-items: start; }
.reply-card h2 { font-size: clamp(42px, 4.6vw, 68px); }
.reply-card p { margin: 0; font-size: 20px; }
.reply-card .reply-phone { font-size: clamp(32px, 3.4vw, 48px); font-weight: 700; user-select: all; }

/* the back of the card */
.footer { background: var(--wood); padding: 0 var(--margin) 40px; }
.back { background: var(--paper); color: var(--ink); padding: 96px clamp(24px, 4vw, 64px) 48px; display: grid; gap: 40px;
  clip-path: polygon(0 16px, 2.5% 0, 5% 16px, 7.5% 0, 10% 16px, 12.5% 0, 15% 16px, 17.5% 0, 20% 16px, 22.5% 0, 25% 16px, 27.5% 0, 30% 16px, 32.5% 0, 35% 16px, 37.5% 0, 40% 16px, 42.5% 0, 45% 16px, 47.5% 0, 50% 16px, 52.5% 0, 55% 16px, 57.5% 0, 60% 16px, 62.5% 0, 65% 16px, 67.5% 0, 70% 16px, 72.5% 0, 75% 16px, 77.5% 0, 80% 16px, 82.5% 0, 85% 16px, 87.5% 0, 90% 16px, 92.5% 0, 95% 16px, 97.5% 0, 100% 16px, 100% 100%, 0 100%); }
.back-mark { width: min(100%, 1100px); justify-self: center; }
.back-org { display: flex; align-items: center; justify-content: center; gap: 18px; font-size: 20px; }
.back-org img { width: 150px; filter: brightness(.25) sepia(1) saturate(1.5); }
.back-small { margin: 0; text-align: center; font-size: 16px; color: var(--ink-soft); }

@media (max-height: 860px) and (min-width: 641px) {
  .invite { padding: 72px 40px 34px; }
  .invite-mark { width: 170px; margin-bottom: 16px; }
  .invite-when { margin-top: 14px; }
  .invite-lead { margin-top: 14px; }
  .invite-actions { margin-top: 20px; }
  .invite-rsvp { margin: 18px -40px -34px; padding: 12px 40px; }
}
@media (max-width: 960px) {
  .season, .spaces, .reply { grid-template-columns: minmax(0, 1fr); }
  .spaces-photos { position: static; order: 2; }
  .brands h2, .brands-note { grid-column: 1 / -1; }
  .br-a { grid-column: 1 / -1; }
  .br-b { grid-column: 1 / 7; margin-top: 0; }
  .br-c { grid-column: 7 / -1; margin-top: 60px; }
  .hud-legend { right: auto; left: calc(var(--margin) + 196px); justify-content: flex-start; max-width: calc(100vw - 460px); }
  .card { right: 12px; left: auto; width: min(400px, calc(100vw - 24px)); top: auto; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); max-height: calc(100% - 200px); }
  .card-img { aspect-ratio: 16 / 7; }
}
@media (max-width: 640px) {
  body { font-size: 18px; }
  .top-links { display: none; }
  .stage { min-height: 700px; }
  .invite-wrap { align-items: flex-end; padding: 80px 14px 14px; }
  .invite { width: 100%; padding: 70px 22px 26px; border-radius: 50% 50% 0 0 / 90px 90px 0 0; }
  .invite-rsvp { margin: 18px -22px -26px; padding: 12px 22px; }
  .invite-mark { display: none; }
  .invite { padding-top: 64px; }
  .invite h1 { font-size: 42px; }
  .invite-from, .invite-lead { font-size: 17px; }
  .invite-lead { margin-top: 14px; }
  .invite-actions { margin-top: 20px; }
  .story-line { font-size: 23px; }
  .st-a { grid-column: 1 / -1; }
  .st-b { grid-column: 4 / -1; margin-top: 0; }
  .season-figure span { font-size: 88px; }
  .hud-modes { top: auto; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); right: 50%; transform: translateX(50%); }
  .hud-search { width: calc(100vw - 40px); top: calc(env(safe-area-inset-top, 0px) + 80px); }
  .hud-msg { top: calc(env(safe-area-inset-top, 0px) + 132px); }
  .hud-legend { display: none; }
  .minimap { width: 110px; height: 110px; top: calc(env(safe-area-inset-top, 0px) + 136px); bottom: auto; left: auto; right: var(--margin); }
  .joystick { bottom: calc(158px + env(safe-area-inset-bottom, 0px)); }
  .hud-hint { top: auto; bottom: calc(144px + env(safe-area-inset-bottom, 0px)); font-size: 13px; white-space: normal; width: max-content; max-width: calc(100vw - 32px); text-align: center; }
  .sound-btn span { display: none; }
  .tb-btn { padding: 0 13px; }
  .crowd img { height: 56svh; }
  .reply-card { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ================= the journey ================= */
.journey { position: relative; height: 1100vh; background: #0c0a12; }
.j-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#journey-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.j-flash { position: absolute; inset: 0; background: #fff6e6; opacity: 0; pointer-events: none; z-index: 6; }
.j-ov { position: absolute; z-index: 4; opacity: 0; pointer-events: none; color: var(--paper); text-shadow: 0 2px 24px rgba(0, 0, 0, .7), 0 1px 3px rgba(0, 0, 0, .6); will-change: opacity, transform; }
.j-ov.on { pointer-events: auto; }
.j-ov h2 { font-size: clamp(36px, 4.4vw, 68px); line-height: 1.12; }
.j-ov p { margin: 16px 0 0; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.6; max-width: 30ch; }

.j-hero { inset: auto 0 9vh 0; text-align: center; display: grid; justify-items: center; padding: 0 var(--margin); }
.j-logo { width: clamp(200px, 22vw, 340px); margin-bottom: 18px; filter: drop-shadow(0 4px 20px rgba(0, 0, 0, .7)); }
.j-hero h1 { font-size: clamp(46px, 6.6vw, 104px); line-height: 1.08; }
.j-when { font-size: clamp(20px, 2vw, 28px) !important; max-width: none !important; }
.j-cue { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 26px !important; font-size: 17px !important; opacity: .9; }
.j-cue i { width: 2px; height: 34px; background: var(--paper); transform-origin: top; animation: cue 2s infinite var(--ease); }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

.j-win { top: 50%; right: max(var(--margin), 6vw); width: min(440px, 38vw); margin-top: -120px; }
.j-big { font-size: clamp(72px, 8vw, 132px) !important; font-weight: 700; line-height: 1 !important; margin: 0 0 6px !important; max-width: none !important; }
.j-date { font-size: clamp(28px, 2.6vw, 40px) !important; font-weight: 700; max-width: none !important; }

.j-build { top: 50%; right: max(var(--margin), 5vw); width: min(400px, 40vw); translate: 0 -50%; text-shadow: none; background: rgba(20, 13, 10, .82); padding: 30px 28px; }
.j-build p { max-width: none; }
.j-build input { width: 100%; margin-top: 20px; height: 54px; padding: 0 16px; border: 0; background: var(--paper); color: var(--ink); font-family: var(--display); font-size: 22px; font-weight: 700; outline: none; }
.j-build input:focus-visible { outline: 3px solid var(--green); }
.j-types { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.j-types button { min-height: 42px; padding: 0 14px; border: 0; background: rgba(244, 238, 226, .12); color: var(--paper); font-family: var(--display); font-size: 17px; cursor: pointer; transition: background-color .2s; }
.j-types button:hover { background: rgba(244, 238, 226, .22); }
.j-types button[aria-pressed="true"] { background: var(--paper); color: var(--ink); font-weight: 700; }
.j-cta { display: flex; align-items: center; justify-content: center; margin-top: 18px; min-height: 54px; background: var(--green); color: var(--paper); font-family: var(--display); font-size: 20px; font-weight: 700; text-decoration: none; transition: background-color .2s; }
.j-cta:hover { background: var(--green-2); }

.j-gate { inset: auto 0 9vh 0; text-align: center; display: grid; justify-items: center; }
.j-gate h2 { font-size: clamp(64px, 9vw, 150px); }
.j-gate p { max-width: none; }

/* overlay at the top of the tour */
.tour-intro { position: absolute; z-index: 10; inset: auto auto 0 0; right: 0; padding: 120px var(--margin) 48px; color: var(--paper); text-shadow: 0 2px 18px rgba(0, 0, 0, .65); pointer-events: none; }
.tour-intro > * { pointer-events: auto; }
.tour-intro h2 { font-size: clamp(40px, 5vw, 76px); }
.tour-intro p { margin: 12px 0 0; font-size: 20px; max-width: 36ch; }
.tour-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.tour-btn { min-height: 54px; padding: 0 26px; border: 0; background: var(--paper); color: var(--ink); font-family: var(--display); font-size: 20px; font-weight: 700; cursor: pointer; text-shadow: none; transition: background-color .2s; }
.tour-btn:hover { background: var(--paper-2); }
.tour-btn.ghost { background: rgba(32, 20, 14, .7); color: var(--paper); }
.tour-btn.ghost:hover { background: rgba(32, 20, 14, .9); }

@media (max-width: 760px) {
  .journey { height: 1000vh; }
  .j-win { right: 16px; left: 16px; width: auto; top: auto; bottom: calc(7vh + 56px); margin-top: 0; background: rgba(20, 13, 10, .72); padding: 20px 20px 22px; text-shadow: none; }
  .j-win p { max-width: none; }
  .j-big { font-size: 64px !important; }
  .j-build { right: 12px; left: 12px; width: auto; top: auto; bottom: 12px; translate: none; padding: 20px 18px; bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .j-build h2 { font-size: 34px; }
  .j-build p { margin-top: 8px; font-size: 16px; }
  .j-hero { bottom: calc(7vh + 56px); }
  .tour-actions .tour-btn { flex: 1; }
}

/* skip the walk and go straight to the map */
.j-skip { position: absolute; z-index: 6; top: max(18px, env(safe-area-inset-top, 0px)); left: max(18px, env(safe-area-inset-left, 0px)); min-height: 46px; padding: 0 22px; border: 0; background: var(--paper); color: var(--ink); font-family: var(--display); font-size: 18px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 24px rgba(0, 0, 0, .45); transition: background-color .2s; }
.j-skip:hover { background: #fff; }
.j-skip:focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }
