* {
  box-sizing: border-box;
}
:root {
  --bg: #0d1517;
  --panel: #141e20;
  --line: #2a3636;
  --text: #e9e7d9;
  --muted: #9baaa5;
  --green: #a7d69a;
  --gold: #d6ba78;
  --purple: #ba9fe3;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  font: inherit;
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
canvas:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
button {
  transition:
    background 0.15s,
    transform 0.15s;
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
.topbar {
  height: 100px;
  max-width: 1560px;
  padding: 0 40px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1.2px;
}
.brand img {
  height: 46px;
  width: 46px;
  object-fit: contain;
}
.brand-green {
  color: var(--green);
}
.brand small {
  display: block;
  color: #a8b4ad;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 2.3px;
  margin-top: 3px;
}
.edition {
  font-size: 10px;
  letter-spacing: 1.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.edition-line {
  color: #4c6057;
  margin: 0 8px;
}
.status-dot {
  width: 5px;
  height: 5px;
  display: inline-block;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px #97d78a44;
}
.topbar nav {
  display: flex;
  gap: 8px;
}
.iconbtn {
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--line);
  font:
    20px Georgia,
    serif;
  position: relative;
}
.iconbtn:hover {
  background: #263232;
}
.iconbtn span {
  font: 7px sans-serif;
  display: block;
  margin-top: 1px;
  letter-spacing: 1px;
}
main {
  max-width: 1560px;
  margin: auto;
  padding: 30px 40px 16px;
}
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 294px;
  gap: 28px;
}
.scene-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  color: #b7c5b8;
  height: 36px;
  margin-bottom: 12px;
}
.scene-heading > span:last-child {
  color: #80928b;
  font-size: 9px;
}
.tiny-diamond {
  color: var(--gold);
  margin-right: 8px;
}
.game-frame {
  aspect-ratio: 8/5;
  position: relative;
  overflow: hidden;
  border: 1px solid #475149;
  background: #13251f;
  box-shadow: 0 16px 60px #0003;
  isolation: isolate;
}
#game {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  outline: none;
}
.title-screen {
  position: absolute;
  inset: 0;
  background: url("assets/title-art.jpg") center center/cover no-repeat;
}
.title-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(10, 24, 21, 0.42), transparent 74%),
    linear-gradient(0deg, #0a171a99, transparent 25%);
}
.title-copy {
  position: absolute;
  left: 6.2%;
  top: 12%;
  width: 53%;
}
.eyebrow {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 2.6px;
  font-weight: 700;
}
h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(38px, 5.8vw, 88px);
  line-height: 0.89;
  letter-spacing: -3px;
  font-weight: 500;
  color: #eee9d5;
  margin: 22px 0 18px;
  text-shadow: 0 4px 20px #07150e55;
}
h1 span {
  display: block;
  color: #b9d0a1;
}
.title-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d4c39a;
  font-size: 8px;
  letter-spacing: 2px;
  width: 90%;
}
.title-rule i {
  height: 1px;
  background: #c2aa7555;
  flex: 1;
}
.title-copy p {
  font-size: clamp(11px, 1.1vw, 16px);
  color: #c1ccbf;
  line-height: 1.8;
  margin: 22px 0;
}
.title-copy p strong {
  font-weight: 400;
  color: #edf0df;
}
.primary,
.secondary {
  border: 1px solid #cfbd85;
  background: #d4bd85;
  color: #172822;
  padding: 13px 18px;
  font-weight: 700;
  font-size: 12px;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 44px;
}
.primary:hover {
  background: #e6d5a7;
}
.primary span {
  font-size: 20px;
  line-height: 1;
}
.title-copy .primary,
.title-copy .secondary {
  width: 92%;
  max-width: 286px;
}
.secondary {
  background: #142c25bb;
  color: #ebecd9;
  border-color: #6c8265;
  font-size: 11px;
  margin-top: 10px;
}
.secondary:hover {
  background: #274335;
}
.title-caption {
  font-size: 7px;
  letter-spacing: 1.6px;
  color: #9caf9a;
  margin-top: 16px;
}
.title-bottom {
  position: absolute;
  bottom: 20px;
  left: 6.2%;
  right: 4%;
  display: flex;
  justify-content: space-between;
  font-size: 7px;
  letter-spacing: 1.6px;
  color: #d5d8b8;
}
.title-bottom span:last-child {
  color: #c5d4c1;
}
.under-game {
  display: flex;
  justify-content: space-between;
  color: #8fa19a;
  font-size: 8px;
  letter-spacing: 1px;
  margin-top: 16px;
  gap: 10px;
}
.under-game .status-dot {
  margin-right: 7px;
}
.journal {
  border: 1px solid var(--line);
  padding: 22px;
  background: linear-gradient(140deg, #1b2828, #141e20);
  align-self: stretch;
}
.journal-title {
  font-size: 9px;
  letter-spacing: 1.1px;
  display: flex;
  align-items: center;
  color: #d2dac9;
  border-bottom: 1px solid #39443c;
  padding-bottom: 20px;
}
.journal-number {
  margin-left: auto;
  font: 18px Georgia;
  color: #8a9d88;
}
.chapter-eyebrow {
  font-size: 8px;
  letter-spacing: 1.9px;
  color: var(--gold);
  margin: 24px 0 12px;
}
.journal h2 {
  font:
    32px/1.16 Georgia,
    serif;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
}
.journal-intro {
  color: #a2b3aa;
  font-size: 12px;
  line-height: 1.75;
  margin: 0 0 24px;
}
.quest-list {
  display: grid;
  gap: 20px;
}
.quest-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.quest-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  display: grid;
  place-items: center;
  border: 1px solid #4b5b4d;
  color: #bcd2a6;
  font: 10px Georgia;
}
.quest-row.done .quest-icon {
  background: #3d6242;
  color: #e2f4c7;
  border-color: #6b9664;
}
.quest-row b {
  font-size: 11px;
  font-weight: 500;
  display: block;
  margin-top: 1px;
}
.quest-row small {
  font-size: 10px;
  color: #93a698;
  display: block;
  margin-top: 3px;
}
.journal-divider {
  height: 1px;
  background: var(--line);
  margin: 24px 0 18px;
}
.loadout-label {
  font-size: 8px;
  letter-spacing: 1.8px;
  color: #92a291;
}
.kit {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 18px;
}
.kit > span:first-child {
  font: 28px Georgia;
  color: var(--purple);
}
.kit b {
  font-size: 11px;
  font-weight: 500;
}
.kit small {
  display: block;
  font-size: 9px;
  color: #8fa293;
  margin-top: 3px;
}
.kit-level {
  margin-left: auto;
  font: 18px Georgia;
  color: var(--gold);
}
.outline-btn {
  border: 1px solid #576550;
  background: #233129;
  width: 100%;
  font-size: 11px;
  min-height: 44px;
  padding: 11px 13px;
  display: flex;
  justify-content: space-between;
}
.outline-btn:hover {
  background: #304739;
}
.text-btn {
  border: 0;
  background: none;
  font-size: 10px;
  color: #bccbb8;
  display: flex;
  justify-content: space-between;
  width: 100%;
  padding: 12px 0;
  min-height: 44px;
}
.text-btn span {
  border: 1px solid #435744;
  padding: 0 5px;
  font-size: 8px;
}
.journal-footer {
  display: flex;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 17px;
}
.journal-footer img {
  height: 36px;
  width: 36px;
  filter: saturate(0.65);
}
.journal-footer p {
  font-size: 9px;
  line-height: 1.7;
  color: #899d8d;
  margin: 0;
}
.journal-footer b {
  color: #b8c5b2;
  font-size: 10px;
  font-weight: 500;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 27px 0 8px;
  font-size: 8px;
  letter-spacing: 1px;
  color: #8a9d93;
}
footer b {
  font-size: 10px;
  margin: 0 4px;
  color: #667d6f;
}
.footer-sep {
  margin: 0 12px;
}
footer div {
  display: flex;
  gap: 22px;
}
footer button {
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
  font: inherit;
}
footer a:hover,
footer button:hover {
  color: #ebebcf;
}
.hud {
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.hero-vitals {
  width: 220px;
  padding: 10px 12px;
  background: #0d1a1ddd;
  border: 1px solid #68827555;
  box-shadow: 0 3px 15px #0003;
}
.vitals-top {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  margin-bottom: 6px;
  color: #eee9d5;
}
.vitals-top b {
  font-size: 8px;
  letter-spacing: 1px;
}
.bar {
  height: 9px;
  background: #182c2d;
  border: 1px solid #476050;
  overflow: hidden;
}
.bar i {
  display: block;
  height: 100%;
  width: 100%;
  background: #86be75;
  transition: width 0.15s;
}
.bar.mana {
  height: 5px;
  margin-top: 4px;
  border: 0;
}
.mana i {
  background: #aa8aca;
}
.bar.xp {
  height: 2px;
  border: 0;
  margin-top: 5px;
}
.xp i {
  background: #dcc37d;
}
.hud-right {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.gold {
  background: #142321e8;
  border: 1px solid #61724e66;
  padding: 8px 12px;
  font-size: 16px;
  color: #e4c784;
  min-width: 110px;
}
.gold small {
  display: block;
  font-size: 6px;
  color: #acb79a;
  letter-spacing: 1.6px;
}
.gold > span {
  font-size: 17px;
  margin-right: 5px;
}
.hud-btn {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border: 1px solid #75856a88;
  background: #142321e8;
  font-weight: 900;
}
.boss-hud {
  position: absolute;
  top: 96px;
  left: 30%;
  width: 40%;
  text-align: center;
  font-size: 9px;
  letter-spacing: 2px;
  color: #f2d1f7;
  text-shadow: 1px 2px #000;
}
.boss-hud .bar {
  margin-top: 5px;
  border-color: #765586;
  background: #211926;
}
.boss-hud i {
  background: #b770a9;
}
.toast {
  position: absolute;
  top: 115px;
  left: 50%;
  transform: translate(-50%, -10px);
  background: #142822ee;
  border: 1px solid #8c9e63aa;
  padding: 9px 17px;
  color: #e7e8c7;
  font-size: 11px;
  text-align: center;
  max-width: 85%;
  opacity: 0;
  transition:
    opacity 0.2s,
    transform 0.2s;
  pointer-events: none;
  z-index: 7;
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
.interact-hint {
  position: absolute;
  bottom: 94px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: #101b20e8;
  border: 1px solid #8c887066;
  padding: 8px 12px;
  font-size: 11px;
  color: #e4dab9;
  pointer-events: none;
}
.interact-hint kbd {
  margin-right: 6px;
}
.ability-bar {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.ability-bar button {
  border: 1px solid #7d897166;
  background: #102321ed;
  min-width: 57px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 7px;
  position: relative;
}
.ability-bar button:hover {
  background: #29443a;
}
.ability-bar kbd {
  position: absolute;
  right: 4px;
  top: 3px;
  font: 6px sans-serif;
  color: #aab5a0;
}
.ability-bar button > span {
  font: 27px/1.3 Georgia;
  color: #dbd1ae;
}
.ability-bar small {
  font-size: 6px;
  letter-spacing: 0.6px;
  margin-top: 4px;
}
.ability-bar button.cooldown {
  opacity: 0.48;
}
kbd {
  font: 10px monospace;
  background: #263c34;
  border: 1px solid #6c7e6399;
  color: #e5e8c9;
  border-radius: 2px;
  padding: 2px 5px;
}
.modal {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #081416c9;
  backdrop-filter: blur(5px);
  z-index: 10;
  padding: 20px;
}
.modal-card {
  border: 1px solid #657153;
  background: linear-gradient(130deg, #1c2d29, #152325);
  padding: 28px;
  max-width: 580px;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
  box-shadow: 0 15px 60px #0005;
}
.modal h2 {
  font:
    34px/1.1 Georgia,
    serif;
  color: #efebd4;
  margin: 12px 0 18px;
}
.modal p {
  color: #b6c7b8;
  font-size: 13px;
  line-height: 1.7;
}
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  flex-wrap: wrap;
}
.modal-actions .secondary {
  margin: 0;
}
.guide-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
  font-size: 12px;
  color: #ccd5c1;
}
.guide-grid div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.modal-note {
  border-top: 1px solid #3f5140;
  padding-top: 12px;
  font-size: 10px !important;
}
.shop-row {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #384a3d;
  padding: 13px 0;
}
.shop-row b {
  font-size: 12px;
  color: #e7e4cc;
}
.shop-row small {
  display: block;
  font-size: 10px;
  color: #a8bca7;
  margin-top: 4px;
}
.shop-row button {
  min-height: 44px;
  min-width: 94px;
  font-size: 11px;
  border: 1px solid #768b5a;
  background: #2c4432;
  color: #e5d4a3;
  padding: 8px;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 24px 0;
}
.result-grid div {
  background: #101e1e;
  border: 1px solid #3c5140;
  text-align: center;
  padding: 12px;
}
.result-grid strong {
  display: block;
  font: 25px Georgia;
  color: #dbc589;
}
.result-grid small {
  font-size: 9px;
  color: #a7b99f;
}
.map-canvas {
  width: 100%;
  aspect-ratio: 4/3;
  max-height: 250px;
  object-fit: contain;
  image-rendering: pixelated;
  background: #101c1e;
  border: 1px solid #4a5a49;
}
.map-key {
  font-size: 10px !important;
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.touch-pad,
.touch-interact {
  display: none;
}
.game-frame.playing #touchPad {
  visibility: visible;
}
.game-frame:fullscreen {
  aspect-ratio: auto;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #060e11;
}
.game-frame:fullscreen canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.game-frame:fullscreen .title-copy {
  top: 15%;
  max-width: 530px;
}
.game-frame:fullscreen .title-screen {
  background-size: cover;
}
.game-frame:fullscreen h1 {
  font-size: 100px;
}
@media (min-width: 1600px) {
  h1 {
    font-size: 86px;
  }
  .journal {
    padding: 26px;
  }
  .journal-intro {
    font-size: 13px;
  }
  .quest-row b {
    font-size: 12px;
  }
  .quest-row small {
    font-size: 11px;
  }
  .title-copy p {
    margin: 28px 0;
  }
}
@media (max-width: 1200px) {
  .topbar {
    padding: 0 24px;
    height: 84px;
  }
  main {
    padding: 22px 24px;
  }
  .game-layout {
    grid-template-columns: minmax(0, 1fr) 246px;
    gap: 18px;
  }
  .journal {
    padding: 18px;
  }
  .journal h2 {
    font-size: 28px;
  }
  .journal-intro {
    font-size: 11px;
    margin-bottom: 18px;
  }
  .quest-list {
    gap: 15px;
  }
  .quest-row {
    gap: 9px;
  }
  .quest-row b {
    font-size: 10px;
  }
  .quest-row small {
    font-size: 9px;
  }
  .journal-divider {
    margin: 18px 0 14px;
  }
  .chapter-eyebrow {
    margin-top: 18px;
  }
  .journal-footer {
    margin-top: 8px;
  }
  .title-copy {
    top: 10%;
  }
  h1 {
    font-size: 6vw;
    margin: 16px 0 12px;
  }
  .title-copy p {
    margin: 16px 0;
  }
  .title-copy .primary {
    font-size: 10px;
    padding: 10px 12px;
  }
  .title-caption {
    font-size: 6px;
    margin-top: 10px;
  }
  .title-rule {
    font-size: 6px;
    letter-spacing: 1.3px;
  }
  .title-bottom {
    font-size: 6px;
    bottom: 13px;
  }
  .edition {
    font-size: 8px;
    gap: 8px;
  }
  .modal-card {
    padding: 22px;
  }
  .modal h2 {
    font-size: 28px;
  }
}
@media (max-width: 1000px) {
  .game-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .journal {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
  }
  .journal-title {
    grid-column: 1/-1;
  }
  .journal .chapter-eyebrow,
  .journal h2,
  .journal-intro {
    grid-column: 1;
  }
  .quest-list {
    grid-column: 2;
    grid-row: 2/5;
    margin-top: 24px;
  }
  .journal-divider,
  .loadout-label,
  .kit,
  .journal-footer {
    display: none;
  }
  .journal .outline-btn,
  .journal .text-btn {
    margin-top: 12px;
  }
  .journal h2 br {
    display: none;
  }
  h1 {
    font-size: 9vw;
  }
  .title-copy {
    top: 12%;
  }
  .title-copy p {
    font-size: 15px;
    margin: 24px 0;
  }
  .title-rule {
    font-size: 8px;
  }
  .title-copy .primary {
    font-size: 12px;
  }
  .title-bottom {
    font-size: 8px;
  }
  .title-caption {
    font-size: 8px;
  }
  .edition {
    display: none;
  }
  .quest-row b {
    font-size: 12px;
  }
  .quest-row small {
    font-size: 11px;
  }
  .journal-intro {
    font-size: 12px;
  }
  .scene-heading > span:last-child {
    font-size: 8px;
  }
}
@media (pointer: coarse), (max-width: 700px) {
  .playing .touch-pad {
    display: grid;
    position: absolute;
    bottom: 15px;
    left: 14px;
    grid-template-columns: repeat(3, 42px);
    grid-template-rows: repeat(2, 42px);
    gap: 3px;
    touch-action: none;
  }
  .touch-pad button {
    background: #142d28c9;
    border: 1px solid #83966f99;
    color: #e2e9c9;
    touch-action: none;
    user-select: none;
  }
  .touch-pad button[data-dir="up"] {
    grid-column: 2;
  }
  .touch-pad button[data-dir="left"] {
    grid-column: 1;
    grid-row: 2;
  }
  .touch-pad button[data-dir="down"] {
    grid-column: 2;
    grid-row: 2;
  }
  .touch-pad button[data-dir="right"] {
    grid-column: 3;
    grid-row: 2;
  }
  .playing .touch-interact {
    display: block;
    position: absolute;
    right: 16px;
    bottom: 84px;
    min-width: 44px;
    height: 44px;
    background: #25372be8;
    border: 1px solid #8d9668;
    touch-action: none;
  }
  .ability-bar {
    left: auto;
    right: 14px;
    transform: none;
    gap: 4px;
  }
  .ability-bar button {
    min-width: 44px;
    height: 54px;
    padding: 4px;
  }
  .ability-bar button > span {
    font-size: 23px;
  }
  .ability-bar kbd {
    display: none;
  }
  .interact-hint {
    bottom: 138px;
  }
}
@media (max-width: 600px) {
  .topbar {
    height: 77px;
    padding: 0 16px;
  }
  .brand {
    font-size: 12px;
    gap: 8px;
    letter-spacing: 0.5px;
  }
  .brand img {
    width: 36px;
    height: 36px;
  }
  .brand small {
    font-size: 6px;
    letter-spacing: 1.3px;
  }
  .topbar nav {
    gap: 4px;
  }
  .iconbtn {
    width: 38px;
    height: 44px;
  }
  .topbar #fullscreenBtn {
    display: none;
  }
  main {
    padding: 12px 12px;
  }
  .scene-heading {
    height: 30px;
    margin: 0 2px 8px;
    font-size: 8px;
    letter-spacing: 1px;
  }
  .scene-heading > span:last-child {
    font-size: 6px;
    letter-spacing: 0.5px;
  }
  .game-frame {
    aspect-ratio: 3/4;
  }
  #game {
    object-fit: cover;
  }
  .title-screen {
    background-position: 57% center;
  }
  .title-shade {
    background:
      linear-gradient(90deg, #10231bed, #10231b50 85%),
      linear-gradient(0deg, #101c17bf, transparent);
  }
  .title-copy {
    width: 84%;
    left: 8%;
    top: 12%;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 2px;
  }
  h1 {
    font-size: 18vw;
    margin-top: 23px;
  }
  .title-rule {
    font-size: 7px;
  }
  .title-copy p {
    font-size: 13px;
    margin: 25px 0;
  }
  .title-copy .primary,
  .title-copy .secondary {
    max-width: 250px;
  }
  .title-caption {
    font-size: 6px;
    margin-top: 16px;
  }
  .title-bottom {
    font-size: 6px;
    left: 8%;
    bottom: 16px;
  }
  .title-bottom span:last-child {
    display: none;
  }
  .journal {
    padding: 18px;
    grid-template-columns: 1fr;
  }
  .quest-list {
    grid-row: auto;
    grid-column: 1;
    margin-top: 4px;
  }
  .journal-title {
    font-size: 8px;
  }
  .journal h2 {
    font-size: 28px;
  }
  .journal .outline-btn,
  .journal .text-btn {
    grid-column: 1;
  }
  .journal-intro {
    margin-bottom: 20px;
  }
  .under-game {
    font-size: 6px;
    letter-spacing: 0.5px;
    margin: 12px 2px;
  }
  .hud {
    top: 12px;
    left: 12px;
    right: 12px;
  }
  .hero-vitals {
    width: 156px;
    padding: 8px;
  }
  .vitals-top {
    font-size: 7px;
  }
  .vitals-top b {
    font-size: 6px;
  }
  .gold {
    min-width: 74px;
    padding: 5px 7px;
    font-size: 13px;
  }
  .gold small {
    font-size: 5px;
    letter-spacing: 1px;
  }
  .hud-right {
    gap: 5px;
  }
  .hud-btn {
    width: 36px;
    height: 44px;
  }
  .toast {
    font-size: 10px;
    top: 96px;
    width: 85%;
  }
  .modal {
    padding: 12px;
  }
  .modal-card {
    padding: 19px;
  }
  .modal h2 {
    font-size: 28px;
  }
  .modal p {
    font-size: 12px;
  }
  .guide-grid {
    font-size: 10px;
    gap: 10px;
  }
  .guide-grid kbd {
    font-size: 8px;
  }
  .modal-actions {
    margin-top: 17px;
  }
  .modal-actions button {
    font-size: 11px;
  }
  .result-grid {
    gap: 5px;
  }
  .result-grid strong {
    font-size: 21px;
  }
  .boss-hud {
    top: 76px;
    left: 22%;
    width: 56%;
    font-size: 7px;
  }
  .shop-row {
    gap: 8px;
  }
  .shop-row button {
    min-width: 77px;
    font-size: 10px;
  }
  footer {
    flex-direction: column;
    font-size: 7px;
    gap: 16px;
    padding: 22px 3px;
  }
  footer div {
    gap: 18px;
    justify-content: space-between;
  }
  footer button,
  footer a {
    min-height: 30px;
    display: flex;
    align-items: center;
  }
  .footer-sep {
    margin: 0 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* Resolution-independent UI icons; no platform-specific glyph dependencies. */
svg {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}
.iconbtn svg {
  width: 21px;
  height: 21px;
}
.tiny-diamond svg {
  width: 13px;
  height: 13px;
}
.ability-bar button > span svg {
  width: 27px;
  height: 27px;
}
.gold > span svg {
  width: 19px;
  height: 19px;
}
.kit > span svg {
  width: 29px;
  height: 29px;
}
@media (max-width: 700px) {
  .ability-bar button > span svg {
    width: 24px;
    height: 24px;
  }
}

.modal-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal-card > .eyebrow,
.modal-card > h2,
.modal-actions {
  flex-shrink: 0;
}
#modalBody {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}
.game-frame.boss-active .toast {
  top: 143px;
}
@media (max-width: 600px) {
  .game-frame.boss-active .toast {
    top: 116px;
  }
  .title-copy {
    top: 10%;
  }
  .title-caption,
  .title-bottom {
    display: none;
  }
}

.kingdom-home{font-size:11px;display:flex;align-items:center;padding:0 10px;color:#bcd1b0}.iconbtn.cloud-save{width:auto;font:11px/1.3 sans-serif;padding:0 12px;min-height:44px}.topbar .edition{display:none}@media(max-width:600px){.topbar{flex-wrap:wrap;height:auto;padding:12px 16px;gap:12px}.topbar nav{width:100%;justify-content:space-between}.kingdom-home{padding-left:0}.iconbtn.cloud-save{margin-right:auto}.topbar #fullscreenBtn{display:none}}

.lab-banner{padding:10px 16px;background:#392e4a;color:#fff;font:600 14px/1.5 system-ui;text-align:center}
