/* GrimOS Hub: style. Kolory wyłącznie ze zmiennych z tokens.css (generowane z docs/design/tokens.json).
   Wartości liczbowe 1:1 z zaakceptowanych makiet (docs/makiety/build.py) i DESIGN.md. */

:root {
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --shadow-panel: -10px 0 34px rgba(27, 36, 54, .07);
  --shadow-modal: 0 24px 64px rgba(27, 36, 54, .18);
  --glow: 0 0 0 4px rgba(127, 96, 38, .18);
  --t: 160ms ease-out;
  color-scheme: light;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.4;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
body.lock { overflow: hidden; }
h1, h2, h3, .bigprice, .mono, .bname, .mbrand, .khead { font-variant-numeric: lining-nums; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: .005em; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; text-align: inherit; }
ul { list-style: none; }
svg { display: block; flex: none; }
[hidden] { display: none !important; }
a:focus-visible, button:focus-visible, [role="option"]:focus-visible {
  outline: 2px solid var(--navy); outline-offset: 2px;
}
:disabled { opacity: .45; cursor: not-allowed; }

.caps { font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.id { font-size: 11px; color: var(--muted); letter-spacing: .04em; }
.money { color: var(--cognac); }
.noscript { padding: 24px; }

/* Chipy statusów */
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 1.35; white-space: nowrap; }
.s-pomysl { background: var(--chip-pomysl-bg); color: var(--chip-pomysl-fg); }
.s-do_kupienia { background: var(--chip-do-kupienia-bg); color: var(--chip-do-kupienia-fg); }
.s-zamowione { background: var(--chip-zamowione-bg); color: var(--chip-zamowione-fg); }
.s-przymiarka { background: var(--chip-przymiarka-bg); color: var(--chip-przymiarka-fg); }
.s-kupione { background: var(--chip-kupione-bg); color: var(--chip-kupione-fg); }
.s-posiadane { background: var(--chip-posiadane-bg); color: var(--chip-posiadane-fg); box-shadow: inset 0 0 0 1px var(--chip-posiadane-ring); }
.s-zwrot { background: var(--chip-zwrot-bg); color: var(--chip-zwrot-fg); }
.s-odrzucone { background: var(--chip-odrzucone-bg); color: var(--chip-odrzucone-fg); }

.bar { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.bar.thin { height: 2px; }
.bar i { display: block; height: 100%; background: var(--brass); border-radius: 2px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 48px; width: 100%;
  border-radius: 8px; background: var(--navy); color: var(--on-navy); font-weight: 500; font-size: 15px; text-align: center;
}
@media (hover: hover) { .btn:hover { background: var(--navy-hover); } }
.link { color: var(--navy); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-align: center; }

/* Monogram */
.mono {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--brass);
  display: grid; place-items: center; font-family: var(--serif); font-size: 23px; font-weight: 600;
  color: var(--brass); line-height: 1; padding-bottom: 2px; flex: none;
}
.mono.s { width: 30px; height: 30px; font-size: 19px; }
.mono.big { width: 56px; height: 56px; font-size: 36px; padding-bottom: 3px; }
.av {
  width: 26px; height: 26px; border-radius: 50%; background: var(--avatar); color: var(--ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 500; flex: none;
}
.av.big { width: 34px; height: 34px; font-size: 13px; }

/* ---------- Układ desktop (od 821px) ---------- */
.app {
  display: grid; grid-template-columns: 232px minmax(0, 1fr) 0;
  height: 100vh; height: 100dvh; transition: grid-template-columns 180ms ease-out;
}
.app.has-panel { grid-template-columns: 232px minmax(0, 1fr) 420px; }

.side { padding: 28px 20px 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; height: 100dvh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 30px; }
.bname { font-family: var(--serif); font-size: 26px; font-weight: 600; letter-spacing: .02em; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.nav { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 6px; font-size: 14.5px; color: var(--ink); }
.nav b { font-weight: 400; font-size: 12.5px; color: var(--muted); }
.nav.on { background: var(--nav-active); color: var(--navy); font-weight: 500; }
.nav.on b { color: var(--navy); }
.me { position: relative; margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 0 8px; color: var(--muted); font-size: 13px; width: 100%; }
.me::before { content: ''; position: absolute; inset: -9px 0; }
@media (hover: hover) { button.me:hover { color: var(--ink); } }

.mid { display: flex; flex-direction: column; min-width: 0; height: 100dvh; }
.top { height: 68px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 48px; border-bottom: 1px solid var(--line); }
.mid[data-ekran="module"] .top { padding: 0 40px; }
.search {
  display: flex; align-items: center; gap: 10px; width: 460px; max-width: 100%; height: 40px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; color: var(--muted); text-align: left;
}
.mid[data-ekran="module"] .search { width: 420px; }
@media (hover: hover) { .search:hover { border-color: var(--line-strong); } }
.search span { flex: 1; }
kbd { font-family: var(--sans); font-size: 11.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; background: var(--bg); }
@media (hover: hover) { button.av.big:hover { outline: 1px solid var(--line-strong); } }
.content { flex: 1; overflow-y: auto; overflow-x: hidden; min-width: 0; }

.mhead, .tabs { display: none; }

/* ---------- Home ---------- */
.home { padding: 26px 48px 40px; }
.hello .caps { margin-bottom: 2px; }
.hello h1 { font-size: 42px; font-weight: 500; line-height: 1.1; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 13px 16px 14px; height: 98px; display: flex; flex-direction: column; min-width: 0;
}
@media (hover: hover) { .tile:hover { border-color: var(--line-strong); } }
.thead { display: flex; justify-content: space-between; align-items: baseline; }
.tile h3 { font-size: 21px; line-height: 1.1; }
.cnt { font-weight: 400; font-size: 12.5px; color: var(--brass); }
.tmain { font-size: 14px; font-weight: 500; margin-top: 6px; }
.tmain.muted-line { color: var(--muted); font-weight: 400; }
.tmain.quiet { color: var(--muted); font-weight: 400; font-style: italic; font-family: var(--serif); font-size: 18px; }
.tsub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.tsub.money { color: var(--cognac); }
.tile .bar { margin-top: auto; }
.sample {
  display: inline-block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--brass);
  border: 1px solid var(--brass); border-radius: 4px; padding: 1px 6px; margin-top: 2px;
}
.feedhead { font-size: 26px; font-weight: 600; margin: 24px 0 4px; }
.row {
  display: grid; grid-template-columns: 62px 1fr 150px 96px 112px 92px 96px; align-items: center; gap: 0 14px;
  height: 39px; border-top: 1px solid var(--line); font-size: 13.5px;
}
.row.h { height: 26px; border-top: 0; }
.row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .pr { text-align: right; }
.row .mod { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
/* Tło po najechaniu wychodzi 10px poza kolumny cieniem, żeby linie rzędów zostały równo z treścią (jak w makiecie). */
@media (hover: hover) { a.row:hover { background: var(--row-hover); box-shadow: -10px 0 0 var(--row-hover), 10px 0 0 var(--row-hover); } }

/* ---------- Moduł ---------- */
.module { padding: 0 40px 40px; }
.modhead { padding-top: 26px; }
.modhead h1 { font-size: 44px; font-weight: 500; line-height: 1.05; }
.modsum { display: flex; align-items: center; gap: 18px; margin-top: 8px; font-size: 14px; }
.modsum .bar { width: 220px; }
.tabs-row { display: flex; gap: 24px; margin-top: 14px; border-bottom: 1px solid var(--line); }
.tab { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 0 10px; margin-bottom: -1px; font-size: 14px; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; }
.tab b { font-weight: 400; font-size: 12.5px; color: var(--brass); }
.tab.on { color: var(--ink); border-bottom-color: var(--navy); }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 18px; }
.fsp { flex: 1; }
.fbtn {
  display: inline-flex; align-items: center; height: 32px; border-radius: 6px; background: var(--surface);
  border: 1px solid var(--line-strong); font-size: 13px; font-weight: 500; flex: none;
}
.fbtn.on { background: var(--nav-active); color: var(--navy); }
.fmain { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 100%; padding: 0 12px; border-radius: 6px; white-space: nowrap; }
.fbtn.on .fmain { padding-right: 4px; }
.fmain span.muted { font-weight: 400; }
.fx { position: relative; width: 28px; height: 100%; display: grid; place-items: center; color: var(--navy); border-radius: 6px; }
.fmain::before, .fx::before { content: ''; position: absolute; inset: -6px 0; }
.list { padding-top: 6px; }
.grp { padding-top: 16px; }
.ghead { display: flex; align-items: baseline; gap: 12px; }
.ghead h3 { font-size: 21px; font-weight: 600; }
.gc { font-size: 12.5px; color: var(--brass); }
.grp .bar { margin: 6px 0 2px; }
.item {
  display: grid; grid-template-columns: minmax(0, 1fr) 112px 150px 92px; align-items: center; gap: 0 16px;
  min-height: 56px; padding: 6px 12px; margin: 0 -12px; border-bottom: 1px solid var(--line); border-radius: 6px;
}
@media (hover: hover) { a.item:hover { background: var(--row-hover); } }
.item.sel { background: var(--row-selected); border-bottom-color: transparent; box-shadow: inset 3px 0 0 var(--navy); }
.item .n { font-size: 14.5px; font-weight: 500; line-height: 1.3; }
.item .sub { margin-top: 2px; font-size: 12px; }
.item .sh { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.item .pr { text-align: right; font-size: 14px; }

/* ---------- Karta pozycji (panel) ---------- */
.panel { background: var(--surface); overflow: hidden; min-width: 0; height: 100dvh; }
.app.has-panel .panel { border-left: 1px solid var(--line); box-shadow: var(--shadow-panel); }
.panel-inner { width: 420px; max-width: 100%; height: 100%; overflow-y: auto; padding: 26px 32px 28px; }
.ptop { display: flex; align-items: center; gap: 12px; min-height: 22px; }
.ptop .x { margin: -5px -6px -5px auto; color: var(--muted); width: 32px; height: 32px; display: grid; place-items: center; border-radius: 6px; }
@media (hover: hover) { .ptop .x:hover { color: var(--ink); background: var(--row-hover); } }
.panel h1 { font-size: 30px; font-weight: 600; line-height: 1.12; margin-top: 16px; overflow-wrap: anywhere; }
.marka { color: var(--muted); font-size: 15px; margin-top: 5px; }
.bigprice { font-family: var(--serif); font-weight: 600; font-size: 42px; line-height: 1; margin: 18px 0; }
.flds { margin-top: 22px; }
.fld { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.fld .caps { flex: none; }
.fld .fv { text-align: right; min-width: 0; overflow-wrap: anywhere; }
.sec { margin-top: 22px; }
.sec > .caps { margin-bottom: 12px; }
.axis { position: relative; margin-left: 4px; }
.axis li { position: relative; padding: 0 0 18px 26px; }
.axis li:last-child { padding-bottom: 0; }
.axis li::before { content: ''; position: absolute; left: 4px; top: 12px; bottom: -4px; width: 1px; background: var(--line); }
.axis li:last-child::before { display: none; }
.axis .dot { position: absolute; left: 0; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--brass); }
.axis .cur .dot { box-shadow: var(--glow); }
.axis .when { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.note { font-size: 14px; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; }
.khead, .kbar { display: none; }

/* ---------- Wyszukiwarka Cmd+K ---------- */
.pal-wrap { position: fixed; inset: 0; z-index: 50; }
.pal-scrim { position: absolute; inset: 0; background: var(--scrim); }
.pal {
  position: relative; width: 640px; max-width: calc(100vw - 32px); margin: 12vh auto 0; background: var(--surface);
  border-radius: 12px; box-shadow: var(--shadow-modal); overflow: hidden; animation: pal-in 160ms ease-out;
}
@keyframes pal-in { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: scale(1); } }
.pal-field { display: flex; align-items: center; gap: 12px; height: 52px; padding: 0 18px; color: var(--muted); border-bottom: 1px solid var(--line); }
.pal-field:focus-within { box-shadow: inset 0 -2px 0 var(--navy); }
.pal-input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: none; font: inherit; font-size: 16px; color: var(--ink); }
.pal-input::placeholder { color: var(--muted); opacity: 1; }
.pal-cancel { display: none; color: var(--navy); font-weight: 500; font-size: 15px; padding: 0 4px; height: 44px; }
.pal-body { max-height: min(60vh, 520px); overflow-y: auto; padding: 6px 8px 10px; }
.pal-h { padding: 10px 10px 6px; }
.pal-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 6px 10px; border-radius: 6px; }
.pal-row.sel { background: var(--row-selected); }
.pal-t { min-width: 0; }
.pal-n { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.pal-body .empty { padding: 40px 24px; }

/* ---------- Menu rozwijane ---------- */
.menu {
  position: fixed; z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow-modal); padding: 6px; max-height: min(60vh, 420px); overflow-y: auto;
}
.menu-opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 6px 10px; border-radius: 6px; font-size: 13.5px; }
@media (hover: hover) { .menu-opt:hover { background: var(--row-hover); } }
.menu-opt:focus-visible { outline-offset: -2px; background: var(--row-hover); }
.menu-opt.on { color: var(--navy); font-weight: 500; }
.menu-label { flex: 1; }
.menu-count { color: var(--muted); font-size: 12px; }
.menu-scrim { position: fixed; inset: 0; z-index: 59; background: var(--scrim); }
.menu.sheet { left: 0; right: 0; bottom: 0; top: auto; border-radius: 12px 12px 0 0; padding: 8px 8px calc(12px + env(safe-area-inset-bottom, 0px)); max-height: 70vh; border-width: 1px 0 0; }
.menu.sheet .menu-opt { min-height: 48px; font-size: 15px; }

