/* UI port step 5 (docs/design/l2-ui-port-2026-11-13.md, .claude/rules/l2-ui.md, Daniel 14. 11. 2026 15:5x over a run on the test
   site: "nektere UI boy maji pořad zaoblene rohy ane hranate jak v L2 … některe piso je nesoumerne, nektere větši některe menši").
   The run's and the town's HUD as the client draws its own: one font (the client's 11 px, --hfont at the HUD's scale) for every text
   of a kind, no rounded corner, the client's small window behind Aden's own panels, its buttons, tabs and gauges, and the skill bar's
   own buttons from ShortcutWndHorizontal. Positions stay where interface.css, touch.css and the HUD layout put them; only the look
   changes here. Catalogue: docs/client-ui-assets.md, "Krok 5". */

/* 1. ShortcutWndHorizontal (interface.xdat, 504 x 46; our back wnd/shortcut-back.png starts 12 px into it, so its x - 12): the lower
   bar shows one page, the upper bar (Expand) the other (l2-hudrun.js sets data-page and data-rows). ExpandButton / ReduceButton
   14 x 14 at (1, 8) of the lower bar (shortcut_expand, shortcut_minimize), NextBtn at (13, 1) and PrevBtn at (13, 31) of each bar
   (shortcut_nextv, shortcut_prevv: their _down pressed), PageNumTextBox 20 x 10 at (10, 18), centred, #dcdcdc. The buttons keep
   whole device pixels (--wpx), their places follow the HUD's scale (--hpx) as the back does. A phone keeps touch.css. */
