/* The UI at every window size (Claude „rozlišení“, 4. 11. 2026; Daniel from his notebook: „na menším rozlišení se překrývají
   boxy … testnout na více rozměrech a všechno opravit“). Loaded after menu-nav.css, before touch.css (the phone keeps the last
   word). Measured with .work/small-res-2026-11-04 (shots.py, audit.js) from 1280 x 650 to 2560 x 1440 and on Pixel 7.

   1. Lines as tall as the drawn text. The menu's texts got 26 px with line-height 1.15 in the pixel font's time (interface.css,
      #menu :is(#className, …)); the default font is Tahoma drawn at about 0.72 rem (game.js uiFont, --l2k its share), so those
      lines were twice the text: the Run length line under its buttons had a gap of a whole line, the race rows and the class's
      name stood tall and the Race panel lost its facts (HP, Starting skill, Talents spent) under its edge on a notebook.
      The spacing of the drawn text like l2-ui.css gives p, li and small: 1.45 of what is drawn. The pixel fonts keep theirs. */
:where(html[data-font="l2"]) #menu :is(#className,#heroRace,#talentHint,#ascBest,#ascBest>small,#totalAdena,.facts b,#skillPool .skill-item b,.race-text>em,.race-text>i,.mode-head>b,#modeLine,#startSub,#zoneList .zone-name .sub){line-height:calc(var(--l2k) * 1.45em)!important}
/* the windows' texts of l2-ui.css (p, span, b … at 1.5 of what is drawn) leave out an i: a specialization's description in Talents
   (interface.css, 26px/1.1 since 30. 10.) had its lines 28.6 px apart for 11 px of text, a gap of 16 px („rozlišení“ 5. 11.) */
:where(html[data-font="l2"]) .specialized .tree>h3 .tree-sub{line-height:calc(var(--l2k) * 1.5em)}

/* A low window (under 945 px the rem stops shrinking, 14 px; a notebook at 125 % is about 1536 x 795 to 880): the race rows with
   smaller portraits, so the facts under the class's text stay in the Race panel above the footer. */
@media (min-width:861px) and (max-height:944px){
 #menu .race-portrait{width:2.9rem;height:2.9rem}
 #menu .race-row{padding:.3rem .5rem}
}

/* 2. The test profile's tag (game.js TEST: the dev test shortcut, a local server) lay at the bottom left over the menu's version
      line, the town's chat and a run's Expedition window. The bottom right corner is free in the menu (under Co-op, on the line of
      the keys) and in a run; in a town the client's menu bar is there, so its top right. */
