/* UI 8: parchment workspace, iron navigation, and a single responsive shell.
   Load after styles-fantasy.css. Scope layout changes to the versioned shell. */
:root {
  --ui-paper: #f7f3e9;
  --ui-paper-soft: #efeadd;
  --ui-paper-raised: #fffdf7;
  --ui-ink: #292c26;
  --ui-muted: #737268;
  --ui-line: #ddd6c6;
  --ui-forest: #203b32;
  --ui-forest-hover: #2d5144;
  --ui-night: #172922;
  --ui-brass: #c7a873;
  --ui-rust: #8c4036;
}

body.theme-western-fantasy {
  --wf-parchment: var(--ui-paper);
  --wf-parchment-soft: var(--ui-paper-raised);
  --wf-ink: var(--ui-ink);
  --wf-ink-muted: var(--ui-muted);
  --hs-color-text: var(--ui-ink);
  --hs-color-text-muted: var(--ui-muted);
  --hs-color-surface: var(--ui-paper);
  --hs-color-surface-soft: var(--ui-paper-soft);
  --hs-color-primary: var(--ui-forest);
  --hs-color-primary-strong: #173b2e;
  --hs-color-primary-soft: #e2ebe0;
  --hs-color-border: var(--ui-line);
  --hs-color-border-strong: #b7ad99;
  background: #e8e4d9;
  font-size: 14px;
  line-height: 1.6;
}

body.theme-western-fantasy::before { background: none; }
.theme-western-fantasy .app-shell { padding: 0; }

.theme-western-fantasy .game[data-ui-version="8"] {
  width: 100%;
  max-width: 1920px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 0 28px 28px 0;
  border: 0;
  border-radius: 0;
  background: var(--ui-paper-soft);
  box-shadow: none;
  overflow: visible;
  color: var(--ui-ink);
}

.theme-western-fantasy .game[data-ui-version="8"]::before,
.theme-western-fantasy .game[data-ui-version="8"]::after { content: none; }

.theme-western-fantasy .game-shell-v2[data-ui-version="8"] {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  grid-template-rows: auto auto auto 1fr;
  gap: 20px 28px;
  align-content: start;
}

.theme-western-fantasy [data-ui-version="8"] :is(button, input, select, textarea) {
  min-height: 44px;
  border-color: #bdb6a5;
  border-radius: 7px;
  box-shadow: none;
  font-weight: 500;
  text-shadow: none;
  transition: background-color 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.theme-western-fantasy [data-ui-version="8"] button {
  background: var(--ui-paper-raised);
  color: var(--ui-ink);
  touch-action: manipulation;
}

.theme-western-fantasy [data-ui-version="8"] button:hover:not(:disabled) {
  transform: none;
  border-color: #7e9685;
  background: #edf2e9;
  box-shadow: none;
}

.theme-western-fantasy [data-ui-version="8"] :is(input, select, textarea) {
  background: var(--ui-paper-raised);
  color: var(--ui-ink);
  padding: 10px 12px;
}

.theme-western-fantasy [data-ui-version="8"] :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 3px solid #b77b31;
  outline-offset: 3px;
}

.theme-western-fantasy [data-ui-version="8"] button:disabled {
  opacity: 1;
  filter: none;
  background: #e7e5dc;
  border-color: #c9c5b9;
  color: #74756d;
  cursor: not-allowed;
  box-shadow: none;
}

.theme-western-fantasy [data-ui-version="8"] button:disabled :is(strong, span, small, b, em) {
  color: inherit;
  text-shadow: none;
}

.theme-western-fantasy [data-ui-version="8"] :is(h1, h2, h3) {
  font-family: var(--wf-font-display);
  font-weight: 700;
  letter-spacing: .025em;
  text-shadow: none;
}

.theme-western-fantasy [data-ui-version="8"] :is(.panel, .hs-panel, .hs-card) {
  border: 1px solid var(--ui-line);
  border-radius: 12px;
  background: var(--ui-paper);
  box-shadow: 0 3px 12px #342b1510;
}

.theme-western-fantasy [data-ui-version="8"] :is(.panel-header, .hs-panel__header, .hs-card__header, .module-shell-header, .consumable-title, .equipment-title, .shop-title, .forge-panel-head) {
  min-height: 64px;
  gap: 12px;
  padding: 18px 22px;
  background: var(--ui-paper);
  border-color: var(--ui-line);
  border-radius: 11px 11px 0 0;
  box-shadow: none;
}

.theme-western-fantasy [data-ui-version="8"] :is(.panel-header h2, .panel-header h3, .module-shell-header h2, .hs-panel__title strong, .hs-card__title strong, .consumable-title strong, .equipment-title strong, .shop-title strong, .forge-panel-head strong) {
  color: var(--ui-ink);
  font-size: 22px;
  text-shadow: none;
  line-height: 1.35;
}

.theme-western-fantasy [data-ui-version="8"] :is(.module-shell-header p, .module-shell-header span, .consumable-title span, .equipment-title span, .shop-title span, .forge-panel-head span) { color: var(--ui-muted); }

.theme-western-fantasy [data-ui-version="8"] :is(.panel-body, .hs-panel__body) {
  padding: 22px;
  background: var(--ui-paper);
  color: var(--ui-ink);
}

.theme-western-fantasy [data-ui-version="8"] :is(.main-content, .side-content) { background: transparent; }
.theme-western-fantasy [data-ui-version="8"] :is(.small-note, .panel-body p) { line-height: 1.7; }

.theme-western-fantasy [data-ui-version="8"] :is(.badge, .hs-badge) {
  padding: 3px 8px;
  border: 1px solid #d8d0bd;
  border-radius: 5px;
  background: #efeadd;
  color: #6c6047;
  box-shadow: none;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.55;
}

