/* Layout: one working column (max 980px; the logged-out start page is wider). A shipping-label header for the family code, then tabs.
   Brand (docs/logo/brand-paleta.webp): burgundy #5D0F2B for decisions and key headings, navy for progress and
   logistics, cream and warm beige for backgrounds and neutral labels, coral only for errors. Plus Jakarta Sans for
   headings, Inter for text, Poppins only for the wordmark next to the logo.
   Dark (gift-box mockup in docs/logo/brand-warianty-i-mockupy.webp): same burgundy fills, grafit canvas, cream mark
   and wordmark. Do not invert burgundy into pink. */
:root {
  --bg: #F3ECE6;
  --surface: #FFFFFF;
  --surface-2: #FAF7F4;
  --ink: #1E1B1D;
  --muted: #6B6265;
  --line: #E5DCD5;
  --accent: #5D0F2B;
  --accent-fill: #5D0F2B;
  --accent-ink: #FAF7F4;
  --accent-soft: #F3E4EA;
  --brand: var(--accent);
  --navy: #1E324A;
  --coral: #D9534F;
  --kraft: #9C6B2F;
  --kraft-soft: #F1E6D6;
  --s-free: #6B6265;
  --s-free-bg: #E5DCD5;
  --s-res: #3D5A73;
  --s-res-bg: #E3EAF0;
  --s-bought: #1E324A;
  --s-bought-bg: #DCE3EC;
  --s-packed: #5D0F2B;
  --s-packed-bg: #F3E4EA;
  /* Goods progress bar: statuses step from light (free) to dark (packed), so the order reads without telling hues apart. */
  --bar-h: 14px;
  --b-free: #E5DCD5; --b-res: #8FA9C2; --b-res-2: #B7C9DA; --b-bought: #3D6A94; --b-packed: #5D0F2B;
  --warn-bg: #FFF4D6;
  --warn-ink: #6B4A00;
  --hero-bg: #5D0F2B;
  --mark-filter: none;
  --btn-hover: brightness(1.06);
  --f-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --f-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --f-logo: "Poppins", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 14px;
}
/* Dark: burgundy stays the decision colour (buttons, packed, hero). Links use a dusty wine so they stay readable
   on grafit. The mark is inverted to cream, like the cream stamp on the burgundy gift box. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141112; --surface: #1C191B; --surface-2: #262224; --ink: #FAF7F4; --muted: #B8ADA8; --line: #3C3438;
    --accent: #C99AA6; --accent-fill: #5D0F2B; --accent-ink: #FAF7F4; --accent-soft: #3A2229; --brand: var(--ink);
    --kraft: #D4A466; --kraft-soft: #2A2418; --navy: #A9C0D6; --coral: #E07A76;
    --s-free: #B8ADA8; --s-free-bg: #2A2528; --s-res: #3D5A73; --s-res-bg: #1E2A36; --s-bought: #1E324A; --s-bought-bg: #1A2430;
    --s-packed: #5D0F2B; --s-packed-bg: #3A1824; --warn-bg: #3A3016; --warn-ink: #F3D58A; color-scheme: dark;
    --mark-bg: transparent; --mark-pad: 0; --mark-filter: brightness(0) invert(1) sepia(.18) saturate(.4);
    --hero-bg: #5D0F2B; --btn-hover: brightness(1.18);
    --b-free: #2A2528; --b-res: #3D5A73; --b-res-2: #2C4458; --b-bought: #3D6A94; --b-packed: #5D0F2B;
    --star: #F5C04A; --star-off: #4A4540;
  }
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  --bg: #141112; --surface: #1C191B; --surface-2: #262224; --ink: #FAF7F4; --muted: #B8ADA8; --line: #3C3438;
  --accent: #C99AA6; --accent-fill: #5D0F2B; --accent-ink: #FAF7F4; --accent-soft: #3A2229; --brand: var(--ink);
  --kraft: #D4A466; --kraft-soft: #2A2418; --navy: #A9C0D6; --coral: #E07A76;
  --s-free: #B8ADA8; --s-free-bg: #2A2528; --s-res: #3D5A73; --s-res-bg: #1E2A36; --s-bought: #1E324A; --s-bought-bg: #1A2430;
  --s-packed: #5D0F2B; --s-packed-bg: #3A1824; --warn-bg: #3A3016; --warn-ink: #F3D58A; color-scheme: dark;
  --mark-bg: transparent; --mark-pad: 0; --mark-filter: brightness(0) invert(1) sepia(.18) saturate(.4);
  --hero-bg: #5D0F2B; --btn-hover: brightness(1.18);
  --b-free: #2A2528; --b-res: #3D5A73; --b-res-2: #2C4458; --b-bought: #3D6A94; --b-packed: #5D0F2B;
  --star: #F5C04A; --star-off: #4A4540;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 15px; line-height: 1.5; }
.wrap { max-width: 980px; margin: 0 auto; padding-block: 20px 64px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 20px; }
h1, h2, h3 { font-family: var(--f-display); text-wrap: balance; margin: 0; line-height: 1.15; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; }
h2 { font-size: 21px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 600; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--f-mono); }
.num { font-variant-numeric: tabular-nums; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.packnav { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.packnav[hidden] { display: none; }
.packswitch { display: flex; align-items: center; gap: 4px; flex: 0 1 340px; min-width: 0; }
.packswitch select { flex: 1 1 auto; min-width: 0; width: 100%; }
/* Pack switcher and "Utwórz nową paczkę" look like menu items, same pill as the profile button. */
.packnav .navitem { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 0; border-radius: 999px; background-color: transparent; color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.packnav .navitem:hover, .packnav .navitem[aria-current="page"] { background-color: var(--surface-2); }
.packnav select.navitem { padding-right: 28px; appearance: none; -webkit-appearance: none; text-overflow: ellipsis;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 14px center, right 9px center; background-size: 5px 5px; background-repeat: no-repeat; }
.packnav .newpack { flex: none; white-space: nowrap; }
.packnav .newpack .ic { flex: none; color: var(--accent); }
.packswitch + .newpack { position: relative; }
.packswitch + .newpack::before { content: ""; position: absolute; left: -5px; top: 25%; bottom: 25%; border-left: 1px solid var(--line); }
/* Phones and tablets: logo with its name and the icons stay in the first row, the pack switcher and
   "Utwórz nową paczkę" (always with its label) get a full-width second row. */
@media (max-width: 860px) {
  .top { flex-wrap: wrap; row-gap: 8px; }
  /* Pull the row left by the pill's inner padding, so the first icon or text lines up with the logo's edge. */
  .packnav { order: 3; flex: 1 1 100%; justify-content: flex-start; margin-left: -12px; }
  .packswitch { flex: 1 1 auto; }
}
.brand { color: inherit; text-decoration: none; display: flex; align-items: center; gap: 10px; }
.brand .mark { display: block; flex: none; width: 58px; height: auto; border-radius: 50%; background: var(--mark-bg, transparent); padding: var(--mark-pad, 0); box-sizing: content-box; filter: var(--mark-filter); }
/* Stacked lowercase wordmark next to the mark, like the logo: "wspólna" over "paczka". */
.brand h1, .brand .h1like { width: min-content; font-family: var(--f-logo); font-size: 24px; font-weight: 600; line-height: .95; letter-spacing: -0.01em; text-transform: lowercase; color: var(--brand); }
@media (max-width: 680px) { .brand .mark { width: 48px; } .brand h1, .brand .h1like { font-size: 20px; } .brand { gap: 8px; } }
.top .user { flex-wrap: nowrap; }
.profile { position: relative; }
.profile summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 10px 4px 4px; border-radius: 999px; color: var(--ink); font-weight: 600; }
.profile summary::-webkit-details-marker { display: none; }
.profile summary:hover, .profile[open] summary { background: var(--surface-2); }
.profile .avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-fill); color: var(--accent-ink); font-family: var(--f-display); font-weight: 800; }
.profile .pname { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* After the base rules above, so the narrow-screen limits actually win. */
/* Narrow phones: only the avatar in the profile button (name kept for screen readers), so logo and title fit. */
@media (max-width: 420px) {
  .brand h1 { font-size: 17px; } .brand .mark { width: 40px; }
  .profile .pname { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .profile summary { padding: 4px; }
}
/* With the pack switcher in the header the name would squeeze it to a stub, so only the avatar stays. */
@media (max-width: 680px) {
  .top:has(.packnav:not([hidden])) .profile .pname { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .top:has(.packnav:not([hidden])) .profile summary { padding: 4px; }
}
.profile .menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 220px; display: flex; flex-direction: column; align-items: stretch; gap: 4px; padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
.profile .menu > span { padding: 2px 6px 6px; overflow-wrap: anywhere; }
.profile .menu .btn { justify-content: flex-start; text-align: left; }
.profile .menu .menu-sep { border-top: 1px solid var(--line); margin: 4px 0 2px; }
.profile .menu .confirm { flex-direction: column; align-items: stretch; }
/* A quiet text button for rare actions. */
.linkish { background: none; border: 0; padding: 4px 6px; color: var(--muted); text-align: left; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linkish:hover { color: var(--ink); }
/* Visible to screen readers only. */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mode { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.mode.remote { background: var(--s-packed-bg); color: var(--accent); }
.mode.local { background: var(--warn-bg); color: var(--warn-ink); }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: s; }
/* "Jak to działa": cards with a line icon over the step, like the brand sheet. */
.steps li { list-style: none; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.steps li b { display: block; font-family: var(--f-display); color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.steps .si { width: 30px; height: 30px; color: var(--accent); margin-bottom: 4px; }
.steps { padding: 0; margin: 0; }
@media (max-width: 560px) { .steps { grid-template-columns: minmax(0, 1fr); } }

textarea { width: 100%; min-height: 180px; resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: var(--bg); }
input[type=text], input[type=number], select { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: var(--surface); min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.spread { justify-content: space-between; }

.btn { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 8px 16px; font-weight: 500; }
.btn:hover { border-color: var(--muted); }
/* Links styled as buttons (menu, "Wróć do paczki") look like the buttons next to them. */
a.btn { text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: var(--btn-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); padding-inline: 8px; }
.btn.ghost:hover { color: var(--ink); }
.btn.small { padding: 5px 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }

.notice { background: var(--warn-bg); color: var(--warn-ink); border-radius: 8px; padding: 10px 12px; font-size: 14px; }
.notice.ok { background: var(--s-packed-bg); color: var(--accent); }


/* shipping label header */
.label { background: var(--kraft-soft); border: 1px dashed var(--kraft); border-radius: var(--r); padding: 16px 18px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px 20px; }
.label .code { font-family: var(--f-mono); font-weight: 700; font-size: 22px; letter-spacing: .04em; color: var(--kraft); word-break: break-all; }
.label .meta { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; }
.label .coords { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; font-size: 14px; }
.label .coords span { display: block; }
.label .meta span b { font-weight: 600; }
.label .side { display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
@media (max-width: 620px) { .label { grid-template-columns: minmax(0, 1fr); } .label .side { align-items: flex-start; } }
.actor { display: flex; gap: 8px; align-items: center; font-size: 13px; }
.actor { flex-wrap: wrap; }
.btn.theme { display: inline-flex; align-items: center; justify-content: center; padding: 6px; width: 34px; height: 34px; }
.theme svg { display: block; }
.actor select { max-width: 180px; }
.actor input { width: 150px; }

.progress { display: flex; height: var(--bar-h); border-radius: 999px; overflow: hidden; background: var(--b-free); }
.progress i { display: block; height: 100%; }
.progress i + i { border-left: 2px solid var(--surface); }
.hatch { background: repeating-linear-gradient(45deg, var(--b-res) 0 4px, var(--b-res-2) 4px 8px); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; background: var(--c); vertical-align: -2px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 18%, transparent); }
.legend .st-res::before { background: repeating-linear-gradient(45deg, var(--b-res) 0 3px, var(--b-res-2) 3px 6px); }
.kasa .legend b { font-family: inherit; font-size: inherit; }

.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs button { border: 0; background: transparent; padding: 10px 12px; border-bottom: 2px solid transparent; color: var(--muted); font-weight: 500; white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .ti, .tabs .tl-short, .tabs .tbadge { display: none; }
/* Tab content: same rhythm as main.view, which it sits in. */
.tab-body { display: flex; flex-direction: column; gap: 20px; min-width: 0; scroll-margin-top: 12px; }
/* Coordinator-only money view: same white cards, one label so it is clear participants do not see this. */
.coord-block { display: flex; flex-direction: column; gap: 16px; min-width: 0; padding-left: 14px; border-left: 3px solid var(--accent); }
.coord-lead { display: flex; flex-direction: column; gap: 4px; }
.coord-kicker { margin: 0; font-family: var(--f-display); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.linkbtn.intext { margin: 0; }
/* Pack page: tabs, then the content column (family label only on "Lista", a slim strip elsewhere). */
.pack-layout, .pack-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.pack-main { scroll-margin-top: 12px; }
.label.slim { padding: 10px 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.label.slim .slim-id { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; min-width: 0; }
.label.slim .code { font-size: 15px; }
.label.slim .side { align-items: center; }

/* Wide screens: the tabs become a side menu next to the content, pinned while the page scrolls. */
@media (min-width: 1000px) {
  .wrap:has(.pack-layout) { max-width: 1240px; }
  .pack-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
  .tabs { position: sticky; top: 16px; flex-direction: column; gap: 2px; overflow: visible; border-bottom: 0; border-right: 1px solid var(--line); padding-right: 12px; }
  .tabs button { position: relative; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 0; border-radius: 8px; text-align: left; white-space: normal; line-height: 1.25; }
  .tabs button:hover { background: var(--surface-2); color: var(--ink); }
  .tabs button[aria-selected=true] { background: var(--accent-soft); color: var(--ink); font-weight: 600; }
  .tabs button[aria-selected=true] .ti { color: var(--accent); }
  .tabs .ti { display: block; flex: none; width: 20px; height: 20px; }
  .tabs .tl-long { flex: 1 1 auto; min-width: 0; }
  .tabs .tl-count { display: none; }
  .tabs .tbadge { display: grid; place-items: center; flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent-fill); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 1; }
}

/* Phones and tablets (below 1000px): the tabs become a bar pinned to the bottom, icon over a short label, like a native app.
   All six fit from 320px up (about 53px each), so there is no "Więcej" menu. */
@media (max-width: 999.98px) {
  .tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; gap: 0; overflow: visible; border-bottom: 0; border-top: 1px solid var(--line);
    background: color-mix(in srgb, var(--surface) 94%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
    padding: 4px max(4px, env(safe-area-inset-right, 0px)) max(4px, env(safe-area-inset-bottom, 0px)) max(4px, env(safe-area-inset-left, 0px)); }
  .tabs button { position: relative; flex: 1 1 0; min-width: 0; min-height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 6px 2px 4px; border-bottom: 0; border-radius: 10px; font-size: 11px; font-weight: 500; line-height: 1.1; -webkit-tap-highlight-color: transparent; }
  .tabs .tl-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .tabs .tl-short { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .tabs .ti { display: block; flex: none; padding: 3px 12px; box-sizing: content-box; border-radius: 999px; }
  .tabs button[aria-selected=true] { color: var(--accent); font-weight: 600; }
  .tabs button[aria-selected=true] .ti { background: var(--accent-soft); }
  .tabs .tbadge { display: grid; place-items: center; position: absolute; top: 3px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 999px; background: var(--accent-fill); color: var(--accent-ink); font-size: 10px; font-weight: 700; line-height: 1; border: 2px solid var(--surface); box-sizing: content-box; }
  /* Room under the page for the bar, and messages sit above it instead of under it. */
  body:has(.tabs) { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  body:has(.tabs) .toast-wrap { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); padding-bottom: 10px; }
}
/* Tablets: the bar stays full width, but the six buttons sit together in the middle. */
@media (min-width: 681px) and (max-width: 999.98px) { .tabs { justify-content: center; } .tabs button { max-width: 120px; } }
/* Narrowest phones (320–360px): smaller labels so they are not cut. "Rozliczenie" does not fit any phone, so the bar says "Rozlicz.". */
@media (max-width: 360px) { .tabs button { font-size: 10px; padding-inline: 0; } .tabs .ti { padding-inline: 10px; } }
@media (max-width: 999.98px) and (prefers-reduced-motion: no-preference) { .tabs .ti { transition: background-color .15s; } }


.filters { display: flex; flex-direction: column; gap: 10px; }
.frow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.frow + .frow { padding-top: 10px; border-top: 1px dashed var(--line); }
.flabel { min-width: 64px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chip[aria-pressed=true] .muted { color: inherit; opacity: .7; }
.chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 4px 12px; font-size: 13px; }
.chip[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }

.cat { display: flex; flex-direction: column; gap: 0; }
.cat > header { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 2px 8px; }
.cat > header .cnt { font-size: 13px; color: var(--muted); }
.cat > header h3 { margin-right: auto; }
.cat > header .edit { align-self: center; }
.cat > #cat-form { margin-bottom: 8px; }
.catnote { font-size: 13px; color: var(--muted); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; white-space: pre-line; }
.items { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; }
.item { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 6px 14px; padding: 12px 14px; border-top: 1px solid var(--line); align-items: start; }
.item:first-child { border-top: 0; }
.item .name { font-weight: 600; }
.item .name .det { font-weight: 400; color: var(--muted); }
.item .sub { font-size: 13px; color: var(--muted); }
.item .note { font-size: 13px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.t { font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; border-radius: 4px; padding: 2px 6px; background: var(--surface-2); color: var(--muted); }
.t.key { background: var(--accent-soft); color: var(--accent); }
.t.kraft { background: var(--kraft-soft); color: var(--kraft); }
.ctrl { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.ctrl .row { gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.ctrl .slot { width: 96px; flex: none; text-align: center; white-space: nowrap; }
/* Status pill with "bierze X" under it, in the fixed-width left column. */
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }
/* Indented like the text inside the pill above (its horizontal padding), so both start in one line. */
.stat .who { padding-left: 10px; font-size: 12px; line-height: 1.3; overflow-wrap: anywhere; color: var(--ink); font-weight: 600; }
.stat .who .muted { font-weight: 400; }
/* Amount needed, a plain column left of the buttons (not a tag). */
.price { align-self: center; font-weight: 700; font-size: 14px; white-space: nowrap; color: var(--ink); padding-right: 4px; }
.ctrl.has-price { flex-direction: row; align-items: center; gap: 10px; }
.pick-ctrl { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.ctrl input[type=text] { width: 84px; text-align: right; }
.ctrl select { width: 104px; }
.who { font-size: 13px; color: var(--muted); }
.btn.edit { display: inline-flex; align-items: center; gap: 6px; }
.btn.edit svg { display: block; }
.btn.ico { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn.ico svg { display: block; flex-shrink: 0; }
.who b { color: var(--ink); font-weight: 600; }
@media (max-width: 680px) {
  /* Status and buttons share the top line (saves a row per item); the description goes below at full width. */
  /* Fixed status column, so a long "bierze X" wraps under the pill instead of pushing the buttons. */
  .item { grid-template-columns: 108px minmax(0, 1fr); grid-template-areas: "status ctrl" "body body"; gap: 8px 10px; align-items: center; }
  .item > :nth-child(1) { grid-area: status; }
  .item > :nth-child(2) { grid-area: body; }
  .item > .ctrl { grid-area: ctrl; }
  /* Pinned to the top, so the pill and buttons stay put when "bierze X" appears under the pill. */
  .item > .stat, .item > .ctrl { align-self: start; }
  .stat .pill { margin-top: 6px; }
  .ctrl .row { justify-content: flex-end; flex-wrap: nowrap; }
  .ctrl .btn.small { padding: 6px 4px; }
  .ctrl .slot { width: 78px; }
  /* Two buttons and the pencil already fill a phone's width: the amount goes under them, so they stay level with the status pill. */
  .ctrl.has-price { flex-direction: column; align-items: flex-end; gap: 4px; }
  .ctrl.has-price .price { order: 1; padding-right: 2px; }
  .btn.edit .lbl { display: none; }
  .btn.edit { padding: 6px 8px; }
}

.pill { display: inline-block; font-size: 12px; font-weight: 600; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.st-wolne { background: var(--s-free-bg); color: var(--s-free); }
.st-zarezerwowane { background: var(--s-res-bg); color: var(--s-res); }
.st-kupione { background: var(--s-bought-bg); color: var(--s-bought); }
.st-spakowane { background: var(--s-packed-bg); color: var(--s-packed); }

table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tablewrap { overflow-x: auto; }
.plus { color: var(--accent); }
.minus { color: var(--coral); }

ol.q { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
ul.check { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }

.boxes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.box { background: var(--kraft-soft); border: 1px dashed var(--kraft); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.box .bn { font-family: var(--f-mono); font-weight: 700; color: var(--kraft); }
.box ul { margin: 0; padding-left: 18px; font-size: 13px; }

.hours { display: flex; flex-direction: column; gap: 6px; }
.hours div { display: flex; gap: 10px; flex-wrap: wrap; }
.warehouse-access { margin-top: 12px; }
.warehouse-access p { margin: 6px 0; }
.warehouse-access.is-hidden p { opacity: .55; }
.map-box { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.map-off { flex-direction: row; flex-wrap: wrap; align-items: center; }
.map-off p { flex-basis: 100%; margin: 0; }
.map { width: 100%; height: 280px; border: 1px solid var(--line); border-radius: 8px; }
.gcal { display: flex; flex-direction: column; gap: 10px; }
.gcal h3 { margin: 0; font-size: 15px; }
.gcal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.gcal-btn { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
.gcal-btn:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(0, 0, 0, .08); transform: translateY(-1px); }
.gcal-date { flex: none; width: 46px; border-radius: 8px; overflow: hidden; text-align: center; border: 1px solid var(--line); background: var(--surface); line-height: 1.1; }
.gcal-date small { display: block; background: var(--accent-fill); color: var(--accent-ink); font-size: 11px; font-weight: 600; padding: 2px 0; text-transform: uppercase; letter-spacing: .04em; }
.gcal-date b { display: block; font-family: var(--f-display); font-size: 20px; padding: 4px 0 5px; }
.gcal-date { display: flex; flex-direction: column-reverse; }
.gcal-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gcal-text b { font-weight: 600; font-size: 14px; }
.gcal-text small { color: var(--muted); font-family: var(--f-mono); font-size: 12px; }
.gcal-add { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 18px; line-height: 1; }
.gcal-btn:hover .gcal-add { background: var(--accent-fill); color: var(--accent-ink); }
.plan { display: flex; flex-direction: column; gap: 8px; border-left: 2px solid var(--line); padding-left: 14px; }
.plan div b { font-family: var(--f-mono); font-size: 13px; color: var(--accent); display: inline-block; min-width: 92px; }

.prev-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.prev-cats details { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.prev-cats summary { cursor: pointer; font-weight: 500; }
.prev-cats ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--muted); }
.members { display: flex; flex-wrap: wrap; gap: 6px; }
.members span { background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font-size: 13px; }

.confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.foot { font-size: 12px; color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .progress i { transition: width .3s ease; } }

/* web app additions */
.wrap.narrow { max-width: 520px; }
.wrap.narrow .panel { margin-top: 10vh; }
.user { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--muted); }
.login { display: flex; flex-direction: column; gap: 12px; max-width: 460px; }
/* Logged-out sign-in card sits in the middle of the page, not on the left edge. */
.panel.login { align-self: center; width: 100%; }
.login input[type=email] { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: var(--surface); font-size: 16px; width: 100%; }
.invite { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.invite input { flex: 1 1 260px; font-family: var(--f-mono); font-size: 13px; }
.team { display: flex; flex-wrap: wrap; gap: 6px; }
.team > span { background: var(--surface-2); border-radius: 999px; padding: 3px 10px; font-size: 13px; }
/* People in the pack: one row each, every column centred vertically. */
.people { list-style: none; margin: 0 0 12px; padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
/* Fixed date and action columns, so dates line up from row to row. */
.person { display: grid; grid-template-columns: 36px minmax(0, 1fr) 128px; grid-template-areas: "av main date"; align-items: center; gap: 4px 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.person:first-child { border-top: 0; }
.person > form { grid-column: 1 / -1; }
.pav { grid-area: av; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-family: var(--f-display); font-weight: 800; }
.person.is-owner .pav { background: var(--accent-fill); color: var(--accent-ink); }
.person.is-guest .pav { background: var(--kraft-soft); color: var(--kraft); }
.pmain { grid-area: main; min-width: 0; }
.pname-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.pname-row b { font-weight: 600; overflow-wrap: anywhere; }
.prole { font-size: 12px; font-weight: 600; color: var(--muted); }
.person.is-owner .prole { color: var(--accent); }
.pdesc { font-size: 13px; color: var(--muted); }
.pdate { grid-area: date; font-size: 13px; white-space: nowrap; text-align: right; }
.pact { grid-area: act; display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.people:not(.can-edit) .pact { display: none; }
.people.can-edit .person { grid-template-columns: 36px minmax(0, 1fr) 128px 200px; grid-template-areas: "av main date act"; }
@media (max-width: 680px) {
  /* Date and buttons go under the description, still aligned with the name. */
  .person, .people.can-edit .person { grid-template-columns: 36px minmax(0, 1fr); grid-template-areas: "av main" ". date" ". act"; }
  .pdate { text-align: left; }
  .pact { justify-content: flex-start; flex-wrap: wrap; }
  .pact:empty { display: none; }
}
main.view { display: flex; flex-direction: column; gap: 20px; }

html, body { margin: 0; }
[hidden] { display: none !important; }

/* questions */
.questions { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.question { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--surface); }
.question.answered { background: var(--bg); }
.question .qn { color: var(--accent); font-weight: 700; padding-top: 2px; }
.qbody { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.qtext { font-weight: 500; }
.qhead { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 4px 8px; }
.qhead .qtext { flex: 1 1 60%; min-width: 0; padding-top: 3px; }
.qicons { display: flex; flex-shrink: 0; margin: -4px -8px 0 auto; }
.answer { border-left: 3px solid var(--s-packed); padding: 4px 0 4px 10px; white-space: pre-line; }
.qform { display: flex; flex-direction: column; gap: 6px; }
.qform textarea { min-height: 70px; }
.question.group { grid-template-columns: minmax(0, 1fr); }
.replies { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 3px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.reply .rtext { white-space: pre-line; }
.reply-form textarea { min-height: 44px; }
.resolved-tag { color: var(--accent); }
.resolved-list summary { cursor: pointer; color: var(--muted); padding: 4px 0; }
.resolved-list[open] summary { margin-bottom: 10px; }
/* Phones and tablets have no Ctrl key. */
@media (pointer: coarse) { .kbd-hint { display: none; } }
.transport-ask { border: 1px dashed var(--line); border-radius: var(--r); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }

/* receipts */
.rform { background: var(--bg); }
.item.editing { display: block; }
.dform { display: flex; flex-direction: column; gap: 12px; }
.dform fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 8px; margin: 0; min-width: 0; }
.dform .drow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.dform .drow.key2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto; }
.dform .drow.cat2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.dform .drow.date3 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.dform textarea { width: 100%; }
@media (max-width: 520px) {
  .dform .drow, .dform .drow.key2, .dform .drow.date3 { grid-template-columns: minmax(0, 1fr) auto; }
  .dform .drow.cat2 { grid-template-columns: minmax(0, 1fr); }
  .dform .drow > label:not(:first-child) { grid-column: 1; }
  .dform .drow > button { grid-column: 2; grid-row: 1; }
}
.label .side .btn.edit { align-self: flex-end; }
/* item form: three short sections (what, where on the list, how we buy) instead of one wall of fields */
.iform { display: flex; flex-direction: column; gap: 14px; padding: 4px 0; }
.iform select { width: 100%; }
.iform input[type=text], .iform select, .iform textarea { min-height: 40px; background: var(--surface); }
.iform textarea { min-height: 64px; padding: 8px 10px; }
.iform .isec { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); padding: 12px 14px 14px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.iform .isec legend { font-family: var(--f-display); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); padding: 0 6px; margin-left: -6px; }
.iform label { color: var(--muted); }
.iform label > input, .iform label > select, .iform label > textarea, .iform .money input { color: var(--ink); }
/* 6-column grid: name wide next to details, then person / size / season in one row */
.igrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 12px; }
.igrid > label { grid-column: span 2; }
.igrid .c-name { grid-column: span 4; }
.igrid .c-detail { grid-column: span 2; }
.igrid.two > label { grid-column: span 3; }
.segs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.seg { position: relative; }
.seg input, .tog input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; height: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font-size: 13px; line-height: 1.25; cursor: pointer; }
.seg span:hover, .tog span:hover { border-color: var(--muted); }
.seg input:checked + span { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.seg input:focus-visible + span, .tog input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.iform .pool { max-width: 260px; }
.money { display: flex; align-items: center; gap: 8px; }
.money input { flex: 1; }
.money span { color: var(--ink); font-weight: 600; }
.togs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding-top: 2px; }
.iform label.tog { display: inline-flex; flex-direction: row; color: var(--ink); position: relative; }
.tog span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: 13px; cursor: pointer; }
.tog span::before { content: "+"; color: var(--muted); font-weight: 600; }
.tog input:checked + span { background: var(--kraft-soft); border-color: var(--kraft); color: var(--kraft); font-weight: 600; }
.tog input:checked + span::before { content: "✓"; color: var(--kraft); }
.ifoot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding-top: 2px; }
.ibtns { display: flex; gap: 8px; }
.ibtns .btn.primary { min-width: 120px; }
@media (max-width: 640px) {
  .igrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .igrid > label, .igrid .c-name, .igrid .c-detail, .igrid .c-person, .igrid.two > label { grid-column: 1 / -1; }
  .igrid .c-size, .igrid .c-season { grid-column: span 1; }
  .segs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .iform .pool { max-width: none; }
  /* 16px stops iOS from zooming into the field on focus */
  .iform input[type=text], .iform select, .iform textarea { font-size: 16px; min-height: 44px; }
  .iform .isec { padding: 10px 12px 12px; }
  .ifoot { flex-direction: column; align-items: stretch; }
  .ifoot > .small, .ifoot > .confirm { text-align: center; }
  .ibtns { flex-direction: column; }
  .ibtns .btn { width: 100%; padding: 11px 16px; }
}
.rform label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.rform input[type=text], .rform input[type=file], .rform select { width: 100%; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.ritems { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; }
.ritems label.check-row { flex-direction: row; align-items: flex-start; gap: 8px; font-size: 14px; }
.receipts { display: flex; flex-direction: column; gap: 10px; }
.receipt { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--surface); min-width: 0; }
.receipt.flagged { border-color: var(--s-res); }
.rhead { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: baseline; }
.rhead b { font-size: 17px; }
.flagnote { background: var(--s-res-bg); color: var(--navy); border-radius: 6px; padding: 6px 8px; }
.confirm.small { padding: 4px 8px; }
.rform label.check-row { flex-direction: row; align-items: center; gap: 8px; }

/* money overview: one compact strip between the family label and the progress bar */
.summary { display: flex; flex-direction: column; gap: 4px; background: var(--surface-2); border-radius: 8px; padding: 8px 12px; font-size: 14px; }
.summary .sum-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.summary .sep { color: var(--muted); }
.summary .big { font-family: var(--f-display); font-size: 20px; font-weight: 800; }
/* "Jak możesz pomóc" at the top of the list: items to take and "Dokładam się X zł" */
.help { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 20px; border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: var(--r); background: var(--surface); padding: 12px 14px; }
.help ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; }
/* Thin dashed guide line between rows, so the eye can follow a name to its "Biorę" across a wide row. */
.help li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; padding: 5px 0; }
.help li + li { border-top: 1px dashed color-mix(in srgb, var(--muted) 40%, transparent); }
.help li .t { display: inline-block; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.help-pledge { display: flex; flex-direction: column; gap: 6px; }
/* Common cash: a bar that shrinks as receipts are paid from it. */
.kasa { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }
.kasa b { font-family: var(--f-display); font-size: 18px; }
.kbar { height: var(--bar-h); border-radius: 99px; background: var(--b-free); overflow: hidden; }
.kbar i { display: block; height: 100%; background: var(--kraft); }
.pool-items { margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--line); }
.pool-items ul { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pool-items li { display: flex; justify-content: space-between; gap: 12px; }
.pool-items li span:first-child { min-width: 0; overflow-wrap: anywhere; }
.pool-items li .num { white-space: nowrap; }
.kasa-row td { color: var(--muted); font-style: italic; }
.rsource { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.rform .rsource label.check-row { align-items: flex-start; gap: 10px; font-size: 14px; }
.rsource input { margin-top: 4px; }
/* "Zaloguj się przez Google": white button with the coloured G, as Google's guidelines ask. */
.btn.google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: #1f1f1f; border-color: #747775; text-decoration: none; font-weight: 500; }
.btn.google:hover { background: #f8f9fa; }
.login .or { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.login .or::before, .login .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.modes { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.modes label.check-row { display: flex; gap: 10px; align-items: flex-start; }
.modes input { margin-top: 4px; }
.mypart { font-size: 16px; }
.howto { border-left: 3px solid var(--kraft); padding: 4px 0 4px 10px; white-space: pre-line; }

/* coordinator to-do for equal split */
.todos { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.todo label.check-row { display: flex; gap: 8px; align-items: flex-start; }
.todo input { margin-top: 4px; }
.todo.done span { color: var(--muted); text-decoration: line-through; }
.todo { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-top: 1px dashed var(--line); }
.todo:first-child { border-top: 0; }
.pay-list { list-style: none; margin: 6px 0 0; padding: 0; font-size: 14px; }
.pay-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 0; border-top: 1px solid var(--line); }
.pay-list li:first-child { border-top: 0; }
.pay-list .pay-icons { display: inline-flex; gap: 4px; flex-shrink: 0; }
.pay-form { gap: 6px; }

/* messages pinned to the bottom of the screen */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; pointer-events: none;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 640px; width: 100%; border-radius: 10px; padding: 10px 10px 10px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); font-size: 14px; }
/* Success uses navy (progress), not burgundy: on a small bottom bar burgundy reads as an error. */
.toast.ok { background: var(--s-bought-bg); color: var(--navy); border: 1px solid var(--navy); }
.toast.ok span::before { content: "✓ "; font-weight: 700; }
.toast.err { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--s-res); }
.toast span { flex: 1; }
@media (prefers-reduced-motion: no-preference) { .toast { animation: toast-in .18s ease-out; } }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.pledge-tools, .pledge-accept { display: flex; flex-direction: column; align-items: center; gap: 4px; width: 100%; }
.pledge-accept { flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: center; }
.pledge-accept-btns { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pledge-tools .linkbtn { margin-top: 0; }
.mode-confirm { flex-direction: column; align-items: flex-start; }

/* ---------- "Zgłoś problem z aplikacją" ---------- */
/* No min-width: 0 here: the theme and profile buttons must never be squeezed off screen; the pack switcher gives way instead. */
.top-right { display: flex; align-items: center; gap: 6px; }
.report-open { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.report-open svg { flex: none; }
/* Site footer: a full-width band at the bottom of every page, set apart from the content. */
body { min-height: 100dvh; display: flex; flex-direction: column; }
body > .wrap { flex: 1 0 auto; width: 100%; }
.site-foot { border-top: 1px solid var(--line); background: var(--surface-2); color: var(--muted); font-size: 13px; }
.foot-in { max-width: 980px; margin: 0 auto; padding: 32px max(16px, env(safe-area-inset-right, 0px)) max(22px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); display: flex; flex-direction: column; gap: 24px; }
/* Three columns like the program's own site: brand with the tagline, useful links, contact. */
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 24px 40px; align-items: start; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .foot-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }
.foot-about { display: flex; flex-direction: column; gap: 10px; }
.foot-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; align-self: flex-start; }
.foot-brand img { flex: none; border-radius: 50%; background: var(--mark-bg, transparent); padding: var(--mark-pad, 0); box-sizing: content-box; filter: var(--mark-filter); }
.foot-brand b { width: min-content; font-family: var(--f-logo); font-weight: 600; font-size: 19px; line-height: .95; letter-spacing: -0.01em; text-transform: lowercase; color: var(--brand); }
.foot-tag { margin: 0; max-width: 34ch; line-height: 1.55; }
.foot-col { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.foot-col h2 { font-size: 14px; font-weight: 700; color: var(--ink); margin: 0 0 2px; }
.foot-col p { margin: 0; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.foot-col a { color: var(--ink); text-decoration: none; }
.foot-col a:hover { text-decoration: underline; }
.foot-col .foot-mail { font-weight: 600; overflow-wrap: anywhere; }
.foot-col .report-open { margin-top: 4px; }
.foot-note { margin: 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; }
dialog.report { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); box-shadow: 0 16px 48px rgba(0, 0, 0, .2); }
dialog.report::backdrop { background: rgba(10, 14, 20, .45); }
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.report-head h2 { font-size: 20px; }
.report-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 18px 18px; }
.report-body label { font-weight: 600; margin-top: 4px; }
.report-body textarea { min-height: 120px; }
.report-body input[type=email] { border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; background: var(--bg); width: 100%; }
.report-error { color: var(--coral); font-weight: 500; }
.report-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.report-hint { font-size: 13px; margin-top: -4px; }

/* ---------- "Oceń aplikację" ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:root { --star: #E09A00; --star-off: #D9D3CC; }
.rate-field { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.rate-field legend { font-weight: 600; padding: 0; margin-bottom: 4px; }
/* Hovering the row lights every star, then the ones after the hovered star go dark again: stars up to the pointer stay lit. */
.rate-stars { display: inline-flex; gap: 2px; }
.rate-stars .rate-star, .rate-stars button { margin: 0; padding: 2px; font-weight: normal; cursor: pointer; border: 0; background: none; color: var(--star-off); border-radius: 6px; line-height: 0; }
.rate-stars svg { display: block; fill: currentColor; transition: transform .12s ease; }
.rate-stars .on { color: var(--star); }
.rate-stars:hover > * { color: var(--star); }
.rate-stars > *:hover ~ * { color: var(--star-off); }
.rate-stars > *:hover svg { transform: scale(1.12); }
.rate-star input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rate-star:has(input:focus-visible), .rate-stars button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.rate-word { margin: 0; font-size: 14px; min-height: 1.4em; }
/* Prompt in a ready pack: one line with stars, under the goods progress. */
.rate-prompt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--star); border-radius: 8px; padding: 8px 10px 8px 14px; }
.rate-prompt p { margin: 0; flex: 1 1 220px; font-size: 14px; }
.rate-prompt p b { display: block; font-size: 15px; }
.rate-prompt .rate-stars svg { width: 28px; height: 28px; }
.box-people { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.box-person { align-items: center; gap: 10px; }
.box-person .bp-name { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.box-person select { flex: 0 1 320px; max-width: 100%; min-width: 0; }
.t.ok { background: var(--s-packed-bg); color: var(--accent); }
.t.wait { background: var(--warn-bg); color: var(--warn-ink); }
.warn-ink { color: var(--warn-ink); }
.confirm-status { background: var(--warn-bg); color: var(--warn-ink); border-radius: var(--r); padding: 10px 12px; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.confirm-status.final { background: var(--s-packed-bg); color: var(--accent); }
.confirm-status p { margin: 0; }
.box.pending { opacity: .6; border-style: dotted; }
.box-demo { margin: 12px 0; border: 1px dashed var(--kraft); border-radius: var(--r); padding: 8px 12px; background: var(--kraft-soft); }
.box-demo summary { cursor: pointer; font-weight: 600; }
.demo-steps { margin: 8px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.demo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 2px; }
.demo-lbl { font-family: var(--f-mono); font-size: 12px; font-weight: 700; border: 1px dashed var(--kraft); border-radius: 4px; padding: 2px 6px; color: var(--kraft); background: var(--surface); }
.demo-lbl.bad { text-decoration: line-through; opacity: .55; }
.demo-lbl.new { border-style: solid; }
.demo-lbl.ok { border-style: solid; border-color: var(--accent); color: var(--accent); background: var(--s-packed-bg); font-family: inherit; }
.demo-lbl.wait { border-style: solid; border-color: var(--warn-ink); color: var(--warn-ink); background: var(--warn-bg); font-family: inherit; }

/* coordinator panel: change history and deleting the pack */
.history { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.history > li { display: grid; grid-template-columns: 7.5em minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.history > li:first-child { border-top: 0; }
.history .when { color: var(--muted); font-size: 13px; white-space: nowrap; }
.history .what { min-width: 0; overflow-wrap: anywhere; }
.history details { margin-top: 4px; font-size: 13px; color: var(--muted); }
.history details ul { margin: 4px 0 0; padding-left: 18px; }
@media (max-width: 520px) { .history > li { grid-template-columns: minmax(0, 1fr); gap: 2px; } }
.danger-zone { border-color: var(--coral); }
.btn.danger { background: var(--coral); color: #FFFFFF; border-color: var(--coral); }

/* ---------- logged-out start page (docs/logo/makieta-*.png) ---------- */
.wrap:has(.landing) { max-width: 1200px; }
/* Header: logo, the page menu in the middle, "Zaloguj się" and the main button on the right. */
.top.landing-top { padding: 4px 0 16px; }
.sitenav { flex: 1 1 auto; display: flex; justify-content: center; gap: 4px 28px; flex-wrap: wrap; }
.sitenav a { color: var(--ink); opacity: .82; text-decoration: none; font-weight: 500; font-size: 15px; padding: 6px 2px; border-bottom: 2px solid transparent; }
.sitenav a:hover { opacity: 1; border-bottom-color: var(--accent); }
.navlink { background: none; border: 0; padding: 8px 6px; color: var(--accent); font-weight: 600; font-size: 15px; }
.navlink:hover { text-decoration: underline; text-underline-offset: 3px; }
.btn.cta { border-radius: 12px; padding: 10px 20px; font-family: var(--f-display); font-weight: 700; }
@media (max-width: 1080px) { .sitenav { gap: 4px 18px; } .sitenav a { font-size: 14px; } }
@media (max-width: 900px) { .sitenav { display: none; } }
@media (max-width: 480px) { .navlink.login-link { display: none; } .btn.cta { padding: 8px 14px; font-size: 14px; } }
@media (max-width: 340px) { .btn.cta { padding-inline: 10px; } }

.landing { display: flex; flex-direction: column; gap: 72px; padding-top: 12px; }
.landing h3 { font-family: var(--f-display); }
/* Burgundy hero card with two soft rings in the corners, like the ring of the logo. */
.lp-hero { position: relative; overflow: hidden; isolation: isolate; background: var(--hero-bg); color: #FAF7F4; border-radius: 28px; padding: 64px 32px 56px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; box-shadow: 0 24px 48px -28px rgba(93, 15, 43, .55); }
.lp-hero::before, .lp-hero::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; }
.lp-hero::before { width: 320px; height: 320px; top: -110px; right: 140px; background: rgba(255, 255, 255, .06); }
.lp-hero::after { width: 420px; height: 420px; bottom: -250px; right: -110px; border: 28px solid rgba(255, 255, 255, .05); }
/* Weekend Cudów countdown: big enough to catch the eye before the headline. */
.lp-badge { display: inline-block; padding: 10px 26px; border-radius: 24px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .32); font-size: clamp(17px, 2.3vw, 24px); font-weight: 700; line-height: 1.3; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
/* Pack-page countdown in the header: one quiet pill, no seconds, so it does not pull the eye from the list. */
.weekend-strip { flex: none; align-self: center; margin: 0; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; white-space: nowrap; }
.weekend-strip[hidden] { display: none; }
/* Phones, pack pages: no room for both, so the countdown takes the place of the name next to the logo
   (the name stays for screen readers). On the narrowest screens the countdown wraps into two lines. */
@media (max-width: 760px) {
  .top.compact .brand h1 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .top.compact .weekend-top { flex: 1 1 0; min-width: 0; max-width: max-content; margin-right: auto; white-space: normal; line-height: 1.25; border-radius: 14px; }
}
/* Narrowest phones: tighter gaps and a smaller countdown, so it stays at two lines. */
@media (max-width: 400px) {
  .top.compact { column-gap: 8px; }
  .top.compact .top-right { gap: 4px; }
  .top.compact .weekend-top { font-size: 12px; padding: 4px 9px; }
}
.lp-title { max-width: 980px; font-size: clamp(30px, 4.4vw, 50px); font-weight: 800; line-height: 1.12; letter-spacing: -0.025em; color: #FFFFFF; }
.lp-lead { max-width: 720px; font-size: clamp(16px, 1.6vw, 20px); line-height: 1.6; color: rgba(250, 247, 244, .86); }
.lp-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 18px; }
.lp-actions .btn { border-radius: 16px; padding: 18px 34px; font-size: 17px; }
.btn.lp-btn-light { background: #FFFFFF; border-color: #FFFFFF; color: #5D0F2B; font-family: var(--f-display); font-weight: 700; }
.lp-btn-light:hover { background: #FAF7F4; border-color: #FAF7F4; }
.btn.lp-btn-ghost { background: rgba(0, 0, 0, .16); border-color: rgba(255, 255, 255, .22); color: #FFFFFF; font-weight: 600; }
.lp-btn-ghost:hover { border-color: rgba(255, 255, 255, .5); }
.lp-note { font-size: 13px; color: rgba(250, 247, 244, .7); }
@media (max-width: 560px) {
  .lp-hero { padding: 44px 20px 36px; border-radius: 22px; }
  .lp-actions { flex-direction: column; align-self: stretch; }
  .lp-actions .btn { padding: 15px 20px; }
}

.lp-section { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; scroll-margin-top: 20px; }
.lp-eyebrow { color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.lp-h2 { font-size: clamp(26px, 3.4vw, 42px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.lp-sub { max-width: 760px; font-size: 17px; line-height: 1.6; color: var(--muted); }
.lp-tile { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.lp-ic { width: 30px; height: 30px; }

/* Three steps joined by dashed lines on wide screens. */
.lp-steps { list-style: none; margin: 32px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
.lp-step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 36px 26px 32px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; box-shadow: 0 10px 30px -22px rgba(30, 27, 29, .35); }
.lp-step + .lp-step::before { content: ""; position: absolute; left: -49px; top: 68px; width: 48px; border-top: 2px dashed var(--line); }
.lp-kicker { margin-top: 18px; color: var(--accent); font-size: 14px; font-weight: 700; letter-spacing: .1em; }
.lp-step h3 { font-size: 22px; font-weight: 700; line-height: 1.25; }
.lp-step p, .lp-card p { color: var(--muted); line-height: 1.6; }
@media (max-width: 860px) {
  .lp-steps { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .lp-step + .lp-step::before { left: 50%; top: -21px; width: 0; height: 20px; border-top: 0; border-left: 2px dashed var(--line); }
}

.lp-grid { list-style: none; margin: 24px 0 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; text-align: left; }
.lp-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.lp-card .lp-tile { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 6px; }
.lp-card .lp-ic { width: 26px; height: 26px; }
.lp-card h3 { font-size: 18px; font-weight: 700; }
@media (max-width: 900px) { .lp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .lp-grid { grid-template-columns: minmax(0, 1fr); } }

/* Video guides: two columns (coordinator, participant), thumbnails link out to YouTube, no embedded player. */
.lp-videos { width: 100%; margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; text-align: left; }
.lp-video-col { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.lp-video-col h3 { font-size: 18px; font-weight: 700; display: flex; flex-direction: column; gap: 2px; }
.lp-video-col h3 small { color: var(--muted); font-family: var(--f-body); font-size: 13px; font-weight: 500; }
.lp-video-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lp-video { display: flex; align-items: center; gap: 14px; color: var(--ink); text-decoration: none; border-radius: 12px; }
.lp-video img { flex: none; width: 160px; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: var(--surface-2); }
.lp-video span { display: flex; flex-direction: column; gap: 2px; line-height: 1.4; }
.lp-video b { color: var(--accent); font-size: 13px; letter-spacing: .04em; }
.lp-video:hover span { text-decoration: underline; text-underline-offset: 2px; }
@media (max-width: 760px) { .lp-videos { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 420px) { .lp-video img { width: 120px; } }

/* Coordinators: checklist on the left, a sample list with brand status colours on the right. */
.lp-split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; align-items: center; text-align: left; }
.lp-split > div { display: flex; flex-direction: column; gap: 14px; }
.lp-checks { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.lp-checks li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.5; }
.lp-check { flex: none; width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--accent-fill); color: var(--accent-ink); stroke-width: 3; box-sizing: border-box; margin-top: 1px; }
.lp-sample { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 24px; display: flex; flex-direction: column; gap: 16px; box-shadow: 0 18px 40px -26px rgba(30, 27, 29, .4); }
.lp-sample figcaption { display: flex; justify-content: space-between; align-items: baseline; font-family: var(--f-display); font-size: 17px; }
.lp-sample figcaption span { font-family: var(--f-body); font-size: 12px; color: var(--muted); }
.lp-bar { display: flex; gap: 6px; height: 10px; }
.lp-bar i { border-radius: 999px; }
.lp-sample ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.lp-sample li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.lp-sample li:first-child { border-top: 0; }
.lp-sample li span:first-child { display: flex; flex-direction: column; min-width: 0; }
.lp-sample small { color: var(--muted); font-size: 13px; }
@media (max-width: 860px) { .lp-split { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

.lp-faq { width: 100%; max-width: 820px; margin-top: 16px; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.lp-faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 0 20px; scroll-margin-top: 20px; }
.lp-faq-item summary { list-style: none; cursor: pointer; padding: 18px 28px 18px 0; position: relative; font-family: var(--f-display); font-weight: 700; font-size: 17px; }
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary::after { content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 24px; font-weight: 500; line-height: 1; }
.lp-faq-item[open] summary::after { content: "−"; }
.lp-faq-item p { padding: 0 0 18px; color: var(--muted); line-height: 1.6; }

.lp-start .panel.login { text-align: left; margin-top: 8px; }
.lp-more { margin-top: 4px; }

/* Status pills in brand colours: filled for active stages, beige for "wolne". */
.st-zarezerwowane, .st-kupione, .st-spakowane { color: var(--accent-ink); }
.st-zarezerwowane { background: var(--s-res); }
.st-kupione { background: var(--s-bought); }
.st-spakowane { background: var(--s-packed); }

/* What the buyer noted about the purchase (which washing machine, where from). Shown only when filled in. */
.item .buy { font-size: 13px; margin-top: 4px; overflow-wrap: anywhere; }
.item .buy a { font-weight: 600; }
.linkbtn { background: none; border: 0; padding: 0; margin-top: 6px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; font-size: 13px; }
.linkbtn:hover { color: var(--ink); }
.buy-form { display: grid; gap: 6px; margin-top: 8px; max-width: 420px; }
.buy-form label { display: grid; gap: 2px; font-size: 13px; color: var(--muted); }

/* Bell next to the profile and its window with changes by others */
.btn.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; padding: 6px; width: 34px; height: 34px; }
.bell svg { display: block; }
.bell .tbadge { position: absolute; top: -4px; right: -4px; display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--accent-fill); color: var(--accent-ink); font-size: 10px; font-weight: 700; line-height: 1; }
.news-dlg { width: min(560px, calc(100vw - 24px)); max-height: min(80vh, 640px); padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); box-shadow: 0 16px 48px rgba(0, 0, 0, .25); }
.news-sec { margin-top: 14px; }
.news-more { margin-top: 6px; }
.news-sec-head { margin: 0; padding-bottom: 4px; border-bottom: 1px solid var(--line); font-size: 15px; }
.news-dlg::backdrop { background: rgba(0, 0, 0, .35); }
.news-dlg h2 { font-size: 18px; margin: 0; }
.news-dlg .history { margin-top: 10px; }
.news-dlg .row { flex-wrap: nowrap; align-items: flex-start; gap: 8px; }
.news-dlg .row h2 { flex: 1 1 auto; min-width: 0; }
.news-dlg .row.end { justify-content: flex-end; margin-top: 12px; }
.news-dlg .news-empty { margin: 14px 0 4px; font-weight: 600; }
.news-foot { margin-top: 14px; padding-top: 8px; border-top: 1px solid var(--line); text-align: center; }
.news-foot .linkbtn { margin: 0; }

/* Powiadomienia (own page, menu under the name): one table, tabs of the pack in rows, "Nic / Moje / Wszystko" for the bell and again
   for e-mail (a line between the two groups); a dash where a choice is not offered. */
.notify-sheet { display: flex; flex-direction: column; gap: 14px; }
.notify-sheet h2, .notify-sheet p { margin: 0; }
.nf-pack { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.nf-pack select { font-size: 15px; color: var(--ink); }
.nf-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.nf-table .nf-col-tab { width: 30%; }
.nf-table th, .nf-table td { padding: 8px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.nf-table tbody tr:last-child th, .nf-table tbody tr:last-child td { border-bottom: 0; }
.nf-table thead th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: center; white-space: nowrap; letter-spacing: normal; text-transform: none; overflow: hidden; }
.nf-table thead th.nf-first { text-align: left; white-space: normal; vertical-align: bottom; }
.nf-table thead th.nf-group { color: var(--ink); font-size: 13px; letter-spacing: normal; text-transform: none; border-bottom: 0; padding-bottom: 0; vertical-align: top; }
.nf-table #nf-freq { display: block; width: calc(100% - 8px); margin: 4px auto 0; font-size: 13px; font-weight: 400; padding: 3px 4px; }
.nf-table .nf-split { border-left: 1px solid var(--line); }
.nf-table .is-off { opacity: .35; }
.nf-table td.is-off { background: color-mix(in srgb, var(--muted) 8%, transparent); }
.nf-table tbody th { text-align: left; font-weight: 600; text-transform: none; letter-spacing: normal; font-size: 14px; color: var(--ink); }
.nf-table tbody th .small { display: block; font-weight: 400; margin-top: 2px; }
.nf-table td { text-align: center; }
.nf-table input[type=radio] { width: 20px; height: 20px; margin: 0; cursor: pointer; accent-color: var(--accent); }
.nf-table .nf-none { color: var(--muted); opacity: .6; }
.nf-table .nf-short { display: none; }
.nf-tab { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  text-decoration: underline dotted; text-decoration-color: var(--muted); text-underline-offset: 3px; }
.nf-tab:hover { text-decoration-color: currentColor; }
/* Narrow screens: short column names ("Wsz."), so every column keeps the same width. */
@media (max-width: 560px) {
  .nf-table .nf-long { display: none; }
  .nf-table .nf-short { display: inline; }
}
/* Phones: tighter cells, so both groups fit next to the tab names. */
@media (max-width: 480px) {
  .nf-table .nf-col-tab { width: 31%; }
  .nf-table thead th { font-size: 10px; }
  .nf-table th, .nf-table td { padding: 8px 1px; }
  .nf-table tbody th { font-size: 13px; padding-right: 4px; }
  .nf-table input[type=radio] { width: 18px; height: 18px; }
  .nf-table #nf-freq { width: 100%; font-size: 12px; padding: 3px 2px; }
}

/* "Jak chcesz pomóc?" under the pack code: two big buttons, money on the accent colour so it stands out on a phone. */
.help-card { display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); padding: 12px 14px; }
.help-card h3 { margin: 0; font-size: 16px; }
.help-card .choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.help-card .choice { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 96px; padding: 12px 8px; text-align: center;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); color: var(--ink); cursor: pointer; font: inherit; -webkit-tap-highlight-color: transparent; }
.help-card .choice b { font-family: var(--f-display); font-size: 16px; line-height: 1.2; }
.help-card .choice small { font-size: 12px; color: var(--muted); }
.help-card .choice:hover { border-color: var(--ink); }
.help-card .choice.money { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); }
.help-card .choice.money small { color: inherit; opacity: .85; }
.help-card .choice.money:hover { filter: var(--btn-hover); }
.help-card .choice.solo { grid-column: 1 / -1; min-height: 64px; flex-direction: row; gap: 10px; }
.help-card.done { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; border-left: 4px solid var(--accent); }
.help-card.done p { margin: 0; }
@media (prefers-reduced-motion: no-preference) { .help-card .choice { transition: border-color .15s, filter .15s; } }

/* Phones: the family details under the pack code fold away, so the help card fits on the first screen. */
.label .meta-toggle { display: none; align-self: flex-start; margin-top: 0; }
@media (max-width: 680px) {
  .label .meta:not(.open) { display: none; }
  .label .meta-toggle { display: inline; }
  .label { padding: 12px 14px; gap: 8px; }
}

/* Pledge window: centred vertically on every screen, a bit wider on phones. */
.pledge-dlg { width: min(460px, calc(100vw - 24px)); max-height: min(90vh, 680px); padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--ink); box-shadow: 0 16px 48px rgba(0, 0, 0, .25); }
.pledge-dlg::backdrop { background: rgba(0, 0, 0, .35); }
.pledge-sheet { display: flex; flex-direction: column; gap: 10px; }
.pledge-sheet h2 { margin: 0; font-size: 18px; }
.pledge-sheet p { margin: 0; }
.pledge-sheet .quick { display: flex; flex-wrap: wrap; gap: 8px; }
.pledge-sheet .quick .chip { min-width: 72px; min-height: 40px; font-size: 15px; font-weight: 600; }
/* The amount that closes the collection: highlighted, but still just one of the options. */
.pledge-sheet .quick .chip.suggested { border: 2px solid var(--accent); background: var(--accent-soft); color: var(--accent); }
.pledge-sheet .quick .chip.suggested[aria-pressed=true] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pledge-sheet .quick .chip .small { font-weight: 400; }
.pledge-sheet .money input { font-size: 16px; }
.pledge-sheet .howto .btn { white-space: nowrap; }
.paydetail { display: flex; align-items: center; gap: 8px; margin-top: 8px; white-space: normal; }
.paydetail .muted { flex: 0 0 8em; }
.howto .paynote { margin-top: 8px; }
.payform { min-width: 0; }
.payform label { margin-top: 4px; }
.payhint { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.paydetail .num { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.pledge-sheet .pledge-submit { width: 100%; min-height: 46px; font-size: 16px; }
.pledge-sheet .linkbtn { align-self: center; margin: 0; }
@media (max-width: 680px) {
  .pledge-dlg { width: calc(100vw - 24px); max-height: calc(100dvh - 24px); margin: auto; }
}
@media (max-width: 680px) and (prefers-reduced-motion: no-preference) {
  .pledge-dlg[open] { animation: sheet-up .2s ease-out; }
  @keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
}

/* Local test logins (/dev, development on localhost only) */
.dev-hint { border: 1px dashed currentColor; border-radius: 12px; padding: 10px; opacity: .85; display: flex; justify-content: center; }
.dev-login { margin: 14px 0; }
.dev-login .btn { width: 100%; }
.dev-login p { margin: 4px 0 0; }

/* Links replace the buttons that open the login and feedback dialogs inside the app. */
.navlink, .btn.cta, .lp-actions .btn, .foot-col .report-open, .lp-start a.btn { text-decoration: none; }
#theme-toggle[hidden] { display: none; }

/* consent bar for statistics (analytics.js): above toasts, above the bottom tabs on phones */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; justify-content: center;
  padding: 0 max(16px, env(safe-area-inset-right, 0px)) calc(16px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.consent-in { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; max-width: 720px; width: 100%; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; box-shadow: 0 6px 24px rgba(0, 0, 0, .18); font-size: 14px; }
.consent-in p { flex: 1 1 320px; margin: 0; }
.consent-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.consent-actions .btn { min-width: 104px; }
body:has(.tabs) .consent { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); padding-bottom: 10px; }
.foot-col .consent-open { margin-top: 2px; }
.foot-col .consent-open[hidden] { display: none; }
.consent-actions .btn.on { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--accent-ink); font-weight: 600; }
.consent-now { display: inline-block; margin-top: 4px; }
