/* Książka teleadresowa — styl klienta PWA. Bez zewnętrznych fontów i CDN (sieć LAN, offline).
   Motyw: papier w chłodnym odcieniu, atrament morski, akcent głębokiej zieleni (Bałtyk).
   Nagłówki liter i nazwisko na karcie — krój szeryfowy z systemu, interfejs — krój bezszeryfowy z systemu. */
:root {
  color-scheme: light dark;
  --bg: #f3f6f6; --surface: #ffffff; --ink: #0f2329; --muted: #52666d; --faint: #62767d; --line: #dbe4e5;
  --accent: #0e6b66; --accent-strong: #0a5651; --accent-soft: #dff0ee; --accent-fg: #ffffff;
  --danger: #b3261e; --danger-soft: #fbe9e7; --warn: #86550a; --warn-soft: #fdf0d5; --ok: #1b7a43;
  --scrim: rgba(8, 24, 28, .46); --shadow: 0 -10px 40px rgba(8, 28, 32, .18);
  --av0b: #d3ebe7; --av0f: #0b5650; --av1b: #d9e6f7; --av1f: #1e4a86; --av2b: #e2e1f6; --av2f: #403e9c; --av3b: #eedcf1; --av3f: #74368a;
  --av4b: #f7dde1; --av4f: #963047; --av5b: #f6e6c6; --av5f: #7a5110; --av6b: #e3ebca; --av6f: #4b6113; --av7b: #dce3e8; --av7f: #3b4f5e;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Noto Serif", "DejaVu Serif", serif;
  --sticky-h: 116px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1a1e; --surface: #15252a; --ink: #e7f0f1; --muted: #9db1b7; --faint: #8a9ea4; --line: #243940;
    --accent: #4cc3b6; --accent-strong: #7ad9cd; --accent-soft: #17383a; --accent-fg: #06211f;
    --danger: #ff8f86; --danger-soft: #3a1e1c; --warn: #f4c36a; --warn-soft: #3a2f14; --ok: #5fd58b;
    --scrim: rgba(0, 0, 0, .6); --shadow: 0 -10px 40px rgba(0, 0, 0, .5);
    --av0b: #1b3d3a; --av0f: #8ee0d4; --av1b: #1d3350; --av1f: #a5c6f2; --av2b: #2a2a52; --av2f: #b9b7f5; --av3b: #3a2646; --av3f: #dcb0ea;
    --av4b: #4a2530; --av4f: #f2b3be; --av5b: #463514; --av5f: #ecc77e; --av6b: #33401a; --av6f: #c5da86; --av7b: #27333c; --av7f: #b8c9d4;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; }
body { font: 16px/1.4 var(--sans); background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; }
/* maska pod pasek stanu (notch), gdy nagłówek jest przyklejony */
body::before { content: ""; position: fixed; inset: 0 0 auto 0; height: var(--safe-t); background: var(--bg); z-index: 30; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 24px; }
.icon { display: block; flex: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }

/* ---------- awatary ---------- */
.avatar { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  font: 600 17px/1 var(--sans); letter-spacing: .02em; user-select: none; }
.avatar.lg { width: 56px; height: 56px; font-size: 21px; }
.avatar.xl { width: 104px; height: 104px; font-size: 38px; font-family: var(--serif); font-weight: 600; }
.avatar.plain { background: var(--accent-soft); color: var(--accent-strong); }
.av0 { background: var(--av0b); color: var(--av0f); } .av1 { background: var(--av1b); color: var(--av1f); }
.av2 { background: var(--av2b); color: var(--av2f); } .av3 { background: var(--av3b); color: var(--av3f); }
.av4 { background: var(--av4b); color: var(--av4f); } .av5 { background: var(--av5b); color: var(--av5f); }
.av6 { background: var(--av6b); color: var(--av6f); } .av7 { background: var(--av7b); color: var(--av7f); }

/* ---------- przyciski wspólne ---------- */
.iconbtn { width: 48px; height: 48px; border: 0; border-radius: 50%; background: none; display: grid; place-items: center; color: var(--ink); }
.iconbtn:active { background: var(--accent-soft); }
.btn { display: block; width: 100%; min-height: 54px; padding: 0 18px; border: 0; border-radius: 14px; background: var(--accent); color: var(--accent-fg);
  font-weight: 650; font-size: 17px; }
.btn:active { background: var(--accent-strong); }
.btn:disabled { opacity: .6; cursor: default; }
.btn.slim { display: inline-block; width: auto; min-height: 48px; font-size: 16px; padding: 0 20px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); margin-top: 10px; }
.btn.ghost:active { background: var(--accent-soft); }
.btn.danger { background: var(--danger); color: #fff; margin-top: 18px; }
@media (prefers-color-scheme: dark) { .btn.danger { background: #c4453d; } }
.linkbtn { min-height: 48px; padding: 0 12px; border: 0; background: none; color: var(--accent-strong); font-weight: 600; font-size: 16px;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; border-radius: 10px; }
.linkbtn.small { font-size: 14px; min-height: 44px; }

/* ---------- logowanie ---------- */
.auth { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: calc(var(--safe-t) + 28px) 20px calc(var(--safe-b) + 28px); overflow: hidden; }
.auth-box { width: 100%; max-width: 400px; position: relative; z-index: 1; }
.mark-img { display: block; width: 64px; height: 64px; margin-bottom: 20px; }
.mark { width: 60px; height: 60px; border-radius: 18px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; margin-bottom: 20px; }
.auth h1 { font: 600 34px/1.1 var(--serif); letter-spacing: -.01em; margin-bottom: 10px; }
.lead { color: var(--muted); margin-bottom: 22px; max-width: 34ch; }
.form label { display: block; font-weight: 600; font-size: 15px; margin: 16px 0 6px; }
.form input { width: 100%; min-height: 54px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); font-size: 17px; }
.form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form input.code { font: 650 24px/1.2 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .14em; text-align: center; text-transform: uppercase; }
.pinwrap { position: relative; }
.pinwrap input { padding-right: 56px; letter-spacing: .12em; }
.eye { position: absolute; right: 4px; top: 3px; width: 48px; height: 48px; border: 0; background: none; border-radius: 12px; display: grid; place-items: center; color: var(--muted); }
.hint { font-size: 14px; color: var(--muted); margin-top: 6px; }
.remember { margin-top: 18px; display: grid; grid-template-columns: 24px 1fr; column-gap: 12px; align-items: start; }
.form .remember input { width: 24px; min-height: 24px; height: 24px; padding: 0; margin: 2px 0 0; accent-color: var(--accent); }
.form .remember label { margin: 0; font-weight: 600; }
.remember .hint { grid-column: 2; margin-top: 4px; }
.device { margin-top: 14px; }
.device summary { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 14px; cursor: pointer; border-radius: 8px; list-style: none; }
.device summary::-webkit-details-marker { display: none; }
.device[open] summary .icon { transform: rotate(180deg); }
.device input { min-height: 48px; margin-top: 4px; font-size: 16px; }
.err { color: var(--danger); font-size: 15px; margin-top: 14px; }
.err:empty { display: none; }
.form .btn { margin-top: 20px; }
.notice { background: var(--warn-soft); color: var(--warn); padding: 12px 14px; border-radius: 12px; font-size: 15px; margin-bottom: 8px; }
.alt { text-align: center; margin-top: 14px; }

/* ---------- nagłówek i wyszukiwanie ---------- */
.shell { max-width: 760px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; }
.topline { display: flex; align-items: center; gap: 10px; padding: calc(var(--safe-t) + 14px) 16px 6px; }
.brand { flex: 1; min-width: 0; }
.brand h1 { font: 600 27px/1.15 var(--serif); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 13px; color: var(--muted); min-height: 20px; }
.status-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.dot.ok { background: var(--ok); } .dot.err { background: var(--danger); } .dot.off { background: var(--warn); }
.dot.syncing { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.badge { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--warn-soft); color: var(--warn);
  font-size: 12.5px; font-weight: 650; }
.me { flex: none; width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--accent-strong);
  display: grid; place-items: center; }
.me:active { background: var(--accent-soft); }
.me-ini { font-weight: 650; font-size: 16px; }

.sticky { position: sticky; top: var(--safe-t); z-index: 20; background: var(--bg); padding: 8px 16px 6px; border-bottom: 1px solid transparent; }
.sticky.stuck { border-bottom-color: var(--line); }
.searchrow { position: relative; display: flex; align-items: center; height: 50px; border-radius: 15px; background: var(--surface); border: 1.5px solid var(--line); }
.searchrow:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.sicon { padding-left: 14px; color: var(--muted); display: grid; }
.search { flex: 1; min-width: 0; height: 100%; padding: 0 8px 0 10px; border: 0; background: none; font-size: 17px; -webkit-appearance: none; appearance: none; }
.search:focus { outline: none; }
.search::-webkit-search-cancel-button, .search::-webkit-search-decoration { -webkit-appearance: none; display: none; }
.clear { flex: none; width: 48px; height: 48px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; border-radius: 50%; }
.chips { display: flex; gap: 8px; margin: 8px -16px 0; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chipwrap { flex: none; display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 22px; background: var(--surface); min-height: 44px; }
.chipwrap.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 41px; padding: 0 14px; border: 0; background: none; border-radius: 22px; font-size: 15px; font-weight: 550; white-space: nowrap; }
.chipwrap.active .chip { padding-right: 4px; }
.chip-v { max-width: 56vw; overflow: hidden; text-overflow: ellipsis; }
.chip-x { width: 41px; height: 41px; border: 0; background: none; border-radius: 50%; display: grid; place-items: center; color: inherit; }
.chip-x:active { background: var(--accent); color: var(--accent-fg); }
.summary { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 16px 0 18px; font-size: 14px; color: var(--muted); }

/* ---------- lista ---------- */
.list { padding-bottom: calc(var(--safe-b) + 32px); }
.list.has-rail .row { padding-right: 32px; }
.group { scroll-margin-top: calc(var(--sticky-h) + var(--safe-t)); }
.letter { position: sticky; top: calc(var(--sticky-h) + var(--safe-t)); z-index: 5; margin: 0; padding: 4px 18px 3px; background: var(--bg);
  font: 700 20px/1.2 var(--serif); color: var(--accent); }
.row { position: relative; display: flex; align-items: center; gap: 6px; padding: 0 14px 0 16px; }
.row::after { content: ""; position: absolute; left: 74px; right: 0; bottom: 0; height: 1px; background: var(--line); }
.rows .row:last-child::after { display: none; }
.row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 10px 0; border: 0; background: none; text-align: left; border-radius: 12px; }
.row-main:active .txt { opacity: .6; }
.txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.txt > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm { font-size: 17px; line-height: 1.25; }
.ln { font-weight: 650; } .fn { font-weight: 400; }
.sb { font-size: 14px; color: var(--muted); }
.pl { font-size: 13px; color: var(--faint); }
.row-call { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-strong); text-decoration: none; margin-left: 2px; }
.row-call:active { background: var(--accent); color: var(--accent-fg); }
.empty { padding: 56px 28px 40px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-ic { width: 68px; height: 68px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); display: grid; place-items: center; margin-bottom: 8px; }
.empty h2 { font: 600 22px/1.2 var(--serif); color: var(--ink); }
.empty p { max-width: 32ch; }
.empty .btn { margin-top: 14px; }
.firstsync { padding: 8px 18px 16px; color: var(--muted); }
.fs-title { font: 600 20px/1.2 var(--serif); color: var(--ink); margin-bottom: 4px; }
.row.skel { min-height: 72px; gap: 14px; }
.row.skel::after { display: none; }
.avatar.sk, .sk-line { background: var(--line); }
.sk-line { display: block; height: 12px; border-radius: 6px; }
.sk-line.w1 { width: 55%; height: 14px; margin-bottom: 8px; } .sk-line.w2 { width: 38%; }
@media (prefers-reduced-motion: no-preference) {
  .avatar.sk, .sk-line { animation: shimmer 1.4s ease-in-out infinite; }
  @keyframes shimmer { 50% { opacity: .5; } }
}

