/* UI port step 2 (docs/design/l2-ui-port-2026-11-13.md, .claude/rules/l2-ui.md): the HUD's small windows as the client draws them,
   the same in town and in a run: TargetStatusWnd (the target, #townTarget: game.js targetHome moves it between the town and the
   run), AbnormalStatusWnd (the hero's buffs, #buffBar beside StatusWnd) and PartyWnd's PartyStatusWnd (a party member, .town-member
   in town and in #partyFrame in a run). Sizes are interface.xdat's, less the 12 empty columns it leaves at a window's left (the
   engine's handle), as StatusWnd in step 1 (l2-status.css).

   The HUD's scale (Daniel 14. 11. 2026 on the test site: StatusWnd "o malinko zvětšit", its name and the whole element looked
   small, at 2560 x 1440 first): --hpx is the kit's --wpx (a whole number of device pixels per client pixel, l2-wnd.js) times
   --hk, 1.25 on a screen at least 1100 px high with a mouse (2560 x 1440 and its Chrome window 2545 x 1169), 1 below and on a
   phone. Boxes, places and text are in --hpx; the frames' edges stay in --wpx, so the client's one-pixel lines stay whole
   device pixels and only their flat middles (one colour both ways, scripts/l2-hudwnd-tex.py) stretch. */
:root{--hk:1}
@media (min-height:1100px) and (not (pointer:coarse)){:root{--hk:1.25}}
:root{--hpx:calc(var(--wpx,1px) * var(--hk));--hfont:calc(var(--wfont,13px) * var(--hk));--hline:calc(var(--wline,16px) * var(--hk))}

/* TargetStatusWnd, 164 x 46: SmallWindow_Back1-3 (wnd/smallwnd.png, sliced 17 20 2 16), the name (UserName 143 x 14 at 0, 9,
   centred), the class or the title under it (RankName at 0, 27), the HP bar (barHP 150 x 6 at 4, 26: hpbar over hpbar_back, the
   8 x 8 textures' 6 used rows) and the close button (btnClose 15 x 15 at 139, 6: FrameCloseBtn, FrameCloseOnBtn under the mouse).
   In town the window grows down with what the town adds under the class (the plate's line, an unsigned look, the buttons Talk,
   Invite, Profile and Block, as Btn1); in a run it is the picked enemy's name and HP only. The ids game.js writes stay. */
