:root {
  font-family: "Trebuchet MS", "Segoe UI", system-ui, sans-serif;
  color: #243b30;
  background: #ffeed0;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
a { color: inherit; }
:focus-visible { outline: 3px solid #16746c; outline-offset: 3px; }
.world {
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: linear-gradient(180deg, #fff3d8, #f7dfb5);
}
.world-brand, .world-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 12px clamp(16px, 4.4vw, 72px);
}
.brand { font-size: 12px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; color: #346653; }
.world h1 { font-size: clamp(31px, 5vw, 64px); line-height: 1; font-weight: 900; letter-spacing: -.04em; }
.byline { margin-top: 5px; font-size: 13px; font-weight: 700; color: #68543c; }
.view-controls { display: flex; flex-wrap: wrap; gap: 7px; justify-content: flex-end; }
.view-controls button, .world #open-qr {
  padding: 6px 12px;
  min-height: 34px;
  background: #fff7e7;
  color: #234e3d;
  border: 1px solid #4d755365;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}
.view-controls button[aria-pressed="true"] { background: #d8e8c9; }
.stage {
  position: relative;
  isolation: isolate;
  min-width: 0;
  min-height: 0;
  margin: 0 clamp(0px, 2vw, 24px);
}
.stage > * {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.landscape { filter: drop-shadow(0 4px 11px #6d472f32); }
.scene-copy { display: grid; gap: 5px; }
.story { font-size: clamp(17px, 2vw, 28px); font-weight: 800; line-height: 1.12; }
#scene-status { font-size: 14px; color: #604a34; }
.world-upload { display: flex; align-items: center; gap: 12px; flex: 0 1 365px; }
.world-upload img { display: block; background: white; border-radius: 10px; width: 80px; height: 80px; }
.upload-copy { display: grid; justify-items: start; gap: 4px; }
#upload-link { font-weight: 800; font-size: 17px; text-underline-offset: .18em; }
#qr-instruction { font-size: 13px; line-height: 1.25; }
#head-direction { display: flex; align-items: center; gap: 7px; margin: 14px 0 0; font-size: 15px; }
#head-left { width: 19px; height: 19px; accent-color: #79a967; }
@media (max-width: 650px) and (orientation: portrait) {
  .world { height: auto; min-height: 100dvh; grid-template-rows: minmax(min-content, 27vh) auto minmax(min-content, 1fr); }
  .world-brand, .world-footer { align-content: center; flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .world-footer { align-content: start; gap: 16px; }
  .world-brand { align-content: end; }
  .world h1 { font-size: clamp(37px, 11vw, 63px); }
  .stage { width: 100%; max-width: 100%; align-self: start; margin: 0; aspect-ratio: 1376 / 768; }
  .view-controls { justify-content: flex-start; }
  .world-upload { flex-basis: 100%; }
  .world-upload img { width: 78px; height: 78px; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .world-brand, .world-footer { padding-block: 6px; }
  .world h1 { font-size: clamp(26px, 7.5vh, 42px); }
  .world-upload img { width: 60px; height: 60px; }
  .world #open-qr { min-height: 25px; padding: 3px 8px; }
}
