/* Hangar - styl. Motyw: posadzka hangaru, żółto-czarne oznaczenia, siatka maty warsztatowej. */

@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-wdth-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Archivo'; font-style: normal; font-display: swap; font-weight: 100 900; font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-display: swap; font-weight: 100 800;
  src: url(/fonts/jetbrains-mono-latin-ext-wght-normal.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: light;
  --bg: #e7e9ec; --bg-2: #dcdfe3; --panel: #ffffff; --panel-2: #f3f4f6;
  --ink: #0f1216; --ink-2: #48505a; --ink-3: #767f8a;
  --line: #d3d8de; --line-2: #b8bfc8; --grid: rgba(15, 18, 22, .055);
  --sig: #ffcc00; --sig-2: #f2b700; --sig-soft: #fff3bf; --sig-ink: #8a6a00;
  --ok: #157a3a; --ok-soft: #dbf5e4; --bad: #c42b2b; --bad-soft: #fde3e3; --info: #1f4fd1;
  --focus: #1f4fd1; --photo: #f1f2f4;
  --shadow: 0 1px 2px rgba(15, 18, 22, .06), 0 8px 20px -12px rgba(15, 18, 22, .25);
  --font: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --r: 6px; --r-lg: 12px; --top-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0c0e11; --bg-2: #111419; --panel: #161a20; --panel-2: #1d222a;
    --ink: #eef1f4; --ink-2: #a9b2bc; --ink-3: #7b8591;
    --line: #262c35; --line-2: #39414d; --grid: rgba(255, 255, 255, .035);
    --sig-soft: #3a3210; --sig-ink: #ffd84d;
    --ok: #4ade80; --ok-soft: #12301f; --bad: #ff7b7b; --bad-soft: #3b1818; --info: #86a8ff;
    --focus: #86a8ff; --photo: #e9ebee;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 24px -14px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0c0e11; --bg-2: #111419; --panel: #161a20; --panel-2: #1d222a;
  --ink: #eef1f4; --ink-2: #a9b2bc; --ink-3: #7b8591;
  --line: #262c35; --line-2: #39414d; --grid: rgba(255, 255, 255, .035);
  --sig-soft: #3a3210; --sig-ink: #ffd84d;
  --ok: #4ade80; --ok-soft: #12301f; --bad: #ff7b7b; --bad-soft: #3b1818; --info: #86a8ff;
  --focus: #86a8ff; --photo: #e9ebee;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 24px -14px rgba(0, 0, 0, .7);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0; min-height: 100vh; font: 400 16px/1.55 var(--font); color: var(--ink);
  background-color: var(--bg);
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  padding-bottom: calc(70px + env(safe-area-inset-bottom));
}
img, svg { max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 12px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.08; }
h1, h2 { font-stretch: 76%; font-weight: 850; text-transform: uppercase; letter-spacing: 0; }
h1 { font-size: clamp(30px, 6.4vw, 54px); }
h2 { font-size: clamp(22px, 3.4vw, 30px); }
h3 { font-size: 19px; font-stretch: 86%; font-weight: 760; }
code { font: 500 .9em var(--mono); background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.glyph { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; color: var(--ink-3); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 99; padding: 10px 14px; background: var(--sig); color: #111; font-weight: 700; border-radius: var(--r); }
.skip:focus { top: 12px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); }
.eyebrow { font: 600 12px/1.3 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 16px; }
.page { padding-top: 26px; padding-bottom: 64px; }
@media (min-width: 700px) { .wrap { padding: 0 24px; } .page { padding-top: 34px; } }

/* Nagłówek */
.top { position: relative; z-index: 30; background: var(--panel); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; height: var(--top-h); }
.hazard { height: 5px; background: repeating-linear-gradient(-45deg, var(--sig) 0 9px, #121418 9px 18px); }
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; min-width: 0; }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-txt { display: flex; flex-direction: column; min-width: 0; }
.brand-txt b { font-stretch: 68%; font-weight: 900; font-size: 25px; line-height: .95; letter-spacing: .07em; }
.brand-txt small { margin-top: 3px; font: 500 11px/1.25 var(--mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 52vw; }
.nav { display: none; gap: 2px; margin-left: 18px; }
.nav a { position: relative; padding: 9px 13px; font-stretch: 84%; font-weight: 720; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); text-decoration: none; border-radius: var(--r); }
.nav a:hover { color: var(--ink); background: var(--panel-2); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav a[aria-current="page"]::after { content: ''; position: absolute; left: 13px; right: 13px; bottom: -12px; height: 4px; background: var(--sig); }
.top-act { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.top-act #who span { max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.dot { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font: 700 11px/1 var(--mono); }
@media (max-width: 899px) { #who span { display: none; } #who { padding: 0 10px; } }
@media (min-width: 900px) {
  .top { position: sticky; top: 0; }
  .nav { display: flex; }
  .tabbar { display: none !important; }
  body { padding-bottom: 0; }
}

.tabbar { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 9px 2px 10px; font: 650 11.5px/1 var(--font); color: var(--ink-3); text-decoration: none; text-align: center; }
.tabbar a .i { width: 22px; height: 22px; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"]::before { content: ''; position: absolute; top: -1px; left: 22%; right: 22%; height: 3px; background: var(--sig); }
.tabbar .dot { position: absolute; top: 4px; left: calc(50% + 6px); }

/* Przyciski i formularze */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; font: 720 14px/1 var(--font); font-stretch: 88%; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; white-space: nowrap; color: var(--ink); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; transition: background-color .15s, border-color .15s; }
.btn:hover { border-color: var(--ink-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-pri { background: var(--sig); border-color: var(--sig); color: #111; }
.btn-pri:hover { background: #ffd633; border-color: var(--sig-2); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--panel-2); border-color: transparent; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { border-color: var(--bad); }
.btn-danger-fill { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn-xs { min-height: 30px; padding: 0 9px; font-size: 12px; gap: 5px; }
.btn-xs .i { width: 16px; height: 16px; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }
.icon-btn.sm { width: 34px; height: 34px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.field { display: grid; gap: 6px; align-content: start; }
.field > span, .label { font: 650 12px/1.25 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.field > span em { font-style: normal; color: var(--bad); }
input[type=text], input[type=search], input[type=password], input[type=number], input[type=date], input[type=url], input[type=tel], input[type=email], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; font: 400 16px/1.4 var(--font); color: var(--ink);
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; line-height: 1.4; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.hint { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.grid2 { display: grid; gap: 14px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr 1fr; } }
.grid3 { display: grid; gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px; }
.card > h2, .card > h3 { margin-bottom: 14px; }
.form-sec { display: grid; gap: 14px; }
.form-sec > h2 { margin-bottom: 0; font-size: 21px; }
.form-grid { display: grid; gap: 16px; max-width: 900px; }
.save-bar { position: sticky; z-index: 6; bottom: calc(76px + env(safe-area-inset-bottom)); padding: 12px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); }
@media (min-width: 900px) { .save-bar { bottom: 16px; } }

/* Nagłówki stron */
.head { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.head .eyebrow { margin-bottom: 8px; }
.head p.lead { margin: 10px 0 0; max-width: 62ch; color: var(--ink-2); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; font: 500 13px var(--mono); color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.boot { min-height: 60vh; }

/* Tablica stanu */
.board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow); margin-bottom: 18px; }
@media (min-width: 760px) { .board { grid-template-columns: repeat(4, 1fr); } }
.stat { background: var(--panel); padding: 14px 16px 15px; min-width: 0; }
.stat b { display: block; font: 750 clamp(28px, 5.2vw, 42px)/1 var(--mono); letter-spacing: -.03em; }
.stat span { display: block; margin-top: 8px; font: 650 11.5px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.stat.sig { background: var(--sig); color: #111; }
.stat.sig span { color: rgba(0, 0, 0, .62); }
.stat.bad b { color: var(--bad); }
.stat a { color: inherit; }

.mode { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 14px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--sig); border-radius: var(--r-lg); }
.mode p { margin: 0; font-size: 14px; color: var(--ink-2); flex: 1 1 260px; }
.seg { display: inline-flex; padding: 3px; gap: 3px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); }
.seg button { min-height: 36px; padding: 0 14px; border: 0; border-radius: 4px; background: transparent; font: 720 13px/1 var(--font); font-stretch: 88%; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

.tools { position: sticky; top: 0; z-index: 12; display: grid; gap: 10px; padding: 10px 0 12px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; background: var(--bg); border-bottom: 1px solid transparent; }
@media (min-width: 700px) { .tools { margin: 0 -24px; padding-left: 24px; padding-right: 24px; } }
@media (min-width: 900px) { .tools { top: calc(var(--top-h) + 6px); } }
.tools-row { display: flex; gap: 8px; }
.search { position: relative; flex: 1; }
.search .i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { padding-left: 42px; }
.cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cats::-webkit-scrollbar { display: none; }
.cat-btn { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); font: 600 13.5px/1 var(--font); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.cat-btn small { font: 600 11.5px var(--mono); color: var(--ink-3); }
.cat-btn[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cat-btn[aria-pressed="true"] small { color: inherit; opacity: .7; }

/* Sekcje i karty sprzętu */
.sec { margin-top: 26px; }
.sec-h { display: flex; align-items: baseline; gap: 12px; padding-bottom: 9px; margin-bottom: 12px; border-bottom: 2px solid var(--ink); }
.sec-h .no { font: 700 13px var(--mono); color: var(--ink-3); }
.sec-h h2 { font-size: clamp(20px, 3vw, 26px); }
.sec-h .cnt { margin-left: auto; font: 600 12px var(--mono); color: var(--ink-3); white-space: nowrap; }
.list { display: grid; gap: 8px; }
@media (min-width: 1040px) { .list { grid-template-columns: 1fr 1fr; } }
.tag { position: relative; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 12px; align-items: center; min-height: 82px; padding: 10px 12px 10px 10px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); transition: border-color .15s; }
.tag:hover { border-color: var(--line-2); }
.tag-thumb { width: 62px; height: 62px; display: grid; place-items: center; overflow: hidden; border-radius: var(--r); background: var(--panel-2); }
.tag-thumb.has-img { background: var(--photo); }
.tag-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 5px; mix-blend-mode: multiply; }
.tag-main { min-width: 0; padding-left: 12px; border-left: 1px dashed var(--line-2); }
.tag-sub { font: 650 11px/1.2 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.tag-name { display: block; margin-top: 3px; font-weight: 700; font-size: 16px; line-height: 1.25; text-decoration: none; overflow-wrap: anywhere; }
.tag-name::after { content: ''; position: absolute; inset: 0; border-radius: var(--r-lg); }
.tag-name:focus-visible { outline: none; }
.tag-name:focus-visible::after { outline: 2px solid var(--focus); outline-offset: 2px; }
.tag-meta { margin-top: 3px; font: 400 12.5px/1.35 var(--mono); color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.qty { position: relative; z-index: 1; display: grid; justify-items: end; gap: 2px; min-width: 56px; text-align: right; }
.qty b { font: 760 27px/1 var(--mono); letter-spacing: -.03em; }
.qty b.x { color: var(--ink-3); font-weight: 600; }
.qty b.zero { color: var(--bad); }
.qty small { font: 650 10.5px/1.2 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
button.qty { padding: 6px 8px; margin: -6px -8px; background: none; border: 1px dashed transparent; border-radius: var(--r); cursor: pointer; }
button.qty:hover { border-color: var(--line-2); background: var(--panel-2); }
.out-badge { display: inline-block; padding: 2px 6px; font: 750 11px/1.35 var(--mono); color: #111; white-space: nowrap; border-radius: 3px; background: repeating-linear-gradient(-45deg, var(--sig) 0 6px, var(--sig-2) 6px 12px); }
.bar { display: block; width: 64px; height: 4px; overflow: hidden; border-radius: 2px; background: var(--bg-2); }
.bar i { display: block; height: 100%; background: var(--ok); }
.empty { padding: 30px 20px; text-align: center; color: var(--ink-2); background: var(--panel); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty b { color: var(--ink); }
.empty .btn { margin-top: 8px; }

/* Karta produktu */
.item-top { display: grid; gap: 22px; }
@media (min-width: 920px) { .item-top { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 34px; align-items: start; } }
.item-info .eyebrow { margin-bottom: 10px; }
.item-info h1 { font-size: clamp(28px, 4.6vw, 46px); overflow-wrap: anywhere; }
.item-meta { margin-top: 12px; font: 500 14px/1.5 var(--mono); color: var(--ink-2); }
.item-sum { margin-top: 16px; font-size: 17.5px; line-height: 1.55; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.fact { padding: 9px 13px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); min-width: 92px; }
.fact b { display: block; font: 760 22px/1.1 var(--mono); }
.fact b.x { color: var(--ink-3); }
.fact span { display: block; margin-top: 4px; font: 650 10.5px/1.3 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.fact.out { border-color: var(--sig-2); background: repeating-linear-gradient(-45deg, var(--sig-soft) 0 8px, var(--panel) 8px 16px); }
.item-actions { margin-top: 18px; }
.media { overflow: hidden; background: var(--photo); border: 1px solid var(--line); border-radius: var(--r-lg); color: #2b3138; }
.media-tabs { display: flex; gap: 4px; padding: 6px; background: #e3e6ea; border-bottom: 1px solid #d3d8de; }
.media-tabs button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; font: 700 12.5px/1 var(--font); letter-spacing: .04em; text-transform: uppercase; color: #4a525c; cursor: pointer; }
.media-tabs button[aria-pressed="true"] { background: #111418; color: #fff; }
.media-main { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; }
.media-main img { width: 100%; height: 100%; object-fit: contain; padding: 18px; mix-blend-mode: multiply; }
.media-main .glyph { width: 72px; height: 72px; color: #9aa2ac; }
.media-ph { display: grid; justify-items: center; gap: 10px; text-align: center; color: #6b737d; font-size: 14px; }
.media-cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 8px 12px; font: 500 12px/1.4 var(--mono); color: #525a64; background: #e3e6ea; border-top: 1px solid #d3d8de; }
.media-cap a { color: #1f4fd1; }
.thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: #e3e6ea; border-top: 1px solid #d3d8de; }
.thumbs button { flex: none; width: 58px; height: 58px; padding: 3px; background: #fff; border: 2px solid transparent; border-radius: 6px; cursor: pointer; }
.thumbs button[aria-pressed="true"] { border-color: #111418; }
.thumbs img { width: 100%; height: 100%; object-fit: contain; }
.v3d { position: relative; aspect-ratio: 4 / 3; background: radial-gradient(130% 100% at 50% 15%, #2b3444 0%, #11151b 68%); touch-action: none; }
.v3d canvas { display: block; width: 100% !important; height: 100% !important; }
.v3d-hint { position: absolute; left: 10px; bottom: 8px; font: 500 11.5px var(--mono); color: #93a0ae; pointer-events: none; }
.v3d-load { position: absolute; inset: 0; display: grid; place-items: center; font: 600 13px var(--mono); color: #a9b4c0; }

.item-body { display: grid; gap: 30px; margin-top: 34px; }
@media (min-width: 920px) { .item-body { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 40px; align-items: start; } }
.block-h { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.block-h h2 { font-size: 21px; }
.block-h .i { color: var(--ink-3); }
.block + .block { margin-top: 30px; }
.prose { max-width: 70ch; font-size: 16.5px; }
.prose h3 { margin: 24px 0 8px; font-size: 16px; font-stretch: 80%; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.prose h3:first-child { margin-top: 0; }
.prose h4 { margin: 18px 0 6px; font-size: 16px; }
.prose ul, .prose ol { margin: 0 0 12px; padding-left: 22px; }
.prose li { margin: 5px 0; }
.prose li::marker { color: var(--ink-3); font-family: var(--mono); }
.prose a { color: var(--info); }
.note { display: flex; gap: 12px; margin: 16px 0; padding: 12px 14px; font-size: 15px; background: var(--sig-soft); border-left: 5px solid var(--sig); border-radius: 0 var(--r) var(--r) 0; }
.note .i { margin-top: 1px; color: var(--sig-ink); }
.note > div { min-width: 0; }
.note.bad { background: var(--bad-soft); border-left-color: var(--bad); }
.note.bad .i { color: var(--bad); }
.specs { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.specs li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.specs li::before { content: ''; flex: none; width: 7px; height: 7px; margin-top: 8px; background: var(--sig); box-shadow: 0 0 0 1px #00000040; }
.conns { display: grid; gap: 6px; }
.conn { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; align-items: center; padding: 10px 12px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; }
.conn:hover { border-color: var(--ink-2); }
.conn b { font-weight: 700; line-height: 1.3; }
.conn small { grid-column: 2; font: 500 12.5px/1.35 var(--mono); color: var(--ink-2); }
.kind { grid-row: span 2; align-self: center; padding: 5px 7px; font: 760 10.5px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; color: #111; border-radius: 4px; white-space: nowrap; }
.k-power { background: #ffb3b3; } .k-signal { background: #9eeefa; } .k-video { background: #d8cffd; } .k-radio { background: #dfe3e8; }
.k-mount { background: #fde68a; } .k-charge { background: #b6f2cb; } .k-measure { background: #fbcfe8; } .k-tool { background: #fdd5ab; }
.units { display: flex; flex-wrap: wrap; gap: 6px; }
.unit { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; font: 650 13px/1 var(--mono); letter-spacing: .03em; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); }
.unit .ph, .ph { color: var(--ink-3); font-style: italic; font-weight: 500; }
.unit small { font-weight: 500; color: var(--ink-3); }
.unit.out { border-color: var(--sig-2); background: repeating-linear-gradient(-45deg, var(--sig-soft) 0 6px, var(--panel) 6px 12px); }
.links { display: grid; gap: 6px; }
.links a { display: flex; gap: 10px; align-items: center; padding: 10px 12px; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.links a:hover { border-color: var(--ink-2); }
.links a span { min-width: 0; overflow-wrap: anywhere; }
.links small { display: block; font: 500 12px var(--mono); color: var(--ink-3); }
.yt { display: grid; place-items: center; gap: 8px; width: 100%; aspect-ratio: 16 / 9; padding: 16px; background: #111418; color: #e7ebef; border: 0; border-radius: var(--r); cursor: pointer; font-weight: 650; text-align: center; }
.yt .i { width: 42px; height: 42px; fill: var(--sig); stroke: none; }
.yt iframe { width: 100%; height: 100%; border: 0; }
.ytbox { aspect-ratio: 16 / 9; border-radius: var(--r); overflow: hidden; background: #000; }
.ytbox iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Tabele */
.tbl-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.tbl th { padding: 10px 12px; text-align: left; white-space: nowrap; font: 650 11px/1.2 var(--mono); letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); background: var(--panel-2); border-bottom: 1px solid var(--line); }
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td.mono, .tbl .mono { font-size: 13.5px; letter-spacing: .02em; }
.tbl td.num { width: 1%; white-space: nowrap; color: var(--ink-3); font: 600 12.5px var(--mono); }
.tbl td.act { width: 1%; white-space: nowrap; text-align: right; }
.tbl input, .tbl select { min-height: 38px; padding: 6px 9px; font-size: 14.5px; }
.tbl tr.editing td { background: var(--sig-soft); }
.copyable { display: inline-flex; align-items: center; gap: 4px; }
.copyable button { opacity: .55; }
.copyable button:hover { opacity: 1; }
@media (max-width: 760px) {
  .tbl-cards thead { display: none; }
  .tbl-cards tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .tbl-cards tr:last-child { border-bottom: 0; }
  .tbl-cards td { display: flex; gap: 10px; align-items: center; padding: 3px 0; border: 0; grid-column: 1 / -1; min-width: 0; }
  .tbl-cards td[data-l]::before { content: attr(data-l); flex: none; width: 92px; font: 650 10.5px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  .tbl-cards td.num { grid-column: 1; width: auto; }
  .tbl-cards td.act { grid-column: 2; grid-row: 1; width: auto; }
  .tbl-cards td > input, .tbl-cards td > select { flex: 1; min-width: 0; }
}

/* Poradnik */
.chains { display: grid; gap: 14px; }
.chain-card { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.chain-card h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; text-transform: uppercase; font-stretch: 78%; font-weight: 850; letter-spacing: .03em; }
.chain-card h3 .no { font: 700 12px var(--mono); padding: 4px 6px; background: var(--ink); color: var(--bg); border-radius: 4px; letter-spacing: 0; }
.chain-card > p { margin: 8px 0 14px; color: var(--ink-2); font-size: 15px; }
.chain { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.node { display: inline-flex; align-items: center; gap: 8px; padding: 9px 11px; font-weight: 700; font-size: 14.5px; line-height: 1.2; text-decoration: none; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: var(--r); }
a.node:hover { border-color: var(--ink); background: var(--sig-soft); }
.node .glyph { width: 20px; height: 20px; stroke-width: 1.7; }
.node.plain { font-weight: 600; color: var(--ink-2); border-style: dashed; background: transparent; }
.arrow { display: inline-flex; flex-direction: column; align-items: center; padding: 0 2px; font: 600 10.5px/1.15 var(--mono); color: var(--ink-3); text-align: center; }
.arrow::after { content: ''; width: 34px; height: 9px; margin-top: 3px; background: var(--ink-2); clip-path: polygon(0 3.5px, 25px 3.5px, 25px 0, 34px 4.5px, 25px 9px, 25px 5.5px, 0 5.5px); }
.arrow.wireless::after { background: repeating-linear-gradient(90deg, var(--ink-2) 0 4px, transparent 4px 7px) 0 0 / 25px 100% no-repeat, linear-gradient(var(--ink-2), var(--ink-2)) 25px 0 / 9px 100% no-repeat; }
@media (max-width: 640px) {
  .chain { flex-direction: column; align-items: stretch; }
  .arrow { flex-direction: row; justify-content: center; gap: 8px; padding: 2px 0; }
  .arrow::after { order: -1; width: 9px; height: 18px; margin: 0; clip-path: polygon(3.5px 0, 5.5px 0, 5.5px 12px, 9px 12px, 4.5px 18px, 0 12px, 3.5px 12px); }
  .arrow.wireless::after { background: repeating-linear-gradient(180deg, var(--ink-2) 0 3px, transparent 3px 6px) 0 0 / 100% 12px no-repeat, linear-gradient(var(--ink-2), var(--ink-2)) 0 12px / 100% 6px no-repeat; }
}
.rules { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; counter-reset: r; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); font-size: 15.5px; }
.rules li::before { content: counter(r, decimal-leading-zero); display: grid; place-items: center; height: 30px; font: 760 13px var(--mono); color: #111; background: repeating-linear-gradient(-45deg, var(--sig) 0 5px, var(--sig-2) 5px 10px); border-radius: 4px; }
.guides { display: grid; gap: 8px; }
@media (min-width: 760px) { .guides { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .guides { grid-template-columns: 1fr 1fr 1fr; } }
.guide { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.guide:hover { border-color: var(--ink-2); }
.guide .gi { display: grid; place-items: center; width: 44px; height: 44px; background: var(--panel-2); border-radius: var(--r); }
.guide .gi .glyph { width: 24px; height: 24px; }
.guide b { display: block; line-height: 1.25; }
.guide small { display: block; margin-top: 3px; font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }
.cta3d { display: grid; gap: 14px; align-items: center; margin: 26px 0; padding: 20px; color: #e8ecf1; background: radial-gradient(120% 140% at 85% 20%, #2b3444 0%, #11151b 70%); border-radius: var(--r-lg); }
.cta3d h2 { color: #fff; }
.cta3d p { margin: 6px 0 0; color: #b5c0cc; }
@media (min-width: 760px) { .cta3d { grid-template-columns: 1fr auto; padding: 26px 28px; } }

/* Warsztat 3D */
.ws { display: grid; gap: 16px; }
@media (min-width: 1040px) { .ws { grid-template-columns: minmax(0, 1fr) 330px; align-items: start; } }
.ws-stage { position: relative; height: min(72vh, 700px); min-height: 400px; overflow: hidden; border-radius: var(--r-lg); background: radial-gradient(120% 100% at 50% 18%, #2a3343 0%, #10141a 66%); border: 1px solid #1e242d; touch-action: none; }
.ws-stage canvas { display: block; width: 100% !important; height: 100% !important; }
.ws-bar { position: absolute; z-index: 3; top: 10px; left: 10px; right: 10px; display: flex; flex-wrap: wrap; gap: 6px; }
.ws-bar .btn { background: rgba(17, 21, 27, .88); color: #e6eaef; border-color: #3a424e; }
.ws-bar .btn:hover { border-color: #8d98a6; }
.ws-bar .btn[aria-pressed="true"] { background: var(--sig); border-color: var(--sig); color: #111; }
.ws-labels { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; }
.ws-label { position: absolute; left: 0; top: 0; padding: 3px 7px; font: 650 11.5px/1.25 var(--mono); white-space: nowrap; color: #111; background: #f3f5f7; border-radius: 4px; box-shadow: 0 2px 10px rgba(0, 0, 0, .4); will-change: transform; }
.ws-label.wire { color: #e8ecf1; background: rgba(13, 16, 21, .9); border: 1px solid #3a424e; box-shadow: none; }
.ws-label.on { background: var(--sig); }
.ws-hint { position: absolute; z-index: 2; left: 12px; bottom: 10px; right: 12px; margin: 0; font: 500 11.5px/1.4 var(--mono); color: #8e9aa8; pointer-events: none; }
.ws-load { position: absolute; inset: 0; display: grid; place-items: center; font: 600 13px var(--mono); color: #a9b4c0; }
.ws-side { display: grid; gap: 12px; }
.ws-box { padding: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.ws-box h3 { margin-bottom: 10px; font-size: 15px; font-stretch: 80%; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.ws-box p { font-size: 15px; color: var(--ink-2); }
.parts { display: grid; gap: 2px; }
.parts button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; text-align: left; font: 620 14.5px/1.2 var(--font); color: var(--ink); background: none; border: 1px solid transparent; border-radius: var(--r); cursor: pointer; }
.parts button:hover { background: var(--panel-2); }
.parts button[aria-pressed="true"] { background: var(--sig-soft); border-color: var(--sig-2); }
.parts i { width: 10px; height: 10px; flex: none; border-radius: 2px; }
.legend { display: grid; gap: 6px; font: 500 13px var(--mono); }
.legend span { display: flex; align-items: center; gap: 10px; }
.legend i { width: 22px; height: 4px; border-radius: 2px; flex: none; }
.part-links { display: grid; gap: 6px; margin-top: 10px; }

/* Panel */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tile { position: relative; display: block; padding: 18px; text-decoration: none; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.tile:hover { border-color: var(--ink-2); }
.tile .i { width: 28px; height: 28px; stroke-width: 1.6; }
.tile h3 { margin-top: 14px; font-size: 20px; font-stretch: 78%; font-weight: 850; text-transform: uppercase; letter-spacing: .02em; }
.tile p { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-2); }
.tile .big { position: absolute; top: 14px; right: 16px; font: 760 30px/1 var(--mono); }
.tile .big.bad { color: var(--bad); }
.tile.sig { background: var(--sig); border-color: var(--sig-2); color: #111; }
.tile.sig p { color: rgba(0, 0, 0, .65); }
.tabs { display: flex; gap: 4px; margin-bottom: 16px; overflow-x: auto; border-bottom: 1px solid var(--line-2); }
.tabs a, .tabs button { position: relative; flex: none; padding: 11px 14px; font: 720 14px/1 var(--font); font-stretch: 88%; letter-spacing: .04em; text-transform: uppercase; text-decoration: none; color: var(--ink-2); background: none; border: 0; cursor: pointer; }
.tabs [aria-current="page"], .tabs [aria-pressed="true"] { color: var(--ink); }
.tabs [aria-current="page"]::after, .tabs [aria-pressed="true"]::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--sig); }
.tabs small { font: 600 12px var(--mono); color: var(--ink-3); }

.loans { display: grid; gap: 12px; }
@media (min-width: 1000px) { .loans.two { grid-template-columns: 1fr 1fr; align-items: start; } }
.loan { overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.loan.late { border-color: var(--bad); }
.loan-h { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-start; justify-content: space-between; padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.loan-h h3 { font-size: 19px; overflow-wrap: anywhere; }
.loan-h .meta { margin-top: 4px; font: 500 12.5px/1.45 var(--mono); color: var(--ink-2); }
.status { flex: none; padding: 6px 8px; font: 760 11px/1 var(--mono); letter-spacing: .05em; text-transform: uppercase; border-radius: 4px; white-space: nowrap; }
.st-active { background: var(--sig); color: #111; }
.st-late { background: var(--bad); color: #fff; }
.st-done { background: var(--ok-soft); color: var(--ok); }
.loan-b { display: grid; gap: 10px; padding: 12px 16px; }
.loan-lines { margin: 0; padding: 0; list-style: none; }
.loan-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; border-bottom: 1px dashed var(--line); }
.loan-lines li:last-child { border-bottom: 0; }
.loan-lines .q { flex: none; font: 650 13px var(--mono); color: var(--ink-2); }
.loan-lines .done { color: var(--ok); }
.loan-notes { font-size: 14px; color: var(--ink-2); }
.loan-f { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 16px; background: var(--panel-2); border-top: 1px solid var(--line); }
.pick { position: relative; }
.pick-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); max-height: 320px; overflow-y: auto; padding: 4px; background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .35); }
.pick-list button { display: flex; justify-content: space-between; gap: 12px; width: 100%; padding: 9px 10px; text-align: left; background: none; border: 0; border-radius: 4px; cursor: pointer; }
.pick-list button:hover, .pick-list button.on { background: var(--panel-2); }
.pick-list small { font: 500 12px var(--mono); color: var(--ink-3); white-space: nowrap; }
.lines-edit { display: grid; gap: 8px; }
.line-e { display: grid; gap: 8px; padding: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); }
.line-e-top { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.line-e-top b { min-width: 0; overflow-wrap: anywhere; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--panel); flex: none; }
.stepper button { width: 36px; height: 38px; border: 0; background: none; font: 700 18px/1 var(--mono); cursor: pointer; color: var(--ink); }
.stepper input { width: 58px; min-height: 38px; padding: 4px; text-align: center; border: 0; border-radius: 0; font: 650 15px var(--mono); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px; font: 650 13px/1 var(--mono); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip:disabled { cursor: not-allowed; opacity: .55; text-decoration: line-through; }
.warn-line { font-size: 13.5px; color: var(--bad); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.log { margin: 0; padding: 0; list-style: none; }
.log li { display: grid; grid-template-columns: 136px minmax(0, 1fr); gap: 4px 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.log time { font: 500 12.5px/1.5 var(--mono); color: var(--ink-3); }
.log small { display: block; color: var(--ink-2); overflow-wrap: anywhere; }
@media (max-width: 560px) { .log li { grid-template-columns: 1fr; } }
.share-row { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.share-row:last-child { border-bottom: 0; }
.share-url { display: flex; gap: 6px; }
.share-url input { font: 500 13px var(--mono); min-height: 38px; }
.media-edit { display: grid; gap: 8px; }
.me-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--r); }
.me-row .mt { display: grid; place-items: center; width: 54px; height: 54px; overflow: hidden; background: var(--photo); border-radius: 4px; }
.me-row .mt img { width: 100%; height: 100%; object-fit: contain; }
.me-row .mi { min-width: 0; display: grid; gap: 6px; }
.me-row .mi input { min-height: 36px; padding: 6px 9px; font-size: 14px; }
.me-row .mb { display: flex; gap: 2px; }
.link-e { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1fr) auto; gap: 6px; align-items: center; }
@media (max-width: 760px) { .link-e { grid-template-columns: 1fr 1fr; padding: 10px; background: var(--panel-2); border-radius: var(--r); } .link-e select:first-child { grid-column: 1 / -1; } }
.login { max-width: 430px; margin: 30px auto; }
.login .card { padding: 24px; }
.login h1 { font-size: 34px; margin-bottom: 6px; }
.err { padding: 10px 12px; font-size: 14.5px; color: var(--bad); background: var(--bad-soft); border-radius: var(--r); }
.care { display: grid; gap: 16px; }
@media (min-width: 900px) { .care { grid-template-columns: 1fr 1fr; } }
.care h3 { margin-bottom: 8px; font-size: 16px; font-stretch: 80%; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
.care ol, .care ul { margin: 0; padding-left: 20px; }
.care li { margin: 4px 0; font-size: 15px; }
details.fold { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
details.fold > summary { display: flex; align-items: center; gap: 10px; padding: 14px 16px; cursor: pointer; list-style: none; font: 800 17px/1.2 var(--font); font-stretch: 80%; letter-spacing: .03em; text-transform: uppercase; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: '+'; margin-left: auto; font: 600 20px var(--mono); color: var(--ink-3); }
details.fold[open] > summary::after { content: '−'; }
details.fold > .fold-b { padding: 0 16px 16px; }
.group-h { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; justify-content: space-between; margin: 28px 0 10px; }
.group-h h2 { font-size: clamp(20px, 3vw, 26px); }
.group-h .meta { font: 500 12.5px var(--mono); color: var(--ink-3); }
.paper { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow); }
.paper h1 { font-size: clamp(26px, 4vw, 38px); }

/* Okno dialogowe i komunikaty */
.dlg { width: min(540px, calc(100vw - 20px)); max-height: calc(100vh - 32px); padding: 0; color: var(--ink); background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: 0 24px 70px rgba(0, 0, 0, .4); }
.dlg.wide { width: min(760px, calc(100vw - 20px)); }
.dlg::backdrop { background: rgba(9, 11, 14, .6); }
.dlg form { display: flex; flex-direction: column; max-height: calc(100vh - 34px); }
.dlg-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 12px 18px; border-bottom: 1px solid var(--line); }
.dlg-h h2 { font-size: 21px; }
.dlg-b { display: grid; gap: 14px; padding: 16px 18px; overflow-y: auto; }
.dlg-b p { margin: 0; }
.dlg-f { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 18px; background: var(--panel-2); border-top: 1px solid var(--line); }
.toast { position: fixed; z-index: 60; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); padding: 12px 16px; font-weight: 650; color: var(--bg); background: var(--ink); border-radius: var(--r); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: var(--bad); color: #fff; }
@media (min-width: 900px) { .toast { bottom: 26px; } }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }

@media print {
  .top, .tabbar, .toast, .no-print, .skip { display: none !important; }
  body { background: #fff; color: #000; padding: 0; font-size: 12pt; }
  .page { padding: 0; }
  .tbl-wrap, .paper, .card { border: 0; box-shadow: none; padding: 0; }
  .tbl th { background: #eee; color: #000; }
  .tbl td, .tbl th { border-bottom: 1px solid #999; }
  .tbl-cards thead { display: table-header-group; }
  .tbl-cards tr { display: table-row; }
  .tbl-cards td { display: table-cell; }
  .tbl-cards td[data-l]::before { content: none; }
  a { text-decoration: none; }
}
