/* ProjectIdle UI. Everything inside #ui is authored in art pixels and zoomed by --px (integer scale).
   One consistent pixel style: dark panels, 1px bronze inner border, hard shadows, no blur. */
:root {
  --px: 2;
  --bg0: #0d0a08;
  --bg1: #191411;
  --bg2: #221b16;
  --bg3: #2e251e;
  --edge: #050403;
  --bronze: #7d6240;
  --bronze-l: #b08a52;
  --bronze-d: #3a2d20;
  --gold: #f2c45a;
  --gold-d: #b08a3e;
  --text: #efe7d6;
  --dim: #a89a80;
  --red: #e2463a;
  --blue: #3f86e0;
  --green: #78d65a;
  --ink: #0a0706;
  /* Jersey 10: condensed pixel font with clear digits; it only has one weight, so nothing is faux-bolded */
  --font: 'Jersey 10', 'Segoe UI', sans-serif;
  --num: 'Press Start 2P', monospace;
  --slot: 18px;
  /* hairline outline for small text on icons and bars: half an art pixel, so the narrow pixel digits keep their gaps */
  --ol: .5px 0 0 var(--ink), -.5px 0 0 var(--ink), 0 .5px 0 var(--ink), 0 -.5px 0 var(--ink), .5px .5px 0 var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0b0809; color: var(--text); font-family: var(--font);
  font-size-adjust: 0.56; font-synthesis: none; /* Jersey runs ~30% smaller than the sizes the UI is authored in */ }
#stage { position: fixed; inset: 0; }
#gl, #overlay { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: pixelated; }
#overlay { pointer-events: none; }
#ui { position: absolute; left: 0; top: 0; width: 100px; height: 100px; transform: scale(var(--px)); transform-origin: 0 0; pointer-events: none;
  font-size: 8px; line-height: 1.25; font-weight: 500; }
#ui * { image-rendering: pixelated; }
/* game UI: nothing can be selected / highlighted by clicking or dragging, only text fields */
html, body, #ui, #ui * { user-select: none; -webkit-user-select: none; -webkit-user-drag: none; }
#ui input, #ui textarea { user-select: text; -webkit-user-select: text; }
#ui > * { pointer-events: auto; }
.hidden { display: none !important; }
img { image-rendering: pixelated; }
.outline { text-shadow: var(--ol); }

/* ---------- frames ---------- */
.frame, .win, .tooltip {
  background: rgba(22, 17, 14, .96);
  box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--bronze), inset 0 0 0 2px var(--edge), 0 2px 0 1px rgba(0, 0, 0, .45);
}
.frame.glass { background: rgba(14, 11, 9, .72); }