/* ---------- indeks alfabetu ---------- */
.rail { position: fixed; z-index: 15; right: max(0px, env(safe-area-inset-right)); top: calc(var(--sticky-h) + var(--safe-t) + 40px); bottom: calc(var(--safe-b) + 10px);
  width: 30px; padding-left: 8px; display: flex; flex-direction: column; touch-action: none; user-select: none; -webkit-user-select: none; }
.rl { flex: 1 1 0; min-height: 0; width: 100%; padding: 0; border: 0; background: none; font: 700 11px/1 var(--sans); color: var(--accent-strong); display: grid; place-items: center; }
.bubble { position: fixed; z-index: 16; left: 50%; top: 42%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 24px; background: var(--accent); color: var(--accent-fg);
  display: grid; place-items: center; font: 600 44px/1 var(--serif); pointer-events: none; opacity: 0; transition: opacity .12s; }
.bubble.show { opacity: .94; }

/* ---------- warstwy: arkusze i karta ---------- */
.layer { position: fixed; inset: 0; z-index: 50; }
.backdrop { position: absolute; inset: 0; background: var(--scrim); opacity: 0; touch-action: none; }
.sheet { position: absolute; left: 0; right: 0; bottom: 0; margin: 0 auto; max-width: 560px; max-height: 84vh; max-height: 84dvh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 24px 24px 0 0; box-shadow: var(--shadow); transform: translateY(100%); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 4px 22px; }
.sheet-head h2 { font: 600 22px/1.2 var(--serif); }
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 4px 12px calc(var(--safe-b) + 18px); }
.sheet-hint { padding: 0 10px 8px; color: var(--muted); font-size: 14px; }
.sheet-search { width: calc(100% - 20px); margin: 0 10px 8px; min-height: 48px; padding: 0 14px; border-radius: 13px; border: 1.5px solid var(--line); background: var(--bg); font-size: 16px; }
.sheet-search:focus { outline: none; border-color: var(--accent); }
.opt { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; padding: 0 10px 0 12px; border: 0; background: none; border-radius: 12px; text-align: left; font-size: 17px; }
.opt:active { background: var(--accent-soft); }
.opt.sel { background: var(--accent-soft); color: var(--accent-strong); font-weight: 650; }
.opt:disabled { color: var(--faint); opacity: .6; cursor: default; }
.opt-t { flex: 1; min-width: 0; }
.opt-n { color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.opt-c { width: 20px; display: grid; }
.opt-group { padding: 14px 12px 4px; font: 700 16px/1.2 var(--serif); color: var(--accent); }
.opt-empty { padding: 20px 12px; color: var(--muted); }

.menu .who { display: flex; align-items: center; gap: 14px; padding: 6px 10px 14px; }
.menu .who .avatar { flex: none; }
.who-t { min-width: 0; flex: 1 1 auto; }
.who-n { font: 600 21px/1.2 var(--serif); overflow-wrap: anywhere; hyphens: auto; }
.who-c { overflow-wrap: anywhere; }
.sheet-body { overflow-x: hidden; }
.who-c { color: var(--muted); font-size: 14px; }
.syncinfo { margin: 0 10px 10px; padding: 12px 14px; background: var(--bg); border-radius: 14px; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.offtag { color: var(--warn); font-weight: 600; margin-top: 4px; }
.menu-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 12px; border: 0; background: none; border-radius: 12px; font-size: 17px; text-align: left; }
.menu-item:active { background: var(--accent-soft); }
.menu-item.danger { color: var(--danger); }
.confirm-t { font: 600 21px/1.25 var(--serif); padding: 4px 10px 6px; }
.confirm-p { color: var(--muted); padding: 0 10px; }
.menu .btn { width: calc(100% - 20px); margin-left: 10px; margin-right: 10px; }
.menu .btn.ghost { margin-top: 10px; }

.detail-layer { background: var(--bg); }
.detail { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); transform: translateX(24px); opacity: 0; }
.dbar { position: sticky; top: 0; z-index: 2; padding: calc(var(--safe-t) + 6px) 8px 4px; background: var(--bg); }
.dcontent { max-width: 560px; margin: 0 auto; padding: 0 16px calc(var(--safe-b) + 32px); }
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4px 0 22px; }
.dname { font: 600 32px/1.12 var(--serif); letter-spacing: -.015em; margin-top: 16px; text-wrap: balance; overflow-wrap: anywhere; }
.dpos { font-size: 18px; margin-top: 6px; }
.ddep { color: var(--muted); margin-top: 1px; }
.dplace { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding: 6px 12px 6px 10px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-strong); font-size: 14px; font-weight: 550; max-width: 100%; }
.dplace span { overflow: hidden; text-overflow: ellipsis; }
.actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 10px; margin-bottom: 20px; }
.act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; min-height: 80px; padding: 12px 4px; border-radius: 18px; background: var(--surface);
  border: 1.5px solid var(--line); color: var(--accent-strong); text-decoration: none; font-size: 13px; font-weight: 650; }
