/* Ekwipunek: pasek szybkiego dostępu, plecak (TAB), okno kart łupu. Barwa jakości przez --rc. */
#hint { bottom: 150px !important; }

/* pasek */
#toolbar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); display: flex; gap: 4px; padding: 5px; z-index: 6;
  background: rgba(15,17,11,.72); border: 1px solid #5a5746; box-shadow: 0 4px 18px rgba(0,0,0,.5); pointer-events: none; }
.tslot { position: relative; width: 54px; height: 54px; background: rgba(40,44,32,.8); border: 2px solid #3a3d2e; box-shadow: inset 0 0 8px rgba(0,0,0,.55); }
.tslot img { position: absolute; inset: 4px; width: 46px; height: 46px; }
.tslot:not(.empty) { border-color: var(--rc); background: linear-gradient(155deg, color-mix(in srgb, var(--rc) 62%, #1c2016) 0%, color-mix(in srgb, var(--rc) 22%, #181b12) 60%, #14170f 100%); }
.tslot.on { border-color: #e6e0c4; box-shadow: inset 0 0 8px rgba(0,0,0,.4), 0 0 12px rgba(230,224,196,.5); }
.tslot.empty img { display: none; }
.tkey { position: absolute; left: 3px; top: 1px; font: 700 10px Bahnschrift, sans-serif; color: #b4ae92; font-style: normal; opacity: .85; }
.tn { position: absolute; right: 3px; bottom: 1px; font: 700 12px Bahnschrift, sans-serif; color: #efe9d0; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.tn.rl { color: #d2a24a; }
.tr { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--rc, transparent); text-decoration: none; }

/* wspólne pole */
.slot { position: relative; width: 62px; height: 62px; background: rgba(34,38,27,.9); border: 2px solid #3a3d2e; box-shadow: inset 0 0 9px rgba(0,0,0,.6); }
.slot.full { border-color: var(--rc, #5a5746); background: linear-gradient(155deg, color-mix(in srgb, var(--rc, #888) 62%, #1c2016) 0%, color-mix(in srgb, var(--rc, #888) 22%, #181b12) 60%, #14170f 100%); }   /* jakość w tle pola */
.slot img { position: absolute; inset: 5px; width: 50px; height: 50px; pointer-events: none; }
.slot b { position: absolute; right: 3px; bottom: 1px; font: 700 12px Bahnschrift, sans-serif; color: #efe9d0; text-shadow: 0 1px 2px #000; pointer-events: none; }
.slot em { position: absolute; left: 0; right: 0; top: -17px; text-align: center; font: 600 10px Bahnschrift, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8e8a72; font-style: normal; }
.slot.lift { opacity: .4; }
.slot:hover { filter: brightness(1.25); }

/* plecak */
#backpack { position: fixed; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center; padding: 14px 14px 96px; background: rgba(8,10,6,.55); backdrop-filter: blur(2px); }   /* dół zostaje wolny: pasek skrótów (#toolbar) nie zasłania panelu */
#backpack.on { display: flex; }
.bp-panel { display: flex; gap: 26px; padding: 22px 26px; max-height: 100%; overflow: auto; background: rgba(22,25,17,.96); border: 1px solid #5a5746; box-shadow: 0 10px 40px rgba(0,0,0,.6); }
.bp-panel h3 { margin: 0 0 12px; font: 700 13px Bahnschrift, sans-serif; letter-spacing: .2em; text-transform: uppercase; color: #b4ae92; }
.bp-char { width: 236px; }
.bp-char canvas { display: block; background: rgba(0,0,0,.25); border: 1px solid #3a3d2e; margin-bottom: 26px; }
.bp-equip, .bp-wpn { display: flex; gap: 10px; margin-bottom: 26px; }
.bp-grid { display: grid; grid-template-columns: repeat(8, 62px); gap: 5px; }
.bp-hint { margin: 14px 0 0; font: 12px Bahnschrift, sans-serif; color: #8e8a72; letter-spacing: .04em; }
kbd { background: #3a3d2e; border: 1px solid #5a5746; padding: 0 5px; border-radius: 2px; font: 700 11px Bahnschrift, sans-serif; color: #e6e0c4; }
#tip { position: fixed; display: none; z-index: 40; max-width: 230px; padding: 9px 11px; background: rgba(12,14,9,.96); border: 1px solid #6a674f; pointer-events: none; font: 13px Bahnschrift, sans-serif; color: #d2ccb0; box-shadow: 0 4px 16px rgba(0,0,0,.6); }
#tip b { font-size: 15px; } #tip .st { margin-top: 4px; color: #b8c48a; font-size: 12px; } #tip .ds { margin-top: 3px; color: #9a967e; font-size: 12px; }
#ghost { position: fixed; display: none; width: 56px; height: 56px; z-index: 50; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.7)); }

/* okno kart łupu */
#loot { position: fixed; inset: 0; z-index: 15; display: none; align-items: center; justify-content: center; background: radial-gradient(circle at 50% 50%, rgba(8,10,6,.35), rgba(8,10,6,.72)); }
#loot.on { display: flex; }
/* przy otwartym oknie łupu baner zdarzenia gaśnie, żeby nie zasłaniał tytułu okna (np. „Skarbiec”) */
body:has(#loot.on) #event-banner { opacity: 0; }
.lc-box { text-align: center; max-width: 94vw; }
.lc-box h2 { margin: 0; font: 700 26px Bahnschrift, sans-serif; letter-spacing: .28em; text-transform: uppercase; color: #e6e0c4; text-shadow: 0 2px 10px #000; animation: lcHead .35s ease-out both; }
.lc-sub { margin: 4px 0 20px; font: 13px Bahnschrift, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: #8e8a72; }
.lc-row { display: flex; flex-wrap: nowrap; gap: 14px; justify-content: center; min-height: 60px; }   /* najwyżej 4 karty (MAX_CARDS): jeden rząd, bez przewijania */
.lc-card { position: relative; width: 150px; padding: 14px 10px 12px; cursor: pointer; text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--rc) 22%, #1a1d14) 0%, #14170f 70%); border: 1px solid var(--rc);
  box-shadow: 0 0 14px color-mix(in srgb, var(--rc) 45%, transparent), inset 0 0 18px rgba(0,0,0,.5); transition: transform .12s, box-shadow .12s; }
.lc-card:hover { transform: translateY(-6px) scale(1.04); box-shadow: 0 0 26px var(--rc), inset 0 0 18px rgba(0,0,0,.4); }
.lc-card.enter { animation: cardIn .45s cubic-bezier(.2,1.3,.4,1) both; }
.lc-card.hi { animation: cardIn .45s cubic-bezier(.2,1.3,.4,1) both, glow 2s ease-in-out .6s infinite; }
.lc-ico { height: 84px; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle closest-side, color-mix(in srgb, var(--rc) 40%, transparent) 0%, transparent 100%); }   /* KARTA3: poświata mieści się w polu ikony — zanika do zera przy krawędzi */
.lc-ico img { width: 72px; height: 72px; filter: drop-shadow(0 3px 4px rgba(0,0,0,.7)); }
.lc-bar { margin-top: 24px; display: flex; gap: 12px; justify-content: center; }
.lc-bar button { font: 700 13px Bahnschrift, sans-serif; letter-spacing: .14em; text-transform: uppercase; padding: 9px 22px; color: #e6e0c4; background: #2e3324; border: 1px solid #6a674f; cursor: pointer; }
.lc-bar button:hover { background: #454b34; border-color: #e6e0c4; }
@keyframes cardIn { from { opacity: 0; transform: translateY(46px) scale(.7) rotate(-5deg); } to { opacity: 1; transform: none; } }
@keyframes lcHead { from { opacity: 0; letter-spacing: .6em; } to { opacity: 1; } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 14px color-mix(in srgb, var(--rc) 45%, transparent), inset 0 0 18px rgba(0,0,0,.5); } 50% { box-shadow: 0 0 34px var(--rc), inset 0 0 18px rgba(0,0,0,.4); } }

/* modyfikacje broni */
.bp-mods { margin-top: 26px; }
.bp-modrow { display: flex; gap: 18px; margin-top: 22px; }
.bp-modstats { margin-top: 12px; max-width: 390px; font: 12px Bahnschrift, sans-serif; color: #b8c48a; letter-spacing: .03em; }
.bp-modstats b { color: #e6e0c4; }
/* wybrana broń w plecaku (FIX1): jasna ramka poza polem, mocniejsza poświata i znacznik „WYBRANA” na dole pola;
   niewybrane bronie lekko przygaszone. Poświata jakości (--rc, tło i brzeg) nie może już wyglądać jak zaznaczenie. */
.slot.sel { border-color: #f2ecd0; outline: 2px solid #f2ecd0; outline-offset: 2px; box-shadow: inset 0 0 9px rgba(0,0,0,.6), 0 0 14px rgba(242,236,208,.75); }
.slot.sel::after { content: attr(data-tag); position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 0; text-align: center; background: #f2ecd0; color: #14160f; font: 800 9px Bahnschrift, sans-serif; letter-spacing: .1em; text-transform: uppercase; pointer-events: none; }
#backpack .slot[data-k="wpn"]:not(.sel) { opacity: .65; }
#tip .st { line-height: 1.35; }

/* magazyn drużyny i stół warsztatowy */
#storage, #bench, #train { position: fixed; inset: 0; z-index: 18; display: none; align-items: center; justify-content: center; background: rgba(8,10,6,.6); backdrop-filter: blur(2px); }
#storage.on, #bench.on, #train.on { display: flex; }
.st-grid { grid-template-columns: repeat(8, 58px) !important; max-height: 330px; overflow-y: auto; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #5a5746 transparent; }
#storage .slot { width: 58px; height: 58px; } #storage .slot img { width: 46px; height: 46px; }
.bag-grid { grid-template-columns: repeat(6, 58px) !important; }
.ghost { position: fixed; display: none; width: 56px; height: 56px; z-index: 50; pointer-events: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.7)); }

/* przycisk X w rogu okien */
.bp-panel { position: relative; } .lc-box { position: relative; min-width: 560px; }
.win-x { position: absolute; top: 8px; right: 8px; z-index: 5; width: 30px; height: 30px; padding: 0; font: 700 15px Bahnschrift, sans-serif; line-height: 28px; text-align: center; color: #cfc9ac; background: rgba(30,34,24,.9); border: 1px solid #5a5746; cursor: pointer; }
.win-x:hover { color: #fff; background: #7a2b22; border-color: #d0603f; }
.lc-box .win-x { top: -14px; right: 0; }
/* ramka kart nie przewija się sama (przewija się rząd kart): reguła skali okien dawała tu poziomy pasek i ucinała X */
#loot > .lc-box { overflow: visible; }

/* założenie przedmiotu: pole błyska w kolorze jakości i pulsuje 1,15 → 1, przedmiot wskakuje, podgląd żołnierza mruga */
.slot.pop { animation: slotPop .5s ease-out; z-index: 3; }
.slot.pop img { animation: imgIn .42s cubic-bezier(.2,1.5,.4,1); }
canvas.flash { animation: prevFlash .55s ease-out; }
@keyframes slotPop { 0% { transform: scale(1.15); filter: brightness(2); box-shadow: 0 0 22px 8px var(--pc); } 100% { transform: scale(1); filter: none; box-shadow: none; } }
@keyframes imgIn { from { transform: translateY(-20px) scale(1.4); opacity: .15; } to { transform: none; opacity: 1; } }
@keyframes prevFlash { 0% { filter: brightness(2.4) drop-shadow(0 0 14px var(--pc)); } 100% { filter: none; } }

/* pola broni: szerokie, ikona profilowa wypełnia całe pole (pasek 1–3 i panel postaci w plecaku) */
.tslot:nth-child(-n+3) { width: 92px; }
.tslot:nth-child(-n+3) img { inset: 2px 3px; width: 86px; height: 48px; }
.bp-char { width: 330px !important; }   /* szerokość kolumny postaci bez zmian: siatka plecaka stoi w tym samym miejscu (PLECAK2) */
.bp-wpn .slot { width: 98px; height: 62px; } .bp-wpn .slot img { inset: 2px 3px; width: 88px; height: 54px; }

/* przy otwartym plecaku pasek jest nad przyciemnieniem i klikalny (przeciąganie między plecakiem a paskiem) */
body.inv-open #toolbar { z-index: 30; pointer-events: auto; }
body.inv-open .tslot { cursor: pointer; }
body.inv-open .tslot:hover { filter: brightness(1.25); }
.tslot.lift { opacity: .4; }
.tslot.pop { animation: slotPop .5s ease-out; }

/* stół warsztatowy: zakładki UPGRADE / CRAFT / SALVAGE, lista po lewej, szczegóły po prawej */
.bn-box { position: relative; width: min(900px, 96vw); padding: 18px 24px 24px; background: rgba(22,25,17,.97); border: 1px solid #5a5746; box-shadow: 0 10px 40px rgba(0,0,0,.6); animation: bnIn .3s cubic-bezier(.2,1.2,.4,1) both; }
.bn-box .win-x { top: 10px; right: 10px; }
.bn-top { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; padding-right: 40px; }
.bn-top h2 { margin: 0; font: 700 20px Bahnschrift, sans-serif; letter-spacing: .28em; text-transform: uppercase; color: #e6e0c4; }
.bn-tabs { display: flex; gap: 3px; }
.bn-tabs button { font: 700 13px Bahnschrift, sans-serif; letter-spacing: .18em; text-transform: uppercase; padding: 8px 18px; color: #8e8a72; background: rgba(40,44,32,.8); border: 1px solid #3a3d2e; cursor: pointer; }
.bn-tabs button:hover { color: #e6e0c4; }
.bn-tabs button.on { color: #f0ead0; background: #36401f; border-color: #8a9a52; box-shadow: inset 0 -3px 0 #b4c46a; }
.bn-res { margin-left: auto; display: flex; gap: 6px; }
.bn-chip { display: flex; align-items: center; gap: 4px; padding: 2px 8px 2px 4px; background: rgba(10,12,8,.6); border: 1px solid #3a3d2e; font: 700 14px Bahnschrift, sans-serif; color: #e6e0c4; }
.bn-chip img { width: 22px; height: 22px; } .bn-chip.zero { opacity: .38; }
.bn-main { display: grid; grid-template-columns: 296px 1fr; gap: 18px; height: 440px; }
.bn-list { overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding-right: 4px; scrollbar-width: thin; scrollbar-color: #5a5746 transparent; }
.bn-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; cursor: pointer; background: rgba(30,34,24,.8); border: 1px solid #33362a; transition: background .1s; }
.bn-row:hover { background: rgba(52,58,40,.95); }
.bn-row.on { border-color: #e6e0c4; background: rgba(62,70,44,.95); box-shadow: 0 0 10px rgba(230,224,196,.25); }
.bn-row.dim { opacity: .55; }
.bn-row b { display: block; font: 700 14px Bahnschrift, sans-serif; color: #e6e0c4; }
.bn-row small { font: 11px Bahnschrift, sans-serif; color: #8e8a72; letter-spacing: .08em; text-transform: uppercase; }
.bn-tile { position: relative; flex: none; width: 46px; height: 46px; border: 2px solid var(--rc, #5a5746);
  background: linear-gradient(155deg, color-mix(in srgb, var(--rc, #888) 62%, #1c2016) 0%, color-mix(in srgb, var(--rc, #888) 22%, #181b12) 60%, #14170f 100%); }
.bn-tile img { position: absolute; inset: 3px; width: 36px; height: 36px; }
.bn-q { position: absolute; right: 2px; bottom: 0; font: 800 15px Bahnschrift, sans-serif; color: #fff; font-style: normal; text-shadow: 0 1px 3px #000; }
.bn-hero .bn-q { right: 8px; bottom: 4px; font-size: 26px; }
.bn-det { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 16px 20px 18px; border: 1px solid #3a3d2e;
  background: radial-gradient(circle at 50% 22%, rgba(70,76,50,.35), rgba(14,17,11,.55) 72%); }
.bn-det.enter .bn-hero { animation: cardIn .45s cubic-bezier(.2,1.3,.4,1) both; }
.bn-hero { position: relative; width: 214px; height: 136px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--rc); flex: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--rc) 52%, #1c2016) 0%, color-mix(in srgb, var(--rc) 18%, #14170f) 78%); box-shadow: 0 0 22px color-mix(in srgb, var(--rc) 40%, transparent); }
.bn-hero img { max-width: 192px; max-height: 120px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.7)); }
.bn-name { margin-top: 10px; font: 700 20px Bahnschrift, sans-serif; letter-spacing: .05em; color: #e6e0c4; }
.bn-sub { font: 600 11px Bahnschrift, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #8e8a72; }
.bn-pills { display: flex; gap: 2px; margin-top: 8px; }
.bn-pills button { font: 700 11px Bahnschrift, sans-serif; letter-spacing: .16em; text-transform: uppercase; padding: 4px 14px; color: #8e8a72; background: rgba(40,44,32,.8); border: 1px solid #3a3d2e; cursor: pointer; }
.bn-pills button.on { color: #f0ead0; background: #36401f; border-color: #8a9a52; }
.bn-from { margin-top: 8px; display: flex; align-items: center; gap: 12px; font: 700 18px Bahnschrift, sans-serif; color: #d6d0b4; }
.bn-from i { font-style: normal; color: #8e8a72; } .bn-from u { text-decoration: none; color: #8fd36a; }
.bn-fx { margin-top: 2px; font: 12px Bahnschrift, sans-serif; color: #9a967e; }
.bn-cost { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 10px; min-height: 66px; align-content: flex-start; }
.bn-tok { display: flex; flex-direction: column; align-items: center; width: 76px; padding: 5px 4px 4px; background: rgba(10,12,8,.65); border: 1px solid #4a4d3a; }
.bn-tok img { width: 30px; height: 30px; }
.bn-tok b { font: 700 15px Bahnschrift, sans-serif; color: #e6e0c4; line-height: 1.1; }
.bn-tok b s { text-decoration: none; color: #8e8a72; font-size: 12px; }
.bn-tok em { font: 9px Bahnschrift, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #7c7a66; font-style: normal; }
.bn-tok.bad { border-color: #a84432; background: rgba(60,20,14,.7); } .bn-tok.bad b { color: #ff7a5c; }
.bn-tok.gain { border-color: #566a3a; } .bn-tok.gain b { color: #9be07c; } .bn-tok.maybe { border-style: dashed; }
.bn-act { margin-top: auto; width: 100%; padding: 13px; font: 800 16px Bahnschrift, sans-serif; letter-spacing: .24em; text-transform: uppercase; color: #f0ead0; cursor: pointer;
  background: linear-gradient(#4f6128, #36401f); border: 1px solid #9aae5a; box-shadow: 0 0 14px rgba(150,170,80,.25); }
.bn-act:hover:not(:disabled) { background: linear-gradient(#66793a, #475a2a); border-color: #e6e0c4; }
.bn-act:disabled { opacity: .4; cursor: default; box-shadow: none; filter: grayscale(.5); }
.bn-act.salv { background: linear-gradient(#70461f, #4a2e18); border-color: #d08a4a; box-shadow: 0 0 14px rgba(210,130,60,.25); }
.bn-act.salv:hover:not(:disabled) { background: linear-gradient(#8a5826, #5c3a1e); }
.bn-act.shake { animation: bnShake .3s; }
.bn-empty { margin: auto; opacity: .22; } .bn-empty img { width: 96px; height: 96px; filter: grayscale(1); }
.bn-hero.win { animation: bnWin .55s ease-out; } .bn-hero.break { animation: bnBreak .5s ease-out; }
.bn-sp { position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; margin: -3px; background: var(--c); box-shadow: 0 0 7px var(--c); pointer-events: none; animation: bnSp .65s ease-out forwards; }
@keyframes bnIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bnSp { from { transform: translate(0, 0) scale(1.4); opacity: 1; } to { transform: translate(var(--dx), var(--dy)) scale(.2); opacity: 0; } }
@keyframes bnWin { 0% { transform: scale(1.1); filter: brightness(2.2); box-shadow: 0 0 40px 14px var(--pc); } 100% { transform: none; filter: none; } }
@keyframes bnBreak { 0% { transform: scale(1.06) rotate(-1.5deg); filter: brightness(1.8) sepia(.6); } 35% { transform: scale(.94) rotate(1.5deg); } 100% { transform: none; filter: none; } }
@keyframes bnShake { 0%, 100% { transform: none; } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }

/* porównanie przedmiotów: jeden werdykt + najwyżej dwie cechy; pełne liczby pod SHIFT */
.vd { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 2px; padding: 3px 11px; font: 800 13px Bahnschrift, sans-serif; letter-spacing: .16em; text-transform: uppercase; border: 1px solid; }
.vd i { font-style: normal; font-size: 14px; }
.vd.better { color: #9be07c; background: rgba(30,66,26,.85); border-color: #62b85c; box-shadow: 0 0 10px rgba(98,184,92,.35); }
.vd.worse { color: #ff9a5a; background: rgba(82,40,12,.85); border-color: #e0743a; box-shadow: 0 0 10px rgba(224,116,58,.25); }
.vd.similar, .vd.different { color: #b6b6a8; background: rgba(50,52,44,.85); border-color: #6b6b5e; }
.vd-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 4px; }
.vd-tags span { font: 600 10px Bahnschrift, sans-serif; letter-spacing: .08em; text-transform: uppercase; padding: 1px 6px; color: #c9d3b0; background: rgba(60,70,44,.7); border: 1px solid #55603f; }
.vd-tags span.neg { color: #e8a888; background: rgba(70,40,30,.7); border-color: #6d4636; }
#tip .vd, #tip .vd-tags { margin-left: 0; justify-content: flex-start; }

/* porównanie obok siebie (TIP2): pod SHIFT w dymku dwie karty tej samej wysokości — lewa przedmiot pod kursorem, prawa założone / trzymane */

/* pasek 9 pól: zaznaczenie chodzi po wszystkich, broń „w kieszeni” ma znacznik, nowe zaznaczenie pulsuje */
.tslot { transition: transform .12s; }
.tslot.on { transform: translateY(-5px); }
.tslot.held::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -6px; height: 2px; background: #e6e0c4; opacity: .55; }
.tslot.sel-pop { animation: selPop .24s ease-out; }
@keyframes selPop { 0% { transform: translateY(-5px) scale(1.14); filter: brightness(1.7); } 100% { transform: translateY(-5px) scale(1); filter: none; } }

/* skrzynie wojskowe i skarbce: nagłówek okna łupu w innym kolorze */
#loot[data-tier="1"] h2 { color: #b8c88a; }
#loot[data-tier="2"] h2 { color: #f0cd5a; text-shadow: 0 0 16px rgba(240,205,90,.5), 0 2px 10px #000; }

/* karta przedmiotu (TIP2): stały szablon — nagłówek, rząd główny (dwie równe ramki), tabela w dwóch kolumnach, efekty ★, plakietki, opis, stopka.
   Dymek pod SHIFT to para takich kart (lewa pod kursorem, prawa trzymane / założone); karta łupu używa tego samego szablonu, mniejszego */
#tip:has(.ic-card) { max-width: none; padding: 0; background: none; border: 0; box-shadow: none; }
.ic-pair { display: flex; gap: 10px; align-items: stretch; }
.ic-card { width: 320px; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 8px; text-align: left;
  background: rgba(12,14,9,.97); border: 1px solid #6a674f; box-shadow: 0 4px 16px rgba(0,0,0,.6); font: 12px Bahnschrift, sans-serif; color: #d2ccb0; }
.ic-tag { font: 800 10px Bahnschrift, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #8e8a72; }
.ic-tag.l { display: none; } body.shift-held .ic-tag.l { display: block; }
.ic-ref { display: none; } body.shift-held .ic-ref { display: flex; }
.ic-head { position: relative; min-height: 40px; }
.ic-name { font: 700 17px/1.15 Bahnschrift, sans-serif; letter-spacing: .02em; padding-right: 92px; min-height: 2.3em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }   /* KARTA3: zawsze dwie linie, nazwy sąsiednich kart leżą na tej samej wysokości */
.ic-tags { display: flex; gap: 4px; align-items: center; min-height: 20px; }   /* rząd plakietek jakości, poziomu i miejsca: stały także gdy pusty */
.ic-chip { font: 800 9px Bahnschrift, sans-serif; letter-spacing: .12em; text-transform: uppercase; line-height: 1; padding: 3px 6px; color: #d6d2bb; background: #1d211a; border: 1px solid #4a5140; white-space: nowrap; }
.ic-chip.q { color: #f2eedb; background: color-mix(in srgb, var(--q) 32%, #0c0e09); border-color: var(--q); }
.ic-vd { position: absolute; top: 0; right: 0; display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; font: 800 10px Bahnschrift, sans-serif; letter-spacing: .12em; text-transform: uppercase; border: 1px solid; white-space: nowrap; }
.ic-vd i { font-style: normal; }
.ic-vd.better { color: #9be07c; background: rgba(30,66,26,.85); border-color: #62b85c; }
.ic-vd.worse { color: #ff9a5a; background: rgba(82,40,12,.85); border-color: #e0743a; }
.ic-vd.similar, .ic-vd.different, .ic-vd.role { color: #b6b6a8; background: rgba(50,52,44,.85); border-color: #6b6b5e; }   /* role: pancerz z cechą (WEAPONS4) */
.ic-main { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ic-main.one { grid-template-columns: 1fr; }   /* pancerz: jedna ramka na całą szerokość */
.ic-main.ic-empty { min-height: 54px; }   /* zwykły przedmiot bez liczby sztuk: strefa liczb zachowuje wysokość */
.ic-box { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 54px; padding: 5px 8px; box-sizing: border-box; background: rgba(30,34,24,.85); border: 1px solid #4a4d3a; }
.ic-box small { font: 700 9px Bahnschrift, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #8e8a72; }
.ic-box b { font: 800 22px Bahnschrift, sans-serif; color: #efe9d0; line-height: 1.1; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }   /* długa wartość (np. nazwa miejsca) nie wychodzi z ramki */
.ic-tab { display: grid; grid-template-columns: 1fr 1fr; column-gap: 14px; }
.ic-r { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; height: 22px; font-size: 11px; border-bottom: 1px solid #2e3324; color: #9a967e; }
.ic-r span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ic-r b { color: #e2e8d4; font-weight: 700; white-space: nowrap; }
.ic-fxs { display: flex; flex-direction: column; gap: 4px; }
.ic-fx { display: grid; grid-template-columns: 14px 1fr; line-height: 1.3; color: #d8d2b6; }
.ic-fx i { font-style: normal; color: #ee8a2c; text-shadow: 0 0 5px rgba(238,138,44,.6); }
.ic-chips { display: flex; flex-wrap: wrap; gap: 4px; min-height: 20px; }   /* cechy: stały rząd, także pusty */
.ic-chips span { font: 700 9px Bahnschrift, sans-serif; letter-spacing: .1em; text-transform: uppercase; padding: 2px 6px; color: #aeb49c; background: #1b1f17; border: 1px solid #3c4232; }   /* KARTA3: cechy spokojne, bez koloru */
.ic-chips span.neg { color: #e8a888; background: rgba(70,40,30,.7); border-color: #6d4636; }
.ic-ds { color: #8e8a72; line-height: 1.35; margin-top: auto; }   /* opis przy dolnej krawędzi karty */
.ic-foot { margin-top: auto; padding-top: 6px; border-top: 1px solid #3e4838; text-align: right; font: 700 11px sans-serif; color: #7a8468; }
body.shift-held .ic-foot { display: none; }
.ic-d { display: none; font-style: normal; font-size: 11px; font-weight: 700; margin-left: 3px; }
body.shift-held .ic-d { display: inline; }
.ic-none { margin-top: 14px; text-align: center; font: 13px Bahnschrift, sans-serif; color: #8e8a72; }
/* karta łupu: ten sam szablon, mniejszy; ilość w rogu ikony */
.lc-body { display: flex; flex-direction: column; gap: 6px; text-align: left; }
.lc-card { display: flex; flex-direction: column; }
.lc-body { flex: 1; }
.lc-body .ic-head { min-height: 0; padding-top: 16px; }
.lc-body .ic-name { font-size: 14px; padding-right: 0; }
.lc-body .ic-vd { font-size: 8px; padding: 1px 4px; }
.lc-body .ic-main { gap: 5px; }
.lc-body .ic-box { min-height: 44px; }
.lc-body .ic-box small { font-size: 8px; }
.lc-body .ic-box b { font-size: 16px; }
.lc-body .ic-fx { font-size: 10px; }
.lc-body .ic-chips span { font-size: 9px; }
.lc-body .ic-tags { flex-wrap: wrap; row-gap: 4px; min-height: 40px; align-content: flex-start; }   /* KARTA3: wąska karta łupu — plakietki w dwóch liniach, strefa zawsze tej samej wysokości */
.lc-body .ic-chip { font-size: 8px; padding: 2px 4px; }
.lc-body .ic-ds { font-size: 11px; }

/* PLECAK2: podgląd postaci z panelem pancerza obok (stała kolumna na wysokość podglądu) i dymki kart: perk, profesja, zestaw, pancerz */
.bp-top { display: flex; gap: 0; align-items: flex-start; }   /* canvas 220 + panel 110 = 330 */
.bp-top canvas { margin-bottom: 0; flex: none; }
.bp-apanel { width: 110px; height: 250px; box-sizing: border-box; padding: 6px 6px; display: flex; flex-direction: column; gap: 4px; background: rgba(10,12,8,.55); border: 1px solid #3a3d2e; overflow: hidden; }
.ap-big { display: flex; flex-direction: column; align-items: center; }
.ap-big small { font: 800 9px Bahnschrift, sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #8e8a72; }
.ap-big b { font: 800 30px Bahnschrift, sans-serif; color: #efe9d0; line-height: 1; }
.ap-cut { text-align: center; font: 800 13px Bahnschrift, sans-serif; letter-spacing: .04em; cursor: help; }
.ap-parts { display: flex; flex-direction: column; gap: 4px; border-top: 1px solid #2e3324; padding-top: 6px; }
.ap-part { display: grid; grid-template-columns: 16px 1fr auto; align-items: center; gap: 4px; font: 700 10px Bahnschrift, sans-serif; white-space: nowrap; }
.ap-part img { width: 16px; height: 16px; }
.ap-part b { font-size: 13px; color: #e6e0c4; }
.ap-part.empty b { color: #55604a; }
.ap-stats { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid #2e3324; padding-top: 6px; }
.ap-stat { display: flex; justify-content: space-between; gap: 4px; font: 10px Bahnschrift, sans-serif; color: #a9b08f; white-space: nowrap; }
.ap-stat b { color: #e6e0c4; font-weight: 700; }
.ap-sets { display: flex; flex-direction: column; gap: 3px; border-top: 1px solid #2e3324; padding-top: 5px; }
.ap-setn { display: flex; align-items: center; justify-content: space-between; gap: 4px; font: 700 11px Bahnschrift, sans-serif; color: #e6e0c4; }
.ap-dots i { display: inline-block; width: 5px; height: 5px; margin-left: 2px; border-radius: 50%; border: 1px solid #6d7560; }
.ap-dots i.on { background: #b8c48a; border-color: #b8c48a; }
.ap-bonus { font: 10px/1.25 Bahnschrift, sans-serif; color: #7fd16a; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: break-word; cursor: help; }   /* premia: do dwóch linii w panelu; pełny tekst w dymku (progi 2/3, 3/3) */
.ap-bonus.next { color: #7b7f70; cursor: help; }
.bp-prof { display: inline-block; padding: 2px 7px; margin: 2px 4px 2px 0; font: 700 11px Bahnschrift, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #d8b244; border: 1px solid #8a6f2a; background: rgba(60,48,20,.7); cursor: help; }
#tip:has(.dk-card) { max-width: none; padding: 0; background: none; border: 0; box-shadow: none; }
.dk-card { width: 250px; box-sizing: border-box; padding: 10px 12px 9px; background: rgba(12,14,9,.97); border: 1px solid #6a674f; box-shadow: 0 4px 16px rgba(0,0,0,.6); font: 12px Bahnschrift, sans-serif; color: #d2ccb0; text-align: left; }
.dk-h { font: 700 15px Bahnschrift, sans-serif; color: #e6e0c4; }
.dk-st { margin-top: 2px; font: 800 9px Bahnschrift, sans-serif; letter-spacing: .16em; text-transform: uppercase; color: #8e8a72; }
.dk-sn { margin-top: 4px; font: 700 13px Bahnschrift, sans-serif; color: #b8c48a; }
.dk-d { margin-top: 5px; line-height: 1.35; color: #d8d2b6; }
.dk-next { margin-top: 7px; padding-top: 5px; border-top: 1px dashed #3e4838; line-height: 1.3; color: #8b9080; }

/* panel TRAIN: współdzieli układ i żetony z warsztatem (.bn-*), dokłada kropki poziomu i znacznik jazdy */
.tr-tag span { font: 800 12px Bahnschrift, sans-serif; letter-spacing: .18em; text-transform: uppercase; padding: 4px 10px; color: #ff9a5a; background: rgba(82,40,12,.85); border: 1px solid #e0743a; animation: bnShake .5s 2; }
.tr-dots { display: flex; gap: 4px; margin-top: 4px; } .tr-dots i, .tr-lv i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #2e3226; border: 1px solid #5a5746; }
.tr-dots i.on, .tr-lv i.on { background: #e3c244; border-color: #f6dc7a; box-shadow: 0 0 6px rgba(227,194,68,.6); }
.tr-lv { display: flex; gap: 6px; margin: 4px 0 6px; } .tr-lv i { width: 13px; height: 13px; }
.tr-tile { background: linear-gradient(155deg, #3a4234 0%, #1d2119 70%); border-color: #5a5746; } .tr-tile.built { border-color: var(--ac, #8a9a52); box-shadow: 0 0 8px color-mix(in srgb, var(--ac, #8a9a52) 50%, transparent); }
.tr-hero { background: radial-gradient(circle, color-mix(in srgb, var(--rc) 28%, #1c2016) 0%, #14170f 78%); }
.tr-hero img { width: 120px; height: 120px; filter: drop-shadow(0 4px 6px rgba(0,0,0,.7)); }
.tr-now, .tr-next { margin-top: 3px; font: 13px Bahnschrift, sans-serif; color: #9a967e; } .tr-now b { color: #d6d0b4; } .tr-next b { color: #8fd36a; }
.tr-ammo { display: flex; align-items: center; gap: 6px; margin-top: 6px; font: 700 15px Bahnschrift, sans-serif; color: #e6e0c4; } .tr-ammo img { width: 24px; height: 24px; } .tr-ammo s { text-decoration: none; color: #8e8a72; font-size: 12px; }


/* cecha specjalna sprzętu: jedna linijka z ikoną */
.af-line { display: flex; align-items: center; gap: 5px; margin: 3px 0 2px; font: 700 11px Bahnschrift, sans-serif; letter-spacing: .04em; line-height: 1.15; text-align: left; }
.af-line svg { width: 13px; height: 13px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.af-line svg path:first-child { fill: currentColor; fill-opacity: .25; }

/* panel TRAIN: moduły w siatce po grupach (obrona / jazda / dom), bez przewijania */
.tr-grp { margin: 8px 0 5px; font: 800 10px Bahnschrift, sans-serif; letter-spacing: .26em; text-transform: uppercase; color: #8e8a72; }
.tr-grp:first-child { margin-top: 0; }
.tr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.tr-cell { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 5px; cursor: pointer; background: rgba(30,34,24,.8); border: 1px solid #33362a; transition: background .1s; }
.tr-cell:hover { background: rgba(48,54,36,.9); }
.tr-cell.on { background: rgba(70,82,44,.9); border-color: #e6e0c4; }
.tr-cell.dim { opacity: .5; }
.tr-cell b { font: 700 11px Bahnschrift, sans-serif; color: #e6e0c4; letter-spacing: .04em; }
.tr-cell .tr-dots { margin-top: 0; }
.tr-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.bn-list .tr-cell .bn-tile { width: 46px; height: 46px; flex: none; }
.bn-list .tr-cell .bn-tile img { inset: 3px; width: 36px; height: 36px; }

/* niskie okno (1366×768 i mniejsze): karty łupu zbite, żeby osiem kart z przyciskami zmieściło się między paskiem mgły a paskiem przedmiotów */
@media (max-height: 820px) {
  .lc-box { padding: 40px 0 8px; box-sizing: border-box; }       /* bez przewijania: cztery karty mieszczą się w 768 px */
  .lc-box .win-x { top: 0; right: -40px; }                        /* X poza ramką, przy tytule; zawsze widoczny */
  .lc-box h2 { font-size: 20px; }
  .lc-sub { margin-bottom: 10px; }
  .lc-row { gap: 12px; }                                          /* najwyżej cztery karty w jednym rzędzie */
  .lc-card { width: 140px; padding: 8px 8px 8px; }
  .lc-ico { height: 64px; } .lc-ico img { width: 56px; height: 56px; }
  .lc-bar { margin-top: 12px; }
}

/* panel modyfikacji: widoczny po kliknięciu broni albo modyfikacji; gniazdo pasujące do najechanej modyfikacji pulsuje */
.bp-mods { transition: opacity .15s; }
.bp-mods.off { opacity: 0; pointer-events: none; }
.slot.hint { border-color: #f0c040; box-shadow: inset 0 0 9px rgba(0,0,0,.6), 0 0 14px rgba(240,192,64,.85); animation: slotHint .8s ease-in-out infinite; }
@keyframes slotHint { 0%, 100% { border-color: rgba(240,192,64,.35); box-shadow: inset 0 0 9px rgba(0,0,0,.6), 0 0 4px rgba(240,192,64,.25); } 50% { border-color: #ffd86a; box-shadow: inset 0 0 12px rgba(240,192,64,.45), 0 0 20px rgba(240,192,64,1); } }

/* statystyki w opisach przedmiotów: plus zielony, minus pomarańczowy */
.st-pos { color: #7fd16a; font-weight: 700; }
.st-neg { color: #f0913a; font-weight: 700; }

/* dymek broni (FIX2): obrażenia, DPS i tempo pod MOC; karta zaznaczonej broni pod SHIFT (ui/itemicons.js: dmgLineHtml, heldCardHtml) */
.cmp-h { font: 12px Bahnschrift, sans-serif; color: #9ca68e; margin-bottom: 2px; }

/* ---- drzewko ulepszeń pociągu (TRAIN2, ui/trainpanel.js): kłódka na zablokowanym kaflu, „nowe” do obejrzenia, wcięcie gałęzi, wymagania zielono / czerwono ---- */
.tr-cell .tr-tile, .tr-cell .bn-tile { position: relative; }
.tr-lock { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; padding: 2px; color: #e6e0c4; background: #1d2119; border: 1px solid #5a5746; border-radius: 3px; }
.tr-cell.dim .bn-tile img { filter: grayscale(1) brightness(.6); }
.tr-cell.fresh { border-color: #e6c35a; box-shadow: 0 0 0 1px rgba(230,195,90,.35); }
.tr-cell.fresh .bn-tile { box-shadow: 0 0 10px rgba(240,192,64,.55); }
.tr-cell.tr-child { margin-left: 10px; border-left: 2px solid #5d6250; }
.tr-or { width: 100%; text-align: center; font: 700 9px Bahnschrift, sans-serif; letter-spacing: .14em; text-transform: uppercase; color: #8e8a72; }
.bn-tok.ok { border-color: #566a3a; } .bn-tok.ok b { color: #9be07c; }
.bn-row { position: relative; }
.bn-row > div:last-child { min-width: 0; }
.bn-row .am-lbl { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bn-row:hover .sv-tip { display: flex; }
.sv-tip.tr-dym { white-space: normal; width: 300px; text-align: left; }
.bn-fx.tr-has { position: relative; cursor: help; }
.bn-fx.tr-has:hover .sv-tip { display: flex; }
.bn-tok.gain { position: relative; }
.bn-tok.gain:hover .sv-tip { display: flex; }
.bn-tok.cost { position: relative; } .bn-tok.cost b { color: #f0913a; } .bn-tok.cost.bad b { color: #ff7a5c; } .bn-tok.cost:hover .sv-tip { display: flex; }

/* ---- TRAIN2 (poprawka): równa siatka kafli — podpis zawsze na dwie linie, wyśrodkowany; lista szersza; wcięcie gałęzi bez zwężania kafla ---- */
#train .bn-main { grid-template-columns: 334px 1fr; }
#train .tr-grid { gap: 6px; }
#train .tr-cell b { display: flex; align-items: center; justify-content: center; width: 100%; height: 2.3em; font-size: 10px; line-height: 1.15; letter-spacing: .02em; text-align: center; white-space: normal; overflow-wrap: anywhere; }
#train .tr-cell.tr-child { margin-left: 0; border-left: 1px solid #33362a; box-shadow: inset 3px 0 0 #5d6250; }

/* pojemność plecaka (sim/bagcap.js): pola ponad pojemność są szare z kłódką; rzecz w takim polu przeciąża (czerwona ramka) */
.slot.lock { background: repeating-linear-gradient(135deg, rgba(40,42,36,.55) 0 6px, rgba(28,30,25,.55) 6px 12px); border-color: #2c2e25; box-shadow: none; }
.slot.lock:not(.full)::after { content: ''; position: absolute; left: 50%; top: 54%; width: 14px; height: 11px; margin: -5px 0 0 -7px; background: #55574a; border-radius: 2px; }
.slot.lock:not(.full)::before { content: ''; position: absolute; left: 50%; top: 54%; width: 8px; height: 8px; margin: -12px 0 0 -6px; border: 2px solid #55574a; border-bottom: none; border-radius: 6px 6px 0 0; }
.slot.lock.over { border-color: #d8452f; box-shadow: inset 0 0 0 1px #d8452f, inset 0 0 12px rgba(216,69,47,.45); }
.bp-over { display: none; margin-top: 10px; padding: 5px 9px; border: 1px solid #d8452f; background: rgba(70,14,10,.6); color: #ffb4a6; font: 600 12px Bahnschrift, sans-serif; letter-spacing: .04em; }
.bp-over.on { display: block; }

/* dużo łupu (np. własny plecak po śmierci): rząd kart przewija się kółkiem, najwyżej ok. 10 kart naraz; karta na krawędzi blaknie */
#loot .lc-row { max-width: min(94vw, 1640px); margin: 0 auto; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding-top: 16px; padding-bottom: 16px; }
#loot .lc-row::-webkit-scrollbar { display: none; }
#loot .lc-row.many { justify-content: flex-start; }
#loot .lc-row .lc-card { flex: 0 0 auto; }
#loot .lc-row.more-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 170px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 170px), transparent); }
#loot .lc-row.more-l { -webkit-mask-image: linear-gradient(270deg, #000 calc(100% - 170px), transparent); mask-image: linear-gradient(270deg, #000 calc(100% - 170px), transparent); }
#loot .lc-row.more-l.more-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 170px, #000 calc(100% - 170px), transparent); mask-image: linear-gradient(90deg, transparent, #000 170px, #000 calc(100% - 170px), transparent); }
.lc-count { min-height: 0; font: 600 12px Bahnschrift, sans-serif; letter-spacing: .08em; color: #a8a48c; text-shadow: 0 1px 4px #000; }
.lc-count:empty { display: none; }

/* karta przedmiotu: stałe barwy głównych liczb — moc (i pancerz) złota, obrażenia czerwone; różnica ▲▼ zostaje w swoim kolorze */
.ic-box.pw { border-top: 2px solid #e8c35a; } .ic-box.pw > small, .ic-box.pw > b { color: #f0cd5a; }
.ic-box.dm { border-top: 2px solid #e2664e; } .ic-box.dm > small, .ic-box.dm > b { color: #ff8f78; }

/* karta łupu pod kursorem unosi się i świeci: rząd ma zapas miejsca, żeby przewijany pojemnik jej nie przycinał */
#loot .lc-box .lc-row { padding: 30px 28px; margin: -20px auto; }

/* okno plecaka: kolumna postaci uporządkowana — podgląd i panel pancerza mają odstęp od pól sprzętu, etykiety pól nie wchodzą na podgląd */
.bp-top { margin-bottom: 30px; }
.bp-equip { gap: 14px; margin-bottom: 34px; }
.bp-wpn { gap: 12px; margin-bottom: 22px; }

/* TRAINPANEL: drzewko wymagań — trzy kolumny grup, wszystkie moduły bez przewijania; kafel poziomy (ikona, nazwa, kropki); moduł wymagający innego z grupy stoi pod nim */
#train .bn-main { grid-template-columns: 500px 1fr; height: 440px; }
#train .bn-list { overflow: hidden; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 10px; align-content: start; align-items: start; }
#train .tr-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#train .tr-col .tr-grp { margin: 0 0 3px; }
#train .tr-row { position: relative; display: flex; align-items: center; gap: 6px; min-height: 40px; min-width: 0; padding: 3px 6px 3px 4px; box-sizing: border-box; background: rgba(30,34,24,.8); border: 1px solid #3a3f2e; cursor: pointer; }
#train .tr-row:hover { background: rgba(48,54,36,.9); }
#train .tr-row.on { background: rgba(70,82,44,.9); border-color: #e6e0c4; }
#train .tr-row.built { box-shadow: inset 3px 0 0 var(--ac, #8a9a52); }
#train .tr-row.fresh { border-color: #e6c35a; box-shadow: 0 0 0 1px rgba(230,195,90,.35); }
#train .tr-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #8fd36a; box-shadow: 0 0 6px rgba(143,211,106,.7); flex: none; }   /* TRAIN3: kafel gotowy do budowy (brak surowców = bez ramki) */
#train .tr-row .tr-dot { position: absolute; right: 4px; bottom: 4px; }
#train .tr-row .tr-tile { width: 34px; height: 34px; flex: none; border-color: var(--ac, #5a5746); }   /* ramka ikony: barwa grupy (--ac), taka sama w kolumnie */
#train .tr-row .tr-tile img { inset: 2px; width: 28px; height: 28px; }
#train .tr-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
#train .tr-row .tr-txt b { font: 700 11px Bahnschrift, sans-serif; color: #e6e0c4; letter-spacing: .03em; line-height: 1.1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }   /* długa nazwa zawija się na dwa wiersze, nie ucina się */

#train .tr-row .tr-sub { display: flex; align-items: center; gap: 4px; min-width: 0; }
#train .tr-row .tr-dots { display: flex; gap: 3px; margin: 0; flex: none; }
#train .tr-row .tr-dots i { width: 7px; height: 7px; }
#train .tr-row .tr-lock { position: absolute; right: 3px; top: 3px; width: 12px; height: 12px; }
#train .tr-row .tr-stub { width: 14px; height: 14px; flex: none; opacity: .85; }
#train .tr-row.tr-child { margin-left: 12px; }
#train .tr-row .tr-ln { position: absolute; left: -10px; top: 50%; width: 10px; border-top: 1px solid #6b6a52; }
#train .tr-row.locked { opacity: .55; }
#train .tr-row.locked .tr-tile img { filter: grayscale(.8) brightness(.7); }
#train .tr-row.locked .tr-txt { padding-right: 14px; }   /* kłódka nie zasłania nazwy */
#train .tr-legend { grid-column: 1 / -1; display: flex; flex-wrap: nowrap; gap: 10px; margin-top: 8px; padding-top: 6px; border-top: 1px solid #3a3f2e; font: 600 10px Bahnschrift, sans-serif; letter-spacing: .03em; color: #8e8a72; white-space: nowrap; overflow: hidden; }
#train .tr-legend > span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; }
#train .tr-legend .tr-lock { position: static; width: 12px; height: 12px; flex: none; }
#train .tr-lg-miss { font: 700 10px Bahnschrift, sans-serif; color: #ff7a5c; }
.tr-tipbox.sv-tip { display: none; position: fixed; left: 0; top: 0; bottom: auto; transform: none; width: 300px; white-space: normal; text-align: left; font-weight: 400; pointer-events: none; z-index: 7; }
.tr-tipbox.sv-tip.on { display: flex; }
.tr-tipbox.sv-tip i { font-style: normal; font-size: 12px; letter-spacing: .02em; color: #cfc9ac; }
.tr-tipbox.sv-tip i.bad { color: #ee6a4a; } .tr-tipbox.sv-tip i.ok { color: #7fd16a; }
.tr-hero { cursor: help; }
