:root {
  font-family: "Segoe UI", Tahoma, sans-serif;
  color: #f1ead8;
  background: #10171a;
  font-synthesis: none;
  --panel: #17252adf;
  --panel-deep: #101b20ef;
  --edge: #d9c99a78;
  --gold: #e7cb8c;
  --muted: #b2baa9;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 50% 0, #344443 0, #162127 48%, #10171a 100%); }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
[hidden] { display: none !important; }
.shell { display: flex; flex-direction: column; min-height: 100dvh; max-width: 1600px; margin: auto; padding: 0 24px; }
.topbar { position: relative; z-index: 50; display: flex; align-items: center; justify-content: space-between; height: 54px; min-height: 54px; border-bottom: 1px solid #d6bd8540; }
.brand, .top-actions { display: flex; align-items: center; gap: 10px; }
.brand-mark { display: grid; place-items: center; width: 35px; height: 35px; border: 1px solid #ffe1a0a8; border-radius: 4px; background: linear-gradient(145deg, #bd945b, #715735); box-shadow: inset 0 1px #fff8, 0 3px 9px #0008; color: #2b2921; font: bold 23px Georgia, serif; }
.brand strong { display: block; color: #f9eac3; font: 700 17px Georgia, serif; letter-spacing: .03em; }
.brand small { display: block; margin-top: 1px; color: #bea979; font-size: 9px; letter-spacing: .16em; }
.status { color: #d4d5c7; font-size: 11px; }
.status::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #a69676; }
.status.online::before { background: #8bdfad; box-shadow: 0 0 9px #75e19a; }
.status.busy::before { background: #f1c277; }
.top-button { padding: 7px 11px; border: 1px solid #d2bf9070; border-radius: 4px; background: #293633; color: #f5e9d1; font-size: 11px; }
.top-button:hover { border-color: #f5dfaa; background: #3c4b44; }
.top-button kbd { margin-left: 4px; color: #c4c9b9; font-size: 9px; }
.notice { position: relative; z-index: 60; margin: 8px 0 0; padding: 9px 13px; border: 1px solid #dd766f; border-radius: 4px; background: #542b2de8; color: #fff0e8; font-size: 12px; }
.notice a { color: #fff1c3; }
.item-toasts { position: absolute; bottom: 118px; left: 50%; z-index: 55; display: flex; flex-direction: column; align-items: center; gap: 4px; transform: translateX(-50%); pointer-events: none; }
body:not([data-phase="game"]) .item-toasts { display: none; }
.item-toast { display: flex; align-items: center; gap: 7px; padding: 4px 11px 4px 5px; border: 1px solid #cdbb8a8c; border-radius: 4px; background: #14262ae6; color: #fff0c8; font-size: 12px; animation: item-toast-in .18s ease-out; transition: opacity .4s; }
.item-toast img { width: 24px; height: 24px; image-rendering: pixelated; }
.item-toast.leaving { opacity: 0; }
@keyframes item-toast-in { from { opacity: 0; transform: translateY(6px); } }
.notice.warning { border-color: #e7bd6b; background: #4b3b22ec; }
.notice.success { border-color: #90cda5; background: #294734ec; }
.screen { flex: 1; }
.window { overflow: hidden; border: 1px solid var(--edge); border-radius: 6px; background: var(--panel); box-shadow: 0 12px 34px #08100ec2, inset 0 1px #ffffff24; backdrop-filter: blur(9px); }
.window-title { display: flex; align-items: center; justify-content: space-between; min-height: 33px; padding: 7px 11px; border-bottom: 1px solid #d5c38956; background: linear-gradient(#5c6655ec, #3a4a44e8); color: #fff0c8; font: 700 11px "Segoe UI", sans-serif; letter-spacing: .09em; }
.window-title button { display: grid; place-items: center; width: 21px; height: 21px; padding: 0; border: 1px solid #d8cb9a78; border-radius: 3px; background: #273630b8; color: #fff0ce; font-size: 16px; line-height: 1; }
.window-title button:hover { background: #617058; }
.window-body { padding: 23px; }
.window-body label { display: block; margin-bottom: 17px; color: #e1d7bb; font-size: 12px; }
.window-body input { display: block; width: 100%; height: 42px; margin-top: 7px; padding: 0 11px; border: 1px solid #a99b747a; border-radius: 3px; outline: none; background: #101d20; color: #fff6dd; }
.window-body input:focus, .chat-form input:focus { border-color: #ffe4a4; box-shadow: 0 0 0 2px #edce7e31; }
.primary { display: flex; justify-content: space-between; width: 100%; padding: 12px 15px; border: 1px solid #ffe5a5; border-radius: 3px; background: linear-gradient(#bd995e, #8e693f); color: #fff9e8; font-weight: 700; }
.primary:hover { filter: brightness(1.12); }
.hint, .panel-hint { color: #bac0ae; font-size: 11px; line-height: 1.5; }
.window-foot { display: flex; justify-content: space-between; padding: 10px 13px; border-top: 1px solid #ffffff1b; color: #adb5a4; font-size: 10px; }
.window-foot b { color: #e7d2a6; }
.login-screen { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: center; gap: 50px; width: 100%; max-width: 1050px; margin: auto; padding: 70px 0; }
.login-art { text-align: center; }
.crest { display: grid; place-items: center; width: 126px; height: 126px; margin: 0 auto 32px; border: 5px solid #cba56b; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #f8db9d, #8c673e); box-shadow: 0 12px 38px #0008, inset 0 0 0 4px #47321a99; color: #483018; font: 70px Georgia, serif; }
.login-art p, .eyebrow { color: #dbbd78; font-size: 11px; font-weight: 700; letter-spacing: .27em; }
.login-art h1, .section-head h1 { margin: 14px 0; color: #f9edcd; font: normal 50px Georgia, serif; }
.gold-rule { display: block; width: 105px; height: 2px; margin: 25px auto; background: linear-gradient(90deg, transparent, #e7bd74, transparent); }
.login-art small, .section-head p { color: #b9c1b1; }
.characters-screen { width: 100%; max-width: 1120px; margin: auto; padding: 60px 0; }
.section-head { margin-bottom: 38px; text-align: center; }
.section-head h1 { font-size: 38px; }
.section-head p { font-size: 13px; }
.character-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.character { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 132px; padding: 18px; border: 1px solid #d5c38976; border-radius: 6px; background: linear-gradient(125deg, #364c47, #1a2b2c); box-shadow: 0 10px 27px #0006; color: #f4e7cc; text-align: left; transition: transform .15s, border-color .15s; }
.character:hover { transform: translateY(-3px); border-color: #ffe3a5; }
.character-avatar { display: grid; place-items: center; flex: none; width: 70px; height: 70px; border: 2px solid #c9a467; border-radius: 50%; background: #554b37; color: #f8e2aa; font: 39px Georgia, serif; }
.character-meta b { display: block; font: 21px Georgia, serif; }
.character-meta small { display: block; margin-top: 8px; color: #b7c1b2; font-size: 11px; line-height: 1.5; }
.selection-foot { margin-top: 24px; color: #a9b1a2; font-size: 11px; text-align: center; }
.selection-foot span { color: #e6cf9d; }
.secondary-action { display: block; width: 100%; margin-top: 10px; padding: 9px; border: 1px solid #ae9b6b88; border-radius: 3px; background: #17292a; color: #ead8ad; }
.secondary-action:hover { background: #30443e; }
.window-body select { display: block; width: 100%; height: 42px; margin-top: 7px; padding: 0 10px; border: 1px solid #a99b747a; border-radius: 3px; background: #101d20; color: #fff6dd; }
body[data-phase="characters"], body[data-phase="create"] { background: radial-gradient(circle at 12% 18%, #3a898a 0, transparent 38%), radial-gradient(circle at 84% 12%, #a7789f 0, transparent 35%), linear-gradient(155deg, #27434b, #253245 64%, #1b4147); }
.characters-screen { max-width: 1350px; padding: 30px 0 20px; }
.characters-screen .section-head { margin-bottom: 22px; }
.characters-screen .section-head h1 { margin: 7px 0; font-size: 34px; }
.selection-layout { display: grid; grid-template-columns: minmax(0, 1fr) 272px; gap: 18px; align-items: start; }
.character-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 145px)); justify-content: space-between; align-content: start; gap: 12px 8px; }
.character { display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 4px; min-width: 0; min-height: 0; aspect-ratio: 1; padding: 6px; border: 2px solid #d9e2f7; border-radius: 6px; background: #f8faff; color: #273958; text-align: center; box-shadow: 0 6px 14px #0b203d5a; }
.character:hover, .character.active { border-color: #63d6d8; background: #f3faff; box-shadow: 0 0 0 2px #ffffffab, 0 7px 18px #0b203d7a; }
.character:focus-visible { outline: 2px solid #ffe3a5; outline-offset: 2px; }
.character.empty { border-style: solid; background: #e8ebf5; }
.character-avatar { width: 100%; height: calc(100% - 42px); overflow: hidden; border: 0; border-radius: 4px; background: #ecedf5; color: #9facc9; font: 40px Georgia, serif; }
.character-avatar img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.character-meta { min-width: 0; width: 100%; }
.character-meta b { display: block; overflow: hidden; color: #273958; font: 700 11px "Segoe UI", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.character-meta small { display: block; overflow: hidden; margin-top: 2px; color: #6d7f9f; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.character-showcase { display: flex; flex-direction: column; min-height: 550px; border-color: #c7d4ee; background: #f7f9ff; color: #263a60; }
.showcase-brand { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 66px; border-bottom: 1px solid #d6dfef; color: #486a9a; font: italic 700 27px Georgia, serif; text-shadow: 1px 2px #dce9f9; }
.showcase-brand .brand-mark { width: 30px; height: 30px; font-size: 18px; }
.showcase-details { padding: 12px 12px 0; }
.showcase-details .eyebrow { color: #6c82ac; font-size: 9px; }
.showcase-details h2 { margin: 5px 0 2px; overflow-wrap: anywhere; color: #2d4b75; font: 700 18px Georgia, serif; }
.showcase-details p { margin: 0; color: #5d7296; font-size: 11px; }
.selection-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 12px 0 0; border: 1px solid #d7deed; border-radius: 4px; overflow: hidden; }
.selection-facts div { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; padding: 5px 6px; border-bottom: 1px solid #d7deed; background: #edf1fa; }
.selection-facts div:nth-child(4n + 3), .selection-facts div:nth-child(4n + 4) { background: #f7f9fe; }
.selection-facts small { color: #59709c; font-size: 9px; font-weight: 700; text-transform: uppercase; }
.selection-facts strong { overflow: hidden; color: #263a60; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.preview-stage, .creation-preview-stage { position: relative; display: grid; place-items: center; min-width: 0; overflow: hidden; }
.preview-stage { flex: 1; min-height: 240px; margin: 10px 10px 0; border: 1px solid #e0e7f4; border-radius: 6px; background: radial-gradient(ellipse at 50% 70%, #d1eaf2, #edf2fc 62%, #f8faff); }
.preview-stage::after, .creation-preview-stage::after { content: ""; position: absolute; right: 16%; bottom: 22px; left: 16%; height: 19px; border-radius: 50%; background: #667c9c51; filter: blur(9px); pointer-events: none; }
.preview-stage canvas, .creation-preview-stage canvas { position: relative; z-index: 1; display: block; width: 100%; max-width: 320px; height: auto; image-rendering: pixelated; }
.preview-fallback { position: absolute; color: #6380a3; font-size: 12px; }
.showcase-actions { padding: 10px; }
.showcase-actions .primary { justify-content: center; gap: 8px; }
.create-screen { display: grid; place-items: center; padding: 30px 0; }
.creation-shell { width: min(940px, 100%); border-color: #c7d4ee; background: #f8faff; color: #263a60; }
.creation-shell > .window-title { min-height: 40px; padding: 8px 14px; background: linear-gradient(#e6edfc, #cad8f0); color: #365078; }
.creation-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 520px; }
.creation-character { display: flex; flex-direction: column; align-items: center; min-width: 0; padding: 20px 25px; background: radial-gradient(circle at 50% 58%, #d5edf0, #e7edf8 60%, #f9fbff); }
.creation-step { display: flex; align-items: center; gap: 9px; width: 100%; color: #365078; }
.creation-step span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #b8cae7; color: #28456f; font-size: 11px; font-weight: 800; }
.creation-step strong { font: 700 18px Georgia, serif; }
.creation-gender { display: flex; gap: 8px; margin: 18px 0 0; }
.creation-gender label { padding: 7px 15px; border: 1px solid #b7c8e2; border-radius: 4px; background: #f7f9ff; color: #3a5680; font-size: 11px; cursor: pointer; }
.creation-gender label:has(input:checked) { border-color: #4b9eb8; background: #d6eef1; font-weight: 700; }
.creation-gender input { accent-color: #4b9eb8; }
.creation-preview-stage { flex: 1; width: min(100%, 360px); min-height: 270px; }
.creation-preview-stage::after { bottom: 25px; }
.creation-name { display: block; width: min(100%, 330px); color: #365078; font-size: 11px; font-weight: 700; }
.creation-name input { display: block; width: 100%; height: 39px; margin-top: 5px; padding: 0 10px; border: 1px solid #9cb3d5; border-radius: 4px; background: #fff; color: #263a60; }
.creation-slot { margin: 8px 0 0; color: #667da0; font-size: 10px; }
.creation-customize { display: flex; flex-direction: column; gap: 10px; padding: 20px; border-left: 1px solid #cfdbeb; background: #f7f9ff; }
.creation-customize p { margin: 0; color: #617697; font-size: 11px; line-height: 1.4; }
.creation-customize fieldset { margin: 0; padding: 0; border: 0; }
.creation-customize legend { margin-bottom: 7px; color: #365078; font-size: 11px; font-weight: 700; }
.creation-customize select { width: 100%; margin: 6px 0 8px; padding: 9px; border: 1px solid #bacbe2; border-radius: 5px; background: white; color: #263a60; font: inherit; }
.hair-style-choices { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; max-height: 244px; overflow-y: auto; padding: 2px; }
.hair-style-choices button { display: grid; place-items: center; aspect-ratio: 1; min-width: 0; padding: 1px; border: 1px solid #c3cee3; border-radius: 4px; background: #fff; color: #526b91; font-size: 10px; }
.hair-style-choices button[aria-pressed="true"], .hair-color-choices button[aria-pressed="true"] { border-color: #42a4b6; box-shadow: 0 0 0 2px #75d2da9c; }
.hair-style-choices img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.hair-color-choices { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; }
.hair-color-choices button { height: 27px; padding: 0; border: 1px solid #b9c9df; border-radius: 4px; }
.creation-actions { margin-top: auto; }
.creation-actions .primary { justify-content: center; gap: 8px; }
.creation-actions .secondary-action { color: #365078; background: #e5ecf8; }
@media (max-width: 980px) { .selection-layout { grid-template-columns: minmax(0, 1fr) 250px; } .character-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 720px) { .selection-layout { grid-template-columns: 1fr; } .character-grid { grid-template-columns: repeat(3, minmax(0, 145px)); } .character-showcase { min-height: 0; } .creation-layout { grid-template-columns: 1fr; } .creation-customize { border-left: 0; border-top: 1px solid #cfdbeb; } }
@media (max-width: 480px) { .characters-screen { padding: 22px 0; } .characters-screen .section-head h1 { font-size: 29px; } .character-grid { grid-template-columns: repeat(2, minmax(0, 145px)); } .creation-character, .creation-customize { padding: 16px; } }
footer { padding: 12px 0; color: #9ba697; font-size: 10px; text-align: center; }

/* In game: the map fills the window and interface panels float over it. */
body[data-phase="game"] { overflow: hidden; }
body[data-phase="game"] .shell { width: 100%; height: 100dvh; max-width: none; min-height: 0; padding: 0; }
body[data-phase="game"] .topbar { height: 43px; min-height: 43px; padding: 0 17px; background: #122024f4; }
body[data-phase="game"] .brand-mark { width: 28px; height: 28px; font-size: 18px; }
body[data-phase="game"] .brand strong { font-size: 14px; }
body[data-phase="game"] .brand small { display: none; }
body[data-phase="game"] footer { display: none; }
body[data-phase="game"] .notice { position: absolute; top: 51px; left: 50%; z-index: 60; max-width: 70vw; margin: 0; transform: translateX(-50%); }
.game-screen { position: relative; flex: 1; min-height: 0; overflow: hidden; isolation: isolate; }
.world-stage { position: absolute; inset: 0; overflow: hidden; background: #28372f; }
.world-stage > #game { display: block; width: 100%; height: 100%; image-rendering: pixelated; cursor: crosshair; }
.world3d { position: absolute; inset: 0; }
.world3d.is-2d { pointer-events: none; }
.world3d canvas { image-rendering: auto; cursor: crosshair; }
.world3d .damage-overlay { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.entity-loading-layer { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.entity-loading-avatar { position: absolute; width: 52px; height: 68px; border: 1px solid #c6d1ce42; border-radius: 8px; background: linear-gradient(#18242caa, #08141dbb); box-shadow: 0 5px 14px #0009, inset 0 0 12px #0006; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transform: translate(-50%, -100%); pointer-events: none; user-select: none; }
.entity-loading-avatar::after { content: ''; position: absolute; inset: 3px; background-position: center; background-repeat: no-repeat; background-size: contain; opacity: .72; filter: drop-shadow(0 0 2px currentColor); animation: entity-loading-pulse 1.5s ease-in-out infinite; }
.entity-loading-avatar--player { color: #69c9e5; }
.entity-loading-avatar--player::after { background-image: url('/assets/loading-player.png'); }
.entity-loading-avatar--mob { color: #e18b79; width: 56px; height: 64px; }
.entity-loading-avatar--mob::after { background-image: url('/assets/loading-mob.png'); }
.entity-loading-avatar--npc { color: #d7b978; }
.entity-loading-avatar--npc::after { background-image: url('/assets/loading-npc.png'); }
.entity-loading-layer--2d .entity-loading-avatar { width: 44px; height: 58px; }
.entity-loading-layer--2d .entity-loading-avatar--mob { width: 46px; height: 56px; }
@keyframes entity-loading-pulse { 50% { opacity: .92; filter: drop-shadow(0 0 4px currentColor); } }
.entity-loading-avatar.npc-nearby { filter: drop-shadow(0 0 3px #ffdb6080); }
.world-loading { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 40%, #2b413c, #101b20 65%, #080f13); color: #fff0c9; text-align: center; }
.world-loading-content { display: flex; flex-direction: column; align-items: center; width: min(100%, 400px); }
.world-loading-mark { display: grid; place-items: center; width: 70px; height: 70px; margin-bottom: 30px; border: 1px solid #e7cb8c9c; border-radius: 12px; background: linear-gradient(145deg, #b58a52, #5c4831); box-shadow: 0 12px 35px #0008; color: #182522; font: bold 43px Georgia, serif; }
.world-loading-progress { width: 100%; height: 12px; overflow: hidden; border: 1px solid #e7cb8c8c; border-radius: 999px; background: #071115; box-shadow: inset 0 2px 5px #0008; }
.world-loading-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ad834c, #f1d89e); transition: width .18s ease-out; }
.world-loading-percent { margin-top: 10px; color: #f1d89e; font-size: 16px; font-variant-numeric: tabular-nums; }
.world-loading p { margin: 12px 0 0; color: #c8c7b4; font-size: 13px; line-height: 1.5; }
.world-loading-detail { overflow-wrap: anywhere; }
.world-loading button { margin-top: 16px; }
.world-loading.is-error .world-loading-progress, .world-loading.is-error .world-loading-percent { display: none; }
body[data-map-loading="true"] .shell { visibility: hidden; }
body[data-map-loading="true"] #skillTooltip { display: none; }
.world-vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, transparent 45%, #07111476 100%), linear-gradient(#0b171a3d, transparent 23%, transparent 78%, #08121670); }
.map-toast { position: absolute; top: 20px; left: 50%; max-width: 75%; padding: 8px 13px; transform: translateX(-50%); border: 1px solid #f0d292; border-radius: 4px; background: #172825e8; box-shadow: 0 7px 18px #0009; color: #fff0bb; font-size: 12px; text-align: center; }
.hud, .action-dock, .minimap-window, .town-npc-window, .target-window, .chat-window, .hotbar-window, .floating-window, .debug-panel { position: absolute; z-index: 3; }
.hud { top: 16px; left: 18px; display: grid; grid-template-columns: 66px minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0 6px; width: 370px; min-height: 94px; padding: 4px 7px 5px 4px; overflow: visible; border: 1px solid #dcbd87aa; border-radius: 8px 12px 15px 8px; background: linear-gradient(110deg, #27383df5, #111c28f0 70%); box-shadow: 0 12px 32px #050c16b8, inset 0 1px #fff4ce31, inset 4px 0 #c59156; }
.hud::after { content: ""; position: absolute; right: -1px; bottom: -1px; width: 22px; height: 16px; border-right: 1px solid #dcbd87aa; border-bottom: 1px solid #dcbd87aa; border-radius: 0 0 14px 0; transform: skewX(-25deg); pointer-events: none; }
.hud-identity { position: relative; grid-column: 2; grid-row: 1; display: grid; gap: 1px; min-width: 0; margin: 0 0 2px; padding: 0 1px 2px; border-bottom: 1px solid #d8b78077; }
.hud-name { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.hud-name strong { overflow: hidden; color: #fff0c6; font-size: 12px; font-weight: 800; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.hud-class { overflow: hidden; color: #c9bfa7; font-size: 8px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.hud-progress { display: flex; align-items: center; gap: 6px; min-width: 0; color: #e9d1a1; font-size: 8px; font-weight: 700; line-height: 10px; white-space: nowrap; }
.exp-summary { display: flex; justify-content: space-between; gap: 5px; overflow: hidden; color: #bac9c9; font-size: 7px; line-height: 9px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hud-exp-track { display: block; flex: 1; height: 5px; overflow: hidden; border: 1px solid #0a151e; border-radius: 4px; background: #172b32; }
.hud-exp-track i { display: block; width: 0; height: 100%; background: linear-gradient(90deg, #a57943, #f0ce8b); box-shadow: 0 0 7px #e2b978; transition: width .2s ease; }
.hud-main { display: contents; }
.portrait { position: relative; display: grid; place-items: center; flex: none; width: 90px; height: 81px; overflow: hidden; border: 2px solid #d8ad69; border-radius: 6px 15px 6px 6px; background: radial-gradient(circle at 45% 28%, #687b7a, #314349 57%, #16232c); box-shadow: inset 0 0 0 3px #101e27, 0 2px 8px #0009; color: #ffe4ab; font: 38px Georgia, serif; }
.portrait img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 3px 2px #000a); }
.hud .portrait { z-index: 2; grid-column: 1; grid-row: 1 / span 2; align-self: stretch; width: 66px; height: auto; min-height: 82px; margin: -1px 0 -2px -1px; border: 2px solid #d8ad69; border-radius: 7px 5px 15px 7px; background: radial-gradient(circle at 48% 28%, #687b7a, #314349 57%, #16232c); box-shadow: inset 0 0 0 2px #101e27, 0 3px 9px #000b; clip-path: polygon(13% 0, 100% 0, 100% 77%, 72% 100%, 0 100%, 0 41%); }
.hud .portrait img { object-fit: cover; object-position: center 27%; }
.hud-info { grid-column: 2; grid-row: 2; display: grid; align-content: center; gap: 2px; min-width: 0; }
.meter { display: grid; grid-template-columns: 22px minmax(0, 1fr) 78px; align-items: center; gap: 6px; margin: 6px 0; color: #fff0d5; font-size: 10px; font-weight: 700; }
.meter > div { height: 14px; overflow: hidden; border: 1px solid #050d14; border-radius: 3px; background: #0b1922; box-shadow: inset 0 2px 4px #000b, 0 1px #ffffff22; }
.meter i { display: block; width: 0; height: 100%; background: linear-gradient(#ffaa8c 0%, #e45b5a 40%, #a72e43 100%); box-shadow: inset 0 1px #fff7d99c; transition: width .18s ease; }
.meter.sp i { background: linear-gradient(#a1e8f5 0%, #4aa8d9 40%, #2e628f 100%); }
.meter.ap i { background: linear-gradient(#fff5ac 0%, #edbb59 42%, #b27b32 100%); }
.meter.unknown > div { background: repeating-linear-gradient(110deg, #172630 0 7px, #22343d 7px 14px); }
.meter b { overflow: hidden; color: #e6e8e4; font-size: 9px; font-weight: 500; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hud .meter { grid-template-columns: 19px minmax(0, 1fr) 68px; gap: 4px; min-height: 13px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: #fff0d5; font-size: 8px; font-style: normal; }
.hud .meter > div { height: 10px; border-color: #050d14; border-radius: 3px; background: #0b1922; box-shadow: inset 0 2px 4px #000b, 0 1px #ffffff22; }
.hud .meter b { color: #e6e8e4; font-size: 8px; font-weight: 500; }
.action-dock { top: 122px; left: 18px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; width: 320px; padding: 7px; }
.action-dock button { display: grid; place-items: center; min-width: 0; height: 50px; padding: 3px; border: 1px solid #d7c38b74; border-radius: 4px; background: linear-gradient(#4e6355d6, #263c38e3); color: #fff0c3; }
.action-dock button:hover { border-color: #ffe7ad; background: #567263; }
.action-dock button span { font: 22px Georgia, serif; line-height: 1; }
.action-dock button small { color: #e0ddc4; font-size: 9px; }
.action-dock button { position: relative; }
.action-dock button kbd { position: absolute; top: 2px; right: 3px; color: #c9b98e; font: 8px "Segoe UI", sans-serif; opacity: 0.85; }
.minimap-window { top: 16px; right: 18px; width: 222px; }
.minimap-window .window-title { gap: 8px; }
.minimap-window .window-title b { margin-left: 5px; color: #fff8e4; font-weight: 600; letter-spacing: 0; text-transform: none; }
.corner-glyph { color: #fff0b9; }
.minimap-frame { position: relative; margin: 8px auto; width: 186px; height: 186px; overflow: hidden; border: 1px solid #e2d3a3; background: #34483b; box-shadow: inset 0 0 15px #000a; }
.minimap-frame canvas { width: 184px; height: 184px; image-rendering: pixelated; }
.minimap-compass { position: absolute; top: 4px; right: 5px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #182729d9; color: #ffecbc; font: 10px Georgia, serif; }
.minimap-foot { display: flex; justify-content: space-between; gap: 5px; padding: 5px 9px 8px; color: #d0d2b7; font: 9px Consolas, monospace; }
.town-npc-window { top: 295px; right: 18px; width: 222px; max-height: min(36vh, 330px); overflow: hidden; }
.town-npc-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; max-height: min(36vh, 300px); overflow-y: auto; padding: 8px; }
.town-npc-button { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; padding: 4px; border: 1px solid #776b4e; border-radius: 5px; background: #1b302d; color: #f2e7c7; cursor: pointer; }
.town-npc-button:hover, .town-npc-button:focus-visible { border-color: #e8c778; background: #2c4841; }
.town-npc-button img { width: 68px; height: 66px; object-fit: cover; object-position: center 28%; image-rendering: pixelated; }
.town-npc-button span { display: block; width: 100%; overflow: hidden; font-size: 10px; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.minimap-foot span:last-child { max-width: 95px; overflow: hidden; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.target-window { top: 16px; left: 50%; display: flex; align-items: center; gap: 10px; width: min(370px, calc(100% - 36px)); min-height: 100px; padding: 9px 10px; transform: translateX(-50%); border-color: #dcbd87aa; background: linear-gradient(110deg, #27383df5, #111c28f0 70%); box-shadow: 0 12px 32px #050c16b8, inset 0 1px #fff4ce31, inset -4px 0 #c59156; }
.target-portrait { width: 76px; height: 78px; border-color: #dfab70; }
.target-info { flex: 1; min-width: 0; color: #d0d4c2; }
.target-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 3px; color: #e6bd84; font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.target-heading button { width: 19px; height: 19px; padding: 0; border: 1px solid #d7ba8c77; border-radius: 3px; background: #1b2c34; color: #fff0ce; font-size: 15px; line-height: 1; }
.target-heading button:hover { border-color: #fff1ce; background: #43555a; }
.target-info strong { display: block; overflow: hidden; color: #fff0c6; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.target-info > span { display: block; overflow: hidden; margin-top: 2px; color: #b8c9cd; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.target-hp { margin: 9px 0 0; }
@media (min-width: 1211px) {
  body[data-phase="game"]:has(.target-window:not([hidden])) .notice { top: 129px; }
  .game-screen:has(.target-window:not([hidden])) .map-toast { top: 125px; }
}
.chat-window { bottom: 105px; left: 18px; width: clamp(340px, 35vw, 500px); }
.chat-header { display: flex; align-items: center; gap: 14px; min-height: 32px; padding: 0 10px; border-bottom: 1px solid #d5c38955; background: linear-gradient(#5c6655ed, #3a4a44e8); color: #fff0c8; }
.chat-header.drag-handle, .hotbar-heading.drag-handle { cursor: grab; touch-action: none; user-select: none; }
.chat-header.drag-handle:active, .hotbar-heading.drag-handle:active { cursor: grabbing; }
.chat-header strong { font-size: 10px; letter-spacing: .14em; }
.chat-tabs { display: flex; align-self: stretch; gap: 2px; }
.chat-tabs button { padding: 0 8px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #c8d0b8; font-size: 10px; }
.chat-tabs button.active { border-color: #ffe0a4; color: #fff4d7; }
.chat-tabs button:hover { color: #fff4d7; }
.chat-header-mark { margin-left: auto; color: #a4dbb3; font-size: 10px; }
.chat-log { height: 143px; overflow-y: auto; padding: 8px 10px; background: #0a1619b8; font-size: 11px; line-height: 1.4; }
.chat-line { display: flex; gap: 7px; margin: 2px 0; color: #eee8d9; overflow-wrap: anywhere; }
.chat-time { flex: none; color: #a6b1a8; font: 9px Consolas, monospace; }
.chat-line .chat-sender { color: #f4d492; font-weight: 700; }
.chat-line.system { color: #afdfb4; }
.chat-line.command { color: #e8c377; }
.chat-line.whisper { color: #dcc6fa; }
.chat-line.party { color: #b2d9f7; }
.chat-line.guild { color: #bbefd2; }
.chat-line.broadcast { color: #ffe694; }
.chat-form { display: flex; gap: 4px; padding: 6px; border-top: 1px solid #a9ab8d61; background: #243531e8; }
.chat-form select, .chat-form input { min-width: 0; height: 28px; padding: 4px 6px; border: 1px solid #b4aa827c; border-radius: 3px; outline: none; background: #101d20; color: #f5ecd6; font-size: 10px; }
.chat-form select { width: 71px; flex: none; }
.chat-form input[name="target"] { width: 110px; flex: none; }
.chat-form input[name="message"] { flex: 1; }
.chat-form button { width: 31px; flex: none; border: 1px solid #f0d18b; border-radius: 3px; background: linear-gradient(#b6975b, #6d613f); color: #fff4d6; }
.hotbar-window { --hotkey-size: clamp(29px, 3vw, 36px); bottom: 12px; left: 50%; width: max-content; max-width: calc(100vw - 12px); transform: translateX(-50%); background: #14231fc9; box-shadow: 0 4px 14px #06100c7a; backdrop-filter: blur(5px); }
.hotbar-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 3px 6px 1px; color: #c9d1bd; font-size: 8px; letter-spacing: .08em; }
.hotbar-controls { display: flex; align-items: center; gap: 3px; letter-spacing: 0; }
.hotbar-controls button { width: 18px; height: 17px; padding: 0; border: 0; border-radius: 2px; background: #d3d9c01b; color: #e6e7d0; font-size: 12px; line-height: 1; }
.hotbar-controls button:hover { background: #d3d9c04d; }
.hotbar-controls button:disabled { opacity: .3; cursor: default; }
.hotbar { display: flex; flex-direction: column; gap: 3px; padding: 3px 5px 5px; }
.hotbar-row { display: grid; grid-template-columns: 14px repeat(9, var(--hotkey-size)); align-items: center; gap: 3px; }
.hotbar-row-label { color: #bdc9b7; font: 9px Consolas, monospace; text-align: center; }
.hotkey { position: relative; display: grid; place-items: center; width: var(--hotkey-size); height: var(--hotkey-size); min-width: 0; padding: 0; overflow: hidden; border: 1px solid #bbc9aa6e; border-radius: 3px; background: #31413cc9; color: #fff0d0; }
.hotkey:hover { border-color: #fff0bd; background: #526453; }
.hotkey.missing-item { opacity: .5; }
/* Recarga: setor escuro que diminui no sentido horário e segundos restantes no centro. */
.cooling { position: relative; }
.cooling::after { content: attr(data-cooldown); position: absolute; inset: 0; display: grid; place-items: center; border-radius: inherit; background: conic-gradient(#000000b8 calc(var(--cooldown, 0) * 360deg), #00000040 0); color: #fff6dc; font: 700 12px/1 system-ui, sans-serif; text-shadow: 0 1px 2px #000; pointer-events: none; }
.skill-icon { position: relative; overflow: hidden; }
.skill-icon.cooling::after { font-size: 10px; }
.hotkey .number { position: absolute; top: 1px; left: 2px; z-index: 1; max-width: calc(100% - 3px); overflow: hidden; color: #fff4d0; font: 7px/1 Consolas, monospace; text-shadow: 0 1px 2px #000; text-overflow: ellipsis; white-space: nowrap; }
.hotkey .glyph { display: grid; place-items: center; font: 19px Georgia, serif; }
.hotkey .hotbar-skill-icon { display: grid; place-items: center; }
.hotkey .hotbar-amount { position: absolute; right: 1px; bottom: 0; z-index: 1; color: #fff; font: 700 9px/1 Consolas, monospace; text-shadow: 0 1px 2px #000; }
.hotbar-window p { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.hotbar-settings-backdrop { position: absolute; inset: 0; z-index: 70; display: grid; place-items: center; background: #07100db3; }
.hotbar-settings { width: min(420px, calc(100vw - 24px)); max-height: min(680px, calc(100dvh - 32px)); display: flex; flex-direction: column; }
.hotbar-settings .window-title button { margin-left: auto; }
.hotbar-settings > p { margin: 0; padding: 10px 12px; color: #cbd3c3; font-size: 11px; line-height: 1.4; }
.hotbar-settings-tabs { display: flex; gap: 4px; padding: 0 12px 8px; border-bottom: 1px solid #d5c38936; }
.hotbar-settings-tabs button { flex: 1; padding: 7px 4px; border: 1px solid #aab79b68; border-radius: 3px; background: #25372f; color: #cbd5c7; font-size: 11px; }
.hotbar-settings-tabs button.inactive-bar { border-style: dashed; color: #aeb9a9; }
.hotbar-settings-tabs button[aria-selected="true"] { border-color: #e6cb92; background: #52614a; color: #fff2d0; }
.hotbar-bindings { overflow-y: auto; padding: 0 12px 12px; }
.hotbar-binding-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; border-top: 1px solid #d5c38922; color: #d7dfd1; font-size: 11px; }
.hotbar-binding-row button { min-width: 110px; padding: 4px 8px; border: 1px solid #aab79b68; border-radius: 3px; background: #25372f; color: #f9edca; font: 11px Consolas, monospace; }
.hotbar-binding-row button.capturing { border-color: #f0d08d; background: #55482f; }
.game-settings-fields { display: grid; gap: 12px; padding: 14px; color: #e5e6d6; font-size: 12px; }
.game-settings-fields label { display: flex; align-items: center; gap: 8px; }
.game-settings-fields label:has(select) { flex-wrap: wrap; }
.game-settings-fields select { padding: 5px; color: #f9edca; background: #25372f; border: 1px solid #aab79b68; }
.game-settings-fields input[type="range"] { flex: 1; }
.game-settings-fields p { margin: 2px 0 0; color: #cbd3c3; line-height: 1.4; }
.game-meta { position: absolute; right: 20px; bottom: 16px; z-index: 2; color: #e7e2d4aa; font: 9px Consolas, monospace; text-align: right; }
.game-meta b { font-weight: 400; }
.floating-window { z-index: 12; width: 326px; }
.floating-window .window-title { cursor: grab; touch-action: none; user-select: none; }
.floating-window .window-title:active { cursor: grabbing; }
.stats-window { top: 142px; left: clamp(235px, 25vw, 370px); }
.skills-window { top: 128px; left: clamp(450px, 50vw, 720px); width: 362px; }
.inventory-window { top: 135px; left: clamp(250px, 31vw, 500px); width: 440px; }
.equipment-window { top: 92px; left: clamp(280px, 37vw, 610px); width: min(530px, calc(100vw - 24px)); }
.equipment-tabs { display: flex; gap: 3px; padding: 8px 10px 0; border-bottom: 1px solid #d5c38955; }
.equipment-tabs button { flex: 1; padding: 7px; border: 1px solid #aebba05c; border-radius: 4px 4px 0 0; background: #243731; color: #c9d1bf; font-size: 11px; }
.equipment-tabs button.active { border-color: #e8cc92; border-bottom-color: transparent; background: #4b5e4c; color: #fff0ca; }
.equipment-content { max-height: min(72vh, 690px); overflow-y: auto; padding: 9px 10px 12px; }
.equipment-section-heading { margin: 3px 0 6px; color: #e8d29d; font: 700 10px "Segoe UI", sans-serif; letter-spacing: .08em; text-align: center; text-transform: uppercase; }
.equipment-layout { display: grid; grid-template-columns: minmax(0, 1fr) 120px minmax(0, 1fr); gap: 7px; align-items: stretch; }
.equipment-column { display: grid; align-content: start; gap: 4px; }
.equipment-slot { display: flex; align-items: center; gap: 5px; width: 100%; min-width: 0; height: 36px; padding: 3px 5px; border: 1px solid #b9c7aa62; border-radius: 3px; background: #263a35ad; color: #ececda; text-align: left; }
.equipment-slot:hover, .equipment-slot.drag-over { border-color: #f1d99b; background: #4b604bbd; }
.equipment-slot.empty { color: #8eaa98; }
.equipment-slot img { flex: none; width: 26px; height: 26px; image-rendering: pixelated; }
.equipment-slot span { min-width: 0; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.equipment-slot small { display: block; color: #aebda9; font-size: 9px; }
.equipment-preview, .equipment-switch-center { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 236px; border: 1px solid #bdc8ad50; border-radius: 4px; background: radial-gradient(circle at 50% 38%, #637b60a8, #20352fc9 70%); }
.equipment-preview img { display: block; width: 110px; height: 180px; object-fit: contain; image-rendering: pixelated; }
.equipment-preview > span { display: grid; place-items: center; width: 110px; height: 180px; color: #ebd6a6; font: 70px Georgia, serif; }
.equipment-preview small { max-width: 110px; overflow: hidden; color: #e8e4cb; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.equipment-switch-toggle { display: block; width: 100%; margin: 10px 0 7px; padding: 6px; border: 1px solid #d5bd8978; border-radius: 3px; background: #405347; color: #f5e3bc; font-size: 10px; }
.equipment-switch-center { gap: 12px; padding: 8px; text-align: center; }
.equipment-switch-center img, .equipment-switch-center > span { width: 90px; height: 170px; object-fit: contain; image-rendering: pixelated; }
.equipment-switch-center > span { display: grid; place-items: center; color: #ebd6a6; font: 55px Georgia, serif; }
.equipment-switch-center button { width: 100%; padding: 7px 3px; border: 1px solid #f0d394; border-radius: 3px; background: #8b6943; color: #fff4d7; font: 700 9px "Segoe UI", sans-serif; }
.equipment-switch-center button:disabled { opacity: .45; cursor: default; }
.equipment-help { margin: 9px 2px 0; color: #bac8b8; font-size: 10px; line-height: 1.4; }
.skills-window .window-title small { padding: 2px 5px; border-radius: 10px; background: #233b36; color: #e7d7ad; font-size: 9px; }
.panel-content { max-height: min(62vh, 480px); overflow-y: auto; padding: 11px; }
.paperdoll { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; padding: 8px; border: 1px solid #cdbb8a57; background: #21353099; }
.paperdoll-avatar { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid #dfc993; background: #435a4d; color: #f9e4b1; font: 27px Georgia, serif; }
.paperdoll strong, .paperdoll small { display: block; }
.paperdoll strong { color: #fff0c8; font-size: 12px; }
.paperdoll small { margin-top: 5px; color: #b8c4b7; font-size: 10px; }
.stats-list { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.stat { display: flex; justify-content: space-between; gap: 4px; padding: 6px 7px; border: 1px solid #aaad8e50; background: #122328b8; color: #c4cab9; font-size: 10px; }
.stat b { color: #fff0bb; font-weight: 600; }
.stats-list { grid-template-columns: 1fr 1fr; align-items: start; }
.stats-attributes, .stats-derived { display: grid; gap: 5px; }
.stats-general { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; }
.stats-attributes .stat { align-items: center; padding: 4px 5px 4px 7px; }
.stats-attributes .stat b { margin-left: auto; }
.stat-actions { display: flex; align-items: center; gap: 5px; }
.stat-cost { min-width: 14px; color: #9fb0a3; font-size: 9px; text-align: right; }
.stat-up { width: 20px; height: 20px; padding: 0; border: 1px solid #e6cb92; border-radius: 3px; background: linear-gradient(#bd995e, #8e693f); color: #fff9e8; font: 700 13px/1 "Segoe UI", sans-serif; }
.stat-up:hover { filter: brightness(1.12); }
.stat-up:disabled { opacity: 0.35; cursor: default; filter: none; }
.skills-list { display: grid; gap: 5px; }
.skill { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px; border: 1px solid #c5bb8a70; border-radius: 3px; background: #172b2bd6; color: #f4ead5; text-align: left; }
.skill:hover { border-color: #f8dda2; background: #29423c; }
.skill.passive { opacity: .55; cursor: default; }
.skill-icon { display: grid; place-items: center; flex: none; width: 35px; height: 35px; border: 1px solid #e6cb92; border-radius: 3px; background: linear-gradient(#665b77, #3f4c5e); color: #ffe7a3; font: 20px Georgia, serif; }
.skill b, .skill small, .skill-description { display: block; }
.skill b { font-size: 11px; }
.skill small { margin-top: 2px; color: #bfc6b4; font-size: 9px; }
.skill-text { min-width: 0; }
.skill-description { margin-top: 4px; color: #adbbae; font-size: 9px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }
.inventory-content { padding: 10px; }
.inventory-topline { display: flex; gap: 4px; margin-bottom: 8px; }
.inventory-topline button { padding: 5px 8px; border: 1px solid #aaad8e56; border-radius: 3px; background: transparent; color: #c6cebb; font-size: 10px; }
.inventory-topline button.active { border-color: #e8d296; color: #fff0c6; }
.inventory-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.inventory-slot { aspect-ratio: 1; border: 1px solid #bac19f59; border-radius: 3px; background: linear-gradient(#364c45a8, #1c3030c9); box-shadow: inset 0 1px #ffffff19; }
.inventory-empty { margin: 10px 0 0; color: #b7c5b6; font-size: 10px; }
.debug-panel { right: 18px; bottom: 106px; z-index: 25; width: min(440px, 45vw); }
.debug-panel .window-title button { width: auto; height: auto; padding: 4px 7px; font-size: 10px; }
.debug-options { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 8px; border-bottom: 1px solid #d9c99a40; background: #142326; }
.debug-options label { display: flex; align-items: center; gap: 6px; color: #d9d5bf; font-size: 11px; }
.debug-options select { padding: 4px 6px; border: 1px solid #b3a77b88; border-radius: 3px; background: #0d1a1d; color: #f5e7c9; font-size: 11px; }
.debug-lines { height: 180px; overflow-y: auto; padding: 8px; background: #0b1719; color: #a9dbb7; font: 10px Consolas, monospace; }
.debug-lines div { margin: 3px 0; }

@media (max-width: 1210px) {
  .target-window { top: 216px; }
}
@media (max-width: 1050px) {
  .chat-window { width: 350px; }
  .hotbar-window { right: 18px; left: auto; transform: none; }
  .game-meta { display: none; }
  .skills-window { left: auto; right: 24px; }
}
@media (max-width: 760px) {
  .shell { padding: 0 12px; }
  .login-screen { display: block; max-width: 430px; padding: 35px 0; }
  .login-art { margin-bottom: 28px; }
  .login-art h1 { font-size: 35px; }
  .crest { width: 88px; height: 88px; margin-bottom: 20px; font-size: 49px; }
  .minimap-window { top: 12px; right: 10px; width: 145px; }
  .town-npc-window { top: 198px; right: 10px; width: 145px; max-height: 28vh; }
  .town-npc-list { grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: calc(28vh - 25px); gap: 3px; padding: 4px; }
  .town-npc-button img { width: 52px; height: 48px; }
  .minimap-frame { width: 120px; height: 120px; }
  .minimap-frame canvas { width: 118px; height: 118px; }
  .minimap-foot span:last-child { display: none; }
  .target-window { top: 185px; width: min(370px, calc(100% - 20px)); }
  .hud { top: 12px; left: 10px; grid-template-columns: 60px minmax(0, 1fr); width: min(370px, calc(100% - 170px)); min-height: 90px; }
  .hud .portrait { width: 60px; min-height: 78px; }
  .action-dock { top: 118px; left: 10px; width: 240px; }
  .chat-window { bottom: 94px; left: 10px; width: min(400px, calc(100% - 20px)); }
  .hotbar-window { right: 10px; bottom: 10px; }
  .floating-window, .skills-window, .inventory-window, .equipment-window { top: 215px; right: 10px; left: 10px; width: auto; }
  .debug-panel { right: 10px; bottom: 95px; width: min(420px, calc(100% - 20px)); }
  .game-meta { display: none; }
}
@media (max-width: 520px) {
  .brand small, .top-button kbd, .status { display: none; }
  .topbar { height: 46px; min-height: 46px; }
  .hud { grid-template-columns: 56px minmax(0, 1fr); width: calc(100% - 20px); min-height: 88px; padding: 4px; }
  .hud .portrait { width: 56px; min-height: 76px; }
  .hud-identity { padding: 0 1px 2px; }
  .hud-name strong { font-size: 11px; }
  .hud-class { font-size: 8px; }
  .meter { grid-template-columns: 19px minmax(0, 1fr) 66px; gap: 3px; margin: 4px 0; font-size: 9px; }
  .meter b { font-size: 8px; }
  .hud .meter { grid-template-columns: 18px minmax(0, 1fr) 62px; gap: 3px; min-height: 13px; padding: 0; font-size: 8px; }
  .hud .meter b { font-size: 8px; }
  .action-dock { top: 116px; width: calc(100% - 20px); }
  .target-window { top: 185px; }
  .minimap-window { top: 295px; }
  .town-npc-window { top: 465px; }
  .chat-window { bottom: 83px; }
  .chat-log { height: 110px; }
  .hotbar-window { --hotkey-size: clamp(27px, 8.4vw, 34px); }
  .hotkey .glyph { font-size: 16px; }
  .chat-form { flex-wrap: wrap; }
  .chat-form input[name="message"] { flex-basis: calc(100% - 38px); order: 2; }
  .chat-form button { order: 3; }
  .chat-form input[name="target"] { flex: 1; }
}
.death-panel { position: absolute; z-index: 30; left: 50%; top: 38%; display: grid; gap: 12px; min-width: 260px; padding: 16px 18px; transform: translate(-50%, -50%); text-align: center; }
.death-panel strong { color: #ffe0b8; font: 700 17px Georgia, serif; }
.death-panel[hidden] { display: none; }
.npc-dialog { position: absolute; z-index: 28; left: 50%; bottom: 150px; width: min(420px, calc(100% - 32px)); transform: translateX(-50%); }
.npc-dialog[hidden], .npc-cutin[hidden] { display: none; }
.npc-text { max-height: 220px; min-height: 96px; overflow-y: auto; padding: 12px 14px; background: #f4efe2; color: #1d1d1a; font: 13px/1.5 "Segoe UI", sans-serif; }
.npc-text p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.npc-menu { display: grid; gap: 1px; padding: 6px; background: #e7e0cd; }
.npc-menu[hidden], .npc-input[hidden] { display: none; }
.npc-menu button { padding: 7px 10px; border: 0; border-radius: 3px; background: transparent; color: #1d1d1a; text-align: left; font: 13px "Segoe UI", sans-serif; }
.npc-menu button:hover, .npc-menu button:focus-visible { background: #c9b88a; outline: none; }
.npc-menu button.cancel { color: #6b5d43; }
.npc-input { display: flex; gap: 6px; padding: 8px 10px; background: #e7e0cd; }
.npc-input input { flex: 1; min-width: 0; padding: 6px 8px; border: 1px solid #a99a72; border-radius: 3px; background: #fffdf6; color: #1d1d1a; }
.npc-input button { padding: 0 12px; border: 1px solid #8e693f; border-radius: 3px; background: linear-gradient(#bd995e, #8e693f); color: #fff9e8; font-weight: 700; }
.npc-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 8px 10px; }
.npc-actions .primary { width: auto; gap: 14px; padding: 7px 12px; }
.npc-actions .primary span:last-child { opacity: .65; font-weight: 400; font-size: 11px; }
.npc-actions:not(:has(button:not([hidden]))) { display: none; }
.npc-cutin { position: absolute; z-index: 27; bottom: 0; width: auto; height: auto; max-width: none; max-height: none; image-rendering: pixelated; pointer-events: none; }
.npc-cutin.left { left: 0; }
.npc-cutin.center { left: 50%; transform: translateX(-50%); }
.npc-cutin.right { right: 0; }
.npc-cutin.middle { top: 50%; bottom: auto; left: 50%; transform: translate(-50%, -50%); }
.inventory-slot { position: relative; display: grid; place-items: center; }
.inventory-slot img, .shop-row img { width: 24px; height: 24px; image-rendering: pixelated; }
.inventory-slot b { position: absolute; right: 2px; bottom: 1px; color: #fff3d0; font: 700 9px "Segoe UI", sans-serif; text-shadow: 0 0 2px #000, 0 0 2px #000; }
.inventory-slot.equipped { border-color: #e8d296; }
.shop-deal { position: absolute; z-index: 29; left: 50%; top: 40%; width: 230px; transform: translate(-50%, -50%); }
.shop-deal[hidden], .shop-window[hidden] { display: none; }
.shop-deal-actions { display: grid; gap: 6px; padding: 10px; }
.shop-cancel, .shop-footer button.secondary { padding: 7px; border: 1px solid #aaad8e56; border-radius: 3px; background: transparent; color: #d6dccb; }
.shop-window { top: 120px; left: clamp(250px, 31vw, 500px); width: 400px; }
.shop-list { display: grid; max-height: 320px; overflow-y: auto; padding: 6px; gap: 2px; }
.shop-row { display: grid; grid-template-columns: 28px 1fr auto 64px; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 3px; color: #e9ecdf; font-size: 12px; }
.shop-row:nth-child(odd) { background: #ffffff0a; }
.shop-row .price { color: #ffe3a3; font-variant-numeric: tabular-nums; }
.shop-row .price s { color: #a7ab98; margin-right: 4px; }
.shop-row input { width: 64px; padding: 3px 5px; border: 1px solid #aaad8e80; border-radius: 3px; background: #1d2c2a; color: #fff5dc; text-align: right; }
.shop-footer { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-top: 1px solid #d5c38956; color: #d6dccb; font-size: 12px; }
.shop-footer #shopZeny { margin-left: auto; color: #b7c5b6; }
.shop-footer .primary { width: auto; padding: 7px 14px; }
.shop-empty { padding: 14px; color: #b7c5b6; font-size: 12px; text-align: center; }
.storage-window { top: 135px; left: clamp(700px, 64vw, 960px); width: 440px; }
.storage-window[hidden], .item-menu[hidden] { display: none; }
.inventory-slot[data-index] { cursor: pointer; }
.inventory-slot[data-index]:hover { border-color: #e8d296b0; }
.item-menu { position: fixed; z-index: 200; width: min(320px, calc(100vw - 16px)); max-height: calc(100dvh - 16px); display: flex; flex-direction: column; border: 2px solid #77756e; border-radius: 6px; background: #f8f8f6; color: #171717; box-shadow: 0 5px 15px #0008, inset 0 0 0 1px #fff; backdrop-filter: none; }
.instance-window > .item-menu { position: absolute; width: min(320px, calc(100% - 16px)); }
.item-detail-header { display: flex; align-items: center; gap: 3px; min-height: 30px; padding: 2px 4px 2px 10px; border-bottom: 1px solid #a2a2a0; background: linear-gradient(#fdfdfc, #dddeda); }
.item-detail-header strong { flex: 1; min-width: 0; overflow: hidden; color: #171717; font: 700 13px/1.2 "Segoe UI", sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.item-menu .item-actions-toggle, .item-menu .item-detail-close { flex: none; display: grid; place-items: center; width: 23px; height: 23px; padding: 0; border: 1px solid #aaa; border-radius: 3px; background: #f8f8f7; color: #262626; font: 700 17px/1 "Segoe UI", sans-serif; }
.item-menu .item-actions-toggle:hover, .item-menu .item-detail-close:hover, .item-menu .item-actions-toggle:focus-visible, .item-menu .item-detail-close:focus-visible { background: #dddeda; outline: 1px solid #666; }
.item-detail-actions { flex: none; display: grid; gap: 2px; padding: 5px; border-bottom: 1px solid #b7b7b3; background: #eeefeb; }
.item-detail-actions button { padding: 5px 8px; border: 0; border-radius: 3px; background: transparent; color: #222; text-align: left; font-size: 12px; }
.item-detail-actions button:hover, .item-detail-actions button:focus-visible { background: #d5d9d2; outline: none; }
.item-detail-actions form { display: flex; align-items: center; gap: 5px; }
.item-detail-actions form button { flex: 1; }
.item-detail-actions input { width: 68px; padding: 4px 5px; border: 1px solid #aaa; border-radius: 3px; background: #fff; color: #222; text-align: right; font-size: 12px; }
.item-detail-body { min-height: 85px; overflow-y: auto; padding: 9px 10px 11px; font: 12px/1.42 Arial, "Segoe UI", sans-serif; overflow-wrap: anywhere; }
.item-detail-body::after { display: block; clear: both; content: ""; }
.item-detail-icon { float: left; display: grid; place-items: center; width: 88px; height: 96px; margin: 0 9px 6px 0; border: 2px solid #2b2b2b; background: #fff; box-shadow: 1px 2px 3px #0005; }
.item-detail-icon img { max-width: 84px; max-height: 92px; object-fit: contain; image-rendering: pixelated; }
.item-detail-icon img.is-fallback { width: 48px; height: 48px; }
.item-detail-body p { min-height: 1em; margin: 0; white-space: pre-wrap; }
.item-detail-body .item-detail-divider { clear: both; height: 1px; min-height: 0; margin: 7px 0; background: #bebeba; }
.item-detail-meta { clear: both; margin-top: 8px; padding-top: 6px; border-top: 1px solid #d5d5d1; color: #555; font-size: 11px; }
.skill-row { display: flex; gap: 4px; }
.skill-row { position: relative; }
.skill-smart-badge { position: absolute; left: 29px; top: 33px; z-index: 2; min-width: 40px; height: 20px; padding: 0 5px; border: 1px solid #aeb8a3; border-radius: 10px; background: #263a35; color: #cbd3c3; font: 700 10px/1 system-ui, sans-serif; cursor: pointer; }
.skill-smart-badge.active { border-color: #f5d484; background: #a47a36; color: #fff; box-shadow: 0 0 5px #f5d48488; }
.skill-smart-all { margin: 0 0 6px; padding: 4px 8px; border: 1px solid #c9b07c; border-radius: 3px; background: #31413c; color: #fff0c3; font-size: 11px; }
.hotkey.smart-enabled { border-color: #e6c478; }
.skill-row .skill { flex: 1; min-width: 0; }
.skill-up { flex: none; width: 30px; border: 1px solid #e6cb92; border-radius: 3px; background: linear-gradient(#bd995e, #8e693f); color: #fff9e8; font: 700 16px "Segoe UI", sans-serif; }
.skill-up:hover { filter: brightness(1.12); }
.skill-search { width: 100%; margin: 0 0 6px; padding: 5px 8px; border: 1px solid #c9b07c; border-radius: 3px; background: #fffaf0; color: #3a2f22; font: 13px "Segoe UI", sans-serif; }
.skill-icon img, .hotkey .glyph img { width: 24px; height: 24px; image-rendering: pixelated; }
.skill-icon.loaded .glyph-text, .hotkey .hotbar-skill-icon.loaded .glyph-text { display: none; }
.skill-points { margin: 0 0 6px; color: #6b5a40; font: 600 12px "Segoe UI", sans-serif; }
.skill-points.available { color: #2f7a3a; }
.skill-tabs { display: flex; flex-wrap: wrap; gap: 3px; margin: 0 0 6px; }
.skill-tabs button { padding: 3px 7px; border: 1px solid #c9b07c; border-radius: 3px 3px 0 0; background: #efe3c8; color: #5a4a33; font: 12px "Segoe UI", sans-serif; cursor: pointer; }
.skill-tabs button.active { background: #fffaf0; color: #3a2f22; font-weight: 700; border-bottom-color: #fffaf0; }
.skill-levels { display: flex; flex-direction: column; gap: 2px; flex: none; }
.skill-levels button { flex: 1; width: 24px; border: 1px solid #c9b07c; border-radius: 3px; background: #efe3c8; color: #3a2f22; font: 700 14px "Segoe UI", sans-serif; cursor: pointer; }
.skill-levels button:disabled, .skill-up:disabled { opacity: 0.4; cursor: default; filter: none; }
.skill-tooltip { position: fixed; z-index: 1000; max-width: 340px; padding: 8px 10px; border: 1px solid #e6cb92; border-radius: 4px; background: rgba(18, 26, 30, 0.96); color: #dfe7df; font: 12px/1.45 "Segoe UI", sans-serif; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45); pointer-events: none; }
.skill-tooltip strong { display: block; margin-bottom: 4px; color: #ffe7a3; }
.skill-tooltip p { margin: 0; white-space: pre-line; }

/* Alt+S: árvore ampla, com progressão por classe e controles dentro de cada nó. */
.skills-window { top: 76px; left: 50%; right: auto; width: min(960px, calc(100vw - 40px)); height: min(760px, calc(100dvh - 96px)); display: flex; flex-direction: column; transform: translateX(-50%); }
.skills-window .window-title { flex: none; min-height: 37px; }
.skill-shell { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.skill-overview { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 22px 14px; background: radial-gradient(circle at 80% 0, #64704b70, transparent 50%), linear-gradient(115deg, #263b37, #17272c); }
.skill-overview div { display: grid; gap: 3px; }
.skill-overview small { color: #d6bb79; font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.skill-overview strong { color: #fff0c8; font: 22px Georgia, serif; }
.skill-overview span { color: #c5d0bf; font-size: 11px; }
.skill-overview .skill-points { flex: none; margin: 0; padding: 10px 14px; border: 1px solid #cdbb7b85; border-radius: 5px; background: #152724; color: #f9df9d; font-size: 12px; }
.skill-overview .skill-points.available { border-color: #9fcd89; color: #c9f5b5; }
.skills-window .skill-tabs { display: flex; flex: none; flex-wrap: nowrap; gap: 6px; min-height: 52px; margin: 0; padding: 8px 16px 0; overflow-x: auto; border-bottom: 1px solid #cdbb7b70; background: #1a2b2c; scrollbar-width: thin; }
.skills-window .skill-tabs button { display: flex; align-items: center; gap: 9px; flex: none; min-width: 116px; max-width: 210px; padding: 9px 12px; border: 1px solid #748c7680; border-bottom-color: #cdbb7b70; border-radius: 6px 6px 0 0; background: #2c403b; color: #cbd6c9; font: 600 12px "Segoe UI", sans-serif; white-space: nowrap; }
.skills-window .skill-tabs button span { overflow: hidden; text-overflow: ellipsis; }
.skills-window .skill-tabs button small { margin-left: auto; padding: 2px 6px; border-radius: 9px; background: #101d1cb8; color: #d8cfad; font-size: 10px; }
.skills-window .skill-tabs button.active { border-color: #e1c786; border-bottom-color: #30443e; background: #40594c; color: #fff2d4; box-shadow: inset 0 3px #eacb7f; }
.skills-window .skill-tabs button:hover, .skills-window .skill-tabs button:focus-visible { border-color: #eed99f; outline: none; }
.skill-toolbar { display: flex; align-items: center; gap: 10px; padding: 11px 20px; border-bottom: 1px solid #cdbb7b35; background: #263632; }
.skill-layout-label { color: #d6c99f; font-size: 11px; white-space: nowrap; }
.skill-toolbar #skillLayout { min-height: 33px; padding: 5px 8px; border: 1px solid #c8b47f8c; border-radius: 4px; background: #152522; color: #f6edda; font-size: 11px; }
.skill-toolbar .skill-search { flex: 1; min-width: 0; height: 33px; margin: 0; padding: 6px 10px; border-color: #c8b47f8c; background: #152522; color: #f6edda; font-size: 12px; }
.skill-toolbar .skill-search::placeholder { color: #aab9ab; }
.skill-toolbar .skill-smart-all { flex: none; max-width: 220px; min-height: 33px; margin: 0; padding: 6px 10px; border-color: #c9b07c91; background: #4a5e48; color: #fff0c8; font-size: 11px; }
.skill-tree-scroll { flex: 1; min-height: 0; overflow: auto; background: #152523; }
.skills-window .skills-list { position: relative; display: grid; gap: 27px; min-height: 100%; padding: 22px 25px 40px; align-content: start; background-image: linear-gradient(#e4d1960b 1px, transparent 1px), linear-gradient(90deg, #e4d1960b 1px, transparent 1px); background-size: 24px 24px; }
.skill-connections { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.skill-connections path { fill: none; stroke: #aaa990a0; stroke-width: 2; }
.skill-connections path.learned { stroke: #d6bb75; stroke-width: 2.5; }
.skill-tier { position: relative; z-index: 1; min-width: 0; }
.skill-tier-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; color: #e9d099; }
.skill-tier-heading::after { flex: 1; height: 1px; background: linear-gradient(90deg, #cbb37085, transparent); content: ""; }
.skill-tier-heading strong { font: 700 11px "Segoe UI", sans-serif; letter-spacing: .12em; text-transform: uppercase; }
.skill-tier-heading small { order: 2; color: #aebcad; font-size: 10px; }
.skill-origin-group + .skill-origin-group { margin-top: 18px; }
.skill-origin-heading { margin: 0 0 9px; padding-left: 8px; border-left: 3px solid #d4bd7f; color: #ead8ad; font: 600 11px "Segoe UI", sans-serif; }
.skill-tier-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(205px, 100%), 1fr)); gap: 12px; }
.skills-window .skill-row { display: flex; flex-direction: column; min-width: 0; min-height: 142px; overflow: hidden; border: 1px solid #b7c9a173; border-radius: 6px; background: linear-gradient(155deg, #354943, #21342f); box-shadow: 0 6px 15px #08120e8c, inset 0 1px #ffffff18; }
.skills-window .skill-row.learned { border-color: #d4bd7f9c; }
.skills-window .skill-row.unlearned { background: linear-gradient(155deg, #2b3837, #1d2d2b); }
.skills-window .skill-row.locked { border-color: #82918a70; }
.skills-window .skill-row.locked .skill-icon { filter: grayscale(1); opacity: .65; }
.skills-window .skill-row:hover { border-color: #f3d89a; }
.skills-window .skill-row .skill { display: grid; grid-template-columns: 43px minmax(0, 1fr); align-items: start; flex: 1; gap: 10px; min-height: 0; padding: 12px; border: 0; border-radius: 0; background: transparent; }
.skills-window .skill-row .skill:hover { background: #ffffff0c; }
.skills-window .skill-row .skill.passive { opacity: .72; }
.skills-window .skill-icon { width: 43px; height: 43px; border-radius: 5px; background: linear-gradient(#6b6581, #394e54); font-size: 24px; }
.skills-window .skill-icon img { width: 31px; height: 31px; }
.skills-window .skill b { color: #fff0cb; font-size: 12px; line-height: 1.25; }
.skills-window .skill-origin-badge { display: table; max-width: 100%; margin-bottom: 5px; padding: 2px 5px; overflow: hidden; border: 1px solid #cdbb7b55; border-radius: 3px; color: #e3d3ad; font-size: 9px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.skills-window .skill small { color: #d3d9c5; font-size: 10px; line-height: 1.35; }
.skills-window .skill-description { margin-top: 6px; color: #b6c6b7; font-size: 10px; }
.skills-window .skill-requires { display: block; margin-top: 7px; color: #e4cb94; font-size: 9px; line-height: 1.35; }
.skills-window .skill-controls { display: flex; align-items: center; gap: 6px; min-height: 34px; padding: 4px 8px; border-top: 1px solid #c9d5a929; background: #1326218a; }
.skills-window .skill-controls:empty { display: none; }
.skills-window .skill-smart-badge { position: static; min-width: 44px; height: 23px; font-size: 10px; }
.skills-window .skill-smart-badge.support { min-width: 68px; }
.skills-window .skill-levels { flex-direction: row; gap: 3px; margin-left: auto; }
.skills-window .skill-levels button { width: 25px; height: 23px; }
.skills-window .skill-up { width: 27px; height: 23px; margin-left: auto; font-size: 15px; }
.skills-window .skill-levels + .skill-up { margin-left: 0; }
.skill-hint { flex: none; margin: 0; padding: 7px 15px; border-top: 1px solid #cdbb7b40; background: #1d302c; color: #b8c9b7; font-size: 10px; text-align: center; }

@media (max-width: 760px) {
  .skills-window { top: 55px; right: auto; left: 8px; width: calc(100vw - 16px); height: calc(100dvh - 70px); transform: none; }
  .skill-overview { padding: 11px 14px; }
  .skill-overview strong { font-size: 18px; }
  .skill-toolbar { padding: 9px 12px; }
  .skills-window .skills-list { padding: 17px 13px 28px; }
  .skill-tier-grid { grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); }
}
@media (max-width: 520px) {
  .skill-overview span { display: none; }
  .skill-overview .skill-points { padding: 7px 8px; font-size: 10px; }
  .skill-overview strong { font-size: 15px; }
  .skill-toolbar { flex-wrap: wrap; }
  .skill-toolbar .skill-search { flex-basis: 100%; }
  .skill-toolbar .skill-smart-all { max-width: none; width: 100%; }
  .skill-tier-grid { grid-template-columns: minmax(0, 1fr); }
  .skill-hint { padding: 6px 10px; line-height: 1.3; }
}

.adventure-map-panel{position:absolute;inset:0;z-index:950;background:#000c;backdrop-filter:blur(7px)}
.adventure-map-panel[hidden]{display:none}
.adventure-map-viewport{position:absolute;inset:0;overflow:auto;scrollbar-color:#75694c #101719}
.adventure-map-canvas{position:relative;min-width:100%;min-height:100%}
.adventure-map-links{position:absolute;inset:0;overflow:visible;pointer-events:none}.adventure-map-links line{stroke-linecap:round}.adventure-map-links .shadow{stroke:#02080b;stroke-width:37}.adventure-map-links .stone{stroke:#746e61;stroke-width:24}.adventure-map-links .seams{stroke:#b4aa8e;stroke-width:18;stroke-dasharray:23 4}
.adventure-map-island{position:absolute;z-index:1;width:250px;height:250px;margin:0;filter:drop-shadow(0 16px 10px #000b);cursor:help}.adventure-map-island img{display:block;width:100%;height:100%;object-fit:contain}
.adventure-map-island .adventure-map-visual{position:absolute;inset:0;display:block;width:100%;height:100%;pointer-events:none}
.adventure-map-island.current{z-index:2;filter:drop-shadow(0 0 20px #ffdb60) drop-shadow(0 0 8px #ffcf51)}
.adventure-map-island:hover{z-index:3;filter:drop-shadow(0 0 16px #cfefcb)}.adventure-map-island.current:hover{filter:drop-shadow(0 0 20px #ffdb60)}
.adventure-map-empty{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:min(400px,85%);color:#dbd5b9;text-align:center;line-height:1.5}
.adventure-map-close{position:absolute;z-index:10;left:50%;bottom:18px;transform:translateX(-50%);width:48px;height:48px;border:1px solid #d7c38b8a;border-radius:50%;background:#1b2529e8;color:#fff2ce;font-size:30px;line-height:1;box-shadow:0 8px 24px #0009}.adventure-map-close:hover{background:#405347}
.adventure-map-tooltip{position:absolute;z-index:9;display:grid;gap:9px;width:250px;padding:12px;border:1px solid #d1bd849c;border-radius:10px;background:#12201fec;color:#f8eed1;box-shadow:0 14px 36px #000b;pointer-events:none}.adventure-map-tooltip[hidden]{display:none}.adventure-map-tooltip strong{font-size:13px;line-height:1.3}.adventure-map-tooltip canvas{display:block;width:220px;height:220px;background:#23332f;border-radius:6px}.adventure-map-tooltip p{margin:8px 0;color:#bcc7bd;font-size:12px;text-align:center}.adventure-map-tooltip canvas[hidden],.adventure-map-tooltip strong[hidden],.adventure-map-tooltip p[hidden]{display:none}
.action-dock{grid-template-columns:repeat(7,minmax(0,1fr));width:420px}
@media(max-width:760px){.action-dock{width:330px}}
@media(max-width:520px){.action-dock{width:calc(100% - 20px)}}
[data-weight="heal"] { color: #f0c46b !important; }
[data-weight="major"] { color: #ff8a7a !important; }

.instance-window { width: min(960px, calc(100vw - 20px)); height: min(720px, calc(100dvh - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 0; overflow: hidden; background: #19272a; color: #eee5cb; }
.instance-window[open] { display: flex; flex-direction: column; }
.instance-window > .window-title, .instance-actions, .instance-feedback { flex-shrink: 0; }
#instanceForm { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.instance-layout { display: grid; grid-template-columns: 280px minmax(0,1fr); flex: 1; min-height: 0; }
.instance-detail-column { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.instance-sidebar { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #142124; border-right: 1px solid #d5c38942; }
.instance-sort-control { display: grid; gap: 5px; padding: 12px 12px 0; color: #bfc8ba; font-size: 11px; font-weight: 700; }
.instance-sort-control select { width: 100%; min-width: 0; padding: 7px 9px; border: 1px solid #73807180; border-radius: 5px; background: #203132; color: #eee5cb; font: 12px "Segoe UI",sans-serif; }
.instance-list { display: flex; flex-direction: column; flex: 1; gap: 10px; min-width: 0; min-height: 0; overflow-y: auto; padding: 12px; scrollbar-width: thin; scrollbar-color: #877750 #142124; }
.instance-choice { display: flex; align-items: center; gap: 11px; flex-shrink: 0; width: 100%; min-height: 100px; padding: 12px; border: 1px solid #73807180; border-radius: 7px; background: #203132; color: #eee5cb; text-align: left; cursor: pointer; }
.instance-choice:hover:not(:disabled) { background: #2b3e3a; border-color: #b69b64; }
.instance-choice[aria-pressed="true"] { background: #34433a; border-color: #e3c082; box-shadow: inset 3px 0 #e3c082; }
.instance-choice-art { display: grid; place-items: center; flex: 0 0 54px; height: 64px; overflow: hidden; border: 1px solid #977f546b; border-radius: 5px; background: #172725; color: #d5b878; font-size: 28px; }
.instance-choice-art img { width: 54px; height: 64px; object-fit: contain; image-rendering: pixelated; }
.instance-choice-info { display: grid; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.instance-choice-info strong { color: #fae5b7; font-size: 14px; line-height: 1.3; }
.instance-choice-level { color: #e6ca8e; font-size: 11px; }
.instance-choice-info small { color: #c3cbbc; font-size: 11px; line-height: 1.4; }
.instance-choice-kind { color: #dbbd7b; font-size: 10px; letter-spacing: .03em; }
.instance-window::backdrop { background: #091315ad; }
.instance-content { min-width: 0; min-height: 0; flex: 1; overflow-y: auto; align-content: start; padding: 15px 18px; display: grid; gap: 11px; scrollbar-width: thin; scrollbar-color: #877750 #19272a; }
.instance-overview { --boss-hue: 155; --boss-saturation: 18%; position: relative; isolation: isolate; display: flex; align-items: flex-end; min-height: 245px; overflow: hidden; padding: 22px; border: 1px solid hsl(var(--boss-hue) var(--boss-saturation) 42% / .65); border-radius: 12px; background: radial-gradient(ellipse at 82% 30%, hsl(var(--boss-hue) var(--boss-saturation) 43% / .85), transparent 65%), linear-gradient(125deg, hsl(var(--boss-hue) var(--boss-saturation) 10%), hsl(var(--boss-hue) var(--boss-saturation) 23%)); }
.instance-overview::before { content: ""; position: absolute; inset: 0; z-index: -1; background: repeating-linear-gradient(130deg, transparent 0 65px, #ffffff07 66px 67px, transparent 68px 130px); pointer-events: none; }
.instance-overview::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, #0b1519b8, #0b15194d 48%, transparent 75%), linear-gradient(0deg, #0b1519db, transparent 65%); pointer-events: none; }
.instance-hero-copy { position: relative; z-index: 2; width: 100%; min-width: 0; overflow-wrap: anywhere; text-shadow: 0 2px 5px #000b; }
.instance-overview.has-boss .instance-hero-copy { padding-top: 75px; }
.instance-overview #instanceKind { display: inline-block; margin: 0 0 8px; color: #f3e9d1; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.instance-overview #instanceDescription { max-width: 38ch; margin-top: 8px; line-height: 1.5; }
.instance-overview #instanceRoster { margin-top: 8px; color: #d0d7cf; }
.instance-overview h2 { max-width: 17ch; margin: 0 0 6px; font: 700 clamp(24px,3vw,34px)/1.08 Georgia,serif; color: #fff1d4; }
.instance-overview p { margin: 3px 0 0; color: #d5d8c8; font-size: 12px; }
#instanceRoster { color: #b3bbaa; }
.instance-boss-art { position: absolute; z-index: 0; inset: 0 0 0 40%; overflow: hidden; pointer-events: none; }
.instance-boss-art img { position: absolute; top: 12px; left: 50%; width: auto; height: 190%; max-width: none; transform: translateX(-50%); image-rendering: pixelated; filter: drop-shadow(0 8px 12px #0007); }
.instance-stat-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.instance-card { min-width: 0; margin: 0; border: 1px solid #73807180; border-radius: 5px; padding: 11px 13px; background: #142124; }
.instance-active { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-color: #d1ae6b; background: #28352f; }
.instance-active h3 { color: #f0d69c; }
.instance-active p { margin: 5px 0 0; color: #d2d8ca; font-size: 12px; }
#instanceActiveActions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
#instanceActiveActions .primary { justify-content: center; width: auto; min-width: 88px; }
.instance-window .instance-danger { border-color: #e4a698; background: linear-gradient(#ad6a5b, #753b36); color: #fff3ed; }
.instance-confirm { width: min(410px, calc(100vw - 48px)); max-width: calc(100vw - 48px); padding: 0; border: 1px solid #bca675; border-radius: 6px; background: #19272a; color: #eee5cb; box-shadow: 0 20px 60px #000a; }
.instance-confirm::backdrop { background: #081315b8; }
.instance-confirm > .window-title { padding: 10px 14px; }
#instanceConfirmMessage { margin: 0; padding: 20px 18px; font-size: 14px; line-height: 1.5; }
.instance-confirm-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 12px 18px; border-top: 1px solid #d5c38940; background: #1e2e30; }
.instance-confirm-actions button { width: auto; min-width: 98px; padding: 9px 14px; border: 1px solid #aebba075; border-radius: 3px; background: #293b37; color: #f5e9d1; font-weight: 700; }
.instance-confirm-actions .primary { justify-content: center; border-color: #ffe5a5; background: linear-gradient(#bd995e, #8e693f); color: #fff9e8; }
.instance-confirm-actions .instance-danger { border-color: #e4a698; background: linear-gradient(#ad6a5b, #753b36); color: #fff3ed; }
.instance-card h3, .instance-card legend { margin: 0; color: var(--gold); font: 700 11px/1.25 "Segoe UI",sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.instance-card dl { margin: 7px 0 0; }
.instance-card dl div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 3px 0; font-size: 13px; }
.instance-card dt { display: inline-flex; align-items: center; gap: 6px; color: #d0d3c8; }
.instance-stat-icon { display: inline-grid; place-items: center; flex: 0 0 18px; width: 18px; height: 18px; border: 1px solid #93715b75; border-radius: 3px; background: #302e29; color: #e1a98b; font: bold 13px/1 Georgia,serif; }
.instance-rewards .instance-stat-icon { color: #e4c67e; border-color: #a1915475; background: #323026; }
.instance-card dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.instance-enemies { border-top: 2px solid #b17360; }
.instance-enemies dd { color: #e8ab92; }
.instance-rewards { border-top: 2px solid #b99a57; }
.instance-rewards dd { color: #ead094; }
.instance-rules ul { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px 16px; list-style: none; padding: 0; margin: 8px 0 0; }
.instance-rules li { border-left: 2px solid #a68a56; padding-left: 8px; }
.instance-monsters ul, .instance-possible-rewards ul { display: flex; gap: 9px; list-style: none; padding: 0 0 5px; margin: 9px 0 0; overflow-x: auto; scrollbar-width: thin; scrollbar-color: #8f9eae #1b2b30; }
.instance-monster-slot, .instance-item-slot { flex: 0 0 58px; width: 58px; height: 58px; display: grid; place-items: center; overflow: hidden; border: 1px solid #6e839b; border-radius: 12px; background: linear-gradient(#334758, #243845); color: #d9e1e8; font: 700 22px Georgia,serif; }
.instance-monster-slot img { display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.instance-boss-entry { display: grid; justify-items: center; gap: 4px; min-width: 58px; }
.instance-boss-name { color: #f2dfb2; font-size: 12px; font-weight: 700; }
.instance-boss-entry .instance-monster-slot { border-color: #c8945d; }
.instance-item-slot img { display: block; width: 36px; height: 36px; object-fit: contain; image-rendering: pixelated; }
.instance-item-slot { cursor: pointer; }
.instance-monster-slot:hover, .instance-item-slot:hover { border-color: #e5c98c; background: #43525c; }
.instance-rules strong, .instance-rules small { display: block; }
.instance-rules strong { color: #e9d5a8; font-size: 12px; }
.instance-rules small, #instanceNextRule { color: #bbc3b9; font-size: 11px; line-height: 1.4; }
#instanceNextRule { margin: 8px 0 0; }
#instanceDifficulty { flex: none; margin: 0 18px 12px; padding-top: 5px; }
#instanceDifficulty legend { padding: 0 5px; }
.instance-meter-heading, .instance-meter-row, .instance-actions, .instance-feedback { display: flex; align-items: center; gap: 12px; }
.instance-meter-heading { justify-content: space-between; margin: 2px 0 7px; }
.instance-meter-heading strong { color: #f2dfb2; font: 700 18px Georgia,serif; }
.instance-meter-heading span { color: #b9c2b5; font-size: 12px; }
.instance-meter-row button { width: 30px; height: 30px; flex: none; border: 1px solid var(--edge); border-radius: 50%; background: #273834; color: var(--gold); font-size: 20px; line-height: 1; }
#instanceMeter { appearance: none; flex: 1; min-width: 0; height: 15px; cursor: pointer; border-radius: 3px; background: repeating-linear-gradient(to right, transparent 0 calc(100% / var(--steps,20) - 3px), #172327 calc(100% / var(--steps,20) - 3px) calc(100% / var(--steps,20))), linear-gradient(to right, var(--meter-color,#d9b578), var(--meter-color,#d9b578)) left / var(--fill,5%) 100% no-repeat, linear-gradient(to right, #5a5b60 0 50%, #503035 50% 100%); }
#instanceMeter::-webkit-slider-thumb { appearance: none; width: 12px; height: 23px; background: #f2deb0; box-shadow: 0 1px 4px #101714; border: 2px solid #5a4831; border-radius: 3px; }
#instanceMeter::-moz-range-thumb { width: 9px; height: 20px; background: #f2deb0; border: 2px solid #5a4831; border-radius: 3px; }
.instance-window :focus-visible { outline: 2px solid #f0cd88; outline-offset: 2px; }
.instance-window button:disabled, #instanceMeter:disabled { cursor: default; opacity: .55; }
.instance-actions { justify-content: space-between; border-top: 1px solid #d5c38940; background: #1e2e30; padding: 10px 18px; }
#instanceMode { margin: 0; padding: 0; border: 0; font-size: 13px; }
#instanceMode legend { color: #b7beaf; font-size: 11px; margin-bottom: 4px; }
#instanceMode label { margin-right: 8px; white-space: nowrap; }
#instanceMode input { accent-color: #daba80; vertical-align: middle; margin: 0 2px 0 0; }
#instanceEnter { justify-content: center; width: auto; min-width: 137px; }
.instance-feedback { padding: 6px 18px 10px; justify-content: space-between; }
#instanceStatus { margin: 0; font-size: 12px; color: #d5cdb5; }
@media (max-width: 720px) {
  .instance-layout { grid-template-columns: 180px minmax(0,1fr); }
  .instance-list { padding: 10px 8px; }
  .instance-sort-control { padding: 10px 8px 0; }
  .instance-choice { flex-direction: column; align-items: flex-start; padding: 10px; gap: 8px; }
  .instance-choice-art { flex-basis: auto; width: 54px; }
  .instance-stat-columns, .instance-rules ul { grid-template-columns: 1fr; }
  .instance-overview { min-height: 260px; padding: 16px; }
  .instance-overview.has-boss .instance-hero-copy { padding-top: 130px; }
  .instance-boss-art { left: 12%; }
  .instance-boss-art img { height: 430px; }
  .instance-overview h2 { font-size: 24px; }
}
@media (max-width: 480px) {
  .instance-active { align-items: flex-start; flex-direction: column; }
  .instance-layout { grid-template-columns: 1fr; grid-template-rows: auto minmax(0,1fr); }
  .instance-sidebar { border-right: 0; border-bottom: 1px solid #d5c38942; }
  .instance-sort-control { display: flex; align-items: center; gap: 8px; padding: 8px 10px 0; }
  .instance-sort-control select { flex: 1; }
  .instance-list { flex-direction: row; max-height: 110px; overflow-x: auto; overflow-y: hidden; }
  .instance-choice { flex: 0 0 190px; flex-direction: row; align-items: center; min-width: 190px; min-height: 82px; }
  .instance-choice-info strong { font-size: 12px; }
  .instance-content, .instance-actions, .instance-feedback { padding-inline: 10px; }
  #instanceDifficulty { margin-inline: 10px; }
  .instance-card { padding: 8px; }
  .instance-card dl div { flex-wrap: wrap; gap: 0 5px; font-size: 12px; }
  .instance-rules ul { grid-template-columns: 1fr; }
  .instance-feedback { flex-wrap: wrap; }
}