.act:active { background: var(--accent-soft); }
button.act { font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
button.act:disabled { opacity: .6; }
.act.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.act.primary:active { background: var(--accent-strong); }
/* kafelek informacyjny (numer wewnętrzny): pasek na całą szerokość, przerywana ramka, bez reakcji na dotyk — nie jest przyciskiem */
.act.info { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; gap: 10px; min-height: 58px; padding: 10px 18px;
  background: transparent; border-style: dashed; border-color: var(--faint); color: var(--muted); cursor: default; user-select: text; -webkit-user-select: text; }
.act.info:active { background: transparent; }
.act.info span { font-weight: 550; font-size: 15px; }
.act.info strong { margin-left: auto; font-size: 24px; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; letter-spacing: .03em; overflow-wrap: anywhere; }
.fields { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.fields:empty { display: none; }
.field { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 10px 16px; border-bottom: 1px solid var(--line); text-decoration: none; }
.field:last-child { border-bottom: 0; }
.field.link:active { background: var(--accent-soft); }
.fld { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.field .k { font-size: 13px; color: var(--muted); }
.field .v { font-size: 18px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.field.link .v { color: var(--accent-strong); font-weight: 550; }
.field.note .v { white-space: pre-wrap; font-size: 16px; }
.fi { color: var(--accent-strong); display: grid; }

@media (prefers-reduced-motion: no-preference) {
  .backdrop { transition: opacity .22s ease; }
  .sheet { transition: transform .26s cubic-bezier(.2, .8, .2, 1); }
  .detail { transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .2s ease; }
}
.layer.open .backdrop { opacity: 1; }
.layer.open .sheet { transform: none; }
.layer.open .detail { transform: none; opacity: 1; }

@media (min-width: 760px) {
  .rail { right: calc(50% - 400px); }
  .sheet { bottom: 6vh; border-radius: 24px; }
}
@media (max-height: 560px) {
  .rl { font-size: 9px; }
}

/* =====================================================================
   Komunikator: dolna nawigacja, lista rozmów, czat
   ===================================================================== */
:root {
  --tab-h: 0px;
  --mine-b: #0e6b66; --mine-f: #ffffff;
  --adm-b: #fdf0d5; --adm-line: #ecd29a; --adm-ink: #4d3204;
}
@media (prefers-color-scheme: dark) {
  :root { --mine-b: #1d6b65; --mine-f: #effdfb; --adm-b: #3a2f14; --adm-line: #5c4a22; --adm-ink: #f6dca6; }
}

/* ---------- dolny pasek zakładek ---------- */
#app.with-tabs { --tab-h: calc(60px + var(--safe-b)); }
.m-tabbar { position: fixed; z-index: 26; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; gap: 8px;
  padding: 0 max(8px, env(safe-area-inset-right)) var(--safe-b) max(8px, env(safe-area-inset-left)); background: var(--surface); border-top: 1px solid var(--line); }
.m-tab[hidden] { display: none; }
.m-tab { flex: 1 1 0; max-width: 280px; min-height: 60px; padding: 0; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); font-size: 12.5px; font-weight: 600; }
.m-tab-ic { position: relative; width: 58px; height: 30px; border-radius: 15px; display: grid; place-items: center; }
.m-tab.on { color: var(--accent-strong); }
.m-tab.on .m-tab-ic { background: var(--accent-soft); }
.m-tab:active .m-tab-ic { background: var(--accent-soft); }
.m-tabbadge { position: absolute; top: -5px; right: 2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--accent); color: var(--accent-fg);
  font-size: 12px; font-weight: 700; line-height: 20px; text-align: center; box-shadow: 0 0 0 2px var(--surface); font-variant-numeric: tabular-nums; }
.with-tabs .list { padding-bottom: calc(var(--tab-h) + 32px); }
.with-tabs .rail { bottom: calc(var(--tab-h) + 10px); }

.m-view { display: none; }
.tab-msgs .shell, .tab-msgs .rail, .tab-msgs .bubble { display: none; }
.tab-msgs .m-view { display: block; }
.m-shell { max-width: 760px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; padding-bottom: calc(var(--tab-h) + 100px); }
.m-sub { gap: 6px; }
.m-banner { display: flex; align-items: center; gap: 10px; margin: 6px 16px 4px; padding: 10px 14px; border-radius: 12px; background: var(--warn-soft); color: var(--warn); font-size: 14px; font-weight: 600; }
.m-banner[hidden] { display: none; }
.m-list { padding-top: 4px; }

/* ---------- lista rozmów ---------- */
.m-row { position: relative; display: flex; align-items: center; gap: 6px; padding: 0 14px 0 16px; }
.m-row::after { content: ""; position: absolute; left: 74px; right: 0; bottom: 0; height: 1px; background: var(--line); }
.rows .m-row:last-child::after { display: none; }
.m-row-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 10px 0; border: 0; background: none; text-align: left; border-radius: 12px; }
.m-row-main:active .txt { opacity: .6; }
.m-row .sb { font-size: 14.5px; }
.m-row.unread .sb { color: var(--ink); font-weight: 600; }
.m-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 44px; }
.m-time { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.m-row.unread .m-time { color: var(--accent-strong); font-weight: 650; }
.m-unread { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center;
  font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.avatar.m-ann { background: var(--accent); color: var(--accent-fg); }
.avatar.sm { width: 40px; height: 40px; }
.m-rows-wrap { display: block; }
.m-empty { padding-top: 36px; }
.m-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 10px; margin-top: 14px; padding: 12px 14px; max-width: 360px; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-strong); font-size: 14px; text-align: left; }
.m-note p { flex: 1 1 200px; max-width: none; }
.m-fab { position: fixed; z-index: 24; right: max(16px, env(safe-area-inset-right)); bottom: calc(var(--tab-h) + 16px); min-height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 28px;
  background: var(--accent); color: var(--accent-fg); display: inline-flex; align-items: center; gap: 8px; font-weight: 650; font-size: 16px; box-shadow: 0 6px 20px rgba(8, 40, 40, .3); }
.m-fab:active { background: var(--accent-strong); }
.menu-state { margin-left: auto; color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  /* długie nazwy i duża czcionka: nazwa w jednej linii (zwykle), wartość („ustawiony”, „wersja 1.0.5”) w drugiej pod nazwą, a nie obok niej */
  .menu-item { flex-wrap: wrap; align-content: center; row-gap: 0; padding-top: 8px; padding-bottom: 8px; height: auto; font-size: 16.5px; line-height: 1.25; }
  .menu-item > span:not(.menu-state) { flex: 1 1 0; min-width: 0; }
  .menu-item .menu-state { flex: 1 1 100%; margin-left: 0; padding-left: 36px; font-size: 13.5px; }
}
.menu-item[aria-pressed="true"] .menu-state { color: var(--accent-strong); font-weight: 650; }
.m-langs .opt { min-height: 52px; }
.m-langs { margin: 10px 0 8px; }
.menu .err { padding: 0 10px; margin: 6px 0 0; }

/* wybór osoby */
.m-people { display: flex; flex-direction: column; }
.m-multi { max-height: 46vh; overflow-y: auto; margin: 8px 0; }
.m-pick { cursor: pointer; }
.m-pick[hidden] { display: none; }
.m-pick input[type=checkbox] { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }
.m-sel-count { margin: 4px 2px 10px; }
.room-title { margin-bottom: 8px; }
.m-room-new, .m-room { display: flex; flex-direction: column; gap: 6px; }
.m-room .btn, .m-room-new .btn { margin-top: 8px; }
.m-room-name { display: flex; align-items: center; gap: 8px; }
.m-room-name .sheet-search { flex: 1; min-width: 0; }
.m-members { list-style: none; margin: 4px 0 8px; padding: 0; max-height: 40vh; overflow-y: auto; }
.m-member { display: flex; align-items: center; gap: 12px; padding: 8px 4px; min-height: 56px; }
.m-member .txt { flex: 1; min-width: 0; }
.m-owner { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-strong); font-size: 12px; font-weight: 650; }
.linkbtn.danger, .btn.danger.ghost, .btn.ghost.danger { color: var(--danger); }
.m-person { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 64px; padding: 8px 10px; border: 0; background: none; border-radius: 12px; text-align: left; }
.m-person:active { background: var(--accent-soft); }
.m-person:disabled { opacity: .55; cursor: default; }
.m-person .avatar { width: 44px; height: 44px; font-size: 16px; }

