:root {
  --night: #071d2a;
  --deep: #0d3042;
  --indigo: #1e4d66;
  --water: #4faab2;
  --foam: #f4f0e7;
  --sand: #d8c7a1;
  --buoy: #e96b3c;
  --sun: #f1b563;
  --safe: #7fd19a;
  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--night); }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--foam);
  background:
    radial-gradient(circle at 50% -16%, rgba(79, 170, 178, .28), transparent 43%),
    linear-gradient(180deg, #123e51 0, var(--night) 68%);
  font-family: var(--sans);
}

button, a { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }

button:focus-visible, a:focus-visible, #game-stage:focus-visible {
  outline: 3px solid var(--sun);
  outline-offset: 3px;
}

.game-shell {
  width: min(100%, 1004px);
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(26px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
}

.game-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  margin-bottom: 12px;
}

.game-heading p {
  margin: 0;
  color: rgba(244, 240, 231, .68);
  font: 650 12px/1 var(--sans);
}

.game-heading p span { color: var(--safe); text-shadow: 0 0 9px rgba(127, 209, 154, .75); }

.game-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.game-brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 2px solid var(--foam);
  box-shadow: inset 0 0 0 3px var(--indigo), 4px 4px 0 #04141d;
  background: var(--buoy);
  color: var(--foam);
  font: 700 23px/1 var(--serif);
}

.game-brand > span:last-child { display: grid; gap: 1px; }
.game-brand strong { font: 700 19px/1.2 var(--serif); letter-spacing: .1em; }
.game-brand small { color: rgba(244, 240, 231, .64); font: 550 11px/1.3 var(--sans); }

.game-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 3px solid var(--foam);
  box-shadow: 0 0 0 5px var(--indigo), 0 24px 70px rgba(0, 0, 0, .45);
  background: #04141d;
  isolation: isolate;
}

#reflow-game {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

.quest-hud {
  position: absolute;
  z-index: 3;
  top: 2.6%;
  left: 1.7%;
  display: grid;
  gap: 4px;
  width: min(42%, 300px);
  padding: 9px 12px 10px;
  border: 2px solid rgba(244, 240, 231, .82);
  box-shadow: 3px 3px 0 rgba(4, 20, 29, .8);
  background: rgba(7, 29, 42, .88);
  pointer-events: none;
}

