/* Adventure chrome stays independent of the title screen's layout. */
.journey-page {
  --journey-ink: #f3ead1;
  --journey-muted: #aec1b1;
  --journey-brass: #c9aa6e;
  --journey-line: #c9aa6e45;
  --journey-width: min(1320px, calc((100dvh - 158px) * 1.666667));
  margin: 0;
  padding: 0 18px;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--journey-ink);
  background: radial-gradient(
    ellipse at 50% 15%,
    #264c45 0,
    #102a28 44%,
    #071c1c 100%
  );
  font:
    13px/1.4 system-ui,
    sans-serif;
}
.journey-page button {
  color: var(--journey-ink);
  background: linear-gradient(180deg, #24463d, #16362f);
  border: 1px solid #b9ba8b50;
  border-radius: 5px;
  box-shadow:
    inset 0 1px #fff1,
    0 2px 4px #0002;
  font:
    12px/1.35 system-ui,
    sans-serif;
  transition:
    border-color 120ms,
    background-color 120ms,
    box-shadow 120ms;
}
.journey-page button:hover {
  border-color: var(--journey-brass);
  background: #305448;
}
.journey-page button:focus-visible,
.journey-page a:focus-visible {
  outline: 2px solid #f5d697;
  outline-offset: 3px;
}
.journey-page button:disabled {
  cursor: default;
  opacity: 0.48;
}
.journey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  height: 58px;
  max-width: 1320px;
  padding: 7px 0;
  margin: auto;
  border: 0;
}
.journey-header .wordmark {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #e4c995;
  text-decoration: none;
  font:
    14px/1.15 Georgia,
    serif;
  letter-spacing: 0.18em;
  white-space: nowrap;
}
.journey-header .wordmark .brand-name {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
.journey-header .wordmark small {
  display: block;
  margin-top: 4px;
  font:
    7px/1.2 system-ui,
    sans-serif;
  letter-spacing: 0.3em;
  color: #a5b8a7;
}
.journey-header .brand-bell {
  width: 25px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
}
.journey-heading {
  min-width: 0;
  flex: 1;
}
.journey-heading > span {
  display: block;
  font-size: 8px;
  color: #bca775;
  letter-spacing: 0.2em;
  line-height: 1;
}
.journey-heading h1 {
  color: #f6ebce;
  font:
    21px/1.2 Georgia,
    serif;
  margin: 4px 0 0;
  font-weight: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.journey-header .header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.journey-header button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 10px;
  min-height: 33px;
  background: #17392e75;
}
.journey-header button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
}
.journey-main {
  max-width: 1320px;
  margin: auto;
}
.quest {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 25px;
  padding: 2px 1px 7px;
  color: #d5d4b8;
  font-size: 11px;
}
.quest #objective::before {
  content: "◆";
  margin-right: 8px;
  font-size: 7px;
  vertical-align: 1px;
  color: #d4ad63;
}
.quest #save-state {
  flex-shrink: 0;
  font-size: 9px;
  color: #9ab9a3;
  white-space: nowrap;
}
.quest #save-state::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #87bd9a;
  margin: 0 6px 2px 0;
}
.quest #save-state.error {
  color: #ffb2a0;
}
.quest #save-state.error::before {
  background: #ff9e7e;
}
.journey-main .hud {
  display: grid;
  grid-template-columns: minmax(132px, 1fr) minmax(230px, 2fr) minmax(
      94px,
      0.75fr
    );
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: var(--journey-width);
  min-height: 60px;
  margin: 0 auto;
  padding: 7px 16px;
  border: 1px solid var(--journey-line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(100deg, #193d36f2, #102d29f2 50%, #1e4035f2);
  box-shadow:
    inset 0 1px #f2d59912,
    0 -10px 35px #0001;
}
.journey-main .vitals {
  min-width: 0;
}
.journey-main #hearts {
  display: block;
  font:
    20px/1.3 Georgia,
    serif;
  letter-spacing: 0.5px;
  color: #f58c77;
  white-space: nowrap;
  text-shadow:
    0 1px #6b302b,
    0 -1px #ffe4b1,
    0 2px 5px #07140d;
}
.journey-main .guard-line {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  font:
    8px/1 system-ui,
    sans-serif;
  letter-spacing: 0.07em;
  color: #9cbaa9;
}
.journey-main .guard-line b {
  color: #f6d789;
  font-size: 8px;
}
.journey-main meter {
  appearance: none;
  border: 0;
  background: #061e1b;
  border-radius: 5px;
  overflow: hidden;
  height: 4px;
}
.journey-main meter::-webkit-meter-bar {
  background: #071d19;
  border: 0;
  border-radius: 5px;
  box-shadow: inset 0 1px 2px #0008;
}
.journey-main meter::-webkit-meter-optimum-value {
  background: linear-gradient(90deg, #a3894f, #e4bd75);
  border-radius: 5px;
}
.journey-main #guard {
  width: 64px;
}
.journey-main #guard::-webkit-meter-optimum-value {
  background: linear-gradient(90deg, #409682, #ade0b4);
}
.journey-main .weapons {
  display: flex;
  gap: 8px;
  min-width: 0;
}
.journey-main .weapon {
  position: relative;
  width: 50%;
  min-width: 0;
  padding: 5px 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #06241d38;
  opacity: 0.67;
}
.journey-main .weapon.active {
  border-color: #d2ad6b9c;
  background: linear-gradient(110deg, #d9b76b1e, #d9b76b06);
  box-shadow: inset 0 0 0 1px #f4cd7610;
  opacity: 1;
}
.journey-main .weapon.active::after {
  content: "";
  position: absolute;
  top: -2px;
  left: 12px;
  width: 14px;
  height: 3px;
  border-radius: 3px;
  background: #e3c083;
  box-shadow: 0 0 7px #d2b16855;
}
.journey-main .weapon strong {
  display: block;
  margin: 0;
  color: #f4e5be;
  font:
    15px/1.1 Georgia,
    serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.journey-main .weapon small {
  display: block;
  min-height: 11px;
  margin: 3px 0 4px;
  color: #a9bba3;
  font:
    9px/1 system-ui,
    sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.journey-main .weapon meter {
  display: block;
  width: 100%;
}
.journey-main .tool-status {
  display: grid;
  min-width: 0;
  gap: 1px;
  padding-left: 15px;
  border-left: 1px solid #9ab09035;
}
.journey-main .tool-status > span {
  font:
    9px/1.25 system-ui,
    sans-serif;
  letter-spacing: 0.09em;
  color: #ebc47c;
}
.journey-main #amber::before {
  content: "◆";
  display: inline-block;
  font-size: 9px;
  margin-right: 5px;
  text-shadow: 0 0 6px #e6ac5f66;
}
.journey-main .tool-status b {
  color: #bfe0c8;
  font:
    14px/1.15 Georgia,
    serif;
}
.journey-main .tool-status small {
  color: #9fb9a5;
  font:
    9px/1.15 system-ui,
    sans-serif;
}
.journey-stage {
  position: relative;
  width: 100%;
  max-width: var(--journey-width);
  margin: auto;
  border: 1px solid #bba57880;
  background: #17382e;
  box-shadow:
    0 2px 0 #091c15,
    0 18px 45px #0005;
}
.journey-stage::after {
  content: "";
  position: absolute;
  inset: -2px;
  pointer-events: none;
  z-index: 2;
  background:
    linear-gradient(#e9cc8c, #e9cc8c) left top/19px 2px,
    linear-gradient(#e9cc8c, #e9cc8c) left top/2px 19px,
    linear-gradient(#e9cc8c, #e9cc8c) right top/19px 2px,
    linear-gradient(#e9cc8c, #e9cc8c) right top/2px 19px,
    linear-gradient(#b59862, #b59862) left bottom/19px 2px,
    linear-gradient(#b59862, #b59862) left bottom/2px 19px,
    linear-gradient(#b59862, #b59862) right bottom/19px 2px,
    linear-gradient(#b59862, #b59862) right bottom/2px 19px;
  background-repeat: no-repeat;
}
.journey-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  outline: none;
  touch-action: none;
}
.interaction {
  position: absolute;
  bottom: 13px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 90%;
  z-index: 3;
}
.interaction button {
  padding: 8px 18px;
  border-color: #d6b16c;
  border-radius: 4px;
  background: #102f29ed;
  box-shadow:
    inset 0 1px #eed3a322,
    0 3px 16px #0007;
  color: #ffedc8;
  font-size: 12px;
}
.interaction button:disabled {
  opacity: 0.8;
}
.journey-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  max-width: var(--journey-width);
  min-height: 23px;
  margin: auto;
  padding: 7px 1px;
  font-size: 10px;
  color: #9bb5a8;
}
.journey-footer #device {
  font-size: 8px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
#scene-banner {
  position: absolute;
  top: 22px;
  left: 8px;
  right: 8px;
  pointer-events: none;
  text-align: center;
  color: #fff1c8;
  font:
    26px/1.1 Georgia,
    serif;
  letter-spacing: 0.015em;
  text-shadow:
    0 2px 3px #17342a,
    0 3px 12px #10241b;
  opacity: 0;
  transition: opacity 0.5s;
}
#scene-banner.visible {
  opacity: 1;
}
.journey-page dialog {
  width: min(650px, calc(100% - 28px));
  max-width: none;
  max-height: calc(100dvh - 30px);
  padding: 5px;
  overflow: auto;
  color: #253e36;
  background: #e7d8b6;
  border: 1px solid #ddc391;
  border-radius: 8px;
  box-shadow:
    0 24px 90px #0008,
    0 0 0 5px #16372bd9;
  color-scheme: light;
}
.journey-page dialog::backdrop {
  background: #061915b8;
  backdrop-filter: blur(5px);
}
.journey-page dialog .dialog-card {
  position: relative;
  padding: 26px 30px;
  border: 1px solid #99866066;
  border-radius: 4px;
  background:
    radial-gradient(ellipse at 15% 0, #fff7dd99, transparent 60%),
    repeating-linear-gradient(0deg, #fff1 0 1px, transparent 1px 4px), #ecdfbf;
}
.journey-page dialog .eyebrow {
  display: block;
  color: #7a754c;
  font:
    9px/1.4 system-ui,
    sans-serif;
  letter-spacing: 0.22em;
}
.journey-page dialog h2 {
  color: #21483a;
  font:
    29px/1.15 Georgia,
    serif;
  font-weight: normal;
  margin: 8px 0 13px;
}
.journey-page dialog p {
  color: #556048;
  font:
    13px/1.65 system-ui,
    sans-serif;
  margin: 0 0 14px;
}
.journey-page dialog button {
  min-height: 40px;
  box-shadow:
    inset 0 1px #fff2,
    0 2px 3px #403a1816;
}
.journey-page dialog button:focus-visible {
  outline-color: #927332;
}
.journey-choices {
  display: grid;
  gap: 7px;
  margin: 16px 0;
}
.journey-choices button {
  position: relative;
  text-align: left;
  line-height: 1.5;
  padding: 10px 14px;
}
.journey-page #dialog-close {
  min-width: 136px;
  margin-top: 2px;
  padding: 9px 17px;
  border-color: #a9965b;
  background: linear-gradient(#446750, #294c3b);
}
.journey-page .danger {
  border-color: #c38e65;
}
.journey-page .tiny {
  color: #6e785d;
  font-size: 11px;
}
.journey-page .key-hints {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 14px;
  font-size: 11px;
  line-height: 1.5;
  color: #647158;
  margin: 15px 0;
}
.journey-page .key-hints strong {
  color: #31513d;
}
.journey-page .build-list {
  color: #526349;
  font-size: 12px;
  line-height: 1.8;
}
.map-grid {
  display: grid;
  grid-template-columns: repeat(var(--map-cols), 1fr);
  gap: 5px;
  margin: 18px 0;
}
.map-room {
  min-height: 61px;
  padding: 8px 4px;
  border: 1px solid #72866865;
  border-radius: 4px;
  text-align: center;
  color: #405e46;
  font-size: 10px;
  background: #d9d9b7;
}
.map-room strong {
  display: block;
  font:
    15px/1.5 Georgia,
    serif;
}
.map-room.current {
  border-color: #947732;
  color: #fff0c7;
  background: #3b6851;
  box-shadow: 0 0 0 2px #ae925842;
}
.map-room.cleared:not(.current) {
  background: #bbcba6;
}
.map-room.unknown {
  color: #929a7d;
  background: #e0d8b8;
}
.map-surface {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}
.map-surface div {
  padding: 10px 5px;
  border: 1px solid #9ca47d;
  border-radius: 4px;
  font-size: 11px;
  color: #526849;
}
.map-surface .current {
  color: #fff0c7;
  border-color: #947732;
  background: #3b6851;
}
.journey-page .touch-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 840px;
  margin: 12px auto 0;
  padding: 8px 12px;
  border: 1px solid #b1b48332;
  border-radius: 12px;
  background: linear-gradient(180deg, #254a3b70, #102f2670);
}
.journey-page .touch-controls .stick {
  position: relative;
  width: 98px;
  height: 98px;
  margin: 0;
  border: 1px solid #c5b67d80;
  background: radial-gradient(
    circle,
    #2c5547 0 30%,
    #193c31 31% 59%,
    #0c2c23 60%
  );
  box-shadow:
    inset 0 0 0 5px #bbaa7511,
    0 3px 6px #0003;
}
.journey-page .touch-controls .stick span {
  color: #b9c5a6;
  font:
    8px/1 system-ui,
    sans-serif;
  letter-spacing: 0.07em;
  bottom: 11px;
}
.journey-page .touch-controls .stick i {
  background: radial-gradient(circle at 40% 30%, #789475, #3f6550);
  border: 1px solid #d4c59288;
  box-shadow:
    0 2px 5px #0005,
    inset 0 1px #efffc633;
}
.journey-page .touch-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}
.journey-page .touch-buttons button {
  min-width: 52px;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 11px;
}
.journey-page .touch-buttons button.active {
  color: #fff4d0;
  background: #5b7850;
  box-shadow: inset 0 2px 5px #18371e66;
  border-color: #e3c580;
}
@media (max-width: 760px) {
  .journey-page {
    padding: 0 9px;
    --journey-width: 100%;
  }
  .journey-header {
    height: 57px;
    gap: 8px;
  }
  .journey-header .wordmark {
    display: none;
  }
  .journey-heading > span {
    font-size: 7px;
  }
  .journey-heading h1 {
    margin-top: 4px;
    font-size: 17px;
  }
  .journey-header .header-actions {
    gap: 4px;
  }
  .journey-header button {
    padding: 7px;
    min-width: 31px;
    min-height: 32px;
    font-size: 10px;
    gap: 4px;
  }
  .journey-header button svg {
    width: 12px;
    height: 12px;
  }
  .journey-header #touch-toggle span {
    display: none;
  }
  .quest {
    font-size: 10px;
    gap: 8px;
    align-items: flex-start;
    min-height: 32px;
    padding-bottom: 7px;
  }
  .quest #save-state {
    max-width: 58px;
    font-size: 8px;
    white-space: normal;
    text-align: right;
  }
  .quest #save-state::before {
    display: none;
  }
  .quest #objective::before {
    margin-right: 5px;
  }
  .journey-main .hud {
    grid-template-columns: 82px minmax(0, 1fr) 66px;
    gap: 6px;
    padding: 7px 7px;
    min-height: 62px;
    border-radius: 6px 6px 0 0;
  }
  .journey-main #hearts {
    font-size: 14px;
    line-height: 1.5;
    letter-spacing: -0.5px;
  }
  .journey-main .guard-line {
    gap: 4px;
    font-size: 7px;
    letter-spacing: 0;
    flex-wrap: wrap;
  }
  .journey-main #guard {
    width: 42px;
  }
  .journey-main .guard-line b {
    font-size: 7px;
  }
  .journey-main .weapons {
    gap: 4px;
  }
  .journey-main .weapon {
    padding: 5px;
  }
  .journey-main .weapon strong {
    font-size: 11px;
  }
  .journey-main .weapon small {
    font-size: 8px;
  }
  .journey-main .tool-status {
    padding-left: 5px;
  }
  .journey-main .tool-status > span {
    font-size: 8px;
    letter-spacing: 0;
  }
  .journey-main .tool-status b {
    font-size: 11px;
  }
  .journey-main .tool-status small {
    font-size: 8px;
  }
  .journey-main #amber::before {
    font-size: 7px;
    margin-right: 3px;
  }
  .journey-footer {
    font-size: 9px;
    gap: 6px;
    padding: 8px 1px;
  }
  .journey-footer #device {
    display: none;
  }
  .interaction {
    bottom: 7px;
  }
  .interaction button {
    min-height: 29px;
    padding: 6px 12px;
    font-size: 10px;
  }
  #scene-banner {
    top: 15px;
    font-size: 19px;
  }
  .journey-page .touch-controls {
    padding: 8px 5px;
    gap: 5px;
  }
  .journey-page .touch-controls .stick {
    width: 88px;
    height: 88px;
  }
  .journey-page .touch-buttons {
    gap: 5px;
  }
  .journey-page .touch-buttons button {
    min-width: 45px;
    min-height: 44px;
    padding: 5px 6px;
    font-size: 10px;
  }
  .journey-page dialog .dialog-card {
    padding: 22px 18px;
  }
  .journey-page dialog h2 {
    font-size: 25px;
  }
  .journey-page dialog p {
    font-size: 12px;
  }
  .map-room {
    min-height: 52px;
    font-size: 9px;
  }
  .map-surface div {
    font-size: 10px;
  }
}
@media (min-width: 761px) and (max-height: 700px) {
  .journey-page {
    --journey-width: min(1320px, calc((100dvh - 136px) * 1.666667));
  }
  .journey-header {
    height: 44px;
    padding: 4px 0;
  }
  .journey-heading h1 {
    font-size: 18px;
  }
  .journey-header .wordmark {
    font-size: 12px;
  }
  .journey-header .brand-bell {
    width: 20px;
    height: 26px;
  }
  .quest {
    min-height: 23px;
    padding-bottom: 5px;
  }
  .journey-main .hud {
    min-height: 55px;
    padding: 6px 12px;
    gap: 12px;
  }
  .journey-main .weapon strong {
    font-size: 13px;
  }
  .journey-main .weapon small {
    font-size: 8px;
  }
  .journey-main #hearts {
    font-size: 18px;
  }
  .journey-footer {
    font-size: 9px;
    min-height: 19px;
    padding: 5px 1px;
  }
}
@media (max-height: 560px) and (orientation: landscape) {
  .journey-page {
    padding: 0 8px;
    --journey-width: min(calc(100% - 245px), calc((100dvh - 84px) * 1.666667));
  }
  .journey-header {
    height: 30px;
    padding: 3px 0;
    gap: 10px;
  }
  .journey-header .wordmark,
  .journey-heading > span,
  .quest #save-state,
  .journey-footer {
    display: none;
  }
  .journey-heading h1 {
    margin: 0;
    font-size: 14px;
  }
  .journey-header button {
    min-height: 25px;
    padding: 4px 8px;
    font-size: 10px;
  }
  .journey-header button svg {
    width: 12px;
    height: 12px;
  }
  .journey-header #touch-toggle span {
    display: inline;
  }
  .quest {
    min-height: 18px;
    font-size: 9px;
    padding: 0 0 4px;
  }
  .journey-main .hud {
    max-width: none;
    grid-template-columns: 1fr 1.5fr 0.7fr;
    min-height: 34px;
    padding: 2px 8px;
    gap: 16px;
  }
  .journey-main #hearts {
    font-size: 15px;
    line-height: 1;
  }
  .journey-main .guard-line {
    margin-top: 2px;
    font-size: 7px;
  }
  .journey-main #guard {
    width: 45px;
  }
  .journey-main .weapon {
    padding: 3px 6px;
  }
  .journey-main .weapon strong {
    font-size: 11px;
  }
  .journey-main .weapon small {
    display: none;
  }
  .journey-main .weapon meter {
    margin-top: 4px;
    height: 3px;
  }
  .journey-main .tool-status {
    grid-template-columns: 1fr;
    padding-left: 10px;
  }
  .journey-main .tool-status > span {
    font-size: 8px;
  }
  .journey-main .tool-status b {
    font-size: 11px;
  }
  .journey-main .tool-status small {
    display: none;
  }
  .journey-stage {
    border-top: 0;
  }
  .journey-page .touch-controls {
    position: fixed;
    inset: auto 10px 9px;
    width: auto;
    height: 82px;
    max-width: none;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: none;
    pointer-events: none;
  }
  .journey-page .touch-controls .stick {
    pointer-events: auto;
    width: 82px;
    height: 82px;
  }
  .journey-page .touch-controls #aim-stick {
    margin: 0 0 0 auto;
  }
  .journey-page .touch-controls .touch-buttons {
    position: absolute;
    right: 0;
    bottom: 96px;
    width: 126px;
    pointer-events: auto;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
  }
  .journey-page .touch-buttons button {
    min-width: 45px;
    min-height: 34px;
    padding: 5px;
    font-size: 10px;
  }
  .interaction {
    bottom: 6px;
  }
  .interaction button {
    min-height: 26px;
    padding: 5px 10px;
    font-size: 10px;
  }
  #scene-banner {
    top: 14px;
    font-size: 19px;
  }
  .journey-page dialog {
    max-height: calc(100dvh - 18px);
  }
  .journey-page dialog .dialog-card {
    padding: 12px 20px;
  }
  .journey-page dialog h2 {
    font-size: 22px;
    margin: 5px 0 8px;
  }
  .journey-page dialog p {
    font-size: 11px;
    line-height: 1.5;
    margin-bottom: 8px;
  }
  .journey-page .journey-choices {
    grid-template-columns: 1fr 1fr;
    margin: 10px 0;
    gap: 6px;
  }
  .journey-page .journey-choices button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 10px;
  }
  .journey-page .key-hints {
    font-size: 10px;
    gap: 2px 10px;
    margin: 8px 0;
  }
  .journey-page .build-list {
    font-size: 11px;
  }
  /* Keep the complete chart and its title together on a turned phone. */
  .journey-page dialog:has(.map-grid) {
    width: min(780px, calc(100% - 24px));
  }
  .journey-page .dialog-card:has(.map-grid) {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(0, 1.2fr);
    gap: 0 22px;
  }
  .journey-page .dialog-card:has(.map-grid) #dialog-kind {
    grid-column: 1;
    grid-row: 1;
  }
  .journey-page .dialog-card:has(.map-grid) #dialog-title {
    grid-column: 1;
    grid-row: 2;
  }
  .journey-page .dialog-card:has(.map-grid) #dialog-text {
    grid-column: 1;
    grid-row: 3;
  }
  .journey-page .dialog-card:has(.map-grid) #dialog-extra {
    grid-column: 2;
    grid-row: 1 / span 5;
  }
  .journey-page .dialog-card:has(.map-grid) #dialog-choices {
    display: none;
  }
  .journey-page .dialog-card:has(.map-grid) #dialog-close {
    grid-column: 1;
    grid-row: 4;
    justify-self: start;
    align-self: start;
  }
  .journey-page .map-grid {
    gap: 3px;
    margin: 8px 0;
  }
  .journey-page .map-room {
    min-height: 37px;
    padding: 4px 2px;
    font-size: 8px;
    line-height: 1.1;
  }
  .journey-page .map-room strong {
    font-size: 11px;
    line-height: 1.4;
  }
  .journey-page .map-surface div {
    padding: 5px 3px;
    font-size: 9px;
  }
  .journey-page #dialog-extra p.tiny {
    margin: 0;
    font-size: 8px;
    line-height: 1.4;
  }
}
@media (prefers-reduced-motion: reduce) {
  .journey-page button,
  #scene-banner {
    transition: none;
  }
}

