/* Zarzadca — tokeny, reset, typografia i komponenty wspolne. Kierunek: "Osiedle o zmierzchu" (design/DESIGN.md).
   Trzy plaskie plamy zmierzchu (niebo, beton, noc), dwa kolory nasycone z powodem: swiatlo w oknie (lokal przeczytal)
   i sygnal (trwajaca awaria). Bez kart i cieni: struktura z linii 1 px i odstepow. Jeden motyw, swiadomie ciemny. */

:root {
  /* trzy plaskie plamy zmierzchu */
  --niebo: oklch(0.44 0.045 236);
  --beton: oklch(0.285 0.02 232);
  --noc: oklch(0.2 0.016 235);
  /* jedyne dwa kolory nasycone */
  --swiatlo: oklch(0.85 0.12 80);
  --sygnal: oklch(0.53 0.19 27);
  /* tekst */
  --kartka: oklch(0.945 0.012 85);
  --mgla: oklch(0.77 0.028 236);
  /* odcienie tych samych barw */
  --beton-ciemny: oklch(0.25 0.018 232);
  --beton-jasny: oklch(0.33 0.02 234);
  --szyba: oklch(0.205 0.02 238);
  --spokoj: oklch(0.33 0.02 236);
  --fuga: oklch(0.245 0.018 232);
  --rolety: oklch(0.58 0.02 232);
  --klatka-okno: oklch(0.5 0.03 228);
  --linia: oklch(0.36 0.02 234);
  --mgla-2: oklch(0.66 0.03 236);
  --niebo-tekst: oklch(0.86 0.022 236);
  --sygnal-tekst: oklch(0.74 0.15 27);
  --swiatlo-tekst: oklch(0.86 0.11 82);
  --swiatlo-tlo: oklch(0.31 0.04 75);
  --sygnal-tlo: oklch(0.3 0.08 27);

  /* nazwy uzywane przez komponenty */
  --bg: var(--noc);
  --surface: var(--beton);
  --surface-2: var(--beton-jasny);
  --surface-3: oklch(0.38 0.022 234);
  --ink: var(--kartka);
  --ink-2: oklch(0.87 0.018 236);
  --muted: var(--mgla);
  --line: var(--linia);
  --line-2: var(--mgla-2);
  --rule: var(--linia);

  --accent: var(--kartka);       --accent-press: oklch(0.88 0.012 85); --accent-ink: var(--noc);
  --accent-soft: var(--beton);   --accent-text: var(--kartka);
  --ok: var(--swiatlo);          --ok-soft: var(--swiatlo-tlo);        --ok-text: var(--swiatlo-tekst);
  --warn: var(--swiatlo);        --warn-soft: var(--swiatlo-tlo);      --warn-text: var(--swiatlo-tekst);
  --danger: var(--sygnal);       --danger-soft: var(--sygnal-tlo);     --danger-text: var(--sygnal-tekst);
  --info: var(--mgla);           --info-soft: var(--beton);            --info-text: var(--ink-2);
  --idle: var(--mgla-2);         --idle-soft: var(--beton);            --idle-text: var(--mgla);

  --scrim: oklch(0.12 0.012 235 / 0.66);
  --toast-bg: var(--kartka);
  --toast-ink: var(--noc);
  --focus: var(--swiatlo);
  --shadow-1: none;
  --shadow-2: none;

  --stage-bg: var(--niebo);
  --bezel: oklch(0.13 0.012 235);

  /* pismo: jedna rodzina, dwie szerokosci */
  --font: 'Radio Canada', ui-sans-serif, 'Segoe UI', sans-serif;
  --waski: 78%;
  --t-xs: 13px;
  --t-s: 15px;
  --t-m: 16px;
  --t-l: 18px;
  --t-xl: 22px;
  --t-xxl: 30px;
  --t-3xl: 40px;

  /* rytm 4 px; promien tylko na przyciskach i ramie telefonu */
  --kreska: 1px;
  --r-przycisk: 4px;
  --r-xs: 0; --r-s: 0; --r: 0; --r-l: 0; --r-xl: 0;
  --tap: 44px;

  /* ruch: jedna krzywa na interfejs, jedna na swiatlo w oknie */
  --krzywa: cubic-bezier(0.3, 0.7, 0.2, 1);
  --krzywa-swiatlo: cubic-bezier(0.15, 0.85, 0.35, 1);
  --t-krotki: 160ms;
  --t-sredni: 260ms;
  --t-swiatlo: 220ms;

  color-scheme: dark;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-m);
  line-height: 1.45;
  font-weight: 400;
  font-synthesis: none;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; align-items: stretch; border-radius: 0; }
