/* Storybook world UI. Loaded after the legacy skin; geometry remains in layout.js. */
:root {
  --ink:#e6e8d9;
  --muted:#9cafaa;
  --gold:#e6c88b;
  --line:#40382d;
  --panel:#211f1b;
}
body {
  background:#211f1b;
  color:var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  height: 100dvh;
}
header {
  height: 48px;
  min-height: 48px;
  max-width: none;
  padding: 0 20px;
  gap: 18px;
  background:#211f1b;
  border-bottom:1px solid #40382d;
}
.brand {
  font-size: 21px;
  letter-spacing: 2.1px;
  color:#efddb3;
  text-shadow: none;
}
.brand span {
  color:#bdab80;
}
.server {
  margin-left: auto;
  font-size: 10px;
  color:#aac5b8;
}
.server i {
  background:#a3cd82;
  border-radius:50%;
  box-shadow:0 0 9px #b4e19755;
  width: 6px;
  height: 6px;
}
.alpha {
  color:#5b4b36;
  font-size: 8px;
  letter-spacing: 1.5px;
}
.sound-menu {
  position: relative;
  z-index: 35;
}
.sound-menu > summary {
  list-style: none;
  cursor: pointer;
  font-size: 11px;
  color:#cbd3be;
  padding: 7px 10px;
  border:1px solid #40382d;
  border-radius:6px;
}
.sound-menu > summary::marker {
  content: "";
}
.sound-menu[open] > summary {
  background:#40382d;
  color:#f1d89e;
}
.sound-menu .audio-toolbar {
  position: absolute;
  right: 0;
  top: 37px;
  width: 330px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 14px;
  gap: 14px;
  background:#211f1b;
  border:1px solid #5b4b36;
  box-shadow:0 12px 40px #0007;
  border-radius:9px;
}
.audio-toolbar .music-bar,
.audio-toolbar .effects-bar {
  display: flex;
  flex-wrap: wrap;
  background:none;
  border:0;
  gap: 8px;
  padding: 0;
}
.audio-toolbar input {
  accent-color: #d0b276;
}
.audio-toolbar #musicTrack {
  flex-basis: 100%;
  color:#9ebcaf;
  font-size: 11px;
  order: 3;
}
.game-shell {
  border:0;
  border-radius:0;
  box-shadow:none;
  background:#211f1b;
}
.client-bar {
  height: 27px;
  min-height: 27px;
  padding: 0 16px;
  background:#2d2923;
  border-bottom:1px solid #40382d;
  font-size: 11px;
  color:#e2c993;
}
.client-bar small {
  color:#aac1a8;
}
.client-bar > span:last-child {
  color:#a8baa6;
}
.player-strip {
  min-height: 47px;
  padding: 5px 14px;
  gap: 16px;
  background:#211f1b;
  border-bottom:1px solid #40382d;
}
.player-strip .currency-card {
  gap: 8px;
}
.player-strip .currency-card img {
  width: 29px;
  height: 29px;
  border:1px solid #d4b66e;
  border-radius:50%;
}
#currencyBalance {
  font-size: 18px;
  color:#f5d394;
  font-weight: 600;
}
.player-strip > .task {
  gap: 12px;
}
#healthStatus {
  color: #c0d9b7;
  font-size: 11px;
}
#combatStatus {
  color:#8fae9a;
  font-size: 10px;
}
.player-strip button {
  padding: 6px 9px;
  font-size: 10px;
}
.player-strip .game-icon {
  width: 17px;
  height: 17px;
}
.player-strip #fleeFight {
  margin: 0;
  min-height: 30px;
}
.quick-tools {
  gap: 6px;
}
button {
  border:1px solid #5b4b36;
  background:linear-gradient(#40382d, #2d2923);
  color:#e6ddbd;
  box-shadow:0 1px 2px #0002;
  border-radius:5px;
  font-family: inherit;
  transition:
    background 0.12s,
    border-color 0.12s;
}
button:hover {
  background:#5b4b36;
  color:#fff0c9;
  border-color:#9d9b6b;
}
button:active {
  border-style:solid;
  background:#2d2923;
}
button[aria-pressed="true"] {
  background:#40382d;
  color:#f5dfa9;
  border-color:#b7a06c;
}
button:focus-visible,
summary:focus-visible {
  outline: 2px solid #f7d68b;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.36;
}
.play-layout {
  grid-template-columns: minmax(0, 1fr) 326px;
  grid-template-rows: minmax(0, 1fr) 104px;
  gap: 0;
}
.world-panel {
  grid-column: 1;
  grid-row: 1;
  border:0;
}
.canvas-wrap {
  background:#89ae80;
}
#world {
  touch-action: none;
}
.world-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
#hoverAction {
  top: 13px;
  left: 14px;
  max-width: calc(100% - 182px);
  padding: 7px 10px;
  border-radius:5px;
  background:#2d2923c9;
  color:#e9ead2;
  border:1px solid #b9c99735;
  font:
    11px "Segoe UI",
    sans-serif;
  text-shadow: none;
}
.camera-controls {
  top: 12px;
  right: 12px;
  gap: 5px;
}
.camera-controls button {
  width: 29px;
  height: 29px;
  background:#2d2923dc;
  border-color:#b5c39765;
  border-radius:5px;
  color:#e9ddae;
}
.map-footer {
  height: 21px;
  min-height: 21px;
  padding: 3px 12px;
  background:#2d2923;
  border:0;
  color:#a0b49e;
  font-size: 9px;
}
#toast {
  bottom: 16px;
  padding: 10px 16px;
  border-color:#ac986360;
  background:#2d2923ea;
  color:#f5e5bf;
  border-radius:7px;
  box-shadow:0 4px 20px #211f1b33;
}
aside {
  grid-column: 2;
  grid-row: 1/3;
  border:0;
  border-left:1px solid #5b4b36;
  background:#211f1b;
}
aside section {
  border-bottom:1px solid #40382d;
}
aside > .map-card {
  padding: 9px 11px 7px;
  background:#2d2923;
}
.map-card .section-heading {
  height: 22px;
  font-size: 11px;
  color:#e5d2a1;
  letter-spacing: 0.2px;
}
.map-card .section-heading .game-icon {
  width: 20px;
  height: 20px;
}
#minimap {
  height: 94px;
  border:1px solid #5b4b36;
  border-radius:5px;
  background:#5b4b36;
  image-rendering: auto;
}
#liveRanking {
  margin-top: 7px;
  padding: 6px 8px;
  border:1px solid #40382d;
  border-radius:5px;
  background:#2d2923;
}
.live-rank-heading {
  color:#a8c491;
  font-size: 9px;
  letter-spacing: 1px;
}
#liveRankPlace {
  color:#ead197;
  font-size: 13px;
  letter-spacing: 0;
}
#liveRankTitle {
  color:#d4dac3;
  font-size: 10px;
}
#liveRankTotal {
  color:#92b095;
  font-size: 8px;
}
#adventure {
  padding: 7px 10px;
  border:0;
}
#adventureTabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  flex-wrap: nowrap;
  gap: 3px;
  padding: 0 0 8px;
  margin: 0;
  border-bottom:1px solid #40382d;
}
#adventureTabs button {
  border:1px solid transparent;
  min-height: 47px;
  padding: 5px 0 3px;
  background:#2d2923;
  border-radius:5px;
  font-size: 8px;
  color:#a9bba3;
}
#adventureTabs button[aria-pressed="true"] {
  border-color:#ac9664;
  background:#40382d;
  color:#f4dfa8;
}
#adventureTabs .game-icon {
  width: 22px;
  height: 22px;
  filter: none;
  margin-bottom: 3px;
}
#adventureBody {
  padding: 9px 0 5px;
}
#adventureBody .skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin: 0 0 7px;
}
.stats-pair,
#adventureBody .skills-grid > .stats-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 6px;
  padding: 0;
  margin: 0;
  border:0;
  background:none;
}
#adventureBody .stat-cell {
  display: block;
  min-height: 48px;
  padding: 6px 7px;
  margin: 0;
  border:1px solid #40382d;
  border-radius:5px;
  background:#2d2923;
  font-size: 10px;
  color:#e0dfbf;
  line-height: 1.2;
  text-align: left;
}
#adventureBody .stat-cell:hover {
  background:#40382d;
  border-color:#b0a06a;
}
#adventureBody .stat-cell[aria-pressed="true"] {
  background:#40382d;
  border-color:#5b4b36;
}
#adventureBody .stat-cell .game-icon {
  width: 17px;
  height: 17px;
  margin-right: 5px;
}
.skill-xp-meter {
  margin-top: 4px;
}
.skill-xp-meter progress {
  display: block;
  width: 100%;
  height: 3px;
  padding: 0;
  border:0;
  border-radius:2px;
  overflow: hidden;
  appearance: none;
  background:#211f1b;
}
.skill-xp-meter progress::-webkit-progress-bar {
  background: #182c22;
}
.skill-xp-meter progress::-webkit-progress-value {
  background: linear-gradient(90deg, #77975a, #d2bf7e);
}
.skill-xp-meter progress::-moz-progress-bar {
  background: #a9b471;
}
.skill-xp-meter span {
  font-size: 8px;
  color:#94ad8c;
  margin-top: 3px;
}
#adventureBody .stat-cell.skill-xp-gain {
  border-color:#d6f09a;
  background:#40382d;
  box-shadow:inset 0 0 12px #c4ec8330, 0 0 5px #b8e57a80;
  animation: skill-xp-pulse 800ms ease-out 2;
}
.skill-xp-gain .skill-xp-meter span {
  color:#e6ffc0;
  font-weight: 700;
}
.skill-xp-gain .skill-xp-meter progress::-webkit-progress-value {
  background: #d6f09a;
}
.skill-xp-gain .skill-xp-meter progress::-moz-progress-bar {
  background: #d6f09a;
}
@keyframes skill-xp-pulse {
  50% { box-shadow:inset 0 0 16px #c4ec8350, 0 0 7px #d6f09a; }
}
@media (prefers-reduced-motion: reduce) {
  #adventureBody .stat-cell.skill-xp-gain { animation: none; }
}
#adventureBody .work-rewards {
  font-size: 9px;
  line-height: 1.6;
  padding: 6px 8px;
  background:#2d2923;
  color:#a5b993;
  border:1px solid #40382d;
  margin: 9px 0 6px;
}
#adventureBody p {
  color:#b8c8ad;
}
.page-controls {
  height: 28px;
  border-top:1px solid #40382d;
  padding-top: 5px;
}
.page-controls button {
  border:0;
  background:none;
  color:#b8c39b;
  font-size: 10px;
  box-shadow:none;
}
.page-controls span {
  font-size: 10px;
  color:#5b4b36;
}
.pack-slot,
.equipment-slot,
.item-row,
.unlock-row {
  background:#2d2923;
  border-color:#40382d;
  border-radius:5px;
}
.chat-panel {
  grid-column: 1;
  grid-row: 2;
  border:0;
  background:#211f1b;
}
.chat-heading {
  height: 26px;
  min-height: 26px;
  background:#2d2923;
  border-top:1px solid #40382d;
  border-bottom:1px solid #40382d;
  padding: 2px 10px;
}
.chat-heading button {
  border:0;
  box-shadow:none;
  background:none;
  color:#95ae93;
  font-size: 10px;
  padding: 4px 10px;
}
.chat-heading button[aria-pressed="true"] {
  background:#40382d;
  color:#e4d2a1;
  border-radius:4px;
}
.chat-heading > span {
  color:#5b4b36;
  font-size: 9px;
}
#messages {
  padding: 4px 13px;
  color:#bdcdb1;
  font-size: 10px;
}
#chatForm {
  height: 29px;
  min-height: 29px;
  border-top:1px solid #40382d;
  background:#211f1b;
  padding: 2px 10px;
}
#chatForm input {
  background:transparent;
  border:0;
  font-family: inherit;
  color:#e8e3c6;
  font-size: 11px;
}
#chatForm label {
  color:#5b4b36;
}
#chatForm button {
  border:0;
  background:#40382d;
  padding: 3px 13px;
  font-size: 10px;
}
dialog {
  background:linear-gradient(145deg, #2d2923, #211f1b);
  border:1px solid #a49165;
  border-radius:12px;
  box-shadow:0 25px 100px #0008;
  color:#dddcc0;
}
dialog::backdrop {
  background:#211f1b69;
  backdrop-filter: blur(3px);
}
#questDetails {
  width: min(480px, calc(100vw - 24px));
  height: min(570px, calc(100dvh - 24px));
  max-height: calc(100dvh - 24px);
  box-sizing: border-box;
  padding: 18px;
  overflow: hidden;
}
#questDetails[open] { display:flex; flex-direction:column; gap:12px; }
.quest-popup-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.quest-popup-heading h2 { margin:5px 0 0; font-size:23px; }
.quest-popup-heading small { color:#b5c89e; font-size:11px; }
.quest-popup-heading button { flex-shrink:0; min-width:36px; min-height:36px; }
.quest-picker { display:flex; align-items:center; gap:10px; font-size:12px; }
.quest-picker select { flex:1; min-width:0; max-width:100%; font-size:12px; }
.quest-picker[hidden] { display:none; }
#questDetailsBody { flex:1; min-height:0; overflow:hidden; }
#questDetailsBody section { padding:0 0 10px; margin:0; }
#questDetailsBody h3 { margin:0 0 5px; color:#e6c989; font-size:12px; }
#questDetailsBody p { margin:0; font-size:13px; line-height:1.5; }
#questDetails .page-controls { flex-shrink:0; order:3; }
#questDetails .quest-next-action { order:4; min-height:40px; flex-shrink:0; }
dialog h1,
dialog h2 {
  color:#f0d7a4;
  font-family: Georgia, serif;
}
dialog input,
dialog select {
  border:1px solid #5b4b36;
  border-radius:5px;
  background:#211f1b;
  color:#e0ddc0;
  padding: 8px;
}
#tutorialGuide {
  left: 14px;
  bottom: 55px;
  max-width: 260px;
  padding: 11px 13px;
  border:1px solid #c2a46b99;
  border-radius:8px;
  background:#2d2923eb;
  box-shadow:0 5px 24px #2d292333;
}
#tutorialGuide strong {
  color:#f1d28b;
  font-size: 11px;
}
#tutorialGuide p {
  color:#bbcfa8;
  line-height: 1.5;
  font-size: 10px;
}
#tutorialGuide button {
  background:#40382d;
}
.level-popup,
.attention-popup {
  border-radius:10px;
  background:#2d2923f5;
  border-color:#d5b875;
}
.mobile-character-toggle {
  display: none;
}
@media (min-width: 1600px) {
  .play-layout {
    grid-template-columns: minmax(0, 1fr) 356px;
  }
  #adventureBody .stat-cell {
    font-size: 12px;
    min-height: 56px;
    padding: 8px;
  }
  #adventureTabs button {
    font-size: 9px;
  }
  #minimap {
    height: 118px;
  }
}
@media (max-height: 760px) and (min-width: 701px) {
  header {
    height: 40px;
    min-height: 40px;
  }
  .player-strip {
    min-height: 40px;
    padding: 4px 12px;
  }
  #minimap {
    height: 77px;
  }
  aside > .map-card {
    padding: 6px 10px;
  }
  #liveRanking {
    padding: 4px 7px;
  }
  #adventureBody .stat-cell {
    min-height: 43px;
    padding: 4px 6px;
  }
  #adventureBody .skills-grid,
  .stats-pair {
    gap: 4px;
  }
  .play-layout {
    grid-template-rows: minmax(0, 1fr) 88px;
  }
}
@media (max-width: 1050px) and (min-width: 701px) {
  .play-layout {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .quick-tools {
    gap: 3px;
  }
  .player-strip {
    gap: 8px;
  }
  #combatStatus {
    display: none;
  }
  #adventure {
    padding: 6px;
  }
}
@media (max-width: 700px) {
  header {
    height: 40px;
    min-height: 40px;
    padding: 0 10px;
    gap: 7px;
  }
  .brand {
    font-size: 15px;
    letter-spacing: 1px;
  }
  .brand span {
    font-size: 11px;
  }
  .server {
    margin-left: auto;
  }
  .server #connection,
  .alpha {
    display: none;
  }
  .sound-menu > summary {
    font-size: 10px;
    padding: 5px 8px;
  }
  .sound-menu .audio-toolbar {
    width: min(310px, calc(100vw - 20px));
    right: 0;
  }
  .client-bar {
    min-height: 24px;
    height: 24px;
    padding: 0 9px;
    font-size: 10px;
  }
  .client-bar > span:last-child {
    font-size: 8px;
  }
  .client-bar small {
    display: none;
  }
  .player-strip {
    min-height: 43px;
    padding: 4px 7px;
    gap: 8px;
    flex-wrap: nowrap;
  }
  .player-strip .currency-card img {
    width: 24px;
    height: 24px;
  }
  #currencyBalance {
    font-size: 15px;
  }
  .player-strip > .task {
    gap: 6px;
    min-width: 0;
  }
  #healthStatus {
    font-size: 9px;
    max-width: 88px;
  }
  #combatStatus {
    display: none;
  }
  .player-strip button {
    min-height: 32px;
    padding: 5px 7px;
    font-size: 9px;
  }
  .player-strip {
    flex-wrap: wrap;
    gap: 4px 8px;
  }
  .quick-tools {
    display: flex;
    order: 5;
    width: 100%;
    gap: 5px;
  }
  .quick-tools button {
    flex: 1;
    min-height: 27px;
  }
  .mobile-character-toggle {
    display: block;
    margin-left: auto;
  }
  .play-layout {
    position: relative;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 80px;
  }
  .world-panel {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
  }
  .map-footer {
    display: none;
  }
  .chat-panel {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
  }
  .chat-heading {
    height: 25px;
    min-height: 25px;
  }
  .chat-heading button {
    min-height: 22px;
  }
  #chatForm {
    height: 30px;
    min-height: 30px;
  }
  #chatForm input,
  #chatForm button {
    min-height: 25px;
  }
  aside {
    display: none;
    position: absolute;
    z-index: 20;
    right: 7px;
    top: 7px;
    bottom: 87px;
    width: min(326px, calc(100vw - 14px));
    border:1px solid #5b4b36;
    border-radius:10px;
    box-shadow:0 12px 40px #0006;
  }
  .mobile-panel-open aside {
    display: flex;
  }
  aside > .map-card {
    padding: 5px 9px;
  }
  #minimap {
    height: 62px;
  }
  #liveRanking {
    min-height: 0;
    padding: 4px 7px;
    margin-top: 5px;
  }
  #adventure {
    padding: 6px 8px;
  }
  #adventureTabs button {
    min-height: 44px;
    font-size: 8px;
  }
  #adventureBody .stat-cell {
    min-height: 44px;
    padding: 5px;
  }
  .stats-pair {
    gap: 4px;
  }
  #hoverAction {
    max-width: calc(100% - 155px);
    top: 9px;
    left: 8px;
    padding: 6px;
    font-size: 9px;
  }
  .camera-controls {
    top: 8px;
    right: 7px;
    gap: 3px;
  }
  .camera-controls button {
    min-width: 29px;
    min-height: 32px;
  }
  #tutorialGuide {
    max-width: 225px;
    left: 9px;
    bottom: 50px;
  }
  #toast {
    bottom: 10px;
    font-size: 11px;
    padding: 8px 10px;
  }
  .attention-popup {
    bottom: 12px;
    right: 9px;
  }
}
@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }
}