/* The world fills the visible browser area. Chrome floats above it; neither
   thumb controls nor HUD panels reserve strips of the camera's view. */
html:has(.immersive-adventure) {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}
.journey-page.immersive-adventure {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --stick-size: 112px;
  --thumb-edge: 24px;
  --thumb-bottom: 32px;
  --action-primary: 72px;
  --action-secondary: 64px;
  position: fixed;
  left: var(--view-left, 0px);
  top: var(--view-top, 0px);
  width: var(--view-width, 100vw);
  height: var(--view-height, 100dvh);
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: #284b3c;
  isolation: isolate;
}
.journey-page.immersive-adventure .journey-main,
.journey-page.immersive-adventure .journey-stage {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.journey-page.immersive-adventure .journey-stage {
  z-index: 0;
}
.journey-page.immersive-adventure .journey-stage::after {
  content: none;
}
.journey-page.immersive-adventure #game {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  object-fit: fill;
  touch-action: none;
}
.journey-page.immersive-adventure .journey-header {
  position: absolute;
  z-index: 12;
  top: calc(var(--safe-top) + 10px);
  left: calc(var(--safe-left) + 12px);
  right: calc(var(--safe-right) + 12px);
  width: auto;
  max-width: none;
  height: 44px;
  margin: 0;
  padding: 0;
  gap: 12px;
  background: none;
  pointer-events: none;
}
.journey-page.immersive-adventure .journey-header .wordmark,
.journey-page.immersive-adventure .journey-heading > span {
  display: none;
}
.journey-page.immersive-adventure .journey-heading h1 {
  display: inline-block;
  max-width: 100%;
  margin: 0;
  padding: 6px 10px;
  border-radius: 9px;
  background: #12362a9c;
  font-size: clamp(15px, 2vw, 20px);
  line-height: 1.3;
  text-shadow: 0 2px 4px #071e16;
  vertical-align: middle;
}
.journey-page.immersive-adventure .header-actions {
  gap: 6px;
  pointer-events: auto;
  touch-action: none;
}
.journey-page.immersive-adventure .journey-header button {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 11px;
  border-color: #e3dab65c;
  border-radius: 12px;
  background: #153b30d1;
  box-shadow:
    0 2px 10px #08241835,
    inset 0 1px #ffefc315;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.journey-page.immersive-adventure .journey-header button svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.journey-page.immersive-adventure .journey-header button span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.journey-page.immersive-adventure .hud {
  position: absolute;
  z-index: 11;
  top: calc(var(--safe-top) + 62px);
  left: calc(var(--safe-left) + 12px);
  display: grid;
  grid-template-columns: 108px minmax(90px, 1fr) auto;
  width: min(390px, calc(100% - var(--safe-left) - var(--safe-right) - 24px));
  max-width: none;
  min-height: 43px;
  margin: 0;
  padding: 6px 9px;
  gap: 10px;
  border: 1px solid #e1dbb537;
  border-radius: 10px;
  background: #14392bd4;
  box-shadow: 0 3px 12px #0a261e29;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  pointer-events: none;
}
.journey-page.immersive-adventure #hearts {
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: -0.3px;
}
.journey-page.immersive-adventure .guard-line {
  margin-top: 3px;
  gap: 4px;
  font-size: 7px;
}
.journey-page.immersive-adventure #guard {
  width: 52px;
}
.journey-page.immersive-adventure .weapons {
  display: block;
  min-width: 0;
}
.journey-page.immersive-adventure .weapon {
  width: 100%;
  padding: 3px 6px;
}
.journey-page.immersive-adventure .weapon:not(.active) {
  display: none;
}
.journey-page.immersive-adventure .weapon strong {
  font-size: 12px;
}
.journey-page.immersive-adventure .weapon small,
.journey-page.immersive-adventure .tool-status b,
.journey-page.immersive-adventure .tool-status small {
  display: none;
}
.journey-page.immersive-adventure .weapon meter {
  height: 3px;
  margin-top: 5px;
}
.journey-page.immersive-adventure .tool-status {
  padding: 0;
  border: 0;
}
.journey-page.immersive-adventure #amber {
  font-size: 8px;
  white-space: nowrap;
}
.journey-page.immersive-adventure .quest {
  position: absolute;
  z-index: 10;
  top: calc(var(--safe-top) + 113px);
  left: calc(var(--safe-left) + 17px);
  width: min(440px, calc(100% - var(--safe-left) - var(--safe-right) - 34px));
  min-height: 0;
  margin: 0;
  padding: 0;
  color: #fff4d5;
  font-size: 11px;
  line-height: 1.35;
  text-shadow:
    0 1px 3px #071e13,
    0 1px 6px #071e13;
  pointer-events: none;
}
.journey-page.immersive-adventure #objective {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.journey-page.immersive-adventure #save-state {
  display: none;
}
.journey-page.immersive-adventure #save-state.error {
  display: block;
  position: fixed;
  bottom: calc(var(--safe-bottom) + 10px);
  left: 50%;
  max-width: calc(100% - 20px);
  transform: translateX(-50%);
  padding: 8px 10px;
  border-radius: 6px;
  background: #4d2924ed;
  color: #ffdbbf;
  white-space: normal;
}
.journey-page.immersive-adventure #scene-banner {
  top: calc(var(--safe-top) + 156px);
  left: 16px;
  right: 16px;
  font-size: clamp(20px, 4vw, 32px);
}
.journey-page.immersive-adventure .touch-controls {
  position: absolute;
  inset: 0;
  z-index: 14;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  pointer-events: none;
  touch-action: none;
}
.journey-page.immersive-adventure .touch-controls[hidden] {
  display: none;
}
.journey-page.immersive-adventure .touch-controls .stick {
  position: absolute;
  bottom: calc(var(--safe-bottom) + var(--thumb-bottom));
  width: var(--stick-size);
  height: var(--stick-size);
  margin: 0;
  border-color: #eee0a978;
  background: radial-gradient(
    circle,
    #53776178 0 31%,
    #143b326e 32% 64%,
    #0e302670 65%
  );
  box-shadow:
    inset 0 0 0 4px #eadb9d0d,
    0 4px 15px #071e182b;
  pointer-events: auto;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.journey-page.immersive-adventure #move-stick {
  left: calc(var(--safe-left) + var(--thumb-edge));
}
.journey-page.immersive-adventure #aim-stick {
  right: calc(var(--safe-right) + var(--thumb-edge));
}
.journey-page.immersive-adventure .touch-buttons {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.journey-page.immersive-adventure .combat-actions {
  position: absolute;
  left: calc(var(--safe-left) + var(--thumb-edge));
  right: calc(var(--safe-right) + var(--thumb-edge));
  bottom: calc(var(--safe-bottom) + var(--thumb-bottom) + var(--stick-size) + 16px);
  display: grid;
  grid-template-columns: var(--action-secondary) var(--action-secondary) var(--action-primary) var(--action-primary);
  grid-template-areas: "swap tool shield roll";
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.journey-page.immersive-adventure .touch-buttons button {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: var(--action-secondary);
  min-width: 0;
  height: var(--action-secondary);
  min-height: 0;
  padding: 8px;
  border-radius: 20px;
  border: 2px solid #eee0aa9c;
  background: #173e32ed;
  color: #fff1cf;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 3px 10px #08241938, inset 0 1px #fff4cc25;
  pointer-events: auto;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.journey-page.immersive-adventure .touch-buttons button svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}
.journey-page.immersive-adventure [data-action="swap"] { grid-area: swap; }
.journey-page.immersive-adventure [data-action="tool"] { grid-area: tool; }
.journey-page.immersive-adventure [data-action="shield"] { grid-area: shield; }
.journey-page.immersive-adventure [data-action="roll"] { grid-area: roll; }
.journey-page.immersive-adventure .touch-buttons [data-action="shield"],
.journey-page.immersive-adventure .touch-buttons [data-action="roll"] {
  width: var(--action-primary);
  height: var(--action-primary);
}
.journey-page.immersive-adventure .touch-buttons [data-action="roll"] {
  background: #ead29a;
  border-color: #fff0c9;
  color: #183c2d;
}
.journey-page.immersive-adventure .touch-buttons #touch-use {
  position: absolute;
  left: 50%;
  bottom: calc(var(--safe-bottom) + var(--thumb-bottom) + (var(--stick-size) - var(--action-primary)) / 2);
  transform: translateX(-50%);
  width: var(--action-primary);
  height: var(--action-primary);
}
.journey-page.immersive-adventure #touch-use.ready {
  border-color: #fff1a7;
  background: #567449f2;
  box-shadow: 0 0 0 3px #ffe8a426;
}
.journey-page.immersive-adventure .touch-buttons button.active {
  background: #8b9d68e8;
  color: #102d22;
  border-color: #ffebb7;
}
.journey-page.immersive-adventure .interaction {
  z-index: 15;
  touch-action: none;
  bottom: calc(var(--safe-bottom) + 20px);
  max-width: calc(
    100% - var(--safe-left) - var(--safe-right) - 2 * var(--stick-size) - 82px
  );
}
.journey-page.immersive-adventure:has(#touch-controls:not([hidden])) .interaction {
  display: none;
}
.journey-page.immersive-adventure .interaction button {
  max-width: 100%;
  min-height: 44px;
  padding: 6px 10px;
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
  border-radius: 9px;
  background: #173f30e8;
}
.journey-page.immersive-adventure .journey-footer {
  position: absolute;
  z-index: 10;
  bottom: calc(var(--safe-bottom) + var(--thumb-bottom) + var(--stick-size) + var(--action-primary) + 26px);
  left: calc(var(--safe-left) + 18px);
  display: block;
  width: min(360px, calc(100% - var(--safe-left) - var(--safe-right) - 36px));
  max-width: none;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: #eff0d8;
  font-size: 10px;
  line-height: 1.4;
  text-shadow:
    0 1px 3px #102c1b,
    0 1px 5px #102c1b;
  pointer-events: none;
}
.journey-page.immersive-adventure #notice {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.journey-page.immersive-adventure #device {
  display: none;
}
.journey-page.immersive-adventure .viewport-status {
  position: absolute;
  z-index: 25;
  left: 50%;
  top: calc(var(--safe-top) + 155px);
  width: min(360px, calc(100% - 32px));
  transform: translateX(-50%);
  padding: 12px 15px;
  border: 1px solid #e0ce9866;
  border-radius: 12px;
  background: #173a2eea;
  box-shadow: 0 4px 20px #071c1933;
  font-size: 13px;
  pointer-events: none;
}
.journey-page.immersive-adventure dialog {
  position: fixed;
  top: calc(var(--view-top, 0px) + var(--view-height, 100dvh) / 2);
  left: calc(var(--view-left, 0px) + var(--view-width, 100vw) / 2);
  right: auto;
  bottom: auto;
  width: min(
    620px,
    calc(var(--view-width, 100vw) - var(--safe-left) - var(--safe-right) - 24px)
  );
  max-width: none;
  max-height: calc(
    var(--view-height, 100dvh) - var(--safe-top) - var(--safe-bottom) - 24px
  );
  margin: 0;
  transform: translate(-50%, -50%);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.journey-page.immersive-adventure dialog button,
.journey-page.immersive-adventure .journey-choices button,
.journey-page.immersive-adventure .map-room {
  min-height: 44px;
}
.journey-page.immersive-adventure #dialog-close {
  min-width: 110px;
}
.journey-page.immersive-adventure dialog.zoom-recovery {
  width: min(420px, calc(var(--zoom-width, 100vw) - 24px));
  max-height: calc(var(--zoom-height, 100dvh) - 24px);
  transform: translate(-50%, -50%) scale(var(--view-inverse-scale, 1));
  transform-origin: center;
  touch-action: pan-x pan-y pinch-zoom;
}
.journey-page.immersive-adventure .zoom-recovery .dialog-card {
  padding: 18px;
}
.journey-page.immersive-adventure .zoom-recovery h2 {
  font-size: 23px;
}
.journey-page.immersive-adventure .zoom-recovery #dialog-text {
  font-size: 14px;
  line-height: 1.45;
}
#zoom-gesture-pad {
  display: grid;
  gap: 8px;
  min-height: 105px;
  margin: 14px 0;
  padding: 12px;
  place-content: center;
  border: 1px dashed #496e58;
  border-radius: 12px;
  background: #d5dfc2;
  color: #193a2a;
  font-size: 14px;
  text-align: center;
  touch-action: pan-x pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}
