/* Jasny, ciepły wygląd: krem, brąz i złoty akcent, nagłówki szeryfowe. */
:root {
  --bg: #faf6ef; --card: #ffffff; --text: #2b2118; --muted: #7d6e5c; --line: #eadfcb;
  --accent: #8a6a43; --accent-dark: #6d5230; --accent-soft: #f4ead7; --gold: #c9a227;
  --ok: #2f7d4f; --ok-soft: #e8f5ed; --hot: #fff3d6; --danger: #a83225;
  --shadow: 0 1px 2px rgba(70, 45, 10, .06), 0 8px 24px rgba(70, 45, 10, .06);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
html { color-scheme: light; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; min-width: 0; }
.err { color: var(--danger); font-weight: 600; }

/* nagłówki sekcji, jak "TRANSMISJA NA ŻYWO" ze złotą kreską */
.h-sec { font-family: var(--serif); text-transform: uppercase; letter-spacing: .06em; font-size: 15px; font-weight: 700;
  border-left: 4px solid var(--gold); padding-left: 10px; margin: 26px 0 12px; display: flex; align-items: center; gap: 8px; }
.h-sec .count { background: var(--accent-soft); color: var(--accent-dark); border-radius: 999px; padding: 1px 9px; font-size: 12px; letter-spacing: 0; }
.h-sheet { font-family: var(--serif); font-size: 22px; margin: 0; }

/* górny pasek */
header { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(253, 250, 245, .96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line); }
.logo { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--accent-dark); letter-spacing: .02em; }
.logo svg { width: 22px; height: 22px; fill: var(--accent); }
.me-btn { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 4px 12px 4px 4px; font-size: 14px; color: var(--text); font-weight: 600; cursor: pointer; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex-shrink: 0; }
main { padding: 6px 14px 24px; max-width: 640px; margin: 0 auto; }

/* dolna nawigacja */
nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; background: rgba(255, 255, 255, .97);
  border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
nav button { flex: 1; border: 0; background: none; padding: 9px 2px 8px; font-size: 12px; color: var(--muted); font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; cursor: pointer; }
nav button.on { color: var(--accent-dark); }
nav button.on::before { content: ""; position: absolute; top: 0; left: 22%; right: 22%; height: 3px; background: var(--gold); border-radius: 0 0 3px 3px; }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.badge { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--ok); color: #fff; font-size: 11px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px; padding: 0 5px; display: flex; align-items: center; justify-content: center; }