.win { position: absolute; min-width: 80px; padding: 2px; color: var(--text); user-select: none; }
.win-title {
  height: 13px; display: flex; align-items: center; justify-content: center; position: relative; cursor: move;
  background: linear-gradient(#3b2f23, #2a2119); box-shadow: inset 0 1px 0 #5e4a33, 0 1px 0 var(--edge);
  color: var(--gold); font-weight: 600; font-size: 8px; padding: 0 14px; white-space: nowrap; overflow: hidden;
  text-shadow: 1px 1px 0 var(--ink);
}
.win-body { padding: 5px; }
.win-close {
  position: absolute; right: 2px; top: 1px; width: 11px; height: 11px; cursor: pointer;
  background: var(--ic-close) center / 12px 12px no-repeat; opacity: .75;
}
.win-close:hover { opacity: 1; filter: drop-shadow(0 0 0 var(--red)); }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 13px; min-width: 40px; padding: 0 6px;
  background: linear-gradient(#4a3b2b, #32281e); color: var(--text); font: inherit; font-size: 8px; border: 0; cursor: pointer;
  box-shadow: 0 0 0 1px var(--edge), inset 0 1px 0 #806444, inset 0 -1px 0 #1c1611; text-shadow: 1px 1px 0 var(--ink); white-space: nowrap;
  /* the fixed min-width replaces the automatic minimum of flex items: without this a button in a full row gets
     narrower than its label and the text runs over the frame */
  flex-shrink: 0;
}
.btn:hover { background: linear-gradient(#5c4934, #3d3124); color: #fff; }
.btn:active { box-shadow: 0 0 0 1px var(--edge), inset 0 1px 0 #1c1611; transform: translateY(1px); }
.btn.big, .btn.primary {
  height: 16px; min-width: 70px; font-size: 9px; color: #fff6dc;
  background: linear-gradient(#c08c3c, #8c5f24); box-shadow: 0 0 0 1px var(--edge), inset 0 1px 0 #f6d27c, inset 0 -1px 0 #5a3c14;
}
.btn.big:hover, .btn.primary:hover { background: linear-gradient(#d29c48, #9c6a2a); }
.btn.small { min-width: 22px; height: 11px; font-size: 7px; padding: 0 4px; }
.btn.on { color: var(--green); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #3f8f3f; }
.btn[disabled] { filter: grayscale(1) brightness(.6); cursor: default; }
/* buttons side by side are always equally wide and high (user wish), also a primary one next to a normal one */
.eq-btns { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; width: max-content; max-width: 100%; margin: 0 auto; }
.eq-btns > .btn, .eq-btns > .btn.primary { min-width: 0; width: 100%; height: 14px; font-size: 8px; padding: 0 6px; }
.eq-btns > .btn.small { height: 11px; font-size: 7px; padding: 0 4px; }

.slot {
  width: var(--slot); height: var(--slot); position: relative; flex: none;
  background: #0f0c0a; box-shadow: inset 0 0 0 1px #2e261d, inset 1px 1px 0 1px var(--edge);
}
/* tall item icons (32 x 32 * size) fit by height, centred; slots that grow with the item: itemSlot() in dom.js */
.slot img.ic { position: absolute; left: 1px; top: 1px; width: 16px; height: 16px; pointer-events: none; object-fit: contain; }
.slot .cnt { position: absolute; right: 2px; bottom: 1px; font-size: 6px; line-height: 6px; letter-spacing: .5px; color: #fff; pointer-events: none;
  text-shadow: var(--ol); }
.slot .cnt.grade { color: var(--gold); }
.slot.hl { box-shadow: inset 0 0 0 1px var(--gold); }
/* skill cooldown (ui.updateCooldowns): dark box clearing clockwise, seconds left in the middle, flash when ready */
.slot .cd { position: absolute; left: 1px; top: 1px; width: 16px; height: 16px; z-index: 1; pointer-events: none;
  display: flex; align-items: center; justify-content: center; font-size: 8px; line-height: 8px; color: #fff2bf;
  text-shadow: var(--ol); }
.slot .cdfx, .slot .act { position: absolute; left: 1px; top: 1px; width: 16px; height: 16px; z-index: 3; pointer-events: none;
  mix-blend-mode: screen; }
.slot .cnt { z-index: 2; }
.slot:hover { box-shadow: inset 0 0 0 1px var(--bronze-l), inset 1px 1px 0 1px var(--edge); }

.bar { position: relative; height: 7px; background: #110b09; box-shadow: 0 0 0 1px var(--edge), inset 0 1px 0 #000; overflow: hidden; }
.bar > i { position: absolute; left: 0; top: 0; bottom: 0; display: block; transition: width .15s linear; }
.bar.hp > i { background: linear-gradient(#ff8a72 0 1px, #e2463a 1px 4px, #a82c24 4px); }
.bar.sp > i { background: linear-gradient(#8cc2ff 0 1px, #3f86e0 1px 4px, #2a5aa8 4px); }
.bar.exp > i { background: linear-gradient(#ffe8a0 0 1px, #f2c45a 1px, #b8862e); }
/* what potions heal on the own TP / MP bar (ui.js potionSegs): .pq drunk and still healing, .pn the next potion (pale),
   .fit = it heals in full, with a line where the bar would end */
.bar > .pq, .bar > .pn { position: absolute; left: 0; top: 0; bottom: 0; width: 0; display: block; pointer-events: none; transition: left .15s linear, width .15s linear; }
.bar.hp > .pq { background: linear-gradient(#ffb8a6 0 1px, #f07a68 1px 4px, #c8483e 4px); }
.bar.sp > .pq { background: linear-gradient(#c4e0ff 0 1px, #7fb0ee 1px 4px, #4f7fc8 4px); }
.bar.hp > .pn { background: #e8a49440; }
.bar.sp > .pn { background: #9fcddd40; }
.bar.hp > .pn.fit { background: #e8a49470; box-shadow: inset -1px 0 #ffe0d4; }
.bar.sp > .pn.fit { background: #9fcddd70; box-shadow: inset -1px 0 #e0f4fa; }
.bar .bt { position: absolute; inset: 0; font-size: 6px; line-height: 7px; text-align: center; color: #fff; letter-spacing: .5px;
  text-shadow: var(--ol); }

#ui input[type=text], #ui input:not([type]), #ui input[type=password], #ui input[type=number], #ui select {
  font: inherit; font-size: 8px; color: var(--text); background: #0f0c0a; border: 0; outline: none; padding: 1px 3px; height: 12px;
  box-shadow: inset 0 0 0 1px #3a2e22, inset 1px 1px 0 1px var(--edge);
}
#ui input:focus, #ui select:focus { box-shadow: inset 0 0 0 1px var(--gold-d), inset 1px 1px 0 1px var(--edge); }
/* marked text in the bronze of the UI instead of the browser blue (user found it ugly) */
#ui input::selection, #ui textarea::selection { background: #6a4f2c; color: #fff6dc; }
#ui input[type=number] { width: 30px; height: 11px; font-size: 7px; appearance: textfield; -moz-appearance: textfield; }
/* no native up / down arrows in number fields (Nutzer): they ignore the pixel look and cover the digits */
#ui input[type=number]::-webkit-inner-spin-button, #ui input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; appearance: none; margin: 0; }
#ui select { appearance: none; -webkit-appearance: none; height: 11px; font-size: 7px; padding: 0 3px; cursor: pointer; }
/* own dropdown (dom.js makeSelect): native <select> lists ignore the UI zoom */
.sel { position: relative; display: inline-flex; align-items: center; height: 12px; min-width: 40px; padding: 0 12px 0 4px; font-size: 7px;
  color: var(--text); background: #0f0c0a; box-shadow: inset 0 0 0 1px #3a2e22, inset 1px 1px 0 1px var(--edge); cursor: pointer; white-space: nowrap; }
.sel::after { content: ''; position: absolute; right: 4px; top: 5px; border-left: 3px solid transparent; border-right: 3px solid transparent;
  border-top: 3px solid var(--bronze-l); }
.sel:hover, .sel.open { box-shadow: inset 0 0 0 1px var(--gold-d), inset 1px 1px 0 1px var(--edge); }
.sel.off { filter: grayscale(1) brightness(.6); cursor: default; pointer-events: none; }
.sel-label { overflow: hidden; text-overflow: ellipsis; }
/* (makeSelect fixes the open list at the box: over the edge of the window, never cut by its scrolling body) */
.sel-list { position: absolute; left: 0; top: calc(100% + 1px); min-width: 100%; max-height: 112px; overflow-y: auto; overscroll-behavior: contain; z-index: 50; padding: 1px;
  background: rgba(22, 17, 14, .98); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--bronze); cursor: default; }
.sel-opt { height: 11px; line-height: 11px; padding: 0 4px; white-space: nowrap; color: var(--text); cursor: pointer; }
.sel-opt:hover { background: #3b2f23; color: #fff; }
.sel-opt.on { color: var(--gold); }
#ui input[type=checkbox] { appearance: none; -webkit-appearance: none; width: 9px; height: 9px; margin: 0; background: #0f0c0a; cursor: pointer;
  position: relative; box-shadow: inset 0 0 0 1px #4a3b2b; }
#ui input[type=checkbox]:checked::after { content: ''; position: absolute; left: 2px; top: 2px; width: 5px; height: 5px; background: var(--green); }
/* scrollbars (user wish): thin bronze grip (light left pixel, dark right pixel) in a dark rail, no arrow buttons, only
   while the mouse is over the window or panel of the list and without a reserved place. The original client art
   (assets/ui/public/scrollbar_*) was much too heavy. No scrollbar-width / scrollbar-color in #ui: Chrome ignores the
   ::-webkit-scrollbar styles as soon as they are set */
#ui ::-webkit-scrollbar { width: 0; height: 0; }
#ui :is(.win, .frame):hover ::-webkit-scrollbar { width: 2px; height: 2px; }
/* long lists the user wants to see as scrollable at a glance (auto-hunt window, quest log): always shown */
#ui .scroll-on::-webkit-scrollbar { width: 2px; height: 2px; }
/* the bar under the mouse or being dragged (ui/scrollgrip.js): stays, lit, also once the mouse left the window */
#ui .sb-on::-webkit-scrollbar { width: 2px; height: 2px; }
#ui .sb-on::-webkit-scrollbar-thumb { background: linear-gradient(90deg, #f2c45a 0 1px, #b08a52 1px); }
.sb-grip, .sb-cover { position: absolute; left: 0; top: 0; pointer-events: auto; z-index: 99999; }
#ui ::-webkit-scrollbar-track { background: #0c0907; }
#ui ::-webkit-scrollbar-thumb { min-height: 10px; background: linear-gradient(90deg, #c49a5a 0 1px, #7d6240 1px); }
#ui ::-webkit-scrollbar-thumb:hover { background: linear-gradient(90deg, #f2c45a 0 1px, #b08a52 1px); }
#ui ::-webkit-scrollbar-button, #ui ::-webkit-scrollbar-corner { display: none; width: 0; height: 0; background: none; }

.tabs { display: flex; gap: 1px; margin-bottom: 4px; }
.tab { flex: 1; text-align: center; font-size: 7px; height: 12px; line-height: 12px; cursor: pointer; color: var(--dim);
  background: #15100d; box-shadow: inset 0 0 0 1px #33281d; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--gold); background: #2a2018; box-shadow: inset 0 0 0 1px var(--bronze), inset 0 -1px 0 1px var(--gold-d); }
/* "Sortieren" / "Müll" at the end of the page tabs (ui/inventory.js sortButton): square icon buttons, with their 1 px
   frame as high as the tabs - the words took the row in longer languages; the name comes with the hover tip */
.tabs > .btn.sort-btn { flex: none; min-width: 0; width: 12px; height: 10px; margin: 1px 1px 1px 3px; padding: 0; }
/* 8 px = exactly between the light top and the dark bottom edge of the button (9 px lay on the bottom edge) */
#ui .tabs > .btn.sort-btn img { width: 8px; height: 8px; object-fit: contain; pointer-events: none; image-rendering: auto; }
.tabs > .btn.sort-btn:hover img { filter: brightness(1.2); }
/* on the PC those buttons stand in a row of their own under the grid (ui/inventory.js toolRow, user 02.11.2026: in the
   row of the page tabs the tabs got tiny): inventory, special inventory and warehouse, equal buttons over the whole
   width; the page tabs above the grid take the whole width */
#ui .inv-tools { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; margin-top: 3px; }
#ui .inv-tools > .btn { min-width: 0; height: 13px; padding: 0; display: flex; align-items: center; justify-content: center; }
#ui .inv-tools > .btn img { width: 9px; height: 9px; object-fit: contain; pointer-events: none; image-rendering: auto; }
#ui .inv-tools > .btn:hover img { filter: brightness(1.25); }
html:not(.touch) #ui :is(.inv-pages, .sp-pages, .sb-pages) { margin-bottom: 2px; }
html:not(.touch) #ui :is(.inv-pages, .sp-pages, .sb-pages) > .tab { height: 13px; line-height: 13px; font-size: 8px; }
/* a page of the bag / Lager still to buy in the Itemshop (ui/inventory.js syncPageTabs): dim, no page behind it */
#ui :is(.inv-pages, .sb-pages) > .tab.locked, #ui :is(.inv-pages, .sb-pages) > .tab.locked:hover { color: #5d554b; background: linear-gradient(#1a1816, #121110); cursor: default; }
/* every row of these windows exactly as wide as the grid (5 slots; user 02.11.2026: tabs, buttons and the search field
   stood 2 px over the grid on both sides) */
html:not(.touch) #ui :is(#inventory, #special-inv, #supply-inv, #safebox) > .win-body > :is(.eq-tabs, .inv-gs, .sp-cats, .inv-pages, .sp-pages, .sb-pages, .inv-find, .inv-tools, .keyhelp) {
  width: calc(5 * var(--slot)); margin-left: auto; margin-right: auto; }

.gold { color: var(--gold); }
.dim { color: var(--dim); }
.red { color: #ff7a6a; }
.green { color: var(--green); }
.blue { color: #8cbaff; }
.cyan { color: #7ee8ff; }
.row { display: flex; gap: 4px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 3px; }
.music-row { margin-bottom: 2px; }
.music-row .music-step { min-width: 13px; width: 13px; padding: 0; }
.music-vol { flex: 1; text-align: center; font-size: 8px; white-space: nowrap; }
#system .sep { margin: 1px 0 2px; }
/* options window (ui/options.js): open rows, label left, control right */
#options { width: min(344px, calc(100% - 10px)); }
#ui #options > .win-body { display: flex; flex-direction: column; gap: 5px; overflow: hidden; }
#options .opt-tabs { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); margin: 0; flex: none; }
#options .opt-tabs .tab { height: 17px; padding: 1px 3px; font-family: inherit; font-size: 8px; line-height: 1.1; border: 0; }
#options .opt-pages { height: 100px; min-height: 0; overflow: auto; }
#options .opt-page { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr)); gap: 5px; align-items: start; }
#options .opt-row { display: flex; align-items: center; justify-content: space-between; gap: 4px; min-height: 20px; }
#options .opt-k { flex: 1; min-width: 0; font-size: 7px; line-height: 1.1; }
#options .opt-ctl { display: flex; align-items: center; gap: 2px; flex: none; }
#options .opt-step { min-width: 13px; width: 13px; padding: 0; }
#options .opt-val { min-width: 22px; text-align: center; font-size: 8px; white-space: nowrap; }
/* (also the switch "Profil für andere sichtbar" of the character window, ui/character.js profRow) */
:is(#options, #character) .btn.opt-tog { flex: none; min-width: 30px; display: flex; align-items: center; justify-content: center; gap: 3px; }
:is(#options, #character) .opt-tog .opt-dot { width: 4px; height: 4px; flex: none; background: #5a4d3c; box-shadow: inset 0 0 0 1px #2a2018; }
:is(#options, #character) .opt-tog .opt-st { color: var(--dim); text-transform: uppercase; }
:is(#options, #character) .btn.opt-tog.on { color: #d6ffc4; background: linear-gradient(#2e4a22, #1c2f15); box-shadow: inset 0 0 0 1px #79d653, 0 0 5px #79d65399; }
:is(#options, #character) .opt-tog.on .opt-dot { background: #8dff5e; box-shadow: 0 0 4px #8dff5e; }
:is(#options, #character) .opt-tog.on .opt-st { color: #8dff5e; }
#options .opt-audience { flex-direction: column; align-items: stretch; gap: 3px; padding: 3px 0; }
#options .opt-audience .eq-btns { width: 100%; grid-auto-columns: minmax(0, 1fr); }
#options .opt-audience .opt-tog { justify-content: space-between; flex-wrap: wrap; height: auto; min-height: 14px; padding: 2px 4px; }
#options .sel { flex: none; min-width: 60px; }
/* a country flag (ui/flags.js): one cell of the small atlas (6 x 4 art pixels), the picture with its version in --lflag, a
   dark outline half an art pixel thick like the one of the name tags (a shadow: outside the box, never rounded up to a whole
   pixel like a border); centred on the capitals of the chat, the target bar and the profile */
#ui .lflag { display: inline-block; width: 6px; height: 4px; flex: none; background: var(--lflag) no-repeat; image-rendering: pixelated;
  box-shadow: 0 0 0 .5px #0a0706; vertical-align: .5px; margin-left: .5px; }
#chat .lflag { margin-right: 2px; }
#target .tname .lflag { margin-right: 2.5px; }
#ui #profile .pf-land .lflag { margin-right: 2.5px; }
#ui #profile .fp-kv > div.pf-wrap { height: auto; min-height: 12px; padding-top: 1px; padding-bottom: 1px; }
#ui #profile .fp-kv > div.pf-wrap > span:last-child { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.15; }
.center { text-align: center; }
.small { font-size: 6px; }
.keyhelp { font-size: 6px; color: var(--dim); }
.sep { height: 1px; background: #3a2e22; margin: 4px 0; box-shadow: 0 1px 0 #0a0807; }
.section { color: var(--gold); font-size: 8px; margin: 5px 0 2px; }

/* ---------- tooltip ---------- */
.tooltip { position: absolute; max-width: 160px; pointer-events: none; z-index: 100000; font-size: 7px; padding: 4px 5px; }
.tooltip .tt-name { font-size: 8px; font-weight: 600; margin-bottom: 2px; }
.tooltip .tt-sep { height: 1px; background: #3a2e22; margin: 3px 0; }
/* how to handle the item (inventory / special inventory: right click, split, drop) at the very bottom */
.tooltip .tt-key { color: var(--dim); }
.tooltip .tt-head { color: var(--dim); padding-bottom: 2px; margin-bottom: 3px; border-bottom: 1px solid #3a2e22; }
/* colours and stone slots of uitooltip.py: title, special title (bonuses), normal, positive (attack, own bonuses),
   special positive (random bonuses), negative, condition; a stone slot = metin_slot_silver frame, icon, name, bonus */
.tooltip .tt-name { color: #f2e7c1; }
#ui .tooltip .tt-name.tt-special, .tooltip .tt-name.tt-special { color: var(--bon); }
.tooltip .tt-norm { color: #c2c2c2; }
.tooltip .tt-pos { color: #8ab98e; }
.tooltip .tt-spos { color: #b0dfb4; }
.tooltip .tt-neg { color: #e5797a; }
.tooltip .tt-cond { color: #beb47d; }
/* a step of a costume set not reached yet (game/costumesets.js) */
.tooltip .tt-off { color: #7d7d7d; }
.tooltip .tt-extra-hint { font-size: .92em; }
.tooltip .tt-sp { margin-top: 3px; }
.tooltip .tt-metin { display: flex; align-items: center; gap: 4px; margin-top: 3px; min-height: 18px; }
.tooltip .tt-metin .ms { position: relative; flex: none; width: 18px; height: 18px; background: url(../assets/ui/game/windows/metin_slot_silver.png) 0 0 / 18px 18px no-repeat; }
.tooltip .tt-metin .ms img { position: absolute; left: 1px; top: 1px; width: 16px; height: 16px; }
.tooltip .tt-metin .mt { display: flex; flex-direction: column; min-width: 0; line-height: 8px; }

/* ---------- screens (login / select / create) ---------- */
.screen { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .55) 100%); }
.empire-pick { display: flex; gap: 8px; justify-content: center; }
.empire-card { width: 70px; text-align: center; cursor: pointer; padding: 3px; box-shadow: inset 0 0 0 1px #2e251c; background: rgba(0, 0, 0, .3); }
.empire-card img { width: 48px; height: 48px; display: block; margin: 0 auto 2px; }
.empire-card.sel, .empire-card:hover { box-shadow: inset 0 0 0 1px var(--gold); background: rgba(242, 196, 90, .08); }
.empire-card .en { font-size: 8px; font-weight: 600; }
.class-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.class-card { text-align: center; cursor: pointer; padding: 3px 2px; box-shadow: inset 0 0 0 1px #2e251c; background: rgba(0, 0, 0, .3); }
.class-card img { width: 32px; height: 32px; display: block; margin: 0 auto 1px; }
.class-card.sel, .class-card:hover { box-shadow: inset 0 0 0 1px var(--gold); background: rgba(242, 196, 90, .08); }
.desc { font-size: 7px; color: var(--dim); min-height: 30px; margin: 4px 0; white-space: pre-line; }
.char-list { display: flex; gap: 5px; }
.char-slot { width: 72px; height: 88px; cursor: pointer; text-align: center; padding: 5px 3px; box-shadow: inset 0 0 0 1px #2e251c; background: rgba(0, 0, 0, .35); }
.char-slot.sel, .char-slot:hover { box-shadow: inset 0 0 0 1px var(--gold); background: rgba(242, 196, 90, .06); }
.char-slot img { width: 32px; height: 32px; }

/* ---------- HUD: player frame ---------- */
#pframe { position: absolute; left: 4px; top: 4px; width: 132px; height: 38px; display: flex; gap: 4px; padding: 3px; }
#pframe .portrait { width: 32px; height: 32px; flex: none; position: relative; background: #0f0c0a; box-shadow: inset 0 0 0 1px var(--bronze); overflow: hidden; }
#pframe .portrait img { width: 32px; height: 32px; }
#pframe .plv { white-space: nowrap; position: absolute; left: 0; bottom: 0; min-width: 14px; height: 9px; line-height: 9px; padding: 0 2px; font-size: 7px; text-align: center;
  color: #fff; background: #2a1f16; box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--gold-d); }
#pframe .pinfo { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; padding-top: 1px; }
#pframe .pname { font-size: 8px; line-height: 9px; color: #fff; display: flex; justify-content: space-between; align-items: baseline; gap: 3px; }
#pframe .pn { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#pframe .pgs { flex: none; font-size: 7px; cursor: help; }
#pframe .bar.hp { height: 8px; }
#pframe .bar.hp .bt { line-height: 8px; }

/* at most 8 per row (as wide as the player frame), then a new row (user 03.11.2026: one long row ran across the screen);
   the row gap leaves room for the remaining time under each icon. #party (social.css) moves down with every row */
#affects { position: absolute; left: 6px; top: 46px; display: flex; flex-wrap: wrap; gap: 9px 2px; max-width: 126px; }
/* buff icons under the player frame and in the target bar (ui.js affectIcons) */
.aff { width: 14px; height: 14px; flex: none; position: relative; background: #0f0c0a; box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px var(--bronze); }
.aff img { width: 12px; height: 12px; margin: 1px; object-fit: contain; }
.aff span { position: absolute; bottom: -7px; left: -2px; right: -2px; text-align: center; font-size: 6px; }
/* status effects (game/status.js: poison, slow, stun, fire, dispel mark) after the buffs, in a red frame */
.aff.bad { box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #a8392c; }
.aff.bad span { color: #ff9a8a; }
/* a costume set whose bonus counts (ui/affects.js setAffects): gold frame */
.aff.set { box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #d6a93a; }
/* the level a skill buff was cast with, in the corner like the skill bar (ui.js affectIcons) */
.aff .alv { position: absolute; right: 1px; bottom: 1px; font-size: 6px; line-height: 6px; font-weight: normal; letter-spacing: .5px;
  text-shadow: var(--ol); pointer-events: none; }
/* skill grades like the character window: normal white, M gold, G orange, P violet (also the affect tooltip) */
.skg0 { color: #fff; }
.skg1 { color: var(--gold); }
.skg2 { color: #ff8a4a; }
.skg3 { color: #c890ff; }

/* ---------- HUD: target ---------- */
#target { position: absolute; left: 50%; top: 4px; transform: translateX(-50%); width: 150px; padding: 3px 5px 4px; text-align: center; }
#target .tname { font-size: 8px; margin-bottom: 2px; padding: 0 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* X top right: deselects the target (Esc too, UI.clearTarget); the name keeps room on both sides to stay centred */
#target .tclose { position: absolute; right: 3px; top: 2px; width: 12px; height: 12px; background: var(--ic-close) center / 12px 12px no-repeat; opacity: .75; }
#target .tclose:hover { opacity: 1; filter: drop-shadow(0 0 0 var(--red)); }
#target .tname .tlv { color: var(--gold); margin-right: 3px; }
#target .tname .tgs { margin-left: 4px; font-size: 7px; }
/* IDLE tag (server/idle.js, like the plate over the head in overlay.js): nobody plays the character right now */
.tidle { display: inline-block; padding: 0 2px; font-size: 6px; line-height: 7px; color: #6ad8c8; vertical-align: 1px;
  background: rgba(10, 7, 6, .62); box-shadow: inset 0 0 0 1px rgba(125, 98, 64, .55); cursor: help; }
#target .tname .tidle { margin-left: 4px; }
#target .bar { height: 7px; }
/* what to build against a monster (ui.js targetCounters): element icon + resistance, sword + "Stark gegen"; side by side,
   a second row when the language is long */
#target .tcount { display: flex; justify-content: center; flex-wrap: wrap; gap: 1px 6px; margin-top: 3px; font-size: 7px; line-height: 8px; }
#target .tcount:empty { display: none; }
#target .tc { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
#target .tc img { width: 8px; height: 8px; flex: none; }
/* its buffs and status effects under the bar, the seconds hang below the icons */
#target .taff { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px 2px; margin-top: 4px; padding-bottom: 6px; }
#target .taff:empty { display: none; }

/* ---------- HUD: minimap ---------- */
#minimap { position: absolute; right: 4px; top: 4px; width: 82px; padding: 2px; }
#minimap .mhead { height: 11px; line-height: 11px; text-align: center; font-size: 7px; color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 1px; }
#minimap .mm { width: 78px; height: 78px; position: relative; background: #000; box-shadow: inset 0 0 0 1px var(--bronze-d); }
#minimap canvas { width: 78px; height: 78px; display: block; image-rendering: pixelated; cursor: pointer; }
#minimap .mfoot { display: flex; justify-content: space-between; align-items: center; height: 11px; padding: 0 1px; }
#minimap .mpos { font-size: 6px; color: var(--dim); }
#minimap .mbtn { width: 9px; height: 9px; line-height: 9px; text-align: center; font-size: 8px; cursor: pointer; color: var(--text);
  background: #2a2018; box-shadow: inset 0 0 0 1px var(--bronze); }
#minimap .mbtn:hover { color: var(--gold); }
/* the time of day (ui/minimap.js updateDay, engine/daynight.js): a medallion in the upper left corner */
#minimap .dn-badge { position: absolute; left: 1px; top: 1px; width: 13px; height: 13px; z-index: 1; border-radius: 50%; }
#minimap .dn-badge img { width: 13px; height: 13px; display: block; image-rendering: auto; pointer-events: none; }
#minimap .dn-badge:hover { filter: brightness(1.2); }
/* the channel of the map (ui/minimap.js setChannel) and its window (ui/channel.js) */
#minimap .ch-badge { position: absolute; right: 1px; top: 1px; height: 9px; line-height: 9px; padding: 0 2px; z-index: 1; font-size: 7px; color: #ecd7a4; background: #0008; cursor: pointer; }
#minimap .ch-badge:hover { color: var(--gold); }
#channel .ch-intro, #channel .ch-note { line-height: 1.15; }
#channel .ch-list { display: flex; flex-direction: column; gap: 2px; }
#channel .ch-row { display: grid; grid-template-columns: minmax(0, 1fr) 34px 62px; align-items: center; column-gap: 4px; min-height: 16px; padding: 1px 3px; background: #0003; }
#channel .ch-pvp { display: block; color: var(--gold); font-size: 7px; }
#channel .ch-row.on { background: #ad905b2e; }
#channel .ch-name { min-width: 0; overflow-wrap: anywhere; }
#channel .ch-mate { color: #7dff7d; }
#channel .ch-load { text-align: center; }
#channel .ch-load.l0 { color: #7dff7d; }
#channel .ch-load.l1 { color: var(--gold); }
#channel .ch-load.l2 { color: #ff7d6e; }
#channel .ch-here { text-align: center; color: var(--dim); line-height: 1; }
#channel .ch-go { width: 100%; }

/* ---------- HUD: action bar ---------- */
#actionbar { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); padding: 4px 5px 5px; display: flex; flex-direction: column; gap: 4px; }
#actionbar .ab-row { display: flex; gap: 5px; align-items: center; }
/* "E: talk" over the action bar next to an NPC (ui/npcprompt.js; bottom from the action bar, set there) */
#npc-prompt { position: absolute; left: 50%; bottom: 60px; transform: translateX(-50%); display: flex; align-items: center; gap: 5px; height: 18px;
  padding: 0 7px 0 3px; white-space: nowrap; cursor: pointer; pointer-events: auto; background: linear-gradient(#2a2420f2, #14110ef5);
  box-shadow: 0 0 0 1px #080706, inset 0 0 0 1px #6d5a3a, 0 2px 6px #0008; }
#npc-prompt:hover { box-shadow: 0 0 0 1px #080706, inset 0 0 0 1px #c9a564, 0 2px 6px #0008; }
#npc-prompt .np-key { flex: none; width: 12px; height: 12px; display: grid; place-items: center; font-size: 9px; line-height: 12px; color: #fff3cf;
  background: linear-gradient(#5a4a30, #2e251a); box-shadow: inset 0 0 0 1px #c9a564, 0 1px 0 #000; text-shadow: var(--ol); }
#npc-prompt .np-text { display: flex; align-items: baseline; gap: 4px; }
#npc-prompt .np-name { font-size: 8px; color: var(--gold); text-shadow: var(--ol); }
#npc-prompt .np-verb { font-size: 7px; color: var(--text); text-shadow: var(--ol); }
#quick { display: flex; gap: 2px; }
#quick .gap { width: 4px; }
#quick .slot { cursor: pointer; }
#quick .slot .key { position: absolute; left: 2px; top: 1px; font-size: 6px; line-height: 6px; letter-spacing: .5px; color: var(--gold); z-index: 2; pointer-events: none;
  text-shadow: var(--ol); }
/* EXP like the four orbs of the original: four parts in a dark groove, the full ones bright gold, the current one
   filling with a light tip and a slow shine (ui.js refresh) */
#expbar { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; height: 7px; padding: 1px; background: #050302;
  box-shadow: 0 0 0 1px var(--bronze-d), inset 0 1px 0 #000; }
#expbar .xc { position: relative; overflow: hidden; background: linear-gradient(#090604 0 1px, #160f0a 1px); box-shadow: inset 0 0 0 1px #24190f; }
/* no CSS transition: ui.js animates one value for the whole bar, so the four parts fill one after another (Nutzer 04.11.2026) */
#expbar .xc > i { position: absolute; left: 0; top: 0; bottom: 0; display: block;
  background: linear-gradient(#fff0b8 0 1px, #f4c95c 1px 2px, #dca13a 2px 4px, #a86d1f 4px); }
#expbar .xc.full > i { background: linear-gradient(#fff7d6 0 1px, #ffd66e 1px 2px, #ecb245 2px 4px, #bb7d27 4px); box-shadow: inset 0 0 0 1px rgba(255, 236, 170, .25); }
#expbar .xc.cur > i::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 1px; background: #fffbe6; }
#expbar .xc.cur > i::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 250, 225, .5), transparent); animation: exp-shine 2.6s linear infinite; }
@keyframes exp-shine { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
@media (prefers-reduced-motion: reduce) { #expbar .xc.cur > i::before { display: none; } }
/* the rested EXP (Heiße Quelle of the guild island): light blue from the gold on, as far as the pool reaches (ui.js refresh) */
#expbar .xc > b { position: absolute; top: 0; bottom: 0; display: block; width: 0;
  background: linear-gradient(#effbff 0 1px, #a8e2ff 1px 2px, #74c6f2 2px 4px, #4a95c9 4px); opacity: .85; }
#expbar .xc.rest > b { box-shadow: inset 0 0 0 1px rgba(205, 240, 255, .2); }
#exptext { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); margin-bottom: 2px; font-size: 6px; color: #d9c08a; white-space: nowrap; pointer-events: none; }
#auto-btn {
  position: relative;
  min-width: 38px; height: 18px; padding: 0 5px 0 3px; display: flex; align-items: center; justify-content: center; gap: 2px; cursor: pointer;
  font-size: 7px; font-weight: 700; white-space: nowrap; color: var(--dim);
  background: linear-gradient(#2e251c, #1c1611); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #4a3b2b;
}
#auto-btn i { width: 16px; height: 16px; background: var(--ic-sword) center / 16px 16px no-repeat; opacity: .6; }
#auto-btn:hover { color: var(--text); }
#auto-btn.on { color: #b6ffa0; background: linear-gradient(#2c4a22, #1a2e14); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #5fb04a; }
#auto-btn.on i { opacity: 1; }
/* Anti-EXP next to the horse (ui/ui.js, commands.js noExp): the golden orb, crossed out and red while EXP is blocked;
   the EXP bar turns grey then */
#noexp-btn { width: 18px; height: 18px; flex: none; display: flex; align-items: center; justify-content: center; cursor: pointer;
  background: linear-gradient(#2e251c, #1c1611); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #4a3b2b; }
#noexp-btn i { width: 16px; height: 16px; background: url('../assets/ui/anti_exp_off.png') center / 16px 16px no-repeat; opacity: .6; }
#noexp-btn:hover i { opacity: .9; }
#noexp-btn.on { background: linear-gradient(#5a2219, #2c110c); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #c0503a; }
#noexp-btn.on i { opacity: 1; background-image: url('../assets/ui/anti_exp_on.png'); }
/* a target waits (game/antiexp.js): EXP still comes, a gold ring until it switches itself on */
#noexp-btn.cap { box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #d8b46a; }
#noexp-btn.cap i { opacity: .95; }
#expbar.noexp .xc > i { filter: grayscale(.9) brightness(.7); }
#ui #expbar.noexp #exptext { color: #e88a6e; }

/* blinking text (world boss rage, arena) */
@keyframes blink { 50% { opacity: .2; } }

/* Auto-hunt plaque over the action bar (Nutzer 30.10.2026: the flat box with a square dot was "komplett hässlich" and sat
   on the level text): metal with a brass rim like the HUD frames, a medallion with crossed swords and a circling arrow
   (fal, tools/art/gen_auto_hunt_icon.py) glowing softly at its left end, a light running along the top rail while it hunts; zone and EXP/h follow behind an engraved line, an
   empty part hides with its line (ui.js refreshAutoPill). Bottom 58: #exptext reaches 4 px above the action bar. */
#autopill { position: absolute; left: 50%; bottom: 58px; transform: translateX(-50%); height: 15px; max-width: min(320px, max(288px, calc(100% - 552px)));
  padding: 0 8px 0 3px; display: flex; align-items: center; gap: 4px; font-size: 7px; line-height: 8px; white-space: nowrap; color: #d4c7a8;
  background: linear-gradient(#2b261ff0, #110f0cf7), var(--metal); background-size: auto, 192px 192px;
  box-shadow: 0 0 0 1px #060504, inset 0 0 0 1px #8d7951, inset 0 0 0 2px #0c0b09, inset 0 3px 0 #c4ac7114, 0 2px 6px #0009; pointer-events: none; }
#autopill::after { content: ''; position: absolute; left: 2px; top: 1px; width: 30%; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, #ffe9b000, #ffe9b0, #ffe9b000); animation: ap-run 3.2s linear infinite; }
@keyframes ap-run { 0% { transform: translateX(0); opacity: 0; } 15%, 85% { opacity: .8; } 100% { transform: translateX(226%); opacity: 0; } }
#autopill .ap-ic { flex: none; width: 20px; height: 20px; margin: 0 -1px 0 -9px; image-rendering: auto;
  position: relative; background: url('../assets/ui/auto_hunt.png') center / 100% 100% no-repeat; }
#autopill .ap-ic::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(closest-side, #f0c76855, #f0c76800); animation: glow-in 2.4s ease-in-out infinite; }
#autopill .ap-t { flex: none; font-weight: 400; letter-spacing: .6px; color: #f1dcaa; text-shadow: 0 1px 0 #000; }
#autopill .ap-part { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#autopill .ap-part:empty { display: none; }
#autopill .ap-part::before { content: ''; display: inline-block; width: 1px; height: 8px; margin-right: 5px; vertical-align: -1px; background: #7c6745; box-shadow: 1px 0 0 #060504; }
#autopill .ap-eph { flex: none; color: #a3d39b; }
/* the gearscore note goes over the plaque while it shows */
html:not(.touch) #ui:not(.compact) > #autopill:not(.hidden) ~ #gs-toast { bottom: 78px; }

/* ---------- HUD: menu ---------- */
#menubar { position: absolute; right: 4px; bottom: 4px; display: flex; gap: 2px; padding: 3px; }
.mbtn-i { width: 20px; height: 20px; position: relative; cursor: pointer; background: linear-gradient(#3a2e22, #241c15) ; box-shadow: inset 0 0 0 1px #4a3b2b; }
.mbtn-i::before { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; background: var(--icon) center / 16px 16px no-repeat; }
.mbtn-i:hover { background: linear-gradient(#4e3e2d, #2e241b); box-shadow: inset 0 0 0 1px var(--bronze-l); }
.mbtn-i .hk { position: absolute; right: 2px; bottom: 1px; font-size: 6px; line-height: 6px; color: var(--gold);
  text-shadow: var(--ol); }
.mbtn-i.on { box-shadow: inset 0 0 0 1px var(--gold); }
/* The menu grows with the level (ui/unlocks.js, game/unlocks.js). A button that is not open for the character yet: an
   empty dark socket with a small lock at its place (the bar keeps its width, the strip of the wallet above it too); a
   locked tab of the left edge is not there; phones leave both out of their menu grid. */
#ui #menubar .mbtn-i.not-yet, #ui #menubar .mbtn-i.not-yet:hover { cursor: default; background: linear-gradient(#191715, #100f0d); box-shadow: inset 0 0 0 1px #3a342a; }
#ui #menubar .mbtn-i.not-yet::before { left: 5px; top: 5px; width: 10px; height: 10px; background: url('../assets/ui/evolve/lock.png') center / 10px 10px no-repeat; opacity: .32; }
#ui #menubar .mbtn-i.not-yet .hk, #ui #menubar .mbtn-i.not-yet::after { display: none; }
/* (three ids: the cells of the phones' menu grid are set with an :is() that counts as one, css/touchhud.css) */
#edge .edge-tab.not-yet, html.touch #ui #tmenu #menubar .mbtn-i.not-yet, html.touch #ui #tmenu #edge .edge-tab.not-yet { display: none; }
/* it opened just now: the icon jumps into its socket, a golden ring glows round it for a few seconds */
#ui #menubar .mbtn-i.just-open::before { animation: mb-open .7s cubic-bezier(.2, 1.4, .4, 1) 1; }
#ui #menubar .mbtn-i.just-open::after, #edge .edge-tab.just-open::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  box-shadow: inset 0 0 0 1px #ffd24a, 0 0 4px 1px #ffd24acc; animation: ring-pulse 1.2s ease-in-out infinite; }
@keyframes mb-open { 0% { opacity: 0; transform: scale(2.2); } 60% { opacity: 1; } 100% { opacity: 1; transform: scale(1); } }

/* ---------- HUD: chat ---------- */
#chat { position: absolute; left: 4px; bottom: 4px; width: 214px; padding: 2px; display: flex; flex-direction: column; }
/* seven tabs since "Handel" (02.11.2026): a little narrower, and a second row rather than running out of the chat */
#chat .ctabs { display: flex; flex-wrap: wrap; gap: 1px; margin-bottom: 2px; }
#chat .ctab { padding: 0 2px; height: 10px; line-height: 10px; font-size: 6px; color: var(--dim); cursor: pointer; background: rgba(0, 0, 0, .35); }
#chat .ctab.on { color: var(--gold); box-shadow: inset 0 -1px 0 var(--gold-d); }
#chat .log { position: relative; overflow-anchor: none; height: 72px; overflow-y: auto; display: flex; flex-direction: column; font-size: 7px; line-height: 9px; padding: 0 2px;
  text-shadow: 1px 1px 0 var(--ink); }
#chat .log::before { content: ''; margin-top: auto; flex: none; }
#chat .log > div { flex: none; overflow-wrap: break-word; }
/* time of a line (options window), every line carries it, the class .ts shows it */
#chat .log .ch-ts { display: none; color: #a8a090; }
#chat .log.ts .ch-ts { display: inline; }
#chat .log div.sys { color: #ffe08a; }
#chat .log div.item, #chat .log div.yang { color: #a8ff8a; }
#chat .log div.exp { color: #9fd6ff; }
#chat .log div.err { color: #ff8a7a; }
#chat .log div.notice, #chat .log div.worldnote { color: #ff9f4a; }
.team-tag { color: #ff9f4a; }
#chat .log div.ch-map, #chat .log div.ch-all, #chat .log div.ch-emp, #chat .log div.ch-w, #chat .log div.ch-party, #chat .log div.ch-guild { color: var(--text); }
#chat-input { margin-top: 2px; width: 100%; height: 12px !important; font-size: 7px !important; }
#chat.idle { background: rgba(14, 11, 9, .35); box-shadow: none; }
#chat.idle .ctabs, #chat.idle #chat-input { opacity: .35; }
/* back to the newest line when scrolled up (ui/chatframe.js); it lies on the lines above the field, clear of the scrollbar */
#chat .ch-new { position: absolute; right: 7px; bottom: 19px; z-index: 1; height: 12px; line-height: 12px; padding: 0 4px; font-size: 7px; white-space: nowrap;
  color: var(--gold); background: #231b13f2; box-shadow: inset 0 0 0 1px var(--gold-d); }
#chat .ch-new:hover { color: #fff3c9; background: #3a2d1cf2; box-shadow: inset 0 0 0 1px var(--gold); }

/* PC: a box that moves and resizes (ui/chatframe.js, user 07.11.2026). The box has the height, the lines take what the tabs
   and the field leave. A phone keeps its own layout around the thumbs (touchhud.css). The default grows a little with the
   screen and stays clear of the action bar (285 wide, centred) and of the tabs at the left edge (148 high with all five,
   centred). The height is 40 for the frame, the tabs and the field plus whole lines, so the line on top is never cut (the
   wheel moves whole lines too); round(): whole art pixels, half ones blur the text at UI size 1. Compact: above the action
   bar, and on so little height right of those tabs instead of under them; the menu bar (270) stands on the same line further right. */
html:not(.touch) #ui #chat { z-index: 1; height: 148px;
  width: round(down, min(calc(50% - 150px), max(268px, 24%)), 1px);
  height: calc(round(down, max(88px, min(calc(50% - 80px), max(150px, 24%))) - 40px, 9px) + 40px); }
html:not(.touch) #ui.compact #chat { left: 34px; height: 103px; width: round(down, max(150px, min(210px, calc(100% - 312px))), 1px); }
html:not(.touch) #ui #chat .log { flex: 1 1 0; height: auto; min-height: 0; overflow-y: scroll; }
html:not(.touch) #ui #chat .ctabs { flex: none; }
html:not(.touch) #ui #chat .ctab { height: 12px; line-height: 12px; padding: 0 3px; font-size: 7px; }
html:not(.touch) #ui #chat .chat-row { flex: none; }
html:not(.touch) #ui #chat #chat-input { height: 14px !important; }
html:not(.touch) #ui #chat :is(.emo-btn, .ch-min) { height: 14px; width: 16px; }
/* folded (ui/chatframe.js buildFold, user 11.11.2026): only the button "Chat", in the corner the box keeps its place by */
#chat .ch-min { flex: none; min-width: 0; padding: 0; }
#chat.idle .chat-row .ch-min { opacity: .35; }
#chat .ch-open { display: none; }
html:not(.touch) #ui #chat.shut { width: auto !important; height: auto !important; min-width: 0; padding: 0; }
html:not(.touch) #ui #chat.shut::before, html:not(.touch) #chat.shut > :not(.ch-open) { display: none !important; }
html:not(.touch) #chat.shut > .ch-open { display: block; height: 14px; padding: 0 6px; font-size: 7px; white-space: nowrap; }
#ui #chat .ch-open.new { color: var(--gold); }
/* a bar a mouse can hit, and nothing moves when the mouse comes: the rail always holds its place, it only has no colour at rest */
html:not(.touch) #ui #chat .log::-webkit-scrollbar { width: 4px; }
html:not(.touch) #ui #chat.idle .log:not(.sb-on)::-webkit-scrollbar-track, html:not(.touch) #ui #chat.idle .log:not(.sb-on)::-webkit-scrollbar-thumb { background: transparent; }
/* the strip that moves the box: two rows of dots, shown only when the chat is in use */
#chat .ch-grab { flex: none; height: 6px; margin: -1px 0 1px; opacity: .75; touch-action: none;
  background: repeating-linear-gradient(90deg, var(--gold-d) 0 1px, transparent 1px 3px) center 1px / 25px 1px no-repeat,
    repeating-linear-gradient(90deg, var(--gold-d) 0 1px, transparent 1px 3px) center 3px / 25px 1px no-repeat; }
#chat .ch-grab:hover { opacity: 1; background-color: #ffffff0f; }
#chat.idle .ch-grab { opacity: 0; }
/* the edges and corners that resize it, half outside the frame; the corners show a mark when the chat is in use */
#chat .ch-rz { position: absolute; z-index: 2; touch-action: none; }
#chat .ch-rz.n, #chat .ch-rz.s { left: 5px; right: 5px; height: 4px; }
#chat .ch-rz.e, #chat .ch-rz.w { top: 5px; bottom: 5px; width: 4px; }
#chat .ch-rz.n { top: -2px; }
#chat .ch-rz.s { bottom: -2px; }
#chat .ch-rz.e { right: -2px; }
#chat .ch-rz.w { left: -2px; }
#chat .ch-rz:is(.nw, .ne, .sw, .se) { width: 7px; height: 7px; }
#chat .ch-rz:is(.nw, .ne) { top: -2px; }
#chat .ch-rz:is(.sw, .se) { bottom: -2px; }
#chat .ch-rz:is(.nw, .sw) { left: -2px; }
#chat .ch-rz:is(.ne, .se) { right: -2px; }
#chat .ch-rz:is(.nw, .ne, .sw, .se)::after { content: ''; position: absolute; width: 6px; height: 6px; border: 0 solid #ffdf8e; }
#chat .ch-rz:is(.nw, .ne, .sw, .se):hover::after { border-color: #fff8e0; }
#chat .ch-rz:is(.nw, .ne)::after { top: 2px; border-top-width: 1px; }
#chat .ch-rz:is(.sw, .se)::after { bottom: 2px; border-bottom-width: 1px; }
#chat .ch-rz:is(.nw, .sw)::after { left: 2px; border-left-width: 1px; }
#chat .ch-rz:is(.ne, .se)::after { right: 2px; border-right-width: 1px; }
#chat.idle .ch-rz::after { display: none; }

/* ---------- notifications ---------- */
#mapname-banner { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); font-size: 13px; color: var(--gold);
  text-shadow: 2px 2px 0 #000; pointer-events: none; transition: opacity 1s; white-space: nowrap; }
#levelup { position: absolute; left: 50%; top: 16%; transform: translateX(-50%); font-size: 16px; color: #ffe39a;
  text-shadow: 2px 2px 0 #000; pointer-events: none; white-space: nowrap; }

/* ---------- inventory ---------- */
/* equipment: the sockets on a grid of their own (ui/inventory.js EQUIP_LAYOUT), their look in imperial.css */
.equip-panel { position: relative; width: 78px; height: 98px; margin: 2px auto 5px; }
.eq-slot { position: absolute; width: 16px; }
.eq-slot:hover { box-shadow: inset 0 0 0 1px var(--bronze-l); }
.eq-slot img.ic { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 16px; pointer-events: none; }
.eq-slot img.ph { filter: grayscale(1) brightness(1.5); opacity: .32; }
.inv-grid { display: grid; grid-template-columns: repeat(5, var(--slot)); grid-auto-rows: var(--slot); gap: 0; position: relative; margin: 0 auto; width: max-content; }
.inv-item { position: absolute; width: var(--slot); cursor: pointer; }
.inv-item img { width: 16px; display: block; pointer-events: none; margin: 1px; }
.inv-item .cnt { position: absolute; right: 2px; bottom: 1px; font-size: 6px; line-height: 6px; letter-spacing: .5px; text-shadow: var(--ol); }
/* new drop: pulsing gold frame until it is hovered; the page tab and the bag button blink along */
.inv-item.new::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  box-shadow: inset 0 0 0 1px #ffd24a, inset 0 0 3px 1px rgba(255, 190, 60, .6); animation: inv-new 1.2s ease-in-out infinite; }
/* Endless pulses (user 05.11.2026, "open windows kill the FPS"): only opacity and transform may run forever. An endless
   box-shadow, filter or background-position repaints the whole visible UI every frame, and every open window then costs
   frames for all its rows (measured with tools/dev/winperf.mjs; tools/ci/rules.mjs checks it). So the bright state sits on
   its own ::after and only that fades. glow-in: from nothing to full, ring-pulse: from full to nearly nothing. */
@keyframes ring-pulse { 50% { opacity: .08; } }
@keyframes glow-in { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
.tab.new, .tab.aim, .btn.pulse, .dg-record, .gm-regen, .gm-wipe { position: relative; }
.tab.new::after, .mbtn-i.new::after, .btn.pulse::after, .is-tal.can::after, #pets .pet-card.new::after, .dg-record::after, .gm-regen::after, .gm-wipe::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px #ffd24a; animation: ring-pulse 1.2s ease-in-out infinite; }
@keyframes inv-new { 0%, 100% { opacity: 1; } 50% { opacity: .2; } }
/* a scroll / stone at the mouse (inventory.js markAim): what it works on glows green, the rest of the bag fades,
   a page tab (or Ausrüstung on the costume page) hiding such an item blinks green */
.inv-grid.aiming .inv-item:not(.aim) { opacity: .4; }
.inv-item.aim::after, .eq-slot.aim::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  box-shadow: inset 0 0 0 1px #66e35a, inset 0 0 4px 1px rgba(102, 227, 90, .55); background: rgba(102, 227, 90, .12);
  animation: inv-aim 1s ease-in-out infinite; }
.tab.aim::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px #66e35a; animation: inv-aim 1s ease-in-out infinite; }
@keyframes inv-aim { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
/* better than the worn piece: green pixel arrow in the top right corner */
.inv-item .up { position: absolute; right: 1px; top: 1px; width: 7px; height: 8px; pointer-events: none; z-index: 2;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 8' shape-rendering='crispEdges'%3E%3Cpath fill='%23081505' d='M3 0h1v1h1v1h1v1h1v2h-1v3h-5v-3h-1v-2h1v-1h1v-1h1z'/%3E%3Cpath fill='%2366e35a' d='M3 1h1v1h1v1h1v1h-1v3h-3v-3h-1v-1h1v-1h1z'/%3E%3C/svg%3E") center / 7px 8px no-repeat; }
/* better, but only from a higher level on: the same arrow in grey */
.inv-item .up.later { filter: grayscale(1) brightness(1.15); }
/* locked by the player (lock button / Strg + click, ui/inventory.js lockButton): a small padlock in the top left corner */
.inv-item .pin { display: none; position: absolute; left: 0; top: 0; width: 7px; height: 7px; pointer-events: none; z-index: 2;
  background: url(../assets/ui/klassik/lock.webp) center / contain no-repeat; filter: drop-shadow(0 0 1px #000); }
.inv-item.pinned .pin { display: block; }
/* a switched on Elixier der Sonne / des Mondes (game/elixir.js): the ring of an active skill over the icon, its frames
   turned by ui.js updateCooldowns like on the quick bar */
.inv-item > img.act { position: absolute; left: 1px; top: 1px; width: 16px; height: 16px; margin: 0; z-index: 2; pointer-events: none;
  mix-blend-mode: screen; }
/* the lock is on: the button glows, a click on an item locks it (the hovered piece shows a gold frame) */
#ui :is(.tabs, .inv-tools) > .btn.pin-btn.on { box-shadow: inset 0 0 0 1px var(--gold), 0 0 3px 1px rgba(255, 200, 80, .55); }
.inv-grid.pinning .inv-item:hover::after { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 1;
  box-shadow: inset 0 0 0 1px var(--gold); background: rgba(255, 210, 90, .12); }
.tooltip .tt-pin { display: flex; align-items: center; gap: 2px; color: var(--gold); }
.tooltip .tt-pin img { flex: none; width: 7px; height: 7px; }

.stat-row { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 7px; padding: 1px 1px; min-height: 11px;
  border-bottom: 1px solid #2a2119; }
.stat-row .v { color: #fff; white-space: nowrap; }
.plus { width: 10px; height: 10px; cursor: pointer; display: inline-block; vertical-align: middle; margin-left: 3px;
  background: #2a2018 var(--ic-plus) center / 12px 12px no-repeat; box-shadow: inset 0 0 0 1px var(--bronze); }
.plus:hover { box-shadow: inset 0 0 0 1px var(--gold); }

.skill-row { display: flex; align-items: center; gap: 4px; padding: 1px 0; }
.skill-row .slot { cursor: grab; }
.skill-row .sname { flex: 1; font-size: 7px; }
.skill-row .slv { font-size: 7px; color: var(--gold); width: 18px; text-align: right; }

.dialog-text { font-size: 8px; line-height: 1.4; max-width: 200px; min-height: 30px; white-space: pre-wrap; }
.dialog-opts { display: flex; flex-direction: column; gap: 2px; margin-top: 5px; }
.dialog-opts .opt { cursor: pointer; font-size: 8px; color: var(--gold); padding: 1px 3px; background: rgba(0, 0, 0, .25); box-shadow: inset 0 0 0 1px #2e251c; }
.dialog-opts .opt:hover { color: #fff; box-shadow: inset 0 0 0 1px var(--bronze-l); }

.shop-grid { display: grid; grid-template-columns: repeat(5, var(--slot)); grid-auto-rows: var(--slot); gap: 0; position: relative; width: max-content; margin: 0 auto; }
/* the shop's tab Rückkauf (ui/npc.js, game/buyback.js): what was sold or disposed of by hand, like the goods (18 px cells,
   tall pieces over 2-3 rows), scrolls when it holds more than 8 rows; dimmed = the Yang does not pay for it */
#shop .rk-tabs .tab { display: flex; align-items: center; justify-content: center; gap: 2px; }
/* the goods tab as wide as its word, the rest for "Rückkauf" and its number (hu "Visszavásárlás") */
#shop .rk-tabs .tab[data-t=shop] { flex: none; padding: 0 6px; }
#shop .rk-n { color: var(--dim); }
#shop .rk-tabs .tab.on .rk-n { color: var(--gold-d); }
#shop .rk-grid { display: grid; grid-template-columns: repeat(5, var(--slot)); grid-auto-rows: var(--slot); grid-auto-flow: row dense; align-content: start;
  width: max-content; height: calc(var(--slot) * 8); margin: 0 auto; overflow-y: auto; overflow-x: hidden;
  background-color: #0b0907; background-attachment: local; background-size: var(--slot) var(--slot);
  background-image: linear-gradient(90deg, transparent 17px, #0b0907 17px), linear-gradient(transparent 17px, #0b0907 17px), linear-gradient(#14100c, #14100c); }
#shop .rk-cell { position: relative; background: #1a1410; box-shadow: inset 0 0 0 1px #2e261d; }
#shop .rk-cell > img { position: absolute; left: 1px; top: 1px; width: 16px; object-fit: contain; image-rendering: pixelated; pointer-events: none; }
#shop .rk-cell:hover { box-shadow: inset 0 0 0 1px var(--gold); }
#shop .rk-cell.poor > img { opacity: .45; }
#shop .inv-item.debt-lock > img, #shop .rk-cell.debt-lock > img { filter: grayscale(1); opacity: .35; }
#shop .inv-item.debt-lock { box-shadow: inset 0 0 0 1px rgba(210, 65, 55, .5); }
#shop .inv-item.debt-ok { box-shadow: inset 0 0 0 1px rgba(235, 165, 90, .7); }
#shop .keyhelp.red { color: #ff7a6a; }
#shop .rk-cell .cnt { position: absolute; right: 2px; bottom: 1px; z-index: 2; font-size: 6px; line-height: 6px; color: #fff; text-shadow: var(--ol); pointer-events: none; }
#shop .rk-empty { grid-column: 1 / -1; padding: 12px 4px; font-size: 7px; line-height: 8px; text-align: center; }

#drag-ghost { position: absolute; pointer-events: none; z-index: 999; width: 16px; opacity: .85; }
/* the cells a held item would cover (inventory.js putMark): gold = it goes there, red = it cannot */
.put-mark { position: absolute; width: var(--slot); z-index: 3; pointer-events: none;
  box-shadow: inset 0 0 0 1px var(--gold); background: rgba(242, 196, 90, .14); }
.put-mark.no { box-shadow: inset 0 0 0 1px #d0503c; background: rgba(208, 80, 60, .18); }
/* part of a stack hanging at the mouse after Shift + click (inventory.js splitStack) */
.split-ghost { position: absolute; pointer-events: none; z-index: 999; width: 16px; }
.split-ghost img { display: block; width: 16px; opacity: .85; }
/* never under the mouse (some #ui rules give images pointer-events back): the grid below must see the cursor (putMark) */
.split-ghost, .split-ghost * { pointer-events: none !important; }
.split-ghost .cnt { position: absolute; right: 0; bottom: 0; font-size: 6px; line-height: 6px; letter-spacing: .5px; color: #fff; text-shadow: var(--ol); }

/* modal question boxes instead of the browser's confirm / alert (ui/dialog.js) */
.dlg-back { position: absolute; inset: 0; z-index: 9500; background: rgba(0, 0, 0, .25); }
.dlg { width: 168px; }
.dlg .dlg-text { text-align: center; font-size: 8px; line-height: 10px; margin: 1px 2px 5px; overflow-wrap: anywhere; }
.dlg .dlg-row { display: flex; justify-content: center; align-items: center; gap: 3px; margin-bottom: 5px; }
#ui .dlg input.dlg-num { width: 44px; height: 12px; font-size: 8px; text-align: center; }
.dlg .dlg-btns { grid-auto-columns: minmax(56px, 1fr); }
/* pickBox: one wide button per choice (phones: the own buffs to end, ui/affects.js) */
.dlg .dlg-pick { display: flex; flex-direction: column; gap: 3px; margin: 0 4px 6px; }
.dlg .dlg-pick .btn { height: 16px; justify-content: flex-start; gap: 4px; padding: 0 4px; }
.dlg .dlg-pick .btn img { width: 12px; height: 12px; flex: none; }
.dlg .dlg-pick .btn span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dlg .dlg-pick .btn img.dlg-flag { width: 16px; height: 10px; }
/* the window of Anti-EXP (ui/antiexp.js): off / on / up to a target, the target's level and % */
.dlg.nx-box { width: 196px; }
.dlg .nx-form { display: flex; flex-direction: column; gap: 3px; margin: 0 4px 5px; }
.dlg .nx-form .nx-opt { height: 16px; justify-content: flex-start; padding: 0 5px; }
#ui .dlg .nx-form .nx-opt.on { color: #ffe08a; background: linear-gradient(#5a4526, #2c2112); box-shadow: 0 0 0 1px var(--edge), inset 0 0 0 1px #d8b46a; }
.dlg .nx-goal { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 2px; font-size: 8px; }
.dlg .nx-goal.off { opacity: .45; }
#ui .dlg .nx-goal input.dlg-num { width: 24px; }
.dlg .nx-note { min-height: 20px; font-size: 8px; line-height: 10px; text-align: center; overflow-wrap: anywhere; }
.dlg .nx-note.bad { color: #ff7a6a; }
/* phones: the three choices side by side, everything a finger high (44 CSS px), so it fits 360 px without scrolling */
html.touch #ui .dlg.nx-box { width: 300px; }
html.touch #ui .dlg.nx-box .nx-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
html.touch #ui .dlg.nx-box .nx-opt { height: auto; min-height: calc(44px / (var(--px) * var(--wz))); padding: 2px 3px; justify-content: center; text-align: center; white-space: normal; line-height: 9px; }
html.touch #ui .dlg.nx-box :is(.nx-goal, .nx-note) { grid-column: 1 / -1; }
html.touch #ui .dlg.nx-box .nx-note { min-height: 10px; }
html.touch #ui .dlg.nx-box input.dlg-num { width: 30px; height: calc(44px / (var(--px) * var(--wz))); }
html.touch #ui .dlg.nx-box .dlg-btns .btn { height: calc(44px / (var(--px) * var(--wz))); }
#death { position: absolute; }
.atlas canvas { image-rendering: pixelated; display: block; }
.quest-item { font-size: 7px; padding: 2px 0; border-bottom: 1px solid #2a2119; }
.quest-item .qt { color: var(--gold); }

/* ---------- idle / social windows ---------- */
.ctl { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.ctl .unit { width: 11px; color: var(--dim); }
.ctl select, .ctl .sel { width: 44px; }
.report-items { display: flex; flex-wrap: wrap; gap: 1px; margin-top: 2px; }
.player-list { max-height: 150px; overflow-y: auto; }
/* one height on every tab and for every number of players (Nutzer 08.11.2026); phones: the height of the screen */
html:not(.touch) #ui #players .player-list { height: 150px; }
html.touch #ui #players { height: calc((100% - 8px) / var(--wz)); }
html.touch #ui #players > .win-body { flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; }
html.touch #ui #players .player-list { flex: 1 1 auto; min-height: 0; max-height: none; }
.player-list .stat-row { cursor: pointer; }
.player-list .stat-row:hover { background: rgba(242, 196, 90, .07); }
.player-list .pl-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-list .pl-info { flex: 0 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.player-list .pl-gs { flex: none; width: 22px; text-align: right; }

/* ---------- gearscore ---------- */
/* fit against a recommendation (hunting window, map): reached, close (85 %), too low */
.gs-ok { color: var(--green); }
.gs-close { color: #ffaa40; }
.gs-low { color: var(--red); }
/* character window: number in the colour of the grade, the parts as one bar */
.gs-box { margin: 1px 0 4px; padding: 3px 4px 4px; background: #120e0b; box-shadow: inset 0 0 0 1px #2e251c; cursor: help; }
.gs-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 7px; }
.gs-head .gs-val { font-size: 12px; line-height: 11px; }
.gs-bar { display: flex; height: 4px; margin: 3px 0 2px; background: var(--ink); box-shadow: 0 0 0 1px var(--edge); }
.gs-bar i { display: block; min-width: 0; }
.gs-box .st { background: #d8a24a; }
.gs-box .sk { background: #4f9be0; }
.gs-box .eq { background: #6cc85a; }
.gs-legend { display: flex; justify-content: space-between; font-size: 6px; line-height: 7px; color: var(--dim); }
.gs-legend span { white-space: nowrap; }
.gs-legend i { display: inline-block; width: 4px; height: 4px; margin-right: 2px; }
.gs-grade { font-size: 7px; margin-top: 2px; }
/* inventory: gearscore under the equipment */
.inv-gs { display: flex; justify-content: space-between; align-items: center; height: 11px; padding: 0 4px; margin: -1px 0 4px; font-size: 7px;
  background: #120e0b; box-shadow: inset 0 0 0 1px #2e251c; cursor: help; }
.tooltip .tt-gs { color: var(--gold-d); margin: -1px 0 2px; }
.tooltip .tt-kv { display: flex; justify-content: space-between; gap: 8px; }
/* short note above the action bar when the gearscore changes */
#gs-toast { position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); display: flex; align-items: baseline; gap: 3px;
  padding: 2px 6px; font-size: 8px; white-space: nowrap; pointer-events: none; }
#gs-toast .up { color: var(--green); }
#gs-toast .down { color: var(--red); }
#gs-toast.pop { animation: gs-pop 2.6s ease-out forwards; }
@keyframes gs-pop { 0% { opacity: 0; transform: translate(-50%, 3px); } 8% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; } 100% { opacity: 0; } }


/* ---------- small screens ---------- */
#ui.compact #chat { width: 168px; bottom: 50px; }
#ui.compact #chat .log { height: 48px; }
#ui.compact #target { top: 46px; left: 4px; transform: none; width: 132px; }
/* the buffs of the target right of the frame: under it are the own ones (#affects) */
#ui.compact #target .taff { position: absolute; left: calc(100% + 4px); top: 4px; margin: 0; flex-wrap: nowrap; }
#ui.compact #affects { top: 70px; }
/* between the player frame and the world boss timer: without the zone (longer in other languages), never under the timer */
#ui.compact #autopill { bottom: auto; top: 5px; max-width: calc(100% - 364px); }
#ui.compact #autopill .ap-zone { display: none; }
#ui.compact #menubar { bottom: 50px; }

/* ---------- tabs at the left edge (ui/discord.js edgeDock): Discord, in the game the wheel and the bonus ---------- */
/* the left border lies outside the screen: tabs coming out of the edge. Over the HUD and the turn area of the menus
   (.stage), under windows (z-index from 11), menus and dialogs; the gaps between the tabs let clicks through */
#ui > #edge { position: absolute; left: -2px; top: 0; z-index: 6; display: flex; flex-direction: column; gap: 3px; pointer-events: none; }
#edge > * { pointer-events: auto; }
#discord { position: relative; width: 30px; padding: 2px; }
#discord .dc-link { display: flex; align-items: center; justify-content: center; height: 17px; }
#discord .dc-link i { width: 14px; height: 11px; background: var(--ic-discord) 0 0 / 14px 11px no-repeat; }
#discord .dc-link:hover i { filter: brightness(1.3); }
/* a recurring announcement of the team points at the tab (ui/notice.js highlight) */
#discord.new::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px #ffd24a; animation: ring-pulse 1.2s ease-in-out infinite; }
#discord.new .dc-link i { animation: edge-hl-i 1.2s ease-in-out infinite; }
@keyframes edge-hl-i { 50% { opacity: .6; } }

.inv-item img { width: 16px; object-fit: contain; }