#zoom-gesture-pad > span:first-child {
  font-size: 30px;
  line-height: 1;
}
@media (orientation: landscape) and (max-height: 600px) {
  .journey-page.immersive-adventure {
    --stick-size: 112px;
  }
  .journey-page.immersive-adventure .combat-actions {
    left: auto;
    right: calc(var(--safe-right) + var(--thumb-edge) + var(--stick-size) + 12px);
    bottom: calc(var(--safe-bottom) + var(--thumb-bottom));
    grid-template-columns: var(--action-secondary) var(--action-primary);
    grid-template-areas: "swap shield" "tool roll";
  }
  .journey-page.immersive-adventure .touch-buttons #touch-use {
    left: calc(var(--safe-left) + var(--thumb-edge) + var(--stick-size) + 12px);
    transform: none;
  }
  .journey-page.immersive-adventure .journey-header {
    top: calc(var(--safe-top) + 8px);
  }
  .journey-page.immersive-adventure .hud {
    top: calc(var(--safe-top) + 60px);
    width: min(350px, 46%);
  }
  .journey-page.immersive-adventure .quest {
    top: calc(var(--safe-top) + 110px);
    width: min(350px, 43%);
    font-size: 10px;
  }
  .journey-page.immersive-adventure #objective {
    -webkit-line-clamp: 1;
  }
  .journey-page.immersive-adventure #scene-banner {
    top: calc(var(--safe-top) + 24px);
    left: 34%;
    right: 25%;
    font-size: 22px;
  }
  .journey-page.immersive-adventure .interaction {
    max-width: min(310px, calc(100% - 2 * var(--stick-size) - 70px));
  }
  .journey-page.immersive-adventure .journey-footer {
    bottom: calc(var(--safe-bottom) + 6px);
    left: calc(var(--safe-left) + var(--thumb-edge));
    width: calc(100% - var(--safe-left) - var(--safe-right) - 2 * var(--thumb-edge));
    font-size: 10px;
  }
  .journey-page.immersive-adventure #notice {
    -webkit-line-clamp: 1;
  }
  .journey-page.immersive-adventure .viewport-status {
    top: calc(var(--safe-top) + 115px);
  }
}
@media (orientation: landscape) and (max-height: 340px) and (max-width: 720px) {
  .journey-page.immersive-adventure {
    --stick-size: 96px;
    --action-primary: 64px;
    --action-secondary: 56px;
  }
  .journey-page.immersive-adventure .hud {
    width: min(310px, calc(100% - var(--safe-left) - var(--safe-right) - var(--thumb-edge) - var(--stick-size) - var(--action-secondary) - var(--action-primary) - 48px));
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 6px;
    padding-inline: 6px;
  }
  .journey-page.immersive-adventure .quest {
    width: min(300px, calc(100% - var(--safe-left) - var(--safe-right) - var(--thumb-edge) - var(--stick-size) - var(--action-secondary) - var(--action-primary) - 58px));
  }
}
@media (max-width: 360px) {
  .journey-page.immersive-adventure {
    --stick-size: 96px;
    --thumb-edge: 20px;
    --action-primary: 64px;
    --action-secondary: 56px;
  }
  .journey-page.immersive-adventure .header-actions {
    gap: 3px;
  }
  .journey-page.immersive-adventure .journey-heading h1 {
    padding: 5px 7px;
    font-size: 13px;
  }
  .journey-page.immersive-adventure .hud {
    grid-template-columns: 99px minmax(70px, 1fr) auto;
    gap: 5px;
    padding-inline: 7px;
  }
  .journey-page.immersive-adventure #hearts {
    font-size: 16px;
  }
  .journey-page.immersive-adventure .interaction {
    bottom: calc(var(--safe-bottom) + var(--stick-size) + 142px);
    max-width: calc(100% - 40px);
  }
}

