:root {
  --ink: #10262b;
  --ink-soft: #37545a;
  --paper: #fbf5e8;
  --paper-muted: #e9dfca;
  --mint: #a9d9c8;
  --mint-dark: #4f9085;
  --orange: #db744a;
  --orange-light: #f2af6e;
  --gold: #e9b85c;
  --line: rgba(31, 63, 65, 0.2);
  --shadow: 0 16px 36px rgba(9, 28, 30, 0.18);
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #122b31;
}

* { box-sizing: border-box; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #122b31; }
body { touch-action: none; user-select: none; }
button { font: inherit; }

#game-shell { position: relative; width: 100%; height: 100dvh; min-height: 560px; overflow: hidden; background: #122b31; }
#stage-wrap { position: absolute; inset: 0; overflow: hidden; }
#game-canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.hud { position: absolute; z-index: 4; }
.flow-screen { position: absolute; inset: 0; z-index: 18; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 24%, rgba(91, 143, 122, .5), transparent 43%), linear-gradient(135deg, #15383c, #0d252c 72%); color: var(--paper); }
.flow-screen[hidden] { display: none; }
.lounge-world-overlay { position: absolute; inset: 0; z-index: 8; pointer-events: none; background: linear-gradient(180deg, rgba(15, 45, 48, .22), transparent 32%, rgba(15, 45, 48, .16)); }
.lounge-world-overlay::before { content: ''; position: absolute; inset: 0; opacity: .52; background: repeating-linear-gradient(0deg, rgba(251, 245, 232, .06) 0 1px, transparent 1px 42px), repeating-linear-gradient(90deg, rgba(16, 38, 43, .07) 0 1px, transparent 1px 42px); mix-blend-mode: overlay; }
.lounge-dialogue-close { position: absolute; left: 50%; top: 82px; z-index: 30; width: 38px; height: 38px; transform: translateX(153px); pointer-events: auto; }
.lounge-dialogue-close[hidden] { display: none; }
.chat-panel { position: absolute; left: 50%; bottom: 0; z-index: 12; transform: translateX(-50%); width: min(720px, 90vw); height: 315px; padding: 12px; color: var(--paper); background: rgba(16,38,43,.94); border: 1px solid rgba(183,230,219,.38); box-shadow: 6px 6px 0 rgba(16,38,43,.28); }
.chat-header { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; }.chat-header span { color: var(--mint); font-size: 9px; }
.chat-messages { height: 220px; overflow-y: auto; margin: 8px 0; padding: 5px; background: rgba(251,245,232,.08); font-size: 10px; line-height: 1.6; }.chat-messages p { margin: 2px 0; overflow-wrap: anywhere; }
.chat-form { display: flex; gap: 5px; }.chat-form input { min-width: 0; flex: 1; padding: 6px; border: 0; color: var(--paper); background: rgba(251,245,232,.14); outline: 0; font-size: 10px; }.chat-form button { padding: 5px 9px; color: var(--paper); background: var(--orange); border: 0; cursor: pointer; font-size: 10px; }
.hud-top .brand-lockup, .hud-top .run-stats, .mission-card, .status-panel .avatar { display: none; }
.character-avatar-button { position: absolute; top: max(14px, env(safe-area-inset-top)); right: 24px; z-index: 8; width: 58px; height: 66px; padding: 4px; display: grid; place-items: center; color: var(--paper); background: rgba(16,38,43,.9); border: 1px solid var(--orange-light); box-shadow: 4px 4px 0 rgba(16,38,43,.34); cursor: pointer; pointer-events: auto; }.character-avatar-button[hidden] { display: none; }.character-avatar-art { position: relative; display: block; width: 48px; height: 54px; overflow: hidden; background: rgba(251,245,232,.12); }.character-avatar-art img { display: block; width: 300%; max-width: none; height: auto; }.character-avatar-button i { position: absolute; right: -6px; bottom: -6px; width: 21px; height: 21px; display: grid; place-items: center; color: var(--paper); background: var(--orange); border: 1px solid var(--paper); border-radius: 50%; font: 700 10px Georgia, serif; font-style: normal; }
.lounge-world-panel { position: absolute; top: 96px; right: 24px; width: min(285px, calc(100vw - 48px)); padding: 16px; color: var(--paper); background: rgba(16, 38, 43, .84); border-left: 3px solid var(--orange); box-shadow: 8px 8px 0 rgba(16, 38, 43, .2); pointer-events: auto; }
.lounge-world-panel .lounge-heading { align-items: center; }
.lounge-world-panel .lounge-copy { margin: 14px 0 10px; color: rgba(251, 245, 232, .72); font-size: 11px; line-height: 1.6; }
.lounge-world-panel .primary-button { width: 100%; margin-top: 13px; }
.flow-card { width: min(820px, 100%); padding: clamp(24px, 5vw, 48px); background: rgba(251, 245, 232, .94); color: var(--ink); border: 1px solid rgba(251, 245, 232, .45); box-shadow: 12px 12px 0 rgba(8, 25, 30, .28); }
.account-card { width: min(460px, 100%); }
.account-form { display: grid; gap: 14px; }
.account-form label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 11px; }
.account-form input { width: 100%; box-sizing: border-box; padding: 12px 13px; color: var(--ink); background: rgba(255, 255, 255, .72); border: 1px solid var(--line); outline: none; font: inherit; }
.account-form input:focus { border-color: var(--orange); box-shadow: 0 0 0 2px rgba(201, 116, 61, .15); }
.account-form .primary-button { width: 100%; margin-top: 6px; }
.flow-card h1 { margin: 8px 0; font: 700 clamp(28px, 5vw, 48px) Georgia, serif; letter-spacing: .03em; }
.flow-copy { margin: 0 0 22px; color: var(--ink-soft); font-size: 13px; }
.flow-hint { margin: 20px 0 0; color: var(--ink-soft); text-align: center; font-size: 10px; }
.gender-grid, .map-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gender-option, .map-option { position: relative; overflow: hidden; border: 1px solid var(--line); background: #f5ecda; color: var(--ink); cursor: pointer; text-align: left; transition: transform .2s, border-color .2s, box-shadow .2s; }
.gender-option:hover, .map-option:hover { transform: translateY(-4px); border-color: var(--orange); box-shadow: 5px 5px 0 rgba(16, 38, 43, .2); }
.gender-option strong, .gender-option small { display: block; padding: 0 14px; }
.gender-option strong { margin-top: 10px; font: 700 17px Georgia, serif; }
.gender-option small { padding-bottom: 15px; margin-top: 3px; color: var(--ink-soft); font-size: 10px; }
.gender-art { display: block; height: 230px; background-repeat: no-repeat; background-size: 300% auto; background-position-y: 47%; background-color: #dce9df; }
.male-art { background-image: url('./assets/characters/male-walk.png'); background-position-x: 0%; }
.female-art { background-image: url('./assets/characters/female-walk.png'); background-position-x: 0%; }
.lounge-card { max-width: 760px; }
.lounge-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.gender-pill { padding: 6px 9px; color: var(--paper); background: var(--ink); font-size: 10px; white-space: nowrap; }
.lounge-body { display: grid; grid-template-columns: minmax(230px, 1fr) minmax(200px, .9fr); gap: 30px; align-items: center; }
.lounge-character { position: relative; min-height: 270px; display: grid; place-items: end center; overflow: hidden; background: linear-gradient(160deg, #decaa9, #a9c4aa); border: 1px solid rgba(16, 38, 43, .16); }
.lounge-character::before { content: ''; position: absolute; inset: 10% 8%; border: 1px solid rgba(16, 38, 43, .12); background: repeating-linear-gradient(90deg, transparent 0 32px, rgba(16, 38, 43, .04) 33px 34px); }
.lounge-character img { position: relative; z-index: 1; width: 95%; height: 265px; object-fit: contain; object-position: 0 52%; }
.lounge-character span { position: absolute; z-index: 2; left: 10px; bottom: 10px; padding: 4px 7px; color: var(--paper); background: rgba(16, 38, 43, .75); font-size: 9px; }
.lounge-copy { color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.lounge-stat { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 7px 0; font-size: 11px; }
.lounge-stat b { color: var(--ink); }
.map-card { max-width: 780px; }
.world-map-card { position: relative; width: min(96vw, 1200px); aspect-ratio: 5 / 3; max-height: calc(100dvh - 32px); overflow: hidden; color: var(--paper); background: #192d28; border: 1px solid rgba(242, 175, 110, .65); box-shadow: 10px 10px 0 rgba(16, 38, 43, .35); }
.world-map-heading { position: absolute; top: 16px; left: 24px; z-index: 2; max-width: 300px; pointer-events: none; text-shadow: 2px 2px 0 rgba(16, 38, 43, .75); }
.world-map-heading h1 { margin: 5px 0 3px; color: var(--paper); font: 700 clamp(20px, 3vw, 32px) Georgia, serif; }
.world-map-heading .flow-copy { margin: 0; color: rgba(251, 245, 232, .78); font-size: 11px; }
.world-map-stage { position: absolute; inset: 0; }
.world-map-image { display: block; width: 100%; height: 100%; object-fit: fill; user-select: none; -webkit-user-drag: none; }
.world-region-grid { position: absolute; inset: 0; pointer-events: none; }
.world-region { position: absolute; left: var(--region-left); top: var(--region-top); width: var(--region-width); height: var(--region-height); padding: 0; border: 2px solid transparent; color: transparent; background: transparent; cursor: pointer; pointer-events: auto; clip-path: polygon(var(--region-clip)); transition: background .16s, border-color .16s, filter .16s; }
.world-region:hover, .world-region:focus-visible { background: rgba(242, 175, 110, .22); border-color: rgba(255, 244, 204, .92); filter: drop-shadow(0 0 5px rgba(242, 175, 110, .7)); outline: none; }
.world-map-dialog-content { width: min(360px, calc(100vw - 48px)); }
.map-option { min-height: 235px; padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; color: var(--paper); }
.map-option::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, rgba(8, 25, 30, .88)); }
.changan-map { background-image: linear-gradient(180deg, rgba(16, 20, 38, .04), rgba(8, 25, 30, .42)), url('./assets/maps/changan-secret.jpg'); background-position: center; background-size: cover; }
.luoyang-map { background-image: linear-gradient(180deg, rgba(16, 20, 38, .04), rgba(8, 25, 30, .42)), url('./assets/maps/luoyang-desert.jpg'); background-position: center; background-size: cover; }
.map-option > * { position: relative; z-index: 1; }
.map-seal { align-self: flex-start; display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: auto; border: 1px solid rgba(251, 245, 232, .7); color: var(--paper); font: 700 15px Georgia, serif; }
.map-option strong { font: 700 24px Georgia, serif; }
.map-option small { margin-top: 4px; color: rgba(251, 245, 232, .8); font-size: 10px; }
.map-option i { margin-top: 12px; color: var(--orange-light); font-size: 9px; font-style: normal; }
.hud-top { top: max(18px, env(safe-area-inset-top)); left: 0; right: 0; height: 58px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.brand-lockup, .run-stats, .stat-chip { display: flex; align-items: center; }
.brand-lockup { gap: 10px; pointer-events: auto; }
.brand-lockup strong { display: block; font-family: Georgia, serif; font-size: 17px; letter-spacing: .02em; }
.brand-lockup small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: 10px; letter-spacing: .12em; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: var(--paper); background: var(--ink); font: 700 11px Georgia, serif; letter-spacing: .12em; box-shadow: 3px 3px 0 var(--orange); }
.run-stats { gap: 9px; pointer-events: auto; }
.stat-chip { min-height: 30px; gap: 6px; padding: 0 10px; background: rgba(251, 245, 232, .8); border: 1px solid rgba(16, 38, 43, .15); box-shadow: 3px 3px 0 rgba(16, 38, 43, .1); color: var(--ink-soft); font-size: 11px; }
.stat-chip b { color: var(--ink); font-size: 13px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot-gold { background: var(--gold); box-shadow: 0 0 0 2px rgba(233, 184, 92, .22); }
.dot-wave { background: var(--orange); }
.icon-button, .text-button { border: 0; cursor: pointer; }
.icon-button { width: 31px; height: 31px; background: var(--ink); color: var(--paper); font-size: 13px; letter-spacing: -2px; box-shadow: 3px 3px 0 var(--orange); }
.icon-button:active, .text-button:active, .primary-button:active, .ability-button:active { transform: translate(1px, 1px); box-shadow: 1px 1px 0 rgba(16, 38, 43, .25); }
.close-image-button { display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; background: transparent; box-shadow: none; cursor: pointer; pointer-events: auto; }
.close-image-button img { display: block; width: 26px; height: 26px; object-fit: contain; }
.close-image-button:active { transform: translateY(2px); box-shadow: none; }

.mission-card { top: 92px; left: 24px; width: 210px; padding: 12px 14px 13px; background: rgba(251, 245, 232, .9); border-left: 3px solid var(--orange); box-shadow: var(--shadow); }
.mission-row, .mission-meta, .bar-label, .status-name { display: flex; justify-content: space-between; align-items: center; }
.mission-row { color: var(--ink-soft); font: 700 11px Georgia, serif; }
.eyebrow { margin: 0; color: var(--orange); font-size: 9px; letter-spacing: .17em; text-transform: uppercase; }
.mission-card h2 { margin: 7px 0 11px; font: 700 16px Georgia, serif; }
.progress-track, .health-track, .xp-track { height: 5px; overflow: hidden; background: rgba(16, 38, 43, .12); }
.progress-track span, .health-track span, .xp-track span { display: block; height: 100%; transition: width .25s ease; }
.progress-track span { background: var(--orange); }
.mission-meta { margin-top: 8px; color: var(--ink-soft); font-size: 10px; }
.mission-meta b { color: var(--ink); }
.knife-progress-row { display: flex; justify-content: space-between; align-items: center; margin-top: 9px; color: var(--ink-soft); font-size: 9px; }
.knife-progress-row span:first-child { color: var(--ink); font-weight: 700; }
.knife-progress-track { height: 3px; margin-top: 4px; overflow: hidden; background: rgba(16, 38, 43, .12); }
.knife-progress-track span { display: block; width: 0; height: 100%; background: var(--gold); transition: width .25s ease, background .25s ease; }

.wave-banner { position: absolute; top: 39%; left: 50%; z-index: 3; display: grid; gap: 2px; transform: translate(-50%, -50%) scale(.9); opacity: 0; pointer-events: none; text-align: center; transition: opacity .2s, transform .35s; }
.wave-banner.visible { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.wave-banner span { color: var(--orange); font: 700 11px Georgia, serif; letter-spacing: .28em; }
.wave-banner strong { color: var(--paper); font: 700 30px Georgia, serif; text-shadow: 2px 2px 0 var(--ink); white-space: nowrap; }
.toast { position: absolute; left: 50%; bottom: 29%; z-index: 5; transform: translateX(-50%) translateY(10px); color: var(--paper); background: rgba(16, 38, 43, .9); padding: 7px 12px; font-size: 11px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }

.status-panel { left: 24px; right: auto; bottom: max(64px, calc(env(safe-area-inset-bottom) + 50px)); width: 52px; display: flex; align-items: center; gap: 11px; pointer-events: none; }
.status-panel .avatar, .status-panel .status-main { display: none; }
.avatar { position: relative; flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; color: var(--paper); background: var(--orange); border: 3px solid var(--paper); box-shadow: 3px 3px 0 var(--ink); }
.avatar-face { font-size: 22px; text-shadow: 1px 1px 0 var(--ink); }
.level-badge { position: absolute; right: -8px; bottom: -7px; width: 20px; height: 20px; display: grid; place-items: center; color: var(--paper); background: var(--ink); border: 2px solid var(--paper); font: 700 10px Georgia, serif; font-style: normal; }
.status-main { width: min(280px, 35vw); min-width: 175px; padding: 7px 10px; background: rgba(251, 245, 232, .86); box-shadow: 6px 6px 0 rgba(16, 38, 43, .13); }
.status-name { margin-bottom: 5px; font-size: 11px; }
.status-name span { color: var(--orange); font-size: 10px; }
.bar-label { margin: 3px 0 2px; color: var(--ink-soft); font-size: 8px; }
.health-track, .xp-track { height: 4px; }
.health-track span { background: var(--orange); }
.xp-track span { background: var(--mint-dark); }
.ability-button { width: 52px; height: 52px; border: 0; background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--orange); cursor: pointer; pointer-events: auto; }
.ability-button span { display: block; color: var(--orange-light); font-size: 24px; line-height: 24px; }
.ability-button small { display: block; margin-top: 3px; font-size: 9px; }
.ability-button.cooldown { filter: grayscale(1); opacity: .75; }

.bottom-tray { position: absolute; right: 24px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 4; display: flex; align-items: center; gap: 12px; color: rgba(251, 245, 232, .72); font-size: 10px; pointer-events: none; }
.menu-anchor { position: absolute; right: 24px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 9; }
.menu-button { display: grid; width: 64px; height: 64px; place-items: center; gap: 2px; padding: 7px 5px; color: var(--paper); background: rgba(16,38,43,.92); border: 1px solid rgba(242,175,110,.85); box-shadow: 4px 4px 0 rgba(16,38,43,.25); cursor: pointer; }
.menu-button span { color: var(--orange-light); font-size: 22px; line-height: 1; }.menu-button b { font-size: 10px; }
.menu-panel { position: absolute; right: 0; bottom: 74px; display: grid; grid-template-columns: repeat(2, minmax(118px, 1fr)); gap: 7px; width: 270px; padding: 10px; color: var(--paper); background: rgba(16,38,43,.96); border: 1px solid rgba(183,230,219,.34); box-shadow: 7px 7px 0 rgba(16,38,43,.25); }
.menu-panel[hidden] { display: none; }.menu-panel-header { grid-column: 1 / -1; display: flex; justify-content: space-between; padding: 2px 2px 5px; border-bottom: 1px solid rgba(251,245,232,.18); font-size: 11px; }.menu-panel-header span { color: var(--mint); font-size: 9px; }
.menu-option { display: grid; min-height: 65px; place-items: center; padding: 7px 4px; color: var(--paper); background: #2d5555; border: 1px solid rgba(183,230,219,.25); cursor: pointer; }.menu-option:hover { border-color: var(--orange-light); background: #396b66; }.menu-option span { color: var(--orange-light); font-size: 19px; line-height: 1; }.menu-option b { font-size: 10px; }.menu-option small { color: var(--mint); font-size: 8px; }
.currency-stack { display: flex; align-items: center; gap: 7px; padding: 5px 8px; }
.currency-row { min-width: 110px; justify-content: flex-end; gap: 5px; }
.currency-row em { color: var(--ink-soft); font-size: 9px; font-style: normal; }
.currency-plus { width: 16px; height: 16px; padding: 0; border: 0; border-radius: 50%; color: var(--paper); background: var(--orange); font-size: 14px; line-height: 16px; cursor: pointer; pointer-events: auto; }
.dot-copper { background: #b87333; }.dot-silver { background: #c4cbd2; }
.utility-slot { display: grid; min-width: 58px; min-height: 58px; place-items: center; padding: 6px 5px; color: var(--paper); background: rgba(16,38,43,.78); border: 1px solid rgba(183,230,219,.35); box-shadow: 3px 3px 0 rgba(16,38,43,.18); pointer-events: auto; cursor: pointer; }
.utility-slot span { color: var(--orange-light); font-size: 18px; line-height: 1; }
.utility-slot b { font-size: 10px; }
.utility-slot small { color: var(--mint); font-size: 8px; }
.coordinate-badge { grid-column: 1 / -1; padding: 6px 8px; color: var(--paper); background: rgba(16,38,43,.78); border-left: 2px solid var(--orange); font-size: 9px; white-space: nowrap; }
.inventory-panel { position: absolute; inset: 0; z-index: 18; display: grid; place-items: center; padding: 24px; background: rgba(10, 25, 29, .76); backdrop-filter: blur(6px); }
.inventory-panel[hidden] { display: none; }
.inventory-window { width: min(820px, 94vw); min-height: min(490px, 78vh); padding: 22px; color: var(--paper); background: #17363b; border: 1px solid rgba(251,245,232,.25); box-shadow: 10px 10px 0 rgba(219,116,74,.72); }
.inventory-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.inventory-header .close-image-button { flex: none; margin-top: 28px; }
.inventory-header h2 { margin: 5px 0 0; font: 700 28px Georgia, serif; }
.inventory-layout { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(330px, 1.1fr); gap: 20px; }
.inventory-only-layout { grid-template-columns: 1fr; }.inventory-only-content { width: 100%; }.character-layout { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(270px, .75fr); gap: 20px; align-items: center; }.character-window { width: min(760px, 94vw); }.character-attributes-panel { min-height: 190px; margin: 0; padding: 18px; }.attribute-hint { margin: 15px 0 0; color: rgba(251,245,232,.62); font-size: 10px; line-height: 1.7; }
.equipment-board { position: relative; min-height: 380px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle at 50% 46%, rgba(183,230,219,.16), transparent 38%), #10262b; border: 1px solid rgba(183,230,219,.25); }
.equipment-silhouette { position: absolute; left: 50%; top: 42px; width: 136px; height: 282px; transform: translateX(-50%); opacity: .78; }
.silhouette-head { position: absolute; left: 43px; top: 0; width: 50px; height: 58px; border-radius: 50%; background: #020607; }
.silhouette-body { position: absolute; left: 25px; top: 45px; width: 86px; height: 145px; border-radius: 42% 42% 18% 18%; background: #020607; }
.silhouette-leg { position: absolute; top: 172px; width: 34px; height: 110px; border-radius: 0 0 12px 12px; background: #020607; }
.silhouette-leg.left { left: 30px; transform: rotate(3deg); }.silhouette-leg.right { right: 30px; transform: rotate(-3deg); }
.equipment-character-image { position: absolute; left: 50%; top: 54px; width: 126px; height: 270px; transform: translateX(-50%); object-fit: cover; object-position: 0 50%; mix-blend-mode: screen; filter: drop-shadow(0 5px 3px rgba(0,0,0,.35)); }
.equipment-slot { position: absolute; z-index: 2; width: 58px; height: 48px; padding: 0; color: var(--paper); background: rgba(16,38,43,.9); border: 1px solid rgba(242,175,110,.8); font-size: 10px; cursor: pointer; }
.slot-head { left: 12px; top: 34px; }.slot-wrist { right: 12px; top: 34px; }.slot-chest { left: 12px; top: 134px; }.slot-belt { right: 12px; top: 134px; }.slot-shoes { left: 12px; top: 234px; }.slot-pants { right: 12px; top: 234px; }.slot-weapon { left: 50%; top: 294px; transform: translateX(-50%); }.slot-ring-1 { left: 12px; top: 294px; }.slot-ring-2 { left: 12px; top: 346px; }.slot-ring-3 { right: 12px; top: 294px; }.slot-ring-4 { right: 12px; top: 346px; }
.inventory-equip-button { margin-top: 8px; padding: 6px 14px; color: var(--ink); background: var(--orange-light); border: 0; font-size: 11px; cursor: pointer; }.inventory-equip-button:disabled { opacity: .55; cursor: default; }
.inventory-capacity { display: block; margin-top: 4px; color: var(--mint); font-size: 11px; }.martial-window { max-width: 720px; }.martial-list { display: grid; gap: 12px; padding: 20px; }.martial-card { display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; padding: 16px; color: var(--paper); background: rgba(45,85,85,.42); border: 1px solid rgba(183,230,219,.24); }.martial-card strong { color: var(--orange-light); font-size: 17px; }.martial-card span { color: var(--mint); font-size: 12px; }.martial-card p { grid-column: 1 / -1; margin: 0; color: var(--paper); font-size: 13px; }.martial-upgrade { grid-column: 2; grid-row: 1 / span 2; align-self: center; min-width: 42px; height: 34px; border: 1px solid rgba(242,175,110,.7); background: #2d5555; color: var(--orange-light); border-radius: 6px; cursor: pointer; }.martial-upgrade:disabled { opacity: .45; cursor: not-allowed; }.task-empty { display: grid; gap: 12px; padding: 40px 24px; color: var(--mint); text-align: center; }.task-empty strong { color: var(--orange-light); font-size: 22px; }
.artifact-window { max-width: 520px; }.artifact-content { display: grid; justify-items: center; gap: 12px; padding: 26px; color: var(--paper); text-align: center; }.artifact-knife-image { width: 100px; height: 100px; object-fit: contain; image-rendering: pixelated; background: rgba(16,38,43,.45); border: 1px solid rgba(242,175,110,.35); }.artifact-content strong { color: var(--orange-light); font-size: 22px; }.artifact-content p { max-width: 360px; margin: 0; color: var(--mint); font-size: 13px; line-height: 1.5; }.primary-button { min-width: 64px; height: 38px; color: var(--ink); background: var(--orange-light); border: 0; font-size: 22px; cursor: pointer; }.primary-button:disabled { opacity: .45; cursor: not-allowed; }
.inventory-content { min-width: 0; padding: 12px; background: rgba(16,38,43,.6); border: 1px solid rgba(183,230,219,.2); }.inventory-currency { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; margin-bottom: 10px; padding: 4px 0 9px; border-bottom: 1px solid rgba(251,245,232,.16); }.inventory-currency .currency-row { min-width: 92px; padding: 4px 5px; background: rgba(251,245,232,.08); }.inventory-detail { min-height: 74px; margin-top: 10px; padding: 9px 11px; color: rgba(251,245,232,.78); background: rgba(251,245,232,.08); border: 1px solid rgba(183,230,219,.2); font-size: 10px; line-height: 1.6; }.inventory-detail strong, .inventory-detail span, .inventory-detail p { display: block; }.inventory-detail strong { color: var(--orange-light); font-size: 14px; }.inventory-detail span { color: var(--mint); }.inventory-detail p { margin: 3px 0 0; }
.inventory-tabs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 14px; }.inventory-tab { padding: 10px 5px; color: var(--paper); background: #2d5555; border: 1px solid rgba(183,230,219,.25); font-size: 11px; cursor: pointer; }.inventory-tab.active { color: var(--ink); background: var(--orange-light); }
.inventory-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; min-height: 148px; }.inventory-item { aspect-ratio: 1; display: grid; place-items: center; color: rgba(251,245,232,.42); background: rgba(118,145,138,.14); border: 1px solid rgba(183,230,219,.2); font-size: 24px; cursor: pointer; }.inventory-item:hover, .inventory-item.selected { border-color: var(--orange-light); background: rgba(242,175,110,.18); }.inventory-item small { color: rgba(251,245,232,.78); font-size: 9px; }.inventory-empty { grid-column: 1 / -1; display: grid; min-height: 120px; place-items: center; color: rgba(251,245,232,.52); border: 1px dashed rgba(183,230,219,.22); font-size: 11px; }.weapon-item { position: relative; overflow: hidden; padding: 5px; align-content: center; }.weapon-sprite { display: block; width: 100%; height: 68%; background-image: url('./assets/weapons/swords.png'); background-repeat: no-repeat; background-size: 1000% auto; background-position-y: center; }.weapon-item small { position: relative; z-index: 1; }.weapon-1 { background-position-x: 0%; }.weapon-2 { background-position-x: 11.111%; }.weapon-3 { background-position-x: 22.222%; }.weapon-4 { background-position-x: 33.333%; }.weapon-5 { background-position-x: 44.444%; }.weapon-6 { background-position-x: 55.555%; }.weapon-7 { background-position-x: 66.666%; }.weapon-8 { background-position-x: 77.777%; }.weapon-9 { background-position-x: 88.888%; }.weapon-10 { background-position-x: 100%; }
.tray-tip { text-shadow: 1px 1px 0 var(--ink); }
.key-hint { padding: 3px 5px; color: var(--paper); background: rgba(16, 38, 43, .55); font-style: normal; letter-spacing: .05em; }
.text-button { padding: 5px 7px; color: var(--paper); background: rgba(16, 38, 43, .55); font-size: 10px; pointer-events: auto; }

.character-attributes { margin-bottom: 10px; padding: 9px; background: rgba(242,175,110,.1); border: 1px solid rgba(242,175,110,.3); }.attribute-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; color: var(--orange-light); }.attribute-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px 12px; color: rgba(251,245,232,.76); font-size: 11px; }.attribute-grid b { float: right; color: var(--paper); }
.loading-screen, .modal-panel { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: #122b31; }
.loading-screen { color: var(--paper); text-align: center; transition: opacity .35s, visibility .35s; }
.loading-screen.loaded { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-mark { width: 52px; height: 52px; margin: 0 auto 18px; display: grid; place-items: center; border: 2px solid var(--orange); color: var(--paper); font: 700 16px Georgia, serif; letter-spacing: .15em; box-shadow: 5px 5px 0 var(--orange); }
.loading-screen h1 { margin: 8px 0; font: 700 clamp(32px, 7vw, 60px) Georgia, serif; letter-spacing: .06em; }
.loading-kicker { margin: 0; color: var(--mint); font-size: 10px; letter-spacing: .24em; }
#loading-status { min-height: 20px; margin: 20px 0 14px; color: rgba(251, 245, 232, .64); font-size: 11px; }
.loading-track { width: min(250px, 54vw); height: 4px; margin: 0 auto; background: rgba(251, 245, 232, .16); }
.loading-track span { display: block; width: 0; height: 100%; background: var(--orange-light); transition: width .25s; }
.modal-panel { background: rgba(18, 43, 49, .88); backdrop-filter: blur(7px); }
.modal-panel[hidden] { display: none; }
.modal-content { position: relative; width: min(300px, calc(100vw - 48px)); padding: 30px 26px; color: var(--paper); background: #17363b; border: 1px solid rgba(251, 245, 232, .2); box-shadow: 10px 10px 0 var(--orange); text-align: center; }
.modal-close-button { position: absolute; top: 52px; right: 12px; z-index: 2; }
.modal-content h2 { margin: 7px 0; font: 700 28px Georgia, serif; }
.modal-content p:not(.eyebrow) { color: rgba(251, 245, 232, .7); font-size: 12px; }
.primary-button { margin-top: 17px; padding: 10px 20px; border: 0; color: var(--paper); background: var(--orange); box-shadow: 4px 4px 0 rgba(0, 0, 0, .25); cursor: pointer; font-size: 12px; }

@media (max-width: 620px) {
  .hud-top { padding: 0 15px; }
  .mission-card { top: 76px; left: 15px; width: 190px; }
  .stat-chip { padding: 0 7px; }
  .run-stats { gap: 5px; }
  .brand-lockup small, .tray-tip { display: none; }
  .status-panel { left: 15px; right: auto; width: 52px; }
  .bottom-tray { right: 15px; }
  .menu-anchor { right: 15px; bottom: 15px; }.menu-button { width: 56px; height: 56px; }.menu-panel { bottom: 66px; width: min(270px, calc(100vw - 30px)); }
  .gender-grid, .map-grid, .lounge-body { grid-template-columns: 1fr; }
  .world-map-heading { top: 9px; left: 14px; max-width: 220px; }.world-map-heading h1 { font-size: 20px; }.world-map-heading .flow-copy { font-size: 9px; }
  .gender-art { height: 155px; }
  .lounge-body { gap: 16px; }
  .lounge-character { min-height: 205px; }
  .lounge-character img { height: 210px; }
  .inventory-panel { padding: 12px; place-items: stretch; overflow: auto; }.inventory-window { width: auto; min-height: 0; padding: 15px; }.inventory-layout, .character-layout { grid-template-columns: 1fr; }.equipment-board { min-height: 380px; }.equipment-character-image { height: 230px; }.equipment-silhouette { top: 30px; transform: translateX(-50%) scale(.86); transform-origin: top center; }.character-attributes-panel { min-height: 0; }.character-avatar-button { right: 15px; transform: scale(.9); transform-origin: top right; }
  .lounge-world-panel { top: 76px; right: 15px; width: min(260px, calc(100vw - 30px)); }
  .chat-panel { width: calc(100vw - 30px); height: 240px; }
  .chat-messages { height: 160px; }
}

@media (max-height: 650px) {
  .mission-card { top: 75px; transform: scale(.9); transform-origin: top left; }
  .status-panel { bottom: 45px; transform: scale(.9); transform-origin: bottom left; }
}