@media not (pointer:coarse){
 #hud#hud .bottom-bars.hud-box[data-rows="1"]{--rows:1;height:var(--sh)}
 #hud#hud .bottom-bars.hud-box[data-rows="2"]{--rows:2}
 #hud#hud .bottom-bars[data-rows="2"][data-page="1"]{--p1row:1;--p2row:0}
 #hud#hud .bottom-bars[data-rows="2"][data-page="2"]{--p1row:0;--p2row:1}
 #hud#hud .bottom-bars[data-rows="1"]{--p1row:0;--p2row:0}
 #hud#hud .bottom-bars[data-rows] :is(#skillBar>.icon,#talentBar>.icon,.slot-bar.dash>.dash-icon:not(.aug-active)){--row:var(--p1row)}
 #hud#hud .bottom-bars[data-rows] :is(#jewelBar>.icon,#augmentSlot>.icon,#augActive){--row:var(--p2row)}
 /* the page not shown keeps its boxes (game.js flies a new jewel to its slot), only out of sight and out of reach */
 #hud#hud .bottom-bars[data-rows="1"][data-page="1"] :is(#jewelBar>.icon,#augmentSlot>.icon,#augActive),
 #hud#hud .bottom-bars[data-rows="1"][data-page="2"] :is(#skillBar>.icon,#talentBar>.icon,.slot-bar.dash>.dash-icon:not(.aug-active)){visibility:hidden;pointer-events:none}
 :is(#hud .bottom-bars,#townBar)>.sc-ctl{position:absolute;left:0;top:0;width:0;height:100%;overflow:visible;pointer-events:none;z-index:2}
 :is(#hud .bottom-bars,#townBar)>.sc-ctl button{position:absolute;display:block;box-sizing:border-box;min-width:0;width:calc(14*var(--wpx));height:calc(14*var(--wpx));
  margin:0;padding:0;border:0;border-radius:0;outline:0;box-shadow:none;background:var(--n) 0 0/calc(16*var(--wpx)) calc(16*var(--wpx)) no-repeat;
  image-rendering:pixelated;cursor:pointer;pointer-events:auto;font-size:0;color:transparent}
 :is(#hud .bottom-bars,#townBar)>.sc-ctl button:active{background-image:var(--d)}
 /* (18. 11. 2026, Daniel over the client's bar: "špatně vycentrovaná v tom poli") the column's buttons and number sit between its two
    light lines as the client's do: at --hk 1 those are the back's x 1 and 14 (xdat NextBtn and PrevBtn at 13 = 12 + 1, 14 wide, over
    both lines; PageNumTextBox 20 wide centred on 8), at 1.25 shortcut-back-125's 1 and 19, where the 14 px buttons (whole device
    pixels) were at 1 and left 4 px on the right: now 3 (1 and 2 px to the lines) and the number centred between them; PrevBtn 1 px
    over the bottom edge as NextBtn under the top (xdat 31 of 46; at 1.25 it was 39 of 58, 4 px from the edge). ExpandButton at (1, 8)
    in the strip l2-hudwnd.css draws left of the back (its 11 px between the strip's lines at 1 and 11; at 1.25 at 2 of 15). */
 :is(#hud .bottom-bars,#townBar){--scl:var(--wpx,1px);--sel:var(--wpx,1px);--spw:calc(12*var(--wpx,1px))}
 :is(#hud .bottom-bars,#townBar)>.sc-ctl .sc-size{left:calc(var(--sel) - var(--sx,0px));top:calc((var(--rows,2) - 1)*var(--sh) + round(nearest,calc(8*var(--hpx)),var(--wpx,1px)))}
 :is(#hud .bottom-bars,#townBar)>.sc-ctl .sc-pager{position:absolute;left:0;width:calc(16*var(--hpx));height:var(--sh)}
 :is(#hud .bottom-bars,#townBar)>.sc-ctl .sc-pager.lower{top:calc((var(--rows,2) - 1)*var(--sh))}
 :is(#hud .bottom-bars,#townBar)>.sc-ctl .sc-pager.upper{top:0}
 :is(#hud .bottom-bars,#townBar)[data-rows="1"]>.sc-ctl .sc-pager.upper{display:none}
 :is(#hud .bottom-bars,#townBar)>.sc-ctl .sc-next{left:var(--scl);top:var(--wpx,1px)}
 :is(#hud .bottom-bars,#townBar)>.sc-ctl .sc-prev{left:var(--scl);top:calc(var(--sh) - 15*var(--wpx,1px))}
 :is(#hud .bottom-bars,#townBar)>.sc-ctl .sc-page{position:absolute;left:calc(2*var(--wpx,1px));top:0;width:var(--spw);height:var(--sh);
  display:grid;place-items:center;font:var(--hfont)/calc(10*var(--hpx)) var(--l2font);font-weight:400;letter-spacing:0;color:#dcdcdc;text-shadow:none;pointer-events:none}
 /* the HUD layout's grip lies on the handle while the HUD is unlocked: the pagers step aside for it */
 #hud.hud-unlocked .bottom-bars>.sc-ctl .sc-pager{display:none}
 /* the key inside the well's top left corner where shortcut_f01 to f12 put the client's pixel digits (step 3 had it over the frame
    and "Space" ran over the next well's line). (Daniel 3. 12. 2026 14:0x: "ty napovedy pismen nebo co se ma zmačknout jsou strašně
    mini pidi") the client's font at the HUD's size, as the rank and "+3" in the well's other corner (the small font at 13 device
    px drew 5 px letters, the client's digits are a quarter of the well: klient-lista.png) */
 #hud#hud .bottom-bars .dash-icon .key{left:var(--hpx);top:0;right:auto;bottom:auto;
  font:var(--hfont)/var(--hline) var(--l2font);letter-spacing:0}
 html[data-font] #hud#hud#hud .bottom-bars .slot-bar.dash .dash-icon .key{font-size:var(--hfont)!important}
}
@media (min-height:1100px) and (not (pointer:coarse)){
 #hud#hud .bottom-bars.hud-box[data-rows="1"]{background-image:url(assets/ui/wnd/shortcut-back-125.png)}
 :is(#hud .bottom-bars,#townBar){--scl:calc(3*var(--wpx,1px));--sel:calc(2*var(--wpx,1px));--spw:calc(17*var(--wpx,1px))}
}
@media (pointer:coarse){:is(#hud .bottom-bars,#townBar)>.sc-ctl{display:none}}

/* 2. StatusWnd: the gauges' numbers in the same font and size as the name over them (they were the client's small font at 13 px
   while the name grew with the HUD: "105/105" and "0.00%" tiny under a big name) */
:is(#hud,#townUi) .hp-card.hud-box.hud-box .bar>span{font:var(--hfont)/calc(12*var(--hpx)) var(--l2font);letter-spacing:0;text-shadow:var(--wpx) var(--wpx) 0 #000}

/* 3. Aden's own panels (the run's time, Kills / Adena / Chest, the quest tracker, the DPS meter, the boss and event rows, the lost
   note, toasts, loot): no client window shows them, so they take the client's plain small window, OlympiadTargetWnd's back
   (L2UI_CH3.SmallWnd.Smallwindow_back1, _back2, _back3: wnd/smallpanel.png, scripts/l2-hudrun-tex.py), sliced at its 4 top rows,
   2 bottom rows, 16 left and 4 right columns in whole device pixels, its middle tiled one colour as the client does */
#hud#hud :is(.timer-card,.run-stats,.lost-note,.dps,.expedition-tracker,.boss-rows).hud-box,#toast#toast,#hud#hud .loot-feed>.loot-entry{
 border:0 solid transparent;border-radius:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;background:none;
 border-image:url(assets/ui/wnd/smallpanel.png) 4 4 2 16 fill/calc(4*var(--wpx)) calc(4*var(--wpx)) calc(2*var(--wpx)) calc(16*var(--wpx)) stretch;
 image-rendering:pixelated;font:var(--hfont)/var(--hline) var(--l2font);font-weight:400;letter-spacing:0;text-shadow:none;transition:none}
/* every text in them one font, one size, plain (the time was 1.5 times, the DPS tabs 24 px, the quest's line 26 px, the toast 1.05rem);
   three ids, as l2-ui.css's 24 px for the DPS tabs and the quest's count counts two (#menu #zoneList in its list) */
#hud#hud#hud :is(.timer-card,.run-stats,.lost-note,.dps,.expedition-tracker,.boss-rows) :is(span,b,small,strong,button,label,p,div:not(.bar)),
#hud#hud#hud .expedition-pips>em,#toast#toast,#toast#toast *,#hud#hud .loot-feed>.loot-entry :is(span,b,small,strong,em,div){
 font-family:var(--l2font)!important;font-size:var(--hfont)!important;line-height:var(--hline)!important;font-weight:400;font-style:normal;letter-spacing:0!important;text-shadow:none}
#hud#hud .loot-feed{font:var(--hfont)/var(--hline) var(--l2font);text-shadow:none}
#hud#hud .loot-feed>.loot-entry{border-width:1px}  /* (interface.css counts a drop's height with its 1 px border: --loot-step) */

/* (Daniel 14. 11. 2026 21:0x to 21:1x over the run on the test site: the buttons on the box's bottom edge, "30 s" on the DPS
   meter's right edge, the last row on its bottom one) every panel's inside the same on the left as on the right and at the top as
   at the bottom: smallpanel's lines are 2 px on each side (its left a dark fade, no line), the left padding was 14 to 16 for its
   16 px slice and the right 4 to 10, the bottom one more than the top */
/* the time: zone, time and the next boss, each a line, centred */
#hud#hud .timer-card.hud-box{padding:calc(4*var(--hpx)) calc(14*var(--hpx))}
#hud#hud .timer-card>span{color:var(--yellow)}
#hud#hud .timer-card strong{margin:0;color:#fff}
/* Kills, Adena, Chest, Status and pause on one line */
#hud#hud .run-stats.hud-box{gap:calc(8*var(--hpx));padding:calc(4*var(--hpx)) calc(6*var(--hpx))}
/* the Adena icon (style.css: 1.15em by .86em of the declared font, taller than the drawn text) stood on the baseline, made its line
   taller and pushed the number 3 to 4 px below Kills and Chest; centred beside its number as touch.css does on a phone */
#hud#hud .run-stats>.stat-adena{display:inline-flex;align-items:center}
/* the client's Btn1 (normal, over, down: the kit's .l2-btn) for Status, pause and the DPS meter's scope; pressed while on */
#hud#hud :is(.run-stats .stat-btn,.run-stats .icon-btn,.dps .dps-scope:not(.dps-modes) button,.run-chat-quick button){box-sizing:border-box;min-width:calc(23*var(--hpx));width:auto;
 height:round(nearest,calc(23*var(--hpx)),var(--wpx,1px));margin:0;padding:0 calc(4*var(--hpx)) calc(2*var(--hpx));display:inline-grid;place-items:center;
 border:0 solid transparent;border-width:0 calc(8*var(--wpx)) 0 calc(4*var(--wpx));border-radius:0;box-shadow:none;outline:0;background: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;image-rendering:pixelated;color:#dcdcdc;cursor:pointer}
#hud#hud :is(.run-stats .stat-btn,.run-stats .icon-btn,.dps .dps-scope:not(.dps-modes) button,.run-chat-quick button):hover{border-image-source:url(assets/ui/wnd/btn1-over.png);color:#fff}
#hud#hud :is(.run-stats .stat-btn,.run-stats .icon-btn,.dps .dps-scope:not(.dps-modes) button,.run-chat-quick button):is(:active,.on){border-image-source:url(assets/ui/wnd/btn1-down.png);color:#fff}
#hud#hud .run-stats .icon-btn{padding:0 0 calc(2*var(--hpx))}
/* the chat's quick words (run-chat.js): the HUD's font as on every other button, not the chat's declared 26 px (they overflowed) */
#hud#hud #runChat .run-chat-quick button{font:var(--hfont)/var(--hline) var(--l2font);letter-spacing:0;text-shadow:none}

/* the DPS meter: what it shows as the client's tabs (the kit's .l2-tab: tab-on, its _over, tab for the picked one), the scope as Btn1,
   each source's share as the client's CP gauge without a glow */
#hud#hud .dps.hud-box{padding:calc(5*var(--hpx)) calc(8*var(--hpx))}
#hud#hud .dps .dps-bar{gap:calc(4*var(--hpx));margin-bottom:calc(4*var(--hpx))}
#hud#hud .dps .dps-scope{gap:0}
#hud#hud .dps .dps-modes button{flex:1 1 0;box-sizing:border-box;min-width:0;height:round(nearest,calc(23*var(--hpx)),var(--wpx,1px));margin:0;padding:0 0 calc(2*var(--hpx));
 border:0 solid transparent;border-width:0 calc(10*var(--wpx)) 0 calc(8*var(--wpx));border-radius:0;box-shadow:none;outline:0;background:none;
 border-image:url(assets/ui/wnd/tab-on.png) 0 10 0 8 fill/0 calc(10*var(--wpx)) 0 calc(8*var(--wpx)) stretch;image-rendering:pixelated;
 color:#a3a3a3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
#hud#hud .dps .dps-modes button:hover{border-image-source:url(assets/ui/wnd/tab-on-over.png)}
#hud#hud .dps .dps-modes button.on{border-image-source:url(assets/ui/wnd/tab.png);color:#dcdcdc}
#hud#hud .dps .dps-scope:not(.dps-modes) button{flex:1 1 0}
#hud#hud .dps .dps-row{gap:calc(6*var(--hpx));margin-top:calc(3*var(--hpx))}
#hud#hud .dps .dps-row span i,#hud#hud .dps .src-dot{border-radius:0;box-shadow:none;background:url(assets/ui/gauge-cp.png) 0 0/100% 100% no-repeat;image-rendering:pixelated}
#hud#hud .dps .dps-row span i{bottom:calc(-2*var(--hpx));height:calc(3*var(--hpx))}
/* (Daniel 14. 11. 2026 21:1x: the last row's icon on the meter's bottom edge) the meter over the loot feed is as tall as the room
   there (interface.css --room) but no longer faded and cut at that height: game.js shows only the rows that fit whole, so its frame
   closes under the last one as far from it as the top line is from the tabs */
#hud#hud .dps.hud-box:not(.hud-positioned){-webkit-mask-image:none;mask-image:none;clip-path:none}

/* the boss rows and the event's row under the time: the client's target HP gauge (hpbar over hpbar_back, as TargetStatusWnd in
   l2-hudwnd.css), the event's progress the CP gauge */
#hud#hud .boss-rows.hud-box{gap:calc(4*var(--hpx));padding:calc(4*var(--hpx)) calc(10*var(--hpx))}
/* no top margin: the text's line box already leaves its gap over the gauge, with 2 px more it was 3 to 5 px under the text
   and 1 px over it (siege window round 24. 11. 2026, l2-ui.md Zarovnani) */
#hud#hud .boss-slim .bar{height:calc(6*var(--hpx));margin-top:0;border:0;border-radius:0;box-shadow:none;
 background:url(assets/ui/xdat/tex/hpbar_back.png) 0 0/100% calc(100% * 8 / 6) repeat-x;image-rendering:pixelated}
#hud#hud .boss-slim .bar>i{background:url(assets/ui/xdat/tex/hpbar.png) 0 0/100% calc(100% * 8 / 6) repeat-x;image-rendering:pixelated}
#hud#hud .boss-slim.event .bar>i{background:url(assets/ui/gauge-cp.png) 0 0/100% 100% no-repeat}
/* a row no wider than its panel: its own width (17 lines, at most 60vw) was wider than the column under the time on a phone on its
   side (touch.css keeps that column at 100vw - 500 px), the gauge and the percent ran out of the frame */
#hud#hud .boss-slim{max-width:100%;padding-top:calc(1*var(--hpx))}  /* the text 1 px under the row top, 2.5 over the gauge: one client px
   down centres it (siege window round 24. 11. 2026 r2, l2-ui.md Zarovnani) */

/* the quest tracker: the reward's icon in the client's slot outline (inventory_outline, as the skill bar), its pointer without a
   disc, the three tries as plain squares without glows, the hold bar the client's EXP gauge */
#hud#hud .expedition-tracker.hud-box{gap:calc(8*var(--hpx));padding:calc(5*var(--hpx)) calc(8*var(--hpx))}
#hud#hud .expedition-tracker .expedition-slot{box-sizing:border-box;width:calc(32*var(--hpx));height:calc(32*var(--hpx));flex:0 0 calc(32*var(--hpx));
 border:0;border-radius:0;box-shadow:none;background-color:transparent}
#hud#hud .expedition-tracker .expedition-slot::before{content:'';position:absolute;left:calc(-1*var(--wpx));top:calc(-1*var(--wpx));
 width:calc(100% + 4*var(--wpx));height:calc(100% + 4*var(--wpx));background:url(assets/ui/wnd/icon-outline.png) 0 0/100% 100% no-repeat;image-rendering:pixelated;pointer-events:none}
#hud#hud .expedition-tracker .expedition-direction{right:calc(-6*var(--hpx));bottom:calc(-6*var(--hpx));width:calc(16*var(--hpx));height:calc(16*var(--hpx));
 border:0;border-radius:0;background-color:transparent;background-size:100% 100%;filter:none}
#hud#hud .expedition-tracker .expedition-head{gap:calc(6*var(--hpx))}
#hud#hud .expedition-tracker .expedition-pips{gap:calc(3*var(--hpx))}
#hud#hud .expedition-tracker .expedition-pips i{box-sizing:border-box;width:calc(7*var(--hpx));height:calc(7*var(--hpx));transform:none;border:var(--wpx) solid #6e6554;background:#14120f;box-shadow:none}
#hud#hud .expedition-tracker .expedition-pips i.done{background:#5d8a45;border-color:#a8e884}
#hud#hud .expedition-tracker .expedition-pips i.now{background:var(--gold);border-color:#fff5d6}
#hud#hud .expedition-tracker .expedition-pips em{margin-left:calc(2*var(--hpx));color:var(--yellow)}
#hud#hud .expedition-tracker .expedition-copy>small{margin-top:calc(2*var(--hpx));color:#a3a3a3}
#hud#hud .expedition-tracker .expedition-hold{height:calc(6*var(--hpx));margin-top:calc(3*var(--hpx));border:0;border-radius:0;box-shadow:none}
@media (min-height:1100px) and (not (pointer:coarse)){
 #hud#hud .expedition-tracker .expedition-slot::before{background-image:url(assets/ui/wnd/icon-outline-125.png)}
}

/* the lost note and toasts */
#hud#hud .lost-note.hud-box{padding:calc(4*var(--hpx)) calc(12*var(--hpx)) calc(5*var(--hpx)) calc(16*var(--hpx))}
#toast#toast{padding:calc(6*var(--hpx)) calc(14*var(--hpx)) calc(6*var(--hpx)) calc(18*var(--hpx));color:#dcdcdc}

/* 4. No rounded corner anywhere in the HUD or the town's UI (AGENTS.md, "Hranaté jako L2"), nor in what shows over a run: the
   tooltip, the level-up choice and the pause (their frames are still Aden's own, the catalogue's step 5 lists them). The round ones,
   written down in the catalogue: the radar (RadarWnd is a disc in the client) and a phone's Evade and Active skill buttons (touch.css,
   thumb-sized) */
:is(#hud,#townUi,#toast,#tooltip,#choiceModal,#pauseModal) :not(.radar-box,.radar-box *),
:is(#hud,#townUi,#toast,#tooltip,#choiceModal,#pauseModal) :not(.radar-box,.radar-box *)::before,
:is(#hud,#townUi,#toast,#tooltip,#choiceModal,#pauseModal) :not(.radar-box,.radar-box *)::after,
:is(#hud,#townUi,#toast,#tooltip,#choiceModal,#pauseModal){border-radius:0!important}
@media (pointer:coarse){
 #hud#hud .slot-bar.dash :is(.dash-icon,.aug-active),#hud#hud .slot-bar.dash :is(.dash-icon,.aug-active) :is(*,.cd){border-radius:50%!important}
 #hud#hud .slot-bar.dash :is(.dash-icon,.aug-active)::before,#hud#hud .slot-bar.dash :is(.dash-icon,.aug-active)::after{border-radius:50%!important}
}

/* 5. The tooltip, in the run, in town and in the menu: the client's ToolTip frame (L2UI_CH3.ToolTip.tooltip1 to tooltip9, 8 x 8 each:
   black, #525152 and #1b1b1b lines round a black middle, opaque; wnd/tooltip.png, scripts/l2-hudrun-tex.py) sliced 3 px on every
   side in whole device pixels, instead of a rounded box with a drop shadow of our own (style.css) */
#tooltip#tooltip{border:calc(3*var(--wpx)) solid transparent;box-shadow:none;background:none;
 border-image:url(assets/ui/wnd/tooltip.png) 3 fill/calc(3*var(--wpx)) stretch;image-rendering:pixelated}
#tooltip#tooltip>*{image-rendering:auto}  /* (the frame's lines sharp, the item and skill icons and the model in it as before) */
/* the tooltip at the windows' size (e9 15. 11. 2026: its fixed 26 px stood at 2560 over nearly the whole Inventory): on a computer
   the windows' L2 text (--wfont, l2-wnd.js rescale writes it on #tooltip too) and a width in its own letters, a phone as before.
   Taller than the screen (game.js): two columns, and cut at the screen's bottom only where even they do not fit */
@media not all and (pointer:coarse){
 :where(html:not([data-font]),html[data-font="l2"]) #tooltip#tooltip{font-size:var(--wfont,26px);max-width:min(18.5em,calc(100vw - 1rem))}
}
#tooltip#tooltip.tip-cols{max-width:none;columns:2;column-gap:calc(12*var(--wpx))}
#tooltip.tip-cols>*{break-inside:avoid}
#tooltip#tooltip.tip-cut{max-height:calc(100vh - 16px);max-height:calc(100dvh - 16px);overflow:hidden}
/* UI port step 6, the run card's gauges: the number in the bar's middle (e9 14. 11. 2026 23:4x: 150/150 and 0.00% 1.3 to 1.6 px
   off it on a phone, 280/280 1.4 px on 2560 x 1440). The grid centred the number's line, whose room over the capitals and under
   the baseline is not the same and differs with the font a phone has; where text-box is, the number is a block of its capitals'
   height in the bar's middle, across it as before. */
@supports (text-box:trim-both cap alphabetic){
 :is(#hud,#townUi) .hp-card.hud-box.hud-box .bar>span{display:block;inset:0;height:fit-content;margin:auto 0;line-height:normal;text-box:trim-both cap alphabetic;text-align:center}
}

/* Giran's bar (l2-actions.js townBar) is the same ShortcutWndHorizontal (18. 11. 2026, "lišta ve městě stejná"): the strip with
   Expand / Reduce and the column's paging and number as the run's (initShortcutBar), two pages of 12 wells (data-pg 1 and 2), the
   lower bar one, the upper (Expand) the other. A phone keeps touch.css (its 8 wells of page 1, no buttons). */
@media not (pointer:coarse){
 #townBar#townBar[data-rows="2"]{--rows:2}
 #townBar#townBar[data-rows="2"][data-page="1"]{--p1row:1;--p2row:0}
 #townBar#townBar[data-rows="2"][data-page="2"]{--p1row:0;--p2row:1}
 #townBar#townBar[data-rows="1"]{--rows:1;--p1row:0;--p2row:0}
 #townBar#townBar[data-rows] .icon[data-pg="1"]{--row:var(--p1row)}
 #townBar#townBar[data-rows] .icon[data-pg="2"]{--row:var(--p2row)}
 #townBar#townBar[data-rows="1"][data-page="1"] .icon[data-pg="2"],
 #townBar#townBar[data-rows="1"][data-page="2"] .icon[data-pg="1"]{visibility:hidden;pointer-events:none}
}

/* 6. The boxes over each other under the time (Daniel 3. 12. 2026 14:0x over the zone's name with the time, the raid boss's bar,
   the target window and the server boss's small window: "jsou divne pozicovane v boxech ty fonty, jeden jinači než druhy a je to
   takovy miš maš", l2-ui.md Boxy HUD runu nad sebou). Before: the time and the rows on 12-px lines with the capitals 4 px under
   the line's top (4 + 4 over the text, 4 + 0 under it), the target and the server boss on 14-px lines under a 9 px padding, the
   rows' percent at their right edge, and the target's "name · Lv." ran under its close button. Now one style: the HUD's font at
   one size and weight, every line centred and trimmed to its capitals and baseline (text-box, as the gauges' numbers in section 4),
   so the same padding is the same gap to the frame's 2 px lines above and below (smallpanel and smallwnd alike): 5 from the line
   to the capitals and from the baseline or a gauge to the line. Text 4 apart (the client's 12-px line under 8-px capitals), a
   gauge 4 under a text, a gauge 5 under its name's baseline (its descenders clear it, TargetStatusWnd's name line is 9 to 23 and
   its barHP 26), 10 from the frame at the left and right. A clipped line (the ellipsis of a long name) keeps room for its accents
   and descenders in a padding its negative margin takes back. */
#hud{--stp:calc(7*var(--hpx));--stx:calc(10*var(--hpx));--stg:calc(4*var(--hpx));--stb:calc(5*var(--hpx));--stk:calc(180*var(--hpx))}
#hud#hud .timer-card.hud-box{display:flex;flex-direction:column;align-items:center;gap:var(--stg);padding:var(--stp) var(--stx)}
#hud#hud .timer-card.hud-box>:empty{display:none}
#hud#hud .boss-rows.hud-box{gap:var(--stg);padding:var(--stp) var(--stx)}
#hud#hud .top-stack .boss-slim{display:grid;grid-template-columns:1fr minmax(0,max-content) max-content 1fr;row-gap:var(--stb);padding-top:0}
#hud#hud .top-stack .boss-slim>span{grid-column:2;grid-row:1}
#hud#hud .top-stack .boss-slim>b{grid-column:3;grid-row:1}
#hud#hud .top-stack .boss-slim>.bar{grid-column:1/-1;grid-row:2;margin:0}
#hud#hud .top-stack .boss-slim>span>small::before{content:'·\00a0'}
#hud#hud .top-stack .boss-slim>b:not(:empty)::before{content:'\00a0·\00a0';color:#c9bfae}
/* the target (TargetStatusWnd) in a run: its name and HP; its close button stays where the client has it (10 from the right) beside
   the name's capitals, the name's padding clears it on both sides so the name stays in the middle; the gauge 10 from the frame as
   the rows' (smallwnd's right 4 columns are empty, the frame's line is 4 px in) */
#hud#hud #townTarget.l2t-run{min-height:0;gap:var(--stb);
 padding:var(--stp) calc(12*var(--hpx) + 19*var(--wpx)) var(--stp) calc(12*var(--hpx) + 15*var(--wpx))}
#hud#hud #townTarget.l2t-run #townTargetClose{top:calc(var(--stp) + (.73*var(--hfont) - 15*var(--wpx))/2)}
#hud#hud #townTarget.l2t-run .l2t-hp{position:relative;left:auto;top:auto;width:auto;
 margin:0 calc(var(--stx) - 12*var(--hpx) - 15*var(--wpx)) 0 calc(var(--stx) - 12*var(--hpx) - 15*var(--wpx))}
/* the server boss's small window in a run (server-boss.css, session emoji): its name, HP and line the same way, no close button
   there; its visibility is emoji's (touch.css sb-open) */
#hud#hud #serverBoss.server-boss.sb-run{min-height:0;gap:0;padding:var(--stp) calc(var(--stx) + 4*var(--wpx)) var(--stp) var(--stx)}
#hud#hud #serverBoss.server-boss.sb-run .sb-hp{position:relative;left:auto;top:auto;width:auto;margin:var(--stb) 0 0}
/* both windows as wide as their line and at least the client's 164 (a long name ran under the close button at 164) */
#hud#hud :is(#townTarget.l2t-run,#serverBoss.server-boss.sb-run){box-sizing:border-box;width:auto;min-width:calc(164*var(--hpx))}
/* every line of them: one font, size and weight, centred, trimmed */
#hud#hud#hud :is(.timer-card>*,.top-stack .boss-slim>:is(span,b),#townTarget.l2t-run>b,#serverBoss.sb-run>:is(b,small)){
 font-family:var(--l2font)!important;font-size:var(--hfont)!important;line-height:var(--hline)!important;font-weight:400;font-style:normal;
 letter-spacing:0!important;text-shadow:none;text-align:center;height:auto;margin-block:0}
#hud#hud#hud :is(.top-stack .boss-slim>span,#townTarget.l2t-run>b,#serverBoss.sb-run>:is(b,small)){padding-block:.45em;margin-block:-.45em}
/* the server boss's line: 4 under the name before the fight (no gauge) and under the gauge in it */
#hud#hud#hud #serverBoss.sb-run>.sb-line{margin-top:calc(var(--stg) - .45em)}
@supports (text-box:trim-both cap alphabetic){
 #hud#hud#hud :is(.timer-card>*,.top-stack .boss-slim>:is(span,b),#townTarget.l2t-run>b,#serverBoss.sb-run>:is(b,small)){text-box:trim-both cap alphabetic}
}
/* the column as wide as its widest box and at least --stk, every box its width (the time above too); a phone keeps touch.css's
   widths (the siege's rows end before the run's counters) */
@media not (pointer:coarse){
 #hud#hud .top-stack{align-items:stretch;min-width:var(--stk);max-width:max(var(--stk),60vw)}
 #hud#hud .top-stack>:is(.boss-rows,#townTarget,#serverBoss){box-sizing:border-box;width:auto;max-width:none}
 #hud#hud .top-stack>:is(#townTarget,#serverBoss){margin-right:calc(-4*var(--wpx))}
 #hud#hud .top-stack .boss-slim{width:auto;max-width:none}
 #hud#hud .top-stack>.lost-note{align-self:center}
 #hud#hud .timer-card.hud-box{box-sizing:border-box;min-width:var(--stk)}
}