/* karty */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 10px 0; box-shadow: var(--shadow); }
.card.soft { background: var(--accent-soft); box-shadow: none; }
.card.okc { background: var(--ok-soft); border-color: #bfe0cb; box-shadow: none; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* godzina */
.t { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: #fff; border-radius: 10px;
  padding: 3px 11px; font-family: var(--serif); font-weight: 700; font-size: 18px; font-variant-numeric: tabular-nums; line-height: 1.3; }
.t.ghost { background: var(--accent-soft); color: var(--accent-dark); }
.t.ok { background: var(--ok); }
.t.big { font-size: 46px; padding: 4px 20px; border-radius: 16px; line-height: 1.2; }
.t.mid { font-size: 22px; padding: 4px 14px; }

/* najbliższa msza */
.hero { background: linear-gradient(160deg, #ffffff 0%, #f7eedd 100%); border: 1px solid var(--line); border-top: 4px solid var(--gold);
  border-radius: 18px; padding: 18px 18px 16px; margin: 12px 0; box-shadow: var(--shadow); text-align: center; }
.hero .when { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-dark); font-weight: 700; }
.hero .dname { font-family: var(--serif); font-size: 22px; font-weight: 700; margin: 4px 0 2px; }
.hero .t { margin: 10px 0 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 6px 0 2px; }
.chip { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); }
.chip.wait { background: var(--hot); color: #7a5a00; }
.chip.done { background: var(--ok-soft); color: var(--ok); }

.rowcard { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 12px; margin: 8px 0; box-shadow: var(--shadow); }
.rowcard .d { font-weight: 700; }
.rowcard .t { font-size: 17px; }

/* ogłoszenia o zamianie */
.offer { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin: 12px 0; box-shadow: var(--shadow); }
.offer.canbe { border-color: #9fd2b2; box-shadow: 0 0 0 3px var(--ok-soft), var(--shadow); }
.offer.mine { border-style: dashed; border-color: var(--accent); }
.offer-head { display: flex; align-items: center; gap: 10px; }
.offer-name { font-weight: 500; }
.offer-date { font-family: var(--serif); font-weight: 700; color: var(--accent-dark); text-align: right; font-size: 15px; }
.swapline { display: flex; align-items: flex-end; justify-content: center; gap: 14px; margin: 14px 0 10px; padding: 12px 8px;
  background: var(--accent-soft); border-radius: 12px; }
.swapline > div { text-align: center; }
.lbl { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 4px; }
.arr { font-size: 22px; color: var(--accent); padding-bottom: 4px; }
.you { font-size: 14px; margin-top: 8px; }
.you.ok { background: var(--ok-soft); border-radius: 12px; padding: 10px 12px; }
.you.ok div.small { color: #3b6b4d; }
.you .btn { white-space: nowrap; flex-shrink: 0; }
.swapline .t.ghost { background: #fff; border: 1.5px solid var(--accent); }
.beforeafter { display: flex; align-items: flex-end; justify-content: center; gap: 16px; margin: 16px 0; }
.beforeafter > div { text-align: center; }

/* przyciski */
.btn { border: 0; background: var(--accent); color: #fff; font-weight: 700; font-size: 16px; padding: 13px 16px; min-height: 46px;
  border-radius: 12px; width: 100%; margin-top: 10px; cursor: pointer; }
.btn.ok { background: var(--ok); }
.btn.small { width: auto; padding: 9px 14px; font-size: 14px; min-height: 40px; margin-top: 0; }
.btn.tiny { width: auto; padding: 6px 10px; font-size: 12px; min-height: 32px; margin-top: 0; border-radius: 9px; }
.btn.ghost { background: transparent; color: var(--accent-dark); border: 1.5px solid var(--accent); }
.btn.danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); }
.btn:active { opacity: .75; transform: scale(.99); }
.rowcard .btn, .offer .btn.inline { margin-top: 0; }
.link { border: 0; background: none; color: var(--accent-dark); font-size: inherit; font-weight: 600; padding: 0 2px; cursor: pointer; text-decoration: underline; }

/* formularze */
label { display: block; font-size: 13px; color: var(--muted); font-weight: 600; margin: 12px 0 0; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 12px; font-size: 16px;
  border: 1.5px solid var(--line); border-radius: 10px; background: #fffdf9; color: var(--text); font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.mini { width: auto; margin: 0; padding: 6px 8px; font-size: 14px; }
textarea { resize: vertical; }

/* logowanie */
.auth, .center { max-width: 420px; margin: 0 auto; padding: calc(36px + env(safe-area-inset-top)) 20px 20px; }
.center { text-align: center; }
.auth .crest { width: 54px; height: 54px; margin: 0 auto 8px; display: block; fill: var(--accent); }
.auth h1 { font-family: var(--serif); font-size: 30px; text-align: center; margin: 0; color: var(--accent-dark); }
.auth .tag { text-align: center; margin: 4px 0 8px; }
.authbox { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 6px 18px 18px; box-shadow: var(--shadow); margin-top: 16px; }
.seg { display: flex; margin: 16px 0 4px; border: 1.5px solid var(--accent); border-radius: 12px; overflow: hidden; }
.seg button { flex: 1; border: 0; background: none; color: var(--accent-dark); font-weight: 700; padding: 11px; font-size: 15px; cursor: pointer; }
.seg button.on { background: var(--accent); color: #fff; }

/* rozwijane sekcje admina */
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin: 10px 0; box-shadow: var(--shadow); }
summary { padding: 14px; font-weight: 700; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; float: right; color: var(--muted); }
details[open] > summary::after { content: "−"; }
.detin { padding: 0 14px 14px; }
.item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.code { white-space: nowrap; letter-spacing: .5px; }
.names { margin-top: 8px; line-height: 1.7; }
.names .me { font-weight: 700; color: var(--accent-dark); background: var(--accent-soft); border-radius: 6px; padding: 0 5px; }

/* okno od dołu */
.overlay { position: fixed; inset: 0; z-index: 20; background: rgba(43, 33, 24, .5); display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--bg); width: 100%; max-width: 640px; max-height: 90vh; overflow-y: auto; border-radius: 22px 22px 0 0;
  padding: 18px 16px calc(22px + env(safe-area-inset-bottom)); border-top: 4px solid var(--gold); }
/* nagłówek okna z przyciskiem × zawsze widoczny, także po przewinięciu w dół */
.sheet-head { position: sticky; top: -18px; z-index: 3; background: var(--bg); margin: -18px -16px 8px; padding: 18px 16px 10px; }
.sheet { max-height: 90dvh; }
.sheet .x { border: 0; background: var(--card); border-radius: 50%; width: 34px; height: 34px; font-size: 18px; color: var(--muted); cursor: pointer; border: 1px solid var(--line); }
.opt { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; margin: 8px 0; }
.opt .names { margin: 2px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.steps { counter-reset: s; }
.step { display: flex; gap: 10px; margin: 8px 0; font-size: 14px; }
.step::before { counter-increment: s; content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #fff; font-weight: 700;
  font-size: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.bigok { width: 64px; height: 64px; border-radius: 50%; background: var(--ok); color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; margin: 6px auto 10px; }

.offline { position: sticky; top: 0; z-index: 6; background: #7a2c20; color: #fff; text-align: center; font-size: 13px; padding: 6px 10px; }
#toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); z-index: 30;
  background: #2b2118; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; max-width: 90vw;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Kto służy */
.dchips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; margin: 0 -14px; padding-left: 14px; padding-right: 14px;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.dchips::-webkit-scrollbar { display: none; }
.dchip { flex: 0 0 auto; scroll-snap-align: start; width: 62px; border: 1.5px solid var(--line); background: var(--card); color: var(--text);
  border-radius: 14px; padding: 8px 0 7px; display: flex; flex-direction: column; align-items: center; line-height: 1.15; font: inherit; cursor: pointer; }
.dchip .dw { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.dchip .dn { font-family: var(--serif); font-size: 24px; font-weight: 700; }
.dchip .dm { font-size: 12px; color: var(--muted); }
.dchip.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: var(--shadow); }
.dchip.on .dw, .dchip.on .dm { color: #f4ead7; }
.whotitle { margin: 10px 0 4px; font-size: 16px; }
.mytime { margin: 4px 0 12px; font-size: 14px; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.mytime .t { font-size: 17px; padding: 2px 10px; }
.whocard { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 10px 0; box-shadow: var(--shadow); }
.whocard.mine { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok), var(--shadow); }
.whohead { display: flex; align-items: center; gap: 12px; padding-bottom: 10px; margin-bottom: 8px; border-bottom: 1px dashed var(--line); }
.glabel { font-family: var(--serif); font-weight: 700; font-size: 16px; color: var(--accent-dark); }
.namegrid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.nm { font-size: 15px; padding: 4px 6px; border-radius: 8px; overflow-wrap: anywhere; }
.nm.me { font-weight: 700; background: var(--ok-soft); color: var(--ok); }
.nm.sw { color: var(--accent-dark); }
.swi { font-style: normal; font-weight: 700; color: var(--gold); margin-left: 4px; }

/* liderzy: pogrubione imiona */
.pn.lead, .nm.lead, .offer-name.lead { font-weight: 800; }
.nm.me:not(.lead) { font-weight: 500; }
.names .pn.lead { color: var(--text); }

/* ===== etap 1: panel admina, numery, dyżury ===== */
.btn[disabled] { opacity: .45; pointer-events: none; }
.subnav { margin: 4px 0 14px; overflow-x: auto; }
.subnav button { white-space: nowrap; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 6px 0 12px; }
.stats > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; }
.stats b { display: block; font-family: var(--serif); font-size: 24px; line-height: 1.1; }
.stats span { font-size: 11.5px; color: var(--muted); }
.stats .warn { background: var(--hot); border-color: #f0d68c; }
.warn { color: #8a5a00; font-weight: 600; }
.toolbar { display: flex; gap: 8px; align-items: center; }
.toolbar .search { flex: 1; margin: 0; }
.fchips { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0 8px; scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.fchip { flex: 0 0 auto; border: 1.5px solid var(--line); background: var(--card); color: var(--text); border-radius: 999px;
  padding: 5px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.fchip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.plist { display: flex; flex-direction: column; gap: 6px; }
.prow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 10px 12px; font: inherit; color: var(--text); cursor: pointer; }
.prow:active { background: var(--accent-soft); }
.prow .pname { display: block; font-weight: 600; }
.prow .pname.lead { font-weight: 800; }
.prow .meta { display: block; margin-top: 1px; }
.prow .chev { color: var(--muted); font-size: 22px; }
.nbadge { flex: 0 0 auto; min-width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #fff; display: flex;
  align-items: center; justify-content: center; font-family: var(--serif); font-weight: 700; font-size: 18px; padding: 0 6px; }
.nbadge.none { background: var(--hot); color: #8a5a00; }
.helpbox { background: var(--accent-soft); border-radius: 12px; padding: 10px 12px; margin-top: 12px; line-height: 1.55; }
.sheet.wide { max-width: 720px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lbl2 { font-weight: 600; font-size: 14px; margin: 16px 0 6px; }
.dgrid { display: grid; grid-template-columns: 70px repeat(6, 1fr); gap: 4px; align-items: center; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.dgrid .dh { text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.dgrid .dl { font-size: 13px; font-weight: 600; }
.cb { display: flex; justify-content: center; margin: 0; cursor: pointer; }
.cb input { position: absolute; opacity: 0; pointer-events: none; }
.cb i { width: 34px; height: 34px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); display: flex;
  align-items: center; justify-content: center; font-style: normal; }
.cb input:checked + i { background: var(--accent); border-color: var(--accent); }
.cb input:checked + i::after { content: "✓"; color: #fff; font-weight: 800; }
.radios { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; margin: 8px 2px 0; }
.radios label, .flag { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.flags { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 16px 0 6px; }
.flag { align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 14px; }
.flag input { width: 18px; height: 18px; margin-top: 1px; flex-shrink: 0; }
.flag small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
form.inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
form.inline label { flex: 1; min-width: 160px; }
.nlist { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.nrow { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; }
.nrow.np { background: var(--accent-soft); }
.nrow input { width: 72px; margin: 0; text-align: center; font-weight: 700; font-size: 17px; padding: 8px 6px; }
.nrow .lead { font-weight: 800; }
input.bad { border-color: var(--danger) !important; background: #fdecea !important; }

/* kafelki ministranta */
.tiles { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; margin: 10px 0 4px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); }
.tile.hot { background: var(--hot); border-color: #f0d68c; }
.tile .lbl { display: block; }
.tile b { display: block; font-family: var(--serif); font-size: 19px; }
.tile .bignum { font-size: 34px; line-height: 1.1; }
.tile small { display: block; color: var(--muted); font-size: 12.5px; margin-bottom: 2px; }
.lk { font-size: 10px; font-weight: 800; color: var(--gold); margin-left: 2px; }

/* wybór kilku godzin */
button.opt.pick { width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
button.opt.pick .names { display: block; }
button.opt.pick.on { border-color: var(--ok); box-shadow: 0 0 0 2px var(--ok-soft); background: #fbfffc; }
.tick { width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; flex-shrink: 0; }
button.opt.pick.on .tick { background: var(--ok); border-color: var(--ok); }

/* druk listy numerów */
.printarea h2 { font-family: var(--serif); font-size: 20px; }
.pgrid { columns: 2; column-gap: 28px; font-size: 15px; }
.pgrid div { break-inside: avoid; padding: 3px 0; border-bottom: 1px dotted var(--line); }
.pgrid b { display: inline-block; min-width: 34px; }
@media print {
  body { padding: 0; background: #fff; }
  body * { visibility: hidden; }
  .printarea, .printarea * { visibility: visible; }
  .printarea { position: absolute; left: 0; top: 0; width: 100%; padding: 10mm; color: #000; }
  .overlay { background: none; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .flags { grid-template-columns: 1fr; }
  .dgrid { grid-template-columns: 58px repeat(6, 1fr); }
  .cb i { width: 30px; height: 30px; }
}
.flag input, .radios input { display: inline-block; width: auto; margin: 0; padding: 0; box-shadow: none; }
.flag span { color: var(--text); }

/* ===== etap 2: kalendarz ===== */
.svc { border-top: 1px dashed var(--line); padding: 9px 0; }
.svc .row { justify-content: flex-start; flex-wrap: wrap; gap: 6px; }
.devform { border-bottom: 1px solid var(--line); padding: 10px 0 12px; }
.pickbox { max-height: 240px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; padding: 6px 10px; margin-top: 8px; background: var(--card); }
.pickbox label { display: flex; gap: 8px; align-items: center; color: var(--text); font-weight: 500; margin: 6px 0; }
.pickbox input, .radios input[type=checkbox] { width: auto; display: inline-block; margin: 0; }
.dlist { padding: 6px 14px; }
.drow { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.drow:last-child { border-bottom: 0; }
.drow .dd { width: 92px; flex-shrink: 0; display: flex; flex-direction: column; }

/* ===== etap 3: tablet w zakrystii ===== */
.tb { max-width: 1180px; margin: 0 auto; padding: 18px 20px 24px; min-height: 100vh; min-height: var(--app-h, 100vh); display: flex; flex-direction: column; }
/* tryb tabletu: klasa ustawiana w app.js (starszy WebView na tablecie nie zna :has) */
html.tb-mode { overscroll-behavior: none; }
/* tablet: bez zaznaczania tekstu i menu przytrzymania (stamtąd dało się wyjść przez "Wyszukaj w Google") */
.tb, .tb * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.tb input, .tb textarea { -webkit-user-select: text; user-select: text; }
html.tb-mode body { padding-bottom: 0; }
.tb-top { display: flex; justify-content: space-between; align-items: center; }
.tb-date { font-family: var(--serif); font-size: 28px; font-weight: 700; color: var(--accent-dark); }
.tb-clock { font-family: var(--serif); font-size: clamp(52px, 8vh, 64px); line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* dwukropek podniesiony do środka cyfr, płynnie przygasa i wraca (cykl 1,2 s) */
.tb-colon { position: relative; top: -0.08em; animation: tbColon 1.2s ease-out infinite; }
@keyframes tbColon { 0% { opacity: 1; } 50% { opacity: .5; } 100% { opacity: 1; } }
.tb-h { font-size: 20px; font-weight: 700; margin: 26px 0 12px; }
.tb-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tb-part { position: relative; text-align: left; background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 22px 18px;
  font: inherit; color: var(--text); cursor: pointer; display: flex; flex-direction: column; gap: 6px; min-height: 110px; box-shadow: var(--shadow); }
.tb-part b { font-size: 22px; font-family: var(--serif); }
.tb-part .small { color: var(--muted); }
.tb-part.sug { border-color: var(--gold); box-shadow: 0 0 0 3px #f3e3b0, var(--shadow); }
.tb-now { position: absolute; top: -11px; right: 14px; background: var(--gold); color: #fff; font-size: 12px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .06em; padding: 3px 10px; border-radius: 999px; }
.tb-foot { margin-top: auto; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.tb-ok { color: var(--ok); font-weight: 600; }
.tb-wait { color: #8a5a00; font-weight: 700; }
.tb-err { color: var(--danger); font-weight: 700; }
.tb-menu { border: 1px solid var(--line); background: var(--card); border-radius: 12px; width: 48px; height: 40px; font-size: 22px; color: var(--muted); cursor: pointer; }
.tb-bar { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.tb-bar b { font-family: var(--serif); font-size: 22px; }
.tb-count { min-width: 48px; height: 48px; border-radius: 14px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 24px; font-weight: 700; }
.tb-cols { display: grid; grid-template-columns: minmax(320px, 430px) 1fr; gap: 22px; margin-top: 16px; flex: 1; }
.tb-display { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 10px 16px; text-align: center; }
.tb-num { font-family: var(--serif); font-size: 64px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.tb-prev { font-size: 19px; min-height: 28px; }
.tb-msg { min-height: 26px; margin: 8px 2px; font-weight: 600; font-size: 16px; }
.tb-msg.ok { color: var(--ok); }
.tb-msg.err { color: var(--danger); }
.tb-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tb-key { height: 72px; border-radius: 16px; border: 1px solid var(--line); background: var(--card); font-size: 32px; font-weight: 700; color: var(--text);
  cursor: pointer; box-shadow: var(--shadow); font-family: inherit; }
.tb-key:active { background: var(--accent-soft); transform: scale(.98); }
.tb-key.fn { font-size: 24px; color: var(--muted); background: var(--bg); }
.tb-opts { display: flex; gap: 10px; margin-top: 12px; }
.tb-opt { flex: 1; min-height: 72px; border: 0; border-radius: 16px; background: var(--ok); color: #fff; font-size: 19px; font-weight: 800; cursor: pointer; padding: 8px; }
.tb-opt.alt { background: var(--accent); }
.tb-opt.ghost { background: transparent; color: var(--accent-dark); border: 2px solid var(--accent); }
.tb-opt:active { opacity: .8; }
.tb-swaphead { background: var(--hot); border-radius: 12px; padding: 10px 14px; margin-bottom: 10px; font-size: 17px; }
.tb-right { display: flex; flex-direction: column; min-height: 0; }
.tb-entries { flex: 1; overflow-y: auto; max-height: calc(100vh - 230px); display: flex; flex-direction: column; gap: 8px; }
.tb-row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; }
.tb-row b { font-size: 17px; }
.tb-x { border: 0; background: var(--bg); color: var(--danger); width: 40px; height: 40px; border-radius: 12px; font-size: 24px; cursor: pointer; }
.tb-submit { min-height: 64px; font-size: 19px; margin-top: 12px; }
.tb-pin { align-items: stretch; }
.tb-dots { display: flex; gap: 18px; justify-content: center; margin: 30px 0 10px; }
.tb-dots span { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--accent); }
.tb-dots span.on { background: var(--accent); }
.tb-pinpad { max-width: 380px; width: 100%; margin: 10px auto 0; }
/* ekran PIN-u: klawiatura wypełnia wolne miejsce pod kropkami (poziomo i pionowo) */
.tb.tb-pin { height: 100vh; height: var(--app-h, 100vh); min-height: 0; overflow: hidden; padding-top: 12px; padding-bottom: 16px; }
.tb-pin > p { margin: 6px 0 0; }
.tb-pin .tb-dots { margin: clamp(10px, 2.5vh, 30px) 0 4px; }
.tb-pin .tb-pinpad { flex: 1; min-height: 0; max-width: 640px; max-height: 760px; display: flex; flex-direction: column; margin: 4px auto 0; }
.tb-pin .tb-keys { flex: 1; min-height: 0; grid-template-rows: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tb-pin .tb-key { height: auto; min-height: 52px; font-size: clamp(30px, 6vh, 52px); }
@media (orientation: portrait) { .tb-pin .tb-pinpad { max-width: 100%; max-height: none; margin-bottom: 8px; } }
.tb-done { align-items: center; justify-content: center; text-align: center; font-size: 18px; }
.tb-done .bigok { width: 96px; height: 96px; font-size: 52px; }
/* Ekran wpisywania: zawsze mieści się w ekranie (poziomo i pionowo), przyciski skalują się do wysokości */
.tb.tb-list { height: 100vh; height: var(--app-h, 100dvh); min-height: 0; overflow: hidden; padding-top: 12px; padding-bottom: 12px; }
/* poziomo: klawiatura po lewej na całą wysokość (przypięta), lista po prawej przewija się,
   na dole w jednym rzędzie "Dodaj" i "Zatwierdź listę" */
.tb-list .tb-cols { min-height: 0; margin-top: 12px; grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "left right" "act submit"; row-gap: 12px; }
.tb-list .tb-left { grid-area: left; }
.tb-list .tb-right { grid-area: right; }
.tb-list .tb-act { grid-area: act; }
.tb-list .tb-submit { grid-area: submit; margin-top: 0; }
.tb-list .tb-act .tb-opts { margin-top: 0; height: 100%; }
.tb-list .tb-keys { flex: 1; min-height: 0; grid-template-rows: repeat(4, minmax(0, 1fr)); }
.tb-list .tb-key { height: auto; min-height: 44px; font-size: clamp(28px, 5.5vh, 44px); }
.tb-list .tb-left { display: flex; flex-direction: column; min-height: 0; }
.tb-list .tb-right { min-height: 0; }
.tb-list .tb-entries { max-height: none; min-height: 0; }
.tb-list .tb-display { padding: 4px 16px; }
.tb-list .tb-msg { margin: 4px 2px; }
.tb-key { height: clamp(46px, 8.5vh, 72px); font-size: clamp(24px, 4.2vh, 32px); }
.tb-num { font-size: clamp(38px, 7vh, 64px); }
.tb-opt { min-height: clamp(50px, 8.5vh, 72px); }
.tb-submit { min-height: clamp(50px, 8.5vh, 72px); }
@media (max-width: 760px), (orientation: portrait) {
  .tb-cols { grid-template-columns: 1fr; }
  /* pionowo: klawiatura, "Dodaj", lista (przewija się), "Zatwierdź" */
  .tb-list .tb-cols { grid-template-rows: auto auto minmax(0, 1fr) auto; grid-template-areas: "left" "act" "right" "submit"; }
  .tb-list .tb-keys { flex: none; grid-template-rows: none; }
  .tb-list .tb-key { height: clamp(46px, 8.5vh, 72px); font-size: clamp(24px, 4.2vh, 32px); }
}
.bigpin { font-family: var(--serif); font-size: 54px; font-weight: 700; letter-spacing: .12em; text-align: center; margin: 14px 0;
  background: var(--accent-soft); border-radius: 16px; padding: 10px; }

/* ===== etap 4: punkty ===== */
.prow.rk { gap: 10px; }
.rkn { width: 26px; text-align: right; font-weight: 700; color: var(--muted); flex-shrink: 0; }
.pts { font-family: var(--serif); font-size: 22px; font-weight: 700; color: var(--ok); min-width: 44px; text-align: right; }
.pts.neg { color: var(--danger); }
.pts.small { font-size: 16px; min-width: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.ptag { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--accent-soft); color: var(--accent-dark); }
.ptag.bad { background: #fdecea; color: var(--danger); }
.pday { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; margin: 8px 0; }
.pdh { display: flex; justify-content: space-between; align-items: center; padding-bottom: 4px; border-bottom: 1px dashed var(--line); }
.pit { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 14px; }
.pit .pv { font-weight: 700; min-width: 30px; text-align: right; color: var(--ok); }
.pit.nieobecny .pv { color: var(--danger); }
.pit.czeka .pv, .pit.brak-listy .pv, .pit.uspraw .pv, .pit.zamiana .pv { color: var(--muted); }
.pit .link { font-size: 12px; }
.rkrow { display: flex; gap: 10px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.rkrow:last-child { border-bottom: 0; }
.rkrow.me { background: var(--ok-soft); border-radius: 8px; font-weight: 700; }
.pcard { display: flex; align-items: center; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; }
.pcard .lbl { display: block; }
.pcard b { font-family: var(--serif); font-size: 26px; }
.pickbox.tall { max-height: 52vh; }
.rkgap { text-align: center; color: var(--muted); padding: 2px 0; }

/* ===== odświeżony wygląd: prostszy start, punkty, animacje ===== */
:root { --radius: 18px; }
body { -webkit-font-smoothing: antialiased; }
main { padding-top: 10px; }
.card, .hero, .rowcard, .offer, .whocard, details, .tile, .prow { border-radius: var(--radius); }
button, .btn, .fchip, .prow, .tb-key, .tb-opt, .tb-part { transition: transform .12s ease, background-color .2s, box-shadow .2s, opacity .2s; }
button:active { transform: scale(.97); }
.h-sec { font-size: 13px; letter-spacing: .08em; margin: 22px 2px 10px; color: var(--accent-dark); }

/* wejście widoku i okna */
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes sheetUp { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
.enter { animation: fadeUp .24s ease-out both; }
.overlay.enter { animation: fadeIn .2s ease-out both; }
.overlay.enter .sheet { animation: sheetUp .28s cubic-bezier(.2, .8, .2, 1) both; }
@media (prefers-reduced-motion: reduce) { .enter, .overlay.enter, .overlay.enter .sheet { animation: none; } }

/* start */
.hello { font-family: var(--serif); font-size: 26px; font-weight: 700; margin: 6px 2px 12px; color: var(--accent-dark); }
.stats3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats3 > * { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 12px; text-align: left; font: inherit; color: var(--text);
  display: flex; flex-direction: column; min-height: 78px; box-shadow: var(--shadow); }
.stats3 button { cursor: pointer; }
.stats3 span { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 700; }
.stats3 b { font-family: var(--serif); font-size: 28px; line-height: 1.15; }
.stats3 b.sm { font-size: 17px; margin-top: 4px; }
.stats3 small { font-size: 11.5px; color: var(--muted); }
.stats3 .neg b { color: var(--danger); }
.swapbar { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 12px; padding: 14px 16px; border-radius: 16px;
  border: 0; font: inherit; cursor: pointer; text-align: left; }
.swapbar.ok { background: var(--ok); color: #fff; box-shadow: 0 6px 18px rgba(47, 125, 79, .25); }
.hero { padding: 20px 18px 18px; }
.hchips { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 12px 0 4px; align-items: center; }
.hchips .t.big { font-size: 40px; }
.hbtn { margin-top: 14px !important; }
.card.list { padding: 4px 14px; }
.urow { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.urow:last-child { border-bottom: 0; }
.dpill { width: 46px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; background: var(--accent-soft); border-radius: 12px; padding: 4px 0; }
.dpill small { font-size: 10.5px; text-transform: uppercase; color: var(--muted); font-weight: 700; letter-spacing: .05em; }
.dpill b { font-family: var(--serif); font-size: 20px; line-height: 1.1; }
.uchips { display: flex; flex-wrap: wrap; gap: 6px; }
.uchips .t { font-size: 15px; padding: 2px 9px; }
.iconbtn { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--accent); background: transparent; color: var(--accent-dark); font-size: 18px; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.empty { text-align: center; color: var(--muted); padding: 22px 12px; background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); }

/* punkty ministranta */
.bigpts { text-align: center; background: linear-gradient(160deg, #fff 0%, #f7eedd 100%); border: 1px solid var(--line); border-top: 4px solid var(--gold);
  border-radius: 22px; padding: 22px 16px 18px; box-shadow: var(--shadow); margin-top: 8px; }
.bp-n { font-family: var(--serif); font-size: 72px; font-weight: 700; line-height: 1; color: var(--ok); }
.bigpts.low .bp-n { color: #a07800; }
.bigpts.neg .bp-n { color: var(--danger); }
.bp-l { color: var(--muted); font-weight: 600; margin-top: 4px; }
.bp-y { margin-top: 12px; display: inline-block; background: var(--accent-soft); border-radius: 999px; padding: 5px 14px; font-size: 14px; }
.fchips.center { justify-content: center; }
.nabbar { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-top: 10px; font-weight: 600; }
.nabbar .dots { flex: 1; display: flex; gap: 6px; }
.nabbar .dots i { width: 22px; height: 8px; border-radius: 4px; background: var(--line); }
.nabbar .dots i.on { background: var(--ok); }
.nabbar.bad { border-color: #f1b8b0; background: #fdf3f1; }
.ent { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ent:last-of-type { border-bottom: 0; }
.eic { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0;
  background: var(--ok-soft); color: var(--ok); }
.ent.nieobecny .eic { background: #fdecea; color: var(--danger); }
.ent.uspraw .eic, .ent.zamiana .eic { background: #e8f0fb; color: #2f5d9a; }
.ent.czeka .eic, .ent.brak-listy .eic { background: var(--bg); color: var(--muted); }
.et { display: block; font-weight: 600; }
.es { display: block; font-size: 12.5px; color: var(--muted); }
.ev { font-family: var(--serif); font-weight: 700; font-size: 19px; color: var(--ok); min-width: 36px; text-align: right; }
.ent.nieobecny .ev { color: var(--danger); }
.more { display: block; margin: 8px auto 6px; }

/* tabela punktacji */
.ytwrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); -webkit-overflow-scrolling: touch; }
.yt { border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 100%; }
.yt th { background: #6e2c48; color: #fff; font-weight: 700; padding: 8px 6px; position: sticky; top: 0; white-space: nowrap; cursor: default; }
.yt th[data-action] { cursor: pointer; text-decoration: underline dotted; }
.yt td { padding: 6px; border-bottom: 1px solid var(--line); border-right: 1px solid #f1e8d8; text-align: center; white-space: nowrap; }
.yt td.pnm, .yt th.pnm { text-align: left; position: sticky; left: 0; z-index: 1; min-width: 132px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
.yt td.pnm { background: #f4efe6; font-weight: 600; }
.yt th.pnm { z-index: 2; }
.yt td.lp { color: var(--muted); font-weight: 700; }
.yt td.nn { background: #e3f1e3; } .yt td.nu { background: #e3f1e3; }
.yt td.pur { background: #6f3f9e !important; color: #fff; font-weight: 700; }
.yt td.neg { background: #e0261b; color: #fff; font-weight: 700; }
.yt td.low { background: #f5e33a; font-weight: 700; }
.yt td.np { background: #1d1d1d; }
.yt td.sum { font-weight: 800; }
.yt td[data-action] { cursor: pointer; }
.yt tr.me td { box-shadow: inset 0 2px 0 var(--ok), inset 0 -2px 0 var(--ok); }
.yt tr.me td.pnm { background: var(--ok-soft); }
.ytlegend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 8px 2px 0; color: var(--muted); }
.ytlegend span { display: flex; align-items: center; gap: 5px; }
.ytlegend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.ytlegend i.neg { background: #e0261b; } .ytlegend i.low { background: #f5e33a; } .ytlegend i.np { background: #1d1d1d; } .ytlegend i.pur { background: #6f3f9e; }
.small-seg button { font-size: 14px; padding: 9px 6px; }

/* nawigacja dolna: większe pole dotyku */
nav button { padding: 10px 2px 9px; }
nav button.on .ic { transform: translateY(-1px); }

/* ===== wersja 12 ===== */
/* kafelki na Starcie: każdy wyraźnie inny */
.stats3 { gap: 10px; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.stats3 > * { align-items: center; text-align: center; justify-content: center; border: 0; padding: 12px 6px; min-height: 92px; }
.stats3 > .s-num { background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(110, 80, 40, .25); }
.stats3 > .s-num span, .stats3 > .s-num small { color: #f1e3c8; }
.stats3 > .s-pts { background: var(--ok-soft); box-shadow: 0 0 0 1.5px #bfe0cb inset, var(--shadow); }
.stats3 > .s-pts b { color: var(--ok); }
.stats3 > .s-pts.neg { background: #fdecea; box-shadow: 0 0 0 1.5px #f1b8b0 inset; }
.stats3 > .s-pts.neg b { color: var(--danger); }
.stats3 > .s-duty { background: var(--accent-soft); box-shadow: 0 0 0 1.5px var(--line) inset; }
.stats3 b { font-size: 32px; }
.stats3 b.sm { font-size: 16px; line-height: 1.25; margin-top: 6px; }
.stats3 span { font-size: 10.5px; }
/* odstęp między godziną a opisem w wierszach */
.urow .grow > .small { margin-left: 8px; }
.urow .grow { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 0; }
/* Kto służy: mniej tekstu, wiceliderzy lekko pogrubieni */
.whohead { gap: 10px; }
.whohead .glabel { flex: 1; font-size: 15px; }
.whotitle { margin: 4px 2px 0; }
.pn.vice, .nm.vice, .offer-name.vice { font-weight: 600; }
.nm.me.vice { font-weight: 600; }
.pn.lead, .nm.lead, .offer-name.lead, .wholegend .lead { font-weight: 900; }
.wholegend { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--muted); margin: 10px 4px 0; }
.wholegend .vice { font-weight: 600; color: var(--text); }
.wholegend .lead { color: var(--text); }
.dchip { width: 64px; }

/* ===== wersja 13 ===== */
/* nagłówek: dzwonek informacji */
header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.hdr-r { display: flex; align-items: center; gap: 8px; }
.bell { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); font-size: 18px; cursor: pointer; }
.bdot { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; padding: 0 4px; }
/* informacje na Starcie */
.newsstrip { display: block; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer; margin: 6px 0 4px;
  background: linear-gradient(135deg, #fff8e8, #fdf1d6); border: 1px solid #ecd9a8; border-radius: 16px; padding: 10px 14px; box-shadow: var(--shadow); }
.ns-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: #8a6400; }
.ns-more { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 600; }
.nbadge2 { background: var(--danger); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; letter-spacing: 0; text-transform: none; }
.ns-item { display: block; font-size: 14.5px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ns-item.new::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-right: 6px; vertical-align: 1px; }
.news-add { width: 100%; margin: 6px 0 4px; padding: 10px; border-radius: 14px; border: 1.5px dashed #d9c08a; background: transparent; color: #8a6400; font: inherit; font-weight: 700; cursor: pointer; }
.news { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 10px 0; }
.news.pin { border-color: #e2c77d; background: #fffaf0; }
.nt { display: block; font-size: 16px; margin-bottom: 4px; }
.nx { white-space: normal; line-height: 1.5; }
.nx.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nm-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.pinic { margin-right: 4px; }
.newsform { background: var(--accent-soft); border-radius: 14px; padding: 4px 12px 12px; margin: 8px 0 14px; }
/* baner wysuwany z góry */
.topbanner { position: fixed; left: 50%; top: 10px; transform: translate(-50%, -140%); z-index: 100; width: min(92vw, 520px); text-align: left; border: 0; cursor: pointer;
  background: var(--accent-dark); color: #fff; border-radius: 16px; padding: 12px 16px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font: inherit;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1); display: flex; flex-direction: column; gap: 2px; }
.topbanner.show { transform: translate(-50%, 0); }
.topbanner span { font-size: 14px; opacity: .9; }
/* Start */
.hello { display: flex; flex-direction: column; gap: 2px; }
.hello small { font-family: inherit; font-size: 14px; font-weight: 500; color: var(--muted); }
.hero { position: relative; }
.hero .dname { font-size: 22px; }
.dpill small + b + small { font-size: 9.5px; }
/* rozpiska tygodniowa */
.dchip.week .dn .ic { width: 22px; height: 22px; }
.wkday { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 10px 14px; margin: 10px 0; box-shadow: var(--shadow); }
.wkday.mine { border-color: var(--ok); box-shadow: 0 0 0 1.5px var(--ok-soft), var(--shadow); }
.wkday.today { border-top: 3px solid var(--gold); }
.wkh { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.wkh b { font-family: var(--serif); font-size: 18px; flex: 1; }
.wkrow { display: flex; gap: 10px; align-items: flex-start; padding: 6px 0; border-top: 1px dashed var(--line); }
.wkl { display: flex; flex-direction: column; gap: 3px; width: 64px; flex-shrink: 0; }
.wkl .t { font-size: 13px; padding: 1px 6px; text-align: center; }
.wkrow .namegrid { flex: 1; margin: 0; }
.only { color: var(--muted); font-weight: 600; font-size: 11px; }
/* poprawki */
.sheet input, .sheet select, .sheet textarea { min-width: 0; max-width: 100%; }
.two > * { min-width: 0; }
form.inline label { min-width: 0; flex: 1 1 140px; }
nav { padding-bottom: env(safe-area-inset-bottom); }
body { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }
.hello small { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.cb { position: relative; } .cb input { left: 0; top: 0; width: 1px; height: 1px; }

/* ===== wersja 14: lżejszy Start ===== */
html.modal-open, html.modal-open body { overflow: hidden; }
.sheet { overscroll-behavior: contain; }
.overlay { overscroll-behavior: contain; touch-action: none; }
.overlay .sheet { touch-action: pan-y; }
.hello { margin: 2px 2px 10px; }
.hello span { font-size: 24px; }
.stats3 > * { min-height: 70px; padding: 8px 6px; border-radius: 14px; }
.stats3 b { font-size: 26px; }
.stats3 b.sm { font-size: 15px; margin-top: 3px; }
.stats3 small { font-size: 10.5px; }
.newsline { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: #fff8e6; border: 1px solid #ecd9a8; border-radius: 14px; padding: 9px 12px; margin: 0 0 10px; }
.newsline b { display: block; font-size: 13px; color: #8a6400; }
.nl-t { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 62vw; }
.nl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); flex-shrink: 0; }
.next { display: flex; align-items: center; gap: 12px; margin-top: 14px; background: linear-gradient(160deg, #fff, #fbf3e4); border: 1px solid var(--line);
  border-left: 4px solid var(--gold); border-radius: 16px; padding: 12px 12px 12px 14px; box-shadow: var(--shadow); }
.nx-l { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.nx-lab { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted); }
.nx-d { font-family: var(--serif); font-size: 19px; margin: 2px 0; }
.nx-r { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.nx-r .t.mid { font-size: 22px; }
.nx-sw { margin-left: 2px; }

/* ===== wersja 15: usprawiedliwienia ===== */
.yt td.pnm, .yt th.pnm { border-radius: 0; }
.yt th { border-radius: 0; }
.excard { margin-top: 12px; }
.excard > .btn { width: 100%; }
.exmine { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 12px; margin-top: 8px; }
.exm { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.exm:last-child { border-bottom: 0; }
.chip.bad { background: #fdecea; color: var(--danger); }
.exseg { margin: 6px 0 10px; }
.exdays { display: flex; flex-direction: column; gap: 8px; }
.exday { display: flex; flex-direction: column; text-align: left; font: inherit; color: var(--text); background: var(--card); border: 1.5px solid var(--line);
  border-radius: 14px; padding: 10px 14px; cursor: pointer; }
.exday span { font-size: 13.5px; color: var(--danger); }
.exitems { display: flex; flex-direction: column; gap: 8px; }
.exok { background: var(--ok-soft); color: var(--ok); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.exok .exitems { color: var(--text); font-weight: 400; }
.exerr { background: #fdecea; color: var(--danger); border-radius: 12px; padding: 10px 12px; font-weight: 600; }
.exwarn { background: #fff3d6; border: 1px solid #f0d68c; border-radius: 12px; padding: 10px 12px; margin: 10px 0; font-weight: 600; color: #7a5300; }
.exreq { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin: 10px 0; box-shadow: var(--shadow); }
.exreq.parent { border-color: #f1b8b0; box-shadow: 0 0 0 1.5px #fbe0dc, var(--shadow); }
.exd { font-family: var(--serif); font-weight: 700; font-size: 17px; margin: 4px 0 2px; }
.exreason { margin-top: 6px; font-style: italic; color: var(--accent-dark); }
.ent .link.small { display: inline-block; margin-top: 2px; font-size: 12.5px; }
.ent .chip.wait { font-size: 11px; margin-top: 3px; display: inline-block; }
.exhint { margin: 8px 2px 0; text-align: center; }

/* pasek "nowy adres" na starej domenie */
#newaddr { position: sticky; top: 0; z-index: 50; background: #8a6a45; color: #fff; text-align: center; font-size: 14px; padding: 8px 12px; line-height: 1.4; }
#newaddr a { color: #fff; font-weight: 700; text-decoration: underline; }

/* lista "Potem" przyklejona pod najbliższym obowiązkiem */
.after-next { margin-top: 8px; }
.after-lab { padding: 2px 2px 4px; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; font-size: 11px; }

/* stałe miejsce na pasek przewijania (komputer): przy przełączaniu zakładek nic się nie przesuwa w bok */
html { scrollbar-gutter: stable; }
html.tb-mode { scrollbar-gutter: auto; }