/* ---------- powiadomienie (toast) ---------- */
.m-toasts { position: fixed; z-index: 70; left: 0; right: 0; top: calc(var(--safe-t) + 10px); display: flex; justify-content: center; padding: 0 12px; pointer-events: none; }
.m-toast { pointer-events: auto; display: flex; align-items: stretch; width: min(440px, 100%); background: var(--ink); color: var(--bg); border-radius: 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); opacity: 0; transform: translateY(-14px); }
.m-toast.open { opacity: 1; transform: none; }
.m-toast-b { flex: 1; min-width: 0; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 10px 6px 10px 14px; border: 0; background: none; color: inherit; text-align: left; }
.m-toast-ic { flex: none; display: grid; }
.m-toast-t { display: flex; flex-direction: column; min-width: 0; }
.m-toast-t strong { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-toast-t span { font-size: 14px; opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-toast-x { flex: none; width: 48px; border: 0; background: none; color: inherit; display: grid; place-items: center; opacity: .8; }

/* ---------- czat ---------- */
.chat-layer { background: var(--bg); }
.chat { position: absolute; left: 0; right: 0; top: var(--vvt, 0px); height: var(--vvh, 100%); max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; background: var(--bg); opacity: 0; transform: translateX(24px); }
.layer.open .chat { opacity: 1; transform: none; }
.pushwarn { display: flex; align-items: center; gap: 12px; margin: 4px 16px 8px; padding: 12px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); border: 1.5px solid var(--warn); font-size: 14px; line-height: 1.35; }
.pushwarn[hidden] { display: none; }
.pushwarn > .icon { flex: none; }
.pushwarn-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pushwarn-b strong { font-size: 15px; }
.pushwarn-e { color: var(--danger); font-weight: 600; }
.pushwarn .btn.slim { flex: none; min-height: 40px; font-size: 14px; padding: 0 14px; }
.notice.push-off { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--warn); font-weight: 600; }
.notice.push-off > .icon { flex: none; margin-top: 1px; }
.install { position: fixed; z-index: 60; top: calc(var(--safe-t) + 10px); left: 12px; right: 12px; max-width: 520px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 18px; background: var(--surface); border: 1.5px solid var(--line); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); }
.install-ic { width: 40px; height: 40px; flex: none; border-radius: 10px; }
.install-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; line-height: 1.3; color: var(--muted); }
.install-t strong { color: var(--ink); font-size: 15px; }
.install-act { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.install .btn.slim { min-height: 40px; font-size: 15px; padding: 0 16px; }
.c-head .c-delchat { margin-left: auto; flex: none; }
.c-head { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 6px) 14px 6px 6px; background: var(--surface); border-bottom: 1px solid var(--line); }
.c-av { flex: none; display: grid; }
.c-ht { flex: 1; min-width: 0; }
.c-title { font: 600 19px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c-sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .m-banner { margin: 0; border-radius: 0; flex: none; }
.c-main { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.c-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 8px 12px 14px; display: flex; flex-direction: column; }
.c-log::before { content: ""; margin-top: auto; }
.c-log:focus { outline: none; }
.c-log > * { flex: none; }
.c-state { margin: auto; padding: 32px 20px; text-align: center; color: var(--muted); }
.c-state .btn { margin-top: 14px; }
.c-older { display: flex; justify-content: center; padding: 4px 0 8px; }
.c-olderbtn { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--line); border-radius: 22px; background: var(--surface); color: var(--accent-strong); font-weight: 600; font-size: 14px; }
.c-olderbtn:disabled { opacity: .6; cursor: default; }
.c-day { display: flex; align-items: center; gap: 12px; margin: 14px 4px 6px; color: var(--muted); font-size: 13px; font-weight: 600; }
.c-day::before, .c-day::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.c-msg { display: flex; margin-top: 3px; }
.c-msg.first { margin-top: 11px; }
.c-msg.mine { justify-content: flex-end; }
.c-bub { position: relative; max-width: min(84%, 520px); padding: 8px 13px 6px; border-radius: 18px; -webkit-touch-callout: none; }
.theirs .c-bub { background: var(--surface); border: 1px solid var(--line); }
.theirs.first .c-bub { border-top-left-radius: 6px; }
.mine .c-bub { background: var(--mine-b); color: var(--mine-f); }
.mine.first .c-bub { border-top-right-radius: 6px; }
.c-msg.admin .c-bub { background: var(--adm-b); border: 1px solid var(--adm-line); color: var(--adm-ink); }
.c-sender { margin: 0 0 2px; display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; line-height: 1.3; }
.c-sender.adm { color: var(--adm-ink); }
.sn0 { color: var(--av0f); } .sn1 { color: var(--av1f); } .sn2 { color: var(--av2f); } .sn3 { color: var(--av3f); }
.sn4 { color: var(--av4f); } .sn5 { color: var(--av5f); } .sn6 { color: var(--av6f); } .sn7 { color: var(--av7f); }
.c-text { margin: 0; font-size: 16.5px; line-height: 1.38; white-space: pre-wrap; overflow-wrap: anywhere; }
.c-text.dim { opacity: .55; }
.c-text.is-orig { font-family: var(--serif); padding-left: 10px; border-left: 2px solid var(--accent); }
.c-del { font-style: italic; color: var(--faint); }
.mine .c-del { color: inherit; opacity: .8; }
.c-strip { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.admin .c-strip { border-top-color: var(--adm-line); color: inherit; }
.c-strip .icon { opacity: .85; }
.c-strip.failed { color: var(--danger); }
.c-strip-t { min-width: 0; }
.c-link { position: relative; margin-left: auto; padding: 0 2px; border: 0; background: none; color: var(--accent-strong); font-size: 12.5px; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.c-strip.failed .c-link { margin-left: 0; }
.admin .c-link { color: inherit; }
.c-link::after, .c-more::after { content: ""; position: absolute; inset: -14px -6px; }
.c-spin { flex: none; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); }
.c-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; min-height: 16px; font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.admin .c-meta { color: inherit; opacity: .75; }
.mine .c-meta { color: var(--mine-f); opacity: .82; }
.c-more { position: relative; width: 20px; height: 16px; padding: 0; border: 0; background: none; color: inherit; display: grid; place-items: center; }
.c-msg.sending .c-bub { opacity: .72; }
.c-msg.failed .c-bub { background: var(--danger-soft); border: 1px solid var(--danger); color: var(--ink); }
.c-msg.failed .c-meta { justify-content: flex-start; color: var(--danger); opacity: 1; font-size: 12.5px; }
.c-msg.sending .c-meta { opacity: .9; gap: 5px; }
.c-fail { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; }
.c-msg.failed .c-link { margin-left: 0; color: var(--ink); }
.c-newbtn { position: absolute; z-index: 3; left: 50%; bottom: 12px; transform: translateX(-50%); min-height: 44px; padding: 0 18px 0 14px; border: 0; border-radius: 22px; background: var(--accent); color: var(--accent-fg);
  display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 650; white-space: nowrap; box-shadow: 0 6px 18px rgba(8, 40, 40, .3); }
.c-newbtn[hidden] { display: none; }

.c-compose { flex: none; padding: 8px 10px calc(var(--safe-b) + 8px); background: var(--surface); border-top: 1px solid var(--line); }
.chat.kbd .c-compose { padding-bottom: 8px; }
.c-form { display: flex; align-items: flex-end; gap: 8px; }
.c-form[hidden], .c-readonly[hidden], .c-offnote[hidden] { display: none; }
.c-field { flex: 1; min-width: 0; }
.c-tools { flex: none; display: flex; align-items: center; gap: 0; }
.c-tool { width: 44px; height: 48px; border: 0; background: none; border-radius: 12px; display: grid; place-items: center; color: var(--muted); }
.c-tool:active, .c-tool[aria-expanded="true"] { background: var(--accent-soft); color: var(--accent-strong); }
.c-pending { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; padding: 8px 10px; border-radius: 14px; background: var(--accent-soft); }
.c-pending[hidden], .c-emoji[hidden] { display: none; }
.c-pending-img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: none; }
.c-pending-ic { width: 56px; height: 56px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--surface); color: var(--accent-strong); }
.c-pending-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 13px; color: var(--muted); }
.c-pending-t strong { color: var(--ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-atterr:empty { display: none; }
.c-atterr { margin: 0 0 8px; }
.c-emoji { max-height: 220px; overflow-y: auto; margin: 0 0 8px; padding: 6px 8px; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
/* GIF-y z biblioteki administratora */
.c-gif-t { font-weight: 800; font-size: 13px; letter-spacing: .3px; border: 2px solid currentColor; border-radius: 6px; padding: 0 4px; line-height: 18px; }
.gif-panel { max-height: 240px; overflow-y: auto; }
.gif-say { margin: 10px 6px; color: var(--muted); font-size: 14px; }
.gif-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.gif-b { padding: 0; border: 0; background: var(--line); border-radius: 10px; overflow: hidden; aspect-ratio: 1; display: block; }
.gif-b:active { outline: 3px solid var(--accent); }
.gif-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.emoji-h { margin: 6px 4px 2px; font-size: 12px; font-weight: 650; color: var(--muted); }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
.emoji-b { height: 40px; border: 0; background: none; border-radius: 10px; font-size: 24px; line-height: 1; }
.emoji-b:active { background: var(--accent-soft); }
.c-msg.system { justify-content: center; align-self: center; max-width: 92%; margin: 6px 0; text-align: center; }
.c-sys { margin: 0; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.att-img { display: block; position: relative; padding: 0; border: 0; background: var(--accent-soft); border-radius: 12px; overflow: hidden; max-width: 260px; min-width: 120px; min-height: 90px; margin: 0 0 4px; }
.att-img-el { display: block; width: 100%; height: auto; max-height: 320px; object-fit: cover; }
.att-img.failed { min-height: 90px; outline: 2px dashed var(--danger); }
.att-file { display: flex; align-items: center; gap: 10px; width: 100%; max-width: 280px; padding: 8px 10px; margin: 0 0 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-align: left; }
.att-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-name { font-size: 14px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-size { font-size: 12px; color: var(--muted); }
.viewer-layer { z-index: 55; background: rgba(0, 0, 0, .92); }
.viewer { position: absolute; inset: 0; display: flex; flex-direction: column; color: #fff; }
.viewer-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: calc(var(--safe-t) + 6px) 8px 6px; }
.viewer-bar .iconbtn { color: #fff; }
.viewer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.viewer-body { flex: 1; min-height: 0; display: grid; place-items: center; padding: 8px 8px calc(var(--safe-b) + 8px); overflow: auto; }
.viewer-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.c-count { display: block; padding: 0 8px 3px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.c-count:empty { display: none; }
.c-count.over { color: var(--danger); font-weight: 700; }
.c-input { display: block; width: 100%; min-height: 48px; max-height: 40vh; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: 24px; background: var(--bg);
  font: inherit; font-size: 16.5px; line-height: 22px; resize: none; overflow-y: auto; }
/* wąski ekran (telefon): pole wiadomości na całą szerokość, przyciski (emotikony, załącznik, ważne) i „Wyślij” w osobnym wierszu pod nim */
@media (max-width: 640px) {
  .c-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; }
  .c-form .c-field { grid-column: 1 / -1; grid-row: 1; }
  .c-form .c-tools { grid-column: 1; grid-row: 2; }
  .c-form .c-send { grid-column: 2; grid-row: 2; }
  .c-input { min-height: 56px; padding: 14px 18px; border-radius: 22px; }
  .c-tool { height: 44px; }
}
.c-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.c-send { flex: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--accent); color: var(--accent-fg); display: grid; place-items: center; }
.c-send:active { background: var(--accent-strong); }
.c-send:disabled { background: var(--line); color: var(--faint); cursor: default; }
.c-offnote { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0 6px 8px; font-size: 13.5px; color: var(--warn); font-weight: 600; }
.c-offnote.gone { display: none; }
.c-readonly { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 10px; color: var(--muted); font-size: 15px; }

@media (prefers-reduced-motion: no-preference) {
  .chat { transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .2s ease; }
  .m-toast { transition: transform .22s cubic-bezier(.2, .8, .2, 1), opacity .18s ease; }
  .c-spin { animation: spin .9s linear infinite; }
  @keyframes spin { to { transform: rotate(360deg); } }
}
@media (min-width: 760px) {
  .m-fab { right: calc(50% - 364px); }
}

/* ---------- alarmy ---------- */
.alarm-ov { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; overflow-y: auto;
  padding: calc(var(--safe-t) + 16px) 20px calc(var(--safe-b) + 16px); background: #a4160f; color: #fff; animation: al-flash 1s steps(1, end) infinite; }
.alarm-ov.test { background: #7a5110; animation: none; }
@keyframes al-flash { 0% { background: #a4160f; } 50% { background: #d4281f; } }
@media (prefers-reduced-motion: reduce) { .alarm-ov { animation: none; } }
.alarm-open { overflow: hidden; }
.al-box { width: 100%; max-width: 520px; text-align: center; }
.al-ic svg { width: 64px; height: 64px; }
.al-title { margin: 8px 0 14px; font: 800 38px/1.1 var(--sans); letter-spacing: .04em; }
.al-text { margin: 0 0 12px; font: 700 26px/1.3 var(--sans); overflow-wrap: anywhere; white-space: pre-wrap; }
.al-tr { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .16); font-size: 20px; line-height: 1.35; overflow-wrap: anywhere; white-space: pre-wrap; }
.al-meta { margin: 0 0 22px; font-size: 15px; opacity: .9; }
.al-ack { display: block; width: 100%; min-height: 72px; border: 0; border-radius: 18px; background: #fff; color: #a4160f; font: 800 24px/1 var(--sans); letter-spacing: .03em; }
.al-ack:disabled { opacity: .6; }
.alarm-ov .err { color: #fff; font-weight: 650; background: rgba(0, 0, 0, .25); padding: 8px 10px; border-radius: 10px; }
.al-ta { display: block; width: calc(100% - 20px); margin: 8px 10px 0; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 17px/1.35 var(--sans); resize: vertical; }
.al-count { margin: 2px 14px 10px; text-align: right; font-size: 13px; color: var(--faint); }
.al-lbl { display: block; margin: 6px 14px 4px; font-size: 14px; color: var(--muted); }
.al-sel { display: block; width: calc(100% - 20px); margin: 0 10px; min-height: 48px; padding: 0 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); font: 17px var(--sans); }
.al-check { display: flex; align-items: center; gap: 10px; margin: 12px 14px 0; min-height: 44px; font-size: 16px; }
.al-check input { width: 22px; height: 22px; }
.al-quote { margin: 4px 10px 10px; padding: 12px; border-left: 4px solid var(--danger); background: var(--danger-soft); border-radius: 8px; color: var(--ink); font-size: 18px; overflow-wrap: anywhere; white-space: pre-wrap; }
.al-prog { margin: 0 10px 10px; font: 650 18px var(--sans); }
.al-list { margin: 0 10px 10px; }
.al-h { margin: 8px 0 4px; font-size: 14px; color: var(--muted); }
.al-list ul { margin: 0; padding-left: 20px; }
.al-row { height: auto; padding-top: 10px; padding-bottom: 10px; }
.al-row-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-hint { margin: 0 0 14px; padding: 8px 10px; border-radius: 10px; background: rgba(0, 0, 0, .3); font-size: 16px; font-weight: 650; }

/* ---------- narzędzia: lista telefonów i wysyłka masowa ---------- */
.tl-hidden { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.tl-bar { display: flex; align-items: center; gap: 4px; }
.tl-title { flex: 1; min-width: 0; margin: 0; font: 600 22px/1.2 var(--serif); }
.tl-body { max-width: 640px; margin: 0 auto; padding: 4px 16px calc(var(--safe-b) + 32px); }
.pl-layer .tl-body { max-width: 1180px; }
.tl-tools { display: flex; gap: 10px; margin: 4px 0 8px; }
.tl-search, .tl-input { display: block; width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink); font: 16px var(--sans); }
.tl-search:focus, .tl-input:focus { outline: none; border-color: var(--accent); }
textarea.tl-input { padding: 10px 14px; }
.tl-meta { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.tl-lead { margin: 4px 0 12px; color: var(--muted); }
.tl-h { margin: 18px 0 6px; font: 700 16px/1.2 var(--serif); color: var(--accent); }
.tl-h-lg { margin-top: 6px; font-size: 24px; color: var(--ink); }
.tl-empty { margin: 14px 0; color: var(--muted); }
.tl-list { display: flex; flex-direction: column; }
.tl-body .btn { margin-top: 10px; }
.tl-body .btn.slim { margin-top: 0; }
.tl-body .al-lbl { margin: 12px 2px 4px; }
.tl-body .al-check { margin: 12px 2px 4px; }

/* lista telefonów: tabela jak w firmowym Address Book (komputer), karty pogrupowane działami (telefon) */
.pl-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--ink); font-size: 15px; }
.pl-table th, .pl-table td { border: 1px solid var(--ink); padding: 6px 10px; text-align: left; vertical-align: middle; }
.pl-table thead th { background: var(--accent-soft); color: var(--accent-strong); text-align: center; }
.pl-table .pl-dep { font-weight: 500; background: var(--surface); width: 14%; }
.pl-table .pl-name { font-weight: 650; }
.pl-table td a { color: var(--accent-strong); }
.pl-land { display: block; }
.pl-grp-h { display: none; }
.mm-pick { margin-top: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); max-height: 52vh; max-height: 52dvh; overflow-y: auto; overscroll-behavior: contain; }
.mm-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 56px; border-bottom: 1px solid var(--line); cursor: pointer; }
.mm-row:last-child { border-bottom: 0; }
.mm-row input { flex: none; width: 22px; height: 22px; }
.mm-who { display: flex; flex-direction: column; min-width: 0; }
.mm-n { font-weight: 600; overflow-wrap: anywhere; }
.mm-s { font-size: 13.5px; color: var(--muted); }
.mm-e { font-size: 13.5px; color: var(--accent-strong); overflow-wrap: anywhere; }
.mm-filters { display: grid; gap: 10px; margin-top: 12px; }
.mm-bulk { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.mm-count { margin: 10px 2px 0; font-weight: 650; }
.mm-actions { position: sticky; bottom: 0; padding: 6px 0 calc(var(--safe-b) + 4px); background: var(--bg); }
.mm-out .btn, .mm-part { text-align: center; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.mm-members { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.mm-members li { display: flex; flex-direction: column; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.mm-members li:last-child { border-bottom: 0; }
.mm-members li.mm-no .mm-n, .mm-members li.mm-no .mm-e { color: var(--faint); }
.mm-grp-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (min-width: 760px) {
  .mm-pick { max-height: 46vh; }
}
@media (max-width: 759px) {
  .pl-table, .pl-table tbody, .pl-table tr, .pl-table td { display: block; width: 100%; }
  .pl-table { border: 0; background: none; }
  .pl-table thead, .pl-table .pl-dep { display: none; }
  .pl-table caption { display: none; }
  .pl-grp-h { display: block; }
  .pl-table .pl-grp-h th { display: block; border: 0; padding: 16px 2px 6px; font: 700 16px/1.2 var(--serif); color: var(--accent); background: none; text-align: left; }
  .pl-table tr.pl-row { margin-bottom: 8px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
  .pl-table td { border: 0; padding: 1px 0; }
  .pl-table td:empty { display: none; }
  .pl-table td[data-label="Użytkownik"] { font-size: 17px; }
  .pl-table td[data-label="Stanowisko"] { color: var(--muted); font-size: 14px; }
  .pl-table td[data-label="GSM"]::before, .pl-table td[data-label="Wewn."]::before, .pl-table td[data-label="E-mail"]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 13px; }
  .pl-table td[data-label="GSM"] { margin-top: 4px; }
  .pl-land { display: inline; margin-left: 8px; }
  .pl-table td a { text-decoration: none; font-weight: 600; }
}
@media print {
  #app, .layer:not(.pl-layer), .alarm-ov, .tl-bar .iconbtn, .tl-tools { display: none !important; }
  .layer.pl-layer { position: static; background: #fff; }
  .layer.pl-layer .detail { position: static; overflow: visible; transform: none; opacity: 1; background: #fff; }
  .pl-layer .dbar { position: static; padding: 0; }
  .pl-layer .tl-body { max-width: none; padding: 0; }
  .pl-table { font-size: 11px; color: #000; }
  .pl-table th, .pl-table td { padding: 3px 6px; }
  .pl-table thead th { background: #dbe4f3; color: #000; }
  .pl-table td a { color: #000; text-decoration: none; }
  .pl-table tr { break-inside: avoid; }
  body::before { display: none; }
}

/* PIN: zwykłe pole tekstowe z klawiaturą numeryczną, maskowane stylem — przeglądarka nie traktuje go jak hasła (bez okienka podpowiedzi haseł) */
.pin-input { -webkit-text-security: disc; text-security: disc; }

/* przełącznik widoku książki: pracownicy / ważne kontakty */
.kindbar { display: flex; gap: 6px; margin: 8px 0 2px; padding: 3px; background: var(--accent-soft); border-radius: 12px; }
.kindbar[hidden] { display: none; }
.kindbar .kind { flex: 1; min-height: 40px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--accent-strong); font-size: 15px; font-weight: 600; }
.kindbar .kind.on { background: var(--surface); box-shadow: 0 1px 3px rgba(8, 28, 32, .18); }
.tl-tools .tl-kind { flex: none; width: auto; max-width: 46%; }

/* przełącznik języka obok profilu */
.topbtns { flex: none; display: flex; align-items: center; gap: 8px; }
.langbtn { display: inline-flex; align-items: center; gap: 5px; height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--accent-strong); font-size: 14px; font-weight: 650; letter-spacing: .03em; }
.langbtn:active { background: var(--accent-soft); }
.auth-lang { position: absolute; top: calc(var(--safe-t) + 12px); right: 16px; }
.auth { position: relative; }

/* ukryty uczestnik pokoju */
.m-hide { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: 17px; background: var(--surface); color: var(--muted); font-size: 13.5px; font-weight: 600; flex: none; }
.m-hide.on { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.m-incog { background: var(--warn-soft); color: var(--warn); }
.c-incog { gap: 10px; flex-wrap: wrap; }
.c-incog .linkbtn { margin-left: auto; }

.mail-results { display: inline-flex; align-items: center; gap: 5px; }
.summary .mail-results { margin-left: auto; }

/* dodawanie i edycja kontaktów z aplikacji */
.book-fab { position: fixed; z-index: 24; right: max(16px, env(safe-area-inset-right)); bottom: calc(var(--safe-b) + 20px); min-height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 28px;
  display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-fg); font-size: 16px; font-weight: 650; box-shadow: 0 6px 20px rgba(8, 28, 32, .3); }
.book-fab:active { background: var(--accent-strong); }
.book-fab[hidden] { display: none; }
#app.with-tabs .book-fab { bottom: calc(var(--tab-h) + 16px); }
.tab-msgs .book-fab { display: none; }
@media (min-width: 760px) { .book-fab { right: calc(50% - 364px); } }
.dbar-row { display: flex; align-items: center; justify-content: space-between; }
.ce-body { padding-bottom: calc(var(--safe-b) + 40px); }
.ce-field { margin: 0 0 6px; }
.ce-field[hidden] { display: none; }
.ce-note { min-height: 80px; padding: 10px 14px; resize: vertical; }
.ce-kind { margin: 8px 0 10px; }
.ce-groups { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); max-height: 40vh; overflow-y: auto; }
.ce-group { display: flex; align-items: center; gap: 12px; padding: 10px 14px; min-height: 50px; border-bottom: 1px solid var(--line); }
.ce-group:last-child { border-bottom: 0; }
.ce-group input { width: 22px; height: 22px; flex: none; }

/* wybór odbiorców wysyłki masowej: lista osób zajmuje całą wolną wysokość ekranu */
.mm-layer .detail { display: flex; flex-direction: column; }
.mm-layer .tl-body.mm-flex { flex: 1; min-height: 0; width: 100%; max-width: 980px; display: flex; flex-direction: column; padding-bottom: calc(var(--safe-b) + 12px); }
.mm-flex .mm-title { margin: 0 0 4px; font-size: 20px; }
.mm-flex .mm-filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.mm-flex .mm-filters > * { min-width: 0; }
.mm-flex .mm-filters .mm-wide { grid-column: 1 / -1; }
.mm-flex .tl-input { min-height: 44px; }
.mm-flex .mm-bulkrow { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.mm-flex .mm-bulkrow .btn { width: auto; min-height: 38px; padding: 0 14px; font-size: 14px; margin-top: 0; }
.mm-flex .mm-count-inline { margin: 0 0 0 auto; font-size: 14px; }
.mm-flex .mm-pick { flex: 1 1 auto; min-height: 200px; max-height: none; margin-top: 8px; }
.mm-flex .mm-actions { position: static; display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0 0; background: none; }
.mm-flex .mm-actions .btn { flex: 1 1 150px; width: auto; min-height: 48px; margin-top: 0; }
.mm-flex .mm-out { margin-top: 8px; }
@media (min-width: 760px) {
  .mm-flex .mm-filters { grid-template-columns: 1.4fr 1.6fr 1fr 1fr; }
  .mm-flex .mm-filters .mm-wide { grid-column: auto; }
}

.al-steps { margin: 4px 10px 10px; padding-left: 22px; color: var(--muted); font-size: 15px; } .al-steps li { margin-bottom: 6px; }
.al-warn { background: var(--warn-soft); color: var(--warn); }
.al-ok { background: var(--accent-soft); color: var(--accent-strong); }
.tl-body .al-hint { margin: 0 0 10px; padding: 10px 12px; border-radius: 12px; font-size: 15px; font-weight: 600; }

/* baner „Dostępna nowa wersja aplikacji” (aplikacja Android) */
.updatebar { display: flex; align-items: center; gap: 12px; margin: 4px 16px 8px; padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-strong); border: 1.5px solid var(--accent); font-size: 14px; line-height: 1.35; }
.updatebar[hidden] { display: none; }
.updatebar > .icon { flex: none; }
.updatebar .pushwarn-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.updatebar .pushwarn-b strong { font-size: 15px; }
.updatebar .btn.slim { flex: none; min-height: 40px; font-size: 14px; padding: 0 14px; }

/* tablica ogłoszeń: karty na całą szerokość pod nagłówkami dni */
.c-board .c-msg, .c-board .c-msg.mine { justify-content: stretch; margin-top: 8px; }
.c-board .c-bub { max-width: none; width: 100%; border-radius: 14px; }
.c-board .c-msg.mine .c-bub, .c-board .c-msg.theirs .c-bub { background: var(--surface); border: 1px solid var(--line); color: var(--ink); }
.c-board .c-msg.admin .c-bub { background: var(--adm-b); border: 1px solid var(--adm-line); color: var(--adm-ink); }
.c-board .c-day { position: sticky; top: 0; z-index: 2; margin: 16px 0 4px; padding: 6px 4px; background: var(--bg); font-size: 14px; }
.c-trash { color: var(--danger); }
.c-kind { font-family: var(--sans, inherit); font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--muted); vertical-align: 2px; }
.c-ht-btn { cursor: pointer; }
.c-ht-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* nowe, nieprzeczytane ogłoszenie: czerwone kółko z megafonem miga, aż ogłoszenie zostanie przeczytane */
.avatar.m-ann.m-ann-new { background: #d92d20; color: #fff; animation: ann-blink 1s ease-in-out infinite; }
@keyframes ann-blink { 0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(217, 45, 32, .55); } 50% { opacity: .55; box-shadow: 0 0 0 8px rgba(217, 45, 32, 0); } }
@media (prefers-reduced-motion: reduce) { .avatar.m-ann.m-ann-new { animation: none; } }

/* dolny pasek: zakładka z nieprzeczytanymi wiadomościami (Wiadomości, Pokoje) na czerwono, ikona delikatnie pulsuje */
.m-tab.m-tab-new, .m-tab.m-tab-new[aria-current="page"] { color: #d92d20; }
.m-tab.m-tab-new .m-tab-ic { animation: tab-pulse 1.2s ease-in-out infinite; }
@keyframes tab-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .m-tab.m-tab-new .m-tab-ic { animation: none; } }

.m-grpbtn { margin: 2px 0 16px; }      /* odstęp od pola „Szukaj” w oknie nowej rozmowy */
.m-grpbtn { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; }
/* dolny pasek: zakładka z nieprzeczytanymi — czerwona „pastylka” z białą ikoną (widoczna w jasnym i ciemnym motywie) */
.m-tab.m-tab-new .m-tab-ic, .m-tab.m-tab-new.on .m-tab-ic { background: #d92d20; color: #fff; }
.m-tab.m-tab-new .m-tab-t { color: #d92d20; }
@media (prefers-color-scheme: dark) { .m-tab.m-tab-new .m-tab-t { color: #ff7a70; } }
.m-tab.m-tab-new .m-tabbadge { background: #fff; color: #d92d20; box-shadow: 0 0 0 2px #d92d20; }
.ok-note { color: var(--accent-strong); font-weight: 600; margin: 10px 0; }
.c-deptbar { padding: 8px 14px 4px; border-bottom: 1px solid var(--line); background: var(--surface); }
.c-head .c-deptann { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }      /* komputer: przycisk obok tytułu, po prawej */
@media (max-width: 640px) {      /* telefon: przycisk w osobnym rzędzie pod nagłówkiem, na całą szerokość */
  .c-head:has(.c-deptann) { flex-wrap: wrap; }
  .c-head .c-deptann { order: 9; flex: 1 1 100%; justify-content: center; margin: 4px 0 2px 8px; }
}

/* lista telefonów: wybór działów */
.tl-tools-dep { position: relative; margin-top: 0; }
.tl-tools-dep .icon { position: absolute; right: 14px; top: 15px; pointer-events: none; color: var(--muted); }
.tl-depbtn { text-align: left; cursor: pointer; padding-right: 40px; }
.pl-depacts { display: flex; gap: 18px; margin: 0 2px 6px; }
.pl-deplist { display: flex; flex-direction: column; }
.pl-depopt { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
.pl-depopt input { width: 22px; height: 22px; flex: none; }
.pl-depname { flex: 1; min-width: 0; }
.pl-depcount { color: var(--muted); font-size: 14px; }

/* wiadomość oznaczona jako ważna (ogłoszenia i pokoje) */
.c-tool.c-imp.on { background: var(--danger-soft); color: var(--danger); }
.c-imp-flag { display: flex; align-items: center; gap: 4px; margin: 0 0 4px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--danger); }
.c-msg.important .c-bub { border: 1px solid var(--danger); }

/* inwentaryzacja wyposażenia pokoi hotelowych (zakładka „Wyposażenie”) */
.inv-wrap { padding: 4px 0 24px; }
.inv-head { position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 8px 0 10px; }
.inv-search { display: block; width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 13px; background: var(--surface); color: var(--ink); font: inherit; font-size: 17px; }
.inv-chips { display: flex; gap: 8px; margin-top: 10px; }
.inv-chip { min-height: 38px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 19px; background: var(--surface); color: var(--muted); font: inherit; font-weight: 600; }
.inv-chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-strong); }
.inv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.inv-room { display: grid; grid-template-columns: minmax(64px, auto) 1fr auto; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 8px 14px; border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; }
.inv-room:active { background: var(--accent-soft); }
.inv-no { font-size: 22px; font-weight: 700; }
.inv-lab { color: var(--muted); font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-state { display: inline-flex; align-items: center; gap: 4px; min-width: 52px; justify-content: flex-end; font-weight: 700; color: var(--warn); }
.inv-room.done { border-color: var(--ok); }
.inv-room.done .inv-state { color: var(--ok); }
.inv-body { display: grid; gap: 14px; padding-bottom: 28px; }
.inv-sub { margin: 0; color: var(--muted); }
.inv-sum { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 700; color: var(--warn); }
.inv-sum.done { color: var(--ok); }
.inv-card { display: grid; gap: 10px; padding: 14px; border: 1.5px solid var(--line); border-radius: 16px; background: var(--surface); }
.inv-card.is-missing { opacity: .8; border-style: dashed; }
.inv-h { margin: 0; font-size: 19px; }
.inv-lbl { display: grid; gap: 6px; font-weight: 600; }
.inv-photo { display: grid; gap: 10px; }
.inv-thumb { width: 100%; max-height: 260px; object-fit: contain; border-radius: 12px; background: var(--accent-soft); }
.inv-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.inv-btn { display: inline-flex; align-items: center; gap: 8px; width: auto; min-height: 46px; margin: 0; padding: 0 14px; }
.inv-btn.primary { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
.inv-miss { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 600; }
.inv-miss input { width: 22px; height: 22px; }
.inv-by { margin: 0; min-height: 20px; color: var(--faint); font-size: 14px; }
.inv-status.bad { color: var(--danger); font-weight: 700; }

/* nieprzeczytane przy czacie: zielone kółko z liczbą, większe i pulsujące, żeby rzucało się w oczy */
.m-unread { min-width: 26px; height: 26px; padding: 0 8px; border-radius: 13px; font-size: 14px; animation: unread-blink 1.1s ease-in-out infinite; }
@keyframes unread-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 55%, transparent); }
  50% { opacity: .55; box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent) 0%, transparent); }
}
@media (prefers-reduced-motion: reduce) { .m-unread { animation: none; } }

/* inwentaryzacja: wybór ilości (kropki jak w polu wyboru) i bloki sztuk */
.inv-qrow { display: grid; gap: 6px; }
.inv-ql { font-weight: 600; }
.inv-qty { display: flex; flex-wrap: nowrap; gap: 6px; }
.inv-opt { flex: 1 1 0; min-width: 0; justify-content: center; display: inline-flex; align-items: center; gap: 6px; min-height: 46px; padding: 0 8px; border: 1.5px solid var(--line); border-radius: 23px; background: var(--surface); font-weight: 600; cursor: pointer; }
.inv-opt.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-strong); }
.inv-opt input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent); }
.inv-unit { display: grid; gap: 10px; padding-top: 12px; border-top: 1px dashed var(--line); }
.inv-uh { margin: 0; font-size: 16px; color: var(--muted); }

.menu-ver { margin: 16px 0 6px; text-align: center; color: var(--faint); font-size: 13px; }

/* ---------- ekran startowy S-Book (splash.js; animowane logo z pakietu graficznego) ---------- */
#splash { position: fixed; inset: 0; z-index: 2147483000; display: grid; place-items: center; background: #F4F8FF; transition: opacity .4s ease; cursor: default; }
@media (prefers-color-scheme: dark) { #splash { background: #061B43; } }
#splash picture, #splash img { display: block; }
#splash img { width: min(640px, 92vw, 70vh); height: auto; }
#splash.is-out { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { #splash { transition: none; } }