/* Composed adventure: controls occupy measured regions; the camera places play
   in the clear space between them without letterboxing the world backdrop. */
.journey-page.immersive-adventure .hud {
  grid-template-columns: 92px minmax(0, 1fr) auto;
  width: min(500px, calc(100% - var(--safe-left) - var(--safe-right) - 24px));
  min-height: 54px;
  gap: 8px;
  padding: 5px 8px;
}
.journey-page.immersive-adventure #hearts { font-size: 15px; white-space: nowrap; }
.journey-page.immersive-adventure .weapons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.journey-page.immersive-adventure .weapon,
.journey-page.immersive-adventure .weapon:not(.active) { display: block; min-width: 0; padding: 3px 5px; border: 1px solid #9eae875c; border-radius: 6px; opacity: .8; background: #122b2438; }
.journey-page.immersive-adventure .weapon.active { opacity: 1; border-color: #e9d28b; background: #71805635; }
.journey-page.immersive-adventure .weapon strong { display:block; font: 600 10px/1.2 system-ui; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.journey-page.immersive-adventure .weapon small { display:block; font: 9px/1.4 system-ui; white-space:nowrap; color:#d1dec7; }
.journey-page.immersive-adventure .weapon[data-readiness="vent"] small { color:#ffc78d; }
.journey-page.immersive-adventure .weapon meter { display:block; width:100%; height:4px; margin-top:2px; }
.journey-page.immersive-adventure #amber { font-size:9px; white-space:nowrap; }
.journey-page.immersive-adventure .quest { top:calc(var(--safe-top) + 122px); width:min(500px,calc(100% - var(--safe-left) - var(--safe-right) - 32px)); font-size:11px; }
.journey-page.immersive-adventure #objective { -webkit-line-clamp:1; }
.journey-page.immersive-adventure #learning-hint { display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2; overflow:hidden; margin-top:4px; font:11px/1.3 system-ui; color:#f8edca; text-shadow:0 1px 4px #173c2b; }
.journey-page.immersive-adventure #learning-hint[hidden],
.journey-page.immersive-adventure #notice[hidden],
.journey-page.immersive-adventure #boss-status[hidden] { display:none !important; }
.journey-page.immersive-adventure .touch-buttons button.unavailable { color:#bbcbb8; background:#234334c9; border-color:#a5b69c70; box-shadow:none; opacity:.68; }
.journey-page.immersive-adventure .touch-buttons button.unavailable svg { opacity:.55; }
.journey-page.immersive-adventure #boss-status { position:absolute; z-index:12; display:grid; gap:4px; padding:4px 8px; height:34px; border:1px solid #d9c68b77; border-radius:8px; background:#19392ee8; pointer-events:none; box-sizing:border-box; text-align:center; color:#f4db9e; }
.journey-page.immersive-adventure #boss-label { font:600 11px/1.15 system-ui; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.journey-page.immersive-adventure #boss-health { width:100%; height:5px; }
.journey-page.immersive-adventure #scene-banner { top:calc(var(--play-top, 155px) + 6px); left:var(--play-left, 12px); width:var(--play-width, calc(100% - 24px)); right:auto; font-size:clamp(17px,3vw,24px); }
.journey-page.immersive-adventure.boss-encounter #scene-banner { display:none; }
.journey-page.immersive-adventure .journey-footer { font-size:11px; }
.journey-page.immersive-adventure #notice { -webkit-line-clamp:2; }
.journey-page.immersive-adventure dialog details { border-top:1px solid #68806650; margin-top:10px; padding-top:4px; }
.journey-page.immersive-adventure dialog summary { display:list-item; min-height:44px; padding:12px 4px; cursor:pointer; color:#284735; font-weight:650; }
.journey-page.immersive-adventure dialog summary:focus-visible { outline:3px solid #907740; outline-offset:1px; border-radius:5px; }
.journey-page.immersive-adventure dialog .secondary-choices { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.journey-page.immersive-adventure dialog.pause-menu #dialog-choices { display:block; margin-top:0; }
.journey-page.immersive-adventure dialog.pause-menu #dialog-close { display:block; width:100%; min-height:48px; margin:12px 0; background:#285b43; color:#fff3cd; border-color:#496e47; }
.journey-page.immersive-adventure dialog.pause-menu .dialog-card { padding:18px 22px; }
.journey-page.immersive-adventure dialog.pause-menu .build-list { font-size:12px; line-height:1.4; }
.journey-page.immersive-adventure dialog.pause-menu .build-list > p { margin:4px 0; }
.journey-page.immersive-adventure dialog.pause-menu .key-hints { margin-top:8px; }
@media (orientation:landscape) and (max-height:600px) {
  .journey-page.immersive-adventure .journey-heading { max-width:28%; }
  .journey-page.immersive-adventure .hud { width:min(380px,45%); grid-template-columns:80px minmax(0,1fr) auto; gap:5px; }
  .journey-page.immersive-adventure .hud #hearts { font-size:13px; }
  .journey-page.immersive-adventure .hud #guard { width:43px; }
  .journey-page.immersive-adventure .quest { top:calc(var(--safe-top) + 119px); width:min(350px,42%); }
  .journey-page.immersive-adventure #learning-hint { -webkit-line-clamp:2; font-size:10px; }
  .journey-page.immersive-adventure .journey-footer { width:calc(100% - var(--safe-left) - var(--safe-right) - 2 * var(--thumb-edge)); }
  .journey-page.immersive-adventure dialog.pause-menu .dialog-card { padding:12px 20px; }
  .journey-page.immersive-adventure dialog.pause-menu .eyebrow { display:none; }
  .journey-page.immersive-adventure dialog.pause-menu #dialog-title { margin:0 0 4px; }
}
@media (max-width:360px) {
  .journey-page.immersive-adventure .hud { grid-template-columns:76px minmax(0,1fr) auto; gap:4px; }
  .journey-page.immersive-adventure #hearts { font-size:12px; }
  .journey-page.immersive-adventure .weapon strong { font-size:9px; }
  .journey-page.immersive-adventure .weapon small { font-size:8px; }
}
@media (max-width:560px) {
  .journey-page.immersive-adventure dialog .secondary-choices { grid-template-columns:1fr; }
}
/* Landscape uses two thumb clusters, leaving the centre for combat. */
@media (orientation:landscape) and (max-height:600px) {
  .journey-page.immersive-adventure .journey-heading { display:none; }
  .journey-page.immersive-adventure .hud { top:calc(var(--safe-top) + 8px); }
  .journey-page.immersive-adventure .quest { top:calc(var(--safe-top) + 68px); }
  .journey-page.immersive-adventure .combat-actions { display:contents; }
  .journey-page.immersive-adventure .combat-actions button { position:absolute; }
  .journey-page.immersive-adventure [data-action="swap"],
  .journey-page.immersive-adventure [data-action="tool"] { left:calc(var(--safe-left) + var(--thumb-edge) + var(--stick-size) + 12px); }
  .journey-page.immersive-adventure [data-action="shield"],
  .journey-page.immersive-adventure [data-action="roll"] { right:calc(var(--safe-right) + var(--thumb-edge) + var(--stick-size) + 12px); }
  .journey-page.immersive-adventure [data-action="swap"],
  .journey-page.immersive-adventure [data-action="shield"] { bottom:calc(var(--safe-bottom) + var(--thumb-bottom) + var(--action-primary) + 12px); }
  .journey-page.immersive-adventure [data-action="tool"],
  .journey-page.immersive-adventure [data-action="roll"] { bottom:calc(var(--safe-bottom) + var(--thumb-bottom)); }
  .journey-page.immersive-adventure .touch-buttons #touch-use { left:calc(var(--safe-left) + var(--thumb-edge) + (var(--stick-size) - var(--action-primary)) / 2); bottom:calc(var(--safe-bottom) + var(--thumb-bottom) + var(--stick-size) + 12px); }
}
@media (orientation:landscape) and (max-height:340px) and (max-width:720px) {
  .journey-page.immersive-adventure .hud { width:calc(100% - 222px - var(--safe-left) - var(--safe-right)); }
  .journey-page.immersive-adventure .quest { left:calc(var(--safe-left) + var(--thumb-edge) + var(--stick-size) + 12px); width:calc(100% - 2 * var(--stick-size) - 2 * var(--thumb-edge) - 24px); }
}
.journey-page.immersive-adventure.boss-encounter .quest { display:none; }
@media (orientation:landscape) and (max-height:600px) {
  .journey-page.immersive-adventure .header-actions { margin-left:auto; }
}
@media (orientation:landscape) and (max-height:600px) {
  .journey-page.immersive-adventure .quest { left:calc(var(--safe-left) + var(--thumb-edge) + var(--stick-size) + 12px); width:calc(100% - var(--safe-left) - var(--safe-right) - 2 * var(--stick-size) - 2 * var(--thumb-edge) - 24px); }
}
@media (orientation:landscape) and (max-height:300px) and (max-width:720px) {
  .journey-page.immersive-adventure { --thumb-bottom:24px; }
  .journey-page.immersive-adventure .hud { padding-block:3px; }
  .journey-page.immersive-adventure #learning-hint { display:none; }
  .journey-page.immersive-adventure .touch-buttons #touch-use { bottom:calc(var(--safe-bottom) + var(--thumb-bottom) + var(--stick-size) + 10px); }
}