button:disabled { cursor: default; }
a { color: var(--kartka); text-decoration-thickness: 1px; text-underline-offset: 3px; }
img, svg { display: block; }
img { max-width: 100%; }
ul, ol { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--swiatlo); color: var(--noc); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.ink-2 { color: var(--ink-2); }
.nowrap { white-space: nowrap; }
.icon { flex: none; }
.waski { font-stretch: var(--waski); }

/* ---------- tony ---------- */
.t-accent { --tone: var(--kartka); --tone-soft: var(--beton); --tone-text: var(--kartka); }
.t-ok     { --tone: var(--ok); --tone-soft: var(--ok-soft); --tone-text: var(--ok-text); }
.t-warn   { --tone: var(--warn); --tone-soft: var(--warn-soft); --tone-text: var(--warn-text); }
.t-danger { --tone: var(--danger); --tone-soft: var(--danger-soft); --tone-text: var(--danger-text); }
.t-info, .t-violet, .t-teal { --tone: var(--info); --tone-soft: var(--info-soft); --tone-text: var(--info-text); }
.t-idle   { --tone: var(--idle); --tone-soft: var(--idle-soft); --tone-text: var(--idle-text); }

/* ---------- typografia ---------- */
.h-hello, .h-screen, .h-detail { font-weight: 600; letter-spacing: -0.012em; line-height: 1.15; }
.h-hello { font-size: var(--t-xxl); }
.h-screen { font-size: var(--t-xl); }
.h-detail { font-size: var(--t-xl); }
.lead { color: var(--muted); font-size: var(--t-s); }
.eyebrow { font-size: var(--t-xs); font-weight: 600; color: var(--muted); font-stretch: var(--waski); letter-spacing: 0.02em; }
.small { font-size: 14px; }
.xs { font-size: var(--t-xs); }
.strong { font-weight: 600; }

/* ---------- przyciski: kartka (glowny), sygnal (alarm), linia ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: var(--r-przycisk);
  font-size: var(--t-m); font-weight: 600; line-height: 1.15; text-align: center;
  background: transparent; color: var(--ink); box-shadow: inset 0 0 0 var(--kreska) var(--mgla-2);
  transition: background-color var(--t-krotki) var(--krzywa), box-shadow var(--t-krotki) var(--krzywa);
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; }
.btn-primary, .btn-white { background: var(--kartka); color: var(--noc); box-shadow: none; }
.btn-primary:active { background: var(--accent-press); }
.btn-danger { background: var(--sygnal); color: oklch(1 0 0); box-shadow: none; }
.btn-ghost { box-shadow: none; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; font-weight: 500; }
.btn-soft, .btn-line { color: var(--ink); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; gap: 6px; }
.btn-md { min-height: 44px; padding: 0 14px; font-size: var(--t-s); }
.btn-block { display: flex; width: 100%; }
.btn .spin { animation: spin 0.9s linear infinite; }

.icon-btn {
  display: inline-grid; place-items: center; width: var(--tap); height: var(--tap);
  color: var(--ink); position: relative; flex: none; border-radius: var(--r-przycisk);
  -webkit-tap-highlight-color: transparent;
}
.icon-btn:active { background: var(--beton); }

.link-btn {
  display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 2px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
}
.link-btn .icon { display: none; }

/* ---------- liczniki ---------- */
.badge {
  position: absolute; top: 5px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--sygnal); color: oklch(1 0 0);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; font-variant-numeric: tabular-nums;
}
.badge-dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--sygnal); }
.unread-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--swiatlo); flex: none; }

