.game-title {
  font: 400 clamp(40px, 6.7vw, 108px) / 1.02 Georgia;
  letter-spacing: -0.065em;
  margin: 18px 0;
  color: #e6f9ef;
  text-shadow: 0 3px 22px #01212d;
}
.game-title em {
  display: block;
  font: italic 0.55em/1.25 Georgia;
  letter-spacing: -0.04em;
  color: #e2dabd;
}
:root {
  color-scheme: dark;
  --ice: #c9f7ee;
  --gold: #ead7a4;
  --muted: #9cb9bb;
  --ink: #071725;
  font-family: Georgia, "Times New Roman", serif;
  color: #eef9f5;
  background: var(--ink);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
body {
  -webkit-user-select: none;
  user-select: none;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
}
button:active {
  transform: scale(0.97);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
[hidden] {
  display: none !important;
}
#world {
  touch-action: none;
  width: 100%;
  height: 100%;
  display: block;
  position: fixed;
  inset: 0;
}
.vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 45%,
    transparent 35%,
    #010c1d77 100%
  );
}
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(22px, env(safe-area-inset-top))
    max(30px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom))
    max(30px, env(safe-area-inset-left));
  z-index: 10;
  background: linear-gradient(90deg, #04121ce8, #07172533 75%);
}
.solid {
  background: #071725;
  flex-direction: column;
  text-align: center;
  z-index: 50;
}
.eyebrow {
  font:
    600 10px/1.5 system-ui,
    sans-serif;
  letter-spacing: 2.6px;
  color: var(--gold);
  text-transform: uppercase;
}
.small {
  font:
    12px/1.5 system-ui,
    sans-serif;
  color: var(--muted);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  font-weight: 400;
  font-size: 38px;
  line-height: 1.1;
}
h2 {
  font-weight: 400;
  font-size: 27px;
  line-height: 1.2;
}
p {
  line-height: 1.6;
}
.primary {
  background: #bcece0;
  color: #102c34;
  border: 1px solid #e1fff0;
  border-radius: 5px;
  padding: 15px 24px;
  font: bold 14px system-ui;
  box-shadow: 0 0 35px #9bebdc16;
  min-height: 48px;
}
.primary span {
  margin-left: 30px;
}
.quiet {
  background: transparent;
  border: 1px solid #c3dddc38;
  border-radius: 4px;
  padding: 12px 18px;
  font: 12px system-ui;
  color: #c9dddc;
  min-height: 44px;
}
.title-copy {
  margin-right: auto;
  position: relative;
  z-index: 1;
  padding-left: 5vw;
}
.logo {
  font-size: clamp(82px, 14vw, 160px);
  font-weight: 400;
  letter-spacing: -8px;
  line-height: 1.1;
  text-shadow: 0 0 50px #a8ded344;
}
.logo span {
  color: #b6ddc7;
}
.title-copy h2 {
  letter-spacing: 1px;
}
.lead {
  color: #b6cccd;
  margin: 18px 0 24px;
  font-size: 16px;
}
.chapter-select {
  display: flex; align-items: center; gap: 10px; margin-top: 12px;
  font: 12px system-ui; color: #bad1d3;
}
.chapter-select select {
  background: #0b2030; color: #e4efe8; border: 1px solid #8db6ba66;
  border-radius: 4px; padding: 7px; font: inherit;
}
#chapter-card, #castle {
  background: linear-gradient(0deg, #020914f5, #020914a6 24%, transparent 65%);
}
#chapter-card .subtitles,
#castle .subtitles {
  left: max(6%, env(safe-area-inset-left));
  right: max(6%, env(safe-area-inset-right));
  bottom: 4%;
  max-height: 92%;
}
#chapter-card h1, #castle h1 { margin: 5px 0; }
#chapter-card .card-task { color: #fadfa2; margin: 3px 0 10px; }
#castle .quiet { margin-top: 8px; }
.title-copy .small {
  margin-top: 14px;
}
.title-creature {
  position: absolute;
  left: 56%;
  top: 12%;
  width: 34%;
  height: 75%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.title-creature:before {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(ellipse, #54b7c225, transparent 65%);
  filter: blur(20px);
}
.title-creature img {
  height: 84%;
  max-width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 22px #8bcbd144);
  animation: float 6s ease-in-out infinite;
}
.title-creature span {
  font: 10px system-ui;
  letter-spacing: 1px;
  color: #a9c0c0;
  margin-top: 14px;
}
.moon-symbol {
  font-size: 72px;
  color: #bcece0;
}
.solid h1 {
  font-size: 28px;
}
.solid p {
  color: #a9c0c0;
  margin: 14px;
}
.solid progress {
  width: 220px;
  height: 4px;
  accent-color: #c9f7ee;
  margin-top: 12px;
}
.cinematic {
  background: linear-gradient(
    #020a16aa 0%,
    transparent 30%,
    transparent 55%,
    #020a16ed 100%
  );
  border-top: 22px solid #020914;
  border-bottom: 22px solid #020914;
  display: block;
}
.cinema-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.subtitles {
  position: absolute;
  bottom: 26px;
  left: 15%;
  right: 15%;
  text-align: center;
  text-shadow: 0 2px 8px #000;
}
.subtitles h2 {
  margin: 10px 0;
  font-size: 32px;
}
.subtitles p:not(.eyebrow) {
  font-size: 17px;
  line-height: 1.5;
}
.story-track {
  width: 130px;
  height: 2px;
  background: #ffffff2b;
  margin: 22px auto 0;
  overflow: hidden;
}
.story-track i {
  display: block;
  height: 100%;
  background: #c1e5de;
  width: 0;
}
.choice {
  flex-direction: column;
  background: #061723b8;
  gap: 20px;
}
.choice header {
  text-align: center;
}
.choice h1 {
  margin-top: 8px;
}
.choices {
  display: flex;
  gap: 20px;
  width: min(920px, 100%);
}
.choice-card {
  background: linear-gradient(130deg, #24414eaa, #0c2433da);
  border: 1px solid #a0cecc40;
  border-radius: 8px;
  display: flex;
  text-align: left;
  align-items: center;
  padding: 22px;
  flex: 1;
  gap: 20px;
  transition: background 0.2s;
  min-width: 0;
}
.choice-card:hover {
  background: #2a4a55dd;
  border-color: #bcece0;
}
.choice-card h2 {
  margin: 5px 0 10px;
}
.choice-card p {
  font: 13px/1.6 system-ui;
  color: #bed0d1;
}
.choice-card strong {
  display: block;
  font: 600 13px system-ui;
  color: #d3eab3;
  margin-top: 18px;
}
.choice-art {
  width: 75px;
  height: 145px;
  object-fit: contain;
  filter: drop-shadow(0 0 18px #8ae8ef44);
}
/* Tap a drawing to preview its power, then use the single Play button. */
#creature-picker {
  flex-direction: column;
  gap: clamp(8px, 2vh, 18px);
  background: radial-gradient(ellipse at top, #143444ed, #051520f2);
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
#creature-picker header {
  width: min(920px, 100%);
  position: relative;
  text-align: center;
}
#creature-picker h1 { font-size: clamp(24px, 4vh, 38px); }
#picker-back { position: absolute; left: 0; top: 50%; transform: translateY(-50%); font-size: 19px; }
#creature-cards {
  --cols: 3;
  width: min(920px, 100%);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  overflow: auto;
  gap: 8px;
  padding: 5px;
}
.dream-card {
  flex: 0 0 calc((100% + 8px) / var(--cols) - 8px);
  min-width: 0;
  position: relative;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 8px 2px;
  border: 1px solid #96cecb55;
  border-radius: 12px;
  background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--glow) 22%, #122433), #0b202e 80%);
  font-size: clamp(13px, 2vw, 20px);
}
#picker-play { flex: none; padding-block: 8px; }
.dream-art-preview {
  position: relative;
  width: 100%;
  height: clamp(65px, 14vh, 150px);
  display: grid;
  place-items: center;
}
.dream-card img { width: 90%; height: 100%; min-height: 0; object-fit: contain; }
.ability-badge { color: var(--ability-color); font: 650 clamp(11px, 1.65vw, 15px)/1.25 system-ui; }
.ability-demo {
  position: absolute;
  bottom: 8%;
  left: calc(50% + 14px);
  opacity: 0;
  pointer-events: none;
  font-size: clamp(23px, 4.6vh, 42px);
  filter: drop-shadow(0 0 9px var(--ability-color));
}
.dream-card:focus .ability-demo { animation: dream-spark 1.35s ease-out both; }
.dream-card[data-ability="glide"]:focus img { animation: dream-glide 1.2s ease-in-out; }
.dream-card[data-ability="roll"]:focus img { animation: dream-roll .72s ease-in-out; }
.dream-card[data-ability="mist"]:focus img { animation: dream-mist 1.3s ease-in-out; }
.dream-card:is([data-ability="ink"], [data-ability="mist"]) { --demo-rise: -13px; --demo-scale: 2.2; }
.dream-card[data-ability="claw"] { --demo-x: 27px; --demo-rise: -33px; }
.dream-card[data-ability="reveal"] { --demo-rise: -32px; --demo-scale: 1.45; }
@keyframes dream-spark {
  from { opacity: 0; transform: scale(.35); }
  27%, 58% { opacity: 1; }
  to { opacity: 0; transform: translate(var(--demo-x, 9px), var(--demo-rise, -31px)) scale(var(--demo-scale, 1.1)); }
}
@keyframes dream-glide { 45% { transform: translate(13%, -15%) rotate(-12deg); } }
@keyframes dream-roll { 45% { transform: translateX(13%) rotate(180deg); } to { transform: rotate(360deg); } }
@keyframes dream-mist { 50% { opacity: .25; } }
.dream-card:hover, .dream-card[aria-current] { border-color: var(--glow); }
.dream-card[aria-current]::before {
  content: '✓' / ''; position: absolute; top: 5px; right: 8px; color: var(--glow); font: bold 16px system-ui;
}
@media (max-height: 520px) {
  #creature-cards { --cols: 5; }
  .dream-art-preview { height: clamp(32px, 15vh, 76px); }
  .dream-card { padding-block: 5px; font-size: clamp(12px, 1.85vw, 16px); }
}
@media (prefers-reduced-motion: reduce) {
  .dream-card:focus img, .dream-card:focus .ability-demo { animation: none; }
  .dream-card:focus .ability-demo { opacity: 1; }
}
/* Keep short hints clear of the limb at the foot of the view. */
#hud:has(#player-face:not([hidden])) #toast {
  bottom: auto;
  top: max(78px, calc(env(safe-area-inset-top) + 60px));
  left: 28%; right: 28%;
}
#player-face {
  width: 44px; height: 44px; padding: 4px; object-fit: contain;
  background: #0b1f2cd9; border: 1px solid var(--glow); border-radius: 50%;
  margin-right: -8px;
}
.trainer-art {
  border: 1px solid #ffe0aa55;
  border-radius: 50%;
  width: 75px;
  min-width: 75px;
  height: 75px;
  text-align: center;
  line-height: 75px;
  font-size: 54px;
  color: #ffe5b5;
  background: radial-gradient(#ebbd6630, transparent);
}
#hud {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}
.hud-top {
  position: absolute;
  left: max(24px, env(safe-area-inset-left));
  right: max(24px, env(safe-area-inset-right));
  top: max(18px, env(safe-area-inset-top));
  display: flex;
  gap: 25px;
  align-items: flex-start;
}
.chapter {
  width: 130px;
  text-shadow: 0 2px 4px #000;
  flex-shrink: 0;
}
.chapter strong {
  display: block;
  font-size: 20px;
  font-weight: 400;
  margin-top: 3px;
}
.quest-box {
  pointer-events: auto; display: flex; align-items: center; gap: .65em;
  min-height: 46px; padding: 6px 14px; color: #efffeb;
  border: 1px solid #c6ebe780; border-radius: 24px; background: #091b29df;
  font: 600 clamp(17px,2.3vw,23px)/1.2 system-ui;
}
#goal-arrow { color: #ffdf91; font-size: 1.4em; }
#quest { text-align: left; }
#guide:focus-visible { outline: 2px solid #ffe49e; }
.icon-button {
  margin-left: auto;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border: 1px solid #a4c6ce44;
  background: #071725aa;
  border-radius: 50%;
  pointer-events: auto;
  font: 18px system-ui;
}
.health {
  position: absolute;
  top: max(90px, calc(env(safe-area-inset-top) + 72px));
  left: max(25px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#hearts {
  color: #c4eacb;
  letter-spacing: 5px;
  font: 20px system-ui;
  text-shadow: 0 0 10px #9eedb788;
}
#extra-heart { color: var(--ability-color); text-shadow: 0 0 9px var(--ability-color); }
#net-status {
  font: bold 17px system-ui;
  color: #ffe2af;
}
#crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border: 1px solid #e3fcf133;
  border-radius: 50%;
}
#crosshair i {
  position: absolute;
  width: 4px;
  height: 4px;
  background: #d8ffed;
  box-shadow: 0 0 8px #efffed;
  left: 8px;
  top: 8px;
  border-radius: 50%;
}
#crosshair.ready {
  border-color: #e7ffc4;
  box-shadow: 0 0 12px #bded9c55;
}
#target-label {
  position: absolute;
  top: calc(50% + 22px);
  left: 20%;
  right: 20%;
  text-align: center;
  font: bold 17px system-ui;
  text-shadow: 0 2px 6px #000;
}
#look-zone {
  position: absolute;
  left: 30%;
  top: 75px;
  right: 0;
  bottom: 0;
  pointer-events: auto;
  touch-action: none;
}
.controls {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
#joystick {
  position: absolute;
  bottom: max(25px, env(safe-area-inset-bottom));
  left: max(35px, env(safe-area-inset-left));
  width: 116px;
  height: 116px;
  border: 1px solid #d3f5ee45;
  border-radius: 50%;
  background: radial-gradient(#17334466, #17334422);
  box-shadow: inset 0 0 24px #8ac6c00e;
  pointer-events: auto;
  touch-action: none;
}
#knob {
  position: absolute;
  left: 35px;
  top: 35px;
  width: 44px;
  height: 44px;
  background: #c4e4de40;
  border: 1px solid #dcfff165;
  border-radius: 50%;
  box-shadow: 0 0 16px #8ac6c033;
}
#joystick > span {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  letter-spacing: 2px;
  font: 9px system-ui;
  color: #c0d5d0;
}
.actions {
  position: absolute;
  right: max(26px, env(safe-area-inset-right));
  bottom: max(25px, env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  gap: 18px;
  pointer-events: auto;
}
.action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 86px;
  height: 86px;
  border-radius: 50%;
  border: 1px solid #d3f5ee77;
  background: #153b49cc;
  box-shadow:
    inset 0 0 30px #9ae9d312,
    0 0 24px #06172566;
  font: 600 12px system-ui;
  touch-action: none;
}
.action-icon {
  font: 32px Georgia;
  line-height: 1.1;
  color: #b8fff2;
}
.action.attack {
  width: 100px;
  height: 100px;
  background: #27514bd9;
  border-color: #d1f7cba0;
}
.action small {
  font-size: 7px;
  letter-spacing: 1px;
  opacity: 0.5;
  margin-top: 5px;
}
.action.cooldown {
  opacity: 0.4;
}
.action.catch {
  margin-bottom: 4px;
}
.action.catch .action-icon {
  color: #f9e5ad;
}
#ability {
  --charge: 1;
  background: radial-gradient(circle, #172a3b 53%, transparent 56%),
    conic-gradient(var(--ability-color) calc(100% * var(--charge)), #152638ed 0);
  border-color: var(--ability-color);
  box-shadow: 0 0 16px color-mix(in srgb, var(--ability-color) 50%, transparent);
}
#ability[aria-disabled="true"] { box-shadow: none; }
#ability[aria-disabled="true"] .action-icon { opacity: .55; }
#ability-flash {
  position: absolute;
  top: 53%;
  left: 50%;
  font: 38px system-ui;
  opacity: 0;
  filter: drop-shadow(0 0 14px var(--ability-color));
}
#ability-flash.cast { animation: ability-cast 1.1s ease-out both; }
@keyframes ability-cast {
  from { opacity: 0; transform: translate(-50%, 20px) scale(.65); }
  25%, 54% { opacity: 1; }
  to { opacity: 0; transform: translate(-50%, -48px) scale(1.25); }
}
#ability-aura.mist {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse, transparent 25%, #cceaf001 43%, #b1d2dd77 100%);
}
@media (prefers-reduced-motion: reduce) {
  #ability-flash.cast { animation-name: ability-glow; transform: translateX(-50%); }
  @keyframes ability-glow { 25%, 54% { opacity: 1; } }
}
#look-hint {
  position: absolute;
  bottom: 26px;
  left: 35%;
  font: 10px system-ui;
  color: #cfdfdb88;
}
#toast {
  position: absolute;
  bottom: 30px;
  left: 24%;
  right: 29%;
  text-align: center;
  font: 13px/1.45 system-ui;
  background: #061725dd;
  border: 1px solid #93c6bc40;
  border-radius: 8px;
  padding: 12px 18px;
  opacity: 0;
  transition: opacity 0.2s;
}
#toast.visible {
  opacity: 1;
}
#hurt {
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 90px #ffb28e;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
#hurt.flash {
  opacity: 0.65;
}
.modal {
  background: #041320ba;
  backdrop-filter: blur(7px);
}
.panel {
  width: min(570px, 100%);
  max-height: 100%;
  text-align: center;
}
.panel,
#chapter-card .subtitles,
#castle .subtitles {
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  padding: 5px; /* Keep button focus outlines inside the scroll container. */
}
.panel h1 {
  margin: 10px 0 18px;
}
.panel p {
  font: 14px/1.7 system-ui;
  color: #c4d9d7;
}
.panel .small {
  font-size: 11px;
  margin: 16px 0;
}
.panel > .primary {
  margin-top: 22px;
}
.panel > .quiet {
  display: block;
  margin: 12px auto 0;
  border: 0;
}
.end-symbol {
  font-size: 68px;
  line-height: 1.1;
  color: #d5efb1;
  text-shadow: 0 0 25px #b2ed9466;
}
#ending:has(#naga-portrait:not([hidden])) {
  flex-direction: row;
  gap: clamp(12px, 4vw, 64px);
}
#naga-portrait {
  width: min(30vw, 48vh);
  max-height: 72vh;
  object-fit: contain;
  filter: drop-shadow(0 0 18px #778cc166);
}
.ending-panel h1 {
  font-size: 38px;
  margin: 6px 0 12px;
}
.ending-panel h2 {
  font-size: 24px;
  margin: 20px 0 10px;
  color: #d8eabd;
}
.ending-panel #naga-tease {
  font-family: Georgia;
  font-style: italic;
  font-size: 14px;
  color: #a2bac2;
}
.ending-panel #naga-tease .eyebrow {
  display: block;
  margin-top: 10px;
  font-style: normal;
  font-size: 9px;
}
.sound-button {
  position: fixed;
  right: max(26px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 15;
  background: transparent;
  border: 0;
  padding: 7px;
  font: 10px system-ui;
  letter-spacing: 1px;
  color: #b1cbc6;
}
.playing .sound-button {
  top: max(75px, calc(env(safe-area-inset-top) + 57px));
  bottom: auto;
  right: max(30px, env(safe-area-inset-right));
}
#rotate {
  display: none;
  z-index: 100;
}
.rotate-icon {
  font: 70px system-ui;
  color: #bcece0;
  margin-bottom: 20px;
}
noscript {
  position: fixed;
  inset: 0;
  background: #071725;
  padding: 30px;
  z-index: 200;
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-12px) rotate(1deg);
  }
}
@media (max-height: 520px) {
  .screen {
    padding: max(16px, env(safe-area-inset-top))
      max(28px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(28px, env(safe-area-inset-left));
  }
  .title-copy {
    padding-left: 3vw;
  }
  .logo {
    font-size: 90px;
    line-height: 1;
  }
  .title-copy h2 {
    font-size: 24px;
  }
  .lead {
    font-size: 14px;
    margin: 12px 0 16px;
  }
  .title-copy .small {
    font-size: 10px;
    margin-top: 10px;
  }
  .primary {
    padding: 12px 22px;
  }
  .choice {
    gap: 12px;
  }
  .choice h1 {
    font-size: 28px;
  }
  .choice-card {
    padding: 15px;
    gap: 12px;
  }
  .choice-card h2 {
    font-size: 24px;
    margin: 4px 0 6px;
  }
  .choice-card p {
    font-size: 12px;
    line-height: 1.5;
  }
  .choice-card strong {
    margin-top: 12px;
    font-size: 12px;
  }
  .choice-art {
    width: 56px;
    height: 115px;
  }
  .trainer-art {
    min-width: 56px;
    width: 56px;
    height: 56px;
    font-size: 42px;
    line-height: 56px;
  }
  .eyebrow {
    font-size: 9px;
    letter-spacing: 1.8px;
  }
  .choice > .small {
    font-size: 10px;
  }
  .subtitles h2 {
    font-size: 27px;
  }
  .subtitles p:not(.eyebrow) {
    font-size: 15px;
  }
  .subtitles {
    bottom: 14px;
  }
  .cinematic {
    border-width: 14px;
  }
  .story-track {
    margin-top: 14px;
  }
  .hud-top {
    top: max(12px, env(safe-area-inset-top));
    gap: 15px;
    left: max(22px, env(safe-area-inset-left));
    right: max(22px, env(safe-area-inset-right));
  }
  .chapter {
    width: 115px;
  }
  .chapter strong {
    font-size: 17px;
  }
  .quest-box {
    padding: 5px 12px;
  }
  .health {
    top: max(74px, calc(env(safe-area-inset-top) + 62px));
    left: max(22px, env(safe-area-inset-left));
  }
  .playing .sound-button {
    top: max(75px, calc(env(safe-area-inset-top) + 63px));
  }
  #joystick {
    width: 105px;
    height: 105px;
    bottom: max(22px, env(safe-area-inset-bottom));
    left: max(30px, env(safe-area-inset-left));
  }
  #knob {
    top: 30px;
    left: 30px;
  }
  .actions {
    bottom: max(22px, env(safe-area-inset-bottom));
    right: max(25px, env(safe-area-inset-right));
    gap: 14px;
  }
  .action {
    width: 76px;
    height: 76px;
    font-size: 11px;
  }
  .action.attack {
    width: 88px;
    height: 88px;
  }
  .action small {
    display: none;
  }
  #look-hint {
    font-size: 9px;
    bottom: 22px;
  }
  #toast {
    font-size: 17px;
    bottom: 22px;
    left: 23%;
    right: 29%;
    padding: 9px 13px;
  }
  .panel h1 {
    font-size: 29px;
    margin: 8px 0 12px;
  }
  .panel p {
    font-size: 12px;
  }
  .panel .small {
    margin: 10px 0;
  }
  .panel > .primary {
    margin-top: 14px;
  }
  .panel > .quiet {
    margin-top: 4px;
  }
  .end-symbol {
    font-size: 40px;
  }
  .ending-panel h1 {
    font-size: 30px;
  }
  .ending-panel h2 {
    font-size: 21px;
    margin: 10px 0 6px;
  }
  .ending-panel #naga-tease {
    font-size: 12px;
    line-height: 1.5;
  }
  .ending-panel #naga-tease .eyebrow {
    margin-top: 5px;
  }
}
@media (orientation: portrait) {
  #rotate {
    display: flex;
  }
}
@media (prefers-reduced-motion: reduce) {
  .title-creature img {
    animation: none;
  }
  * {
    transition: none !important;
  }
}

.narrator-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  min-height: 44px;
}
.panel > .narrator-toggle { display: flex; margin: 12px auto 0; border: 1px solid #c3dddc38; }
.narrator-toggle b { font-weight: 700; color: #bdf2d8; }
.narrator-toggle.off b { color: #f0b9a6; }
.narrator-toggle .slash { display: none; }
.narrator-toggle.off .slash { display: inline; }
.narrator-toggle.off .waves { display: none; }

/* Quiet "add to home screen" hint: icon only; the text appears on tap (iOS). */
.install-hint { display: inline-flex; align-items: center; gap: 8px; margin: 12px 0 0 8px; min-height: 44px; }
.install-hint[hidden] { display: none; }
.install-hint .install-tip { display: none; font: 12px system-ui; max-width: 230px; text-align: left; }
.install-hint.tip .install-tip { display: inline; }
