:root {
  --ink: #213633;
  --paper: #fbf8ef;
  --line: #d8d8c9;
  --orange: #b84923;
  --leaf: #245741;
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font:
    1rem/1.55 Manrope,
    Arial,
    sans-serif;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button,
a,
input {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid #126fb0;
  outline-offset: 4px;
}
[hidden] {
  display: none !important;
}
.wrap {
  width: min(1180px, calc(100% - 64px));
  margin: auto;
}
.mast,
.foot,
.mast nav,
.actions,
.section-heading,
.caption,
.toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
}
.mast,
.foot,
.section-heading,
.caption {
  justify-content: space-between;
}
.mast {
  min-height: 78px;
  border-bottom: 1px solid var(--line);
}
.mast nav {
  gap: 28px;
}
.mast a,
.foot a,
.world,
.animal-grid a {
  text-decoration: none;
}
.mast nav > a:hover,
.foot a:hover {
  text-decoration: underline;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.06em;
}
.wordmark i {
  font-family: Georgia, serif;
  font-size: 2.2rem;
  font-style: normal;
  color: var(--orange);
  line-height: 1;
}
.foot {
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding: 22px 0 32px;
}
.foot .wordmark {
  font-size: 1.15rem;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  line-height: 1.06;
  letter-spacing: -0.052em;
}
h1 {
  font-size: clamp(3.2rem, 7vw, 6.5rem);
  font-weight: 800;
}
h2 {
  font-size: clamp(2rem, 3.8vw, 3.7rem);
}
h1 em {
  font-family: Georgia, serif;
  font-weight: 500;
  color: var(--orange);
}
.intro {
  padding: clamp(40px, 6vw, 84px) 0 38px;
}
.intro h1 {
  max-width: 1040px;
}
.intro p,
.hero-copy p,
.page-head p {
  max-width: 670px;
  font-size: clamp(1.05rem, 1.55vw, 1.3rem);
  margin-top: 18px;
}
.world-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.world {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid #c8d6cc;
  display: block;
}
.world.land {
  border-color: #e3cba1;
}
.view,
.landscape {
  position: relative;
  overflow: hidden;
  background-position: center;
  background-size: cover;
}
.view {
  height: clamp(190px, 24vw, 335px);
}
.water {
  background-image: url('../assets/landing/worlds/fish.webp');
  background-position: center 54%;
}
.plain,
.landscape,
.room {
  background-image: url('../assets/safari/background.jpg');
}
.postcard-animal {
  position: absolute;
  right: 9%;
  bottom: 4%;
  height: 76%;
  width: 65%;
}
.postcard-animal svg,
.hero-lion svg,
.hero-eagle svg,
.animal-grid svg {
  height: 100%;
  width: 100%;
  display: block;
}
.caption {
  padding: 20px 26px;
  background: #e6f2ed;
}
.land .caption {
  background: #faeac9;
}
.caption h2 {
  margin-top: 3px;
}
.caption small,
.hero-copy small {
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  font-size: 0.85rem;
}
.pill,
button.pill,
summary.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid currentColor;
  border-radius: 28px;
  padding: 9px 19px;
  font-weight: 700;
  background: var(--paper);
  text-decoration: none;
  line-height: 1.3;
  text-align: center;
}
.pill.dark {
  background: var(--ink);
  color: white;
  border-color: var(--ink);
}
.pill:hover,
.world:hover .pill {
  background: #dce8d9;
  color: var(--ink);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
.actions,
.toolbar {
  flex-wrap: wrap;
}
.instructions,
.collection {
  padding-top: clamp(48px, 7vw, 90px);
}
.instructions ol {
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  padding: 0;
}
.instructions li {
  counter-increment: step;
  border-top: 1px solid var(--line);
  padding: 18px 0 4px;
}
.instructions li:before {
  content: counter(step) '.';
  color: var(--orange);
  font: italic 1.45rem Georgia;
  margin-right: 0.5rem;
}
.instructions b {
  font-size: 1.15rem;
}
.instructions li span {
  display: block;
  margin-top: 8px;
  color: #48534c;
}
.animal-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: stretch;
  gap: 40px;
  padding-top: 38px;
}
.hero-copy {
  padding: clamp(24px, 4vw, 78px) 0;
}
.hero-copy h1 {
  margin-top: 16px;
}
.hero-copy .actions {
  margin-top: 26px;
  flex-wrap: wrap;
}
.landscape {
  border-radius: 20px;
  min-height: 310px;
}
.hero-lion,
.hero-eagle {
  position: absolute;
}
.hero-lion {
  width: 62%;
  height: 44%;
  bottom: 5%;
  left: 15%;
}
.hero-eagle {
  width: 29%;
  height: 28%;
  right: 8%;
  top: 12%;
}
.animal-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 22px;
}
.animal-grid a {
  padding: 16px 18px;
  background: #f4e6c9;
  border-radius: 18px;
}
.animal-grid a:nth-child(2) {
  background: #f5ddcc;
}
.animal-grid a:nth-child(3) {
  background: #e2ead2;
}
.animal-grid a:nth-child(4) {
  background: #deeaed;
}
.animal-grid a > div {
  aspect-ratio: 1.64;
}
.animal-grid b {
  font-size: 1.25rem;
}
.animal-grid a:hover b {
  text-decoration: underline;
}
.page-head {
  padding: 36px 0 24px;
}
.page-head h1 {
  font-size: clamp(2.6rem, 5vw, 4.6rem);
}
.print-tools,
.scan-panel,
.connect-panel {
  border: 1px solid var(--line);
  background: white;
  border-radius: 18px;
  padding: 22px;
}
.print-tools,
.scan-panel {
  max-width: 820px;
  margin: 0 auto 18px;
}
.print-tools label,
.connect-panel label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}
.print-tools select,
input[type='text'] {
  background: white;
  border: 1px solid #929a8b;
  border-radius: 8px;
  padding: 8px 12px;
}
.sheet {
  width: min(860px, 100%);
  margin: 18px auto;
  background: white;
  box-shadow: 0 6px 28px #393c3214;
}
.sheet svg {
  display: block;
  width: 100%;
  height: auto;
}
.scan-panel p {
  margin: 12px 0;
}
.scan-panel h2,
.connect-panel h2 {
  font-size: 1.6rem;
}
.scan-panel video,
.scan-panel canvas {
  display: block;
  width: min(100%, 560px);
  max-height: 55vh;
  object-fit: contain;
  margin: 12px auto;
  border-radius: 12px;
  background: #eceddf;
}
.scan-panel [role='status'],
.message {
  color: var(--leaf);
  font-weight: 650;
}
.scan-panel input[type='file'] {
  max-width: 100%;
}
.scan-panel details {
  margin: 12px 0;
}
.code-input {
  text-transform: uppercase;
  width: 9em;
}
.scan-panel form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.scan-panel .actions {
  margin-top: 14px;
}
.room {
  background-size: cover;
  background-position: center;
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}
.room canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: manipulation;
}
.room-hud {
  position: absolute;
  inset: 14px 16px auto;
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  pointer-events: none;
}
.room-hud > * {
  pointer-events: auto;
}
.room-hud a,
.room-hud button,
.room-actions a,
.room-actions button {
  box-shadow: 0 2px 12px #332b222e;
}
.room-actions {
  position: absolute;
  bottom: max(15px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 8px;
  width: max-content;
  max-width: 96%;
  align-items: center;
}
.room-actions .pill {
  font-size: 0.95rem;
}
.scene-label {
  position: absolute;
  left: 18px;
  bottom: 76px;
  background: #fbf8efed;
  padding: 4px 12px;
  border-radius: 10px;
  font-weight: 650;
  pointer-events: none;
}
dialog {
  color: var(--ink);
  max-width: min(490px, 92vw);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  background: var(--paper);
}
dialog::backdrop {
  background: #17231b80;
}
dialog h2 {
  font-size: 1.7rem;
}
dialog p {
  margin: 10px 0;
}
dialog img {
  display: block;
  margin: 12px auto;
  width: min(180px, 60vw);
}
.room-code {
  font: 700 1.35rem monospace;
  letter-spacing: 0.12em;
}
.room .status {
  position: absolute;
  top: 75px;
  left: 16px;
  max-width: 85%;
  background: var(--paper);
  border-radius: 12px;
  padding: 6px 10px;
}
.room .status:empty {
  display: none;
}
@media (max-width: 750px) {
  .wrap {
    width: calc(100% - 34px);
  }
  .mast {
    min-height: 66px;
  }
  .mast nav {
    gap: 12px;
    font-size: 0.9rem;
  }
  .mast .pill {
    padding: 8px 12px;
  }
  .world-grid,
  .animal-hero {
    gap: 15px;
  }
  .caption {
    padding: 14px;
    align-items: end;
  }
  .caption .pill {
    padding: 7px 12px;
    font-size: 0.85rem;
  }
  .instructions ol {
    gap: 15px;
  }
  .animal-grid {
    grid-template-columns: 1fr 1fr;
  }
  .animal-hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-copy {
    padding: 15px 0;
  }
  .landscape {
    min-height: 260px;
  }
  .room-hud {
    inset: 8px 8px auto;
  }
  .room-actions {
    bottom: 8px;
  }
  .room-actions .pill {
    padding: 8px 12px;
  }
}
@media (max-width: 570px) {
  .world-grid,
  .instructions ol {
    grid-template-columns: 1fr;
  }
  .intro {
    padding: 35px 0 22px;
  }
  .view {
    height: 200px;
  }
  .caption {
    padding: 13px 20px;
  }
  .wordmark {
    font-size: 1.18rem;
  }
  .wordmark i {
    font-size: 1.8rem;
  }
  .actions,
  .toolbar {
    gap: 8px;
  }
  .room .pill {
    font-size: 0.85rem;
  }
  .section-heading {
    align-items: end;
  }
  .instructions ol {
    gap: 4px;
  }
  .mast nav a {
    font-size: 0.84rem;
  }
  .print-tools,
  .scan-panel {
    padding: 16px;
  }
  .room-actions {
    flex-wrap: wrap;
  }
  .foot {
    margin-top: 28px;
  }
}
@page {
  size: A4 landscape;
  margin: 0;
}
@media (max-width: 360px) {
  .animal-landing .mast,
  .expedition-landing .mast {
    flex-wrap: wrap;
    gap: 0 12px;
    padding-block: 8px;
  }
  .animal-hero h1 {
    font-size: clamp(2.4rem, 13vw, 2.85rem);
  }
}

@media print {
  body.print-page {
    margin: 0;
    background: white;
  }
  .print-page .mast,
  .print-page .page-head,
  .print-page .print-tools,
  .print-page .foot {
    display: none;
  }
  .print-page main,
  .print-page .sheet {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: none;
    box-shadow: none;
  }
  .print-page .sheet svg {
    width: 100%;
    height: auto;
    max-height: 100vh;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.upload {
  cursor: pointer;
}
.upload:focus-within {
  outline: 3px solid #126fb0;
  outline-offset: 4px;
}
.room .safari-volume {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.world.dino .view, [data-world="dino"] .landscape, [data-world="dino"] .room {
  background-image: url('../assets/worlds/dino.jpg');
}
.world.space .view, [data-world="space"] .landscape, [data-world="space"] .room {
  background-image: url('../assets/worlds/space.jpg');
}
.world.dino .caption { background: #e3edcd; }
.world.space .caption { background: #e7e3f3; }
.world.space .postcard-animal { top: 9%; right: 9%; transform: rotate(-12deg); }
.room {
  display: grid;
  grid-template-rows: auto auto 1fr auto auto;
  gap: 8px;
  padding: max(12px,env(safe-area-inset-top)) max(14px,env(safe-area-inset-right))
    max(12px,env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));
}
.room #scene { position: absolute; inset: 0; }
.room .room-hud, .room .status, .room .scene-label, .room .room-actions {
  position: relative;
  inset: auto;
  z-index: 1;
}
.room .room-hud { grid-row: 1; }
.room .status { grid-row: 2; justify-self: start; margin: 0; }
.room .scene-label { grid-row: 4; justify-self: start; }
.room .room-actions {
  grid-row: 5;
  justify-self: center;
  transform: none;
  padding: 5px;
  border: 1px solid #fff9;
  border-radius: 28px;
  background: #fffaf0e8;
  box-shadow: 0 3px 16px #28342627;
  max-width: 100%;
  gap: 4px;
}
.room-actions .pill { border-color: transparent; box-shadow: none; background: transparent; }
.room-actions .pill.dark { background: var(--ink); color: white; }
.room-actions .pill:focus-visible { outline-offset: 0; }
.room-hud .actions { flex-wrap: nowrap; }
.invite-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-block: 16px;
  border-radius: 12px;
  background: #eaf0e4;
  padding: 12px 16px;
}
.invite-code span, .invite-code strong { display: block; }
.invite-code span { font-size: .9rem; }
#copy-status:empty { display: none; }
dialog { max-height: calc(100dvh - 24px); overflow-y: auto; overscroll-behavior: contain; }
dialog[open] { box-shadow: 0 12px 60px #17231b3d; }
dialog .actions { align-items: center; }
#camp ul { list-style: none; margin: 10px 0 18px; padding: 0; }
#camp li { padding: 4px 0; }
@media (max-width: 570px) {
  .room .room-actions {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    width: min(100%,390px);
    border-radius: 20px;
  }
  .room .room-hud { gap: 4px; }
  .room-hud .actions { gap: 4px; }
  .room-hud .pill { padding-inline: 11px; }
}
@media (max-height: 460px) and (orientation: landscape) {
  .room { padding-block: 5px; gap: 3px; }
  .room .scene-label { margin-left: 2px; }
  .room .room-actions { padding: 2px; }
  dialog img { width: min(145px,30vh); }
}
.world.land .view, body[data-world="safari"] .landscape, .animal-hero .landscape {
  background-image: url('../assets/landing/worlds/safari.webp');
}
.world.dino .view, [data-world="dino"] .animal-hero .landscape {
  background-image: url('../assets/landing/worlds/dino.webp');
}
.world.space .view, [data-world="space"] .animal-hero .landscape {
  background-image: url('../assets/landing/worlds/space.webp');
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 5;
  transform: translateY(-160%);
  border-radius: 12px;
  padding: 10px 18px;
  background: var(--ink);
  color: white;
}
.skip-link:focus { transform: none; }
.world-home .intro {
  display: grid;
  grid-template-columns: 1.45fr minmax(0, 1fr);
  align-items: center;
  gap: clamp(16px, 4vw, 70px);
  padding-block: clamp(36px, 5vw, 72px);
}
.intro-copy h1 { font-size: clamp(3.1rem, 6.8vw, 6rem); }
.intro-copy p { max-width: 47ch; color: #45564f; }
.intro-copy > a { margin-top: 20px; }
.paper-demo {
  position: relative;
  isolation: isolate;
  min-width: 0;
  aspect-ratio: 1.52;
  background: radial-gradient(ellipse closest-side, #e8d4a5aa, transparent);
}
.demo-sheet {
  position: absolute;
  display: grid;
  place-items: center;
  background: #fffefa;
  border: 1px solid #d7d0c0;
  border-radius: 3px;
  box-shadow: 2px 8px 18px #3e412426;
}
.demo-sheet span { width: 94%; display: block; }
.demo-sheet svg { display: block; width: 100%; height: auto; }
.outline-sheet { inset: 5% 20% 25% 2%; transform: rotate(-12deg); }
.painted-sheet {
  inset: 24% 6% 4% 20%;
  transform: rotate(8deg);
  background: #fff4d1;
  border: 6px solid #fffef8;
}
.pencil-set {
  position: absolute;
  inset: auto 0 4% auto;
  width: 27%;
  display: grid;
  gap: 3px;
  transform: rotate(-50deg);
}
.pencil-set i {
  height: 7px;
  background: linear-gradient(180deg,#fff5,transparent 50%,#0002),var(--paint,#cb632e);
  border-radius: 1px 3px 3px 1px;
  position: relative;
}
.pencil-set i::before {
  content: '';
  position: absolute;
  right: 100%;
  border-block: 3.5px solid transparent;
  border-right: 9px solid #c19b6d;
}
.pencil-set i:nth-child(2) { --paint: #577c6b; margin-left: 8%; }
.pencil-set i:nth-child(3) { --paint: #d6ae43; margin-left: 15%; }
.world-shelf { scroll-margin-top: 16px; }
.world-shelf > h2 { margin-bottom: 20px; font-size: clamp(2rem,3.6vw,3.25rem); }
.world-grid { gap: clamp(14px,2vw,24px); }
.world { box-shadow: 0 3px 0 #273b2a0d; }
.world .view { height: clamp(160px,19vw,258px); }
.world .caption { padding: clamp(14px,1.6vw,23px); }
.caption h3 { margin-top: 3px; font-size: clamp(1.8rem,3.1vw,2.9rem); }
.caption small { letter-spacing: .06em; font-size: .79rem; }
.caption .pill { white-space: nowrap; background: #fffaf0ac; }
.world-grid > a, .animal-grid > a { transition: transform 180ms ease, box-shadow 180ms ease; }
.world-grid > a:focus-visible, .animal-grid > a:focus-visible { outline-offset: 3px; }
.mast nav > a:not(.pill), .foot > a { display: inline-flex; align-items: center; min-height: 44px; }
.section-heading > a { flex-shrink: 0; }
.hero-copy > small { color: var(--leaf); }
.hero-copy > p { color: #47564e; }
.animal-grid a { border: 1px solid #283e3017; }
.instructions li { padding-top: 20px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .world-grid > a:hover, .animal-grid > a:hover { transform: translateY(-3px); box-shadow: 0 7px 18px #273b2a16; }
}
@media (max-width: 750px) {
  .world-home .intro { grid-template-columns: 1.4fr .75fr; }
  .intro-copy h1 { font-size: clamp(2.7rem,7.4vw,3.8rem); }
}
@media (max-width: 570px) {
  .world-home .intro { grid-template-columns: 1fr; gap: 0; }
  .paper-demo { display: none; }
  .world-home .intro { padding-block: 32px 37px; }
  .world .view { height: auto; aspect-ratio: 2.25; }
  .caption .pill { font-size: .85rem; }
  .section-heading { align-items: baseline; flex-wrap: wrap; gap: 8px 16px; }
}
.expedition-landing .expedition-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
[data-world="space"] .hero-eagle { width: 44%; top: 13%; }
@media (max-width: 570px) {
  .expedition-landing .expedition-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .expedition-grid b { overflow-wrap: anywhere; }
}