:is(#townUi,#hud) #townTarget.town-target{box-sizing:border-box;display:flex;flex-direction:column;align-items:stretch;gap:0;
 min-width:calc(164*var(--hpx));min-height:calc(46*var(--hpx));padding:calc(9*var(--hpx)) calc(21*var(--hpx)) calc(5*var(--hpx)) 0;
 border:0 solid transparent;margin:0;border-radius:0;box-shadow:none;backdrop-filter:none;background:none;
 border-image:url(assets/ui/wnd/smallwnd.png) 17 20 2 16 fill/calc(17*var(--wpx)) calc(20*var(--wpx)) calc(2*var(--wpx)) calc(16*var(--wpx)) stretch;
 image-rendering:pixelated;font:var(--hfont)/var(--hline) var(--l2font);color:#dcdcdc;text-shadow:none}
:is(#townUi,#hud) #townTarget.town-target>:is(b,small){display:block;font:inherit;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:is(#townUi,#hud) #townTargetName{box-sizing:content-box;height:calc(14*var(--hpx));padding-bottom:calc(3*var(--hpx));margin-bottom:calc(-3*var(--hpx));line-height:calc(14*var(--hpx));font-weight:400;color:#fff}
:is(#townUi,#hud) #townTargetClass{min-height:calc(14*var(--hpx));line-height:calc(14*var(--hpx));margin-top:calc(4*var(--hpx));color:#a3a3a3}
:is(#townUi,#hud) #townTarget.town-target>small.plate-line{white-space:normal;line-height:calc(14*var(--hpx));margin-top:calc(2*var(--hpx))}
:is(#townUi,#hud) #townTargetUnsigned{line-height:calc(14*var(--hpx));margin-top:calc(2*var(--hpx));color:#a3a3a3}
:is(#townUi,#hud) #townTarget .town-target-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:calc(2*var(--hpx));margin-top:calc(4*var(--hpx))}
:is(#townUi,#hud) #townTarget .town-target-actions:not(:has(.btn:not([hidden]))){display:none}
/* the town's buttons as the kit's Btn1 (l2-wnd.css .l2-btn): its texture is 23 px high and not sliced, so it keeps --wpx; the
   party's Leave too (it was the menu's rounded .btn) */
:is(#townUi,#hud) #townTarget .town-target-actions .btn,#townUi #townLeave.btn{position:relative;display:inline-flex;align-items:center;justify-content:center;
 min-width:calc(76*var(--wpx));height:calc(23*var(--wpx));margin:0;padding:0 calc(2*var(--wpx)) calc(2*var(--wpx));border-radius:0;
 border-style:solid;border-width:0 calc(8*var(--wpx)) 0 calc(4*var(--wpx));box-shadow:none;text-shadow:none;
 border-image:url(assets/ui/wnd/btn1.png) 0 8 0 4 fill/0 calc(8*var(--wpx)) 0 calc(4*var(--wpx)) stretch;
 background:none;font:var(--wfont)/1 var(--l2font);color:#dcdcdc;white-space:nowrap;cursor:pointer;outline:0;image-rendering:pixelated}
:is(#townUi,#hud) #townTarget .town-target-actions .btn:hover,#townUi #townLeave.btn:hover{border-image-source:url(assets/ui/wnd/btn1-over.png);filter:none}
:is(#townUi,#hud) #townTarget .town-target-actions .btn:active,#townUi #townLeave.btn:active{border-image-source:url(assets/ui/wnd/btn1-down.png)}
/* btnClose at 139, 6 (10 from the window's right edge) */
:is(#townUi,#hud) #townTargetClose{position:absolute;right:calc(10*var(--hpx));top:calc(6*var(--hpx));
 width:calc(15*var(--wpx));height:calc(15*var(--wpx));min-width:0;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;
 background:url(assets/ui/xdat/tex/frameclosebtn.png) 0 0/calc(16*var(--wpx)) calc(16*var(--wpx)) no-repeat;image-rendering:pixelated;
 font-size:0;cursor:pointer;pointer-events:auto}
:is(#townUi,#hud) #townTargetClose:is(:hover,:active){background-image:url(assets/ui/xdat/tex/framecloseonbtn.png);filter:none}
/* barHP at 4, 26 */
#townTarget .l2t-hp{display:none}
#hud #townTarget.l2t-run .l2t-hp{display:block;position:absolute;left:calc(4*var(--hpx));top:calc(26*var(--hpx));
 width:calc(100% - 14*var(--hpx));height:calc(6*var(--hpx));margin:0;
 background:url(assets/ui/xdat/tex/hpbar_back.png) 0 0/100% calc(100% * 8 / 6) repeat-x;image-rendering:pixelated}
#hud #townTarget.l2t-run .l2t-hp>i{display:block;height:100%;width:100%;background:url(assets/ui/xdat/tex/hpbar.png) 0 0/100% calc(100% * 8 / 6) repeat-x}
/* in a run: in the top stack under the boss rows (xdat TOP_CENTER), the picked enemy's name and HP only; the bosses' names in the
   colours the run's target window gave them (Aden's, the client has no boss colour) */
#hud #townTarget.l2t-run{position:relative;left:auto;right:auto;top:auto;transform:none;width:calc(164*var(--hpx));pointer-events:auto;z-index:auto}
#hud #townTarget.l2t-run>:is(small,.town-target-actions){display:none}
#hud #townTarget.l2t-run[data-kind=boss] #townTargetName{color:#ffc9a8}
#hud #townTarget.l2t-run[data-kind=guardian] #townTargetName{color:#ffd29a}
/* a phone keeps touch.css's and plate-ui.css's places and widths for the town (beside the party list, in the band by the chat) */
@media (pointer:coarse){
 #townUi #townTarget.town-target{min-width:0}
 #townUi .town-party[hidden]+#townTarget.town-target{min-width:calc(164*var(--hpx))}
}

/* AbnormalStatusWnd: the hero's buffs 12 px right of StatusWnd (the window at 176, its StatusIcon at 12 of it; StatusWnd ends at
   176), the client's 24 px icons in 26 px cells, 12 in a row, no frame and no back (xdat gives the control none) */
#hud .buff-rows.hud-box{padding:0;margin:0;border:0;border-radius:0;box-shadow:none;backdrop-filter:none;background:none;gap:0}
#hud .buff-rows .buff-bar{flex-wrap:wrap;gap:0;min-height:0;max-width:calc(12*26*var(--hpx))}
#hud .buff-rows .icon{box-sizing:border-box;width:calc(24*var(--hpx));height:calc(24*var(--hpx));margin:var(--hpx);border:0;border-radius:0;
 box-shadow:none;background-size:100% 100%;image-rendering:auto}
#hud .buff-rows .icon[data-tip]:hover{box-shadow:none}
#hud .buff-rows .icon .rank{font:var(--hfont)/1 var(--l2font);right:var(--hpx);bottom:0}
#hud .buff-rows .buff-bar .cd{border-radius:0}
@media not (pointer:coarse){#hud .status-row{gap:calc(12*var(--hpx))}}

/* PartyStatusWnd, 164 x 46 (PartyWnd's member windows one under the other, each 46 high): the same SmallWindow back, the name
   (PlayerName at 8, 8, 14 high) with the leader's crown (party-leader, 11 x 11) before it and Aden's class or state (a downed,
   reconnecting or choosing ally) at the right of the row, CP, HP and MP (barCP, barHP, barMP 150 x 5 at 4, 21, 28 and 35: cpbar,
   hpbar and mpbar over their backs); an ally's buffs (PartyWnd's StatusIconBuff, 16 px) beside the window. --cpx is the size the
   older rules (l2-ui.css) count in, here the HUD's */
:is(#townUi .town-party,#partyFrame){--cpx:var(--hpx)}
#partyFrame.party-frame{gap:0;font:var(--hfont)/var(--hline) var(--l2font)}
:is(#townUi,#partyFrame) .town-member{position:relative;box-sizing:border-box;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:flex-start;gap:0;
 width:calc(164*var(--hpx));height:calc(46*var(--hpx));padding:calc(8*var(--hpx)) calc(10*var(--hpx)) 0 calc(8*var(--hpx));
 border:0 solid transparent;border-radius:0;
 border-image:url(assets/ui/wnd/smallwnd.png) 17 20 2 16 fill/calc(17*var(--wpx)) calc(20*var(--wpx)) calc(2*var(--wpx)) calc(16*var(--wpx)) stretch;
 image-rendering:pixelated;font:var(--hfont)/calc(14*var(--hpx)) var(--l2font);overflow:visible}
#townUi .town-member{max-width:100%}
:is(#townUi,#partyFrame) .town-member>b{flex:0 1 auto;min-width:0;margin:0 0 calc(-3*var(--hpx));box-sizing:content-box;height:calc(14*var(--hpx));padding-bottom:calc(3*var(--hpx));
 font:inherit;line-height:calc(14*var(--hpx));color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:is(#townUi,#partyFrame) .town-member.leader>b::before{width:calc(11*var(--hpx));height:calc(11*var(--hpx));margin-right:calc(3*var(--hpx));vertical-align:calc(-1*var(--hpx))}
:is(#townUi,#partyFrame) .town-member>small{flex:0 1 auto;min-width:0;margin-left:auto;padding-left:calc(4*var(--hpx));height:calc(14*var(--hpx));
 font:inherit;line-height:calc(14*var(--hpx));color:#a3a3a3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
:is(#townUi,#partyFrame) .town-member-bars{position:absolute;left:calc(4*var(--hpx));top:calc(21*var(--hpx));
 width:calc(100% - 14*var(--hpx));display:flex;flex-direction:column;gap:calc(2*var(--hpx));margin:0}
:is(#townUi,#partyFrame) .town-member-bars span{height:calc(5*var(--hpx));image-rendering:pixelated;
 background:url(assets/ui/party-hp.png) 0 0/100% 100% no-repeat,url(assets/ui/xdat/tex/hpbar_back.png) 0 0/100% calc(100% * 8 / 6) repeat-x}
:is(#townUi,#partyFrame) .town-member-bars .cp{background:url(assets/ui/party-cp.png) 0 0/100% 100% no-repeat,url(assets/ui/xdat/tex/cpbar_back.png) 0 0/100% calc(100% * 8 / 6) repeat-x}
:is(#townUi,#partyFrame) .town-member-bars .mp{background:url(assets/ui/party-mp.png) 0 0/100% 100% no-repeat,url(assets/ui/xdat/tex/mpbar_back.png) 0 0/100% calc(100% * 8 / 6) repeat-x}
#partyFrame .town-member-bars .hp{background:url(assets/ui/party-hp.png) 0 0/var(--hp,100%) 100% no-repeat,url(assets/ui/party-hp-back.png) 0 0/100% 100% no-repeat}
/* an ally's buffs beside his window, from its top as StatusIconBuff (5), 12 in a row (8 on a phone, so a row stays on an upright
   screen) */
/* (no wider member for the ping: PartyWnd's 164 as .town-member above; the class row a flex line in which the class shortens
   with an ellipsis and the ping keeps its width, 1a 21. 11. 2026, Fable K5) */
#partyFrame .party-member>small{display:flex;align-items:baseline}
#partyFrame .party-member>small>span:not(.party-ping){flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:pre}
#partyFrame .party-member .party-buffs{position:absolute;left:calc(100% + 2*var(--hpx));top:calc(5*var(--hpx));
 width:max-content;max-width:calc(12*17*var(--hpx));margin:0;flex-wrap:wrap}
@media (pointer:coarse){#partyFrame .party-member .party-buffs{max-width:calc(8*17*var(--hpx))}}

/* a phone: the party list's width (touch.css: a member or 40 % of the screen) and the target window beside it counted with the
   client's 164 (touch.css counted the older 156); a run's party frame on a phone on its side without touch.css's zoom .85 (it made
   the client's one-pixel lines 1.7 device pixels), as high as it was (88 px: under the status window and a row of buffs), four
   members of 46 client px fit above the joystick */
@media (pointer:coarse) and (max-width:600px) and (min-height:521px),(pointer:coarse) and (max-height:520px) and (min-width:601px){
 #townUi .town-party{width:min(calc(164*var(--hpx)),40vw)}
}
@media (pointer:coarse) and (max-width:600px) and (min-height:521px){
 #townUi .town-party:not([hidden])+.town-target{max-width:calc(100vw - max(.5rem,env(safe-area-inset-left)) - min(calc(164*var(--hpx)),40vw) - .5rem - max(.5rem,env(safe-area-inset-right)))}
}
@media (pointer:coarse) and (max-height:520px) and (min-width:601px){
 #townUi .town-party:not([hidden])+.town-target{right:calc(max(.5rem,env(safe-area-inset-right)) + min(calc(164*var(--hpx)),40vw) + .5rem);
  max-width:calc(100vw - max(.5rem,env(safe-area-inset-left)) - min(24rem,calc(100vw - 1rem)) - .5rem - min(calc(164*var(--hpx)),40vw) - .5rem - max(.5rem,env(safe-area-inset-right)))}
}
@media (pointer:coarse) and (max-height:520px){
 #partyFrame.party-frame{zoom:1;top:88px}
}

/* UI port step 3: ShortcutWnd, the skill bar as the client's ShortcutWndHorizontal (interface.xdat ShortcutWnd, its back
   L2UI_CH3.ShortcutWnd.shortcut_back), two of them one over the other as the client stacks them (Expand): the drawn part of the
   back (wnd/shortcut-back.png 492 x 46, wnd/shortcut-back-125.png at the HUD's 1.25, scripts/l2-shortcut-tex.py), its blue handle
   at the left (the HUD layout's grip when the HUD is unlocked), 12 wells in three groups of four, a well's 32 x 32 inside at
   x = 21 + 37 i + 5 floor(i / 4), y = 7. The client's icons fill a well's inside, 1:1 at --hk 1. The lower bar: the 8 kit skills
   (wells 1 to 8), the capstones' skills and passives (talents v2, 9 to 11) and Evade (12, the Space key); the upper bar: the 5
   jewels (1 to 5), the weapon's Life Stone (11) and its Active skill (12, the F key, over Space). A key is the client's beige over
   the well's top left corner (shortcut_f01 to f12 put their digit there); the 1 to 12 the client writes on every well are left
   out, a skill casts itself and those keys do nothing. Its paging, Expand and joypad buttons are left out too. Aden's own marks
   stay, in --hpx and without glows: the cooldown sweep, the rank, a capstone's gold corner, the augment's grade and an epic jewel
   as a one-pixel line inside the well. A phone keeps touch.css (Evade and the Active skill as round buttons). */
@media not (pointer:coarse){
 /* (Daniel 14. 11. 2026 21:1x: "ež tam jsou gaps blbe") the back is cut 5 px after the last well's outline, as far as the handle's
    line is from the first one (back x 15..19 dark, 20 the outline; the client's joypad column, 471..489, is not in Aden), and its
    right line and edge (490, 491) drawn again at the new end by ::after: 478 of 492 at --hk 1, 596 of shortcut-back-125's 615 */
 :is(#hud .bottom-bars.hud-box,#townBar){--sbw:round(nearest,calc(492*var(--hpx)),var(--wpx,1px));--sw:round(nearest,calc(478*var(--hpx)),var(--wpx,1px));
  --sh:round(nearest,calc(46*var(--hpx)),var(--wpx,1px));
  --si:round(nearest,calc(32*var(--hpx)),var(--wpx,1px));--sy:round(nearest,calc(7*var(--hpx)),var(--wpx,1px));
  display:block;box-sizing:content-box;width:var(--sw);height:calc(var(--rows,2)*var(--sh));padding:0;margin:0;gap:0;
  left:round(nearest,calc(50% - var(--sw) / 2),var(--wpx,1px));right:auto;bottom:round(nearest,calc(8*var(--hpx)),var(--wpx,1px));transform:none;
  border:0;border-radius:0;box-shadow:none;backdrop-filter:none;
  background:url(assets/ui/wnd/shortcut-back.png) 0 0/var(--sbw) var(--sh) no-repeat,url(assets/ui/wnd/shortcut-back.png) 0 var(--sh)/var(--sbw) var(--sh) no-repeat;
  image-rendering:pixelated;font:var(--hfont)/1 var(--l2font);text-shadow:none;pointer-events:auto}
 :is(#hud .bottom-bars.hud-box,#townBar)::after{content:'';position:absolute;right:0;top:0;width:calc(2*var(--wpx,1px));height:100%;pointer-events:none;
  background:inherit;background-position:right 0 top 0,right 0 top var(--sh)}
 #hud .bottom-bars :is(.jewel-row,.skill-row,.slot-bar){display:contents}
 :is(#hud .bottom-bars,#townBar) .icon{position:absolute;left:round(nearest,calc(var(--x,21)*var(--hpx)),var(--wpx,1px));top:calc(var(--row,1)*var(--sh) + var(--sy));
  box-sizing:border-box;width:var(--si);height:var(--si);margin:0;padding:0;border:0;border-radius:0;box-shadow:none;outline:0;
  background-color:transparent;background-size:100% 100%;image-rendering:pixelated;opacity:1;filter:none}
 :is(#hud .bottom-bars,#townBar) .icon[data-tip]:hover{box-shadow:none}
 :is(#hud .bottom-bars,#townBar) .icon.empty{background-image:none}
 /* the client's frame round a filled slot's icon (ShortcutItemWindow alwaysShowOutline false: none round an empty one),
    L2UI_CH3.InventoryWnd.inventory_outline and its _over (the mouse on it) and _down (pressed): its one-pixel ring lies one
    device pixel out of the icon, over the well's own line, its shadow under and right of it (wnd/icon-outline*.png) */
 :is(#hud .bottom-bars,#townBar) .icon:not(.empty)::before{content:'';position:absolute;left:calc(-1*var(--wpx,1px));top:calc(-1*var(--wpx,1px));
  width:calc(var(--si) + 4*var(--wpx,1px));height:calc(var(--si) + 4*var(--wpx,1px));margin:0;border:0;
  background:url(assets/ui/wnd/icon-outline.png) 0 0/100% 100% no-repeat;image-rendering:pixelated;pointer-events:none}
 :is(#hud .bottom-bars,#townBar) .icon:not(.empty):hover::before{background-image:url(assets/ui/wnd/icon-outline-over.png)}
 :is(#hud .bottom-bars,#townBar) .icon:not(.empty):active::before{background-image:url(assets/ui/wnd/icon-outline-down.png)}
 #hud .bottom-bars .icon .noicon{display:none}
 #hud .bottom-bars #skillBar>.icon:nth-child(1){--x:21}#hud .bottom-bars #skillBar>.icon:nth-child(2){--x:58}
 #hud .bottom-bars #skillBar>.icon:nth-child(3){--x:95}#hud .bottom-bars #skillBar>.icon:nth-child(4){--x:132}
 #hud .bottom-bars #skillBar>.icon:nth-child(5){--x:174}#hud .bottom-bars #skillBar>.icon:nth-child(6){--x:211}
 #hud .bottom-bars #skillBar>.icon:nth-child(7){--x:248}#hud .bottom-bars #skillBar>.icon:nth-child(8){--x:285}
 #hud .bottom-bars #talentBar>.icon:nth-child(1){--x:327}#hud .bottom-bars #talentBar>.icon:nth-child(2){--x:364}
 #hud .bottom-bars #talentBar>.icon:nth-child(3){--x:401}
 #hud .bottom-bars .slot-bar.dash>.dash-icon:not(.aug-active){--x:438}
 #hud .bottom-bars #jewelBar>.icon{--row:0}
 #hud .bottom-bars #jewelBar>.icon:nth-child(1){--x:21}#hud .bottom-bars #jewelBar>.icon:nth-child(2){--x:58}
 #hud .bottom-bars #jewelBar>.icon:nth-child(3){--x:95}#hud .bottom-bars #jewelBar>.icon:nth-child(4){--x:132}
 #hud .bottom-bars #jewelBar>.icon:nth-child(5){--x:174}
 #hud .bottom-bars #augmentSlot>.icon{--row:0;--x:401}
 #hud .bottom-bars #augActive{--row:0;--x:438}
 /* the key over the well's top left corner as shortcut_f01 puts its digit (2 left of the inside, its top 3 over it; the L2 Tahoma
    glyphs start 2 right of and 4 under the line box), the client's beige with a one-pixel black edge; clicks go to the icon */
 #hud .bottom-bars .dash-icon .key{left:calc(-4*var(--hpx));right:auto;top:calc(-7*var(--hpx));bottom:auto;text-align:left;
  font:var(--hfont)/var(--hline) var(--l2font);letter-spacing:0;color:rgb(173,154,123);white-space:nowrap;pointer-events:none;
  text-shadow:var(--wpx) 0 0 #000,calc(-1*var(--wpx)) 0 0 #000,0 var(--wpx) 0 #000,0 calc(-1*var(--wpx)) 0 #000,
   var(--wpx) var(--wpx) 0 #000,calc(-1*var(--wpx)) calc(-1*var(--wpx)) 0 #000,var(--wpx) calc(-1*var(--wpx)) 0 #000,calc(-1*var(--wpx)) var(--wpx) 0 #000}
 /* l2-ui.css pins this key to 24px !important at (2,2,1); the doubled id outranks it so the key grows with the HUD scale */
 html[data-font] #hud#hud .bottom-bars .slot-bar.dash .dash-icon .key{font-size:var(--hfont)!important}
 #hud .bottom-bars .icon :is(.rank,.epic-plus){right:var(--hpx);bottom:0;font:var(--hfont)/var(--hline) var(--l2font);letter-spacing:0;pointer-events:none;
  text-shadow:var(--wpx) 0 0 #000,calc(-1*var(--wpx)) 0 0 #000,0 var(--wpx) 0 #000,0 calc(-1*var(--wpx)) 0 #000}
 #hud .bottom-bars .icon .cd{border-radius:0}
 #hud .bottom-bars .icon:is(.capstone,.transformed)::after{border-width:0 round(nearest,calc(6*var(--hpx)),var(--wpx,1px)) round(nearest,calc(6*var(--hpx)),var(--wpx,1px)) 0}
 #hud .bottom-bars #augmentSlot>.icon:is(.glow1,.glow2,.glow3,.glow4),#hud .bottom-bars #jewelBar>.icon.epic-jewel{outline:var(--wpx) solid var(--grade);outline-offset:calc(-1*var(--wpx))}
 #hud .bottom-bars #augmentSlot>.icon.glow1{--grade:#5ea8ff}#hud .bottom-bars #augmentSlot>.icon.glow2{--grade:#9fd8ff}
 #hud .bottom-bars #augmentSlot>.icon.glow3{--grade:#b77bff}#hud .bottom-bars #augmentSlot>.icon.glow4{--grade:#ff9a3c}
 #hud .bottom-bars #jewelBar>.icon.epic-jewel{--grade:#ffb070}
 /* the HUD layout's grip (hud-layout.js) on the client's blue handle, which the back already draws */
 #hud .bottom-bars>.hud-grip{left:0;top:0;width:calc(19*var(--hpx));height:100%;background:none;opacity:1}
}
@media (min-height:1100px) and (not (pointer:coarse)){
 :is(#hud .bottom-bars.hud-box,#townBar){background-image:url(assets/ui/wnd/shortcut-back-125.png),url(assets/ui/wnd/shortcut-back-125.png);--sw:calc(596*var(--wpx,1px))}
 /* 40 px from the client's 32: not a whole multiple, so smoothed rather than nearest (every fourth pixel doubled) */
 :is(#hud .bottom-bars,#townBar) .icon{image-rendering:auto}
 /* the frame's ring stays one pixel, its inside 40 like the icon (44 x 44, scripts/l2-shortcut-tex.py) */
 :is(#hud .bottom-bars,#townBar) .icon:not(.empty)::before{background-image:url(assets/ui/wnd/icon-outline-125.png)}
 :is(#hud .bottom-bars,#townBar) .icon:not(.empty):hover::before{background-image:url(assets/ui/wnd/icon-outline-over-125.png)}
 :is(#hud .bottom-bars,#townBar) .icon:not(.empty):active::before{background-image:url(assets/ui/wnd/icon-outline-down-125.png)}
}

/* Giran's shortcut bar (l2-actions.js townBar; the manager's plan .work/akce-2026-11-14/PLAN.md, Daniel 14. 11. 2026: "by byl ten
   nějaky bar i dole v lobby"): the run's ShortcutWnd above, one bar of it at the lower bar's place, its wells the town's actions. An
   action that can't be done now is greyed as on the Actions page (l2-wnd.css .xd-slot.off); the well under a dragged action shows
   the client's _over frame (an empty well's too) and the dragged icon follows the pointer at its own size. A phone: touch.css. */
#townBar{position:absolute;--rows:1}
#townBar .icon{--row:0;cursor:pointer}
#townBar .icon.off{filter:grayscale(1) brightness(.55)}
#townBar#townBar .icon.drop::before{content:'';position:absolute;left:calc(-1*var(--wpx,1px));top:calc(-1*var(--wpx,1px));
 width:calc(var(--si) + 4*var(--wpx,1px));height:calc(var(--si) + 4*var(--wpx,1px));margin:0;border:0;
 background:url(assets/ui/wnd/icon-outline-over.png) 0 0/100% 100% no-repeat;image-rendering:pixelated;pointer-events:none}
@media (min-height:1100px) and (not (pointer:coarse)){
 #townBar#townBar .icon.drop::before{background-image:url(assets/ui/wnd/icon-outline-over-125.png)}
}
.town-bar-ghost{position:fixed;left:0;top:0;z-index:2147483000;margin:0;padding:0;border:0;pointer-events:none;
 background:transparent no-repeat 0 0/100% 100%;image-rendering:pixelated}
html.bar-drag #tooltip{visibility:hidden}
html.bar-drag,html.bar-drag *{user-select:none;-webkit-user-select:none}

/* UI port step 4: the map (l2-map.js), the client's MinimapWnd (334 x 413 at the screen's left) and MinimapWnd_Expand (the whole
   screen), built from interface.xdat by l2-xdat.js. The map in the Minimap control: the client's world map one map pixel per client
   pixel (half at btnReduce), on MapWnd_back_max's colour where the world ends, dragged by the pointer; the marks (MinimapPos turned
   where the character looks, TargetPos with its pole's foot on the target, minimap_party) never scaled with the map. The shadows over
   its top and bottom edges (Bar_Shadow, MapShadow) let a drag through. */
.l2map{overflow:hidden;background:#1e1d1e;touch-action:none;cursor:grab}
.l2map:active{cursor:grabbing}
.l2map-world{position:absolute;left:0;top:0;width:calc(1812 * var(--wpx));height:calc(2620 * var(--wpx));transform-origin:0 0;
 background:no-repeat 0 0/100% 100%;image-rendering:pixelated;will-change:transform}
.l2map-world.l2map-smooth{image-rendering:auto}
.l2map-marks{position:absolute;inset:0;pointer-events:none}
.l2map-mark{position:absolute;left:0;top:0;background:no-repeat 0 0/100% 100%;image-rendering:pixelated}
.l2map-mark[hidden]{display:none}
.l2map-me{width:calc(32 * var(--wpx));height:calc(32 * var(--wpx));margin:calc(-16 * var(--wpx)) 0 0 calc(-16 * var(--wpx))}
.l2map-target{width:calc(32 * var(--wpx));height:calc(32 * var(--wpx));margin:calc(-31 * var(--wpx)) 0 0 calc(-15 * var(--wpx))}
.l2map-party{width:calc(16 * var(--wpx));height:calc(16 * var(--wpx));margin:calc(-8 * var(--wpx)) 0 0 calc(-8 * var(--wpx))}
:is(#mapWnd,#mapWndMax) .xd-tex{pointer-events:none}
/* MapBack under the small window's controls; the enlarged one fills the screen and does not move */
.l2map-back{image-rendering:pixelated;pointer-events:none}
#mapWndMax .l2w-bar{cursor:default}

/* SystemMenuWnd's rows (l2-hud.js): the text's line the icon's 36 px, so the text stands in the row's middle as the icon does
   (Daniel 14. 11. 2026 21:1x: "nejsou vycentrované ty texty v tom systému"; l2-ui.css gave it a 12 px line 14 px under the icon's top) */
#l2SystemMenu .l2-sysrow>span{line-height:calc(36*var(--wpx))}
/* where the browser trims a line to its capitals and baseline, those capitals stand in the band's middle whatever the font: a centred
   36 px line put them a client px high on a phone (another font's ascent and a half-leading rounded to whole px at a fractional --wpx) */
@supports (text-box:trim-both cap alphabetic){
 #l2SystemMenu .l2-sysrow>span{box-sizing:border-box;line-height:1;text-box:trim-both cap alphabetic;padding-top:calc((36*var(--wpx) - 1cap)/2)}
}
/* UI port step 6, the map's buttons: their text's capitals in Btn1's middle (e9 14. 11. 2026 23:4x: Current Loc. 7.62 px over and
   4.94 under it on a Pixel 7 upright). The flex centred the line, whose room over the capitals and under the baseline differs with
   the font a phone has; where text-box is, the line is trimmed to the capitals and the baseline and the button, which centres what
   it holds, puts them in the middle of all of Btn1's 23 client px, the shadow's two rows under its face included, as the client
   draws a button's text in the middle of the whole control (15. 11.: in the middle of 22 of them a Pixel 7 upright rounded it a
   device pixel up, 7.62 over and 9.52 under it; with all 23 every size measured within 1 px of the client). */
@supports (text-box:trim-both cap alphabetic){
 :is(#mapWnd,#mapWndMax) .xd-btn{display:block;text-align:center;line-height:normal;text-box:trim-both cap alphabetic;padding:0}
}
/* UI port step 4: the inventory (l2-inventory.js, the client's InventoryWnd from interface.xdat on inventory_back_aden). The Item and
   Quest grids sit in the kit's scroll box (10,189 235 x 137: the 6 x 4 icons of the frames the back draws, its 15 px bar beside them)
   at its top left; a row is 35 px (32 + 3), the arrows' three lines one row and the view snaps to whole rows, so the icons always
   stay on the back's frames. A starter piece or a one-piece top's legs dimmed as in the Character window (style.css .dim). */
#gmInventoryWnd .inv-scroll,#inventoryWnd .inv-scroll{position:absolute}
#gmInventoryWnd .inv-scroll .l2-scroll-view,#inventoryWnd .inv-scroll .l2-scroll-view{line-height:calc(35 / 3 * var(--wpx));scroll-snap-type:y mandatory}
#gmInventoryWnd .inv-scroll .xd-items,#inventoryWnd .inv-scroll .xd-items{position:static;width:auto;height:auto;overflow:visible}
#gmInventoryWnd .inv-scroll .xd-slot,#inventoryWnd .inv-scroll .xd-slot{scroll-snap-align:start}
#gmInventoryWnd :is(.xd-items,.xd-btn)[hidden],#inventoryWnd :is(.xd-items,.xd-btn)[hidden]{display:none !important}
#gmInventoryWnd .xd-slot.inv-dim,#inventoryWnd .xd-slot.inv-dim{filter:grayscale(1) brightness(.35)}
#gmInventoryWnd .xd-btn.inv-trash,#gmInventoryWnd .xd-btn.inv-trash:active,#inventoryWnd .xd-btn.inv-trash,#inventoryWnd .xd-btn.inv-trash:active{background-image:var(--n);cursor:default}
/* the target window off while the NPC's window is open, it is the same NPC (l2-npc.js underNpc; 3b 16. 11. 2026, Pixel 7 upright:
   the NPC's window over it); in a run it is the enemy's window and stays */
#townUi #townTarget.npc-open{display:none !important}
/* the run's row without its Map button (Daniel 16. 11. 2026 over the test: "v runu to map mužete dat pryč", l2-ui.md), on the phone
   too since 1. 12. 2026 (the tester's round of 24. 11.: the phone still had it): on the computer the map stays on Alt+M */
#hud .run-stats>#mapButton{display:none !important}

/* The shortcut bar's left strip (Daniel 18. 11. 2026 13:1x over the client's bar, .work/shortcut-2026-11-18/klient-lista.png: "ty
   šipky na expand by měly byt v tom ne"): ShortcutWndHorizontal is 504 wide (interface.xdat) and its back starts 12 px into it, its
   ExpandButton and ReduceButton at (1, 8) in those 12. The client's bar draws a blue strip there, Aden's wnd/shortcut-strip.png
   (12 x 46, the handle's own columns, scripts/l2-shortcut-tex.py; -125 15 x 58) as the box's left border: the box's rect holds it
   (the windows keep off it, a click on it stays on the bar) and its children keep their places. The run's and the town's bar alike;
   the whole bar stays centred. A phone keeps touch.css (no strip). */
@media not (pointer:coarse){
 :is(#hud .bottom-bars.hud-box,#townBar){--sx:calc(12*var(--wpx,1px));border-left:var(--sx) solid transparent;
  left:round(nearest,calc(50% - (var(--sw) + var(--sx)) / 2),var(--wpx,1px))}
 :is(#hud .bottom-bars.hud-box,#townBar)::before{content:'';position:absolute;left:calc(-1*var(--sx));top:0;width:var(--sx);height:100%;
  background:url(assets/ui/wnd/shortcut-strip.png) 0 0/var(--sx) var(--sh) repeat-y;image-rendering:pixelated;pointer-events:none}
 #hud .bottom-bars>.hud-grip{left:calc(-1*var(--sx));width:calc(var(--sx) + 19*var(--hpx))}
}
@media (min-height:1100px) and (not (pointer:coarse)){
 :is(#hud .bottom-bars.hud-box,#townBar){--sx:calc(15*var(--wpx,1px))}
 :is(#hud .bottom-bars.hud-box,#townBar)::before{background-image:url(assets/ui/wnd/shortcut-strip-125.png)}
}