/* ---------- etykiety: waskie pismo, kolor tylko ze slowem ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 3px;
  font-size: var(--t-xs); font-weight: 600; font-stretch: var(--waski); letter-spacing: 0.02em; white-space: nowrap;
  color: var(--tone-text, var(--mgla)); box-shadow: inset 0 0 0 var(--kreska) var(--linia);
}
.chip .icon { width: 13px; height: 13px; }
.chip-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--tone, var(--idle)); }
.chip.t-danger { background: var(--sygnal); color: oklch(1 0 0); box-shadow: none; }
.chip.t-danger.chip-dot::before { background: oklch(1 0 0); }
.chip.t-warn { color: var(--swiatlo-tekst); box-shadow: inset 0 0 0 var(--kreska) var(--swiatlo-tlo); }
.chip-line { color: var(--mgla); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* filtry */
.filters {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -20px; padding: 2px 20px 4px;
  scroll-padding-inline: 20px;
}
.filters::-webkit-scrollbar { display: none; }
.filter {
  flex: none; min-height: 40px; padding: 0 12px; border-radius: var(--r-przycisk);
  font-size: 14px; font-weight: 500; color: var(--ink);
  box-shadow: inset 0 0 0 var(--kreska) var(--linia);
  display: inline-flex; align-items: center; gap: 6px;
}
.filter[aria-pressed="true"] { background: var(--kartka); color: var(--noc); box-shadow: none; }
.filter .count { font-weight: 600; font-variant-numeric: tabular-nums; opacity: .75; }

/* ---------- segmentowy przelacznik ---------- */
.seg { display: flex; border-radius: var(--r-przycisk); box-shadow: inset 0 0 0 var(--kreska) var(--mgla-2); overflow: hidden; }
.seg > button {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 8px;
  font-size: 14px; font-weight: 500; line-height: 1.15; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background-color var(--t-krotki) var(--krzywa), color var(--t-krotki) var(--krzywa);
}
.seg > button + button { box-shadow: inset var(--kreska) 0 0 var(--mgla-2); }
.seg > button[aria-pressed="true"] { background: var(--kartka); color: var(--noc); font-weight: 600; }
.seg .count { font-weight: 600; font-variant-numeric: tabular-nums; }
.seg .count.is-hot { background: var(--sygnal); color: oklch(1 0 0); padding: 1px 6px; border-radius: 9px; }
.seg-sm > button { min-height: 36px; font-size: 13px; }

