/* The NPC dialog as the client draws an NPC's HTML (UI port step 6, l2-npc.js; nwindow.dll NCNPCHtmlViewer, read 14. 11. 2026):
   Npc1_back under the kit's bar, the text #DCDCDC in the window's font, the choices one per line as links #6699FF (a link without
   its own colour), the headers font color="LEVEL" #FFCC00, an <edit> .l2-edit and a <button> .l2-hbtn (l2-wnd.css), separators
   L2UI.SquareGray as the datapack's <img src="L2UI.SquareGray" height=1>. What the game puts into the window keeps its classes;
   the older look of the window (l2-ui.css, interface.css, monument.css, world.css, clan-npc.css, touch.css under #npcModal) is
   overruled here by the doubled id, without !important, so none of those files changes. */
:is(#npcModal#npcModal, .l2-htmlwnd){padding:0;margin:0;background:none;backdrop-filter:none;pointer-events:auto;box-shadow:none;border:0;border-radius:0}
/* the HTML stands at 6..303 of the window's 310 (npc1_back_alpha01..21), as far from its left edge as from its right: the same 2 px
   at both sides, and without the scroll bar (the text fits) the bar's 15 px are the text's (emoji 17. 11. 2026: the rows stood
   9 px from the left and 26 from the right) */
#npcModal#npcModal .npc-view{padding:0 calc(2 * var(--wpx)) calc(6 * var(--wpx)) calc(2 * var(--wpx));color:#dcdcdc;user-select:none}
:is(.l2-htmlwnd, #npcModal#npcModal) .npc-view{padding:0 calc(2 * var(--wpx)) calc(6 * var(--wpx)) calc(2 * var(--wpx));color:#dcdcdc;user-select:none}
#npcModal#npcModal .npc-html:has(>.l2-scroll-bar[hidden])>.l2-scroll-view{right:0}
:is(.l2-htmlwnd, #npcModal#npcModal) .npc-html:has(>.l2-scroll-bar[hidden])>.l2-scroll-view{right:0}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-view *{font:inherit;letter-spacing:normal;text-shadow:none;border-radius:0;box-shadow:none}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-view p{margin:0}
/* "Gatekeeper Clarissa:", then his text, then an empty line before the choices, as the datapack writes it */
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-line{color:#dcdcdc}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-text{margin:0 0 var(--wline);white-space:pre-line}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-text:empty{display:none}
/* the tabs over the list (the Gatekeeper's Maps and Towns, the Herald's and the Monument's boards): the client's TABBUTTON, rows of
   them where they do not fit in one */
:is(#npcModal#npcModal, .l2-htmlwnd) #npcTabs{display:flex;flex-wrap:wrap;gap:var(--wpx);margin:0 0 calc(6 * var(--wpx));padding:0;border:0;background:none}
:is(#npcModal#npcModal, .l2-htmlwnd) #npcTabs[hidden]{display:none}
:is(#npcModal#npcModal, .l2-htmlwnd) #npcTabs>.l2-tab{flex:0 0 auto;padding:0;filter:none}
/* The Herald's board with the Siege tab: its four tabs of 74 do not fit the 278 of the HTML beside the scroll bar and broke into two
   rows, so they share one row, each as wide as its word asks and a little narrower than 74 (the client sets a tab's width per window
   in interface.xdat: 45, 74, 94); height 23 and gap 1 as everywhere (2. 12. 2026) */
:is(#npcModal#npcModal, .l2-htmlwnd) #npcTabs:has(>[data-tab="siege"]){flex-wrap:nowrap}
:is(#npcModal#npcModal, .l2-htmlwnd) #npcTabs:has(>[data-tab="siege"])>.l2-tab{flex:1 1 auto;min-width:0}
/* the list: as long as its choices (no height of the older centred window), the window's view scrolls it */
:is(#npcModal#npcModal, .l2-htmlwnd) #npcOptions{display:block;min-height:0 !important;max-height:none;overflow:visible;gap:0}
/* a choice: a link on its own line, what it leads to after it in the text's colour */
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-option{display:block;width:100%;min-height:0;height:auto;margin:0;padding:0;border:0;background:none;text-align:left;
 color:#dcdcdc;white-space:normal;cursor:pointer;filter:none;opacity:1}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-option:hover{background:none;border:0;filter:none}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-option>b{font-weight:400;color:#6699ff}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-option>small{color:#dcdcdc}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-option>small::before{content:'\00a0- '}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-option>small:empty{display:none}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-option:disabled{cursor:default}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-option:disabled>b{color:#808080}
/* the HTML buttons (the run's length, the clan's choices and the button after the clan's name) are DefaultButton, not links */
/* (the kit's DefaultButton again in full: a border shorthand of the older look, .npc-option's here among them, resets border-image) */
:is(#npcModal#npcModal, .l2-htmlwnd) .l2-hbtn{display:inline-flex;align-items:center;justify-content:center;width:auto;min-width:calc(67 * var(--wpx));
 height:calc(19 * var(--wpx));padding:0 calc(2 * var(--wpx));border:0;border-style:solid;border-width:0 calc(5 * var(--wpx)) 0 calc(4 * var(--wpx));
 border-image:url(assets/ui/wnd/html-btn.png) 0 5 0 4 fill/0 calc(5 * var(--wpx)) 0 calc(4 * var(--wpx)) stretch;
 background:none;color:#dcdcdc;line-height:1;text-align:center;white-space:nowrap}
:is(#npcModal#npcModal, .l2-htmlwnd) .l2-hbtn:is(:active,[aria-pressed="true"]){border-image-source:url(assets/ui/wnd/html-btn-down.png)}
:is(#npcModal#npcModal, .l2-htmlwnd) .l2-hbtn>b{color:#dcdcdc}
:is(#npcModal#npcModal, .l2-htmlwnd) .l2-hbtn small{margin-left:calc(4 * var(--wpx))}
:is(#npcModal#npcModal, .l2-htmlwnd) .l2-hbtn small::before{content:none}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-submit{margin:calc(4 * var(--wpx)) 0 calc(8 * var(--wpx))}
/* the Gatekeeper's maps: the map as a link, under it its grade, set, pieces, chance and final raid boss, its pieces' icons and who
   looks for a party there, each map from the next under SquareGray */
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-map{display:flex;flex-wrap:wrap;justify-content:flex-start;align-items:baseline;column-gap:0;padding:calc(3 * var(--wpx)) 0;
 background:url(assets/ui/xdat/tex/squaregray.png) 0 100%/100% var(--wpx) no-repeat}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-map>:is(.npc-map-info,.npc-map-drops,.npc-map-party){flex-basis:100%;justify-content:flex-start;text-align:left}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-map-info{display:flex;flex-wrap:wrap;align-items:center;column-gap:calc(4 * var(--wpx));row-gap:0;color:#dcdcdc}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-map-info>:is(em,small){max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-map-info em{font-style:normal;color:#ffcc00}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-map-info .grade-pill{display:inline-block;min-width:0;height:auto;padding:0 calc(2 * var(--wpx));border-radius:0;line-height:inherit}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-map-drops{display:flex;flex-wrap:wrap;gap:calc(2 * var(--wpx));padding:calc(2 * var(--wpx)) 0}
:is(#npcModal#npcModal, .l2-htmlwnd) .zdrop .icon{width:calc(32 * var(--wpx));height:calc(32 * var(--wpx));border-radius:0;box-shadow:none}
:is(#npcModal#npcModal, .l2-htmlwnd) .zdrop>i{right:0;bottom:0;width:calc(12 * var(--wpx));height:calc(12 * var(--wpx));border-radius:0;font-size:calc(11 * var(--wpx));line-height:1}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-map>.npc-map-party{color:#6699ff;text-decoration:none;cursor:pointer}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-map>.npc-map-party.busy{color:#ffcc00}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-map>.npc-map-party:hover{color:#6699ff}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-map>.npc-map-party.busy:hover{color:#ffcc00}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-map>.npc-map-party[hidden]{display:none}
/* the run's length under the maps: Normal and Short as two buttons, its line under them */
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-mode{display:flex;gap:calc(4 * var(--wpx));margin:calc(6 * var(--wpx)) 0 calc(2 * var(--wpx));padding:0;background:none;border:0}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-mode>.l2-hbtn{flex:0 0 auto}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-mode>.l2-hbtn small{color:#a3a3a3}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-mode-note{margin:0 0 var(--wline);color:#a3a3a3}
/* the clan at the Grand Master (clan-npc.js): its header in LEVEL, the name field, the button after it, the members' and the
   report's choices as buttons */
:is(#npcModal#npcModal, .l2-htmlwnd) .clan-npc{display:block}
:is(#npcModal#npcModal, .l2-htmlwnd) .clan-npc-head{display:block;margin:0 0 calc(4 * var(--wpx));text-align:left;color:#ffcc00;font-weight:400}
:is(#npcModal#npcModal, .l2-htmlwnd) .clan-npc-note{margin:0 0 calc(4 * var(--wpx));color:#a3a3a3}
:is(#npcModal#npcModal, .l2-htmlwnd) .clan-npc-line{margin:0 0 calc(4 * var(--wpx));color:#b09b79}
/* a refusal and a success are the client's system messages: Clan name is incorrect. (systemmsg-e.dat 261) and Your clan has been
   created. (189) are both #B09B79 there, the colour of nearly all its system messages (1931 of 1998), so no colour of their own */
:is(#npcModal#npcModal, .l2-htmlwnd) .clan-npc-line.bad,:is(#npcModal#npcModal, .l2-htmlwnd) .clan-npc-line.ok{color:#b09b79}
:is(#npcModal#npcModal, .l2-htmlwnd) .clan-npc-input.l2-edit{display:block;width:calc(120 * var(--wpx));height:calc(17 * var(--wpx));margin:calc(2 * var(--wpx)) 0 0;
 padding:0 calc(4 * var(--wpx));border:0;border-image:url(assets/ui/wnd/edit.png) 0 8 0 8 fill/0 calc(8 * var(--wpx)) 0 calc(8 * var(--wpx)) stretch;
 background:none;color:#dcdcdc;line-height:calc(17 * var(--wpx));outline:0}
:is(#npcModal#npcModal, .l2-htmlwnd) .clan-npc-input.l2-edit:disabled{border-image-source:url(assets/ui/wnd/edit-disable.png);color:#808080}
:is(#npcModal#npcModal, .l2-htmlwnd) .clan-npc-members{display:block}
:is(#npcModal#npcModal, .l2-htmlwnd) .clan-npc-toggles{display:flex;flex-wrap:wrap;gap:calc(2 * var(--wpx));margin:0 0 calc(6 * var(--wpx))}
:is(#npcModal#npcModal, .l2-htmlwnd) .clan-npc-toggles>.l2-hbtn{flex:0 0 auto;overflow:hidden;text-overflow:ellipsis}
:is(#npcModal#npcModal, .l2-htmlwnd) .clan-npc-toggle.on{color:#dcdcdc;border-color:transparent}
/* the Monument's and the Herald's boards (monument-ui.js, board-ui.js, signs-ui.js): rows of text, SquareGray between them */
:is(#npcModal#npcModal, .l2-htmlwnd) .board{display:block;margin:0 0 calc(6 * var(--wpx))}
:is(#npcModal#npcModal, .l2-htmlwnd) .board-row{column-gap:calc(4 * var(--wpx));padding:calc(2 * var(--wpx)) 0;margin:0;border:0;color:#dcdcdc;
 background:url(assets/ui/xdat/tex/squaregray.png) 0 100%/100% var(--wpx) no-repeat}
:is(#npcModal#npcModal, .l2-htmlwnd) .board-row.me{margin-top:calc(4 * var(--wpx));background:url(assets/ui/xdat/tex/squaregray.png) 0 100%/100% var(--wpx) no-repeat}
:is(#npcModal#npcModal, .l2-htmlwnd) .board-row.me .board-name{color:#ffcc00}
:is(#npcModal#npcModal, .l2-htmlwnd) .board-row .board-rank{color:#b09b79}
:is(#npcModal#npcModal, .l2-htmlwnd) .board-row .board-cls{color:#a3a3a3}
:is(#npcModal#npcModal, .l2-htmlwnd) .board-row .board-value{color:#dcdcdc}
:is(#npcModal#npcModal, .l2-htmlwnd) .board-note{margin:calc(2 * var(--wpx)) 0;color:#a3a3a3;text-align:left}
:is(#npcModal#npcModal, .l2-htmlwnd) .board-crest{display:inline-block;width:calc(16 * var(--wpx));height:calc(12 * var(--wpx));margin-right:calc(4 * var(--wpx));vertical-align:middle;image-rendering:pixelated}
:is(#npcModal#npcModal, .l2-htmlwnd) .wb-head{margin:calc(4 * var(--wpx)) 0 calc(2 * var(--wpx));color:#ffcc00;text-align:left;font-weight:400}
:is(#npcModal#npcModal, .l2-htmlwnd) .wb-big{margin:calc(4 * var(--wpx)) 0 calc(2 * var(--wpx));color:#dcdcdc;text-align:left}
:is(#npcModal#npcModal, .l2-htmlwnd) :is(.wb-side,.wb-side.lead,.wb-goal){margin:0;padding:calc(2 * var(--wpx)) 0;border:0;
 background:url(assets/ui/xdat/tex/squaregray.png) 0 100%/100% var(--wpx) no-repeat}
:is(#npcModal#npcModal, .l2-htmlwnd) .wb-side.lead .wb-side-name{color:#ffcc00}
:is(#npcModal#npcModal, .l2-htmlwnd) .wb-side-name{color:#dcdcdc}
:is(#npcModal#npcModal, .l2-htmlwnd) .wb-side-count,:is(#npcModal#npcModal, .l2-htmlwnd) .wb-news-at{color:#a3a3a3}
:is(#npcModal#npcModal, .l2-htmlwnd) .wb-goal-text{color:#dcdcdc}
:is(#npcModal#npcModal, .l2-htmlwnd) .wb-goal.done .wb-goal-text{color:#808080}
:is(#npcModal#npcModal, .l2-htmlwnd) .wb-goal .wb-check{width:calc(12 * var(--wpx));height:calc(12 * var(--wpx))}
:is(#npcModal#npcModal, .l2-htmlwnd) .wb-gauge{height:calc(12 * var(--wpx));margin:calc(2 * var(--wpx)) 0}
:is(#npcModal#npcModal, .l2-htmlwnd) .wb-gauge>span{line-height:calc(12 * var(--wpx));color:#fff}
:is(#npcModal#npcModal, .l2-htmlwnd) .wb-calendar{width:100%;margin:calc(4 * var(--wpx)) 0}
#npcModal#npcModal .wb-error{color:#ff6b5a}
.l2-htmlwnd .wb-error{color:#ff6b5a}

/* the Grand Master's subclasses (game.js classPick 'sub', docs/design/subclass-2026-11-15.md): a teacher as his link, the skills he
   teaches as the datapack's HTML shows a skill (its 32 x 32 icon and its name, one a line); a locked teacher as a disabled link, #808080 */
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-sub{padding:calc(2 * var(--wpx)) 0}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-sub.locked>b{color:#808080}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-sub-skills{display:flex;flex-direction:column;gap:var(--wpx);padding:calc(2 * var(--wpx)) 0 0 calc(8 * var(--wpx))}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-sub-skills>span{display:flex;align-items:center;gap:calc(4 * var(--wpx));color:#dcdcdc}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-sub.locked .npc-sub-skills>span{color:#808080}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-sub-skills img{width:calc(32 * var(--wpx));height:calc(32 * var(--wpx));flex:none}
:is(#npcModal#npcModal, .l2-htmlwnd) .npc-sub.locked .npc-sub-skills img{opacity:.5}