.quest-pin { color: #9ed7d6; font: 650 clamp(8px, 1vw, 11px)/1 var(--sans); }
.quest-hud strong { overflow: hidden; color: var(--foam); font: 700 clamp(10px, 1.3vw, 14px)/1.35 var(--serif); text-overflow: ellipsis; white-space: nowrap; }
.quest-hud i { display: block; width: 100%; height: 3px; background: rgba(244, 240, 231, .18); }
.quest-hud b { display: block; width: 12%; height: 100%; background: var(--buoy); transition: width 180ms steps(4); }

.game-hud {
  position: absolute;
  z-index: 3;
  top: 2.6%;
  right: 1.7%;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  pointer-events: none;
  font: 700 clamp(8px, 1vw, 11px)/1 var(--mono);
  text-shadow: 1px 1px 0 var(--night);
}

.hud-breath, .hud-depth, .hud-buddy {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 9px;
  border: 2px solid rgba(244, 240, 231, .86);
  background: rgba(7, 29, 42, .88);
  box-shadow: 2px 2px 0 rgba(4, 20, 29, .75);
}

.hud-breath i { display: block; width: clamp(44px, 7vw, 76px); height: 7px; padding: 1px; background: var(--night); }
.hud-breath b { display: block; width: 100%; height: 100%; background: #74d9cc; }
.hud-depth strong { color: var(--sun); }
.buddy-dot { width: 7px; height: 7px; background: var(--safe); box-shadow: 0 0 0 2px rgba(127, 209, 154, .2); }
body:not([data-scene="ocean"]) .game-hud { display: none; }
body[data-scene="ocean"] .quest-hud { top: 9%; }

.chapter-card {
  position: absolute;
  z-index: 2;
  top: 19%;
  left: 1.7%;
  display: grid;
  gap: 2px;
  min-width: 118px;
  padding: 8px 12px 9px;
  border-left: 5px solid var(--buoy);
  background: rgba(7, 29, 42, .82);
  box-shadow: 3px 3px 0 rgba(4, 20, 29, .6);
  pointer-events: none;
}

.chapter-card small { color: #a9d7da; font: 600 clamp(8px, .9vw, 10px)/1.2 var(--sans); }
.chapter-card strong { font: 700 clamp(11px, 1.4vw, 16px)/1.25 var(--serif); }

.interaction-prompt {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 31%;
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 9px;
  border: 2px solid var(--foam);
  background: rgba(7, 29, 42, .92);
  box-shadow: 3px 3px 0 rgba(4, 20, 29, .8);
  font: 700 11px/1 var(--sans);
  transform: translateX(-50%);
  pointer-events: none;
}

.interaction-prompt[hidden] { display: none; }
.interaction-prompt kbd { color: var(--sun); font: inherit; }

.game-dialogue {
  position: absolute;
  z-index: 4;
  right: 1.7%;
  bottom: 2.8%;
  left: 1.7%;
  display: grid;
  grid-template-columns: clamp(48px, 8vw, 76px) minmax(0, 1fr);
  gap: clamp(10px, 1.4vw, 16px);
  min-height: 25%;
  padding: clamp(9px, 1.5vw, 16px);
  border: 2px solid var(--foam);
  box-shadow: inset 0 0 0 3px var(--indigo), 4px 4px 0 rgba(4, 20, 29, .92);
  background: rgba(4, 20, 29, .93);
}

.dialogue-avatar {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  place-items: end center;
  overflow: hidden;
  border: 2px solid rgba(244, 240, 231, .72);
  background:
    repeating-linear-gradient(135deg, transparent 0 8px, rgba(255, 255, 255, .035) 8px 10px),
    linear-gradient(180deg, #2e6b7b 0 58%, #173a49 58%);
  image-rendering: pixelated;
}

.dialogue-avatar::before {
  position: absolute;
  top: 14%;
  width: 42%;
  height: 46%;
  border: 3px solid #071d2a;
  background:
    linear-gradient(90deg, transparent 0 19%, #071d2a 19% 31%, transparent 31% 66%, #071d2a 66% 78%, transparent 78%) 0 55% / 100% 8% no-repeat,
    linear-gradient(90deg, transparent 0 40%, #b77655 40% 57%, transparent 57%) 0 68% / 100% 7% no-repeat,
    linear-gradient(180deg, #18242a 0 26%, #d89c72 26% 78%, #b77655 78%);
  box-shadow: -5px 7px 0 -2px #d89c72, 5px 7px 0 -2px #d89c72, 0 24px 0 10px #405967, inset 3px 0 0 rgba(244, 240, 231, .18);
  content: "";
}

.dialogue-avatar::after {
  position: absolute;
  top: 62%;
  width: 17%;
  height: 28%;
  background: #f4f0e7;
  box-shadow: -9px 0 0 #2c414b, 9px 0 0 #1a313c;
  content: "";
}

.dialogue-avatar span {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 3px;
  background: rgba(7, 29, 42, .8);
  font: 700 10px/1.2 var(--serif);
  text-align: center;
}

body[data-speaker="coach"] .dialogue-avatar { background-color: #234f50; }
body[data-speaker="coach"] .dialogue-avatar::before {
  background:
    linear-gradient(90deg, transparent 0 19%, #071d2a 19% 31%, transparent 31% 66%, #071d2a 66% 78%, transparent 78%) 0 55% / 100% 8% no-repeat,
    linear-gradient(90deg, transparent 0 38%, #7fd19a 38% 61%, transparent 61%) 0 72% / 100% 6% no-repeat,
    linear-gradient(180deg, #102f38 0 29%, #d89c72 29% 78%, #b77655 78%);
  box-shadow: -5px 7px 0 -2px #d89c72, 5px 7px 0 -2px #d89c72, 0 24px 0 10px #164b56, inset 3px 0 0 rgba(244, 240, 231, .16);
}
body[data-speaker="coach"] .dialogue-avatar::after { background: var(--safe); box-shadow: -9px 0 0 #164b56, 9px 0 0 #103943; }
body[data-speaker="phone"] .dialogue-avatar::before { top: 17%; width: 35%; height: 57%; border-color: var(--foam); background: linear-gradient(180deg, #2b6477 0 16%, #14394b 16% 83%, #66b8bc 83%); box-shadow: inset 0 0 0 3px #66b8bc, 0 4px 0 #071d2a; }
body[data-speaker="phone"] .dialogue-avatar::after { display: none; }

.dialogue-copy { align-self: center; min-width: 0; padding-right: min(19%, 135px); }
.dialogue-copy > span { display: block; margin-bottom: 5px; color: var(--sun); font: 700 clamp(9px, 1.05vw, 12px)/1.2 var(--serif); }
.dialogue-copy p { max-width: 69ch; margin: 0; font: 650 clamp(11px, 1.45vw, 16px)/1.6 var(--serif); letter-spacing: .025em; }

.primary-action {
  position: absolute;
  z-index: 6;
  right: 3.5%;
  bottom: 6%;
  min-height: 44px;
  padding: 9px 14px;
  border: 2px solid var(--foam);
  border-radius: 0;
  box-shadow: 3px 3px 0 var(--night);
  background: var(--buoy);
  color: var(--foam);
  font: 750 clamp(10px, 1.1vw, 13px)/1 var(--sans);
  cursor: pointer;
  touch-action: manipulation;
}

.primary-action:hover { filter: brightness(1.08); transform: translateY(-1px); }
.primary-action:active { box-shadow: 1px 1px 0 var(--night); transform: translate(2px, 2px); }
.primary-action[hidden] { display: none; }

.game-controls {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(2, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.direction-pad {
  display: grid;
  grid-template-areas:
    ". up ."
    "left down right";
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.direction-pad [data-action="up"] { grid-area: up; }
.direction-pad [data-action="left"] { grid-area: left; }
.direction-pad [data-action="down"] { grid-area: down; }
.direction-pad [data-action="right"] { grid-area: right; }

.game-controls button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid rgba(244, 240, 231, .42);
  border-radius: 0;
  box-shadow: inset 0 2px 0 rgba(244, 240, 231, .06), inset 0 -3px 0 rgba(4, 20, 29, .38), 2px 3px 0 rgba(4, 20, 29, .34);
  background: linear-gradient(180deg, rgba(43, 91, 109, .52), rgba(10, 38, 50, .84));
  color: var(--foam);
  font: 700 13px/1 var(--sans);
  cursor: pointer;
  touch-action: manipulation;
}

.action-control { min-height: 93px; }

.game-controls button:hover:not(:disabled) { border-color: var(--foam); background: var(--indigo); }
.game-controls button:active:not(:disabled) { transform: translateY(2px); }
.game-controls button:disabled { opacity: .32; cursor: not-allowed; }
.game-controls kbd { color: var(--sun); font: 700 12px/1 var(--mono); }

.game-notes {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 12px;
  color: rgba(244, 240, 231, .62);
  font: 500 11px/1.55 var(--sans);
}

.game-notes p { max-width: 62ch; margin: 0; }
.game-notes p:last-child { text-align: right; }

@media (max-width: 650px) {
  .game-shell { padding-inline: 8px; }
  .game-heading { min-height: 44px; margin-bottom: 10px; }
  .game-heading p { display: none; }
  .game-brand { gap: 8px; }
  .game-brand-mark { width: 36px; height: 36px; font-size: 19px; }
  .game-brand strong { font-size: 16px; }
  .game-brand small { font-size: 9px; }
  .quest-hud { top: 2%; left: 2%; width: 60%; padding: 5px 7px 6px; border-width: 1px; }
  .quest-hud strong { font-size: 9px; }
  .quest-pin { font-size: 7px; }
  .chapter-card { top: 21%; min-width: 82px; padding: 4px 7px 5px; border-left-width: 3px; }
  .chapter-card small { font-size: 7px; }
  .chapter-card strong { font-size: 9px; }
  .game-hud { top: 2%; right: 2%; gap: 3px; }
  .hud-breath, .hud-depth, .hud-buddy { min-height: 22px; padding: 4px 5px; border-width: 1px; font-size: 7px; }
  .hud-breath i { width: 35px; height: 5px; }
  .hud-buddy span:last-child { display: none; }
  body[data-scene="ocean"] .quest-hud { top: 13%; }
  .game-dialogue { grid-template-columns: 38px minmax(0, 1fr); gap: 7px; min-height: 31%; padding: 7px; border-width: 1px; box-shadow: inset 0 0 0 2px var(--indigo), 2px 2px 0 rgba(4, 20, 29, .9); }
  .dialogue-copy { padding-right: 68px; }
  .dialogue-copy > span { margin-bottom: 2px; font-size: 8px; }
  .dialogue-copy p { font-size: 9px; line-height: 1.45; }
  .dialogue-avatar { align-self: center; }
  .dialogue-avatar span { font-size: 7px; }
  .primary-action { right: 3.5%; bottom: 5%; max-width: 66px; min-height: 44px; padding: 6px 8px; font-size: 9px; line-height: 1.2; }
  .interaction-prompt { bottom: 35%; min-height: 24px; padding: 3px 6px; border-width: 1px; font-size: 8px; }
  .game-controls { gap: 5px; margin-top: 10px; }
  .game-controls { grid-template-columns: minmax(154px, 1.6fr) repeat(2, minmax(58px, 1fr)); }
  .direction-pad { gap: 3px; }
  .game-controls button { min-height: 44px; gap: 4px; padding-inline: 3px; font-size: 11px; }
  .action-control { min-height: 91px !important; }
  .game-controls kbd { font-size: 10px; }
  .game-notes { display: grid; gap: 5px; font-size: 10px; }
  .game-notes p:last-child { text-align: left; }
}

@media (max-width: 360px) {
  .dialogue-copy p { font-size: 8px; }
  .dialogue-copy { padding-right: 61px; }
  .game-controls button { font-size: 10px; }
  .game-controls kbd { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

.shop-preview-link { color:var(--sand);font-size:12px;text-underline-offset:4px; }
.shop-checklist { position:absolute;right:2%;top:3%;display:flex;gap:12px;list-style:none;margin:0;padding:8px 12px;background:#102b31e8;color:var(--sand);font-size:11px;border:1px solid #b9c5ae70; }
.shop-checklist[hidden] { display:none; }
.shop-checklist [data-done="true"] { color:var(--safe); }
.shop-portrait { display:none; }
.shop-guide { padding:12px 14px;background:#102e38;border-left:3px solid var(--sun);color:var(--foam); }
.shop-guide[hidden] { display:none; }
.photo-spread { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding:18px 0; }
.photo-spread button { min-width:0;min-height:44px;padding:6px;background:#e0d4b8;color:#233d43;border:2px solid #b8a783;font:600 12px var(--sans);cursor:pointer; }
.photo-spread button:nth-child(odd) { transform:rotate(-3deg); }
.photo-spread button:nth-child(even) { transform:rotate(3deg); }
.photo-spread .evidence-art { width:100%;height:auto;margin:0 0 8px; }
.photo-progress { color:#bfcec8;font-size:12px;line-height:1.7; }
.photo-discovery { border-left:3px solid var(--sun);padding:8px 12px;color:var(--sun); }
.shop-guide p { margin:0 0 9px;font-size:14px;line-height:1.6; }
.shop-guide small { display:block;margin-top:8px;color:#b8c7c9;font-size:11px;line-height:1.6; }
#shop-destinations { display:flex;flex-wrap:wrap;gap:7px; }
#shop-destinations button { min-height:44px;padding:8px 12px;border:1px solid #829b9c;background:#1c414b;color:var(--foam);font:600 12px var(--sans);cursor:pointer; }
#shop-destinations button[aria-pressed="true"] { border-color:var(--sun);color:var(--sun); }
#shop-destinations button:disabled { opacity:.45;cursor:default; }
body[data-scene="shop"] .game-controls { grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); }
body[data-scene="shop"] [data-action="equalize"] { display:none; }
body[data-scene="shop"] .action-control { line-height:1.5; }
body[data-scene="shop"] .primary-action:disabled { opacity:.45;cursor:wait;transform:none; }
.mystery-tools { position:absolute;right:2%;top:3%;display:flex;gap:6px; }
.mystery-tools[hidden] { display:none; }
.scene-reaction { position:absolute;z-index:3;left:var(--reaction-left);top:var(--reaction-top);width:min(260px,calc(100% - 24px));transform:translateX(-50%);padding:10px 13px;border:1px solid #a8b8a7;background:#102a31;color:var(--foam);box-shadow:0 4px 12px #06182055;pointer-events:none; }
.scene-reaction[hidden] { display:none; }
.scene-reaction span { color:var(--sun);font:700 12px/1.4 var(--sans); }
.scene-reaction p { margin:3px 0 0;font:600 15px/1.55 var(--sans);overflow-wrap:anywhere; }
@media(max-width:650px) {
  .scene-reaction { left:10px;right:10px;top:auto;bottom:9px;width:auto;transform:none;padding:7px 10px; }
  .scene-reaction span { display:inline;margin-right:7px;font-size:12px; }
  .scene-reaction p { display:inline;font-size:12px;line-height:1.5; }
  body[data-scene="shop"][data-scene-reaction="true"] .chapter-card,
  body[data-scene="shop"][data-scene-reaction="true"] .interaction-prompt { visibility:hidden; }
}
.mystery-tools button { min-height:44px;padding:7px 10px;background:#102b31ec;color:#ded3b3;border:1px solid #96aba3;font:600 11px var(--sans);cursor:pointer; }
.mystery-modal { width:min(640px,calc(100vw - 24px));max-height:85dvh;overflow-y:auto;padding:24px;border:2px solid #9bb2a7;background:#102a31;color:#f4f0e7;box-shadow:0 0 0 4px #061820; }
.mystery-modal::backdrop { background:#04141dc9; }
.mystery-modal h2 { margin:0 0 10px;font:700 23px var(--serif);color:#e6c38b; }
.mystery-modal p { line-height:1.65;white-space:pre-line; }
.mystery-modal li { margin-bottom:10px;line-height:1.55; }
.evidence-copy { color:#b8c9c0; }
.evidence-art { display:block;width:100%;height:auto;image-rendering:pixelated;border:6px solid #d7c9a9;margin:16px 0; }
.evidence-actions { display:flex;gap:10px;flex-wrap:wrap;margin-top:22px; }
.evidence-actions button { min-height:44px;border:1px solid #97b2ab;padding:10px 16px;background:#234851;color:#f4f0e7;cursor:pointer;font:600 14px var(--sans); }
.evidence-actions button:first-child { background:#bd6844;border-color:#e3a777; }
.evidence-actions button:hover { filter:brightness(1.16); }
.photo-note { margin:22px 0;padding:28px 18px;border:1px solid #b4a483;background:#d5c49e;color:#2c4140;font:700 21px/1.8 var(--serif);text-align:center; }
.radio-face { padding:22px;background:#816a48;border:5px solid #473c2c;display:grid;gap:12px; }
.radio-brand { font:10px var(--mono);letter-spacing:.2em; }
.radio-face output { padding:16px;background:#132f32;color:#a6bab0;font:700 20px var(--mono); }
.radio-face output.tuned { color:#f8cd75; }
.radio-face input { width:100%;min-height:44px;accent-color:#eeac58;cursor:ew-resize; }
.radio-face small { line-height:1.5; }
.basket-item,.cat-pause { padding:30px 16px;background:#263d3d;border:2px dashed #8c957c;text-align:center;font:700 20px var(--serif); }
body[data-scene="shop"] .dialogue-copy p { white-space:pre-line; }
body[data-scene="shop"] .game-frame { overflow:visible;margin-bottom:calc(var(--shop-dialogue-height,118px) + 26px);border-color:#738982;box-shadow:0 0 0 4px #193a42,0 24px 70px #0006; }
body[data-scene="shop"] .quest-hud { width:min(40%,265px);padding:7px 10px;border-width:1px; }
body[data-scene="shop"] .chapter-card { top:auto;bottom:3%;left:2%;padding:5px 9px; }
body[data-scene="shop"] .game-dialogue { top:calc(100% + 15px);bottom:auto;left:-3px;right:-3px;min-height:118px;grid-template-columns:78px minmax(0,1fr);padding:12px; }
body[data-scene="shop"] .dialogue-avatar { height:78px;aspect-ratio:1; }
body[data-scene="shop"] .dialogue-avatar::before,
body[data-scene="shop"] .dialogue-avatar::after { display:none; }
body[data-scene="shop"] .shop-portrait { display:block;position:absolute;inset:0;width:100%;height:100%;image-rendering:pixelated; }
body[data-scene="shop"] .dialogue-copy { padding-right:124px; }
body[data-scene="shop"] .primary-action { top:calc(100% + 53px);bottom:auto;right:12px; }
body[data-scene="shop"] .game-frame:has(.primary-action[hidden]) .game-dialogue { min-height:0; }
body[data-scene="shop"] .game-frame:has(.primary-action[hidden]) .dialogue-copy { padding-right:0;padding-bottom:0; }
body[data-scene="shop"] .interaction-prompt { bottom:3%;left:auto;right:2%;transform:none; }
@media(max-width:650px) {
  .mystery-tools { gap:4px; }
  .mystery-tools button { min-height:44px;padding:4px 6px;font-size:9px; }
  .mystery-modal { padding:17px; }
  .mystery-modal h2 { font-size:20px; }
  .mystery-modal p { font-size:14px; }
  .evidence-actions { gap:8px; }
  .evidence-actions button { flex:1 1 130px;padding-inline:9px;font-size:13px; }
  .radio-face { padding:12px; }
  .radio-face output { padding:12px;font-size:16px; }
  .shop-preview-link { font-size:10px; }
  body[data-scene="shop"] .game-frame { margin-bottom:calc(var(--shop-dialogue-height,147px) + 26px); }
  body[data-scene="shop"] .game-dialogue { min-height:147px;grid-template-columns:52px minmax(0,1fr);gap:9px;padding:10px; }
  body[data-scene="shop"] .dialogue-avatar { height:52px;align-self:start; }
  body[data-scene="shop"] .dialogue-copy { align-self:start;padding-right:0;padding-bottom:54px; }
  body[data-scene="shop"] .dialogue-copy p { font-size:12px;line-height:1.55; }
  body[data-scene="shop"] .dialogue-copy>span { font-size:10px;margin-bottom:4px; }
  body[data-scene="shop"] .primary-action { top:calc(100% + var(--shop-dialogue-height,147px) - 40px);max-width:none;font-size:11px;min-height:44px; }
  body[data-scene="shop"] .quest-hud { width:49%;padding:4px 6px; }
  .shop-checklist { gap:5px;font-size:8px;padding:5px 6px; }
  body[data-scene="shop"] .chapter-card { max-width:45%; }
}
:root { --bay-caption-bg: #102a31; }
body[data-chapter="bay"] #scene-reaction {
  left: 50%; top: 78px; bottom: auto; width: min(410px, calc(100% - 24px));
  transform: translateX(-50%); background: var(--bay-caption-bg);
}
body[data-chapter="bay"] #scene-reaction::after { display: none; }
body[data-chapter="bay"][data-bay-phase="dive"] [data-action="equalize"] { display: flex; }
body[data-chapter="bay"] .game-controls { grid-template-columns: minmax(140px, 1fr) minmax(100px, 1fr); }
body[data-chapter="bay"][data-bay-phase="dive"] .direction-pad { grid-row: span 2; }
.bay-photo, .bay-diagram { display: block; width: 100%; height: auto; max-height: 260px; object-fit: contain; image-rendering: pixelated; }
/* The bay is a game screen, not a second dashboard below the canvas. */
body[data-reef-art] .game-dialogue { display:block;position:absolute;width:1px;height:1px;min-height:0;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0; }
body[data-reef-art] #primary-action { position:absolute;top:56px;right:16px;bottom:auto;left:auto;width:auto;min-height:32px;padding:6px 12px;font-size:12px; }
body[data-reef-art] .reef-station { position:absolute;right:14px;top:100px;width:110px;margin:0;padding:6px;background:#103746ed;border:1px solid #87b1ac;display:block; }
body[data-reef-art] .reef-station[hidden] { display:none; }
body[data-reef-art] .reef-recovery-view { width:94px;height:94px;margin:0 auto; }
body[data-reef-art] .reef-breaths { display:block;font-size:10px; }
body[data-reef-art] .reef-breaths span { display:block;padding:2px; }
body[data-reef-art] .game-controls { display:none; }
body[data-reef-art] .game-frame { overflow:hidden; }
.reef-school-photo { border:1px solid #8bb8b6; }
.mystery-modal[data-owner-panel] { width:min(880px,calc(100vw - 28px)); }
.owner-layout { display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:20px;margin-top:14px; }
.owner-visual { position:relative;align-self:start;min-width:0; }
.owner-visual .evidence-art { display:block;width:100%;margin:0; }
.person-target { position:absolute;transform:translate(-50%,-50%);width:44px;height:44px;border:2px solid var(--sand);border-radius:50%;background:#113641e8;color:var(--foam);font:700 16px var(--sans);cursor:pointer; }
.person-target[aria-pressed="true"] { background:#d6ac72;color:#102b31; }
.person-target:focus-visible { outline:3px solid var(--foam);outline-offset:3px; }
.owner-detail { min-width:0; }
.owner-detail h3 { margin:0 0 10px;color:var(--sun);font-size:18px; }
.owner-detail p { white-space:pre-line;line-height:1.7; }
.owner-viewpoints { display:flex;flex-wrap:wrap;gap:8px; }
.owner-viewpoints button { min-height:44px;padding:7px 10px;border:1px solid var(--water);background:#143946;color:var(--foam);font:600 14px var(--sans);cursor:pointer; }
.owner-viewpoints [aria-pressed="true"] { background:#d6ac72;color:#102b31;border-color:#d6ac72; }
.owner-viewpoints button:focus-visible { outline:2px solid var(--foam);outline-offset:2px; }
@media (max-width:650px) { .owner-layout { grid-template-columns:1fr; } }
@media (orientation:landscape) and (max-height:600px) {
  .mystery-modal[data-owner-panel] { max-height:calc(100dvh - 16px);padding:14px 18px; }
  .mystery-modal[data-owner-panel] h2 { font-size:20px;margin-bottom:6px; }
  .mystery-modal[data-owner-panel] > .evidence-copy { margin:0;font-size:13px; }
  .owner-layout { grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;margin-top:10px; }
  .owner-visual { width:min(100%,307px);justify-self:center; }
  .owner-detail { max-height:205px;overflow-y:auto; }
  .owner-detail h3 { font-size:16px; }
  .owner-detail p { font-size:13px;line-height:1.55; }
  .mystery-modal[data-owner-panel] .evidence-actions { margin-top:10px; }
}
@media (pointer:coarse), (max-width:650px) {
  body[data-reef-art] .game-controls { display:flex;position:absolute;inset:auto 10px 10px;justify-content:space-between;align-items:end;margin:0;gap:8px;pointer-events:none; }
  body[data-reef-art] .game-controls .direction-pad, body[data-reef-art] .game-controls .reef-boost, body[data-reef-art] .game-controls [data-action="equalize"] { display:none; }
  body[data-reef-art] .game-controls .reef-stick { pointer-events:auto;width:64px;height:64px;background:#143e49cc;flex:none; }
  body[data-reef-art] .game-controls [data-action="interact"] { pointer-events:auto;width:94px;height:50px;min-height:50px;padding:6px;background:#163e4be8;flex:none;font-size:11px; }
  body[data-reef-art] .game-controls [data-action="interact"][hidden], body[data-reef-art] #game-stage[data-reef-recovering="true"] .game-controls { display:none; }
  body[data-reef-art] #interaction-prompt { display:none; }
  body[data-reef-art] #scene-reaction { bottom:82px;max-width:calc(100% - 28px);font-size:11px;padding:8px; }
  body[data-reef-art] #primary-action { top:50px;right:12px;min-height:28px;padding:4px 8px; }
  body[data-reef-art] .reef-station { top:50px;right:64px;width:86px; }
  body[data-reef-art] .reef-recovery-view { width:70px;height:70px; }
}
.bay-diagram { margin-top: 16px; max-height: 170px; background: #306b78; }
.bay-panel-cue { color: #f1b563; }
body[data-reef-art] .quest-hud i { display:none; }
body[data-reef-art] .quest-hud { width:auto;max-width:55%;padding:8px 12px; }
body[data-reef-art] .quest-pin { display:none; }
body[data-reef-art] .game-controls { grid-template-columns:minmax(120px,1.3fr) 130px minmax(90px,1fr) minmax(100px,1fr);align-items:center; }
.reef-boost { touch-action:none;user-select:none; }
.reef-station { display:grid;grid-template-columns:1fr auto;gap:5px 20px;padding:14px 0;border-top:1px solid var(--water);color:var(--foam); }
.reef-station strong { font-size:14px;color:var(--sand); }
.reef-station p { grid-column:1;margin:0;font-size:12px;line-height:1.6;max-width:65ch; }
.reef-modes { grid-column:2;grid-row:2 / 4;display:flex;gap:8px;align-items:center; }
.reef-lesson-track { grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:8px 18px;list-style:none;margin:0 0 7px;padding:0;font:600 12px var(--sans);color:var(--water); }
.reef-lesson-track li { padding-bottom:4px;border-bottom:2px solid transparent; }
.reef-lesson-track [aria-current="step"] { color:var(--sand);border-color:var(--sand); }
.reef-lesson-track [data-complete="true"] { color:var(--foam); }
.reef-breaths { grid-column:1 / -1;display:flex;flex-wrap:wrap;gap:8px 18px;padding-top:8px;font:600 12px var(--sans);color:var(--sand); }
.reef-breaths[hidden] { display:none; }
.reef-breaths [data-complete="true"] { color:var(--foam); }
.reef-stick[aria-disabled="true"] { opacity:.5; }
.reef-recovery-view { grid-column:2;grid-row:2 / 4;width:88px;height:88px;image-rendering:pixelated;border:1px solid var(--water); }
.reef-modes[hidden],.reef-recovery-view[hidden] { display:none; }
.reef-station[data-recovering="true"] { grid-template-columns:minmax(0,1fr) 88px; }
.reef-modes button { min-height:44px;padding:8px 13px;color:var(--foam);background:#123746;border:1px solid var(--water);font:600 12px var(--sans);cursor:pointer; }
.reef-modes button[aria-pressed="true"] { color:var(--sand);border-color:var(--sand);background:#224e5e; }
.reef-modes button:disabled { opacity:.55;cursor:default; }
.reef-modes button:focus-visible { outline:2px solid var(--sand);outline-offset:3px; }
@media(max-width:650px) {
  .reef-station { grid-template-columns:1fr;gap:7px;padding:12px 0; }
  .reef-modes { grid-column:1;grid-row:auto; }
  .reef-modes button { flex:1; }
}
.reef-boost[data-held="true"] { background:#3c6e78;border-color:#efd29b; }
body[data-reef-art] .chapter-card { display:none; }
body[data-reef-art] .interaction-prompt { right:auto;left:50%;bottom:12%;transform:translateX(-50%);white-space:nowrap; }
body[data-reef-art][data-scene-reaction="true"] .interaction-prompt { visibility:visible; }
.reef-stick { position:relative;width:120px;height:120px;border:1px solid var(--water);border-radius:50%;background:#123746;touch-action:none;justify-self:center;user-select:none; }
.reef-stick span { position:absolute;inset:0;display:grid;place-items:center;color:var(--foam);font-size:12px;pointer-events:none; }
.reef-stick i { position:absolute;left:calc(50% - 16px);top:calc(50% - 16px);width:32px;height:32px;border:1px solid var(--sand);border-radius:50%;background:#426d73;transform:translate(var(--stick-x,0px),var(--stick-y,0px));pointer-events:none;opacity:.65; }
body[data-reef-art] .action-control { min-height:88px; }
body[data-reef-art] #scene-reaction { left:12px;top:auto;bottom:50px;transform:none;background:rgba(10,36,46,.88);max-width:320px;font-size:12px; }
body[data-coast][data-reef-art] #scene-reaction { top:64px;bottom:auto; }
@media(max-width:650px) {
  body[data-reef-art] .game-controls { grid-template-columns:110px minmax(0,1fr) minmax(0,1fr);gap:7px; }
  body[data-reef-art] .reef-stick { width:104px;height:104px; }
  body[data-reef-art] .action-control { padding:8px 4px;font-size:11px; }
  body[data-reef-art] .direction-pad { grid-column:1 / -1;order:3; }
  body[data-reef-art] #scene-reaction { top:auto;bottom:82px; }
  body[data-reef-art] .quest-hud { max-width:59%;padding:5px 8px; }
  body[data-reef-art] .quest-hud strong { font-size:10px; }
  body[data-reef-art] .interaction-prompt { bottom:55px;font-size:10px;padding:5px 7px; }
}
@media(max-width:650px) {
  body[data-chapter="bay"] #scene-reaction { left: 10px; right: 10px; top: auto; bottom: 82px; width: auto; transform: none; }
}
/* Touch play pauses in portrait; landscape keeps the controls inside the sea. */
.game-rotate-gate { position:fixed;inset:0;width:100vw;height:100dvh;max-width:none;max-height:none;box-sizing:border-box;margin:0;padding:28px;border:0;background:#0a242e;color:#f4f0e7;text-align:center; }
.game-rotate-gate[open] { display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px; }
.game-rotate-gate::backdrop { background:#0a242e; }
.game-rotate-gate svg { width:88px;height:88px;color:#dfbf87; }
.game-rotate-gate h2 { margin:0;font:600 26px var(--serif); }
.game-rotate-gate p { margin:0;max-width:26ch;line-height:1.7; }
.game-rotate-gate small { color:#a5c2c5;line-height:1.6; }
body[data-orientation-blocked="true"] { overflow:hidden; }
body[data-orientation-blocked="true"] .game-shell { visibility:hidden; }
body[data-game-touch="true"][data-reef-art] { height:100dvh;overflow:hidden; }
body[data-game-touch="true"][data-reef-art] .game-shell { width:100%;max-width:none;height:100dvh;box-sizing:border-box;display:grid;place-items:center;margin:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
body[data-game-touch="true"][data-reef-art] .game-heading,
body[data-game-touch="true"][data-reef-art] .game-notes { display:none; }
body[data-game-touch="true"][data-reef-art] .game-frame { width:min(calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right)),calc((100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 16 / 9));height:auto;aspect-ratio:16 / 9;margin:0!important;border:0;box-shadow:none; }
body[data-game-touch="true"][data-reef-art] .game-controls { display:flex;position:absolute;inset:auto 8px 8px;justify-content:space-between;align-items:end;margin:0;gap:8px;pointer-events:none; }
body[data-game-touch="true"][data-reef-art] .game-controls .direction-pad,
body[data-game-touch="true"][data-reef-art] .game-controls .reef-boost,
body[data-game-touch="true"][data-reef-art] .game-controls [data-action="equalize"] { display:none; }
body[data-game-touch="true"][data-reef-art] .game-controls .reef-stick { pointer-events:auto;width:72px;height:72px;flex:none;background:#143e49dd; }
body[data-game-touch="true"][data-reef-art] .game-controls [data-action="interact"] { pointer-events:auto;width:100px;height:52px;min-height:52px!important;padding:6px;flex:none;background:#163e4bf2;font-size:12px; }
body[data-game-touch="true"][data-reef-art] .game-controls [data-action="interact"] kbd { display:none; }
body[data-game-touch="true"][data-reef-art] .game-controls [data-action="interact"][hidden],
body[data-game-touch="true"][data-reef-art] #game-stage[data-reef-recovering="true"] .game-controls { display:none; }
body[data-game-touch="true"][data-reef-art] #interaction-prompt { display:none; }
body[data-game-touch="true"][data-reef-art] #primary-action { top:60px;right:8px;min-width:44px;min-height:44px;padding:6px 10px;color:#142e36; }
body[data-game-touch="true"][data-reef-art] #scene-reaction { left:90px;right:auto;top:auto;bottom:8px;width:calc(100% - 200px);max-width:350px;padding:8px;font-size:12px; }
body[data-game-touch="true"][data-coast] #scene-reaction { top:60px;bottom:auto; }
body[data-chapter="voyage"] #game-stage[data-voyage-crew="true"] #scene-reaction { top:auto;bottom:12px; }
body[data-chapter="rescue"][data-coast] #scene-reaction { top:auto;bottom:12px; }
body[data-chapter="ending"][data-coast] #scene-reaction { top:64px;bottom:auto; }
body[data-chapter="ending"] #game-stage[data-ending-crew="true"] #scene-reaction { top:auto;bottom:12px; }
body[data-chapter="prologue"][data-reef-art] #scene-reaction { left:12px;right:auto;top:64px;bottom:auto;width:min(260px,32%);transform:none; }
#campaign-menu { position:absolute;right:2%;top:3%;z-index:7;min-height:44px;min-width:48px;padding:7px 9px;border:1px solid var(--sand);background:#102b31ec;color:var(--foam);font:600 12px var(--sans);cursor:pointer; }
body .mystery-tools { right:calc(2% + 58px); }
#campaign-menu:focus-visible { outline:3px solid var(--foam);outline-offset:3px; }
.campaign-status { position:absolute;left:12px;right:12px;bottom:88px;padding:8px;background:#17333e;color:#f4d59a;font:600 12px/1.5 var(--sans);z-index:8; }
.campaign-status[hidden] { display:none; }
.campaign-modal { max-width:620px; }
.campaign-modal .evidence-actions { flex-wrap:wrap; }
.campaign-reread { display:none; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .campaign-reread { display:block;position:absolute;right:2%;top:64px;min-height:44px;padding:7px 10px;border:1px solid var(--sand);background:#102b31ec;color:var(--foam);font:600 12px var(--sans);cursor:pointer; }
.campaign-reread:focus-visible { outline:3px solid var(--foam);outline-offset:3px; }
body[data-game-touch="true"][data-reef-art] .reef-station { top:112px;right:8px;width:86px; }
body[data-game-touch="true"][data-reef-art] .reef-recovery-view { width:70px;height:70px; }
body[data-game-touch="true"] .mystery-modal { max-height:calc(100dvh - 20px);box-sizing:border-box; }
/* The shop has no chapter controller, but must keep the same landscape play area. */
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) { height:100dvh;overflow:hidden; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .game-shell { width:100%;max-width:none;height:100dvh;box-sizing:border-box;display:grid;place-items:center;margin:0;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .game-heading,
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .game-notes { display:none; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .game-frame { width:min(calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right)),calc((100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 16 / 9));height:auto;aspect-ratio:16 / 9;margin:0!important;border:0;box-shadow:none; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .game-dialogue { display:block;position:absolute;width:1px;height:1px;min-height:0;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);border:0; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .game-controls { position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom) + 8px);transform:translateX(-50%);width:min(calc(100vw - 16px - env(safe-area-inset-left) - env(safe-area-inset-right)),calc((100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom)) * 16 / 9 - 16px));display:flex;justify-content:space-between;align-items:end;gap:8px;margin:0;pointer-events:none; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .direction-pad { display:grid;grid-template-columns:repeat(3,44px);gap:4px;flex:none;pointer-events:auto; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .game-controls button { min-height:44px;padding:4px;font-size:12px;background:#163e4bf2;pointer-events:auto; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .game-controls kbd { display:none; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) [data-action="interact"] { width:100px;min-height:52px!important;flex:none; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) #interaction-prompt { display:none; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) #scene-reaction { left:50%;right:auto;top:64px;bottom:auto;width:min(260px,45%);transform:translateX(-50%);padding:8px; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .shop-guide { position:fixed;left:50%;bottom:calc(env(safe-area-inset-bottom) + 8px);transform:translateX(-50%);width:min(260px,calc(100vw - 370px));padding:4px;border:0; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .shop-guide p,
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .shop-guide small { display:none; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) #shop-destinations { flex-wrap:nowrap;overflow-x:auto;gap:4px; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) #shop-destinations button { flex:none;min-height:44px;padding:5px 8px; }
@media (orientation:landscape) {
  body[data-game-touch="true"] .mystery-modal[data-reef-story][open] { display:grid;grid-template-columns:46% minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;gap:12px 18px;width:min(760px,calc(100vw - 24px));height:min(360px,calc(100dvh - 20px));padding:16px; }
  body[data-game-touch="true"] .mystery-modal[data-reef-story] h2 { grid-column:1 / -1;margin:0;font-size:21px; }
  body[data-game-touch="true"] .mystery-modal[data-reef-story] .bay-photo { grid-column:1;grid-row:2;align-self:center;max-height:100%; }
  body[data-game-touch="true"] .mystery-modal[data-reef-story="school"] .bay-photo { grid-row:2 / 4; }
  body[data-game-touch="true"] .mystery-modal[data-reef-story] p { grid-column:2;grid-row:2;margin:0;overflow-y:auto;font-size:14px;line-height:1.65; }
  body[data-game-touch="true"] .mystery-modal[data-reef-story] .photo-discovery { grid-column:1;grid-row:3;align-self:center;font-size:11px; }
  body[data-game-touch="true"] .mystery-modal[data-reef-story] .evidence-actions { grid-column:2;grid-row:3;margin:0; }
}

/* Evidence stays within one screen; longer text and photo sets have page controls. */
body .mystery-modal.fitted-dialog.fitted-dialog[open] { display:flex;flex-direction:column;gap:12px;width:min(880px,calc(100vw - 24px));height:min(560px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);padding:18px;box-sizing:border-box;overflow:hidden; }
body .mystery-modal.fitted-dialog > h2 { flex:none;margin:0;font-size:22px;line-height:1.25; }
.dialog-body { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;flex:1;min-height:0; }
.dialog-body.dialog-no-media { grid-template-columns:minmax(0,1fr); }
.dialog-no-media .dialog-media { display:none; }
.dialog-media { display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-width:0;min-height:0; }
body .fitted-dialog .dialog-media > :is(canvas,img,.owner-visual) { flex:none;max-width:100%;max-height:100%;margin:0;object-fit:contain;align-self:center; }
body .fitted-dialog .dialog-media [hidden] { display:none; }
.dialog-media .owner-visual canvas { width:100%;height:100%;margin:0; }
.dialog-reading { display:flex;flex-direction:column;min-width:0;min-height:0;gap:8px; }
.dialog-reading.owner-detail { max-height:none;overflow:visible; }
.dialog-text-window { flex:1;min-height:0;overflow:hidden; }
.dialog-text { column-gap:16px;column-fill:auto; }
body .fitted-dialog .dialog-text :is(p,h3,blockquote) { margin:0 0 12px;font-size:14px;line-height:1.65;white-space:pre-line;overflow:visible; }
body .fitted-dialog .dialog-text h3 { color:var(--sun);font-size:16px; }
.dialog-page-nav { display:flex;align-items:center;justify-content:center;gap:10px;flex:none;min-height:44px; }
.dialog-page-nav[hidden] { display:none; }
.dialog-page-nav button { min-height:44px;min-width:64px;padding:6px 10px;border:1px solid var(--water);background:var(--deep);color:var(--foam);font:600 13px var(--sans);cursor:pointer; }
.dialog-page-nav button:disabled { opacity:.4;cursor:default; }
.dialog-page-nav span { min-width:36px;text-align:center;font:12px var(--mono); }
.dialog-choices:empty { display:none; }
.dialog-choices .owner-viewpoints { gap:4px; }
body .fitted-dialog .evidence-actions { flex:none;display:flex;flex-wrap:wrap;gap:6px;margin:0; }
body .fitted-dialog .evidence-actions button { flex:1;min-height:44px;padding:8px 12px;font-size:14px; }
body .fitted-dialog .photo-spread { display:flex;gap:6px;width:100%;margin:0; }
body .fitted-dialog .photo-spread button { flex:1;min-width:0;font-size:12px; }
body .fitted-dialog .photo-spread canvas { width:100%;height:auto;max-height:120px;object-fit:contain; }
@media (max-height:500px) {
  body .mystery-modal.fitted-dialog.fitted-dialog[open] { padding:12px 16px;gap:8px; }
  body .mystery-modal.fitted-dialog > h2 { font-size:19px; }
  .dialog-body { gap:16px; }
  body .fitted-dialog .dialog-text :is(p,h3,blockquote) { font-size:13px;line-height:1.6; }
}
@media (orientation:portrait) {
  .dialog-body { grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) minmax(0,1fr); }
  .dialog-body.dialog-no-media { grid-template-rows:1fr; }
}
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .direction-pad { display:none; }
body[data-game-touch="true"][data-scene="shop"]:not([data-chapter]) .shop-stick { width:72px;height:72px;flex:none;pointer-events:auto;background:#143e49dd; }
body[data-reef-art] .reef-station,body[data-game-touch="true"][data-reef-art] .reef-station { top:112px;right:12px;width:156px; }
body[data-reef-art] .reef-recovery-view,body[data-game-touch="true"][data-reef-art] .reef-recovery-view { display:block;width:144px;height:144px; }
body[data-reef-art] .reef-breaths { font-size:12px; }
#scene-reaction[data-placed] { bottom:auto;right:auto;transform:none; }
@media (orientation:landscape) and (max-height:350px) {
  body[data-reef-art] .reef-station,body[data-game-touch="true"][data-reef-art] .reef-station { top:106px;width:124px; }
  body[data-reef-art] .reef-recovery-view,body[data-game-touch="true"][data-reef-art] .reef-recovery-view { width:112px;height:112px; }
}