/* ---------- sekcje: bez kart, linie 1 px ---------- */
.card { background: transparent; box-shadow: inset 0 var(--kreska) 0 var(--linia), inset 0 calc(-1 * var(--kreska)) 0 var(--linia); }
.card-pad { padding: 16px 0; }
.card-flat { box-shadow: inset 0 var(--kreska) 0 var(--linia); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-l { display: flex; flex-direction: column; gap: 22px; }
.stack-s { display: flex; flex-direction: column; gap: 8px; }
.hstack { display: flex; align-items: center; gap: 10px; min-width: 0; }
.grow { flex: 1 1 auto; min-width: 0; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; min-height: 32px; }
.sec-title { font-size: var(--t-l); line-height: 1.25; font-weight: 600; letter-spacing: -0.005em; }

/* ---------- wiersze listy ---------- */
.rows { display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px 0;
  text-align: left; color: inherit; text-decoration: none; position: relative;
  -webkit-tap-highlight-color: transparent;
}
button.row:active, a.row:active { background: var(--beton-ciemny); }
.rows > .row + .row::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: var(--kreska); background: var(--linia); }
.row-body { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-size: var(--t-m); font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.row-sub { font-size: var(--t-xs); color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.row-trail { flex: none; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: var(--t-xs); }
.row-amount { font-weight: 600; font-size: var(--t-m); color: var(--ink); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.row .chev { color: var(--mgla-2); }

/* ikona bez tla: cienka kreska w kolorze tekstu drugiego */
.tile { display: inline-grid; place-items: center; width: 28px; height: 32px; flex: none; color: var(--tone, var(--mgla)); }
.tile-l { width: 32px; height: 40px; }
.tile-s { width: 24px; height: 28px; }
.tile.t-accent { color: var(--mgla); }

/* ---------- osoby ---------- */
.avatar {
  display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--beton-jasny); color: var(--kartka); box-shadow: inset 0 0 0 var(--kreska) var(--mgla-2);
  font-size: 14px; font-weight: 600; letter-spacing: 0.01em; user-select: none;
}
.avatar-s { width: 32px; height: 32px; font-size: 12px; }
.avatar-l { width: 52px; height: 52px; font-size: 18px; }
.avatar-xl { width: 68px; height: 68px; font-size: 22px; }

/* ---------- formularze ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: var(--t-xs); font-weight: 500; color: var(--mgla); }
.label .opt { font-weight: 400; }
.input, .textarea, .select {
  width: 100%; min-height: 48px; padding: 11px 12px; border-radius: var(--r-przycisk);
  font-size: 16px; font-weight: 400; line-height: 1.4;
  background: var(--noc); border: var(--kreska) solid var(--mgla-2); color: var(--ink);
}
.textarea { min-height: 112px; resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--mgla-2); opacity: 1; }
.input:focus, .textarea:focus, .select:focus { outline: 2px solid var(--swiatlo); outline-offset: 0; border-color: transparent; }
.input.is-invalid, .textarea.is-invalid { border-color: var(--sygnal-tekst); }
.select { appearance: none; background-image: none; padding-right: 40px; }
.select-wrap { position: relative; }
.select-wrap .icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--mgla); }
.hint { font-size: var(--t-xs); color: var(--muted); }
.error-text { font-size: var(--t-xs); font-weight: 600; color: var(--sygnal-tekst); }
.counter { font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }

/* przelacznik */
.switch { position: relative; flex: none; width: 46px; height: 28px; border-radius: 14px; box-shadow: inset 0 0 0 var(--kreska) var(--mgla-2); transition: background-color var(--t-krotki) var(--krzywa); }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--mgla); transition: transform var(--t-krotki) var(--krzywa), background-color var(--t-krotki) var(--krzywa); }
.switch[aria-checked="true"] { background: var(--kartka); box-shadow: none; }
.switch[aria-checked="true"]::after { background: var(--noc); transform: translateX(18px); }
.switch-row { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 0; width: 100%; text-align: left; }

/* wybor (radio) */
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 60px; padding: 12px 14px; border-radius: var(--r-przycisk);
  box-shadow: inset 0 0 0 var(--kreska) var(--linia); text-align: left;
  transition: box-shadow var(--t-krotki) var(--krzywa);
}
.choice[aria-pressed="true"], .choice[aria-checked="true"] { box-shadow: inset 0 0 0 2px var(--kartka); }
.choice .radio { width: 20px; height: 20px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 var(--kreska) var(--mgla-2); }
.choice[aria-pressed="true"] .radio, .choice[aria-checked="true"] .radio { box-shadow: inset 0 0 0 6px var(--kartka); }
.checkbox { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 3px; box-shadow: inset 0 0 0 var(--kreska) var(--mgla-2); color: transparent; }
[aria-checked="true"] > .checkbox, .checkbox.is-on { background: var(--kartka); box-shadow: none; color: var(--noc); }

.cat-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.cat {
  display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 8px 10px; border-radius: var(--r-przycisk);
  box-shadow: inset 0 0 0 var(--kreska) var(--linia); font-size: 14px; font-weight: 500; line-height: 1.2; text-align: left;
}
.cat[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--kartka); }

