:root {
  --cream: #f5e9d6;
  --paper: #fffaf0;
  --paper-deep: #ead8bd;
  --terracotta: #b7603c;
  --terracotta-dark: #8f442a;
  --olive: #5b6042;
  --olive-dark: #3d422d;
  --leather: #8a4f2a;
  --umber: #2f211b;
  --brass: #b2874b;
  --mist: #8fa9ad;
  --ink-soft: #68564a;
  --line: rgba(47, 33, 27, 0.16);
  --shadow: 0 24px 70px rgba(61, 43, 29, 0.14);
  --serif: Georgia, "Times New Roman", serif;
  --sans: "Trebuchet MS", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--umber);
  background:
    radial-gradient(circle at 10% 15%, rgba(183, 96, 60, 0.06), transparent 24rem),
    radial-gradient(circle at 88% 42%, rgba(143, 169, 173, 0.12), transparent 28rem),
    var(--cream);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
}

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

img { display: block; max-width: 100%; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

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

.skip-link {
  position: fixed;
  z-index: 1000;
  left: 1rem;
  top: 1rem;
  transform: translateY(-180%);
  padding: 0.75rem 1rem;
  background: var(--umber);
  color: white;
  border-radius: 0.35rem;
}
.skip-link:focus { transform: translateY(0); }

.site-header {
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 0;
  min-height: 76px;
  padding: 0.8rem 1rem 0.8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  position: relative;
  z-index: 50;
  background: rgba(255, 250, 240, 0.78);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(47, 33, 27, 0.11);
  border-radius: 1rem;
  box-shadow: 0 10px 35px rgba(66, 45, 32, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  line-height: 1;
  flex-shrink: 0;
}
.brand-mark { width: 42px; height: 42px; color: var(--terracotta); }
.brand-mark svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.5; }
.brand-mark path { fill: currentColor; stroke: none; }
.brand-mark .brand-dot { fill: var(--cream); stroke: none; }
.brand strong { display: block; font-family: var(--serif); font-size: 1.2rem; letter-spacing: 0.02em; }
.brand small { display: block; margin-top: 0.28rem; color: var(--ink-soft); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }

.site-nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2rem); }
.site-nav a { text-decoration: none; font-size: 0.92rem; font-weight: 700; }
.site-nav a:not(.nav-cta) { position: relative; }
.site-nav a:not(.nav-cta)::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -0.3rem; height: 2px; background: var(--terracotta); transition: right 180ms ease; }
.site-nav a:not(.nav-cta):hover::after, .site-nav a:not(.nav-cta):focus-visible::after { right: 0; }
.nav-cta { padding: 0.72rem 1rem; border-radius: 999px; background: var(--olive); color: white; }
.nav-cta:hover { background: var(--olive-dark); }
.language-control { flex: none; display: flex; align-items: center; }
.language-short { display: none; }
.language-control select { max-width: 10rem; min-height: 42px; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: 0.45rem; background: var(--paper); color: var(--umber); font: inherit; font-size: 0.82rem; font-weight: 700; cursor: pointer; }
.menu-button { display: none; }

