/* Integrated HUD only; no demo world/minimap, global reset or window-content redesign. */
#game-screen{--hud-gold:#cfad70;--hud-text:#f0e3cd;--hud-muted:#b9aa94}
#game-screen .hud-world-top{position:absolute;z-index:16;left:24px;right:180px;top:calc(14px + env(safe-area-inset-top));height:64px;display:flex;align-items:center;gap:20px;pointer-events:none;color:var(--hud-text);font-family:Arial,sans-serif}
#game-screen .hud-world-logo{width:154px;height:auto;max-height:64px;object-fit:contain;filter:drop-shadow(0 3px 7px #000b)}
#game-screen .hud-player-chip{display:flex;align-items:center;gap:9px;min-width:190px;max-width:300px;padding:7px 12px;background:linear-gradient(115deg,#0f1416ed,#181c1ccb);border:1px solid #9a78514d;border-radius:8px}
#game-screen .hud-level{width:30px;height:30px;flex:0 0 30px;border:1px solid #c7a46b;border-radius:50%;display:grid;place-items:center;font:600 16px Georgia,serif;color:#e0bd7e;background:#272725}
#game-screen .hud-player-chip strong{display:block;font-size:12px;overflow-wrap:anywhere}
#game-screen .hud-player-chip small{display:block;font-size:10px;color:var(--hud-muted);margin-top:3px}
#game-screen .hud-location{margin-left:auto;margin-right:auto;padding:8px 18px;text-align:center;border:1px solid #a386604d;background:#0b1013c9;border-radius:4px;max-width:250px}
#game-screen .hud-location strong{display:block;font:16px/1.3 Georgia,serif}
#game-screen .hud-location span{font:9px/1.5 Arial,sans-serif;letter-spacing:2px;color:#c6ab7e;text-transform:uppercase}
#game-screen #player-menu.hud-redesign{position:absolute;inset:0;z-index:17;width:auto;max-height:none;height:auto;border:0;box-shadow:none;background:none;padding:0;border-radius:0;pointer-events:none;display:block;color:var(--hud-text)}
#game-screen .hud-rail{position:absolute;left:16px;top:124px;display:grid;gap:7px;width:56px;max-height:calc(100% - 220px);overflow:auto;padding:8px 5px;background:linear-gradient(140deg,#151c1be8,#111618ed);border:1px solid #b3966670;border-radius:10px;box-shadow:0 9px 25px #0008;pointer-events:auto}
#game-screen .hud-rail button{display:grid;place-items:center;width:44px;min-width:0;min-height:44px;height:44px;padding:0;border:1px solid #82735470;background:linear-gradient(140deg,#272823,#141a1b);border-radius:7px;color:#ceb581;font:14px Arial,sans-serif}
#game-screen .hud-rail button[aria-expanded=true]{border-color:#d2a964;background:linear-gradient(135deg,#563434,#261d1c);box-shadow:inset 2px 0 #bc9558}
#game-screen .hud-rail svg,#game-screen .hud-bottomnav svg,#game-screen .hud-card-icon svg,#game-screen .hud-menu-logout svg,#game-screen #hud-menu-close svg{width:22px;height:22px;display:block;stroke:currentColor;fill:none;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#game-screen #player-menu-toggle svg{transform:none}
#game-screen .hud-menu-panel{position:absolute;z-index:5;top:100px;left:84px;bottom:auto;max-height:calc(100% - 182px);width:336px;max-width:calc(100% - 100px);padding:20px;display:flex;flex-direction:column;min-height:0;background:radial-gradient(circle at 90% 13%,#632c2e29,transparent 32%),linear-gradient(165deg,#151919f7,#0a0e0ffc);border:1px solid #9f8152;outline:1px solid #211d19;outline-offset:-6px;box-shadow:0 18px 50px #000a,9px 0 45px #05060670;pointer-events:auto}
#game-screen .hud-menu-panel:before{content:'';position:absolute;inset:8px;pointer-events:none;border:1px solid #c2a06d25}
#game-screen .hud-menu-panel.hidden{display:none!important}
#game-screen .hud-menu-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;flex-shrink:0;padding:0;border:0;position:relative}
#game-screen .hud-overline{font:800 10px/1.5 Arial,sans-serif;letter-spacing:2px;color:#d5ab68;text-transform:uppercase}
#game-screen .hud-menu-heading h2{margin:6px 0 0;font:normal 28px/1.2 Georgia,serif;color:#f1e5d2}
#game-screen #hud-menu-close{display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;padding:0;border:1px solid #b3986966;border-radius:0;color:#e6c592;background:#1a1a18;min-height:36px}
#game-screen .hud-menu-separator{height:1px;flex-shrink:0;background:linear-gradient(90deg,transparent,#c2a46a 46%,transparent);margin:16px 0;position:relative;pointer-events:none}
#game-screen .hud-menu-separator:after{content:'❖';position:absolute;left:50%;transform:translate(-50%,-50%);top:0;background:#171a19;padding:0 9px;color:#bca06c;font-size:12px}
#game-screen .hud-menu-scroll{overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:0 1 auto;padding-right:3px;scrollbar-width:thin}
#game-screen .hud-profile{display:flex;gap:12px;align-items:center;padding:6px 4px 14px;margin-bottom:10px;border-bottom:1px solid #bca47336}
#game-screen .hud-profile img{width:46px;height:46px;flex:0 0 46px;object-fit:cover;object-position:center 20%;border:1px solid #c4a26e;border-radius:50%;background:#171719}
#game-screen .hud-profile strong{font:17px/1.3 Georgia,serif;display:block;overflow-wrap:anywhere}
#game-screen .hud-profile small{font:11px/1.4 Arial,sans-serif;color:var(--hud-muted);display:block;margin-top:4px}
#game-screen .hud-menu-cards{display:flex;flex-direction:column;gap:8px;overflow:visible}
#game-screen .hud-menu-card{display:flex;align-items:center;gap:12px;border-radius:5px;min-height:70px;padding:10px 12px;border:1px solid #786b5266;color:#ebddc9;background:linear-gradient(95deg,#151a1ce8,#111518dc);box-shadow:inset 0 0 8px #0005;text-align:left;cursor:pointer}
#game-screen .hud-menu-card:hover,#game-screen .hud-menu-card.active{background:linear-gradient(100deg,#4c2526,#24191b 83%);border-color:#b15a4d;box-shadow:inset 3px 0 #e3ae62}
#game-screen .hud-card-icon{width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;background:#171b1a;border:1px solid #af8550;border-radius:50%;color:#e4ba77}
#game-screen .hud-menu-card b{font:17px/1.3 Georgia,serif;display:block}
#game-screen .hud-menu-card small{display:block;font:10px/1.4 Arial,sans-serif;color:#ad9f90;margin-top:5px}
#game-screen .hud-card-arrow{margin-left:auto;color:#ab8955;font:19px Georgia,serif}
#game-screen .hud-menu-logout{display:flex;align-items:center;gap:12px;justify-content:center;flex-shrink:0;min-height:49px;padding:10px;border:1px solid #984b4b;background:linear-gradient(93deg,#33181c,#2a181d);color:#f08b83;border-radius:5px;font:16px Georgia,serif;cursor:pointer}
#game-screen .hud-exp{position:absolute;pointer-events:auto;bottom:calc(14px + env(safe-area-inset-bottom));left:96px;width:230px;max-width:calc(100% - 210px);padding:4px 8px;background:#0d1419db;border:1px solid #9f855c78;border-radius:7px}
#game-screen .hud-exp .taskbar-exp-group{margin:0;justify-content:center;gap:6px}
#game-screen .hud-bottomnav{display:none}
#game-screen .minimap{top:calc(14px + env(safe-area-inset-top));right:calc(14px + env(safe-area-inset-right))}
#game-screen .hud-redesign button:focus-visible{outline:2px solid #e4c58c;outline-offset:2px}
@media(max-width:1000px){#game-screen .hud-location{display:none}}
@media(max-width:700px){
 #game-screen .hud-world-top{left:12px;right:12px;top:calc(10px + env(safe-area-inset-top));height:52px;gap:8px}
 #game-screen .hud-world-logo{width:99px;max-height:50px}
 #game-screen .hud-player-chip{flex:1;min-width:0;max-width:none;padding:5px 7px;gap:6px}
 #game-screen .hud-player-chip strong{font-size:10px}#game-screen .hud-player-chip small{font-size:9px}
 #game-screen .hud-level{width:27px;height:27px;flex-basis:27px;font-size:14px}
 #game-screen .hud-rail{display:none}
 #game-screen .hud-menu-panel{top:calc(74px + env(safe-area-inset-top));left:auto;right:0;bottom:auto;max-height:calc(100% - 152px - env(safe-area-inset-top) - env(safe-area-inset-bottom));width:min(83vw,332px);max-width:calc(100% - 12px);padding:16px 14px 14px;border-right:0;box-shadow:-8px 0 48px #000c}
 #game-screen .hud-menu-heading h2{font-size:25px}#game-screen .hud-overline{font-size:9px}
 #game-screen #hud-menu-close{width:44px;height:44px;flex-basis:44px;min-height:44px}
 #game-screen .hud-menu-separator{margin:12px 0}
 #game-screen .hud-menu-card{min-height:61px;padding:8px;gap:9px}
 #game-screen .hud-menu-card b{font-size:15px}#game-screen .hud-menu-card small{font-size:9px}
 #game-screen .hud-card-icon{width:36px;height:36px;flex-basis:36px}
 #game-screen .hud-menu-logout{min-height:46px;font-size:15px}
 #game-screen .hud-bottomnav{position:absolute;z-index:6;left:0;right:0;bottom:0;display:flex;align-items:stretch;justify-content:space-around;height:calc(60px + env(safe-area-inset-bottom));padding-bottom:env(safe-area-inset-bottom);background:#0e1415f5;border-top:1px solid #8f7d57af;pointer-events:auto}
 #game-screen .hud-bottomnav button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;flex:1;min-width:0;padding:6px 2px;border:0;background:transparent;color:#bcad98;font:10px/1.3 Arial,sans-serif;min-height:44px}
 #game-screen .hud-bottomnav button[aria-expanded=true],#game-screen .hud-bottomnav button.active{color:#e5c37e;background:#a3713520}
 #game-screen .hud-exp{bottom:calc(78px + env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);width:180px;max-width:calc(100% - 164px);padding:2px 4px}
 #game-screen .game-touch{bottom:calc(104px + env(safe-area-inset-bottom))}
 #game-screen .camera-orbit{bottom:calc(104px + env(safe-area-inset-bottom))}
 #game-screen .training-interact{bottom:calc(151px + env(safe-area-inset-bottom));left:50%;right:auto;transform:translateX(-50%);max-width:calc(100% - 170px)}
 #game-screen .minimap{top:calc(10px + env(safe-area-inset-top));right:calc(10px + env(safe-area-inset-right))}
}
@media(max-height:520px){#game-screen .hud-menu-panel{top:76px;bottom:auto;max-height:calc(100% - 152px);padding:12px}#game-screen .hud-menu-separator{margin:8px 0}}

#game-screen .exp-telemetry{display:none!important}
#game-screen #exp-lock-status{display:block;font-size:12px;overflow-wrap:anywhere}
#game-screen #exp-lock-status:empty{display:none}
#game-screen #load-trace-save.hidden{display:none!important}

#game-screen .minimap #channel-status{white-space:nowrap;font-size:10px;overflow:hidden;text-overflow:ellipsis}

/* Attack is local animation only; world HUD retains its five navigation actions. */
#game-screen .game-attack{display:none;touch-action:none}
#game-screen .gm-tools{top:calc(84px + env(safe-area-inset-top));left:calc(16px + env(safe-area-inset-left));bottom:auto;z-index:18}
#game-screen .gm-tools>button{min-height:32px;min-width:44px}
#game-screen .minimap{z-index:16}
#game-screen .game-window{isolation:isolate}
#game-screen #player-menu.hud-redesign{z-index:21}
#game-screen .minimap :is(#channel-status,#map-position){font:400 10px/14px Arial,sans-serif;text-align:center}
#game-screen .settings-menu #exp-lock{display:block;width:100%;height:auto;min-height:32px;padding:6px;color:#eee3c9;font:12px/1.4 Arial,sans-serif}
@media(max-width:700px){
 #game-screen .minimap{top:env(safe-area-inset-top);right:env(safe-area-inset-right)}
 #game-screen .gm-tools{top:calc(66px + env(safe-area-inset-top));left:calc(12px + env(safe-area-inset-left));bottom:auto}
 #game-screen .camera-orbit{display:none!important;pointer-events:none}
 #game-screen .game-touch{left:calc(16px + env(safe-area-inset-left));bottom:calc(100px + env(safe-area-inset-bottom))}
 #game-screen .joystick{display:grid;width:80px;height:80px;background:#0c1515a6;border:1px solid #d1b78370;border-radius:50%;box-shadow:inset 0 0 16px #0003}
 #game-screen #joystick-knob{display:grid;place-items:center;width:34px;height:34px;border:1px solid #d1b78380;background:#111c1dcc;color:#dec798;border-radius:50%;pointer-events:none}
 #game-screen #joystick-knob svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.5}
 #game-screen .game-attack{position:absolute;right:calc(16px + env(safe-area-inset-right));bottom:calc(100px + env(safe-area-inset-bottom));z-index:12;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:68px;height:68px;min-width:68px;border:1px solid #dec3a0aa;border-radius:50%;background:#8a3436d9;box-shadow:inset 0 0 0 3px #af7d624d;color:#fff0d6;font:11px/1.2 Georgia,serif;padding:8px;touch-action:none}
 #game-screen .game-attack svg{display:block;width:28px;height:28px;stroke:currentColor;stroke-width:1.8;fill:none;stroke-linecap:round;stroke-linejoin:round}
 #game-screen .game-attack:active:not(:disabled){background:#b34a46}
 #game-screen .game-attack:disabled{opacity:.5}
}

#game-screen .hud-rail{width:82px;padding:5px;max-height:calc(100% - 140px)}
#game-screen .hud-rail button{width:70px;height:auto;min-height:60px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:5px}
#game-screen .hud-rail button>span{font:10px/1.2 Arial,sans-serif;text-align:center}
#game-screen .hud-menu-panel{left:108px}
#game-screen :is(.player-line strong,#game-character,#hud-profile-name){font-weight:400}
#game-screen #npc-travel-list>div{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px;border-bottom:1px solid #8e703d}
#game-screen #npc-travel-list button{min-height:44px;padding:8px}
@media(max-width:700px){#game-screen .hud-menu-panel{left:auto;right:0}}

#game-screen .inventory-slots>[data-slot=armor]{grid-column:4;grid-row:2}
#game-screen .inventory-slots>[data-slot=helmet]{grid-column:2;grid-row:1}
#game-screen .inventory-slots>[data-slot=shield]{grid-column:4;grid-row:3}
#game-screen .inventory-slots>[data-slot=boots]{grid-column:4;grid-row:4}
#game-screen .inventory-slots>[data-slot=bracelet]{grid-column:1;grid-row:4}
#game-screen .inventory-slots>[data-slot=necklace]{grid-column:1;grid-row:1}
#game-screen .inventory-slots>[data-slot=earrings]{grid-column:3;grid-row:1}
#game-screen .inventory-slots>[data-slot=belt]{grid-column:2;grid-row:4}
#game-screen .inventory-slots>[data-slot=finger]{grid-column:3;grid-row:4}

#game-screen .game-window{padding-bottom:12px}
#game-screen #game-character-panel{width:min(400px,calc(100% - 24px))}
#game-screen #game-inventory-panel{width:min(320px,calc(100% - 24px))}
#game-screen :is(#game-social-panel,#game-settings-panel){width:min(310px,calc(100% - 24px))}
#game-screen .character-summary{grid-template-columns:110px minmax(0,1fr);min-height:164px}
#game-screen #character-portrait{width:110px;height:144px}
#game-screen .equipment-board{height:auto;min-height:270px;overflow:visible}
#game-screen .inventory-slots{height:auto;min-height:250px}
#game-screen .inventory-slots>[data-slot]{position:relative;left:auto;right:auto;top:auto;bottom:auto;width:auto;height:auto;min-width:0;box-shadow:none}

/* Real panel content geometry retained; chrome is shared with Menu gry below. */
#game-screen .game-window.menu-window .character-summary{display:grid;grid-template-columns:92px minmax(0,1fr);gap:12px;align-items:start}
#game-screen .game-window.menu-window #character-portrait{width:92px;height:122px;object-fit:cover;object-position:top;border:1px solid #735333}
#game-screen .game-window.menu-window #game-character{font:400 18px/1.4 Georgia,serif;display:block;overflow-wrap:anywhere}
#game-screen .game-window.menu-window .character-progress-grid{display:grid;gap:5px;margin:10px 0}
#game-screen .game-window.menu-window .character-progress-grid>span{display:flex;justify-content:space-between;gap:8px;padding:6px;border-bottom:1px solid #735333}
#game-screen .game-window.menu-window .character-attributes{display:grid;grid-template-columns:1fr 1fr;gap:6px 12px}
#game-screen .game-window.menu-window .character-attributes>div{display:flex;justify-content:space-between;gap:5px}
#game-screen .game-window.menu-window .character-attributes dd{margin:0}
#game-screen .game-window.menu-window .equipment-board{background:#101619 url('assets/hud/classic-v3/silhouette.png') center/auto 195px no-repeat}
#game-screen .game-window.menu-window .inventory-slots{background:none;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(4,48px);gap:8px;padding:0;min-height:224px}
#game-screen .game-window.menu-window .inventory-slots>[data-slot]{min-width:0;padding:2px;font:10px/1.2 Arial,sans-serif;background:#151a1b;border:1px solid #786b5266;border-radius:0}
#game-screen .game-window.menu-window .inventory-bag{padding:4px;gap:2px;background:none;border:1px solid #735333}
#game-screen .game-window.menu-window .inventory-bag>*{padding:0;min-height:0;background:#111518;border:1px solid #786b5266}
#game-screen .game-window.menu-window .inventory-bag>[aria-pressed=true]{background:#4c2526;border-color:#b15a4d}
#game-screen .character-window-links{display:flex;flex-wrap:wrap;gap:5px;flex:0 0 auto;padding-top:8px}
#game-screen :is(#game-skills-panel,#game-emotions-panel,#game-quests-panel){width:min(400px,calc(100% - 24px))}
#game-screen .kit-icon{display:block;width:26px;height:26px;object-fit:contain;pointer-events:none}
#game-screen .hud-rail{background:#101619 url('assets/hud/ingame-v1/quick_menu_back_76x360.png') center/100% 100% no-repeat;border-radius:0}
#game-screen .hud-rail button{border-radius:0;background:#101619;border-color:#735333}
#game-screen .hud-rail button[aria-expanded=true]{background:#773039;border-color:#c5a36a}
#game-screen .hud-menu-separator{height:18px;background:url('assets/hud/ingame-v1/divider_300.png') center/100% 100% no-repeat;margin:8px 0}
#game-screen .hud-menu-separator::after{content:none}
#game-screen :is(button,input,select,textarea):focus-visible{outline:2px solid #e8cc91;outline-offset:2px}


/* Menu gry is the sole ingame window design: one shared surface, header, X and scroll. */
#game-screen{--window-surface:radial-gradient(circle at 90% 13%,#632c2e29,transparent 32%),linear-gradient(165deg,#151919f7,#0a0e0ffc);--window-border:#9f8152;--window-inner:#c2a06d25;--window-text:#f1e5d2;--window-detail:#c6ab7e;overflow:clip}
#game-screen :is(.hud-menu-panel,.game-window.menu-window){box-sizing:border-box;background:var(--window-surface);border:1px solid var(--window-border);border-image:none;border-radius:0;outline:1px solid #211d19;outline-offset:-6px;box-shadow:0 18px 50px #000a,9px 0 45px #05060670;color:var(--window-text)}
#game-screen :is(.hud-menu-panel,.game-window.menu-window)::before{content:'';position:absolute;inset:8px;pointer-events:none;border:1px solid var(--window-inner);background:none;z-index:0}
#game-screen .game-window.menu-window::after{content:none}
#game-screen .game-window.menu-window{display:flex;flex-direction:column;min-height:0;padding:20px;overflow:hidden;font:13px/1.45 Arial,sans-serif}
#game-screen .game-window.menu-window>header{position:relative;inset:auto;transform:none;display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;min-height:44px;height:auto;padding:0 0 12px;margin:0 0 8px;border:0;border-bottom:1px solid #bca47336;background:none;box-shadow:none;border-radius:0;z-index:1}
#game-screen .game-window.menu-window>header::before,#game-screen .game-window.menu-window>header::after{content:none}
#game-screen .game-window.menu-window>header h2{position:static;inset:auto;transform:none;margin:0;padding:0;flex:1;min-width:0;font:400 24px/1.2 Georgia,serif;color:var(--window-text);text-align:left;white-space:normal;overflow-wrap:anywhere;text-shadow:none}
#game-screen .game-window.menu-window :is(button,select){border:1px solid #786b5266;border-image:none;border-radius:3px;background:linear-gradient(95deg,#151a1ce8,#111518dc);box-shadow:none;color:#ebddc9;font:13px/1.4 Arial,sans-serif;min-height:36px;padding:6px 10px}
#game-screen .game-window.menu-window button:hover:not(:disabled),#game-screen .game-window.menu-window button[aria-pressed=true]{background:linear-gradient(100deg,#4c2526,#24191b 83%);border-color:#b15a4d}
#game-screen .game-window.menu-window button:active:not(:disabled){background:#33181c}
#game-screen .game-window.menu-window button:disabled{opacity:.55;cursor:default}
#game-screen .game-window.menu-window button::before,#game-screen .game-window.menu-window button::after{content:none}
#game-screen .game-window.menu-window>header>[data-close-window]{position:static;inset:auto;transform:none;display:grid;place-items:center;flex:0 0 36px;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border:1px solid #b3986966;border-radius:0;color:#e6c592;background:#1a1a18;box-shadow:none;filter:none}
#game-screen .game-window.menu-window>header>[data-close-window]:is(:hover,:active){transform:none;background:#352c23;border-color:#d5b87b}
#game-screen .game-window.menu-window>header>[data-close-window] svg{display:block;width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;pointer-events:none}
#game-screen .game-window.menu-window>.window-body{position:relative;flex:1 1 auto;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain;padding:4px 0;scrollbar-gutter:stable;z-index:1}
#game-screen .game-window.menu-window :is(h3,.social-section>summary){font:400 16px/1.4 Georgia,serif;color:var(--window-detail);background:none;border:0;border-bottom:1px solid #bca47336;padding:8px 0;margin:10px 0 6px}
#game-screen .game-window.menu-window :is(.character-summary,#equipment-character-stats,.social-section,.equipment-board){border:1px solid #786b5266;border-image:none;box-shadow:none;padding:10px;background-color:#11151888}
#game-screen .game-window.menu-window :is(.character-summary strong,.character-progress-grid>span,.character-attributes dd){background:none;border-image:none;box-shadow:none}
#game-screen :is(.game-window.menu-window,.hud-menu-panel) :is(.window-body,.hud-menu-scroll,#chat-history,#friend-list){scrollbar-color:#aa9169 #111718;scrollbar-width:auto}
#game-screen :is(.game-window.menu-window,.hud-menu-panel) ::-webkit-scrollbar{width:12px;height:12px}
#game-screen :is(.game-window.menu-window,.hud-menu-panel) ::-webkit-scrollbar-track{background:#111718;border:1px solid #3c3931}
#game-screen :is(.game-window.menu-window,.hud-menu-panel) ::-webkit-scrollbar-thumb{background:#aa9169;border:3px solid #111718;border-radius:3px;min-height:28px}
#game-screen :is(.game-window.menu-window,.hud-menu-panel) ::-webkit-scrollbar-thumb:hover{background:#d1b782}
#game-screen :is(.game-window.menu-window,.hud-menu-panel) ::-webkit-scrollbar-corner{background:#111718}
@media(max-width:700px){#game-screen .game-window.menu-window{padding:16px;width:min(400px,calc(100% - 16px))}#game-screen .game-window.menu-window>header h2{font-size:22px}#game-screen .game-window.menu-window>header>[data-close-window]{width:44px;height:44px;min-width:44px;min-height:44px;flex-basis:44px}}
/* A single unclipped geometric control at each corner; no baked or state sprites. */
#game-screen .minimap{--map-size:136px;--map-hit:44px;position:absolute;top:max(4px,env(safe-area-inset-top));right:max(4px,env(safe-area-inset-right));width:min(calc(var(--map-size) + 4px),calc(100% - 8px - env(safe-area-inset-left) - env(safe-area-inset-right)));pointer-events:none}
#game-screen .minimap .map-surface{position:relative;width:100%;height:auto;aspect-ratio:1;pointer-events:none}
#game-screen .minimap .map-surface::after{content:'';position:absolute;inset:2px;width:auto;height:auto;box-sizing:border-box;border-radius:50%;border:2px solid var(--window-border);box-shadow:inset 0 0 0 3px #111718,inset 0 0 0 4px #9f815260;background:#111718;z-index:0;pointer-events:none}
#game-screen #game-minimap{position:absolute;inset:9px;width:calc(100% - 18px);height:calc(100% - 18px);display:block;z-index:1;border-radius:50%;clip-path:circle(50%);pointer-events:none}
#game-screen .minimap-controls{position:absolute;inset:0;display:grid;grid-template-columns:44px minmax(0,1fr) 44px;grid-template-rows:44px minmax(0,1fr) 44px;z-index:2;pointer-events:none}
#game-screen .minimap-controls>.hud-item{position:static;inset:auto;transform:none;display:flex;width:44px;height:44px}
#game-screen #map-open{position:static;inset:auto;transform:none;grid-column:1;grid-row:1}
#game-screen .minimap-controls>.hud-item:has(#map-hide){grid-column:3;grid-row:1}
#game-screen .minimap-controls>.hud-item:has(#map-zoom-in){grid-column:3;grid-row:3}
#game-screen .minimap-controls>.hud-item:has(#map-zoom-out){grid-column:1;grid-row:3}
#game-screen .minimap .minimap-button{position:static;inset:auto;transform:none;clip-path:none;box-sizing:border-box;display:grid;place-items:center;flex:0 0 44px;width:44px;height:44px;min-width:44px;min-height:44px;padding:8px;border:1px solid #b3986966;border-radius:3px;background:#1a1a18eb;color:#e6c592;box-shadow:none;pointer-events:auto;touch-action:manipulation;cursor:pointer}
#game-screen .minimap .minimap-button::before,#game-screen .minimap .minimap-button::after{content:none}
#game-screen .minimap .minimap-button svg{width:22px;height:22px;display:block;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
#game-screen .minimap .minimap-button:is(:hover,:active,.is-pressed){background:#352c23;border-color:#d5b87b}
#game-screen .minimap .minimap-button:disabled{opacity:.5;cursor:default}
#game-screen .minimap .minimap-button:focus-visible{outline:2px solid #e4c58c;outline-offset:-3px}
#game-screen #minimap-restore{display:flex;justify-content:flex-end;pointer-events:none}
#game-screen .minimap small{display:block;padding:0;margin:0;text-align:center;color:#dccb9b;font:400 10px/14px Arial,sans-serif}
#game-screen .minimap .hud-tooltip{right:0;max-width:128px}
@media(pointer:coarse){#game-screen .minimap{--map-size:160px}}

#game-screen .game-window.menu-window .social-footer button{width:auto;min-width:44px;min-height:44px;padding:6px 8px;font:13px/1.4 Arial,sans-serif}

/* Round25: half-size visible controls; hit areas stay disjoint at the map corners. */
#game-screen .minimap .minimap-button{border:0;background:none;box-shadow:none;padding:0;position:relative;color:#e6c592}
#game-screen .minimap .minimap-button::before{content:'';display:block;position:absolute;left:11px;top:11px;width:22px;height:22px;box-sizing:border-box;border:1px solid #b3986966;background:#1a1a18eb;border-radius:2px;pointer-events:none}
#game-screen .minimap .minimap-button svg{position:relative;width:11px;height:11px;z-index:1}
#game-screen .minimap .minimap-button:is(:hover,:active,.is-pressed){background:none}
#game-screen .minimap .minimap-button:is(:hover,:active,.is-pressed)::before{background:#352c23;border-color:#d5b87b}
#game-screen .game-window.menu-window>header{cursor:grab;touch-action:none;user-select:none}
#game-screen .game-window.menu-window>header h2{pointer-events:auto;align-self:center}
#game-screen .game-window.menu-window>header:active{cursor:grabbing}
#game-screen .game-window.menu-window .character-progress-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
#game-screen .game-window.menu-window .character-progress-grid>span{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;gap:5px;border:1px solid #786b5266;padding:8px 3px;font-size:11px}
#game-screen #equipment-character-breakdown{display:grid;gap:7px;min-width:0;margin:8px 0 12px;font-size:11px}
#game-screen .equipment-contribution{min-width:0;padding:8px;border:1px solid #786b5266;background:#11151888;overflow-wrap:anywhere}
#game-screen .equipment-contribution h4{margin:0 0 3px;color:#e7d5aa;font-size:12px}
#game-screen .equipment-contribution small{color:#c7bca3}
#game-screen .equipment-contribution ul{margin:7px 0 0;padding-left:17px}
#game-screen .equipment-contribution li+li{margin-top:4px}
#game-screen .equipment-contribution p{margin:7px 0 0}
#game-screen .game-window.menu-window .character-attributes{display:grid;grid-template-columns:1fr;gap:6px}
#game-screen .game-window.menu-window .character-attributes .attribute-row{display:grid;grid-template-columns:32px 24px 24px minmax(0,1fr) 30px;gap:6px;align-items:center;border-bottom:1px solid #bca47336;padding:5px 0}
#game-screen .game-window.menu-window .attribute-row button{width:22px;height:22px;min-height:22px;padding:0}
#game-screen .live-portrait{margin:0;min-width:0;text-align:center}
#game-screen .live-portrait figcaption{font:10px/1.4 Arial,sans-serif;margin-top:5px;color:#b9aa94}
#game-screen #portrait-status{font-size:10px;color:#b9aa94}
#game-screen #game-character{font-weight:400;background:none}
#game-screen .equipment-board{display:inline-block;width:calc(100% - 66px);vertical-align:top;min-height:270px}
#game-screen #inventory-wardrobe{display:inline-flex;position:static;vertical-align:top;flex-direction:column;width:60px;padding:4px;margin:0;border:0;background:none;box-shadow:none}
#game-screen #inventory-wardrobe>header{font:10px Arial;margin-bottom:8px}
#game-screen #wardrobe-slots{display:grid;grid-template-columns:48px;gap:8px}
#game-screen .game-window.menu-window #inventory-slots{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(4,44px);gap:4px;min-height:224px}
#game-screen .game-window.menu-window :is(#inventory-slots,#wardrobe-slots)>[data-slot]{width:100%;min-width:0;min-height:44px;height:44px;padding:4px;display:grid;place-items:center;box-sizing:border-box;border:1px solid #786b5266;background:#151a1b}
#game-screen .game-window.menu-window #inventory-slots>[data-slot=weapon]{height:auto}
#game-screen :is(#inventory-slots,#wardrobe-slots)>[data-slot] svg{width:24px;height:24px;fill:none;stroke:#c6ab7e;stroke-width:1.3;stroke-linecap:round;stroke-linejoin:round}
#game-screen #game-inventory-panel{width:min(400px,calc(100% - 16px))}
#game-screen .inventory-page-controls{margin:8px 0}
#game-screen #game-settings-panel.settings-menu{display:flex;flex-direction:column;gap:5px}
#game-screen #game-settings-panel .menu-button{width:100%;min-height:38px;font:13px Arial;background:#141a1b;border:1px solid #786b5266;color:#ebddc9;padding:8px}
#game-screen .hud-menu-panel{max-height:calc(100% - 100px)}
#game-screen .hud-menu-scroll{flex:1 1 auto}
#game-screen .camera-orbit{right:max(2px,env(safe-area-inset-right));bottom:max(2px,env(safe-area-inset-bottom))}
#game-screen #game-social-panel>header h2{font-size:20px}
#game-screen #game-social-panel .window-body{padding-top:0}
#game-screen .social-person{display:flex;align-items:center;gap:7px;margin:5px 0}
#game-screen .social-person img{width:28px;height:34px;object-fit:cover;object-position:top}
#game-screen .presence-dot{width:8px;height:8px;border-radius:50%;background:#887f76;flex:0 0 8px}
#game-screen .presence-dot[data-online=true]{background:#5eaf6d}
#game-screen .social-person button{flex:1;min-width:0;text-align:left}
#game-screen .guild-title{display:flex;justify-content:space-between;gap:10px;align-items:center}
#game-screen .guild-title #social-guild{margin:0;font:13px Arial}
#game-screen .social-footer{display:flex;gap:5px;flex-wrap:wrap}
@media(max-width:700px){#game-screen .hud-menu-panel{max-height:calc(100% - 152px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}#game-screen .camera-orbit{display:none!important}#game-screen .equipment-board{min-height:246px}#game-screen .game-window.menu-window .character-summary{grid-template-columns:92px minmax(0,1fr)}}

#game-screen .equipment-and-costumes{display:grid;grid-template-columns:minmax(0,1fr) 58px;gap:8px;align-items:start}
#game-screen .equipment-and-costumes .equipment-board{width:auto;min-width:0}
#game-screen .equipment-and-costumes #inventory-wardrobe{width:auto;min-width:0}
#game-screen .game-window.menu-window #inventory-slots{grid-template-columns:repeat(4,minmax(38px,1fr))}
#game-screen #inventory-wardrobe #wardrobe-slots>[data-slot]{width:48px;height:48px}
#game-screen .game-window.menu-window .attribute-row b{text-align:center;font-weight:400}
#game-screen .hud-menu-panel .settings-menu h3{font:16px Georgia,serif;color:#c6ab7e;margin:8px 0}
#game-screen .game-window.menu-window>header{width:100%}
#game-screen #game-settings-panel .menu-button:disabled{opacity:.55}

#game-screen #game-settings-panel.settings-menu{width:100%}
#game-screen #game-social-panel #friend-invite{margin:0 0 8px}
#game-screen #game-social-panel .social-section:first-of-type{margin-top:0}

/* Round21: reset the old centered settings overlay now embedded in Menu. */
#game-screen #game-settings-panel.settings-menu{position:static;inset:auto;transform:none;translate:none;float:none;width:100%;max-width:100%;max-height:none;margin:0;padding:0;background:none;border:0;outline:0;box-shadow:none;box-sizing:border-box;flex:none}
#game-screen #game-settings-panel>*{position:static;inset:auto;transform:none;translate:none;box-sizing:border-box;max-width:100%;min-width:0;flex-shrink:0}
#game-screen .hud-menu-panel .hud-profile{flex-shrink:0;margin-bottom:12px}
#game-screen .hud-menu-scroll{min-width:0;overflow-x:hidden}
#game-screen .hud-menu-panel>.hud-menu-heading,#game-screen .hud-menu-panel>.hud-menu-logout{flex-shrink:0}
#game-screen .game-window.menu-window .character-attributes .attribute-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
#game-screen .attribute-half{display:flex;align-items:center;gap:8px;min-width:0}
#game-screen .attribute-half b{margin-left:auto}
#game-screen .character-stat-balance{margin:7px 0 4px;color:#ead19c;font-weight:700}
#game-screen .character-stat-detail{font-size:11px;line-height:1.4;color:#c9c2ad;margin:5px 0}
#game-screen .character-stat-status{display:block;min-height:1.2em;color:#ead19c}
#game-screen .vital-attribute{flex-wrap:wrap;gap:3px 6px}
#game-screen .vital-attribute>span{font-size:11px;line-height:1.2}
#game-screen .vital-attribute>b{overflow-wrap:anywhere}
#game-screen .physical-attribute>small{flex-basis:100%;font-size:10px;line-height:1.3;color:#c9c2ad;overflow-wrap:anywhere}
#game-screen .character-vitals-note{display:block;font-size:11px;margin:4px 0;color:#c9c2ad}
#game-screen .character-vitals-breakdown{font-size:11px;line-height:1.4;margin:5px 0;overflow-wrap:anywhere}
#game-screen .character-vitals-breakdown summary{cursor:pointer;color:#ead19c}
#game-screen .character-vitals-breakdown h4{margin:7px 0 3px}
#game-screen .character-vitals-breakdown p{margin:2px 0}
#game-screen #character-guild{display:flex;gap:5px;align-items:center;font-size:12px;margin-top:8px;overflow-wrap:anywhere}
#game-screen #character-guild[hidden]{display:none}
#game-screen #character-guild img{width:22px;height:22px;object-fit:contain}
#game-screen .game-window.menu-window .inventory-bag{width:100%;grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:auto;gap:2px;justify-content:stretch;box-sizing:border-box}
#game-screen .game-window.menu-window .inventory-bag>*{width:100%;height:auto;min-width:0;aspect-ratio:1;background-image:none}
#game-screen .game-window.menu-window .inventory-bag>[hidden]{display:none}
#game-screen .game-window.menu-window .inventory-bag>[style*="span 2"]{aspect-ratio:auto}
#game-screen .game-window.menu-window .inventory-bag{grid-template-rows:repeat(10,minmax(0,1fr));aspect-ratio:1/2}
#game-screen .game-window.menu-window .inventory-bag>*{aspect-ratio:auto}
#game-screen .inventory-bag .inventory-cell img{width:100%;height:100%;max-height:100%;object-fit:contain}
#game-screen .equipment-and-costumes{grid-template-columns:minmax(0,1fr) 66px;gap:8px}
#game-screen .equipment-board{background-size:auto 92%;background-position:center;background-repeat:no-repeat;min-height:260px;overflow:hidden}
#game-screen .game-window.menu-window .equipment-board{background-size:auto 92%;height:260px;min-height:260px}
#game-screen #inventory-wardrobe #wardrobe-slots{grid-template-columns:minmax(0,1fr)}
#game-screen .game-window.menu-window #inventory-slots>[data-slot]{height:100%;min-height:0}
#game-screen .game-window.menu-window #inventory-slots{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(4,52px);gap:4px}
#game-screen #inventory-wardrobe #wardrobe-slots>[data-slot]{width:56px;height:56px}
#game-screen .inventory-page-controls .bag-tabs{gap:2px}
#game-screen .inventory-page-controls .bag-tabs button{padding:3px;min-height:32px}
#game-screen #inventory-wallet{display:flex;align-items:center;gap:8px;padding:8px 4px;min-height:36px;height:auto;flex-shrink:0;overflow-wrap:anywhere}
#game-screen #inventory-wallet img{width:24px;height:24px;object-fit:contain}
#game-screen .independent-popup{z-index:12;width:min(360px,calc(100% - 16px))}
#game-screen .independent-popup>header h2{flex:1;min-width:0;overflow-wrap:anywhere;font-size:19px}
#game-screen .independent-popup>header button{position:static;flex-shrink:0;width:38px;height:38px;min-height:38px;padding:0}
#game-screen .independent-popup>header{gap:6px}
#game-screen .item-detail-icon{display:block;max-width:96px;height:128px;object-fit:contain;margin:auto}
#game-screen .shop-offer-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px}
#game-screen .shop-offer-grid button{aspect-ratio:1;padding:2px;min-width:0}
#game-screen .shop-offer-grid img{width:100%;height:100%;object-fit:contain}
#game-screen .social-person{display:flex;align-items:center;gap:6px;min-height:36px}
#game-screen .social-person>button{flex:1;text-align:left;min-width:0}
#game-screen .social-person>img{width:24px;height:30px;object-fit:contain}
#game-screen .conversation-history{height:190px;overflow:auto;overscroll-behavior:contain;overflow-wrap:anywhere}
#game-screen .conversation-history p{margin:4px 0;font-size:13px}
#game-screen .independent-popup form{display:flex;flex-wrap:wrap;gap:4px}
#game-screen .independent-popup input{min-width:0;flex:1;width:100%}
#game-screen .chat-envelope-dock{display:flex;flex-direction:column;gap:3px;position:absolute;top:100%;right:0;width:160px;max-height:min(30dvh,200px);overflow:auto;pointer-events:auto;margin-top:4px}
#game-screen .chat-envelope{font-size:12px;min-height:32px;overflow-wrap:anywhere;background:#141a19;color:#decba4;border:1px solid #77603f}
#game-screen .chat-envelope[data-unread=true]{border-color:#f5cf74;animation:chat-unread 1.4s ease-in-out infinite alternate}
@keyframes chat-unread{to{background:#5a4023}}
@media(prefers-reduced-motion:reduce){#game-screen .chat-envelope[data-unread=true]{animation:none;background:#5a4023}}
#game-screen #game-gm-menu label,#game-screen #game-gm-menu select{margin:4px}
#game-screen #game-gm-menu .window-body{row-gap:10px}
#game-screen #npc-travel-list>div{display:flex;align-items:center;gap:8px;margin:6px 0}
#game-screen .gm-map-controls{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:12px}
#game-screen .gm-map-controls[hidden],#game-screen .gm-map-controls [hidden]{display:none}
#game-screen .gm-map-controls label{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin:0}
#game-screen .gm-map-controls [role=status]{flex-basis:100%;margin:4px 0}
#game-screen .npc-portrait-fallback{display:inline-grid;place-items:center;width:30px;height:36px;border:1px solid #796443;flex-shrink:0;color:#b9a680}
@media(max-width:700px),(pointer:coarse){#game-screen .minimap{--map-size:136px}#game-screen .chat-envelope-dock{max-height:calc(100dvh - 320px - env(safe-area-inset-bottom));width:136px}}

/* Round27: one stack, compact social actions, source equipment coordinates. */
#game-screen .social-toolbar{display:grid;grid-template-columns:repeat(3,minmax(44px,1fr));gap:8px}
#game-screen .social-toolbar>button{width:100%;height:44px;display:grid;place-items:center;padding:0}
#game-screen .social-toolbar svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.6}
#game-screen .chat-block{font-size:22px;margin-left:auto}
#game-screen .chat-older{margin:12px 0}
#game-screen #character-guild{justify-content:center;text-align:center;border:1px solid #786b5266;padding:5px;font:400 18px Georgia,serif;color:#eee0c9;background:#11151888}
#game-screen #game-character,#game-screen #character-guild{font:400 18px Georgia,serif;text-align:center;justify-content:center;color:#eee0c9;border:1px solid #786b5266;padding:5px;box-sizing:border-box;background:#11151888;width:100%}
#game-screen #game-settings-panel>.menu-button{display:block;width:100%;background:#141a1b;border:1px solid #786b5266;color:#ebddc9}
#game-screen #game-settings-panel>.menu-button:hover:not(:disabled){background:#3c2820;border-color:#b79a65}
#game-screen #game-settings-panel>.menu-button:focus-visible{outline:2px solid #dec08b;outline-offset:1px}
#game-screen .shop-offer-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#game-screen .shop-offer-grid>button{min-height:108px}
#game-screen .item-detail-icon,#game-screen #costume-shop-icon{display:block;width:min(100%,180px);max-width:180px;height:240px;object-fit:contain;margin:8px auto}
#game-screen .equipment-and-costumes{grid-template-columns:38px minmax(0,1fr) 58px;gap:6px}
#game-screen .emotion-mask-column{font-size:10px;text-align:center}
#game-screen #emotion-mask-slot>[data-slot]{display:grid;place-items:center;min-height:38px;width:36px;border:1px solid #786b5266;padding:2px;box-sizing:border-box}
#game-screen #emotion-mask-slot svg{width:26px;height:26px;fill:none;stroke:#c6ab7e;stroke-width:1.3}
#game-screen .inventory-extra-slots{display:flex;gap:6px;justify-content:center;margin-top:6px}
#game-screen .inventory-extra-slots>[data-slot]{display:grid;place-items:center;width:40px;height:40px;border:1px solid #786b5266;padding:3px}
#game-screen .inventory-extra-slots svg{width:24px;height:24px;fill:none;stroke:#c6ab7e;stroke-width:1.3}
#game-screen #game-inventory-panel .equipment-and-costumes>.equipment-board{box-sizing:border-box;display:block;position:relative;height:300px;min-height:300px;aspect-ratio:150/182;background-size:auto 100%;padding:0;overflow:hidden;align-self:start;margin:0}
#game-screen .game-window.menu-window #inventory-slots{display:block;position:absolute;inset:0;width:100%;height:100%;min-height:0;padding:0}
#game-screen .game-window.menu-window #inventory-slots>[data-slot]{position:absolute;min-height:0;width:21.33%;height:17.58%;padding:1px}
#game-screen #inventory-slots>[data-slot=weapon]{left:2%;top:1.65%;height:52.75%!important}
#game-screen #inventory-slots>[data-slot=armor]{left:26%;top:20.33%;height:35.16%!important}
#game-screen #inventory-slots>[data-slot=helmet]{left:26%;top:1.1%}
#game-screen #inventory-slots>[data-slot=boots]{left:26%;top:79.67%}
#game-screen #inventory-slots>[data-slot=bracelet]{left:50%;top:36.81%}
#game-screen #inventory-slots>[data-slot=necklace]{left:76%;top:46.15%}
#game-screen #inventory-slots>[data-slot=earrings]{left:76%;top:28.57%}
#game-screen #inventory-slots>[data-slot=shield]{left:50%;top:19.23%}
#game-screen #inventory-slots>[data-slot=finger]{left:1.33%;top:62.09%}
#game-screen #inventory-slots>[data-slot=belt]{left:50%;top:62.09%}
#game-screen #game-use-npc{position:absolute;right:max(14px,env(safe-area-inset-right));bottom:calc(190px + env(safe-area-inset-bottom));z-index:18;min-width:88px;min-height:44px;border:1px solid #b79a65;border-radius:24px;color:#ead7ae;background:radial-gradient(#39301d,#171c17);font-size:13px;max-width:180px}
#game-screen .emoji-picker{position:absolute;bottom:54px;right:8px;display:flex;flex-wrap:wrap;gap:4px;padding:6px;background:#151a1b;border:1px solid #b79a65;z-index:2}
#game-screen .emoji-picker button{min-width:36px;padding:4px}
#game-screen #world-chat-toggle{position:absolute;bottom:calc(20px + env(safe-area-inset-bottom));left:12px;z-index:18;background:#151a1be8;color:#decba4;border:1px solid #826f4f;min-height:36px}
#game-screen .world-chat-drawer{position:absolute;left:12px;bottom:calc(64px + env(safe-area-inset-bottom));top:auto;right:auto;width:min(420px,calc(100% - 24px));height:420px;max-height:calc(100% - 150px);padding:12px}
#game-screen .world-chat-history{overflow:auto;min-height:0;flex:1;overflow-wrap:anywhere;font-size:13px}
#game-screen .world-chat-drawer form{display:flex;flex-wrap:wrap;gap:4px;position:relative}
#game-screen .world-chat-drawer input{width:100%;min-width:0}
#game-screen .world-chat-bubble{position:absolute;z-index:8;pointer-events:none;transform:translate(-50%,-100%);background:#151a1bdd;color:#fff0cc;border:1px solid #8e7850;padding:5px;max-width:180px;border-radius:6px;overflow-wrap:anywhere;font-size:12px}
#game-screen .world-chat-bubble img{width:44px;height:44px;object-fit:contain}
#game-screen .emotion-wheel .window-body{display:grid;grid-template-columns:1fr 1fr;gap:8px}
#game-screen .emotion-wheel img{display:block;width:48px;height:48px;object-fit:contain;margin:auto}
@media(max-width:700px){#game-screen #hud-menu-panel{width:min(340px,calc(100% - 16px));right:auto;border-right:1px solid #9f8152}#game-screen #world-chat-toggle{left:116px;bottom:calc(82px + env(safe-area-inset-bottom))}#game-screen .world-chat-drawer{bottom:calc(128px + env(safe-area-inset-bottom));height:420px;max-height:calc(100% - 100px)}}

/* Round15: dimensions belong to layout, independent of absolutely positioned slots. */
#game-screen .emoji-picker{display:grid;grid-template-columns:repeat(6,36px);max-height:192px;max-width:calc(100% - 16px);overflow:auto;overscroll-behavior:contain}
#game-screen .world-chat-drawer>header{display:flex;align-items:center;gap:8px;flex-shrink:0}
#game-screen .world-chat-drawer>header h2{flex:1;margin:0;font-size:18px}
#game-screen .world-chat-drawer form{flex-shrink:0}
#game-screen .world-chat-drawer select{margin-left:auto;max-width:100%;min-width:0}
#game-screen .world-chat-drawer>p:empty{display:none}
#game-screen #game-social-panel{height:min(650px,calc(100dvh - 110px));min-height:0}
#game-screen #game-social-panel .window-body{flex:1;min-height:0;overflow:auto}
#game-screen #game-social-panel.menu-window .social-section{padding:8px 10px;margin:0 0 8px}
#game-screen #game-social-panel .social-section summary{margin:0 0 6px;padding:0 0 6px;min-height:0}
#game-screen #game-social-panel #social-status:empty{display:none}
#game-screen #game-social-panel .social-toolbar{margin-top:auto;flex-shrink:0}
#game-screen #npc-travel-list img{width:44px;height:54px;object-fit:cover;flex-shrink:0;border:1px solid #786b52}
@media(max-width:700px){#game-screen #game-use-npc{right:calc(16px + env(safe-area-inset-right));bottom:calc(176px + env(safe-area-inset-bottom));width:68px;min-width:68px;max-width:68px;min-height:44px;padding:4px}#game-screen #game-inventory-panel .equipment-and-costumes>.equipment-board{height:280px;min-height:280px}}

#game-screen dialog.game-confirm{position:fixed;inset:0;margin:auto!important;width:min(390px,calc(100vw - 24px));height:fit-content;max-height:calc(100dvh - 32px);z-index:200;color:#ead7ae}#game-screen dialog.game-confirm:not([open]){display:none}#game-screen dialog.game-confirm::backdrop{background:#0009}#game-screen dialog.game-confirm header{display:flex;align-items:center;gap:12px}#game-screen dialog.game-confirm h2{flex:1;font-size:20px;margin:0}#game-screen dialog.game-confirm .window-body>div{display:flex;justify-content:flex-end;gap:8px}

/* Round20: preserve the accepted frame, remove only EQ silhouette. */
#game-screen #game-inventory-panel .equipment-and-costumes>.equipment-board{background-image:none;background-color:#111817}
#game-screen .emotion-mask-column{width:38px;overflow-wrap:normal;line-height:1.3}
#game-screen .emotion-mask-column small{display:block;margin-bottom:5px}
#game-screen #inventory-slots>[data-slot=belt]{left:26%;top:59%;height:17.58%!important}
#game-screen .inventory-extra-slots:empty{display:none}
#game-screen .inventory-extra-slots>.legacy-finger{width:auto;min-width:140px;height:36px;display:flex;gap:8px;align-items:center;font-size:11px}
#game-screen :is(#inventory-slots,#wardrobe-slots)>[data-slot] svg{width:24px;height:24px;aspect-ratio:1;flex-shrink:0}
#game-screen .hud-menu-panel{height:min(730px,calc(100% - 182px))}
#game-screen .hud-menu-scroll{scrollbar-gutter:stable;overflow-anchor:none}
#game-screen #world-chat-toggle{display:flex;align-items:center;gap:8px;padding:6px 10px;border-radius:6px;border:1px solid #776c4e;background:#17201fe8;color:#e1d7be;font:11px/1.3 Arial,sans-serif}
#game-screen #world-chat-toggle svg{width:17px;height:17px;fill:none;stroke:#c2ac74;stroke-width:1.5}
#game-screen .chat-online-dot{width:5px;height:5px;border-radius:50%;background:#777}
#game-screen #world-chat-toggle[data-connected=true] .chat-online-dot{background:#72b174;box-shadow:0 0 4px #72b17488}
#game-screen .world-chat-filters{display:flex;gap:12px;flex-shrink:0;font-size:12px}
#game-screen .world-chat-filters label{display:flex;gap:4px;align-items:center}
#game-screen .world-chat-filters input{width:auto}
#game-screen #map-open.minimap-tp{font:700 12px/1 Arial,sans-serif;min-width:44px;width:44px;height:44px;min-height:44px;background:none;color:#d6bd85;border:0}
#game-screen #game-use-npc{width:52px;min-width:52px;max-width:52px;height:52px;min-height:52px;padding:5px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;border-radius:50%;background:#182320dc;border:1px solid #64716999;box-shadow:inset 0 0 0 3px #07130d33;color:#f1e9d6}
#game-screen #game-use-npc svg{width:25px;height:25px;fill:none;stroke:currentColor;stroke-width:1.4;stroke-linejoin:round}
#game-screen #game-use-npc small{font:10px/1 Arial,sans-serif}
#game-screen .use-npc-name{position:absolute;right:calc(100% + 7px);top:50%;transform:translateY(-50%);font:11px/1.25 Arial,sans-serif;max-width:120px;width:max-content;overflow-wrap:anywhere;text-align:right;pointer-events:none;text-shadow:0 1px 3px #000,1px 0 2px #000}
@media(max-width:700px){#game-screen #game-use-npc{right:calc(24px + env(safe-area-inset-right));bottom:calc(176px + env(safe-area-inset-bottom))}#game-screen .hud-menu-panel{height:min(730px,calc(100% - 152px))}}

#game-screen #map-open.minimap-tp::before{content:"";left:7px;top:8px;width:30px;height:28px;background:#141b1a;border:1px solid #a58b59}#game-screen #map-open.minimap-tp>span{position:relative;z-index:1}

/* Keep the mobile trigger centered on the game viewport, above the navigation. */
@media(max-width:700px){#game-screen #world-chat-toggle{left:50%;right:auto;transform:translateX(-50%);bottom:calc(82px + env(safe-area-inset-bottom));white-space:nowrap}}
#game-screen .world-chat-filters button{border:1px solid #8d7755;background:#25231d;color:#d8c79e;padding:5px 10px;min-height:34px;font:600 12px Arial,sans-serif}
#game-screen .world-chat-filters button[aria-pressed=false]{border-color:#57544d;background:#171a1a;color:#89877f}
#game-screen .world-chat-filters button[aria-pressed=true]{background:#5a3a25;color:#fff0cc;border-color:#d4aa65}
#game-screen .world-chat-filters button[aria-pressed=false]{background:#111619;color:#b9b4a9}
#game-screen .world-chat-send-label{display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0;flex:1 1 100%;font-size:12px;color:#ead9b7}
#game-screen .world-chat-send-label select{flex:0 1 auto;margin:0}
#game-screen .world-chat-drawer form>.emoji-toggle{font-size:22px;min-width:36px}
#game-screen .scroll-hint-up{box-shadow:inset 0 10px 9px -12px #d7bd86}
#game-screen .scroll-hint-down{box-shadow:inset 0 -10px 9px -12px #d7bd86}
#game-screen .scroll-hint-up.scroll-hint-down{box-shadow:inset 0 10px 9px -12px #d7bd86,inset 0 -10px 9px -12px #d7bd86}
#game-screen .world-chat-filters button:focus-visible{outline:2px solid #e1c484;outline-offset:2px}
/* The board's percentage slots are relative to this own width, not the wardrobe column. */
#game-screen #game-inventory-panel .equipment-and-costumes{grid-template-columns:38px minmax(150px,1fr) 76px;gap:10px;min-width:0}
#game-screen #game-inventory-panel .equipment-and-costumes>.equipment-board{width:100%;aspect-ratio:auto;min-width:0}
#game-screen #game-inventory-panel #inventory-wardrobe{min-width:0;overflow:visible}
#game-screen #game-inventory-panel #inventory-wardrobe>header{white-space:normal;overflow-wrap:anywhere;font-size:11px;padding:3px 0}
@media(max-width:700px){#game-screen #game-inventory-panel .equipment-and-costumes{grid-template-columns:36px minmax(132px,1fr) 68px;gap:6px}}
#game-screen .character-rank{color:#d7bd8c;font-size:11px;text-shadow:0 1px 2px #000}
#game-screen .rank-name-button{display:block;background:none;border:0;color:#ebddc9;font:700 17px Georgia,serif;padding:2px 0;cursor:pointer;text-align:left}
#game-screen .rank-name-button:hover{text-decoration:underline}
#game-screen #game-character-rank{display:block;text-align:center;justify-content:center;border:1px solid #786b5266;padding:5px;margin-top:3px;font:400 18px Georgia,serif;background:#11151888;text-shadow:0 1px 2px #000}
#game-screen #character-guild{font-size:20px}
#game-screen #game-beta-panel{width:min(430px,calc(100% - 16px))}
#game-screen .beta-body{display:grid;gap:10px;min-width:0}
#game-screen .beta-body form{display:flex;gap:6px;flex-wrap:wrap}
#game-screen .beta-body form input{flex:1 1 110px;min-width:0}
#game-screen .beta-body button{background:#25231d;border:1px solid #8d7755;color:#e5d5b1;min-height:36px;padding:6px 10px}
#game-screen .beta-body input{background:#101719;border:1px solid #685d46;color:#f3ead3;min-height:36px;padding:6px}
#game-screen .beta-item{display:grid;grid-template-columns:42px minmax(0,1fr) auto;align-items:center;gap:7px;padding:6px 0;border-bottom:1px solid #63543b77}
#game-screen .beta-item img{width:40px;height:40px;object-fit:contain}
#game-screen .beta-item input{grid-column:2;max-width:100px}
#game-screen .beta-item .beta-confirm{grid-column:3}
#game-screen .beta-body>div:last-child{display:flex;align-items:center;gap:8px;justify-content:center}

#game-screen #npc-travel-search{box-sizing:border-box;width:100%;min-width:0;margin:6px 0 12px;min-height:40px}
#game-screen #npc-travel-list h3{font:16px Georgia,serif;color:#d6bd86;margin:14px 0 6px}
#game-screen #npc-travel-list>div>span:not(.npc-portrait-fallback){min-width:0;overflow-wrap:anywhere;flex:1}

/* Private activity is presented independently of the shared world canvas. */
.hunt-entry{position:absolute;right:100%;top:0;min-width:44px;min-height:44px;font-size:12px}
.hunting-window{width:min(560px,calc(100vw - 20px));max-height:calc(100dvh - 80px)}
.hunting-window .window-body{display:flex;flex-direction:column;gap:8px;overflow:auto}
.hunting-window fieldset{display:flex;flex-direction:column;gap:6px;min-width:0}
.hunting-window label{display:flex;gap:8px;align-items:center}
.hunt-preview{width:100%;height:260px;max-height:40dvh;touch-action:none}
.hunt-status{position:absolute;top:12px;left:50%;transform:translateX(-50%);max-width:65vw;background:#171b1fee;border:1px solid #98805b;padding:6px;z-index:30;font-size:12px}
.hunt-status[hidden],.hunt-preview[hidden]{display:none}
.hunt-status button{font-size:12px;min-height:36px}.hunt-status span{display:block}

/* RPG8 selected EXP emblem and compact, bottom-aligned chat composer. */
#game-screen .minimap .hunt-entry{top:52px;right:calc(100% + 4px);width:56px;height:52px;min-width:44px;min-height:44px;padding:0;border:0;background:transparent;box-shadow:none;display:grid;place-items:center;touch-action:manipulation}
#game-screen .hunt-entry img{width:100%;height:100%;object-fit:contain;pointer-events:none}
#game-screen .hunt-entry:focus-visible{outline:2px solid #edca88;outline-offset:2px}
#game-screen .world-chat-drawer{display:flex;flex-direction:column;gap:6px}
#game-screen .world-chat-drawer.hidden{display:none}
#game-screen .world-chat-history{flex:1 1 0;min-height:0;overflow-y:auto}
#game-screen .world-chat-drawer form{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:4px;align-items:center;margin-top:auto}
#game-screen .world-chat-drawer form input{grid-column:1/-1;min-width:0;margin:0;width:100%}
#game-screen .world-chat-drawer form>.world-chat-send-label{grid-row:2;grid-column:1;min-width:0;justify-content:flex-start;flex:none}
#game-screen .world-chat-send-label select{min-width:0;max-width:100%;height:36px;padding:4px;font-size:12px}
#game-screen .world-chat-drawer form>button{min-height:36px;padding:5px 8px;margin:0}
#game-screen .world-chat-drawer>p{margin:0;font-size:12px;overflow-wrap:anywhere}
@media(min-width:420px){#game-screen .world-chat-drawer form{grid-template-columns:minmax(70px,.7fr) minmax(0,1.8fr) auto auto}#game-screen .world-chat-drawer form input{grid-column:2;grid-row:1}#game-screen .world-chat-drawer form>.world-chat-send-label{grid-column:1;grid-row:1}}
#game-screen .hunting-window{background:linear-gradient(145deg,#22201ff5,#0b1113fa);border:1px solid #c3a066;box-shadow:inset 0 0 0 4px #11171b,inset 0 0 0 5px #66563b,0 12px 30px #0009}
#game-screen .hunting-window>header{background:none;border-bottom:1px solid #77603d}#game-screen .hunting-window>header h2{font:20px Georgia,serif;color:#e8d5a6}

#game-screen .rpg8-wallpaper-window{background:radial-gradient(ellipse at 100% 0%,#64232321,transparent 48%),url('assets/ui/gui-v3/ornate-corner.svg') top left/34px 34px no-repeat,linear-gradient(155deg,#1c1f20f7,#0b0f11f7);border:1px solid #c3a066;box-shadow:inset 0 0 0 5px #11171b,0 14px 40px #0008;border-radius:0;color:#e9dec5}
#game-screen .rpg8-wallpaper-window::before{content:'';position:absolute;inset:6px;pointer-events:none;border:1px solid #bc95563d;z-index:0}
#game-screen .rpg8-wallpaper-window::after{content:'';position:absolute;inset:-9px auto auto 50%;transform:translateX(-50%);width:20px;height:18px;background:url('assets/ui/gui-v3/gold-diamond.svg') center/contain no-repeat;pointer-events:none}
#game-screen .rpg8-wallpaper-window>header{background:none;border-bottom:1px solid #77603d}
#game-screen .rpg8-wallpaper-window>header h2{font:20px Georgia,serif;color:#e8d5a6}
#game-screen .rpg8-wallpaper-window>header button{border:1px solid #85704d;color:#e5d4b0;background:#171b1b;box-shadow:none;border-radius:0}
#game-screen .rpg8-wallpaper-window .window-body>button,#game-screen .emotion-wheel button{background:linear-gradient(#7e3440,#4c212a);border:1px solid #b79563;color:#f1e4d1;font:14px Georgia,serif;padding:8px;min-height:36px}

/* EXP is interactive even though decorative minimap ancestors are not. */
#game-screen .minimap .hunt-entry{pointer-events:auto;top:0;right:calc(100% + 12px);z-index:4}

#game-screen .hunting-window .hunt-toggle{display:flex;align-items:center;justify-content:flex-start;gap:6px;margin:6px 0}.hunt-toggle>span{margin-right:4px}.hunt-toggle button{min-width:42px;min-height:36px;padding:5px}.hunt-toggle [aria-pressed=true]{outline:1px solid #edca88;background:#5a3928!important}

.channel-controls,.world-controls{display:flex;flex-wrap:wrap;gap:5px;margin:8px 0}.channel-controls>p{flex-basis:100%}.world-controls [aria-pressed=true],.channel-controls [aria-pressed=true]{outline:1px solid #edca88;background:#5a3928!important}

/* RPG11: one layout owner, definite rows, no wrapping canvas or legacy status. */
#game-screen .hunting-window.hunt-layout{position:absolute!important;inset:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(78px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))!important;transform:none!important;width:auto!important;height:auto!important;max-width:none!important;max-height:none!important;display:flex;flex-direction:column;z-index:45;min-width:0}
#game-screen .hunting-window.hunt-layout.hidden{display:none!important}
#game-screen .hunting-window.hunt-layout .window-body{display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,290px);grid-template-rows:auto auto auto auto minmax(0,1fr) auto auto;gap:10px;min-height:0;flex:1;overflow:auto}
.hunt-steps,.hunt-notice,.hunt-summary,.hunt-warning{grid-column:1/-1;margin:0!important;overflow-wrap:anywhere}.hunt-steps{grid-row:1}.hunt-notice{grid-row:2}.hunt-summary{grid-row:3}.hunt-warning{grid-row:4;font-size:11px;color:#d9c898}.hunt-selection{grid-column:1;grid-row:5;min-width:0;overflow:auto;align-self:start}.hunt-settings{grid-column:2;grid-row:5;min-width:0;display:grid;align-content:start;gap:8px;padding:12px;border:1px solid #796441;background:#101519}.hunt-toolbar{grid-column:1/-1;grid-row:6;display:flex;flex-wrap:wrap;gap:8px}.hunt-viewport{grid-column:1/-1;grid-row:5;min-width:0;min-height:220px;position:relative;overflow:hidden}.hunt-layout .window-body>p:last-child{grid-column:1/-1;grid-row:7;margin:0}
.hunt-layout:not(.expedition-view) .hunt-selection[data-step="0"],.hunt-layout:not(.expedition-view) .hunt-selection[data-step="1"]{grid-column:1/-1}
#game-screen .hunting-window.hunt-layout.expedition-view .window-body{grid-template-rows:auto auto auto auto minmax(220px,1fr) auto}
.hunt-layout.expedition-view .hunt-settings{grid-row:6;grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;padding:4px 8px}.hunt-layout.expedition-view .hunt-toolbar{grid-row:1;justify-content:flex-end}.hunt-layout.expedition-view .hunt-viewport{grid-row:5}
#game-screen .hunt-layout canvas.expedition-canvas,#game-screen .hunt-layout canvas.hunt-preview{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;max-height:none!important;min-height:0!important;display:block;touch-action:none}
#game-screen[data-expedition=true]>.game-nameplate,#game-screen[data-expedition=true]>.game-npc-nameplate,#game-screen[data-expedition=true]>#game-use-npc{visibility:hidden}
#game-screen .hunting-window.hunt-layout button{background:linear-gradient(#7e3440,#4c212a);border:1px solid #b79563;color:#f1e4d1;font:14px Georgia,serif;padding:8px;min-height:38px;white-space:normal}
.hunt-map-card{display:flex;flex-direction:column;gap:8px;max-width:330px;padding:12px!important}.hunt-map-card img{width:100%;aspect-ratio:1;object-fit:contain;display:block}.hunt-selection[data-step="1"]{display:grid;grid-template-columns:minmax(200px,330px) minmax(0,1fr);gap:16px}.hunt-selection>button:first-child:not(.hunt-map-card){grid-column:1/-1;justify-self:start}.hunt-spot-list{display:grid;align-content:start;gap:8px}.hunt-spot-card{display:flex;justify-content:space-between;gap:12px;padding:16px!important}.hunt-mob-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}.hunt-mob-card{display:grid;gap:10px;text-align:left;min-height:120px!important}.hunt-mob-card small{font:12px Arial,sans-serif}.hunt-mob-card[aria-pressed=true],.hunt-spot-card[aria-pressed=true]{outline:2px solid #e4bf70;background:linear-gradient(#56452b,#221d17)!important}
#game-screen .minimap .channel-entry{position:absolute;right:0;top:calc(var(--map-size)/2 - 18px);pointer-events:auto;z-index:4;width:36px;height:36px;min-width:36px;min-height:36px;padding:0;border:1px solid #b39869;background:#1a1a18ed;color:#e6c592;font:12px Arial,sans-serif;touch-action:manipulation}
@media(max-width:740px){#game-screen .hunting-window.hunt-layout .window-body{grid-template-columns:minmax(0,1fr);gap:8px}.hunt-settings{grid-column:1;grid-row:6}.hunt-toolbar{grid-row:7}.hunt-layout .window-body>p:last-child{grid-row:8}.hunt-selection[data-step="1"]{grid-template-columns:minmax(0,1fr)}.hunt-selection[data-step="1"] .hunt-map-card{max-width:180px}.hunt-mob-grid{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}.hunt-layout.expedition-view .hunt-viewport{min-height:220px}.hunt-layout.expedition-view .hunt-settings{flex-direction:column;align-items:stretch}}

/* Existing menu remains reachable; activity status does not repeatedly raise its window. */
#game-screen[data-expedition=true] #player-menu.hud-redesign{z-index:60}

/* RPG12: TP has a 44px target and a 30x28px visible frame. */
#game-screen .minimap .channel-entry{top:calc(var(--map-size)/2 - 22px);width:44px;height:44px;min-width:44px;min-height:44px;background:none;border:0;isolation:isolate}
#game-screen .minimap .channel-entry::before{content:"";position:absolute;z-index:-1;left:7px;top:8px;width:30px;height:28px;box-sizing:border-box;background:#141b1a;border:1px solid #a58b59}