/* ---------- mierniki ---------- */
.meter { display: block; height: 4px; background: var(--linia); overflow: hidden; }
.meter > span { display: block; height: 100%; width: var(--p, 0%); background: var(--tone, var(--kartka)); transition: width var(--t-sredni) var(--krzywa); }
.meter.t-accent > span, .meter.t-ok > span { background: var(--swiatlo); }
.meter-thin { height: 3px; }
.meter-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: var(--t-xs); color: var(--muted); }
.meter-row b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; text-align: left; color: inherit; position: relative; border-top: var(--kreska) solid var(--linia); }
.stat-label { font-size: var(--t-xs); color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat-label .icon { display: none; }
.stat-value { font-size: var(--t-xxl); font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-value.is-money { font-size: var(--t-xl); }
.stat-sub { font-size: var(--t-xs); color: var(--muted); }
.stat-sub.is-bad { color: var(--sygnal-tekst); }
.stat .meter { margin-top: auto; }

/* ---------- banery ---------- */
.banner {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--r-przycisk);
  background: var(--beton); color: var(--ink); text-align: left; width: 100%;
}
.banner .tile { color: var(--tone, var(--mgla)); }
.banner-title { display: block; font-weight: 600; font-size: var(--t-m); line-height: 1.25; }
.banner-text { display: block; font-size: var(--t-xs); color: var(--ink-2); margin-top: 2px; line-height: 1.45; }
.banner.t-danger, .banner-solid { background: var(--sygnal); color: oklch(1 0 0); }
.banner.t-danger :is(.banner-title, .banner-text, .tile), .banner-solid :is(.banner-title, .banner-text, .tile) { color: oklch(1 0 0); }
.banner.t-warn { background: var(--swiatlo-tlo); }
.banner.t-warn .tile { color: var(--swiatlo); }

/* ---------- puste stany ---------- */
.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 22px 0; }
.empty .tile { display: none; }
.empty-title { font-weight: 600; font-size: var(--t-l); }
.empty-text { color: var(--muted); font-size: var(--t-s); max-width: 32ch; }

/* ---------- przebieg sprawy ---------- */
.steps { display: flex; align-items: flex-start; }
.step { flex: 1 1 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; position: relative; min-width: 0; padding-right: 4px; }
.step::before { content: ""; position: absolute; top: 11px; left: 0; right: 0; height: 2px; background: var(--linia); }
.step.is-done::before, .step.is-current::before { background: var(--swiatlo); }
.step-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; position: relative; z-index: 1; background: var(--noc); box-shadow: inset 0 0 0 var(--kreska) var(--mgla-2); color: var(--mgla); }
.step.is-done .step-dot, .step.is-current .step-dot { background: var(--swiatlo); box-shadow: none; color: var(--noc); }
.step-label { font-size: var(--t-xs); font-weight: 600; line-height: 1.2; }
.step-time { font-size: 12px; color: var(--muted); line-height: 1.2; font-variant-numeric: tabular-nums; }

.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { display: flex; flex-direction: column; gap: 3px; max-width: 86%; }
.msg-bubble { padding: 10px 12px; border-radius: 10px; font-size: var(--t-s); line-height: 1.4; overflow-wrap: anywhere; background: var(--beton); }
.msg-meta { font-size: 12px; color: var(--muted); padding: 0 2px; }
.msg.is-me { align-self: flex-end; align-items: flex-end; }
.msg.is-me .msg-bubble { background: var(--kartka); color: var(--noc); }
.event-line { align-self: stretch; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); padding: 6px 0 0; border-top: var(--kreska) solid var(--linia); }
.event-line .icon { width: 14px; height: 14px; }

.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.photo { position: relative; aspect-ratio: 1; overflow: hidden; border-radius: 3px; background: var(--beton); max-width: 100%; }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-del { position: absolute; top: 4px; right: 4px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--noc); color: var(--kartka); }
.photo-add {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 3px;
  color: var(--ink); font-size: var(--t-xs); font-weight: 500; box-shadow: inset 0 0 0 var(--kreska) var(--mgla-2);
  position: relative; overflow: hidden; cursor: pointer;
}
.photo-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.stars { display: flex; gap: 4px; }
.star-btn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--linia); }
.star-btn.is-on { color: var(--swiatlo); }
.star-btn.is-on .icon { fill: currentColor; }

/* ---------- animacje (ruch tylko przy zmianie stanu) ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fresh { from { background-color: var(--swiatlo-tlo); } to { background-color: transparent; } }
.is-fresh { animation: fresh 1.6s var(--krzywa); }

@media (prefers-reduced-motion: reduce) {
  :root { --t-krotki: 0ms; --t-sredni: 0ms; --t-swiatlo: 0ms; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
