/* The loading screen (loading-screen.js; Daniel 1. 11. 2026: his key art as the loading screen and his mock-up of the bar).
   The picture covers the whole window with the logo kept in view, the blurred 48 px copy under it gives the first frames its
   colours. At the bottom a tip, the bar and Loading… between the halves of the client's title ornament. --u grows with the
   window like the html font size but without the Options' interface size, so the first frame, before any script, already has
   the final layout; --b is the same unit for the bar, smaller when a narrow window cuts the footer's width.
   The client has no loading bar of its own (searched 1. 11.: the sp_32b loading pictures, sek.utx loading02, l2ui.utx and
   L2UI_CH3.utx); its metal comes from the ornament (onscrmsg_pattern01 of L2UI_CH3, assets/ui/ornament.png). Since 2. 11. the
   bar is gold (Daniel: the silver one was "šíleně basic", "out of place" on the golden picture): the ornament and the metal in
   the gold of the picture's title (scripts/loading-art.py), the fill and channel in the colours of the client's ClassicVP gauge
   (Moonland's L2UI_CT1, newer than Interlude, whose bars are plain), no ember at the fill's end, and Loading… over the gold
   line with its ornament from under the title (underline.png). */
#loading{--u:max(10px,min(.833vw,1.481vh));--w:min(calc(var(--u)*66),94vw);--b:calc(var(--w)/66);position:fixed;inset:0;z-index:50;overflow:hidden;background:#0c0a09;-webkit-text-stroke:0;opacity:1;visibility:visible;transition:opacity .6s ease,visibility 0s}
body.world-ready #loading:not(.ls-on){opacity:0;visibility:hidden;pointer-events:none;transition:opacity .6s ease,visibility 0s .6s}
body.world-ready #loading.ls-on{transition:opacity .35s ease .25s,visibility 0s .25s}  /* a later map: in view after 250 ms (SHOW_AFTER) */
body:has(#errorPanel:not([hidden])) #loading{display:none}
#loading::before{content:'';position:absolute;inset:-6%;background:url(./assets/ui/loading/key-art-tiny.jpg) 50% 0/cover no-repeat;filter:blur(calc(var(--u)*1.2))}
#loading .ls-art{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 0}  /* the logo and the title at the top stay whole on a wide window (2. 11.: Dawn Over Aden's Ruined Citadel); a phone held upright gets its middle 2:3 (index.html <picture>, scripts/loading-art.py portrait) */
#loading::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(to top,rgba(5,4,3,.9),rgba(5,4,3,.6) calc(var(--u)*8),rgba(5,4,3,0) calc(var(--u)*17))}
#loading .ls-foot{position:absolute;z-index:1;left:50%;bottom:calc(var(--u)*2.4);transform:translateX(-50%);width:var(--w);display:flex;flex-direction:column;align-items:center;gap:calc(var(--u)*1.05)}
#loading .ls-tip{margin:0;max-width:100%;font:400 calc(var(--u)*1.2)/1.35 var(--serif);color:#eadfc8;text-align:center;text-shadow:0 1px 2px #000,0 0 calc(var(--u)*.7) #000,0 0 calc(var(--u)*.2) #000;opacity:0;transition:opacity .5s ease}
#loading .ls-tip b{font-weight:400;color:#d0a565}
#loading.ls-ready .ls-tip{opacity:1}
/* The tip is the serif, not the client's Tahoma: l2-ui.css's line height for every p (calc(var(--l2k) * 1.45em) !important, four ids)
   made its wrapped lines overlap on a phone; its own 1.35 as with the other fonts (17. 11. 2026). */
#loading .ls-tip:not(#\#):not(#\#):not(#\#){line-height:1.35!important}

/* The bar: one SVG in index.html (viewBox 6600 x 260, 66 x 2.6 --b, as wide as the footer). The frame is one shape: the two
   metal lines in the ornament's colours (one gradient over the bar's height) curve at each end into a neck as tall as the
   ornament's thin strand, and the strand goes on as the client's ornament, its double blade and hook (bar-end.png, the
   ornament's end up to that strand, mirrored on the right). Under the frame the dark channel, pointed at both ends, and the
   fill from the left point to the right one, so the ends fill too; the fill's edges lie under the frame's, so no pixel grid
   opens a gap. (Daniel 1. 11. on a 2K screen: the first bar was three pieces, CSS lines, an SVG taper and the fill, each
   rounded to the pixels its own way: a step at the joins, black points at the ends and a gap under the fill.) */
#loading .ls-bar{position:relative;width:100%;aspect-ratio:6600/260;margin:calc(var(--b)*-.78) 0 calc(var(--b)*-.52)}
#loading .ls-bar svg{position:absolute;inset:0;width:100%;height:100%;overflow:visible;filter:drop-shadow(0 1px 1px rgba(0,0,0,.85))}
#loading .ls-fill{width:calc(var(--fill,.04)*4308px);transition:width .3s linear}
#loading .ls-bar.ls-reset .ls-fill{transition:none}

/* Loading…: spaced capitals over the gold line with its ornament from under the picture's title, as ADEN SURVIVORS stands
   over it; the letter spacing after the last letter mirrored before the first so the word sits in the middle. */
#loading .ls-label{display:flex;flex-direction:column;align-items:center;gap:0;font:400 calc(var(--u)*1.05)/1 var(--serif);letter-spacing:.42em;text-transform:uppercase;white-space:nowrap;color:#ecd6a4;text-shadow:0 1px 2px #000,0 0 calc(var(--u)*.6) #000}
#loading .ls-label span{padding-left:.42em}
#loading .ls-label::after{content:'';width:calc(var(--u)*22);aspect-ratio:1111/88;margin-top:calc(var(--u)*-.15);background:url(./assets/ui/loading/underline.png) center/100% 100% no-repeat}

/* The account's login (login-box.js; Daniel 3. 11. 2026: "malý box, kde by hodili jméno/heslo", "stejné okno jak je přímo v L2",
   "víc doprostřed", "založit účet by měly být v okně pořád"): the Interlude client's own login window, its LoginWnd back (L2UI_CH3
   logon_back, its 256 x 108 panel without the texture's empty rows, a 9-slice so its 1 px lines and corner marks stay sharp
   when it grows) at the client's 256 pixels wide (--cpx: one
   client pixel, as Giran's chat, l2-chat.css), l2ui's sunken edit boxes (edit1-3), Btn1 buttons (.primary, .btn), the error in
   it, in the middle of the screen; the language over it at the right. The screen stays while it is open, after world-ready too. */
body.world-ready #loading.ls-login{opacity:1;visibility:visible;pointer-events:auto}
/* Held on the way to the town (loading-screen.js holdLoading, the manager 7. 11. 2026: who goes to his town at once stays on the
   loading screen until he is there): after world-ready too, with the welcome, the name window, the guide and the toasts over it,
   but not over the login window, which comes first. */
body.world-ready #loading.ls-hold{opacity:1;visibility:visible;pointer-events:auto}
/* The first welcome and class pick use the loading art as their backdrop (25. 11. 2026, .work/novacek-2026-11-25/NAVRH.md). */
body:has(#loading.ls-early:not(.ls-login,.ls-hold)) #menu{z-index:51}
body:has(#loading:is(.ls-hold,.ls-early):not(.ls-login)) :is(.modal,#optionsModal,#toast){z-index:55}
#loading .login-box{--cpx:calc(var(--l2text,22px) / 11);position:absolute;z-index:2;left:50%;top:52%;transform:translate(-50%,-50%);width:calc(var(--cpx)*256);margin:0;font:26px/1.2 var(--l2font);color:#e6dccb;text-shadow:0 1px 1px #000;filter:drop-shadow(0 calc(var(--cpx)*4) calc(var(--cpx)*10) #000b)}
:where(html[data-font="l2"]) #loading .login-box{line-height:calc(var(--l2k) * 1.3em)}
#loading .login-lang{display:flex;justify-content:flex-end;gap:calc(var(--cpx)*2);margin:calc(var(--cpx)*-4) calc(var(--cpx)*-4) calc(var(--cpx)*-2) 0}
#loading .login-lang button{margin:0;padding:calc(var(--cpx)*1) calc(var(--cpx)*5);border:0;border-radius:0;background:none;box-shadow:none;font:inherit;font-size:.85em;color:#cfc4ac;cursor:pointer}
#loading .login-lang button.active{color:#e9c46a}
#loading .login-lang button:hover:not(.active){color:#fff}
#loading .login-wnd{min-height:calc(var(--cpx)*108);box-sizing:border-box;padding:calc(var(--cpx)*9) calc(var(--cpx)*10);display:flex;flex-direction:column;justify-content:center;gap:calc(var(--cpx)*6);border:calc(var(--cpx)*8) solid transparent;border-image:url(./assets/ui/login/logon-back.png) 8 fill / calc(var(--cpx)*8) stretch}
#loading .login-row{display:grid;grid-template-columns:calc(var(--cpx)*84) minmax(0,1fr);align-items:center}
#loading .login-row[hidden]{display:none}
#loading .login-row span{color:#cfc4ac;white-space:nowrap}
#loading .login-row input{min-width:0;height:calc(var(--cpx)*19);box-sizing:border-box;padding:0 calc(var(--cpx)*2);font:inherit;line-height:1;color:#fff;background:none;border-style:solid;border-color:transparent;border-width:calc(var(--cpx)*2) calc(var(--cpx)*4);border-image:url(./assets/ui/login/edit.png) 2 4 fill / calc(var(--cpx)*2) calc(var(--cpx)*4) stretch;border-radius:0;outline:0;-webkit-text-stroke:0}
#loading .login-row input:focus{filter:brightness(1.3)}
#loading .login-error{margin:0;color:#ff7d6b;text-align:center}
#loading .login-error.login-hint{color:#e9c46a}
#loading .login-error:empty{display:none}
#loading .login-actions{display:flex;justify-content:center;gap:calc(var(--cpx)*8);margin-top:calc(var(--cpx)*2)}
#loading .login-wnd button:not(.login-lang button){height:calc(var(--cpx)*22);min-width:0;margin:0;padding:0;font:inherit;white-space:nowrap}
#loading .login-actions button{flex:1 1 0;padding:0 calc(var(--cpx)*5)}
#loading .login-skip{align-self:stretch;padding:0 calc(var(--cpx)*5)}
#loading .login-busy{opacity:.85}

/* Every menu hint on a phone (28 Nov 2026, check round: the hint lay over the sticky Start for old players too) takes the
   same place as in the newcomer quick start below; in a run and in Giran (body.in-game) it stays where it was.
   Newcomer quick start on a phone (25 Nov 2026, .work/novacek-2026-11-25/kolo-ui): while Giran loads, the menu stands over the loading screen
   (#loading.ls-early, above), and on a phone two things of it came through the menu or lay over its controls:
   1) the loading screen's own foot (tip, bar, "NAČÍTÁNÍ…") is wider than the Start button, so its words peeked out beside Start (landscape) and
      under the sticky footer (portrait). Start itself shows "Načítám N %", so the foot is hidden here (visibility only);
   2) the menu's first hint (#toast, 10 s, z 55 above) stands at bottom:10.5rem, which on a phone is inside the Start button (portrait: the
      footer is 254 px tall, the title lay under the hint) or over the Collection bar and "Bonusy výbavy" (landscape). It goes where no control
      is at any scroll position: in the column menu (max-width 860) into the empty band under the fixed top bar (9.6rem tall, its two rows
      end at about 6.75rem, the padding is tightened to fit two lines); in the landscape menu (absolute panels) into the strip under the
      footer, right of the notes at its bottom left. The toast takes no taps (pointer-events:none, style.css), only its place changes. */
@media (pointer:coarse) and (max-width:860px),(pointer:coarse) and (max-height:520px){
 #loading.ls-early:not(.ls-login,.ls-hold) .ls-foot{visibility:hidden}
}
@media (pointer:coarse) and (max-width:860px){
 body:is(:has(#loading.ls-early:not(.ls-login,.ls-hold)),:not(.in-game):not(:has(#loading:is(.ls-login,.ls-hold))):has(#menu:not([hidden]))) #toast{top:6.9rem;bottom:auto;padding-block:.1rem}
}
@media (pointer:coarse) and (min-width:861px) and (max-height:520px){
 body:is(:has(#loading.ls-early:not(.ls-login,.ls-hold)),:not(.in-game):not(:has(#loading:is(.ls-login,.ls-hold))):has(#menu:not([hidden]))) #toast{left:auto;right:.9rem;top:auto;bottom:.25rem;transform:translateY(-10px);max-width:52vw}
 body:is(:has(#loading.ls-early:not(.ls-login,.ls-hold)),:not(.in-game):not(:has(#loading:is(.ls-login,.ls-hold))):has(#menu:not([hidden]))) #toast.visible{transform:none}
}
