:root {
  color-scheme: dark;
  font-family: Aptos, Arial, Helvetica, sans-serif;
  --avatar-accent: #65d6ad;
  background: linear-gradient(135deg, #0d1113 0%, #131713 48%, #0e1218 100%);
  color: #f5f7fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 54px 54px;
  opacity: 0.42;
}

.shell {
  width: min(1180px, 94vw);
  margin: 0 auto;
  padding: 28px 0 34px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

body[data-view="launcher"] .stats,
body[data-view="auth"] .stats,
body[data-view="characters"] .stats,
body[data-view="game"] .topbar,
body[data-view="game"] .global-message {
  display: none;
}

body[data-view="game"] {
  overflow: hidden;
}

body[data-view="game"]::before {
  display: none;
}

body[data-view="game"] .shell {
  width: 100vw;
  height: 100vh;
  margin: 0;
  padding: 0;
}

.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 12px;
  font-weight: 700;
  color: #65d6ad;
}

h1, h2, .note-title {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-family: "Aptos Display", Aptos, Arial, sans-serif;
  font-size: 34px;
  line-height: 1.05;
}

.lede {
  margin: 10px 0 0;
  max-width: 720px;
  color: #b9c0cc;
  font-size: 18px;
}

.stats {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: end;
  max-width: 52%;
}

.stats span,
.badge {
  border: 1px solid #324052;
  padding: 8px 12px;
  border-radius: 6px;
  background: #171c24;
  color: #d8dde6;
  font-size: 14px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

/* WPR forged-guild visual system — 2026-07-12 */
:root {
  --wpr-void: #090c0b;
  --wpr-iron: #111714;
  --wpr-iron-soft: #1a211d;
  --wpr-gold: #d8ad55;
  --wpr-gold-dark: #75562a;
  --wpr-green: #184d35;
  --wpr-green-bright: #3f8c61;
  --wpr-parchment: #f5ead2;
  --wpr-muted: #b9aa89;
  --wpr-health: #a94343;
  --wpr-teal: #4c9b8b;
  --wpr-frame: linear-gradient(145deg, #443522 0 2px, #d8ad55 2px 3px, #141a17 3px 100%);
  --wpr-shadow: 0 14px 34px #000b, inset 0 0 0 1px #000, inset 0 0 24px #0008;
}

body {
  color: var(--wpr-parchment);
  background:
    radial-gradient(circle at 52% 26%, #28433355, transparent 36%),
    linear-gradient(135deg, #060807, #111913 48%, #090b0a);
}

body::before {
  opacity: .22;
  background-image:
    linear-gradient(30deg, transparent 48%, #d8ad5512 49%, #d8ad5512 51%, transparent 52%),
    linear-gradient(150deg, transparent 48%, #184d3525 49%, #184d3525 51%, transparent 52%);
  background-size: 54px 94px;
}

.panel,
.inventory-panel,
.quest-panel,
.launcher-control-panel,
.patcher-panel,
.modal-panel {
  border: 1px solid var(--wpr-gold-dark);
  border-radius: 2px;
  background:
    linear-gradient(135deg, #d8ad5544 0 1px, transparent 1px) top left / 16px 16px no-repeat,
    linear-gradient(225deg, #d8ad5544 0 1px, transparent 1px) top right / 16px 16px no-repeat,
    linear-gradient(315deg, #d8ad5544 0 1px, transparent 1px) bottom right / 16px 16px no-repeat,
    linear-gradient(45deg, #d8ad5544 0 1px, transparent 1px) bottom left / 16px 16px no-repeat,
    linear-gradient(145deg, #171e1aee, #0b0f0dee);
  box-shadow: var(--wpr-shadow), 0 0 0 3px #070a08cc;
}

.panel::before,
.inventory-panel::before,
.quest-panel::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid #d8ad5528;
  pointer-events: none;
}

.eyebrow { color: var(--wpr-gold); letter-spacing: .13em; }
h1, h2, h3 { color: var(--wpr-parchment); text-shadow: 0 2px 0 #000; }

button,
.badge,
.panel-tab {
  border-radius: 2px;
  border-color: #75562a;
}

button.primary {
  color: #fff6df;
  border-color: #b98a3e;
  background: linear-gradient(#326e4d, #17442f);
  box-shadow: inset 0 0 0 1px #76a77b55, 0 3px 0 #08130d;
}

button.secondary,
button.ghost,
.panel-tab {
  color: var(--wpr-parchment);
  background: linear-gradient(#252c27, #101512);
  box-shadow: inset 0 0 0 1px #d8ad5517;
}

button:hover,
.panel-tab.is-active {
  color: #fff8e8;
  border-color: var(--wpr-gold);
  background: linear-gradient(#2e4435, #15251c);
}

.wpr-launcher-hero,
.patcher-hero {
  border: 1px solid var(--wpr-gold-dark);
  border-radius: 2px;
  box-shadow: var(--wpr-shadow);
  background:
    linear-gradient(90deg, #07100bed 0 30%, transparent 66%),
    radial-gradient(circle at 70% 42%, #6e87482f, transparent 25%),
    linear-gradient(155deg, #1f3b2b, #0a110d 64%);
}

.wpr-launcher-world::after {
  content: "WPR";
  position: absolute;
  right: 8%;
  bottom: 9%;
  color: #d8ad5524;
  font: 700 clamp(90px, 14vw, 190px)/1 Georgia, serif;
  letter-spacing: .08em;
  text-shadow: 0 0 24px #000;
}

.launcher-status-card,
.summary > div,
.inventory-item,
.equipment-slots span {
  border-color: #514328;
  border-radius: 2px;
  background: linear-gradient(145deg, #1a211d, #0a0e0c);
  box-shadow: inset 0 0 0 1px #d8ad550e;
}

body[data-view="game"] .game-stage {
  border: 1px solid #69502b;
  border-radius: 0;
  box-shadow: 0 0 0 4px #070a08, 0 18px 40px #000c;
}

body[data-view="game"] .game-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 70px #020403aa;
}

body[data-view="game"] .hud-shell {
  top: 16px;
  left: 16px;
  right: 16px;
  grid-template-columns: minmax(250px, 330px) 1fr auto auto;
  align-items: start;
  gap: 10px;
  pointer-events: none;
}

.hud-character,
.hud-resources,
.hud-shortcuts,
.hud-hotbar {
  pointer-events: auto;
  border: 1px solid var(--wpr-gold-dark);
  border-radius: 2px;
  background: linear-gradient(145deg, #171d19f2, #090d0bf2);
  box-shadow: var(--wpr-shadow);
}

.hud-character {
  min-height: 78px;
  padding: 12px 14px 10px 88px;
  position: relative;
}

.hud-portrait {
  position: absolute;
  left: 10px;
  top: 7px;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 2px solid var(--wpr-gold);
  border-radius: 50%;
  color: var(--wpr-gold);
  font: 700 28px/1 Georgia, serif;
  background: radial-gradient(circle at 35% 30%, #42644d, #0a120d 70%);
  box-shadow: 0 0 0 4px #0a0e0c, inset 0 0 18px #000;
}

.hud-character strong { font-family: Georgia, serif; color: var(--wpr-parchment); }
.hud-character > span:not(.hud-portrait) { color: var(--wpr-muted); }

.hud-bars {
  height: 24px;
  gap: 4px;
  background: transparent;
}

.hud-bars::before,
.hud-bars::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 8px;
  border: 1px solid #050706;
  background: #080b09;
  box-shadow: inset 0 1px 3px #000;
}
.hud-bars::before { top: 2px; }
.hud-bars::after { bottom: 2px; }
.hud-bars span { z-index: 1; height: 8px; border-radius: 0; }
#hud-hp-bar { background: linear-gradient(90deg, #772c2c, var(--wpr-health), #d67262); }
#hud-exp-bar { background: linear-gradient(90deg, #236456, var(--wpr-teal), #72b9a7); }

.hud-hotbar {
  align-self: end;
  justify-self: center;
  display: grid;
  grid-template-columns: repeat(8, 42px);
  gap: 4px;
  padding: 7px;
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
}

.hud-hotbar button {
  position: relative;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #806633;
  background:
    radial-gradient(circle at 38% 34%, #4b7a57 0 8%, transparent 9%),
    conic-gradient(from 45deg, #243b2c, #111713, #6c3c26, #17261c);
  box-shadow: inset 0 0 0 2px #080b09, inset 0 0 12px #000;
}

.hud-hotbar button span {
  position: absolute;
  top: 2px;
  left: 4px;
  color: #f5ead2;
  font-size: 10px;
  text-shadow: 0 1px 2px #000;
}

.hud-resources { color: var(--wpr-gold); }
.hud-shortcuts button { border-color: #6c542d; color: var(--wpr-parchment); }

.quest-panel {
  top: 108px;
  right: 18px;
  border-left: 3px solid var(--wpr-green-bright);
}

body[data-view="game"] .inventory-panel {
  top: 104px;
  right: 18px;
  width: min(430px, calc(100vw - 36px));
  border-top: 3px solid var(--wpr-gold-dark);
}

.inventory-head {
  margin: -4px -4px 12px;
  padding: 12px 14px;
  border-bottom: 1px solid #6b542d;
  background: linear-gradient(90deg, #101511, #243025, #101511);
}

.panel-tabs { border-bottom: 1px solid #5d4929; }
.panel-tab.is-active { color: var(--wpr-gold); }

.equipment-slots {
  gap: 6px;
  padding: 8px;
  border: 1px solid #4e4028;
  background: #090d0b88;
}

.inventory-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.inventory-item { min-height: 68px; border-color: #5b492c; }
.inventory-icon { color: var(--wpr-gold); border-color: #6d542d; background: radial-gradient(circle, #355341, #101612 70%); }

@media (max-width: 1100px) {
  body[data-view="game"] .hud-shell { grid-template-columns: minmax(220px, 300px) 1fr auto; }
  .hud-resources { display: none; }
  .hud-hotbar { grid-template-columns: repeat(8, 36px); }
  .hud-hotbar button { width: 36px; height: 36px; }
}

@media (max-width: 760px), (max-height: 650px) {
  .hud-hotbar { grid-template-columns: repeat(8, 30px); bottom: 8px; padding: 4px; }
  .hud-hotbar button { width: 30px; height: 30px; }
  .hud-character { min-height: 62px; padding: 8px 10px 7px 64px; }
  .hud-portrait { width: 44px; height: 44px; font-size: 20px; }
}

/* 0.2.17 runtime layout stabilization. Keep every floating region independent. */
body[data-view="game"] .hud-shell {
  inset: 0;
  display: block;
  pointer-events: none;
}

body[data-view="game"] .hud-character {
  position: absolute;
  top: 16px;
  left: 16px;
  width: clamp(250px, 20vw, 330px);
}

body[data-view="game"] .hud-resources {
  position: absolute;
  top: 16px;
  left: clamp(278px, calc(20vw + 30px), 344px);
  width: auto;
  max-width: min(360px, 32vw);
  min-height: 42px;
  padding: 10px 14px;
}

body[data-view="game"] .hud-shortcuts {
  display: none;
}

body[data-view="game"] .quest-panel {
  top: 112px;
  left: 16px;
  right: auto;
  bottom: auto;
  width: clamp(250px, 20vw, 330px);
  max-height: 150px;
  overflow: hidden;
  padding: 12px 14px;
}

body[data-view="game"] .inventory-panel {
  top: 88px;
  right: 18px;
  bottom: auto;
  left: auto;
  width: min(430px, calc(100vw - 36px));
  max-height: calc(100vh - 112px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

body[data-view="game"] .panel-section {
  min-width: 0;
}

body[data-view="game"] .inventory-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

body[data-view="game"] .inventory-item {
  grid-template-columns: 44px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 10px;
}

body[data-view="game"] .inventory-item > div:last-child {
  min-width: 0;
}

body[data-view="game"] .inventory-item strong,
body[data-view="game"] .inventory-item span,
body[data-view="game"] .inventory-item p {
  overflow-wrap: normal;
  word-break: normal;
}

body[data-view="game"] .inventory-item .button-row {
  justify-content: flex-start;
  margin-top: 8px;
}

body[data-view="game"] .inventory-item .button-row button {
  width: auto;
  max-width: 100%;
  min-height: 32px;
  padding: 7px 10px;
  white-space: nowrap;
}

body[data-view="game"] .player-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body[data-view="game"] .player-stat,
body[data-view="game"] .class-skill,
body[data-view="game"] .skill-action {
  min-width: 0;
}

body[data-view="game"] .hud-hotbar {
  width: max-content;
  max-width: calc(100vw - 32px);
  z-index: 6;
}

@media (max-width: 1200px) {
  body[data-view="game"] .hud-resources {
    max-width: 260px;
  }

  body[data-view="game"] .inventory-panel {
    width: min(390px, calc(100vw - 28px));
    right: 14px;
  }
}

@media (max-width: 900px), (max-height: 680px) {
  body[data-view="game"] .hud-character {
    top: 10px;
    left: 10px;
    width: min(280px, calc(100vw - 180px));
  }

  body[data-view="game"] .hud-resources,
  body[data-view="game"] .quest-panel {
    display: none;
  }

  body[data-view="game"] .inventory-panel {
    top: 66px;
    right: 10px;
    width: min(380px, calc(100vw - 20px));
    max-height: calc(100vh - 78px);
  }

  body[data-view="game"] .game-header {
    top: 10px;
    right: 10px;
    gap: 6px;
  }

  body[data-view="game"] .game-header .ghost {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 12px;
  }
}

body[data-view="game"] .hud-character,
body[data-view="game"] .hud-resources,
body[data-view="game"] .hud-hotbar,
body[data-view="game"] .quest-panel {
  backdrop-filter: none;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-width: 0;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

.wpr-launcher {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(340px, 0.72fr);
  gap: 18px;
  min-height: 560px;
}

.wpr-launcher-hero {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  border: 1px solid #2f3948;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(22, 33, 38, 0.86), rgba(12, 16, 20, 0.98)),
    linear-gradient(135deg, #132427, #1f2a21 48%, #10141d);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.wpr-launcher-world,
.world-grid,
.world-keep,
.world-path,
.wpr-launcher-copy {
  position: absolute;
}

.wpr-launcher-world {
  inset: 0;
}

.world-grid {
  inset: 0;
  background:
    linear-gradient(90deg, rgba(101, 214, 173, 0.08) 1px, transparent 1px),
    linear-gradient(rgba(240, 201, 90, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  transform: perspective(500px) rotateX(58deg) translateY(70px);
  transform-origin: bottom;
}

.world-keep {
  left: 50%;
  bottom: 30%;
  width: min(310px, 44%);
  height: 190px;
  transform: translateX(-50%);
  border: 1px solid rgba(240, 201, 90, 0.5);
  background:
    linear-gradient(180deg, #293431, #121817),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.04) 0 2px, transparent 2px 34px);
  clip-path: polygon(0 100%, 0 32%, 10% 32%, 10% 18%, 20% 18%, 20% 32%, 38% 32%, 38% 0, 62% 0, 62% 32%, 80% 32%, 80% 18%, 90% 18%, 90% 32%, 100% 32%, 100% 100%);
}

.world-path {
  left: 38%;
  right: 38%;
  bottom: -8%;
  height: 42%;
  transform: perspective(380px) rotateX(58deg);
  transform-origin: bottom;
  background: linear-gradient(180deg, rgba(240, 201, 90, 0.32), rgba(101, 214, 173, 0.08));
  border-left: 1px solid rgba(240, 201, 90, 0.25);
  border-right: 1px solid rgba(240, 201, 90, 0.25);
}

.wpr-launcher-copy {
  left: 30px;
  right: 30px;
  bottom: 30px;
  max-width: 680px;
}

.wpr-launcher-copy h2 {
  font-family: "Aptos Display", Aptos, Arial, sans-serif;
  font-size: 42px;
  line-height: 1.04;
}

.wpr-launcher-copy p:last-child {
  max-width: 560px;
  color: #c4ccd7;
  font-size: 17px;
}

.launcher-control-panel {
  align-self: stretch;
  display: grid;
  align-content: center;
  gap: 16px;
}

.launcher-version-row,
.launcher-status-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.launcher-status-grid {
  display: grid;
  gap: 10px;
}

.launcher-status-card {
  align-items: flex-start;
  flex-direction: column;
  padding: 14px;
  border: 1px solid #344237;
  border-radius: 8px;
  background: #101713;
}

.launcher-status-card span,
.launcher-status-card small {
  color: #8d98a8;
}

.launcher-status-card span {
  font-size: 12px;
  text-transform: uppercase;
  font-weight: 700;
}

.launcher-status-card strong {
  color: #65d6ad;
}

#launcher-server-state[data-online="false"],
#launcher-update-state[data-state="error"] {
  color: #f26d6d;
}

.launcher-progress {
  height: 10px;
  overflow: hidden;
  border: 1px solid #344237;
  border-radius: 999px;
  background: #0c1114;
}

.launcher-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #65d6ad, #f0c95a);
  transition: width 180ms ease;
}

.launcher-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.launcher-actions .primary {
  grid-column: 1 / -1;
  min-height: 54px;
  font-size: 18px;
}

.launcher-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: #74a7ff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.modal-shell[hidden] {
  display: none;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 10, 0.72);
  backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  width: min(520px, 100%);
  max-height: min(680px, calc(100vh - 48px));
  overflow: auto;
  padding: 22px;
  border: 1px solid #3b4b4b;
  border-radius: 10px;
  background: #121a19;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.modal-header,
.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.modal-header {
  margin-bottom: 22px;
}

.modal-header h2 {
  margin: 0;
  font-family: "Aptos Display", Aptos, Arial, sans-serif;
}

.window-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.window-settings-grid label,
.settings-check-row {
  display: grid;
  gap: 8px;
  color: #d8dde6;
  font-size: 14px;
}

.settings-check-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  margin-top: 16px;
}

.settings-check-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #65d6ad;
}

.modal-panel .panel-hint {
  margin-top: 18px;
}

.modal-actions {
  justify-content: flex-end;
  margin-top: 22px;
}

.auth-card {
  width: min(520px, 100%);
  margin: 44px auto 0;
  padding: 22px;
}

.auth-card h2,
.character-list-panel h2 {
  margin: 0 0 14px;
  font-family: "Aptos Display", Aptos, Arial, sans-serif;
  font-size: 22px;
}

.auth-grid,
.character-toolbar {
  display: grid;
  gap: 12px;
}

.character-toolbar {
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: end;
}

.auth-card label,
.character-list-panel label {
  display: grid;
  gap: 8px;
  color: #d8dde6;
  font-size: 14px;
}

.auth-card input,
.auth-card select,
.character-list-panel select {
  width: 100%;
  border: 1px solid #364254;
  background: #10141b;
  color: #f5f7fb;
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
}

.remember-row {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  margin-top: 2px;
}

.remember-row input {
  width: 18px;
  height: 18px;
  accent-color: #65d6ad;
}

.is-hidden {
  display: none !important;
}

.account-message {
  margin: 14px 0 0;
  color: #b9c0cc;
  font-size: 15px;
}

.global-message {
  min-height: 22px;
  margin: -4px 0 18px;
}

.character-list-panel {
  display: grid;
  grid-template-columns: minmax(180px, 0.48fr) minmax(0, 1fr);
  gap: 18px;
  align-items: end;
  padding: 18px;
  margin-bottom: 18px;
}

.layout {
  display: grid;
  grid-template-columns: 1.02fr 1.18fr;
  gap: 18px;
  align-items: start;
}

.panel {
  border: 1px solid #2b3442;
  background: rgba(23, 28, 36, 0.94);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.25);
}

.form-panel {
  padding: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.field-grid label {
  display: grid;
  gap: 8px;
  color: #d8dde6;
  font-size: 14px;
}

.field-grid label.wide {
  grid-column: 1 / -1;
}

input,
select {
  width: 100%;
  border: 1px solid #364254;
  background: #10141b;
  color: #f5f7fb;
  border-radius: 8px;
  padding: 12px 14px;
  font: inherit;
}

input:focus,
select:focus,
button:focus-visible {
  outline: 2px solid #65d6ad;
  outline-offset: 2px;
}

.button-row {
  display: flex;
  gap: 12px;
  justify-content: end;
  margin-top: 18px;
}

.portal-shell .layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.82fr);
}

.portal-download {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr);
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
}

.portal-download p {
  margin: 8px 0 0;
  color: #b9c0cc;
  line-height: 1.45;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.ghost {
  background: #1b2230;
  color: #d8dde6;
  border: 1px solid #334153;
}

.portal-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  border-radius: 8px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
}

.download-inline {
  color: #65d6ad;
  text-decoration: none;
}

.download-inline:hover {
  text-decoration: underline;
}

.primary {
  background: linear-gradient(135deg, #65d6ad, #4fb892);
  color: #07110d;
}

.preview-panel {
  padding: 18px;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.preview-header h2 {
  font-family: "Aptos Display", Aptos, Arial, sans-serif;
  font-size: 24px;
}

canvas {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #324052;
  border-radius: 8px;
  background: #151a22;
}

.avatar-preview {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid #324052;
  border-radius: 8px;
  background:
    linear-gradient(#141a23 1px, transparent 1px),
    linear-gradient(90deg, #141a23 1px, transparent 1px),
    #10141b;
  background-size: 48px 48px;
  overflow: hidden;
}

.secondary {
  border: 1px solid #4d6f70;
  background: linear-gradient(135deg, #26383b, #1a292d);
  color: #dff8f0;
}

.secondary:hover,
.ghost:hover {
  border-color: #65d6ad;
  color: #ffffff;
}

.menu-back {
  margin: 0 0 14px;
  padding: 4px 0;
  text-align: left;
}

.menu-navigation {
  display: flex;
  justify-content: flex-start;
}

.patcher-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.76fr);
  gap: 18px;
  min-height: min(720px, calc(100vh - 170px));
}

.patcher-hero,
.patcher-panel {
  border: 1px solid #2d3b42;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(18, 27, 29, 0.96), rgba(10, 15, 20, 0.98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
}

.patcher-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 6vw, 76px);
  overflow: hidden;
  position: relative;
}

.patcher-hero::after {
  content: "SHA-256";
  position: absolute;
  right: -18px;
  bottom: -16px;
  color: rgba(101, 214, 173, 0.06);
  font-size: clamp(76px, 12vw, 158px);
  font-weight: 900;
}

.patcher-hero h2 {
  max-width: 700px;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.03;
}

.patcher-hero > p:not(.eyebrow) {
  max-width: 650px;
  color: #b9c0cc;
  line-height: 1.6;
}

.patcher-security-note {
  max-width: 650px;
  margin-top: 18px;
  padding: 14px 16px;
  border-left: 3px solid #65d6ad;
  background: rgba(101, 214, 173, 0.08);
  color: #d8eee7;
  line-height: 1.45;
}

.patcher-panel {
  align-self: center;
  padding: 22px;
}

.patcher-head,
.patcher-summary {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.patcher-current-file {
  min-height: 38px;
  margin: 12px 0;
  overflow-wrap: anywhere;
  color: #91a7aa;
  font-family: Consolas, monospace;
  font-size: 12px;
}

.patcher-summary {
  margin: 12px 0 18px;
  color: #b9c0cc;
  font-size: 12px;
}

.avatar-preview canvas {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.class-card-portrait {
  width: 72px;
  height: 96px;
  background-image: url("./assets/characters/wpr-classes-directions-v1.png");
  background-repeat: no-repeat;
  background-size: 400% 300%;
  filter: drop-shadow(0 8px 8px rgba(0, 0, 0, 0.36));
}

.game-header {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 14px;
}

.game-stage {
  position: relative;
  border: 1px solid #243143;
  border-radius: 10px;
  overflow: hidden;
  background: #0c1118;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}

#game-view canvas {
  min-height: 420px;
  cursor: crosshair;
  touch-action: none;
}

.inventory-panel {
  position: absolute;
  top: 18px;
  right: 18px;
  width: min(410px, calc(100% - 36px));
  max-height: calc(100% - 36px);
  overflow: auto;
  border: 1px solid #334153;
  border-radius: 8px;
  background: rgba(13, 18, 25, 0.97);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.38);
  padding: 16px;
  display: none;
}

.inventory-panel.is-open {
  display: block;
}

.inventory-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.inventory-head h2 {
  margin: 0;
  font-family: "Aptos Display", Aptos, Arial, sans-serif;
  font-size: 22px;
}

.panel-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.panel-tab {
  min-height: 40px;
  padding: 9px 8px;
  border: 1px solid #334153;
  border-radius: 6px;
  background: #151d29;
  color: #b9c0cc;
  font-size: 13px;
}

.panel-tab.is-active {
  background: #223449;
  color: #f5f7fb;
  border-color: #65d6ad;
}

.panel-section {
  display: none;
}

.panel-section.is-active {
  display: block;
}

.player-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.player-stat {
  padding: 10px;
  border: 1px solid #2f3948;
  border-radius: 8px;
  background: #131821;
}

.player-stat span {
  display: block;
  margin-bottom: 4px;
  color: #8d98a8;
  font-size: 11px;
  text-transform: uppercase;
}

.player-stat strong {
  color: #f5f7fb;
  font-size: 15px;
}

.player-actions {
  display: grid;
  gap: 10px;
}

.skill-action-grid {
  display: grid;
  gap: 8px;
}

.skill-action {
  display: grid;
  gap: 3px;
  min-height: 56px;
  padding: 10px 12px;
  border: 1px solid #334153;
  border-radius: 8px;
  background: #151d29;
  color: #f5f7fb;
  text-align: left;
}

.skill-action.is-active {
  border-color: #65d6ad;
  background: #1d332d;
}

.skill-action strong,
.skill-action span {
  display: block;
}

.skill-action strong {
  font-size: 14px;
}

.skill-action span {
  color: #8d98a8;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.skill-action p {
  margin: 6px 0 0;
  color: #b9c0cc;
  font-size: 13px;
  line-height: 1.35;
}

.guild-action-card {
  border-color: #bfa34a;
  background: #211f18;
}

.button-row.compact {
  gap: 8px;
  margin-top: 8px;
}

.button-row.compact button {
  min-height: 34px;
  padding: 8px 10px;
}

.panel-hint {
  margin: 0;
  color: #b9c0cc;
  font-size: 14px;
  line-height: 1.45;
}

.inventory-grid {
  display: grid;
  gap: 10px;
}

.inventory-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid #2f3948;
  border-radius: 8px;
  background: #131821;
}

.inventory-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: #1f2a38;
  color: #f0c95a;
  font-weight: 800;
}

.inventory-item strong,
.inventory-item span {
  display: block;
}

.inventory-item strong {
  color: #f5f7fb;
  font-size: 15px;
}

.inventory-item span {
  margin-top: 2px;
  color: #65d6ad;
  font-size: 12px;
  text-transform: uppercase;
}

.inventory-item p {
  margin: 6px 0 0;
  color: #b9c0cc;
  font-size: 13px;
  line-height: 1.35;
}

.summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.summary div {
  padding: 12px;
  border: 1px solid #2f3948;
  border-radius: 8px;
  background: #131821;
}

.summary span {
  display: block;
  color: #8d98a8;
  font-size: 12px;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.summary strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: #f5f7fb;
}

.class-skill-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #2f3948;
  border-radius: 8px;
  background: #10151d;
}

.class-skill-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.class-skill-head span,
.panel-subtitle {
  color: #8d98a8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.class-skill-head strong {
  color: #65d6ad;
  font-size: 13px;
}

.class-skill-list {
  display: grid;
  gap: 10px;
}

.class-skill {
  padding: 11px 12px;
  border: 1px solid #2f3948;
  border-radius: 8px;
  background: #151b25;
}

.class-skill strong,
.class-skill span {
  display: block;
}

.class-skill strong {
  color: #f5f7fb;
  font-size: 15px;
}

.class-skill span {
  margin-top: 3px;
  color: #65d6ad;
  font-size: 12px;
  text-transform: uppercase;
}

.class-skill p {
  margin: 7px 0 0;
  color: #b9c0cc;
  font-size: 13px;
  line-height: 1.35;
}

.panel-subtitle {
  margin: 14px 0 8px;
}

.panel-skill-list {
  gap: 8px;
}

.note-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-top: 18px;
  padding: 16px 18px;
}

.note-title {
  font-family: "Aptos Display", Aptos, Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.note-copy {
  margin: 0;
  max-width: 760px;
  color: #b9c0cc;
  font-size: 16px;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.launcher-screen {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(330px, 0.58fr);
  gap: 18px;
  align-items: stretch;
  min-height: 520px;
}

.launcher-art {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  border: 1px solid #2f3948;
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(19, 30, 31, 0.92), rgba(17, 20, 18, 0.96)),
    linear-gradient(45deg, #21312b 0 25%, #273423 25% 50%, #18211d 50% 75%, #273126 75%);
  background-size: auto, 160px 160px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.34);
}

.launcher-sky,
.launcher-ground,
.launcher-fort,
.launcher-banner {
  position: absolute;
}

.launcher-sky {
  inset: 0 0 38%;
  background:
    linear-gradient(180deg, rgba(84, 112, 105, 0.26), transparent),
    repeating-linear-gradient(100deg, rgba(255, 255, 255, 0.05) 0 2px, transparent 2px 26px);
}

.launcher-ground {
  left: -5%;
  right: -5%;
  bottom: -8%;
  height: 42%;
  transform: skewY(-3deg);
  background:
    linear-gradient(180deg, #38402c, #151b16),
    repeating-linear-gradient(90deg, rgba(240, 201, 90, 0.13) 0 2px, transparent 2px 34px);
  border-top: 5px solid rgba(191, 163, 74, 0.38);
}

.launcher-fort {
  left: 14%;
  right: 12%;
  bottom: 24%;
  height: 210px;
}

.launcher-fort span {
  position: absolute;
  bottom: 0;
  display: block;
  background: #22272a;
  border: 1px solid #53584d;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.025);
}

.launcher-fort .tower {
  width: 74px;
  height: 166px;
}

.launcher-fort .tower::before,
.launcher-fort .keep::before {
  content: "";
  position: absolute;
  left: -8px;
  right: -8px;
  top: -22px;
  height: 24px;
  background: #303532;
  clip-path: polygon(0 100%, 0 35%, 18% 35%, 18% 0, 32% 0, 32% 35%, 50% 35%, 50% 0, 64% 0, 64% 35%, 82% 35%, 82% 0, 100% 0, 100% 100%);
}

.launcher-fort .left {
  left: 5%;
}

.launcher-fort .right {
  right: 5%;
}

.launcher-fort .keep {
  left: 24%;
  right: 24%;
  height: 122px;
}

.launcher-fort .gate {
  left: 44%;
  width: 12%;
  height: 84px;
  border-radius: 36px 36px 0 0;
  background: #111513;
  border-color: #75684b;
}

.launcher-banner {
  left: 28px;
  right: 28px;
  bottom: 28px;
  max-width: 640px;
}

.launcher-banner h2 {
  max-width: 560px;
  font-size: 34px;
  line-height: 1.05;
}

.login-panel {
  align-self: center;
  margin: 0;
  width: 100%;
  background: rgba(18, 22, 21, 0.98);
}

.server-status-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  margin: 0 0 16px;
  border: 1px solid #344237;
  border-radius: 8px;
  background: #101713;
}

.server-status-card span {
  color: #8d98a8;
  font-size: 12px;
  text-transform: uppercase;
}

.server-status-card strong {
  color: #65d6ad;
}

.character-workbench {
  display: grid;
  gap: 18px;
}

.class-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.class-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  min-height: 168px;
  padding: 16px;
  border: 1px solid #313a45;
  border-radius: 8px;
  background: linear-gradient(180deg, #171d24, #11161d);
  color: #f5f7fb;
  text-align: left;
}

.class-card:hover,
.class-card.is-selected {
  border-color: #65d6ad;
  background: linear-gradient(180deg, #1c2a27, #121a18);
}

.class-card strong {
  font-size: 20px;
}

.class-card span {
  color: #65d6ad;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.class-card p {
  margin: 0;
  color: #b9c0cc;
  font-size: 13px;
  line-height: 1.35;
}

.class-card small {
  color: #f0c95a;
  font-weight: 800;
}

.character-layout {
  grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1fr);
}

.creator-panel {
  display: grid;
  gap: 14px;
}

.creator-fields {
  grid-template-columns: 1fr;
}

.native-class-select {
  display: none !important;
}

.hero-preview-panel {
  min-height: 100%;
}

.game-stage {
  min-height: 590px;
}

body[data-view="game"] #game-view {
  position: relative;
  width: 100vw;
  height: 100vh;
}

body[data-view="game"] .game-header {
  position: absolute;
  right: 22px;
  top: 18px;
  z-index: 5;
  margin: 0;
  flex-wrap: wrap;
  max-width: calc(100vw - 32px);
}

.class-card > :not(.class-card-portrait) {
  grid-column: 2;
}

body[data-view="game"] .game-header .ghost {
  min-height: 38px;
  padding: 9px 14px;
  background: rgba(16, 21, 30, 0.84);
  backdrop-filter: blur(10px);
}

body[data-view="game"] .game-stage {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

#game-view canvas {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

.hud-shell {
  position: absolute;
  left: 16px;
  right: 350px;
  top: 16px;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1fr) auto;
  gap: 12px;
  pointer-events: none;
}

.hud-character,
.hud-resources,
.hud-shortcuts {
  min-width: 0;
}

.hud-character strong,
.hud-character span,
.hud-resources span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body[data-view="game"] .inventory-panel {
  top: 76px;
}

.hud-character,
.hud-resources,
.hud-shortcuts {
  border: 1px solid rgba(216, 221, 230, 0.16);
  border-radius: 8px;
  background: rgba(8, 12, 13, 0.78);
  backdrop-filter: blur(8px);
}

.hud-character {
  display: grid;
  gap: 6px;
  padding: 12px;
}

.hud-character strong,
.hud-character span {
  display: block;
}

.hud-character strong {
  font-size: 16px;
}

.hud-character span {
  color: #b9c0cc;
  font-size: 12px;
}

.hud-bars {
  position: relative;
  display: grid;
  gap: 4px;
}

.hud-bars span {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: #65d6ad;
}

#hud-exp-bar {
  background: #f0c95a;
}

.hud-resources {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.hud-resources span {
  color: #d8dde6;
  font-size: 13px;
  font-weight: 700;
}

.hud-shortcuts {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px;
  pointer-events: auto;
}

.hud-shortcuts button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid #59604f;
  border-radius: 6px;
  background: #22271f;
  color: #f5d78a;
}

.quest-panel {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  display: grid;
  gap: 4px;
  width: min(330px, calc(100% - 32px));
  padding: 12px 14px;
  background: rgba(11, 15, 16, 0.82);
  backdrop-filter: blur(8px);
}

.quest-panel strong {
  color: #f5f7fb;
}

.quest-panel span {
  color: #b9c0cc;
  font-size: 13px;
}

.equipment-slots {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.equipment-slots span {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px dashed #59604f;
  border-radius: 8px;
  background: #111713;
  color: #c8b676;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .character-list-panel,
  .portal-shell .layout,
  .portal-download,
  .layout,
  .launcher-screen,
  .wpr-launcher,
  .class-card-grid,
  .hud-shell,
  .patcher-screen {
    grid-template-columns: 1fr;
  }

  .summary {
    grid-template-columns: 1fr;
  }

  .launcher-art,
  .wpr-launcher-hero {
    min-height: 360px;
  }

  .wpr-launcher-copy h2 {
    font-size: 31px;
  }

  .launcher-actions {
    grid-template-columns: 1fr;
  }

  .hud-shell {
    left: 10px;
    right: 10px;
    top: 10px;
  }

  body[data-view="game"] .hud-shell {
    top: 72px;
  }

  .quest-panel {
    display: none;
  }
}

@media (max-height: 720px) and (min-width: 901px) {
  .wpr-launcher,
  .launcher-screen {
    min-height: 0;
  }

  .wpr-launcher-hero,
  .launcher-art {
    min-height: 430px;
  }

  .topbar {
    margin-bottom: 10px;
  }
}

@media (max-width: 1100px) and (min-width: 901px) {
  body[data-view="game"] .hud-shell {
    left: 16px;
    right: 400px;
    top: 16px;
    grid-template-columns: minmax(190px, 0.85fr) minmax(140px, 1fr);
  }

  body[data-view="game"] .hud-shortcuts {
    display: none;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100vw - 24px, 100%);
    padding: 16px 0 24px;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .field-grid {
    grid-template-columns: 1fr;
  }

  .character-toolbar {
    grid-template-columns: 1fr;
  }

  .button-row,
  .game-header,
  .note-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .stats {
    justify-content: start;
    max-width: 100%;
  }

  .inventory-panel {
    inset: auto 12px 12px 12px;
    width: auto;
    max-height: 70%;
  }

  .launcher-banner h2 {
    font-size: 26px;
  }

  .hud-resources,
  .hud-shortcuts {
    display: none;
  }

  .equipment-slots {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .window-settings-grid {
    grid-template-columns: 1fr;
  }

  .modal-shell {
    padding: 12px;
  }

  .modal-panel {
    max-height: calc(100vh - 24px);
    padding: 18px;
  }

  .modal-header,
  .modal-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-actions button {
    width: 100%;
  }
}

/* Final cascade lock for the WPR forged-guild skin. */
body { color: var(--wpr-parchment); background: radial-gradient(circle at 52% 26%, #28433355, transparent 36%), linear-gradient(135deg, #060807, #111913 48%, #090b0a); }
body::before { opacity: .22; background-image: linear-gradient(30deg, transparent 48%, #d8ad5512 49%, #d8ad5512 51%, transparent 52%), linear-gradient(150deg, transparent 48%, #184d3525 49%, #184d3525 51%, transparent 52%); background-size: 54px 94px; }
.panel, .inventory-panel, .quest-panel, .launcher-control-panel, .patcher-panel, .modal-panel { border: 1px solid var(--wpr-gold-dark); border-radius: 2px; background: linear-gradient(145deg, #171e1aee, #0b0f0dee); box-shadow: var(--wpr-shadow), 0 0 0 3px #070a08cc; }
.eyebrow { color: var(--wpr-gold); letter-spacing: .13em; }
button, .badge, .panel-tab { border-radius: 2px; border-color: #75562a; }
button.primary { color: #fff6df; border-color: #b98a3e; background: linear-gradient(#326e4d, #17442f); box-shadow: inset 0 0 0 1px #76a77b55, 0 3px 0 #08130d; }
button.secondary, button.ghost, .panel-tab { color: var(--wpr-parchment); background: linear-gradient(#252c27, #101512); box-shadow: inset 0 0 0 1px #d8ad5517; }
button:hover, .panel-tab.is-active { color: #fff8e8; border-color: var(--wpr-gold); background: linear-gradient(#2e4435, #15251c); }
.wpr-launcher-hero, .patcher-hero { border: 1px solid var(--wpr-gold-dark); border-radius: 2px; box-shadow: var(--wpr-shadow); background: linear-gradient(90deg, #07100bed 0 30%, transparent 66%), radial-gradient(circle at 70% 42%, #6e87482f, transparent 25%), linear-gradient(155deg, #1f3b2b, #0a110d 64%); }
.launcher-status-card, .summary > div, .inventory-item, .equipment-slots span { border-color: #514328; border-radius: 2px; background: linear-gradient(145deg, #1a211d, #0a0e0c); box-shadow: inset 0 0 0 1px #d8ad550e; }
body[data-view="game"] .game-stage { border: 1px solid #69502b; border-radius: 0; box-shadow: 0 0 0 4px #070a08, 0 18px 40px #000c; }
body[data-view="game"] .hud-shell { top: 16px; left: 16px; right: 16px; grid-template-columns: minmax(250px, 330px) 1fr auto auto; align-items: start; gap: 10px; pointer-events: none; }
body[data-view="game"] .hud-character, body[data-view="game"] .hud-resources, body[data-view="game"] .hud-shortcuts, body[data-view="game"] .hud-hotbar { pointer-events: auto; border: 1px solid var(--wpr-gold-dark); border-radius: 2px; background: linear-gradient(145deg, #171d19f2, #090d0bf2); box-shadow: var(--wpr-shadow); }
body[data-view="game"] .hud-character { min-height: 78px; padding: 12px 14px 10px 88px; position: relative; }
body[data-view="game"] .hud-portrait { position: absolute; left: 10px; top: 7px; width: 62px; height: 62px; display: grid; place-items: center; border: 2px solid var(--wpr-gold); border-radius: 50%; color: var(--wpr-gold); font: 700 28px/1 Georgia, serif; background: radial-gradient(circle at 35% 30%, #42644d, #0a120d 70%); box-shadow: 0 0 0 4px #0a0e0c, inset 0 0 18px #000; }
body[data-view="game"] .hud-character strong { color: var(--wpr-parchment); font-family: Georgia, serif; }
body[data-view="game"] .hud-hotbar { align-self: end; justify-self: center; display: grid; grid-template-columns: repeat(8, 42px); gap: 4px; padding: 7px; position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); }
body[data-view="game"] .hud-hotbar button { position: relative; width: 42px; height: 42px; padding: 0; border: 1px solid #806633; background: radial-gradient(circle at 38% 34%, #4b7a57 0 8%, transparent 9%), conic-gradient(from 45deg, #243b2c, #111713, #6c3c26, #17261c); box-shadow: inset 0 0 0 2px #080b09, inset 0 0 12px #000; }
body[data-view="game"] .hud-hotbar button span { position: absolute; top: 2px; left: 4px; color: #f5ead2; font-size: 10px; text-shadow: 0 1px 2px #000; }
body[data-view="game"] .quest-panel { top: 108px; right: 18px; border-left: 3px solid var(--wpr-green-bright); }
body[data-view="game"] .inventory-panel { top: 104px; right: 18px; width: min(430px, calc(100vw - 36px)); border-top: 3px solid var(--wpr-gold-dark); }
.inventory-head { border-bottom: 1px solid #6b542d; background: linear-gradient(90deg, #101511, #243025, #101511); }
.inventory-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.inventory-item { min-height: 68px; border-color: #5b492c; }
.inventory-icon { color: var(--wpr-gold); border-color: #6d542d; background: radial-gradient(circle, #355341, #101612 70%); }

@media (max-width: 1100px) {
  body[data-view="game"] .hud-shell { grid-template-columns: minmax(220px, 300px) 1fr auto; }
  body[data-view="game"] .hud-resources { display: none; }
  body[data-view="game"] .hud-hotbar { grid-template-columns: repeat(8, 36px); }
  body[data-view="game"] .hud-hotbar button { width: 36px; height: 36px; }
}

@media (max-width: 760px), (max-height: 650px) {
  body[data-view="game"] .hud-hotbar { grid-template-columns: repeat(8, 30px); bottom: 8px; padding: 4px; }
  body[data-view="game"] .hud-hotbar button { width: 30px; height: 30px; }
  body[data-view="game"] .hud-character { min-height: 62px; padding: 8px 10px 7px 64px; }
  body[data-view="game"] .hud-portrait { width: 44px; height: 44px; font-size: 20px; }
}
