:root{--ink:#041526;--navy:#082e60;--blue:#087dd0;--violet:#853fe0;--gold:#fce56b;--edge:#001121;--slot:clamp(44px,calc((100dvh - 164px)/6),78px);--ui-scale:1;font-family:Trebuchet MS,Arial,sans-serif;color:#fff;color-scheme:dark}
*{box-sizing:border-box}html,body{width:100%;height:100%;overflow:hidden}button,input,select{font:inherit}button{color:inherit;cursor:pointer}button:disabled{cursor:default;opacity:.45}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #fff77d;outline-offset:2px}#canvas{image-rendering:pixelated;touch-action:none}#title-text:empty{display:none}#bilal-ui{position:fixed;inset:0;pointer-events:none;z-index:4;user-select:none;display:none;text-shadow:0 2px 1px #001323}#bilal-ui.online{display:block}#bilal-ui button,#bilal-ui input,#bilal-ui select,#bilal-ui label{pointer-events:auto}#bilal-ui button svg{width:28px;height:28px;fill:none;stroke:currentColor;stroke-width:2.3;stroke-linecap:round;stroke-linejoin:round;filter:drop-shadow(0 2px 0 #001421)}
.hud-status{pointer-events:auto;position:absolute;top:max(10px,env(safe-area-inset-top));left:max(12px,env(safe-area-inset-left));width:clamp(190px,30vw,385px);padding:9px 11px 10px;background:linear-gradient(120deg,#052743f2,#061b2bdc);border:2px solid #031322;border-radius:12px;box-shadow:0 3px 0 #0006}.status-heading{display:flex;align-items:center;gap:8px;font-weight:900;font-size:13px;margin-bottom:6px}.status-heading small{color:#90d5ff;margin-left:auto}.meter{height:21px;background:#020b18;border:2px solid #020c18;border-radius:4px;position:relative;margin-top:4px;overflow:hidden}.meter>i{display:block;height:100%;width:0;background:linear-gradient(#ff697a,#e5113b);transition:width .15s}.meter.mana>i{background:linear-gradient(#dd55ff,#9724ef)}.meter.xp{height:7px}.meter.xp>i{background:#ffd64f}.meter>span{position:absolute;inset:0;text-align:right;padding:0 6px;font-size:13px;font-weight:900;line-height:17px}.guild-badge{font-size:10px;border:1px solid #80e4ff;border-radius:4px;padding:2px 4px;color:#b9f6ff}
.hud-nav{position:absolute;right:max(12px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));display:flex;gap:6px}.hud-button{display:grid;place-items:center;width:54px;height:54px;border:2px solid var(--edge);border-radius:10px;background:linear-gradient(#119ce5,#0762a6);box-shadow:inset 0 2px 0 #5dcfff77,0 4px 0 #022037}.hud-button.active{background:linear-gradient(#b478f3,#7731c7)}.hud-button.menu-main{background:linear-gradient(#7555df,#402a99)}.hud-button:hover{filter:brightness(1.16)}
.hotkeys{position:absolute;top:calc(50% + 35px);transform:translateY(-50%);display:flex;flex-direction:column;gap:6px}.hotkeys.left{left:max(9px,env(safe-area-inset-left))}.hotkeys.right{right:max(9px,env(safe-area-inset-right))}.hotkey{position:relative;width:min(calc(var(--slot)*var(--ui-scale)),calc((100dvh - 130px)/6));height:min(calc(var(--slot)*var(--ui-scale)),calc((100dvh - 130px)/6));border:2px solid #18082e;border-radius:12px;background:linear-gradient(145deg,#9d56e8,#652eac);box-shadow:inset 0 2px 0 #ce9bff66,0 4px 0 #200d42;display:grid;place-items:center;padding:7px;overflow:hidden;touch-action:none}.hotkey:hover{filter:brightness(1.12)}.hotkey:active{transform:translateY(2px);box-shadow:0 1px 0 #200d42}.hotkey .key{position:absolute;top:3px;left:5px;font-size:11px;color:#ffea9a;font-weight:bold;z-index:2}.hotkey .count{position:absolute;right:4px;bottom:4px;font-size:13px;font-weight:900;z-index:2}.hotkey .slot-label{position:absolute;bottom:3px;left:2px;right:2px;text-align:center;font-size:9px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#e9d8ff}.hotkey .cooldown{position:absolute;inset:0;background:#030219a8;display:none;align-items:center;justify-content:center;font-size:23px;font-weight:900;z-index:3}.hotkey.empty{background:linear-gradient(#1b4677cc,#10365dcc);border-color:#032545}.hotkey.empty .plus{font-size:30px;color:#93b7d5}.spell-icon{display:inline-block;width:32px;height:32px;background-image:url(spells.png);background-repeat:no-repeat;image-rendering:pixelated;flex-shrink:0}.hotkey .spell-icon{transform:scale(1.35)}.item-icon{width:32px;height:32px;display:inline-block;background-repeat:no-repeat;image-rendering:pixelated;flex-shrink:0}.hotkey .item-icon{transform:scale(1.4)}.fallback-icon{font-size:24px;color:#e1cbff}
.hud-bottom{position:absolute;bottom:max(10px,env(safe-area-inset-bottom));right:calc(var(--slot)*var(--ui-scale) + 20px);display:flex;gap:7px}.chip{border:2px solid #01172b;border-radius:8px;background:linear-gradient(#117ab5,#075583);padding:8px 13px;font-weight:900;box-shadow:0 3px 0 #011a2e;font-size:13px}.chip.assist-on{background:linear-gradient(#2c9d69,#147341)}.hud-brand{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);font-weight:900;letter-spacing:.3em;font-size:11px;color:#ffffff90}.native-head{position:absolute;top:10px;left:50%;transform:translateX(-50%);display:none;align-items:center;gap:18px;background:#052e58;padding:8px 12px;border-radius:10px;border:2px solid #041b32;pointer-events:auto}.native-head button{border:0;background:#8a42d6;border-radius:6px;padding:7px 13px;font-weight:bold}
.shade{position:absolute;inset:0;background:#00122180;display:none;align-items:center;justify-content:center;padding:max(12px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(12px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));pointer-events:auto}.shade.open{display:flex}.menu-shell{width:min(1180px,100%);height:min(760px,100%);display:flex;flex-direction:column;border:3px solid #001729;border-radius:18px;overflow:hidden;background:linear-gradient(135deg,#083d78,#072d5b);box-shadow:0 14px 50px #0008}.menu-top{display:flex;gap:12px;align-items:center;background:#06264a;padding:12px 18px;border-bottom:2px solid #021a2e}.menu-logo{font-size:23px;letter-spacing:.15em;font-weight:1000;color:#f7db83}.menu-top .who{font-size:12px;color:#a0c7e9;margin-right:auto}.close-menu{border:2px solid #071421;border-radius:8px;background:linear-gradient(#756180,#443e54);width:46px;height:42px;font-weight:900;font-size:28px;box-shadow:0 3px 0 #020e19}.menu-tabs{display:flex;gap:8px;padding:12px 16px;background:#062b53;border-bottom:2px solid #02182e;overflow-x:auto;flex-shrink:0}.menu-tab{flex:1;min-width:88px;border:2px solid #02182e;border-radius:10px;background:linear-gradient(#15548d,#123a67);box-shadow:0 4px 0 #031b32;padding:10px 9px;font-weight:900;font-size:14px;display:flex;flex-direction:column;align-items:center;gap:5px;white-space:nowrap}.menu-tab.active{background:linear-gradient(#9959e5,#7137bb);border-color:#28144c}.menu-body{flex:1;min-height:0;overflow:auto;padding:20px;overscroll-behavior:contain;scrollbar-color:#2486c4 #06294e}.menu-body h2{font-size:22px;margin:0 0 6px}.lead{color:#acd7f4;margin:0 0 20px;font-size:14px;line-height:1.5}.tile-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}.feature-tile{background:linear-gradient(135deg,#0e6ab0,#0c467c);border:2px solid #022341;border-radius:12px;padding:18px;text-align:left;min-height:100px;box-shadow:0 4px 0 #021c32;display:flex;flex-direction:column;gap:8px;font-weight:900;font-size:16px}.feature-tile small{font-weight:normal;font-size:12px;color:#badbf3;line-height:1.4}.feature-tile:hover{border-color:#40b5ed}.feature-tile.highlight{background:linear-gradient(140deg,#9152d9,#5631a0)}.section-label{margin:24px 0 10px;color:#91cdf3;font-size:12px;text-transform:uppercase;letter-spacing:.12em;font-weight:bold}.toolbar{display:flex;align-items:center;gap:9px;margin-bottom:16px;flex-wrap:wrap}.subtabs{display:flex;gap:8px;flex:1}.subtabs button{padding:10px 17px;background:#05274a;border:1px solid #0e4f7b;border-radius:7px;font-weight:bold}.subtabs button.selected{border-bottom:3px solid #fff;background:#0b5288}.switch{display:flex;align-items:center;gap:8px;font-weight:900;color:#ffe45c}.switch input{width:21px;height:21px;accent-color:#e7cf35}.assistant-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.assistant-card{border:2px solid #06325e;border-radius:12px;background:#06294a;padding:18px}.assistant-card .card-head{display:flex;align-items:center;gap:10px;margin-bottom:15px}.assistant-card output{margin-left:auto;font-weight:900;white-space:nowrap}.assistant-card input[type=range]{width:100%;accent-color:#f4da38;min-height:26px}.choice-row{display:flex;gap:7px;flex-wrap:wrap;margin-top:12px}.choice{position:relative;display:flex;align-items:center;flex-direction:column;justify-content:center;gap:7px;padding:9px 6px;min-width:64px;min-height:78px;border:2px solid #002444;background:#0873bd;border-radius:9px;box-shadow:0 3px 0 #021a2b}.choice.selected{background:#20942e;border-color:#71df6a}.choice small{font-size:10px;max-width:90px;font-weight:bold}.choice .quantity{position:absolute;right:4px;top:4px;font-size:11px;font-weight:bold}.form-actions{display:flex;justify-content:center;gap:16px;margin:22px 0 0}.primary,.secondary,.danger{padding:11px 24px;font-weight:900;border:2px solid #032114;border-radius:9px;background:linear-gradient(#28a75e,#087336);box-shadow:0 4px 0 #052317}.secondary{background:linear-gradient(#176aa3,#10476f);border-color:#03223c;box-shadow:0 4px 0 #041c31}.danger{background:linear-gradient(#ca494a,#942b3b);border-color:#3b0c15;box-shadow:0 4px 0 #3b0c15}.notice{padding:12px 16px;background:#0e5480;border-left:4px solid #64d0ff;border-radius:5px;font-size:14px;line-height:1.5;margin-bottom:16px}.store-card{display:grid;grid-template-columns:110px 1fr;gap:24px;padding:28px;background:linear-gradient(120deg,#482e87,#104578);border:2px solid #9880db;border-radius:15px}.store-emblem{display:grid;place-items:center;width:100px;height:100px;border:2px solid #bfa0ff;border-radius:22px;background:#281c57;font-size:50px}.price{color:#ffd96d;font-weight:900;font-size:18px;margin:18px 0}.stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:10px;margin:20px 0}.stat-card{background:#09558d;border-radius:10px;padding:16px}.stat-card small{color:#9fddff;display:block;margin-bottom:8px}.stat-card strong{font-size:22px}.editor-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:8px;margin-bottom:20px}.editor-slot{border:2px solid #152c51;background:#45317a;border-radius:9px;padding:10px 4px;display:flex;flex-direction:column;align-items:center;gap:6px;min-height:84px;font-size:11px}.editor-slot.selected{border-color:#ffe568}.edit-form{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field{display:flex;flex-direction:column;gap:7px;font-size:13px;color:#bde4ff}.field input,.field select,.search{padding:11px;border:2px solid #04213c;border-radius:7px;background:#061e37;color:white;width:100%;min-height:44px}.field.full{grid-column:1/-1}.empty-state{padding:25px;text-align:center;color:#b4d9f3}.guild-mark{font-size:50px;font-weight:900;color:#afedff;padding:15px}.toast{position:absolute;left:50%;bottom:70px;transform:translateX(-50%);background:#031d32f5;border:1px solid #53bbf0;padding:12px 20px;border-radius:10px;max-width:80%;font-size:14px;text-align:center;display:none}.joystick{position:fixed;width:116px;height:116px;border:2px solid #e4f2ff70;border-radius:50%;background:#123f6370;z-index:7;pointer-events:none;display:none;box-shadow:inset 0 0 25px #acd9ff30}.joystick i{position:absolute;width:46px;height:46px;top:33px;left:33px;background:#b4eaffb8;border:2px solid #eefaff;border-radius:50%;box-shadow:0 3px 8px #001c3d88}
@media(max-height:600px){:root{--slot:clamp(44px,calc((100dvh - 110px)/6),60px)}.hud-status{padding:4px 8px;width:210px}.status-heading{font-size:11px;margin-bottom:2px}.meter{height:16px;margin-top:2px}.meter>span{font-size:11px;line-height:12px}.hud-nav{gap:4px}.hud-button{width:43px;height:43px}.hud-button svg{width:24px!important;height:24px!important}.hotkeys{gap:4px;top:calc(50% + 28px)}.hotkey{border-radius:8px}.hotkey .spell-icon,.hotkey .item-icon{transform:scale(.9)}.hotkey .key{font-size:9px}.hotkey .slot-label{display:none}.hud-brand{display:none}.hud-bottom{bottom:5px}.chip{padding:6px 10px;font-size:11px}.menu-top{padding:6px 12px}.menu-logo{font-size:18px}.menu-tabs{padding:6px 10px;gap:5px}.menu-tab{padding:6px;min-width:74px;font-size:12px;flex-direction:row;justify-content:center}.menu-tab svg{width:19px!important;height:19px!important}.menu-body{padding:14px}.assistant-card{padding:12px}.choice{min-height:62px;min-width:54px}.store-card{padding:18px}.close-menu{height:34px;width:38px;font-size:23px}}
@media(max-width:700px){.hud-nav{top:12px}.hud-button{width:40px;height:40px}.hud-nav .optional{display:none}.hud-status{width:190px}.menu-tabs{justify-content:flex-start}.menu-tab{flex:none;min-width:85px}.assistant-grid{grid-template-columns:1fr}.edit-form{grid-template-columns:1fr}.editor-grid{grid-template-columns:repeat(4,1fr)}.menu-logo{font-size:18px}.menu-top .who{font-size:10px}.store-card{grid-template-columns:1fr}.store-emblem{width:70px;height:70px;font-size:32px}.hud-brand{display:none}.tile-grid{grid-template-columns:1fr 1fr}.feature-tile{padding:12px;font-size:14px}.hotkey .spell-icon,.hotkey .item-icon{transform:scale(1)}.menu-body h2{font-size:19px}}

#bilal-ui.native-open>.hud-status,#bilal-ui.native-open>.hud-nav,#bilal-ui.native-open>.hud-bottom,#bilal-ui.native-open>.hud-brand{display:none}
/* Bilal 1.2: native Tibia desktop, leather and bronze combat slots. */
:root{--slot:56px;--ink:#171815;--navy:#24241f;--blue:#74654a;--violet:#756044;--gold:#dfc38b;--edge:#090b0b}
#canvas{image-rendering:auto}
#bilal-ui{--map-left:0px;--map-right:0px;--map-top:30px;--map-height:70vh;font-family:Arial,sans-serif;text-shadow:0 1px 1px #000}
#bilal-ui>.hud-status,#bilal-ui>.hud-nav,#bilal-ui>.hud-bottom,#bilal-ui>.hud-brand,#bilal-ui>.native-head{display:none!important}
.hotkeys{top:calc(var(--map-top) + var(--map-height)/2);gap:5px}
.hotkeys.left{left:calc(var(--map-left) + 10px)}.hotkeys.right{right:calc(var(--map-right) + 10px)}
.hotkey{width:min(calc(var(--slot)*var(--ui-scale)),calc((var(--map-height) - 72px)/6));height:min(calc(var(--slot)*var(--ui-scale)),calc((var(--map-height) - 72px)/6));min-width:24px;min-height:24px;border:2px solid #9a8258;border-radius:4px;padding:4px;background:radial-gradient(ellipse at 50% 0,#64574455,transparent 60%),repeating-linear-gradient(135deg,#ffffff05 0 1px,transparent 1px 4px),linear-gradient(#30312c,#171c1b);box-shadow:0 0 0 1px #080b0b,inset 0 0 0 2px #3a3427,inset 0 2px 1px #d6be8055,0 3px 4px #0009}
.hotkey::before,.hotkey::after{content:'';position:absolute;width:3px;height:3px;border-radius:50%;background:#bba375;box-shadow:0 1px 1px #000;pointer-events:none}.hotkey::before{top:3px;right:3px}.hotkey::after{bottom:3px;left:3px}
.hotkey:hover{border-color:#e5c88b;filter:brightness(1.1)}.hotkey:active{transform:translateY(1px);box-shadow:0 0 0 1px #080b0b,inset 0 2px 6px #000b}
.hotkey .key{font-family:Arial,sans-serif;font-size:10px;top:2px;left:4px;color:#e8d2a3;line-height:10px}.hotkey .count{font-size:11px;bottom:2px;right:3px;color:#eee5cf}.hotkey .slot-label{display:none}.hotkey .spell-icon,.hotkey .item-icon{transform:scale(1);image-rendering:auto}.hotkey .cooldown{font-size:17px;background:#100d08b8;color:#f4d797}.hotkey.empty{background:#1d211e;border-color:#5f6555}
.bilal-tools{position:absolute;right:calc(var(--map-right) + 9px);top:calc(var(--map-top) + 7px);display:flex;gap:4px;pointer-events:auto}.bilal-tools button{width:26px;height:24px;padding:0;border:1px solid #a68f68;border-radius:2px;color:#ebd5ab;background:linear-gradient(#4b493e,#252822);box-shadow:inset 0 0 0 1px #22251e,0 2px 3px #0008;font-size:19px;font-weight:bold;line-height:20px}.bilal-tools button:hover{border-color:#ead29e;background:#56513f}
.shade{background:#0009}.menu-shell{width:min(900px,100%);height:min(720px,100%);border:2px solid #9e875f;border-radius:5px;background:repeating-linear-gradient(135deg,#ffffff02 0 1px,transparent 1px 4px),#242722;box-shadow:0 0 0 2px #0d100d,inset 0 0 0 1px #e4c98d33,0 15px 70px #000a}.menu-top{background:linear-gradient(#444439,#22251f);border-bottom:1px solid #8d7954;padding:8px 14px}.menu-logo{font-family:Georgia,serif;font-size:20px;color:#dbc18c}.menu-top .who{color:#c4c1b4}.close-menu{border:1px solid #9f895d;border-radius:3px;background:linear-gradient(#585044,#262924);width:32px;height:30px;font-size:22px;box-shadow:0 2px 2px #0007}.menu-tabs{padding:8px;background:#191e1b;border-color:#544f3d;gap:5px}.menu-tab{min-width:78px;padding:7px;border:1px solid #605b48;border-radius:3px;background:linear-gradient(#393e34,#252b24);color:#c9c4b6;font-size:12px;flex-direction:row;justify-content:center;box-shadow:0 2px 1px #0007}.menu-tab svg{width:19px!important;height:19px!important}.menu-tab.active{background:linear-gradient(#6b5f45,#3d3b2b);border-color:#b59b66;color:#f1ddaf}.menu-body{padding:18px;scrollbar-color:#81704d #191d19}.menu-body h2{font-family:Georgia,serif;font-size:21px;color:#ead3a3}.lead{color:#c4c3b8;font-size:13px}.section-label{color:#c8b084}.editor-slot{background:linear-gradient(#30362f,#1b221e);border:1px solid #72634c;border-radius:4px;color:#d1cbb9}.editor-slot.selected{border-color:#dcc181;box-shadow:inset 0 0 12px #b6974530}.field{color:#d1c7af}.field input,.field select,.search{background:#131b17;border:1px solid #746850;border-radius:3px;color:#e1dacb}.primary,.secondary,.danger{border-radius:3px;border:1px solid #918363;box-shadow:0 2px 2px #0008}.primary{background:linear-gradient(#516441,#263e27);color:#f1e5c9}.secondary{background:linear-gradient(#4b4d41,#252d26)}.danger{background:linear-gradient(#70463c,#3f2925)}.assistant-card{background:#19211c;border:1px solid #625d45;border-radius:4px}.switch{color:#e5cc92}.subtabs button{background:#1c251f;border:1px solid #665e43;border-radius:3px}.subtabs button.selected{background:#4d503b;border-bottom:2px solid #dfc182}.choice{background:linear-gradient(#384237,#242d25);border:1px solid #6a7154;border-radius:4px;box-shadow:0 2px 1px #0009}.choice.selected{background:#385636;border-color:#b0c885}.notice{background:#354034;border-color:#bda36b;color:#dedccc}.feature-tile,.feature-tile.highlight{background:linear-gradient(#41473b,#283128);border:1px solid #746b50;border-radius:4px;box-shadow:0 2px 2px #0008;color:#e9ddc1}.feature-tile small{color:#bfc4b3}.feature-tile:hover{border-color:#ceb77c}.store-card{background:linear-gradient(120deg,#433b2a,#26362c);border:1px solid #a28b59;border-radius:5px}.store-emblem{background:#222b23;border:1px solid #a28b59;border-radius:6px}.price{color:#e8ca85}.toast{background:#1b241e;border-color:#b39a61;border-radius:4px}.stat-card{background:#303c2f}.stat-card small{color:#b9c3ad}
@media(max-height:600px){:root{--slot:44px}.hotkeys{gap:3px}.hotkey .spell-icon,.hotkey .item-icon{transform:scale(.85)}.hotkey .key{font-size:8px}.hotkey .count{font-size:10px}.menu-body{padding:12px}.menu-top{padding:5px 10px}.menu-tab{padding:6px}.menu-tabs{padding:5px}.hotkey::before,.hotkey::after{display:none}}
@media(max-width:700px){.menu-tabs{overflow-x:auto}.editor-grid{grid-template-columns:repeat(4,1fr)}.bilal-tools{top:calc(var(--map-top) + 5px)}.hotkey .spell-icon,.hotkey .item-icon{transform:scale(.85)}}

#bilal-ui.small-map .hotkeys{display:none}
/* Bilal 1.3: compact, explicit hotbar editor. */
.hotbar-editor{max-width:670px;margin:auto;color:#e5e3d4;font-size:13px}.editor-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.editor-heading h2{font-size:20px;margin:0 0 12px!important;color:#e9d8a7}.editor-heading>span{color:#b8b6a3;font-size:12px}.slot-ribbon{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:4px;margin-bottom:14px}.slot-ribbon button{min-width:0;height:48px;position:relative;display:flex;justify-content:center;align-items:center;padding:2px;background:linear-gradient(#3b433d,#202721);border:1px solid #657066;border-radius:3px}.slot-ribbon small{position:absolute;bottom:0;right:2px;color:#ffe8a5;font-size:10px}.slot-ribbon .spell-icon,.slot-ribbon .item-icon{transform:scale(.8);flex-shrink:0}.slot-ribbon .selected{border-color:#d8b76d;box-shadow:inset 0 0 0 1px #cfb273,0 0 8px #c9ad5433}.editor-tabs{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;padding:5px;background:#899084;border:1px solid #bac0ac;border-radius:4px}.editor-tabs button{min-height:33px;background:linear-gradient(#303b35,#17221e);border:1px solid #0c130f;color:#d6d7ca;border-radius:3px;font-size:13px;font-weight:bold}.editor-tabs .selected{color:#ffe0a0;border-color:#ead09a;background:linear-gradient(#6d6448,#454537);box-shadow:0 0 0 1px #bca374}.editor-search{display:flex;align-items:center;gap:10px;margin:12px 0 8px}.editor-search input:not([type=checkbox]){flex:1;width:100px;min-width:0}.editor-search label{display:flex;gap:4px;align-items:center;font-size:11px;white-space:nowrap}.hotbar-editor input:not([type=checkbox]),.hotbar-editor textarea,.hotbar-editor select{background:#1b2924;color:#eeebd9;border:1px solid #858d78;border-radius:3px;min-height:32px;padding:7px;font:inherit}.editor-list{height:290px;overflow:auto;border:1px solid #818b79;background:linear-gradient(110deg,#435348,#526054);padding:5px;scrollbar-color:#b5bea6 #28382f}.editor-list h3{font-size:11px;letter-spacing:1.5px;color:#f4d98d;margin:12px 5px 6px;text-transform:uppercase}.catalog-row{display:flex;gap:10px;align-items:center;width:100%;min-height:53px;text-align:left;border:1px solid transparent;border-bottom-color:#c2c8af1c;background:transparent;color:#f2f0df;padding:7px;border-radius:2px}.catalog-row:hover{background:#d8dfc620}.catalog-row.selected{background:#b4cbb031;border-color:#d8bc76}.catalog-row>span:nth-child(2){flex:1;min-width:0}.catalog-row strong{display:block;font-size:13px}.catalog-row small{display:block;color:#d5d9c6;font-size:11px;margin-top:4px;line-height:1.4}.catalog-row .item-icon,.catalog-row .spell-icon{display:block;flex:0 0 32px;transform:none}.row-help{border-radius:50%;font-weight:bold;background:#1d2a23;color:#e8e1bd;width:20px;height:20px;flex:0 0 20px;text-align:center;padding-top:2px}.action-icon{width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;color:#e2c782;background:linear-gradient(130deg,#556856,#232f28);border:1px solid #8d9d7c;border-radius:5px;flex-shrink:0}.action-icon svg{width:23px;height:23px;fill:none;stroke:currentColor;stroke-width:1.7}.selection-details{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0;min-height:36px}.selection-details strong{flex:1}.selection-details small{flex-basis:100%;color:#bfc5b4}.selection-details textarea{width:100%;min-height:64px;resize:vertical}.selection-details input:not([type=checkbox]){flex:1;min-width:130px}.selection-details label{display:flex;gap:5px;align-items:center}.editor-binding{display:flex;align-items:center;gap:7px;border-top:1px solid #69715b;padding-top:9px}.editor-binding label{display:flex;align-items:center;gap:7px;flex:1}.editor-binding input{width:100%;min-width:80px}.editor-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px}.editor-footer>div{display:flex;gap:6px}.hotbar-editor button.primary,.hotbar-editor button.secondary{padding:8px 12px;min-height:34px;font-size:12px}.empty-catalog,.text-hint{padding:12px;color:#f2eed6;line-height:1.6}.hotbar-editor:has(#slot-text) .editor-list{height:auto;min-height:80px}
@media(max-width:600px){.slot-ribbon{grid-template-columns:repeat(6,minmax(0,1fr));gap:3px}.slot-ribbon button{height:38px}.editor-search{flex-wrap:wrap}.editor-search label{width:100%}.editor-binding{flex-wrap:wrap}.editor-binding label{flex-basis:100%}.editor-list{height:240px}.catalog-row strong{font-size:12px}.editor-footer button{padding:8px!important}.editor-heading h2{font-size:17px}.selection-details select{max-width:100%}}
@media(max-height:550px){.editor-list{height:170px}.slot-ribbon{margin-bottom:7px}.editor-heading h2{font-size:16px}.editor-binding,.editor-footer{margin-top:6px}.menu-shell{max-height:98dvh}.menu-body{overflow:auto}}
@media(max-width:600px) and (min-height:600px){.editor-list{height:max(110px,calc(100dvh - 720px))}.hotbar-editor .selection-details{margin:7px 0}.editor-heading>span{font-size:10px}.editor-footer{margin-top:8px}.toast{bottom:auto;top:8px;pointer-events:none}}

/* Bilal 1.4: larger PC keys, constrained to the visible map. */
@media (min-width:901px) and (min-height:601px){:root{--slot:72px}.hotkey .spell-icon,.hotkey .item-icon,.hotkey .action-icon{transform:scale(1.25)}.hotkey .key{font-size:12px;line-height:13px}.hotkey .count{font-size:13px}}

#bilal-error{position:fixed;bottom:8px;left:8px;right:8px;max-width:780px;z-index:100;pointer-events:auto;background:#26251ff5;border:1px solid #bba273;border-radius:4px;color:#f3e6ce;font:13px Arial;padding:9px;display:flex;align-items:center;gap:8px;flex-wrap:wrap;box-shadow:0 4px 20px #0008}#bilal-error[hidden]{display:none}#bilal-error span{flex:1;min-width:180px}#bilal-error button{background:#48493d;color:#f5e4be;border:1px solid #927f58;padding:8px;border-radius:3px;min-height:36px;cursor:pointer}#bilal-error pre{flex-basis:100%;max-height:40vh;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:11px;user-select:text}

/* 1.13: native equipment and compact NPC dialogue use the same teal/gold palette. */
.action-art{width:100%;height:100%;object-fit:contain;pointer-events:none}.catalog-row>.action-art{width:46px;height:46px;flex:none}
.fixed-backpack{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.hotkey .fixed-backpack .item-icon{transform:scale(1.8);image-rendering:pixelated}.empty-backpack{color:#9eb7b9;font-size:34px}
.npc-dialog{margin-top:14px;padding:12px;background:linear-gradient(145deg,#153a45,#101e2d);border:1px solid #ae8851;border-radius:10px}.npc-dialog-title{color:#f4cf7a;font-weight:bold;margin-bottom:8px}#npc-dialog-log{max-height:132px;overflow:auto;color:#e2edf1;font-size:13px}#npc-dialog-log p{margin:5px 0;line-height:1.5}#npc-dialog-log p.self{color:#a4d6cf}#npc-dialog-log button{display:inline;padding:0 3px;color:#ffe19b;background:transparent;border:0;text-decoration:underline}#npc-dialog-choices{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0}#npc-dialog-choices button,.npc-dialog form button{background:linear-gradient(#467785,#25454c);color:#ffe6ac;border:1px solid #b69458;border-radius:6px;padding:7px 11px;min-height:34px}.npc-dialog form{display:flex;gap:6px}.npc-dialog input{min-width:0;flex:1;background:#0b1b28;color:white;border:1px solid #456575;border-radius:6px;padding:8px}.trade-grid{max-height:250px}.trade-item{background:linear-gradient(145deg,#2a5962,#142e3d);border-color:#526977}.trade-item.selected{border-color:#f4c45f;background:#3b5c56}.trade-selection{border-radius:8px;border:1px solid #917746;background:#132b36}