.hero {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 760px;
  padding: clamp(3.8rem, 8vw, 7.6rem) 0 clamp(5rem, 8vw, 8rem);
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 0.82fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.eyebrow { display: flex; align-items: center; gap: 0.7rem; margin: 0 0 1rem; color: var(--terracotta-dark); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.eyebrow span { width: 2.8rem; height: 1px; background: currentColor; }
h1, h2, h3 { margin-top: 0; font-family: var(--serif); font-weight: 500; line-height: 1.04; }
h1 { margin-bottom: 1.5rem; font-size: clamp(3.6rem, 7vw, 6.7rem); letter-spacing: -0.058em; max-width: 9ch; }
h2 { margin-bottom: 1rem; font-size: clamp(2.55rem, 5vw, 4.7rem); letter-spacing: -0.045em; }
h3 { font-size: clamp(1.6rem, 2.5vw, 2.2rem); letter-spacing: -0.025em; }
.hero-intro { max-width: 34rem; margin: 0; color: var(--ink-soft); font-size: clamp(1.05rem, 1.6vw, 1.25rem); }
.signature { margin: 1.2rem 0 0; color: var(--terracotta-dark); font-family: var(--serif); font-size: 1.12rem; font-style: italic; }
.hero-actions { display: flex; align-items: center; gap: 1.4rem; margin-top: 2.2rem; }
.button { min-height: 50px; padding: 0.8rem 1.15rem; display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem; border-radius: 0.45rem; text-decoration: none; font-weight: 800; transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: var(--terracotta); box-shadow: 0 10px 25px rgba(183, 96, 60, 0.24); }
.button-primary:hover { background: var(--terracotta-dark); box-shadow: 0 14px 30px rgba(143, 68, 42, 0.28); }
.text-link { font-weight: 800; text-decoration: none; border-bottom: 1px solid var(--line); }
.text-link:hover { color: var(--terracotta-dark); border-color: currentColor; }
.hero-notes { display: flex; gap: 0; margin: 3.4rem 0 0; padding: 1.2rem 0 0; border-top: 1px solid var(--line); }
.hero-notes div { flex: 1; display: flex; align-items: baseline; gap: 0.55rem; }
.hero-notes dt { color: var(--terracotta); font-family: var(--serif); font-size: 0.94rem; font-style: italic; }
.hero-notes dd { margin: 0; font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }

.hero-visual {
  width: min(72%, 365px);
  position: relative;
  justify-self: center;
  margin: 0;
  transform: rotate(1.1deg);
}
.photo-wrap { padding: 0.78rem; background: var(--paper); box-shadow: var(--shadow); border-radius: 0.25rem; }
.photo-wrap img { width: 100%; height: auto; aspect-ratio: 4 / 5.15; object-fit: cover; border-radius: 0.12rem; }
.hero-visual figcaption { width: 82%; margin: -0.4rem auto 0; padding: 1.15rem 1.25rem; position: relative; background: var(--paper); border-left: 3px solid var(--brass); box-shadow: 0 12px 30px rgba(49, 34, 25, 0.1); transform: rotate(-2deg); }
.hero-visual figcaption span { display: block; color: var(--terracotta-dark); font-size: 0.7rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.hero-visual figcaption p { margin: 0.3rem 0 0; font-family: var(--serif); font-size: 1rem; line-height: 1.4; }
.tape { width: 88px; height: 28px; position: absolute; background: rgba(203, 171, 115, 0.52); box-shadow: 0 1px 2px rgba(60, 40, 20, 0.08); }
.tape-one { top: -0.5rem; left: -1.2rem; transform: rotate(-31deg); }
.tape-two { right: -1rem; bottom: 6rem; transform: rotate(-9deg); }

.section { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(5.5rem, 10vw, 9rem) 0; }
.section-heading { max-width: 760px; margin-bottom: clamp(2.6rem, 5vw, 4.5rem); }
.section-heading > p:last-child { max-width: 630px; margin: 0; color: var(--ink-soft); font-size: 1.08rem; }

.journeys { border-top: 1px solid var(--line); }
.journey-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.journey-card { min-height: 460px; padding: 1.3rem; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 0.6rem; color: white; text-decoration: none; cursor: pointer; isolation: isolate; }
.journey-image { width: 100%; height: 100%; position: absolute; inset: 0; z-index: -2; object-fit: cover; transition: transform 500ms ease; }
.journey-japan .journey-image { object-position: 50% 46%; }
.journey-lunenburg .journey-image { object-position: 50% 43%; }
.journey-highlands .journey-image { object-position: 50% 43%; }
.journey-card:hover .journey-image, .journey-card:focus-visible .journey-image { transform: scale(1.025); }
.journey-card:focus-visible { outline: 3px solid var(--brass); outline-offset: 4px; }
.journey-card::before, .journey-card::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; filter: blur(0.2px); }
.journey-card::before { width: 120%; aspect-ratio: 1; left: -50%; top: -37%; opacity: 0.5; background: radial-gradient(circle at 65% 70%, rgba(255,255,255,0.42), transparent 48%); }
.journey-card::after { inset: 0; border-radius: inherit; background: linear-gradient(to top, rgba(25, 22, 17, 0.92) 0%, rgba(25, 22, 17, 0.58) 42%, rgba(25, 22, 17, 0.08) 74%, rgba(25, 22, 17, 0.16) 100%); }
.journey-japan { background: linear-gradient(145deg, #6e5a3b 0%, #b16339 38%, #50573c 100%); }
.journey-lunenburg { background: linear-gradient(145deg, #526a70 0%, #8fa9ad 45%, #86502f 100%); }
.journey-highlands { background: linear-gradient(145deg, #404b3d 0%, #707a60 44%, #657b82 100%); }
.journey-number { position: absolute; top: -1.1rem; left: 1rem; font-family: var(--serif); font-size: 9rem; line-height: 1; opacity: 0.1; }
.journey-stamp { width: 52px; height: 52px; position: absolute; top: 1.2rem; right: 1.2rem; display: grid; place-items: center; border: 1px solid rgba(255,255,255,0.6); border-radius: 50%; font-family: var(--serif); font-weight: 700; transform: rotate(8deg); }
.journey-copy { position: relative; z-index: 2; }
.journey-place { margin: 0 0 0.55rem; font-size: 0.78rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.journey-card h3 { margin-bottom: 0.85rem; }
.journey-card p:not(.journey-place) { margin: 0; color: rgba(255,255,255,0.83); }
.journey-detail { display: block; margin-top: 1.4rem; padding-top: 0.8rem; border-top: 1px solid rgba(255,255,255,0.24); font-family: var(--serif); font-size: 0.9rem; font-style: italic; }
.journey-action { display: inline-block; margin-top: 0.8rem; color: #fff2d8; font-size: 0.85rem; font-weight: 800; }

.companions { display: grid; grid-template-columns: 1.05fr 0.75fr; align-items: center; gap: clamp(3rem, 9vw, 8rem); border-top: 1px solid var(--line); }
.large-copy { max-width: 630px; margin: 0; font-family: var(--serif); font-size: clamp(1.5rem, 2.5vw, 2.2rem); line-height: 1.38; }
.companion-bios { margin-top: 2.8rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.companion-bios article { padding-top: 1rem; border-top: 1px solid var(--line); }
.companion-bios p { margin: 0.7rem 0 0; color: var(--ink-soft); }
.hand-label { color: var(--terracotta-dark); font-family: var(--serif); font-size: 1.15rem; font-style: italic; }
.pip-card { width: 100%; max-width: 440px; height: var(--companion-card-height, auto); justify-self: center; display: flex; flex-direction: column; justify-content: center; margin: 0; padding: 0.75rem 0.75rem 1.2rem; background: var(--paper); border-radius: 0.6rem; box-shadow: var(--shadow); }
.pip-card img { display: block; width: 100%; height: auto; min-height: 0; flex: 0 1 auto; object-fit: contain; object-position: center; border-radius: 0.25rem; }
.pip-card figcaption { padding: 1rem 1.1rem 0; font-family: var(--serif); text-align: center; }
.pip-card figcaption span { display: block; color: var(--terracotta-dark); font-size: 0.72rem; font-family: var(--sans); font-weight: 900; letter-spacing: 0.13em; text-transform: uppercase; }

.play-section { width: 100%; padding-left: max(1rem, calc((100% - 1180px) / 2)); padding-right: max(1rem, calc((100% - 1180px) / 2)); background: var(--umber); color: var(--cream); }
.play-heading .eyebrow { color: #d99a76; }
.play-heading > p:last-child { color: rgba(245, 233, 214, 0.7); }
.games-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; grid-auto-rows: 1fr; gap: 1.2rem; align-items: stretch; }
.game-card { display: flex; flex-direction: column; padding: clamp(1rem, 2.5vw, 1.7rem); background: var(--paper); color: var(--umber); border-radius: 0.7rem; box-shadow: 0 18px 55px rgba(0,0,0,0.22); }
.game-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.game-kicker { margin: 0 0 0.25rem; color: var(--terracotta-dark); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.14em; text-transform: uppercase; }
.game-card h3 { margin-bottom: 0; }
.game-count { flex: none; padding: 0.42rem 0.7rem; background: var(--cream); border-radius: 999px; color: var(--olive-dark); font-size: 0.8rem; font-weight: 900; }
.game-instruction { margin: 0.8rem 0 1.2rem; color: var(--ink-soft); }
.details-board { position: relative; overflow: hidden; border-radius: 0.45rem; border: 1px solid var(--line); background: white; }
.details-board img { width: 100%; }
.details-viewport { position: relative; min-width: 0; width: 100%; }
.details-tap-enlarge, .details-zoom-controls { display: none; }
.hotspot { width: clamp(2.4rem, 5vw, 3.2rem); aspect-ratio: 1; position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); padding: 0; border: 2px dashed rgba(183, 96, 60, 0.58); border-radius: 50%; background: rgba(245, 233, 214, 0.08); cursor: pointer; transition: transform 150ms ease, background 150ms ease, border-color 150ms ease; }
.hotspot::after { content: ""; width: 0.52rem; height: 0.52rem; position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); border-radius: 50%; background: rgba(183, 96, 60, 0.8); box-shadow: 0 0 0 5px rgba(245, 233, 214, 0.5); }
.hotspot span { position: absolute; left: 50%; bottom: calc(100% + 0.35rem); transform: translateX(-50%); opacity: 0; padding: 0.18rem 0.45rem; background: var(--umber); color: white; border-radius: 0.25rem; font-size: 0.68rem; white-space: nowrap; pointer-events: none; }
.hotspot:hover { transform: translate(-50%, -50%) scale(1.08); background: rgba(245, 233, 214, 0.35); }
.hotspot:hover span, .hotspot:focus-visible span { opacity: 1; }
.hotspot.found { border-style: solid; border-color: var(--olive); background: rgba(91, 96, 66, 0.76); }
.hotspot.found::after { content: "✓"; width: auto; height: auto; color: white; background: transparent; box-shadow: none; font-weight: 900; }
.object-list { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 1rem; }
.object-list span { padding: 0.32rem 0.6rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font-size: 0.75rem; font-weight: 800; }
.object-list span.found { color: var(--olive-dark); background: rgba(91, 96, 66, 0.12); text-decoration: line-through; }
.game-result { margin-top: 1rem; padding: 0.8rem 1rem; border-left: 3px solid var(--olive); background: rgba(91, 96, 66, 0.1); }
.game-result strong, .game-result span { display: block; }
.game-result span { color: var(--ink-soft); font-size: 0.85rem; }
.game-reset { margin-top: 1rem; padding: 0.6rem 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--terracotta-dark); font-weight: 900; cursor: pointer; }
.game-reset:hover { color: var(--umber); border-color: var(--umber); }

.puzzle-wrap { position: relative; }
.puzzle-board { aspect-ratio: 1; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); gap: 4px; overflow: hidden; padding: 4px; background: var(--umber); border-radius: 0.45rem; }
.puzzle-tile { min-width: 0; min-height: 0; border: 0; border-radius: 0.15rem; background-color: var(--cream); background-image: url("./assets/postcard-harbour.webp"); background-repeat: no-repeat; background-size: 300% 300%; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.18); transition: transform 120ms ease, filter 120ms ease; }
.puzzle-tile:hover { filter: brightness(1.08); }
.puzzle-tile:focus-visible { outline: 3px solid var(--brass); outline-offset: -3px; }
.puzzle-empty { background: linear-gradient(135deg, #e7d5b9, #f8eddd); }
.postcard-note { position: absolute; right: 0.7rem; bottom: 0.7rem; padding: 0.45rem 0.65rem; transform: rotate(-4deg); background: rgba(255,250,240,0.9); color: var(--umber); box-shadow: 0 3px 12px rgba(47,33,27,0.16); font-family: var(--serif); font-size: 0.75rem; pointer-events: none; }
.postcard-note span, .postcard-note b { display: block; }
.postcard-note b { color: var(--terracotta-dark); text-align: right; font-weight: 500; font-style: italic; }

.wallpapers { width: min(1180px, calc(100% - 2rem)); margin-top: clamp(5rem, 10vw, 9rem); margin-bottom: clamp(5rem, 10vw, 9rem); padding: clamp(3rem, 7vw, 6rem); position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.6fr); align-items: center; gap: 2rem; overflow: hidden; background: var(--terracotta); color: white; border-radius: 0.8rem; }
.wallpaper-inner { max-width: 650px; position: relative; z-index: 2; }
.eyebrow.light { color: #ffe7d7; }
.wallpapers h2 { margin-bottom: 1rem; }
.wallpapers p:not(.eyebrow) { max-width: 550px; color: rgba(255,255,255,0.82); font-size: 1.08rem; }
.button-light { margin-top: 1rem; background: var(--paper); color: var(--terracotta-dark); box-shadow: 0 10px 25px rgba(64, 25, 13, 0.18); }
.button-light:hover { background: white; }
.wallpaper-preview { width: min(100%, 380px); height: 325px; position: relative; justify-self: end; }
.wallpaper-preview img { position: absolute; width: 41%; height: auto; aspect-ratio: 9 / 16; object-fit: cover; border: 4px solid var(--paper); border-radius: 0.95rem; box-shadow: 0 18px 34px rgba(47,33,27,0.36); }
.preview-bergen { left: 2%; top: 12%; transform: rotate(-10deg); z-index: 1; }
.preview-istanbul { left: 30%; top: 3%; transform: rotate(2deg); z-index: 3; }
.preview-lunenburg { right: 2%; top: 12%; transform: rotate(10deg); z-index: 2; }

@media (max-width: 820px) {
  .wallpapers { grid-template-columns: 1fr; gap: 2rem; }
  .wallpaper-preview { justify-self: center; }
}

.site-footer { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 3rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; border-top: 1px solid var(--line); }
.footer-center { text-align: center; }
.footer-center > p { margin: 0; color: var(--ink-soft); font-family: var(--serif); font-style: italic; }
.social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.45rem 1rem; margin-top: 0.75rem; }
.social-links a { color: var(--terracotta-dark); font-size: 0.85rem; font-weight: 800; text-decoration: none; border-bottom: 1px solid var(--line); }
.social-links a:hover { color: var(--umber); border-color: currentColor; }
.back-top { justify-self: end; font-weight: 800; text-decoration: none; }
.back-top:hover { color: var(--terracotta-dark); }

.reveal { opacity: 1; transform: none; }
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 650ms ease, transform 650ms ease; }
.js .reveal.visible { opacity: 1; transform: translateY(0); }

*:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; }

@media (max-width: 980px) {
  .site-header { gap: 0.75rem; }
  .language-control { margin-left: auto; }
  .menu-button { width: 46px; height: 42px; padding: 0; display: grid; place-content: center; gap: 7px; border: 0; border-radius: 0.45rem; background: var(--olive); cursor: pointer; }
  .menu-button span:not(.sr-only) { width: 20px; height: 2px; display: block; background: white; transition: transform 180ms ease; }
  .menu-button[aria-expanded="true"] span:nth-child(2) { transform: translateY(4.5px) rotate(45deg); }
  .menu-button[aria-expanded="true"] span:nth-child(3) { transform: translateY(-4.5px) rotate(-45deg); }
  .site-nav { display: none; position: absolute; top: calc(100% + 0.5rem); left: 0; right: 0; padding: 1rem; flex-direction: column; align-items: stretch; background: var(--paper); border: 1px solid var(--line); border-radius: 0.8rem; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 0.7rem; }
  .site-nav a:not(.nav-cta)::after { display: none; }
  .nav-cta { text-align: center; }
  .hero { grid-template-columns: 1fr 0.8fr; gap: 3rem; min-height: 0; }
  h1 { font-size: clamp(3.4rem, 8vw, 5.4rem); }
  .hero-notes { display: none; }
  .journey-grid { grid-template-columns: 1fr 1fr; }
  .journey-card:last-child { grid-column: 1 / -1; min-height: 360px; }
  .games-grid { grid-template-columns: 1fr; }
  .game-card { max-width: 760px; width: 100%; margin: 0 auto; }
}

@media (max-width: 720px) {
  .site-header { width: calc(100% - 1rem); margin-top: 0.5rem; min-height: 68px; }
  .brand-mark { width: 36px; height: 36px; }
  .brand strong { font-size: 1.05rem; }
  .brand small { font-size: 0.61rem; }
  .hero { width: min(100% - 1.5rem, 580px); padding-top: 3.5rem; grid-template-columns: 1fr; gap: 3rem; }
  h1 { max-width: 10ch; font-size: clamp(3.25rem, 15vw, 5rem); }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-visual { width: 72%; max-width: 365px; margin-left: auto; margin-right: auto; }
  .section { width: min(100% - 1.5rem, 580px); }
  .journey-grid { grid-template-columns: 1fr; }
  .journey-card, .journey-card:last-child { min-height: 390px; grid-column: auto; }
  .companions { grid-template-columns: 1fr; }
  .companion-bios { grid-template-columns: 1fr; }
  .pip-card { width: 90%; height: auto; margin: 0 auto; }
  .play-section { width: 100%; }
  .game-card { padding: 1rem; }
  .hotspot { width: 2.6rem; }
  .wallpapers { width: calc(100% - 1.5rem); padding: 3rem 1.5rem; }
  .site-footer { width: calc(100% - 1.5rem); grid-template-columns: 1fr; text-align: center; }
  .footer-brand, .back-top { justify-self: center; }
}

@media (max-width: 420px) {
  .hero { padding-top: 2.8rem; }
  h1 { font-size: 3.3rem; }
  .hero-visual figcaption { width: 94%; }
  .object-list { gap: 0.3rem; }
  .object-list span { font-size: 0.69rem; }
  .postcard-note { font-size: 0.68rem; }
}

@media (max-width: 480px) {
  .site-header { gap: 0.5rem; padding-inline: 0.75rem; }
  .site-header .brand { gap: 0.45rem; }
  .site-header .brand-mark { width: 30px; height: 30px; }
  .site-header .brand small { display: block; font-size: 0.75rem; letter-spacing: 0; white-space: nowrap; }
  .language-control { width: 48px; height: 42px; position: relative; justify-content: center; border: 1px solid var(--line); border-radius: 0.45rem; background: var(--paper); }
  .language-short { display: block; font-size: 0.78rem; font-weight: 800; pointer-events: none; }
  .language-control select { width: 100%; max-width: none; height: 100%; min-height: 0; position: absolute; inset: 0; opacity: 0; }
  .language-control:focus-within { outline: 3px solid var(--brass); outline-offset: 2px; }
  .menu-button { width: 42px; flex: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Scene targets stay invisible until found; keyboard focus remains visible. */
#details-board img { width: 100%; height: auto; }
#details-board { cursor: crosshair; }
#details-board .hotspot { width: var(--w); height: var(--h); min-width: 24px; min-height: 24px; aspect-ratio: auto; border: 0; border-radius: 35%; background: transparent; cursor: crosshair; }
#details-board .hotspot::after { display: none; }
#details-board .hotspot:hover { transform: translate(-50%, -50%); background: transparent; }
#details-board .hotspot:hover span { opacity: 0; }
#details-board .hotspot:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
#details-board .hotspot:focus-visible span { opacity: 1; }
#details-board .hotspot.found { border: 2px solid #f1cc7d; background: rgba(241,204,125,0.15); box-shadow: 0 0 12px rgba(241,204,125,0.45); }
#details-board .hotspot.found::after { display: block; content: '✓'; color: white; text-shadow: 0 1px 4px #2f211b; }
.find-burst { position: absolute; width: 0; height: 0; pointer-events: none; z-index: 5; }
.find-burst::after { content: ''; position: absolute; width: 30px; height: 30px; border: 2px solid #ffe2a0; border-radius: 50%; animation: find-ring 800ms ease-out forwards; }
.find-burst i { position: absolute; width: 6px; height: 6px; background: #ffe2a0; box-shadow: 0 0 8px #ffc25b; border-radius: 1px; animation: find-spark 800ms ease-out forwards; }
@keyframes find-ring { from { transform: translate(-50%,-50%) scale(.5); opacity: 1; } to { transform: translate(-50%,-50%) scale(3); opacity: 0; } }
@keyframes find-spark { from { transform: translate(-50%,-50%) rotate(45deg); opacity: 1; } to { transform: translate(var(--dx),var(--dy)) rotate(135deg) scale(.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .find-burst { display: none; } }

.details-actions, .puzzle-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: auto; padding-top: 1rem; }
.details-actions .game-reset, .puzzle-actions .game-reset { margin-top: 0; }
.game-enlarge { min-height: 44px; padding: .65rem 1rem; border: 1px solid var(--terracotta-dark); border-radius: .4rem; background: var(--paper); color: var(--terracotta-dark); font: inherit; font-weight: 700; cursor: pointer; }
.game-enlarge:hover { background: var(--cream); }
.details-dialog { width: min(1180px, calc(100vw - 2rem)); max-width: none; max-height: calc(100dvh - 2rem); padding: 0; border: 1px solid var(--brass); border-radius: .7rem; background: var(--paper); color: var(--umber); overflow: auto; overscroll-behavior: contain; }
.details-dialog::backdrop { background: rgba(25, 20, 16, .8); backdrop-filter: blur(4px); }
.dialog-toolbar { display: flex; justify-content: flex-end; padding: .75rem 1rem; position: sticky; top: 0; z-index: 10; background: var(--paper); border-bottom: 1px solid var(--line); }
.details-dialog .game-card { width: 100%; max-width: none; margin: 0; box-shadow: none; opacity: 1; transform: none; }
.details-dialog #details-enlarge, .puzzle-dialog #puzzle-enlarge { display: none; }
.puzzle-dialog .puzzle-wrap { width: min(100%, 760px, calc(100dvh - 180px)); margin-inline: auto; }
@media (max-width: 600px) {
  .details-dialog { width: 100vw; max-height: 100dvh; border-radius: 0; }
  .details-dialog .game-card { padding: .75rem; }
}

/* On touch screens the full-screen scene starts enlarged and pans inside its viewport. */
@media (max-width: 900px) and (pointer: coarse) {
  .details-game .details-tap-enlarge { position: absolute; inset: 0; z-index: 6; display: flex; align-items: flex-end; justify-content: center; width: 100%; padding: 1rem; border: 0; border-radius: .45rem; background: linear-gradient(transparent 56%, rgba(47, 33, 27, .55)); color: white; cursor: zoom-in; }
  .details-tap-enlarge span { padding: .7rem 1rem; border-radius: 999px; background: var(--umber); color: white; font: inherit; font-weight: 800; box-shadow: 0 2px 14px rgba(0,0,0,.2); }
  #details-dialog { width: 100vw; max-height: 100dvh; border-radius: 0; --game-zoom: 1.8; }
  #details-dialog .dialog-toolbar { justify-content: space-between; align-items: center; gap: .5rem; padding: .5rem .75rem; }
  #details-dialog .details-zoom-controls { display: flex; align-items: center; gap: .3rem; }
  #details-dialog .details-zoom-controls .game-enlarge { min-width: 40px; min-height: 44px; padding: .4rem .55rem; }
  #details-zoom-status { min-width: 3.5rem; text-align: center; font-size: .85rem; font-weight: 800; }
  #details-close { min-width: 44px; padding: .55rem; font-size: 0; }
  #details-close::after { content: '✕'; font-size: 1rem; }
  #details-dialog .details-viewport { max-height: 58dvh; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y; }
  #details-dialog #details-board { width: calc(100% * var(--game-zoom)); max-width: none; }
  #details-dialog .details-tap-enlarge { display: none; }
}

.privacy-settings { display: inline-block; margin-top: .7rem; padding: .15rem .35rem; border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer; }
.privacy-settings[hidden], .analytics-consent[hidden] { display: none; }
.privacy-settings:hover { color: var(--terracotta-dark); }
.analytics-consent { position: fixed; bottom: 1rem; left: 50%; z-index: 200; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: min(850px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1rem 1.25rem; transform: translateX(-50%); border: 1px solid var(--brass); border-radius: .65rem; background: var(--paper); box-shadow: 0 14px 55px rgba(47,33,27,.3); }
.analytics-consent-copy { min-width: 0; }
.analytics-consent h2 { margin: 0 0 .2rem; font-size: 1.25rem; }
.analytics-consent p { margin: 0; color: var(--ink-soft); font-size: .9rem; line-height: 1.45; }
.analytics-consent details { margin-top: .4rem; font-size: .85rem; }
.analytics-consent summary { color: var(--terracotta-dark); font-weight: 700; cursor: pointer; }
.analytics-consent details p { margin-top: .4rem; font-size: .85rem; }
.analytics-consent a { color: var(--terracotta-dark); text-decoration: underline; }
.analytics-consent-actions { display: flex; flex: none; gap: .5rem; }
.analytics-consent-actions button { min-height: 44px; padding: .6rem .85rem; border: 1px solid var(--terracotta-dark); border-radius: .35rem; background: var(--paper); color: var(--terracotta-dark); font: inherit; font-size: .85rem; font-weight: 800; cursor: pointer; }
.analytics-consent-actions button:hover { background: var(--cream); }
.analytics-consent :focus-visible, .privacy-settings:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
@media (max-width: 700px) {
  .analytics-consent { bottom: .5rem; flex-direction: column; align-items: stretch; gap: .85rem; width: calc(100% - 1rem); padding: 1rem; }
  .analytics-consent-actions button { flex: 1; }
}