/* The header carries currency and utilities; vitals belong to the player strip. */
.theme-western-fantasy [data-ui-version="8"] .shell-topbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  min-height: 82px;
  margin-right: -28px;
  padding: 14px 28px 14px 24px;
  border: 0;
  border-bottom: 1px solid #607060;
  border-radius: 0;
  background: var(--ui-night);
  box-shadow: none;
}

.theme-western-fantasy [data-ui-version="8"] .brand { gap: 10px; }
.theme-western-fantasy [data-ui-version="8"] .brand h1 { color: #f6edda; font-size: 25px; line-height: 1.15; white-space: nowrap; }
.theme-western-fantasy [data-ui-version="8"] .brand p { margin: 5px 0 0; color: #aebbab; font-size: 10px; letter-spacing: .12em; }
.theme-western-fantasy [data-ui-version="8"] .seal {
  flex: 0 0 35px;
  width: 35px;
  height: 42px;
  border: 1px solid #947b4c;
  border-radius: 4px 4px 14px 14px;
  background: #29483b;
  color: #d5bc84;
  box-shadow: none;
  font-size: 21px;
  text-shadow: none;
}

.theme-western-fantasy [data-ui-version="8"] .release-badge { border: 0; background: transparent; color: #b0b8a7; padding: 0; font-size: 10px; }
.theme-western-fantasy [data-ui-version="8"] .shell-resource-bar {
  grid-column: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 28px;
}

.theme-western-fantasy [data-ui-version="8"] .shell-resource-bar > span {
  min-width: 0;
  display: grid;
  grid-template-columns: auto auto;
  gap: 1px 9px;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  padding: 0;
}

.theme-western-fantasy [data-ui-version="8"] .shell-resource-bar small { color: #b0bcaf; font-size: 11px; font-weight: 500; }
.theme-western-fantasy [data-ui-version="8"] .shell-resource-bar strong { color: #ecd3a1; font-size: 14px; font-variant-numeric: tabular-nums; }
.theme-western-fantasy [data-ui-version="8"] .shell-resource-bar em { grid-column: 1 / -1; color: #acb8a9; font-size: 10px; }
.theme-western-fantasy [data-ui-version="8"] .top-actions { display: flex; align-items: center; gap: 8px; }
.theme-western-fantasy [data-ui-version="8"] .top-actions button { min-width: 56px; border-color: #53695a; background: #263f33; color: #e5e7d8; padding: 8px 12px; font-size: 12px; }
.theme-western-fantasy [data-ui-version="8"] .top-actions button:hover:not(:disabled) { border-color: var(--ui-brass); background: #355341; }
.theme-western-fantasy [data-ui-version="8"] .shell-topbar .account-panel { grid-column: 1 / -1; }

/* Desktop module rail. All existing destinations remain reachable. */
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .desktop-module-nav {
  grid-column: 1;
  grid-row: 2 / span 3;
  display: grid;
  grid-template-columns: 1fr;
  grid-auto-rows: min-content;
  align-content: start;
  align-self: start;
  position: sticky;
  top: 20px;
  gap: 7px;
  min-height: calc(100dvh - 130px);
  padding: 4px 14px 24px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .desktop-module-nav .module-nav-button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  justify-items: stretch;
  gap: 3px 12px;
  min-height: 63px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #4b5147;
  box-shadow: none;
  text-align: left;
}

.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .desktop-module-nav .module-nav-button strong { align-self: end; color: #414c3f; font-size: 14px; font-weight: 700; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .desktop-module-nav .module-nav-button span { display: block; color: #7d8174; font-size: 11px; line-height: 1.5; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .module-nav-button::before { width: 30px; height: 30px; border-color: #acac8f; border-radius: 6px; box-shadow: none; filter: saturate(.45) sepia(.2); }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .desktop-module-nav .module-nav-button:hover:not(:disabled) { border-color: #d3d6c5; background: #e3e7da; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .desktop-module-nav .module-nav-button.is-active { border-color: #254333; background: var(--ui-forest); box-shadow: 0 4px 10px #19302417; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .desktop-module-nav .module-nav-button.is-active:hover:not(:disabled) { border-color: #6b8868; background: var(--ui-forest-hover); }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .desktop-module-nav .module-nav-button.is-active strong { color: #f4ebd5; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .desktop-module-nav .module-nav-button.is-active span { color: #b9caba; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .desktop-module-nav .module-nav-button.is-active::before { border-color: var(--ui-brass); }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .mobile-bottom-nav { display: none; }

/* One compact identity and three readable meters; nested meter divs are unboxed. */
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] :is(.shell-status-strip, .shell-goal-bar, .play-layout) { grid-column: 2; margin: 0; min-width: 0; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip {
  display: grid;
  grid-template-columns: minmax(220px, .9fr) minmax(0, 1.8fr);
  align-items: center;
  gap: 30px;
  padding: 0 2px;
  border: 0;
  background: transparent;
}

.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip div { min-height: 0; border: 0; border-radius: 0; background: none; box-shadow: none; padding: 0; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .shell-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.theme-western-fantasy [data-ui-version="8"] .shell-identity .race-portrait { flex: 0 0 47px; width: 47px; height: 58px; border: 1px solid #a2a98e; border-radius: 8px; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .shell-identity-copy { display: grid; gap: 3px; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip strong { color: var(--ui-ink); font-size: 15px; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip span { color: #69715f; font-size: 11px; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .shell-vitals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: center; gap: 22px; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .meter { display: grid; gap: 7px; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .meter-label { display: flex; justify-content: space-between; align-items: baseline; gap: 5px; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip :is(.meter-track, .meter-fill) { display: block; }
.theme-western-fantasy [data-ui-version="8"] .meter { gap: 7px; border: 0; background: transparent; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .meter-label { gap: 8px; color: #68715f; font-size: 11px; font-variant-numeric: tabular-nums; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .meter-track,
.theme-western-fantasy [data-ui-version="8"] .meter-track { height: 7px; border: 0; border-radius: 3px; background: #dcdccc; box-shadow: none; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .meter-fill,
.theme-western-fantasy [data-ui-version="8"] .meter-fill { height: 100%; border-radius: inherit; }
.theme-western-fantasy [data-ui-version="8"] .meter-fill.hp { background: #a75648; }
.theme-western-fantasy [data-ui-version="8"] .meter-fill.energy { background: #628578; }
.theme-western-fantasy [data-ui-version="8"] .meter-fill.exp { background: #b39251; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .meter-fill.hp { background: #a75648; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .meter-fill.energy { background: #628578; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .meter-fill.exp { background: #b39251; }

.theme-western-fantasy [data-ui-version="8"] .shell-goal-bar .current-goal.is-shell {
  margin: 0;
  padding: 16px 20px;
  border: 1px solid #d7c9aa;
  border-left: 3px solid #b49253;
  border-radius: 9px;
  background: #f6efdf;
  box-shadow: none;
}
.theme-western-fantasy [data-ui-version="8"] .current-goal-main strong { color: #6b5332; font-size: 16px; }
.theme-western-fantasy [data-ui-version="8"] .current-goal-main :is(span, small) { line-height: 1.6; }
.theme-western-fantasy [data-ui-version="8"] .current-goal-prep span { border-color: #daceb5; background: #fff9ec; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] :is(.primary-button, .goal-action-button, .hs-button--primary),
.theme-western-fantasy [data-ui-version="8"] .shell-goal-bar .goal-action-button {
  border-color: #264835;
  background: var(--ui-forest);
  color: #fff6df;
  box-shadow: none;
  text-shadow: none;
}
.theme-western-fantasy [data-ui-version="8"] :is(.primary-button, .goal-action-button, .hs-button--primary):hover:not(:disabled) { background: var(--ui-forest-hover); border-color: #51725e; }
.theme-western-fantasy [data-ui-version="8"] :is(.primary-button, .goal-action-button) :is(strong, span, small) { color: #f5efdc; text-shadow: none; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"] .play-layout { display: block; }
.theme-western-fantasy [data-ui-version="8"] .module-stack { gap: 20px; }

/* Adventure: scenery supplies atmosphere, actions and information stay on paper. */
.theme-western-fantasy [data-ui-version="8"] .adventure-hero-v8 {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 235px;
  padding: 28px;
  border-radius: 8px;
  background: linear-gradient(90deg, #122c27e6, #172d2894 60%, #1a302448), url("assets/sky_fantasy_backdrop.png") center 51% / cover no-repeat;
  color: #f9f3de;
}
.theme-western-fantasy [data-ui-version="8"] .adventure-hero-copy { max-width: 600px; }
.theme-western-fantasy [data-ui-version="8"] .adventure-hero-copy > span { color: #d5c493; font-size: 11px; letter-spacing: .12em; }
.theme-western-fantasy [data-ui-version="8"] .adventure-hero-copy h2 { margin: 10px 0; color: #fff8e8; font-size: clamp(28px, 3vw, 42px); line-height: 1.25; }
.theme-western-fantasy [data-ui-version="8"] .adventure-hero-copy p { max-width: 540px; margin: 0; color: #dde1cf; font-size: 13px; line-height: 1.8; }
.theme-western-fantasy [data-ui-version="8"] .adventure-hero-meta { display: flex; flex-direction: column; gap: 7px; flex: 0 0 auto; align-items: flex-end; }
.theme-western-fantasy [data-ui-version="8"] .adventure-hero-meta span { padding: 5px 10px; border: 1px solid #bfb99161; border-radius: 5px; color: #eae5cf; background: #19352bb8; font-size: 11px; }
.theme-western-fantasy [data-ui-version="8"] .actions-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 20px 0; }
.theme-western-fantasy [data-ui-version="8"] .action-button { min-height: 82px; padding: 16px; border-color: var(--ui-line); background: var(--ui-paper-raised); }
.theme-western-fantasy [data-ui-version="8"] .action-button strong { color: #354d3e; font-size: 15px; }
.theme-western-fantasy [data-ui-version="8"] .action-button span { color: var(--ui-muted); font-size: 12px; }
.theme-western-fantasy [data-ui-version="8"] .action-button.primary-button { background: var(--ui-forest); border-color: var(--ui-forest); }
.theme-western-fantasy [data-ui-version="8"] .action-button.primary-button :is(strong, span) { color: #f6efdc; }
.theme-western-fantasy [data-ui-version="8"] .adventure-v5-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.theme-western-fantasy [data-ui-version="8"] .adventure-v5-summary > div { min-height: 100px; padding: 14px 16px; border: 1px solid var(--ui-line); border-radius: 8px; background: #f0ecdf; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .adventure-v5-summary strong { color: #424d3c; font-size: 14px; line-height: 1.6; }
.theme-western-fantasy [data-ui-version="8"] .adventure-v5-summary :is(span, small) { color: #747566; font-size: 11px; line-height: 1.7; }
.theme-western-fantasy [data-ui-version="8"] :is(.adventure-decision-panel, .endgame-challenge-panel) { padding: 16px; border-color: #d4c9b0; border-radius: 8px; background: #eee8d8; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] :is(.adventure-decision-heading, .endgame-challenge-heading) strong { color: #354c37; }
.theme-western-fantasy [data-ui-version="8"] :is(.adventure-decision-heading, .endgame-challenge-heading) :is(span, small) { color: #676a5b; }
.theme-western-fantasy [data-ui-version="8"] :is(.adventure-choice-grid, .dungeon-route-grid, .endgame-challenge-grid) button { border-color: #c9c9b7; background: #fffdf5; color: #344d35; padding: 14px; }
.theme-western-fantasy [data-ui-version="8"] :is(.adventure-choice-grid, .dungeon-route-grid, .endgame-challenge-grid) button strong { color: #344d35; }
.theme-western-fantasy [data-ui-version="8"] :is(.adventure-choice-grid, .dungeon-route-grid, .endgame-challenge-grid) button span { color: #626958; }
.theme-western-fantasy [data-ui-version="8"] :is(.adventure-choice-grid, .dungeon-route-grid, .endgame-challenge-grid) button small { color: #6b6f5f; }
.theme-western-fantasy [data-ui-version="8"] :is(.adventure-choice-grid, .dungeon-route-grid, .endgame-challenge-grid) button em { color: #78613a; }
.theme-western-fantasy [data-ui-version="8"] :is(.adventure-choice-grid, .dungeon-route-grid, .endgame-challenge-grid) button:hover:not(:disabled) { border-color: #7b9370; background: #edf2e4; }
.theme-western-fantasy [data-ui-version="8"] :is(.adventure-choice-grid, .dungeon-route-grid, .endgame-challenge-grid) button:disabled { opacity: 1; filter: none; border-color: #bfc3b2; background: #e7e5dc; color: #5e6557; }
.theme-western-fantasy [data-ui-version="8"] :is(.adventure-choice-grid, .dungeon-route-grid, .endgame-challenge-grid) button:disabled :is(strong, span, small, em) { color: #5e6557; }
.theme-western-fantasy [data-ui-version="8"] .dungeon-route-wait { border-color: #c6cfb5; background: #e8eddd; color: #59664d; border-radius: 7px; }

/* Module surfaces: one panel frame, quiet nested cards, clearly selected tabs. */
.theme-western-fantasy [data-ui-version="8"] :is(.current-goal, .battle-result-card, .boss-rematch-prep-card, .city-board, .city-npc-panel, .live-situation, .live-latest, .shop-guidance, .forge-guidance, .simple-map-current, .road-current, .road-targets button, .city-shop-card, .quest-card, .stat-row, .inventory-row, .equipment-slot, .skill-chip, .city-event-list button, .city-fast-route-list button, .settings-v5-card, .settings-v5-section, .quest-v5-stage, .quest-v5-focus, .shop-v5-summary > div, .adventure-context > div, .rebirth-option, .shop-item, .inventory-item, .equipment-card, .skill-card, .managed-item, .inventory-detail-panel, .account-warehouse-panel) {
  border-color: var(--ui-line);
  border-radius: 7px;
  background: var(--ui-paper-raised);
  box-shadow: none;
}
.theme-western-fantasy [data-ui-version="8"] :is(.tab-button, .hs-tab, .forge-filter-tabs button, .shop-filter-tabs button, .item-category-tabs button, .compact-tabs button, .main-tabs button, .city-places button) { border-color: transparent; background: #eae6d8; color: #666c5e; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] :is(.tab-button.is-active, .hs-tab.is-active, .forge-filter-tabs button.is-active, .shop-filter-tabs button.is-active, .item-category-tabs button.is-active, .compact-tabs button.is-active, .main-tabs button.is-active, .city-places button.is-active, .managed-item-summary.is-active) { border-color: var(--ui-forest); background: var(--ui-forest); color: #f8efdb; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] :is(.player-tabs, .main-tabs, .compact-tabs, .city-places, .item-category-tabs, .shop-filter-tabs, .forge-filter-tabs, .forge-section-tabs) { gap: 7px; border-color: var(--ui-line); background: #efeadf; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] :is(.stat-row, .inventory-row) { padding: 10px 12px; }
.theme-western-fantasy [data-ui-version="8"] .character-v4-kpis > div { background: #efecdf; border-color: var(--ui-line); }
.theme-western-fantasy [data-ui-version="8"] .character-module-v4 .character-overview { padding: 14px; border-color: var(--ui-line); background: #efeadd; }
.theme-western-fantasy [data-ui-version="8"] .player-portrait-card { padding: 12px; border: 1px solid #cbd2b9; border-radius: 8px; background: #e4e9d8; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .player-portrait-meta strong { color: #2c4934; }
.theme-western-fantasy [data-ui-version="8"] .player-portrait-meta :is(span, small) { color: #68735c; }
.theme-western-fantasy [data-ui-version="8"] .player-portrait-card .race-portrait { border-color: #93a17d; background: #566551; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .shop-panel-v5 .shop-title { background: var(--ui-paper); border-color: var(--ui-line); color: var(--ui-ink); }
.theme-western-fantasy [data-ui-version="8"] .shop-panel-v5 .shop-title strong { color: #304b39; text-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .shop-panel-v5 .shop-title span { color: #717564; text-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] :is(.shop-shelf-title, .shop-guidance) { background: transparent; border-color: var(--ui-line); box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] :is(.shop-shelf-title, .shop-guidance) strong { color: #3e5742; }
.theme-western-fantasy [data-ui-version="8"] :is(.shop-shelf-title, .shop-guidance) span { color: #747566; }
.theme-western-fantasy [data-ui-version="8"] :is(.inventory-detail-panel, .managed-item.is-detail) { background: #fffdf5; }
.theme-western-fantasy [data-ui-version="8"] :is(.item-refine-panel, .item-star-panel, .item-affix-panel, .equipment-growth-panel, .forge-suit-detail, .forge-suit-overview, .inventory-source-panel, .inventory-v2-log-panel) { background: #edeadb; border-color: var(--ui-line); }
.theme-western-fantasy [data-ui-version="8"] .map-view-tabs { background: #eeeade; border-color: var(--ui-line); }
.theme-western-fantasy [data-ui-version="8"] .map-view-tabs button.is-active { background: #e4ebdf; border-color: #72896e; box-shadow: inset 3px 0 #4d6b51; }
.theme-western-fantasy [data-ui-version="8"] .log { border-color: var(--ui-line); background: #eeeade; }
.theme-western-fantasy [data-ui-version="8"] .log-entry { background: #f9f7ed; border-left-color: #b79a64; padding: 10px 12px; }

/* Battle focuses on the two opponents and keeps the action tray stable. */
.theme-western-fantasy .game-shell-v2[data-ui-version="8"].is-combat-mode { grid-template-rows: auto auto 1fr; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"].is-combat-mode .shell-goal-bar { display: none; }
.theme-western-fantasy .game-shell-v2[data-ui-version="8"].is-combat-mode .desktop-module-nav { grid-row: 2 / span 2; }
.theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-body-v3 { gap: 16px; background: var(--ui-paper); }
.theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-header-v3 { min-height: 0; padding-block: 12px; }
.theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-header-v3 h2 { color: var(--ui-ink); text-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-header-v3 :is(span, small) { color: var(--ui-muted); }
.theme-western-fantasy [data-ui-version="8"] .combat-stage-v3 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 14px;
  border: 1px solid #516752;
  border-radius: 9px;
  background: linear-gradient(100deg, #122c28db, #142820aa), url("assets/sky_fantasy_backdrop.png") center 60% / cover no-repeat;
  box-shadow: none;
}
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card { min-width: 0; gap: 10px; padding: 15px; border: 1px solid #bfcaa24d; border-radius: 8px; background: #183126c7; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card :is(.player-combat-portrait, .enemy-visual) { min-height: 118px; border: 0; background: transparent; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-head span { border-color: #98ae805e; background: #324b35; color: #d7dbad; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .meter { border: 0; background: transparent; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .meter-label { color: #d8e0c7; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .meter-track { background: #0d1e16; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .meter-fill.hp { background: #bc6e59; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .meter-fill.energy { background: #84a992; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .combat-status-details { color: #c5d6b5; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .combat-status-details summary { min-height: 44px; align-content: center; color: #c5d6b5; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .combat-state-badges .badge { color: #40503b; background: #e0e7d4; border-color: #93a47d; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .enemy-drop-preview { padding: 2px 10px; border-color: #83977565; background: #2f4838; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .enemy-drop-preview summary { min-height: 44px; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .enemy-drop-title strong { color: #eed6a4; font-size: 12px; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card :is(.enemy-drop-title span, .enemy-drop-row em, .enemy-drop-more) { color: #c0d1b3; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .enemy-drop-preview summary::after { border-color: #8c9c7969; color: #e0cda3; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .enemy-drop-list { max-height: 220px; overflow: auto; overscroll-behavior: contain; padding-bottom: 8px; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .enemy-drop-row { border-color: #91a27d59; padding-block: 7px; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .enemy-drop-row span { color: #e2e8d5; }
.theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .enemy-drop-row strong { color: #efd49b; }
.theme-western-fantasy [data-ui-version="8"] .combat-control-deck { gap: 14px; padding: 0; border: 0; background: transparent; }
.theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-choice-panel { border-color: var(--ui-line); background: #f0eddf; padding: 12px; }
.theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar { position: static; gap: 10px; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar button { min-height: 58px; padding: 10px; background: #eee9da; }
.theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar button :is(strong, span) { color: inherit; opacity: 1; text-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar button[data-action="attack-normal"] { border-color: #8b4b3a; background: var(--ui-rust); color: #fff3df; }
.theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar button[data-action="attack-skill"] { border-color: #3f654b; background: var(--ui-forest); color: #f3eddb; }
.theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar button[data-action="attack-skill"]:hover:not(:disabled) { background: var(--ui-forest-hover); }
.theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar button:disabled { background: #e7e5dc; border-color: #c9c5b9; color: #74756d; }
.theme-western-fantasy [data-ui-version="8"] .combat-intent-panel { margin: 0; padding: 14px 16px; border: 1px solid #d8c4a5; border-left: 3px solid #ad684c; border-radius: 8px; background: #f2ebdb; box-shadow: none; }
.theme-western-fantasy [data-ui-version="8"] .combat-intent-heading strong { color: #774536; }
.theme-western-fantasy [data-ui-version="8"] .combat-intent-heading > span { color: #8b7046; }
.theme-western-fantasy [data-ui-version="8"] :is(.combat-intent-panel p, .combat-intent-heading em, .combat-intent-counter span, .combat-intent-counter small) { color: #69675b; }
.theme-western-fantasy [data-ui-version="8"] .combat-intent-counter b { color: #526743; }
.theme-western-fantasy [data-ui-version="8"] .combat-intent-panel.is-countered { border-color: #98ad8d; border-left-color: #5d7b4e; background: #e9eddf; }
.theme-western-fantasy [data-ui-version="8"] .career-combat-guide { gap: 10px; margin: 0; padding: 14px 16px; border: 1px solid #cfd5bc; border-radius: 8px; background: #ecf0e1; color: #344d36; }
.theme-western-fantasy [data-ui-version="8"] .career-combat-guide summary { min-height: 44px; align-content: center; cursor: pointer; color: #36543c; line-height: 1.6; }
.theme-western-fantasy [data-ui-version="8"] .career-combat-guide summary :is(strong, span) { color: #36543c; }
.theme-western-fantasy [data-ui-version="8"] .career-combat-guide :is(p, small) { color: #657358; }
.theme-western-fantasy [data-ui-version="8"] .combat-feedback { border-color: var(--ui-line); background: #f1eee2; }

@media (min-width: 641px) {
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-content: start; gap: 8px 14px; padding: 12px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-head { grid-column: 2; grid-row: 1; gap: 2px 7px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-head h3 { font-size: 15px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-visual { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card :is(.player-combat-portrait, .enemy-visual) { min-height: 108px; max-height: 108px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .race-portrait.is-combat { width: 84px; height: 106px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card :is(.enemy-portrait, .enemy-visual.is-elite .enemy-portrait, .enemy-visual.is-boss .enemy-portrait) { height: 104px; max-width: 100%; object-fit: contain; }
  .theme-western-fantasy [data-ui-version="8"] .combat-meter-stack { grid-column: 2; grid-row: 2; align-self: end; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card :is(.combat-status-details, .enemy-drop-preview) { grid-column: 1 / -1; }
}

@media (min-width: 1001px) {
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"].is-combat-mode { padding-bottom: 120px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar {
    position: fixed;
    left: max(248px, calc((100vw - 1920px) / 2 + 248px));
    right: max(28px, calc((100vw - 1920px) / 2 + 28px));
    bottom: 0;
    z-index: var(--hs-z-sticky, 40);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: auto;
    margin: 0;
    padding: 12px 18px 16px;
    border: 1px solid #bac4a9;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: #f3f0e5fa;
    box-shadow: 0 -5px 18px #24352620;
  }
}
@media (min-width: 1001px) and (max-width: 1250px) {
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar { left: 240px; right: 20px; }
}

/* Creation uses the same paper controls with a restrained landscape opening. */
.theme-western-fantasy .game.creation-shell-v8[data-ui-version="8"] { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 0 32px 40px; max-width: 1600px; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .shell-topbar { grid-template-columns: minmax(0, 1fr) auto; margin-inline: -32px; padding-inline: 32px; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .shell-topbar .top-actions { grid-column: 2; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .hero-panel { border: 0; border-radius: 12px; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .intro-scene { min-height: 275px; padding: 38px; background: linear-gradient(90deg, #173327e8, #20372c8a 60%, #31473529), url("assets/sky_fantasy_backdrop.png") center 48% / cover no-repeat; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .intro-copy { max-width: 650px; padding: 0; border: 0; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .intro-copy > span { display: block; color: #d5bc84; font-size: 11px; letter-spacing: .18em; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .intro-copy h2 { margin: 15px 0; color: #fbf5e5; font-size: clamp(27px, 3.4vw, 44px); line-height: 1.35; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .intro-copy p { color: #dce0cc; font-size: 13px; line-height: 1.9; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .creation { grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .creation-identity { position: sticky; top: 20px; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .creation-identity .field { gap: 9px; margin-bottom: 22px; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .creation-identity label { color: #59614f; font-size: 12px; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .gender-selector button { padding: 12px; background: #eeebdf; border-color: var(--ui-line); }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .gender-selector button.is-selected { border-color: #83977a; background: #e1e9d9; color: #294a32; box-shadow: inset 0 0 0 1px #83977a; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-option { min-width: 0; min-height: 230px; gap: 7px; padding: 18px; border: 1px solid var(--ui-line); border-radius: 9px; background: #fffdf5; box-shadow: none; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-option.is-selected { border-color: #778e64; background: #eef2e5; box-shadow: inset 0 0 0 1px #778e64; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-option.is-locked { border-style: dashed; background: #edece3; opacity: 1; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-option-top { grid-template-columns: 56px minmax(0, 1fr); gap: 12px; margin-bottom: 4px; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-option strong { color: #344d35; font-size: 18px; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-option span { font-size: 12px; line-height: 1.7; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-portrait.is-small { width: 56px; height: 68px; border-color: #a0ab8e; border-radius: 6px; box-shadow: none; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-stats { margin-top: 7px; padding-top: 8px; border-top: 1px solid #dfdfd0; }
.theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-stats i { border: 0; border-radius: 3px; background: #e9ecdf; color: #626d52; padding: 2px 5px; font-size: 11px; }

@media (max-width: 1250px) and (min-width: 1001px) {
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] { column-gap: 20px; padding-right: 20px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-topbar { margin-right: -20px; gap: 18px; padding-right: 20px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-resource-bar { gap: 16px; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip { gap: 18px; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .shell-vitals { gap: 14px; }
  .theme-western-fantasy [data-ui-version="8"] :is(.panel-body, .hs-panel__body) { padding: 18px; }
  .theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .creation { grid-template-columns: 275px minmax(0, 1fr); gap: 18px; }
}

@media (max-width: 1000px) {
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; gap: 16px; padding: 0 20px calc(102px + env(safe-area-inset-bottom)); }
  .theme-western-fantasy [data-ui-version="8"] .shell-topbar { grid-column: 1; grid-template-columns: minmax(180px, 1fr) auto; gap: 14px; margin-inline: -20px; padding: 14px 20px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-resource-bar { grid-column: 1; grid-row: 2; justify-content: flex-start; gap: 22px; }
  .theme-western-fantasy [data-ui-version="8"] .top-actions { grid-column: 2; grid-row: 1 / span 2; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .desktop-module-nav { display: none; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] :is(.shell-status-strip, .shell-goal-bar, .play-layout) { grid-column: 1; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip { display: grid; grid-template-columns: minmax(190px, .8fr) minmax(0, 1.4fr); gap: 24px; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .shell-vitals { gap: 15px; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--hs-z-sticky, 20);
    align-items: stretch;
    justify-content: flex-start;
    gap: 7px;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    border: 0;
    border-top: 1px solid #677761;
    border-radius: 0;
    background: #172a23fa;
    box-shadow: 0 -4px 16px #132a2329;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 12px;
    scrollbar-width: thin;
    scrollbar-color: #a4b091 #172a23;
  }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .mobile-bottom-nav::-webkit-scrollbar { display: block; height: 3px; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .mobile-bottom-nav .module-nav-button {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 27px auto;
    align-content: center;
    justify-items: center;
    flex: 0 0 74px;
    min-width: 74px;
    min-height: 58px;
    gap: 4px;
    padding: 5px;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    box-shadow: none;
    scroll-snap-align: start;
  }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .mobile-bottom-nav .module-nav-button::before { grid-row: 1; width: 25px; height: 25px; border-color: #638068; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .mobile-bottom-nav .module-nav-button i { grid-row: 1; width: 25px; height: 25px; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .mobile-bottom-nav .module-nav-button strong { grid-column: 1; grid-row: 2; color: #bdcbb9; min-height: 0; font-size: 11px; line-height: 1.35; white-space: nowrap; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .mobile-bottom-nav .module-nav-button span { display: none; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .mobile-bottom-nav .module-nav-button.is-active { border-color: #c0a26b; background: #395344; box-shadow: inset 0 -2px #d0b37b; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .mobile-bottom-nav .module-nav-button:hover:not(:disabled) { border-color: #627f62; background: #2a4635; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .mobile-bottom-nav .module-nav-button.is-active:hover:not(:disabled) { border-color: #c0a26b; background: #486650; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .mobile-bottom-nav .module-nav-button.is-active strong { color: #fff3d5; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"].is-combat-mode .mobile-bottom-nav { display: none; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 { overflow: visible; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-body-v3 { padding-bottom: 22px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: calc(var(--hs-z-sticky, 20) + 1); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; width: 100%; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid #aab496; border-radius: 0; background: #f3f0e5fa; box-shadow: 0 -5px 18px #24352620; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar button { min-height: 55px; padding: 8px 4px; }
  .theme-western-fantasy .game.creation-shell-v8[data-ui-version="8"] { padding: 0 20px 30px; gap: 20px; }
  .theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .shell-topbar { margin-inline: -20px; padding-inline: 20px; }
  .theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .creation { grid-template-columns: 250px minmax(0, 1fr); gap: 18px; }
  .theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-grid { grid-template-columns: 1fr; }
  .theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-option { min-height: 0; }
}

@media (max-width: 640px) {
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] { gap: 14px; padding-inline: 12px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-topbar { gap: 10px; min-height: 0; margin-inline: -12px; padding: 14px 12px; grid-template-columns: minmax(0, 1fr) auto; }
  .theme-western-fantasy [data-ui-version="8"] .brand h1 { font-size: 23px; }
  .theme-western-fantasy [data-ui-version="8"] .brand p { font-size: 9px; letter-spacing: .06em; }
  .theme-western-fantasy [data-ui-version="8"] .brand { gap: 8px; }
  .theme-western-fantasy [data-ui-version="8"] .seal { flex-basis: 31px; width: 31px; height: 37px; font-size: 18px; }
  .theme-western-fantasy [data-ui-version="8"] .top-actions { grid-row: 1; gap: 5px; }
  .theme-western-fantasy [data-ui-version="8"] .top-actions button { min-width: 44px; padding: 7px; font-size: 11px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-resource-bar { grid-column: 1 / -1; justify-content: space-between; gap: 14px; padding-top: 10px; border-top: 1px solid #ffffff14; }
  .theme-western-fantasy [data-ui-version="8"] .shell-resource-bar > span { display: flex; align-items: baseline; gap: 7px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-resource-bar strong { font-size: 12px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-resource-bar small { font-size: 10px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-resource-bar em { font-size: 9px; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip { grid-template-columns: 1fr; gap: 10px; padding: 0 3px 2px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-identity .race-portrait { flex-basis: 37px; width: 37px; height: 45px; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .shell-identity { gap: 9px; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .shell-identity-copy { display: flex; flex-wrap: wrap; gap: 3px 10px; align-items: center; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip .shell-vitals { gap: 15px; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip strong { font-size: 14px; }
  .theme-western-fantasy .game-shell-v2[data-ui-version="8"] .shell-status-strip span { font-size: 10px; }
  .theme-western-fantasy [data-ui-version="8"] .meter-label { gap: 5px; font-size: 10px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-goal-bar .current-goal.is-shell { grid-template-columns: minmax(0, 1fr) minmax(108px, .64fr); padding: 10px 12px; gap: 5px 12px; margin: 0; align-items: start; }
  .theme-western-fantasy [data-ui-version="8"] .shell-goal-bar .current-goal-main { gap: 3px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-goal-bar .current-goal-main :is(span, small) { font-size: 10px; line-height: 1.5; }
  .theme-western-fantasy [data-ui-version="8"] .shell-goal-bar .current-goal-side { gap: 4px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-goal-bar .current-goal-side > span { font-size: 10px; line-height: 1.5; }
  .theme-western-fantasy [data-ui-version="8"] .shell-goal-bar .goal-action-button { min-height: 48px; padding: 7px 8px; gap: 3px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-goal-bar .goal-action-button strong { font-size: 12px; }
  .theme-western-fantasy [data-ui-version="8"] .shell-goal-bar .goal-action-button small { font-size: 10px; padding: 0; background: transparent; }
  .theme-western-fantasy [data-ui-version="8"] .shell-goal-bar .goal-prep-details summary { min-height: 44px; align-content: center; font-size: 10px; }
  .theme-western-fantasy [data-ui-version="8"] .current-goal-main strong { font-size: 15px; }
  .theme-western-fantasy [data-ui-version="8"] :is(.panel-header, .hs-panel__header, .hs-card__header, .module-shell-header, .consumable-title, .equipment-title, .shop-title, .forge-panel-head) { padding: 15px; gap: 8px; min-height: 58px; }
  .theme-western-fantasy [data-ui-version="8"] :is(.panel-header h2, .panel-header h3, .module-shell-header h2, .consumable-title strong, .equipment-title strong, .shop-title strong, .forge-panel-head strong) { font-size: 20px; }
  .theme-western-fantasy [data-ui-version="8"] :is(.panel-body, .hs-panel__body) { padding: 14px; }
  .theme-western-fantasy [data-ui-version="8"] .adventure-hero-v8 { min-height: 166px; flex-direction: column; align-items: flex-start; justify-content: flex-end; gap: 10px; padding: 16px; }
  .theme-western-fantasy [data-ui-version="8"] .adventure-hero-copy h2 { margin: 6px 0; font-size: 27px; }
  .theme-western-fantasy [data-ui-version="8"] .adventure-hero-copy p { font-size: 11px; line-height: 1.6; }
  .theme-western-fantasy [data-ui-version="8"] .adventure-hero-meta { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .theme-western-fantasy [data-ui-version="8"] .adventure-hero-meta span { padding: 4px 7px; font-size: 10px; }
  .theme-western-fantasy [data-ui-version="8"] .adventure-hero-meta button { min-height: 44px; padding: 5px 9px; border-color: #8a9b7d; background: #2c4638; color: #efe7cb; font-size: 10px; }
  .theme-western-fantasy [data-ui-version="8"] .actions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 15px; }
  .theme-western-fantasy [data-ui-version="8"] .action-button { min-height: 80px; gap: 5px; padding: 13px; }
  .theme-western-fantasy [data-ui-version="8"] .action-button strong { font-size: 14px; }
  .theme-western-fantasy [data-ui-version="8"] .action-button span { font-size: 11px; }
  .theme-western-fantasy [data-ui-version="8"] .adventure-v5-summary { grid-template-columns: 1fr; gap: 8px; margin: 14px 0; }
  .theme-western-fantasy [data-ui-version="8"] .adventure-v5-summary > div { min-height: 0; padding: 12px; }
  .theme-western-fantasy [data-ui-version="8"] .adventure-choice-grid,
  .theme-western-fantasy [data-ui-version="8"] .dungeon-route-grid,
  .theme-western-fantasy [data-ui-version="8"] .endgame-challenge-grid { grid-template-columns: 1fr; }
  .theme-western-fantasy [data-ui-version="8"] .combat-stage-v3 { gap: 10px; padding: 10px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-header-v3 { display: flex; flex-direction: row; align-items: center; justify-content: space-between; padding: 12px 14px; text-align: left; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-header-v3 > div:first-child { align-items: start; justify-items: start; gap: 2px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-header-v3 h2 { font-size: 20px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-header-v3 :is(span, small) { font-size: 10px; line-height: 1.5; }
  .theme-western-fantasy [data-ui-version="8"] .combat-header-actions { flex: 0 0 64px; gap: 5px; justify-content: flex-end; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card { gap: 8px; padding: 10px 8px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-head { grid-template-columns: 1fr; gap: 5px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-head span { grid-row: auto; justify-self: start; font-size: 10px; padding: 2px 6px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-head h3 { font-size: 14px; white-space: normal; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-head small { font-size: 10px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .enemy-drop-title { grid-template-columns: minmax(0, 1fr) auto; gap: 4px; padding-block: 6px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .enemy-drop-title strong { grid-column: 1; grid-row: 1; font-size: 11px; white-space: nowrap; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .enemy-drop-title span { grid-column: 1 / -1; grid-row: 2; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .enemy-drop-title::after { grid-column: 2; grid-row: 1; padding-inline: 5px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card :is(.player-combat-portrait, .enemy-visual) { min-height: 92px; max-height: 98px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card .race-portrait.is-combat { width: 76px; height: 94px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-fighter-card :is(.enemy-portrait, .enemy-visual.is-elite .enemy-portrait, .enemy-visual.is-boss .enemy-portrait) { max-width: 100%; height: 92px; object-fit: contain; }
  .theme-western-fantasy [data-ui-version="8"] .combat-intent-panel { grid-template-columns: 1fr; gap: 10px; padding: 12px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-choice-grid { grid-template-columns: 1fr; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar { gap: 6px; padding-inline: 9px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar button strong { font-size: 12px; }
  .theme-western-fantasy [data-ui-version="8"] .combat-panel-v3 .combat-command-bar button span { white-space: normal; font-size: 10px; }
  .theme-western-fantasy [data-ui-version="8"] .career-combat-guide { padding: 12px; }
  .theme-western-fantasy .game.creation-shell-v8[data-ui-version="8"] { gap: 16px; padding: 0 12px 24px; }
  .theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .shell-topbar { margin-inline: -12px; padding-inline: 12px; }
  .theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .intro-scene { min-height: 255px; padding: 26px 20px; }
  .theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .intro-copy h2 { font-size: 29px; }
  .theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .intro-copy p { font-size: 12px; }
  .theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .creation { grid-template-columns: 1fr; gap: 16px; }
  .theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .creation-identity { position: static; }
  .theme-western-fantasy .creation-shell-v8[data-ui-version="8"] .race-option { padding: 16px; }
}

/* Guidance stays in the page flow; it never floats over battle or navigation. */
.theme-western-fantasy [data-ui-version="8"] .guide-inline-v8 {
  position: static;
  grid-column: 2;
  width: auto;
  max-width: none;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid var(--ui-line);
  border-radius: 8px;
  background: var(--ui-paper);
  pointer-events: auto;
  z-index: auto;
}
.theme-western-fantasy [data-ui-version="8"] summary { cursor: pointer; min-height: 32px; line-height: 1.7; }
.theme-western-fantasy [data-ui-version="8"] :is(.goal-prep-details, .career-guide-details, .combat-status-details, .character-stat-details) { min-width: 0; }
.theme-western-fantasy [data-ui-version="8"] .goal-prep-details { grid-column: 1 / -1; color: var(--ui-muted); font-size: 12px; }
.theme-western-fantasy [data-ui-version="8"] :is(.career-guide-details, .combat-status-details) { color: var(--ui-muted); font-size: 12px; }
.theme-western-fantasy [data-ui-version="8"] .guide-card-v6 { box-shadow: none; border: 0; background: transparent; animation: none; }
.theme-western-fantasy [data-ui-version="8"] .creation-account { padding-top: 18px; font-size: 12px; color: var(--ui-muted); }
.theme-western-fantasy [data-ui-version="8"] :is(.creation-account, .settings-module) .account-panel { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; background: transparent; border: 0; padding: 0; }
.theme-western-fantasy [data-ui-version="8"] .account-panel input { min-width: 0; flex: 1 1 150px; }
.theme-western-fantasy [data-ui-version="8"] .account-panel small { flex-basis: 100%; color: var(--ui-muted); }
@media (max-width: 1000px) {
  .theme-western-fantasy [data-ui-version="8"] .guide-inline-v8 { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .theme-western-fantasy [data-ui-version="8"] *,
  .theme-western-fantasy [data-ui-version="8"] *::before,
  .theme-western-fantasy [data-ui-version="8"] *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
