html, body { margin: 0; height: 100%; background: #14160f; overflow: hidden; }
body { font-family: Bahnschrift, 'DIN Alternate', 'Segoe UI', sans-serif; color: #d2ccb0; user-select: none; }
#c { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: none; }
/* winieta: poważniejszy ton obrazu */
#vig { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 52%, rgba(10,12,8,.5) 100%); }
#hud { position: fixed; inset: 0; pointer-events: none; text-transform: uppercase; letter-spacing: .08em; text-shadow: 0 1px 2px rgba(0,0,0,.8); }

#tag { position: absolute; left: 22px; top: 14px; font-size: 10px; font-weight: 700; opacity: .38; letter-spacing: .14em; }
#tag span { font-weight: 400; opacity: .8; }

/* zwarty wskaźnik pociągu (lewy górny róg): nastawa jako trzy kreski, prędkość, paliwo, amunicja działka; wyraźniejszy, gdy gracz jest na pokładzie */
#tgauge { width: 188px; padding: 7px 10px 8px; display: flex; flex-direction: column; gap: 6px; background: rgba(15,17,11,.5); border: 1px solid rgba(110,106,86,.5); opacity: .62; transition: opacity .3s, border-color .3s; }
#tgauge.on { opacity: 1; background: rgba(15,17,11,.72); border-color: #6e6a56; }
.tg-row { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; line-height: 1; }
#tg-thr { display: flex; align-items: flex-end; gap: 3px; height: 16px; }
#tg-thr i { display: block; width: 6px; background: #3f4233; }
#tg-thr i:nth-child(1) { height: 7px; } #tg-thr i:nth-child(2) { height: 11px; } #tg-thr i:nth-child(3) { height: 16px; }
#tg-thr.l1 i:nth-child(-n+1), #tg-thr.l2 i { background: #e6e0c4; }
#tg-name { font-size: 13px; color: #e6e0c4; }
#tg-name:empty { display: none; }
#tg-spd { margin-left: auto; font-size: 11px; opacity: .7; font-weight: 400; }
#tg-fuelrow svg { width: 14px; height: 14px; flex: none; fill: #ffb04a; stroke: #14110a; stroke-width: 1.4; stroke-linejoin: round; }
#tg-bar { position: relative; flex: 1; height: 8px; background: rgba(8,10,6,.8); border: 1px solid #4a4d3a; }
#tg-fill { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#ffb04a, #d9741c); transition: width .25s; }
#tg-fn { min-width: 26px; text-align: right; color: #e6e0c4; }
.tg-row.low #tg-fill { background: linear-gradient(#ee6a4a, #b83527); animation: tgPulse 1s ease-in-out infinite; }
.tg-row.low #tg-fn, .tg-row.dry #tg-fn { color: #ee6a4a; }
.tg-row.dry svg { fill: #6e6a56; }
#tg-turrow img { width: 16px; height: 16px; flex: none; }
#tg-turrow.low #tg-tn { color: #ee6a4a; }
@keyframes tgPulse { 50% { opacity: .45; } }

.kbd { display: inline-block; min-width: 1.5em; padding: 2px 5px; margin: 0 2px 0 8px; border: 1px solid #8f8a72; border-bottom-width: 2px; border-radius: 3px;
  background: rgba(20,22,15,.75); color: #e6e0c4; font-size: 11px; font-weight: 700; text-align: center; box-sizing: border-box; }
.kbd + .kbd { margin-left: 0; }

/* prawy dolny róg: ikona broni, duży magazynek i zapas, pasek przeładowania, żetony złomu i materiałów */
#gun { position: absolute; right: 22px; bottom: 20px; width: 230px; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
#gunrow { display: flex; align-items: center; gap: 12px; }
#gunico { width: 96px; height: 48px; opacity: .85; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
#ammo b { font-size: 44px; line-height: 1; font-weight: 700; color: #ece6c8; }
#ammo.low b { color: #d0492f; }
#ammo span { font-size: 16px; opacity: .65; margin-left: 6px; }
#ammo #magcr { display: none; font-size: 13px; margin-left: 10px; }   /* TRAIN3: „w skrzyniach” — tylko na pokładzie z zbrojownią */
#ammo #magcr.on { display: inline; }
#rload { width: 100%; height: 3px; background: rgba(8,10,6,.6); opacity: 0; transition: opacity .15s; }
#rload.on { opacity: 1; }
#rload i { display: block; height: 100%; width: 0; background: #e6e0c4; }
#gunname { font-size: 11px; opacity: .6; }
#chips { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin-top: 2px; }
#chips span { display: flex; align-items: center; gap: 3px; padding: 1px 6px 1px 3px; background: rgba(10,12,8,.55); border: 1px solid rgba(90,87,70,.6); font-size: 12px; font-weight: 700; letter-spacing: .04em; }
#chips img { width: 16px; height: 16px; }

#hint { position: absolute; left: 50%; bottom: 84px; transform: translateX(-50%); font-size: 13px; display: none; }
#hint.on { display: block; }

#netmsg { position: absolute; left: 50%; top: 40%; transform: translateX(-50%); font-size: 20px; font-weight: 700; color: #e0563c; }
#netmsg:empty { display: none; }

/* Konsola maszynisty (gdy gracz stoi przy pulpicie): prędkość, nastawa, paliwo, co przed składem */
#console { position: fixed; left: 50%; bottom: 98px; transform: translate(-50%, 12px); z-index: 7; display: flex; align-items: stretch; gap: 0; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  background: rgba(15,17,11,.9); border: 1px solid #6e6a56; box-shadow: 0 6px 22px rgba(0,0,0,.6); font-family: Bahnschrift, 'DIN Alternate', 'Segoe UI', sans-serif; color: #d8d2b4; text-shadow: 0 1px 2px rgba(0,0,0,.8); }
#console.on { opacity: 1; transform: translate(-50%, 0); }
#console > div { display: flex; flex-direction: column; justify-content: center; padding: 6px 12px; border-right: 1px solid rgba(110,106,86,.45); }
#console > div:last-child { border-right: 0; }
.cs-speed { align-items: center; min-width: 70px; }
.cs-speed b { font: 800 32px/1 Bahnschrift, sans-serif; color: #ffb347; text-shadow: 0 0 14px rgba(255,170,60,.55); font-variant-numeric: tabular-nums; }
.cs-speed span { font-size: 10px; font-weight: 700; letter-spacing: .2em; color: #a8a48a; }
.cs-thr { flex-direction: row !important; align-items: center; gap: 4px; }
.cs-thr i { font: 800 12px Bahnschrift, sans-serif; font-style: normal; letter-spacing: .12em; padding: 7px 9px; color: #6e6a56; background: rgba(8,10,6,.7); border: 1px solid #3c3f30; transition: all .15s; }
.cs-thr i.on { color: #14110a; border-color: transparent; transform: translateY(-2px); box-shadow: 0 0 14px rgba(255,255,255,.18); }
.cs-thr i.on[data-i="0"] { background: #e0453a; } .cs-thr i.on[data-i="1"] { background: #d39a2a; } .cs-thr i.on[data-i="2"] { background: #6fbf5a; }
.cs-fuel { min-width: 104px; gap: 5px; }
.cs-bar { position: relative; height: 10px; background: rgba(8,10,6,.8); border: 1px solid #4a4d3a; }
.cs-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(#ffb04a, #d9741c); transition: width .3s; }
.cs-fuel span { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #a8a48a; }
.cs-fuel.low .cs-bar i { background: linear-gradient(#ee6a4a, #b83527); animation: tgPulse 1s ease-in-out infinite; }
.cs-fuel.low span { color: #ee6a4a; }
.cs-next { min-width: 150px; max-width: 220px; gap: 3px; }
.cs-next em { font: 800 10px Bahnschrift, sans-serif; font-style: normal; letter-spacing: .2em; color: #8a866f; }
.cs-next b { font-size: 13px; font-weight: 700; color: #e6e0c4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cs-next.blk em { color: #ee6a4a; } .cs-next.dest em { color: #f0c040; }
.cs-keys { flex-direction: row !important; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #a8a48a; white-space: nowrap; }

/* przy otwartym oknie plakietki boczne (tracker zadań, radio, kartka z notatką, powiadomienie o perku) znikają — nie zasłaniają krawędzi okna */
body.modal-open #perk-notify, body.modal-open #qtrack, body.modal-open #radio, body.modal-open #note-toast, body.modal-open #intro-trk, body.modal-open #fogmeter { visibility: hidden; }   /* #intro-trk: wprowadzenie (przegląd końcowy N33: nie zasłania okien) */
/* czat otwarty: dymek krwawienia (ui/threat.js, #bleedHint) nie zasłania podpowiedzi pod polem wiadomości */
body:has(#chat-in.on) #bleedHint { visibility: hidden; }
/* okno towarzysza (ui/companion.js, klasa body.comp-open) leży w prawym górnym rogu, tam gdzie wprowadzenie: wprowadzenie ustępuje */
body.comp-open #intro-trk { visibility: hidden; }

/* przy węższym oknie konsola maszynisty jest szersza niż odstęp między paskiem zdrowia a amunicją — wyżej, nad paskiem zdrowia (1366×768) */
/* konsola jest wąska (ok. 600 px) i mieści się między paskiem zdrowia a amunicją; dopiero przy bardzo wąskim oknie idzie wyżej */
.cs-keys { display: none !important; }
@media (max-width: 1380px) { #console { bottom: 132px; } }
/* znacznik własnego plecaka (#ctag) i podpowiedź klawisza ustępują konsoli miejsca */
body.at-desk #ctag { bottom: 176px; }
@media (max-width: 1380px) { body.at-desk #ctag { bottom: 208px; } }

/* panel pociągu w lewym górnym rogu wyłączony (2026-10-07): nastawę, prędkość i paliwo widać na samej lokomotywie */
#tgauge { display: none !important; }