/* First adventure: one readable objective and one action, across input sizes. */
#tutorialGuide {max-width:310px;width:calc(100% - 28px);padding:12px 15px;bottom:48px;border-left:3px solid #edc768;pointer-events:auto;}
#tutorialGuide strong {display:block;font-size:15px;line-height:1.3;margin-top:5px;}
#tutorialGuide p {font-size:12px;line-height:1.45;margin:7px 0;color:#e0e7d3;}
#journeyChapter {display:block;font-size:10px;text-transform:uppercase;letter-spacing:.7px;color:#d6ba78;}
#journeyProgress {display:block;color:#bacbb6;font-size:11px;margin-bottom:8px;}
#tutorialFocus {min-height:36px;width:100%;font-size:12px;}
#journeyMeter {display:block;width:100%;height:4px;margin-top:10px;accent-color:#e9c467;border:0;}
#firstAdventure,#starterForge,#adventureComplete {width:min(540px,calc(100vw - 28px));box-sizing:border-box;padding:25px;max-height:calc(100dvh - 24px);background:#2d2923;color:#e7ecdd;border:1px solid #b89c64;border-radius:12px;box-shadow:0 22px 80px #211f1baa;}
#firstAdventure h2,#starterForge h2,#adventureComplete h2 {margin:8px 0 12px;font:25px Georgia;color:#f4daa1;}
#firstAdventure p,#starterForge p,#adventureComplete p {font-size:13px;line-height:1.55;color:#c6d5c5;}
.journey-eyebrow {font-size:10px;letter-spacing:1.5px;color:#cfb477;}
.journey-chapters {padding-left:23px;margin:22px 0;}
.journey-chapters li {padding:0 0 15px 7px;color:#e4c57f;}
.journey-chapters strong,.journey-chapters span {display:block;}
.journey-chapters strong {font-size:14px;color:#edf0d9;margin-bottom:4px;}
.journey-chapters span {font-size:12px;line-height:1.45;color:#bdd0bf;}
.journey-actions {display:flex;gap:9px;flex-wrap:wrap;margin-top:20px;}
.journey-actions button {min-height:42px;padding:8px 14px;}
#beginAdventure {background:#b99953;color:#211f1b;font-weight:bold;flex:1;}
#skipAdventure {background:transparent;font-size:11px;color:#bfceb9;}
.forge-recipe {display:flex;align-items:center;gap:12px;width:100%;text-align:left;margin:8px 0;padding:11px;min-height:60px;}
.forge-recipe .game-icon {width:32px;height:32px;flex-shrink:0;}
.forge-recipe strong,.forge-recipe small {display:block;}
.forge-recipe strong {font-size:13px;color:#eee1b7;}
.forge-recipe small {font-size:11px;line-height:1.4;color:#bdd0bd;margin-top:4px;}
.recommended-recipe {border:1px solid #f0ca6a;box-shadow:inset 3px 0 #e8be5d;background:#40382d;}
.journey-journal {padding:10px;border:1px solid #9a8559;background:#2d2923;border-radius:7px;}
.journey-journal h3 {color:#ebcd8b;margin:0;font-size:14px;}
.journey-journal p,.readiness-list {line-height:1.5;}
.journey-journal button {margin:3px;}
#mobileJourney {display:none;}
.inventory-heading {display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;padding:6px 2px;color:#ead8a8;}
.inventory-heading strong {font:17px Georgia;}
.inventory-heading span {font-size:11px;color:#bcccba;}
.inventory-heading progress {flex-basis:100%;width:100%;height:5px;accent-color:#cbb577;}
.inventory-hint {font-size:11px;line-height:1.45;color:#b6c7b2;margin:5px 0 10px;}
.inventory-row {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:0 0 7px;}
#equipmentGuide {width:min(490px,calc(100vw - 24px));height:min(650px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);box-sizing:border-box;padding:18px;overflow:hidden;}
#bountyBoard {width:min(490px,calc(100vw - 24px));height:min(650px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);box-sizing:border-box;padding:18px;overflow:hidden;}
#bountyBoard[open] {display:flex;flex-direction:column;gap:10px;}
#sideQuestDetails {width:min(510px,calc(100vw - 24px));height:min(680px,calc(100dvh - 24px));max-height:calc(100dvh - 24px);box-sizing:border-box;padding:16px;overflow:hidden;}
#sideQuestDetails[open] {display:flex;flex-direction:column;gap:10px;}
.side-quest-body {flex:1;min-height:0;overflow:hidden;}
.side-quest-body section {margin:0 0 12px;padding:0;}
.side-quest-body h3 {font-size:13px;margin:0 0 6px;color:#efd39a;}
.side-quest-body p {font-size:12px;line-height:1.5;margin:5px 0;}
#sideQuestDetails .page-controls,.side-quest-action {flex-shrink:0;}
#sideQuestDetails .quest-picker {margin:0;flex-shrink:0;}
#sideQuestDetails .quest-picker[hidden] {display:none;}
#sideQuestDetails select {max-width:100%;min-width:0;}
#sideQuestTitle {display:flex;align-items:center;gap:9px;font-size:20px;}
#sideQuestTitle .game-icon {width:32px;height:32px;flex-shrink:0;}
.side-quest-action {min-height:42px;white-space:normal;}
.quest-item-card {padding:10px!important;border:1px solid #5b4b36;border-radius:8px;background:#2d2923;}
.quest-item-card strong {display:flex;align-items:center;gap:8px;color:#ead39b;font-size:13px;}
.quest-item-card .game-icon {width:36px;height:36px;flex-shrink:0;}
@media(max-height:620px){#sideQuestDetails{padding:12px;gap:7px;}#sideQuestTitle{font-size:17px;}#sideQuestDetails .quest-picker{font-size:11px;}.side-quest-action{min-height:38px;}}
#bountyBody {flex:1;min-height:0;overflow:hidden;}
#bountyBody h3 {font-size:17px;color:#efd39a;}
#bountyBody p {font-size:12px;line-height:1.45;}
#bountyBoard .page-controls {flex-shrink:0;}
#bountyBoard .bounty-action,#bountyBoard .bounty-travel button {min-height:38px;}
.bounty-travel {display:flex;gap:8px;flex-shrink:0;}
.bounty-travel button {flex:1;}
#equipmentGuide[open] {display:flex;flex-direction:column;gap:12px;}
#equipmentGuideBody {flex:1;min-height:0;overflow:hidden;}
#equipmentGuide .page-controls {flex-shrink:0;}
.equipment-guide-card {padding:12px;margin-bottom:10px;border:1px solid #5b4b36;border-radius:8px;background:#2d2923;}
.equipment-guide-card h3 {display:flex;align-items:center;gap:9px;margin:0 0 8px;color:#efd39a;font-size:15px;}
.equipment-guide-card h3 .game-icon {width:60px;height:40px;flex-shrink:0;}
.equipment-guide-card p,#equipmentGuideBody>p {font-size:12px;line-height:1.45;margin:7px 0;}
.equipment-guide-card button {width:100%;min-height:38px;font-size:12px;white-space:normal;}
.inventory-slot {position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;width:100%;min-width:0;min-height:92px;padding:10px 5px 7px;background:#2d2923;border:1px solid #5b4b36;border-radius:8px;}
.inventory-slot:hover,.inventory-slot:focus-visible {background:#40382d;border-color:#dbbf77;outline:2px solid #e3c578;outline-offset:-2px;}
.inventory-slot .game-icon {height:32px!important;width:32px!important;margin:0;filter:drop-shadow(0 2px 2px #0006);}
.inventory-item-name {font-size:11px;line-height:1.25;overflow-wrap:anywhere;color:#ede3c2;}
.inventory-quantity {position:absolute;right:5px;top:3px;background:#211f1b;color:#f6d989;border-radius:4px;padding:1px 4px;font-size:10px;font-weight:bold;}
.inventory-slot.is-equipped {border-color:#9bb678;background:#40382d;}
.inventory-slot small {font-size:9px;color:#bcd69b;}
.inventory-empty {padding:24px 12px;border:1px dashed #5b4b36;border-radius:8px;text-align:center;line-height:1.6;color:#baccb1;font-size:12px;}
.inventory-ground-item {width:100%;text-align:left;margin-bottom:5px;padding:8px;font-size:11px;min-height:40px;}
.inventory-ground-item .game-icon {height:23px;width:23px;}
.coin-reward {display:flex;flex-wrap:wrap;justify-content:center;gap:5px 12px;width:max-content;max-width:calc(100% - 28px);box-sizing:border-box;text-align:center;font-size:12px;}
.coin-reward .xp-reward {color:#c5ddff;}
.action-menu[role="menu"] {min-width:220px;max-width:calc(100vw - 16px);padding:7px;background:#2d2923;border:1px solid #ad945f;border-radius:9px;box-shadow:0 8px 32px #151412bf;}
.inventory-menu-title {display:grid;grid-template-columns:30px 1fr;gap:3px 9px;padding:7px 5px 10px;border-bottom:1px solid #5b4b36;margin-bottom:4px;}
.inventory-menu-title .game-icon {grid-row:span 2;width:29px;height:29px;}
.inventory-menu-title strong {font-size:13px;color:#f2dc9e;}
.inventory-menu-title small {font-size:11px;color:#b7cbb0;}
.action-menu[role="menu"] button {min-height:36px;border-radius:4px;font-size:12px;color:#ebdfba;}
.action-menu[role="menu"] button:disabled {opacity:.45;}
.action-menu[role="menu"] button:focus-visible {outline:2px solid #e3c578;background:#40382d;}
.action-menu[role="menu"] .drop-action {color:#e7b19b;}
@media(max-width:700px){.action-menu[role="menu"] button{min-height:42px;}.inventory-slot{min-height:90px;padding-inline:3px;}.inventory-item-name{font-size:10px;}}
@media(max-width:700px){
  .mobile-panel-open #mobileJourney:not([hidden]) {display:block;flex-shrink:0;margin:6px;padding:9px;min-height:40px;border:1px solid #ddbf73;background:#5b4b36;font-size:12px;text-align:left;}
  #tutorialGuide {left:8px;bottom:42px;max-width:285px;padding:9px 11px;}
  #tutorialGuide strong {font-size:13px;}
  #tutorialGuide p {font-size:11px;margin:5px 0;line-height:1.35;}
  #tutorialFocus {min-height:38px;}
  #firstAdventure,#starterForge {padding:17px;}
  .forge-recipe {padding:8px;min-height:54px;margin:6px 0;}
  .mobile-panel-open #tutorialGuide {display:none;}
}
@media(max-height:620px){
  #firstAdventure,#starterForge {padding:14px;}
  .journey-chapters {margin:10px 0;}
  .journey-chapters li {padding-bottom:8px;}
  .forge-recipe {padding:6px;min-height:44px;margin:4px 0;}
  #tutorialGuide p {display:none;}
}

/* Quest journal: RSC status colours, original parchment presentation. */
#questDetails{width:min(690px,94vw);height:min(650px,90dvh);max-height:90dvh;padding:22px 26px 20px 34px;color:#352719;border:5px solid #503424;border-radius:9px;background:linear-gradient(90deg,#987144 0,#d0b37e 12px,#ecdbad 26px,#f5e8c4 52%,#e4ce9c 100%);box-shadow:0 18px 65px #000a,inset 0 0 0 2px #b28b55;}
#questDetails::backdrop{background:#151412ad;backdrop-filter:blur(2px)}
#questDetails .quest-popup-heading{border-bottom:1px solid #a6844c;padding-bottom:12px;}
#questDetails .quest-popup-heading small{font:700 10px/1.4 system-ui;letter-spacing:1.5px;color:#735435;}
#questDetails h2{font:700 27px/1.15 Georgia,serif;color:#392515;text-shadow:none;}
#journalSummary{font:12px/1.6 system-ui;color:#715a3c;margin-top:4px;}
#questDetails button,#questDetails select{background:#eee0b8;color:#49331d;border:1px solid #a17b48;text-shadow:none;border-radius:4px;}
#questDetails button:hover{background:#ffefc6;border-color:#674722;}
#questDetails button:focus-visible,#questDetails select:focus-visible{outline:3px solid #275e74;outline-offset:2px;}
.journal-tabs{display:flex;gap:5px;flex-wrap:wrap;flex-shrink:0;}
#questDetails .journal-tabs button{flex:1;min-height:35px;padding:6px;font-size:12px;white-space:nowrap;}
#questDetails .journal-tabs .selected{background:#57402c;color:#fff0c7;border-color:#57402c;}
#questDetails .quest-picker{font-size:13px;color:#684928;}
#questDetails select{min-height:36px;padding:5px;font-size:13px;}
.journal-meta{display:flex;justify-content:space-between;gap:12px;font:12px/1.4 system-ui;flex-shrink:0;}
#journalStatus{font-weight:800;white-space:nowrap;}
#journalStatus[data-state=complete]{color:#5b4b36;}#journalStatus[data-state=active],#journalStatus[data-state=ready]{color:#866000;}#journalStatus[data-state=available]{color:#943c2e;}
#questDetailsLocation{color:#735536;text-align:right;}
#questDetailsBody section{padding:12px 0;border-bottom:1px solid #b391553d;}
#questDetailsBody h3{font:700 17px/1.3 Georgia,serif;color:#614322;margin-bottom:6px;}
#questDetailsBody p{font:14px/1.6 system-ui;color:#392d20;}
#questDetails .quest-next-action{background:#40382d;color:#fff2cd;border:1px solid #2d2923;font-weight:700;min-height:43px;}
#questDetails .quest-next-action:disabled{background:#b4ac90;color:#514934;}
#questDetails .page-controls{color:#614322;}
@media(max-width:520px){#questDetails{padding:14px 13px 14px 20px;width:96vw;height:92dvh;max-height:92dvh;gap:8px;}#questDetails h2{font-size:21px;}.journal-meta{font-size:11px;}#questDetails .journal-tabs button{font-size:11px;min-height:38px;}#questDetailsBody p{font-size:13px;line-height:1.5;}}

/* Requested journal status: every unfinished quest red, completed green. */
#questDetails #journalStatus[data-state=available],
#questDetails #journalStatus[data-state=active],
#questDetails #journalStatus[data-state=ready],
#questDetails[data-quest-complete="false"] #questDetailsTitle{color:#943c2e;}
#questDetails #journalStatus[data-state=complete],
#questDetails[data-quest-complete="true"] #questDetailsTitle{color:#5b4b36;}

.hollow-workshop{width:min(430px,94vw);max-height:90dvh;overflow:auto}.hollow-workshop button{display:block;width:100%;min-height:38px;margin:5px 0}