/* ---------- Logowanie ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-box { width: 360px; max-width: 100%; display: flex; flex-direction: column; align-items: center; text-align: center; }
.login-box h1 { font-size: 34px; font-weight: 600; margin-top: 18px; }
.login-lead { margin-top: 8px; font-size: 14px; }
.login-form { width: 100%; margin-top: 28px; display: flex; flex-direction: column; gap: 4px; }
.field {
  width: 100%; height: 48px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-strong);
  padding: 0 14px; font: inherit; font-size: 16px; color: var(--ink);
}
.field:focus-visible { outline: none; border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.login-err { min-height: 26px; padding-top: 6px; color: var(--danger); font-size: 13px; text-align: left; }
.login-err.shown { margin-top: 18px; text-align: center; }

/* ---------- Puste stany, błędy, szkielety ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; color: var(--muted); padding: 64px 24px; }
.empty p { font-family: var(--serif); font-style: italic; font-size: 18px; }
.err { padding: 32px 0; color: var(--danger); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; font-size: 14px; }
.sk { display: block; background: var(--line); opacity: .4; border-radius: 4px; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .7; } }
.sk-list { margin-top: 12px; }
.sk-row { display: grid; grid-template-columns: minmax(0, 1fr) 112px 92px; gap: 16px; align-items: center; height: 56px; border-bottom: 1px solid var(--line); }
.sk-a { height: 12px; width: 60%; }
.sk-b { height: 18px; width: 72px; border-radius: 999px; }
.sk-c { height: 12px; width: 52px; justify-self: end; }
.sk-tile { gap: 10px; }
.sk-tile .sk-a { height: 18px; width: 46%; }
.sk-tile .sk-b { height: 12px; width: 70%; border-radius: 4px; }

/* ---------- Więcej (telefon) ---------- */
.more { padding: 0 20px 24px; }
.more h1 { font-size: 34px; font-weight: 500; line-height: 1.1; margin-bottom: 14px; }
.more-row { min-height: 48px; padding: 10px 12px; width: 100%; font-size: 15px; }
.more-l { display: flex; align-items: center; gap: 14px; }
.more-out { color: var(--muted); margin-top: 8px; }