.test-tag{left:auto;right:.6rem}
body:has(#townUi:not([hidden])) .test-tag{top:.5rem;bottom:auto}
/* a phone's run (touch.css's phone sizes) has the joystick at the bottom left and the evade at the bottom right: the tag between
   them (a tablet keeps the skill bar in the middle, so the right corner) */
@media (pointer:coarse) and (max-width:600px),(pointer:coarse) and (max-height:520px){body.in-game:not(:has(#townUi:not([hidden]))) .test-tag{right:auto;left:50%;transform:translateX(-50%)}}

/* 3. Giran's button: the map's labels (Execution Grounds, Giran Arena) lay under the button's text on a narrow button, the map
      covered from the right. The dark end now as wide as the text (the town's name and its count, about 11 rem) before the map
      shows; the map's strips (.work/town-art/town_art.py) end where no label is cut and draw the town at about 83 % of their
      width, so it stays right of the text on the narrowest button (1280 px, 4.3 : 1) too. */
#menu #townButton::before{background:linear-gradient(90deg,rgba(16,13,10,.95) 0,rgba(16,13,10,.92) max(11rem,40%),rgba(16,13,10,.3) calc(max(11rem,40%) + 3.5rem),rgba(16,13,10,.06) 100%),var(--town-art) right center/cover no-repeat}

/* 4. A low window, under 500 px high: a phone on its side (a Pixel 7 is 863 x 360) or a small window with a mouse. The desktop's
      menu had there a top bar of 142 px (the logo's line, then the tabs in two rows) and a footer of 131 px: the Race and Zone
      panels got 75 px, the character none, its gear lay over the footer. The top bar in one row (the logo without its name,
      Discord and Ko-fi by their icons, the tabs sideways when they do not fit, under 1700 px where the bar has two rows), the
      footer without the run length's line (the choice says it, a phone has it at the gatekeeper too), the hero's name beside
      Male/Female and its gear at the client's 32 px. A mouse gets the tabs' scrollbar under them, so its panels start lower. */
@media (min-width:861px) and (max-width:1700px) and (max-height:500px){
 #menu{--menu-top:3.7rem}
 #menu .topbar{height:auto;min-height:0;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:'brand tabs actions';align-items:center;gap:.5rem;padding:.2rem .6rem}
 #menu .topbar>.brand>span:not(.sigil){display:none}
 #menu .menu-links{margin-left:.3rem}
 #menu .menu-link{font-size:0;gap:0}
 #menu .topbar>#menuTabs{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;min-width:0}  /* centred, the first tabs lay left of the scroll's start */
}
/* 6. The top bar's right part (Adena, Options, About, Sound, Exit) in one row: style.css lets it wrap for the best Ascension on its
      own row above the icons, which interface.css hides under 2300 px; wrapping, its grid column got only its widest item, so at
      960 px (half of a Full HD screen) Exit lay under the others. */
@media (min-width:861px) and (max-width:1799px){#menu .topbar>.topright{flex-wrap:nowrap}}
@media (min-width:861px) and (max-width:1700px) and (max-height:500px) and (pointer:fine){#menu{--menu-top:4.5rem}}
@media (min-width:861px) and (max-height:500px){
 #menu .panel>.panel-title{min-height:1.8rem;margin-bottom:.35rem;padding:.2rem .6rem .1rem}
 #menu .hero-panel{gap:.25rem}
 #menu .hero-head{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;column-gap:.7rem}
 #menu .hero-head #heroRace{order:3;flex:0 0 100%;margin:0}
 #menu .gender-seg{margin-top:0}
 #menu .hero-stage{grid-template-columns:2.6rem minmax(0,1fr) 2.6rem}
 #menu .equip-col{gap:3px}
 #menu .equip-col .icon{width:32px;height:32px}
 #menu .hero-info{display:flex;align-items:center;justify-content:space-between;gap:.5rem;padding:.3rem .5rem}
 #menu .hero-info>.progress{display:none}
 #menu .menu-footer .mode .mode-line{display:none}
}
/* a phone's height (under 420 px): the race and class line goes (the Race panel has both), so the third row of gear stays above
   the collection's line */
@media (min-width:861px) and (max-height:420px){#menu .hero-head #heroRace{display:none}}
/* a narrow window (a phone on its side, half of a Full HD screen): the zone list's names and set lines break into two lines,
   spaced as the drawn text, not as 26 px (a gap of 16 px between them) */
@media (min-width:861px) and (max-width:1250px){:where(html[data-font="l2"]) #menu #zoneList :is(.zone-name>h3,.tier-label>em,.tier-label>span){line-height:calc(var(--l2k) * 1.45em)}}
/* the zone list under 260 px (interface.css's container query, a window of 1280 px): a map's name and its pieces' tag may wrap,
   but on one line the tag stays at the right edge as on a wide window (it stood right after the name, the tags zigzagged); a tag
   wrapped under the name starts at the left all the same (space-between with one item on a line) */
@container (max-width:260px){#menu #zoneList .zone-head>.zone-pick{justify-content:space-between}}
/* 5. A touch screen has no keys' line under the footer (touch.css), so the version at the bottom left lay over the seals' button
      and the test tag over Co-op: the footer keeps that line for them. */
@media (pointer:coarse) and (min-width:861px){#menu .menu-footer{bottom:2.2rem}}

/* 7. The gear strips in a low window. A class with a shield has a 7th icon, the 4th on the right („město“ 5. 11. 2026): four icons
      of 48 px are 218 px, three 162 px, and the stage between the hero's name and the Collection bar of a 1280 x 560 window (a
      browser on a laptop at 150 %) 121 px, so the gear lay over the name's lines and under the bar (960 x 420: 145 px in 137).
      The strips run beside the name too, the bar keeps the panel's width; under 610 px the gear at the client's 32 px (48 px
      columns would reach under the top bar, with the footer's Control row from 600 px). A phone on its side (touch.css, „město“,
      a coarse pointer under 521 px) has its icons in two rows instead. */
@media (min-width:861px) and (max-height:680px) and (pointer:fine),(min-width:861px) and (min-height:521px) and (max-height:680px){
 #menu .hero-panel{display:grid;grid-template-columns:52px minmax(0,1fr) 52px;grid-template-rows:auto minmax(0,1fr) auto;column-gap:0}
 #menu .hero-stage{display:contents}
 #menu .hero-head{grid-area:1/2}
 #menu #stage{grid-area:2/2;min-height:0}
 #menu .hero-info{grid-area:3/1/4/4}
 #menu .equip-col{grid-row:1/3;align-self:center;align-self:safe center}  /* too tall: from the top, never under the top bar */
 #menu #equipLeft{grid-column:1}
 #menu #equipRight{grid-column:3}
}
/* up to 540 px the footer without the run length's line, as under 500 px (its Control row made it 29 px taller): four icons
   of 32 px did not fit beside the name at 510 px */
@media (min-width:861px) and (max-height:540px){#menu .menu-footer .mode .mode-line{display:none}}
/* from 501 px the top bar lies 7 px over the panels' top edge, the strips start under it */
@media (min-width:861px) and (min-height:501px) and (max-height:680px) and (pointer:fine),(min-width:861px) and (min-height:521px) and (max-height:680px){#menu .equip-col{margin-top:.5rem}}
@media (min-width:861px) and (max-height:609px) and (pointer:fine),(min-width:861px) and (min-height:521px) and (max-height:609px){
 #menu .hero-panel{grid-template-columns:2.6rem minmax(0,1fr) 2.6rem}
 #menu .equip-col{gap:3px}
 #menu .equip-col .icon{width:32px;height:32px}
}
/* 8. The gear of 64 px (66 with its border) in a column of 4.2 rem (style.css): under a rem of 15.7 px (a notebook's 1536 x 795
      to 880, 1600 x 900) the right strip lay 7 px past the Collection bar's right edge. */
@media (min-width:1281px) and (min-height:761px) and (max-width:2999px){#menu .hero-stage{grid-template-columns:max(4.2rem,66px) minmax(0,1fr) max(4.2rem,66px)}}
/* a narrow window (the page's one column, the rem 16 px) has its columns of 3.6 rem, the right strip lay 8 px past the panel; a
   touch screen has the same in touch.css („město“) */
@media (max-width:860px){#menu .hero-stage{grid-template-columns:max(3.6rem,66px) minmax(0,1fr) max(3.6rem,66px)}}

/* 9. The account's login box on the loading screen (login-box.js and loading.css are „promo“'s, this agreed with them 5. 11.
      2026). The game's title is in the key art (object-fit cover from its top, so max(100%, 56.25vw) tall), its letters end at
      31.7 % of that. The box's middle at 52 % reached over them on a low or a wide window (1280 x 600 and lower, 960 x 420, a
      phone on its side, a 21:9 screen): the middle now at least 6 px and half of the box with its third field open (100 client
      px) under the letters, and no lower than half of it with a two-line error (108) over the bottom. */
#loading .login-box{top:min(max(52%,calc(max(100%,56.25vw) * .317 + 6px + var(--cpx) * 100)),calc(100% - 6px - var(--cpx) * 108))}
/* where it then reaches the tip, the bar and Loading (their top about 100 px over a low window's bottom), they wait under the
   box until the player is in (the game loads behind it all the same) */
@media (max-height:560px),(min-aspect-ratio:12/5) and (max-height:640px),(min-aspect-ratio:14/5) and (max-height:750px),(min-aspect-ratio:16/5) and (max-height:1120px),(min-aspect-ratio:4/1){#loading.ls-login .ls-foot{visibility:hidden}}
/* a phone on its side (342 to 430 px high): the window's rows 4 client px apart instead of 6 and its edges 6 instead of 9, so
   the box with its third field stays under the title too */
@media (max-height:430px){
 #loading .login-wnd{gap:calc(var(--cpx) * 4);padding-top:calc(var(--cpx) * 6);padding-bottom:calc(var(--cpx) * 6)}
 #loading .login-box{top:min(max(52%,calc(max(100%,56.25vw) * .317 + 6px + var(--cpx) * 91)),calc(100% - 6px - var(--cpx) * 99))}
}
/* 10. The top bar in one row on PC windows 1240 to 1700 px wide too („město“ 5. 11. 2026, Daniel with his notebook's snapshot, 1533 × 888
      at 125 %: „vrchní lišta v menu by měla být úplně nahoře … ať se nepřekrývá … všechno v jedné lajně“). Under 1700 px interface.css put
      the tabs in a second row under the logo and the icons, and that bar ended 7 px into the panels Rasa, the hero and Zóna. Here
      section 4's row (the logo without its name, Discord, the download and Ko-fi by their icons, the tabs in the middle, sideways only
      if they still do not fit) at every height over 500 px, the panels right under it; under 1500 px the tabs at the client's text size
      (22 px, 28 px icons), so the widest bar a player gets (English, the talents' count, the web's download button) fits from 1240 px.
      Measured in .work/loading-phone-2026-11-05/topbar.py: no scroll from 1240 to 1700 px in Czech and English, the bar ends at 43 to
      46 px and the panels start at 60 px; 1151 to 1239 px keep the two rows, the panels under them at 7.8rem (the bar ends at 105 px). */
@media (min-width:1240px) and (max-width:1700px) and (min-height:501px){
 #menu{--menu-top:4.3rem}
 #menu .topbar{height:auto;min-height:0;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:'brand tabs actions';align-items:center;gap:.5rem;padding:.2rem .6rem}
 #menu .topbar>.brand>span:not(.sigil){display:none}
 #menu .menu-links{margin-left:.3rem}
 #menu .menu-link{font-size:0;gap:0}
 #menu .topbar>#menuTabs{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;min-width:0;justify-self:center}
}
@media (min-width:1240px) and (max-width:1499px){
 #menu{--nav-icon:28px}
 #menu #menuTabs>button{font-size:22px;gap:3px;padding:0 4px 0 0}
}
@media (min-width:1151px) and (max-width:1239px) and (min-height:501px){#menu{--menu-top:7.8rem}}