/* Węższy desktop: karta nie ściska listy, tylko wjeżdża na nią; kolumna sklepu ustępuje miejsca nazwie. */
@media (min-width: 821px) and (max-width: 1100px) {
  .app.has-panel { grid-template-columns: 232px minmax(0, 1fr) 0; }
  .panel { position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw; z-index: 30; transform: translateX(100%); transition: transform 180ms ease-out; }
  .app.has-panel .panel { transform: none; }
}
@media (min-width: 821px) and (max-width: 1360px) {
  .app.has-panel .item { grid-template-columns: minmax(0, 1fr) 112px 92px; }
  .app.has-panel .item .sh { display: none; }
}

/* ---------- Telefon (do 820px) ---------- */
@media (max-width: 820px) {
  .app { display: block; height: auto; transition: none; }
  .side, .top { display: none; }
  .mid { display: block; height: auto; }
  .content { overflow: visible; padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px) + 24px); }

  .mhead {
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 5;
    height: calc(60px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 20px 0; background: var(--bg);
  }
  .mbrand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: .02em; }
  .icn { width: 44px; height: 44px; display: grid; place-items: center; margin-right: -10px; color: var(--ink); }

  .tabs {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; min-height: 74px;
    padding: 8px 6px max(18px, env(safe-area-inset-bottom, 0px)); background: var(--surface); border-top: 1px solid var(--line);
  }
  .tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 44px; color: var(--muted); font-size: 10.5px; font-weight: 500; }
  .tabs a.on { color: var(--navy); }

  .home { padding: 0 20px 24px; }
  .hello h1 { font-size: 34px; margin-top: 2px; }
  .tiles { grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
  .tile { height: 88px; padding: 11px 13px 12px; }
  .tile h3 { font-size: 19px; }
  .tmain { font-size: 12.5px; margin-top: 4px; line-height: 1.25; }
  .tsub { font-size: 11.5px; }
  .tmain.quiet { font-size: 16px; }
  .sample { font-size: 9.5px; padding: 0 5px; }
  .feedhead { font-size: 23px; margin: 20px 0 4px; }

  .mrow { display: flex; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); min-height: 62px; }
  .ml { min-width: 0; flex: 1; }
  .mn { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ms { display: flex; align-items: center; gap: 8px; margin-top: 5px; min-width: 0; }
  .ms .chip { font-size: 11px; padding: 2px 8px; flex: none; }
  .ms .id { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mr { text-align: right; font-size: 13.5px; white-space: nowrap; }
  .mr .small { font-size: 11.5px; }

  .module { padding: 0 20px 24px; }
  .modhead { padding-top: 0; }
  .modhead h1 { font-size: 34px; line-height: 1.1; margin-top: 2px; }
  .modsum { flex-wrap: wrap; gap: 8px 18px; }
  .modsum .bar { width: 100%; max-width: 220px; }
  .tabs-row { gap: 22px; }
  .tab { min-height: 44px; align-items: center; padding: 0 0 4px; }
  .filters { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px; padding: 14px 20px 4px; scrollbar-width: none; }
  .filters::-webkit-scrollbar { display: none; }
  .fsp { display: none; }
  .fbtn { height: 40px; }
  .list { padding-top: 0; }
  .grp .ghead h3 { font-size: 19px; }
  .flat .mrow:first-child { border-top: 0; }
  .grp .mrow:first-of-type { border-top: 0; }

  /* Karta pozycji: osobny ekran */
  .panel, .app.has-panel .panel {
    position: fixed; inset: 0; z-index: 30; width: auto; height: auto; overflow-y: auto; background: var(--bg); border: 0; box-shadow: none;
    display: flex; flex-direction: column; overscroll-behavior: contain;
  }
  .kbody { flex: 1 0 auto; }
  .khead {
    flex: none; display: flex; align-items: center; gap: 6px; position: sticky; top: 0; z-index: 2; background: var(--bg);
    height: calc(60px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 14px 0;
    font-family: var(--serif); font-size: 22px; font-weight: 600;
  }
  .khead .back { width: 44px; height: 44px; display: grid; place-items: center; margin-left: -8px; color: var(--ink); }
  .kbody { padding: 6px 20px 24px; }
  .kid { display: flex; align-items: center; gap: 10px; }
  .kbody h1 { font-size: 29px; font-weight: 600; line-height: 1.12; margin-top: 10px; }
  .kbody .bigprice { font-size: 38px; margin: 14px 0 6px; }
  .kbody .flds { margin-top: 12px; }
  .kbody .fld { padding: 9px 0; }
  .kbody .sec { margin-top: 16px; }
  .kbody .sec > .caps { margin-bottom: 10px; }
  .kbody .axis li { padding-bottom: 13px; }
  .kbar {
    display: block; position: sticky; bottom: 0; padding: 12px 20px max(30px, env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to bottom, color-mix(in srgb, var(--bg) 0%, transparent), var(--bg) 22%);
  }
  .kbar .btn { height: 52px; }

  /* Wyszukiwarka: pełny ekran */
  .pal { position: fixed; inset: 0; width: auto; max-width: none; margin: 0; border-radius: 0; display: flex; flex-direction: column; animation: none; }
  .pal-field { height: calc(56px + env(safe-area-inset-top, 0px)); padding-top: env(safe-area-inset-top, 0px); }
  .pal-cancel { display: block; }
  .pal-body { max-height: none; flex: 1; padding: 6px 12px calc(16px + env(safe-area-inset-bottom, 0px)); }
}

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