/* ============================================================
   Fridgook — design system NEO-BRUTALISM
   Twarde czarne ramki, przesunięte cienie bez rozmycia, mocne akcenty.
   Mobile-first: aplikacja w jednym „telefonie”; na komputerze w ramce.
   ============================================================ */

/* ---------- tokeny ---------- */
:root {
  /* paleta */
  --ink: #0B0B0B;            /* tekst i ramki */
  --bg: #FFF4D6;             /* kremowe tło */
  --bg-dot: #F2DFA6;
  --surface: #FFFFFF;
  --surface-2: #FFFBEF;
  --muted: #45413A;
  --yellow: #FFD23F;
  --blue: #4D7CFE;
  --pink: #FF8FD8;
  --red: #FF5C39;
  --green: #2ED47A;
  --lilac: #C3B1FF;
  --mint: #B6F2D7;
  --sky: #9AD8FF;
  --on-accent: #0B0B0B;      /* tekst na kolorowych tłach zawsze czarny */
  /* statusy (pewność, terminy) */
  --hi: #0E8F4E;  --hi-bg: #B6F2D7;
  --mid: #9A6200; --mid-bg: #FFE38A;
  --lo: #C9260B;  --lo-bg: #FFC2B2;
  --manual: #2F5EE8;

  /* geometria */
  --bw: 3px;
  --bw-sm: 2px;
  --shadow-c: var(--ink);
  --sh: 4px 4px 0 var(--shadow-c);
  --sh-sm: 2px 2px 0 var(--shadow-c);
  --sh-lg: 6px 6px 0 var(--shadow-c);
  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-xl: 22px; --r-pill: 999px;

  /* typografia */
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --text: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* układ */
  --pad: 16px;
  --topbar-h: 60px;
  --tabbar-h: 72px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .9, .25, 1);

  /* zgodność ze starszymi stronami (panel admina, strona po płatności) */
  --fg: var(--ink); --card: var(--surface); --line: var(--ink);
  --p1: var(--blue); --p2: var(--green); --p3: var(--yellow); --p4: var(--red); --p5: var(--lilac);
  --gutter: var(--pad); --radius: var(--r);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F6F1E3; --bg: #141414; --bg-dot: #262626; --surface: #1F1F1F; --surface-2: #262626; --muted: #C2BBA8;
    --hi: #4BE39A; --hi-bg: #134D33; --mid: #FFC94A; --mid-bg: #4A3A0B; --lo: #FF8466; --lo-bg: #4D1A10; --manual: #8EA8FF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #F6F1E3; --bg: #141414; --bg-dot: #262626; --surface: #1F1F1F; --surface-2: #262626; --muted: #C2BBA8;
  --hi: #4BE39A; --hi-bg: #134D33; --mid: #FFC94A; --mid-bg: #4A3A0B; --lo: #FF8466; --lo-bg: #4D1A10; --manual: #8EA8FF;
  color-scheme: dark;
}

/* ---------- podstawy ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; height: 100%; overscroll-behavior: none; }
body {
  margin: 0; height: 100%; color: var(--ink); background: var(--bg);
  font: 400 16px/1.5 var(--text); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
::selection { background: var(--yellow); color: #0B0B0B; }
small { color: var(--muted); }
h1, h2, h3 { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* ---------- typografia ---------- */
.display { font: 800 clamp(2.3rem, 10.5vw, 3rem)/.95 var(--display); letter-spacing: -.02em; text-transform: uppercase;
  margin: 4px 0 10px; animation: pop-in .5s var(--ease) both; }
.display-2 { font: 800 1.75rem/1 var(--display); letter-spacing: -.01em; text-transform: uppercase; }
.display-3 { font: 800 1.2rem/1.15 var(--display); letter-spacing: -.005em; }
.section-label { font: 800 .78rem var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 26px 0 10px; }
.lede { font-size: 1rem; margin: 0 0 18px; color: var(--muted); max-width: 40ch; }
.hint { margin: 6px 0 12px; color: var(--muted); font-size: .92rem; }
.hint.small { font-size: .8rem; }
@keyframes pop-in { from { transform: translateY(8px) rotate(-1deg); opacity: 0; } }

/* ============================================================
   POWŁOKA: górny pasek, ekrany, dolna nawigacja
   ============================================================ */
.app {
  position: relative; height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
  background-color: var(--bg);
  background-image: radial-gradient(var(--bg-dot) 1.4px, transparent 1.6px);
  background-size: 18px 18px;
  transform: translateZ(0);              /* arkusze i komunikaty „fixed” zostają w ramce aplikacji */
}

.topbar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(10px + var(--safe-t)) var(--pad) 10px; min-height: calc(var(--topbar-h) + var(--safe-t));
  background: var(--bg); border-bottom: var(--bw) solid var(--ink); z-index: 5;
}
.brand { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.brand-logo { width: 36px; height: 36px; flex: 0 0 auto; }
.brand-name { font: 800 1.3rem/1 var(--display); letter-spacing: -.02em; }
.top-tools { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; padding: 0; cursor: pointer;
  background: var(--surface); color: var(--ink); border: var(--bw) solid var(--ink); border-radius: var(--r);
  box-shadow: var(--sh-sm); transition: transform .08s, box-shadow .08s;
}
.icon-btn .ico { width: 20px; height: 20px; }
.icon-btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--shadow-c); }
.goodies-pill {
  height: 44px; padding: 0 14px; cursor: pointer; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 800 .9rem var(--display); background: var(--yellow); color: var(--on-accent);
  border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-sm); transition: transform .08s, box-shadow .08s;
}
.goodies-pill:active { transform: translate(2px, 2px); box-shadow: none; }

.views { position: relative; flex: 1 1 auto; min-height: 0; }
.view {
  position: absolute; inset: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; visibility: hidden; scroll-behavior: auto;
}
.view.on { visibility: visible; }
.view-pad { padding: 18px var(--pad) calc(28px + var(--tabbar-h) + var(--safe-b)); max-width: 640px; margin: 0 auto; }

.tabbar {
  position: absolute; left: 10px; right: 10px; bottom: calc(10px + var(--safe-b)); z-index: 6;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 6px;
  background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh);
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-height: 52px; padding: 4px 2px; border: var(--bw-sm) solid transparent; border-radius: var(--r);
  background: transparent; color: var(--ink); cursor: pointer;
  font: 800 .66rem/1 var(--display); text-transform: uppercase; letter-spacing: .04em;
  transition: background-color .15s, transform .08s;
}
.tab .ico { width: 22px; height: 22px; }
.tab span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; line-height: 1.3; padding-top: 1px; }
.tab:active { transform: scale(.94); }
.tab[aria-current="page"] { background: var(--yellow); color: var(--on-accent); border-color: var(--ink); }
.tab-badge {
  position: absolute; top: 2px; right: calc(50% - 26px); min-width: 20px; height: 20px; padding: 0 5px;
  display: grid; place-items: center; font: 800 .7rem/1 var(--text); color: #fff; background: var(--red);
  border: var(--bw-sm) solid var(--ink); border-radius: var(--r-pill);
}
.tab-badge:empty { display: none; }

/* ---------- komputer: aplikacja w ramce telefonu ---------- */
@media (min-width: 720px) {
  body { display: grid; place-items: center; padding: 24px; min-height: 100vh; height: auto;
    background: var(--bg) radial-gradient(var(--bg-dot) 1.6px, transparent 1.8px) 0 0 / 22px 22px; }
  .app { width: 430px; height: min(900px, calc(100vh - 48px)); border: var(--bw) solid var(--ink);
    border-radius: 34px; box-shadow: 10px 10px 0 var(--shadow-c); }
  .topbar { border-radius: 31px 31px 0 0; }
}

/* ============================================================
   KOMPONENTY
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 20px;
  font: 800 .92rem/1.1 var(--display); text-transform: uppercase; letter-spacing: .02em; text-decoration: none; text-align: center;
  color: var(--ink); background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r);
  box-shadow: var(--sh); cursor: pointer; user-select: none;
  transition: transform .08s ease-out, box-shadow .08s ease-out, background-color .15s;
}
.btn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--shadow-c); }
.btn:disabled { opacity: .45; cursor: default; box-shadow: none; transform: translate(2px, 2px); }
.btn-primary { background: var(--yellow); color: var(--on-accent); }
.btn-accent { background: var(--blue); color: #fff; }
.btn-ghost { background: var(--surface); }
.btn-danger { background: var(--lo-bg); color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 8px 14px; font-size: .78rem; box-shadow: var(--sh-sm); }
.btn-sm:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
.btn .go-count:not(:empty) { background: #fff; color: #0B0B0B; border: 2px solid #0B0B0B; border-radius: var(--r-pill); padding: 1px 7px; font: 800 .72rem var(--text); }
.btn-ghost.pulse { background: var(--yellow); animation: nudge 1.4s infinite; }
@keyframes nudge { 50% { transform: translate(-1px, -1px); box-shadow: 6px 6px 0 var(--shadow-c); } }

.link-btn { margin: 0; padding: 4px 2px; min-height: 32px; border: 0; background: none; cursor: pointer;
  color: var(--ink); font: 700 .88rem var(--text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.link-btn.danger { color: var(--lo); }

.card { background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh); padding: 16px; }
.card-yellow { background: var(--yellow); color: var(--on-accent); }
.card-yellow .hint { color: #2A2620; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip {
  min-height: 36px; padding: 6px 13px; cursor: pointer; font: 700 .85rem var(--text);
  color: var(--ink); background: var(--surface); border: var(--bw-sm) solid var(--ink); border-radius: var(--r-pill);
  box-shadow: var(--sh-sm); transition: transform .08s, box-shadow .08s;
}
.chip:active { transform: translate(2px, 2px); box-shadow: none; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.chip.off { background: transparent; color: var(--muted); text-decoration: line-through; box-shadow: none; border-style: dashed; }
.chip sup { font-size: .68rem; margin-left: 4px; }

/* pola formularzy */
.stack-form { display: grid; gap: 14px; margin: 14px 0 6px; }
.stack-form label, .item-form label { display: grid; gap: 6px; font: 700 .8rem var(--text); color: var(--ink); }
input:not([type="checkbox"]):not([type="file"]), select, textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font: 500 1rem var(--text); color: var(--ink);
  background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: inset 0 0 0 transparent;
  transition: box-shadow .12s, transform .12s;
}
input:focus, select:focus, textarea:focus { outline: none; box-shadow: var(--sh-sm); transform: translate(-1px, -1px); }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
textarea { min-height: 80px; }
.form-error { min-height: 1.2em; margin: 0; color: var(--lo); font-weight: 700; font-size: .88rem; }
.field-hint { font-weight: 500; }
.switch-line { margin: 6px 0 0; text-align: center; }

/* przełącznik */
.switch { appearance: none; position: relative; width: 56px; height: 32px; margin: 0; cursor: pointer; flex: 0 0 auto;
  background: var(--surface-2); border: var(--bw) solid var(--ink); border-radius: var(--r-pill); transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); transition: transform .18s var(--ease); }
.switch:checked { background: var(--green); }
.switch:checked::after { transform: translateX(24px); }

/* stan pusty */
.empty-state { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 34px 18px 26px; margin-top: 8px;
  background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: var(--sh); }
.empty-state p { margin: 0; color: var(--muted); max-width: 34ch; }
.empty-state .btn { width: 100%; max-width: 320px; }
.empty-ico { width: 72px; height: 72px; display: grid; place-items: center; background: var(--lilac); color: #0B0B0B;
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-sm); transform: rotate(-4deg); }
.empty-ico .ico { width: 34px; height: 34px; }
#fridge-guest .empty-ico { background: var(--mint); }
.guest-logo { width: 86px; height: 86px; transform: rotate(-5deg); }
.empty-note { padding: 16px; border: var(--bw) dashed var(--ink); border-radius: var(--r-lg); text-align: center; }

/* szkielety ładowania */
.skel-card, .recipe.skeleton { height: 110px; margin-bottom: 12px; border: var(--bw) solid var(--ink); border-radius: var(--r-lg);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.1s linear infinite; box-shadow: var(--sh); }
.recipe.skeleton { height: 300px; }
@keyframes shimmer { to { background-position: -150% 0; } }

/* ============================================================
   SKAN
   ============================================================ */
.scan { display: grid; gap: 14px; }
.fridge {
  position: relative; display: grid; place-items: center; width: 100%; aspect-ratio: 4 / 3.4; overflow: hidden; cursor: pointer;
  background: var(--sky); color: #0B0B0B; border: var(--bw) solid var(--ink); border-radius: var(--r-xl); box-shadow: var(--sh-lg);
  transition: transform .1s, box-shadow .1s;
}
.fridge::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(-45deg, transparent 0 16px, rgba(255, 255, 255, .28) 16px 30px); }
.fridge:active { transform: translate(3px, 3px); box-shadow: 3px 3px 0 var(--shadow-c); }
.fridge.over { background: var(--yellow); }
.drop-empty { position: relative; display: grid; justify-items: center; gap: 14px; text-align: center; padding: 18px; }
.drop-cam { width: 92px; height: 92px; display: grid; place-items: center; background: var(--yellow);
  border: var(--bw) solid #0B0B0B; border-radius: 50%; box-shadow: 4px 4px 0 #0B0B0B; animation: bob 2.4s ease-in-out infinite; }
.drop-cam .ico { width: 44px; height: 44px; stroke: #0B0B0B; }
@keyframes bob { 50% { transform: translateY(-5px) rotate(-3deg); } }
.door-hint { font: 800 1rem var(--display); text-transform: uppercase; letter-spacing: .02em; background: #fff;
  border: var(--bw-sm) solid #0B0B0B; border-radius: var(--r-pill); padding: 6px 14px; }
.fridge #preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fridge.has-photo .drop-empty { display: none; }
.scanline { position: absolute; left: 0; right: 0; top: 0; height: 10px; opacity: 0; background: var(--yellow);
  border-block: var(--bw-sm) solid #0B0B0B; }
body.scanning .scanline { opacity: 1; animation: sweep 1.5s ease-in-out infinite alternate; }
@keyframes sweep { from { top: 2%; } to { top: 94%; } }

.drop-text { margin: 0; }
.drop-text strong { display: block; font: 800 1.05rem var(--display); }
.drop-text span { color: var(--muted); font-size: .92rem; }

.photo-strip { display: flex; flex-wrap: wrap; gap: 10px; }
.pthumb { position: relative; width: 62px; height: 62px; }
.pthumb-img { position: absolute; inset: 0; padding: 0; overflow: hidden; cursor: pointer; background: var(--surface);
  border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-sm); }
.pthumb.on .pthumb-img { outline: 3px solid var(--blue); outline-offset: 2px; }
.pthumb-img img { width: 100%; height: 100%; object-fit: cover; }
.pthumb b { position: absolute; left: 5px; bottom: 5px; font: 800 10px var(--text); color: #fff; background: #0B0B0B; border-radius: 6px; padding: 0 5px; pointer-events: none; }
.pthumb-x { position: absolute; right: -7px; top: -7px; width: 26px; height: 26px; padding: 0; cursor: pointer;
  background: var(--red); color: #fff; font: 800 15px/1 var(--text); border: var(--bw-sm) solid var(--ink); border-radius: 50%; }
.padd { width: 62px; height: 62px; display: grid; place-content: center; text-align: center; cursor: pointer;
  font: 800 22px/1 var(--display); background: var(--surface); border: var(--bw) dashed var(--ink); border-radius: var(--r); }
.padd small { font: 700 9px var(--text); color: var(--muted); margin-top: 2px; text-transform: uppercase; }

.usage { margin: 0; font: 700 .86rem var(--text); color: var(--muted); text-align: center; }
.usage.low { color: var(--lo); }

/* postęp */
.progress { margin-top: 16px; padding: 14px; background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh); }
.progress-head { display: flex; justify-content: space-between; gap: 10px; font: 700 .9rem var(--text); margin-bottom: 10px; }
.progress-head #progress-num { font-family: var(--display); font-weight: 800; }
.progress-track { height: 22px; overflow: hidden; background: var(--surface-2); border: var(--bw) solid var(--ink); border-radius: var(--r-pill); }
.progress-fill { height: 100%; width: 0; transition: width .25s linear; border-right: var(--bw) solid var(--ink);
  background: repeating-linear-gradient(-45deg, var(--yellow) 0 10px, #FFE27F 10px 20px); background-size: 28px 28px;
  animation: stripes .7s linear infinite; }
@keyframes stripes { to { background-position: 28px 0; } }
.progress.fail .progress-fill { background: var(--red); animation: none; }
.status { min-height: 1.4em; margin: 10px 0 0; color: var(--lo); font-weight: 700; }

/* baner konta pod przyciskiem */
.acct-banner { display: grid; gap: 10px; padding: 14px; background: var(--pink); color: var(--on-accent);
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh); font-size: .92rem; }
.acct-banner strong { font: 800 1rem var(--display); }
.acct-banner .btn { justify-self: stretch; }

/* wyniki */
.results { margin-top: 26px; display: grid; gap: 22px; scroll-margin-top: 8px; }
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding-top: 18px; border-top: var(--bw) solid var(--ink); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: .84rem; }
.meta > * { padding: 4px 10px; background: var(--surface); border: var(--bw-sm) solid var(--ink); border-radius: var(--r-pill); }
.meta b { font-weight: 800; }
.sect { display: grid; gap: 10px; }
.sect-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* do sprawdzenia */
.review ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 10px; }
.review li { display: grid; grid-template-columns: auto 1fr; gap: 10px 12px; align-items: center; padding: 12px;
  background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.review li > .thumb { grid-row: span 2; }
.review li .assign-btn { grid-column: 1 / -1; }
.no { font: 800 1.4rem/1 var(--display); min-width: 1.6em; }
.review-body { min-width: 0; font-size: .92rem; }
.tag { display: inline-block; font: 700 .72rem var(--text); padding: 2px 8px; margin-right: 6px; border: var(--bw-sm) solid var(--ink); border-radius: var(--r-pill); }
.tag.lo { background: var(--mid-bg); }
.tag.unk { background: var(--surface-2); }
.assign-btn { min-height: 44px; font: 800 .8rem var(--display); text-transform: uppercase; cursor: pointer; color: var(--ink);
  background: var(--yellow); color: var(--on-accent); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-sm); }
.assign-btn:active { transform: translate(2px, 2px); box-shadow: none; }
.missing { display: grid; gap: 4px; }
.add-form { display: grid; gap: 10px; margin-top: 6px; }

/* miniatury */
.thumb { --s: 64px; width: var(--s); height: var(--s); flex: 0 0 var(--s); padding: 0; overflow: hidden; cursor: zoom-in;
  background: var(--surface-2); border: var(--bw-sm) solid var(--ink); border-radius: var(--r-sm); }
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.thumb.empty { display: grid; place-items: center; text-align: center; font-size: .6rem; line-height: 1.2; color: var(--muted); cursor: default; }
.prod { display: flex; gap: 10px; align-items: center; font-weight: 700; }

/* produkty: lista kart zamiast tabeli */
.table-wrap { margin-top: 4px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
thead { display: none; }
tbody { display: grid; gap: 10px; }
tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 6px 10px; padding: 12px;
  background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
tbody td { padding: 0; border: 0; font-size: .86rem; color: var(--muted); }
tbody td:nth-child(1) { grid-column: 1; grid-row: 1; color: var(--ink); }
tbody td:nth-child(5) { grid-column: 2; grid-row: 1; justify-self: end; align-self: start; }
tbody td:nth-child(2), tbody td:nth-child(3), tbody td:nth-child(4), tbody td:nth-child(6) { grid-column: 1 / -1; padding-left: 74px; }
tbody td:nth-child(2):empty, tbody td:nth-child(3):empty, tbody td:nth-child(6):empty { display: none; }
tbody td[colspan] { grid-column: 1 / -1; padding-left: 0; }
.conf { display: inline-block; white-space: nowrap; font: 800 .74rem var(--text); padding: 3px 9px; color: var(--ink);
  border: var(--bw-sm) solid var(--ink); border-radius: var(--r-pill); }
.conf.hi { background: var(--hi-bg); } .conf.mid { background: var(--mid-bg); } .conf.lo { background: var(--lo-bg); }
.conf.manual { background: var(--sky); color: #0B0B0B; }
tbody tr.manual-row { background: color-mix(in srgb, var(--sky) 30%, var(--surface)); }
.raw { font-size: .85rem; }
.raw summary { cursor: pointer; font-weight: 700; color: var(--muted); }
pre { background: var(--surface); border: var(--bw-sm) solid var(--ink); padding: 12px; border-radius: var(--r); overflow-x: auto; font-size: .74rem; }

.foot { margin-top: 30px; text-align: center; font-size: .78rem; color: var(--muted); }

/* ============================================================
   PRZEPISY
   ============================================================ */
.filters { display: grid; gap: 10px; }
.filters-toggle { justify-self: start; }
.filters.open .filters-toggle { background: var(--ink); color: var(--bg); }
.filter-groups { display: none; flex-direction: column; gap: 12px; padding: 14px; background: var(--surface);
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.filters.open .filter-groups { display: flex; }
.fgroup { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.filter-label { width: 100%; font: 800 .7rem var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.fopt { min-height: 36px; padding: 5px 12px; cursor: pointer; font: 700 .84rem var(--text); color: var(--ink);
  background: var(--surface); border: var(--bw-sm) solid var(--ink); border-radius: var(--r-pill); }
.fopt sup { font-size: .65rem; margin-left: 3px; }
.fopt[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.fopt:disabled { opacity: .35; cursor: default; }
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.active-filters:empty { display: none; }
.afilter { min-height: 34px; padding: 4px 12px; cursor: pointer; font: 700 .82rem var(--text); color: #0B0B0B;
  background: var(--lilac); border: var(--bw-sm) solid var(--ink); border-radius: var(--r-pill); }
.afilter::after { content: " ×"; }
.areset { border: 0; background: none; cursor: pointer; color: var(--lo); font: 700 .85rem var(--text); text-decoration: underline; }

.recipe-list { display: grid; gap: 16px; margin-top: 6px; }
.recipe { display: grid; overflow: hidden; background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh); }
.recipe-img-btn { display: block; padding: 0; border: 0; border-bottom: var(--bw) solid var(--ink); cursor: pointer;
  background: repeating-linear-gradient(-45deg, var(--mint) 0 14px, color-mix(in srgb, var(--mint) 60%, var(--surface)) 14px 28px); }
div.recipe-img { aspect-ratio: auto; height: 56px; }
.recipe-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.recipe-body { display: grid; gap: 10px; padding: 14px; }
.recipe-top { display: flex; gap: 12px; align-items: flex-start; }
.rank { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; font: 800 1.05rem/1 var(--display);
  background: var(--yellow); color: #0B0B0B; border: var(--bw) solid var(--ink); border-radius: var(--r); transform: rotate(-4deg); }
.recipe h3 { font: 800 1.12rem/1.15 var(--display); }
.recipe-top small { display: block; margin-top: 3px; }
.match { display: flex; align-items: center; gap: 10px; font-size: .86rem; color: var(--muted); }
.match b { color: var(--ink); font: 800 1rem var(--display); }
.match-track { flex: 1 1 auto; max-width: 160px; height: 14px; overflow: hidden; background: var(--surface-2);
  border: var(--bw-sm) solid var(--ink); border-radius: var(--r-pill); }
.match-fill { height: 100%; border-right: var(--bw-sm) solid var(--ink); }
.match-fill.hi { background: var(--green); } .match-fill.mid { background: var(--yellow); } .match-fill.lo { background: var(--red); }
.ings { display: flex; flex-wrap: wrap; gap: 6px; }
.ing { font: 600 .78rem var(--text); padding: 3px 9px; border: var(--bw-sm) solid var(--ink); border-radius: var(--r-pill); }
.ing.have { background: var(--hi-bg); }
.ing.need { background: transparent; border-style: dashed; color: var(--muted); }
.recipe-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.facts { display: flex; gap: 12px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); }
.open-btn { min-height: 44px; padding: 8px 16px; cursor: pointer; font: 800 .8rem var(--display); text-transform: uppercase;
  color: #fff; background: var(--blue); border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-sm); }
.open-btn:active { transform: translate(2px, 2px); box-shadow: none; }

/* ============================================================
   MOJA LODÓWKA
   ============================================================ */
.swipe-hint { margin: 0 0 4px; }
.items-list { display: grid; gap: 12px; margin: 10px 0 18px; }
.item-card { position: relative; display: grid; gap: 8px; padding: 14px; touch-action: pan-y;
  background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  transition: background-color .15s; }
.item-card.swipe-armed { background: var(--lo-bg); }
.item-card.done { opacity: .6; }
.item-main { display: flex; flex-direction: column; gap: 3px; }
.item-main strong { font: 800 1.05rem var(--display); }
.item-main small { color: var(--muted); }
.item-dates { display: flex; gap: 10px; margin: 0; }
.item-dates > div { flex: 1; padding: 6px 10px; background: var(--surface-2); border: var(--bw-sm) solid var(--ink); border-radius: var(--r-sm); }
.item-dates dt { font: 800 .62rem var(--display); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.item-dates dd { margin: 0; font-weight: 700; font-size: .9rem; }
.item-comment { margin: 0; font-size: .9rem; white-space: pre-wrap; }
.item-btns { display: flex; gap: 16px; }
.xbadge { align-self: flex-start; font: 800 .72rem var(--text); padding: 2px 9px; color: var(--ink); border: var(--bw-sm) solid var(--ink); border-radius: var(--r-pill); }
.xbadge.ok { background: var(--hi-bg); } .xbadge.mid { background: var(--mid-bg); } .xbadge.lo { background: var(--lo-bg); }
.item-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; margin-top: 12px;
  background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.item-form.editing { background: var(--surface-2); }
.item-form .wide { grid-column: 1 / -1; }
.item-form .qty { display: grid; grid-template-columns: 1fr 76px; gap: 6px; }
.form-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.form-btns .btn { flex: 1; }
.item-add summary { list-style: none; }
.item-add summary::-webkit-details-marker { display: none; }

/* ============================================================
   KONTO
   ============================================================ */
.balance { display: grid; gap: 4px; transform: rotate(-.6deg); }
.balance-label { font: 800 .74rem var(--display); text-transform: uppercase; letter-spacing: .08em; }
.balance-num { font: 800 2.6rem/1 var(--display); letter-spacing: -.02em; }
.balance .hint { margin: 0; font-size: .86rem; }
.st-active { color: var(--hi); } .st-pending { color: var(--mid); } .st-blocked { color: var(--lo); }
.card-yellow .st-active { color: #0B5C33; } .card-yellow .st-pending { color: #6B3F00; }
.acct-pay { display: grid; gap: 8px; margin: 16px 0 0; padding: 14px; background: var(--pink); color: var(--on-accent);
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh); }
.acct-pay p { margin: 0; }
.acct-pay .hint { color: #2A2620; }
.acct-pay.plain { padding: 0; background: none; border: 0; box-shadow: none; }
.acct-pay.plain .btn { width: 100%; }
.row-btns { display: grid; gap: 10px; }
.pay-history { margin-top: 16px; padding: 0; }
.pay-history summary { cursor: pointer; list-style: none; padding: 14px 16px; font: 800 .95rem var(--display); display: flex; justify-content: space-between; }
.pay-history summary::after { content: "▾"; }
.pay-history[open] summary::after { content: "▴"; }
.pay-history summary::-webkit-details-marker { display: none; }
.pay-list { display: grid; gap: 8px; padding: 0 12px 12px; }
.pay-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; padding: 10px 12px; font-size: .85rem;
  background: var(--surface-2); border: var(--bw-sm) solid var(--ink); border-radius: var(--r); }
.pay-row small { display: block; }
.pay-st { font-weight: 800; justify-self: end; }
.pay-st.st-paid { color: var(--hi); } .pay-st.st-refunded, .pay-st.st-failed { color: var(--lo); }
.settings { display: grid; padding: 0; overflow: hidden; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 60px; padding: 10px 16px;
  font: 700 .95rem var(--text); border: 0; border-bottom: var(--bw-sm) solid var(--ink); background: none; color: var(--ink); text-align: left; }
.set-row:last-child { border-bottom: 0; }
.set-row select { width: auto; min-width: 150px; min-height: 44px; padding: 8px 34px 8px 12px; }
.set-link { cursor: pointer; width: 100%; }
.set-link:active { background: var(--surface-2); }
.acct-actions { display: grid; gap: 12px; margin-top: 20px; }

/* ============================================================
   ARKUSZE OD DOŁU (bottom sheets)
   ============================================================ */
body.no-scroll { overflow: hidden; }
.modal { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center;
  background: color-mix(in srgb, #0B0B0B 50%, transparent); animation: fade .2s ease-out; }
@keyframes fade { from { opacity: 0; } }
.modal-box {
  position: relative; width: 100%; max-width: 640px; max-height: 92%; overflow-y: auto; overscroll-behavior: contain;
  padding: 30px var(--pad) calc(22px + var(--safe-b)); background: var(--surface);
  border: var(--bw) solid var(--ink); border-bottom: 0; border-radius: var(--r-xl) var(--r-xl) 0 0;
  box-shadow: 0 -5px 0 var(--shadow-c); animation: sheet-up .32s var(--ease); touch-action: pan-y;
}
.modal-box::before { content: ""; position: absolute; top: 9px; left: 50%; width: 48px; height: 6px; margin-left: -24px;
  background: var(--ink); border-radius: var(--r-pill); }
@keyframes sheet-up { from { transform: translateY(100%); } }
.modal-box > h2:first-of-type, #rm-content > :first-child { margin-right: 52px; }
.modal-close { position: absolute; top: 16px; right: 14px; z-index: 2; width: 44px; height: 44px; cursor: pointer;
  font: 800 1rem var(--text); background: var(--surface); color: var(--ink); border: var(--bw) solid var(--ink);
  border-radius: var(--r); box-shadow: var(--sh-sm); }
.modal-close:active { transform: translate(2px, 2px); box-shadow: none; }

/* szczegóły przepisu */
.rm-img { width: calc(100% + 2 * var(--pad)); max-width: none; margin: -12px calc(-1 * var(--pad)) 16px; aspect-ratio: 16 / 9; object-fit: cover;
  border-block: var(--bw) solid var(--ink); }
#rm-content > .rm-img:first-child { margin-right: calc(-1 * var(--pad)); }
#rm-title { font: 800 1.6rem/1.02 var(--display); text-transform: uppercase; margin: 0 52px 6px 0; }
.rm-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }
.rm-meta span { padding: 4px 10px; font: 700 .82rem var(--text); background: var(--surface-2); border: var(--bw-sm) solid var(--ink); border-radius: var(--r-pill); }
.rm-grid { display: grid; gap: 22px; }
.rm-grid h3 { font: 800 1.05rem var(--display); text-transform: uppercase; }
.rm-ings { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rm-ings li { display: flex; gap: 10px; padding: 8px 10px; font-size: .92rem; border: var(--bw-sm) solid var(--ink); border-radius: var(--r-sm); }
.rm-ings li span { width: 1em; flex: 0 0 auto; }
.rm-ings li.have { background: var(--hi-bg); font-weight: 700; }
.rm-steps { list-style: none; counter-reset: step; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.rm-steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 10px; line-height: 1.55; }
.rm-steps li::before { content: counter(step); display: grid; place-items: center; width: 32px; height: 32px; font: 800 .95rem var(--display);
  background: var(--yellow); color: #0B0B0B; border: var(--bw-sm) solid var(--ink); border-radius: var(--r-sm); }
.rm-source { margin: 22px 0 0; padding-top: 12px; border-top: var(--bw-sm) solid var(--ink); font-size: .82rem; color: var(--muted); }

/* rejestracja, pomoc, pakiety */
.signup-offer { margin: 12px 0 0; padding: 12px 14px; font-weight: 700; background: var(--yellow); color: var(--on-accent);
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.help-list { list-style: none; margin: 16px 0 20px; padding: 0; display: grid; gap: 12px; }
.help-list li { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; }
.help-list strong { font: 800 .98rem var(--display); }
.help-list p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.help-n { width: 40px; height: 40px; display: grid; place-items: center; font: 800 1rem var(--display); color: #0B0B0B;
  border: var(--bw) solid var(--ink); border-radius: var(--r); box-shadow: var(--sh-sm); }
.help-list li:nth-child(6n+1) .help-n { background: var(--yellow); }
.help-list li:nth-child(6n+2) .help-n { background: var(--sky); }
.help-list li:nth-child(6n+3) .help-n { background: var(--mint); }
.help-list li:nth-child(6n+4) .help-n { background: var(--pink); }
.help-list li:nth-child(6n+5) .help-n { background: var(--lilac); }
.help-list li:nth-child(6n+6) .help-n { background: var(--red); }
.pack-list { display: grid; gap: 18px; margin: 18px 0 14px; }
.pack { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; padding: 18px 16px 16px;
  background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh); }
.pack-popular { background: var(--yellow); color: var(--on-accent); }
.pack-best { background: var(--mint); color: var(--on-accent); }
.pack-badge { position: absolute; top: -13px; left: 14px; padding: 3px 10px; font: 800 .66rem var(--display); text-transform: uppercase;
  letter-spacing: .05em; color: #fff; background: #0B0B0B; border: var(--bw-sm) solid #0B0B0B; border-radius: var(--r-pill); transform: rotate(-2deg); }
.pack-best .pack-badge { background: var(--red); }
.pack-goodies { grid-column: 1; font: 800 1.7rem/1 var(--display); }
.pack-unit { grid-column: 1; font: 800 .72rem var(--display); text-transform: uppercase; }
.pack-photos { grid-column: 1; font-size: .88rem; }
.pack-bonus { grid-column: 1; font: 800 .82rem var(--text); color: var(--hi); }
.pack-popular .pack-bonus, .pack-best .pack-bonus { color: #0B5C33; }
.pack-bonus.empty { display: none; }
.pack .btn { grid-column: 2; grid-row: 1 / span 4; min-height: 52px; padding: 10px 14px; font-size: .82rem; }
.pack-popular .btn, .pack-best .btn { background: #fff; color: #0B0B0B; }

/* podgląd ramki na zdjęciu */
.lightbox { position: fixed; inset: 0; z-index: 45; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 16px; background: rgba(11, 11, 11, .92); cursor: zoom-out; }
.lightbox canvas { max-width: 100%; border: var(--bw) solid #fff; border-radius: var(--r); }
.lightbox p { margin: 0; color: #fff; font-weight: 700; }

/* komunikat */
.toast { position: fixed; left: 14px; right: 14px; bottom: calc(var(--tabbar-h) + 22px + var(--safe-b)); z-index: 50;
  padding: 14px 16px; font-weight: 700; background: var(--green); color: #0B0B0B; border: var(--bw) solid var(--ink);
  border-radius: var(--r-lg); box-shadow: var(--sh); animation: toast-in .3s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } }

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

/* ============================================================
   Poprawki z audytu UX
   ============================================================ */
/* pokaż/ukryj hasło zamiast pola „powtórz hasło” (WCAG 3.3.7/3.3.8) */
.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 112px !important; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); min-height: 38px; max-width: 104px; padding: 4px 10px;
  font: 700 .74rem var(--text); color: var(--ink); background: var(--surface-2); border: var(--bw-sm) solid var(--ink);
  border-radius: var(--r-sm); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pass-eye[aria-pressed="true"] { background: var(--yellow); color: #0B0B0B; }

/* przepis jako osobny ekran (NN/g: długie treści nie w arkuszu) */
.page { position: fixed; inset: 0; z-index: 42; display: flex; flex-direction: column; background: var(--bg);
  animation: page-in .28s var(--ease); }
@keyframes page-in { from { transform: translateX(100%); } }
.page-bar { display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t)) var(--pad) 10px;
  background: var(--bg); border-bottom: var(--bw) solid var(--ink); }
.page-bar .icon-btn { font: 800 1.2rem var(--text); }
.page-title { font: 800 1.1rem var(--display); text-transform: uppercase; }
.page-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 0 var(--pad) calc(28px + var(--safe-b)); }
.page-body .rm-img { width: calc(100% + 2 * var(--pad)); margin: 0 calc(-1 * var(--pad)) 16px; border-top: 0; }
.page-body #rm-title { margin: 16px 0 6px; }

/* fokus nie chowa się pod dolną nawigacją (WCAG 2.4.11) */
.view { scroll-padding-bottom: calc(var(--tabbar-h) + 30px + var(--safe-b)); scroll-padding-top: 12px; }
.app.kb-open .tabbar { display: none; }
.app.kb-open .view-pad { padding-bottom: 24px; }

/* brak sieci / budzenie serwera */
.net-note { margin: 0; padding: 9px var(--pad); font: 700 .84rem var(--text); text-align: center;
  background: var(--sky); color: #0B0B0B; border-bottom: var(--bw) solid var(--ink); }
.net-note.bad { background: var(--red); color: #fff; }

/* przyciski i komunikaty ostrzegawcze */
.btn-danger-solid { background: var(--red); color: #fff; }
.danger-note { margin: 12px 0 0; padding: 12px 14px; font-weight: 600; background: var(--lo-bg); color: var(--ink);
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg); }
.set-row.danger-row { color: var(--lo); }
.sent-note { background: var(--green) !important; font-weight: 700; }
.confirm-btns { margin-top: 18px; }
.empty-state.slim { padding: 22px 16px; }

.first-tip { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; padding: 10px 10px 10px 14px; background: var(--lilac); color: #0B0B0B;
  border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: var(--sh-sm); }
.first-tip span { flex: 1; font-size: .92rem; }
.first-tip .btn { color: #0B0B0B; }
.tip-x { width: 44px; height: 44px; flex: 0 0 auto; border: 0; background: none; color: #0B0B0B; font: 800 1rem var(--text); cursor: pointer; }

/* wyniki: dwie główne akcje zawsze na górze (przepisy + zapis do lodówki) */
.results-head { padding-bottom: 0; }
.results-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: -8px; }
.results-actions .btn { min-height: 52px; padding-inline: 10px; white-space: normal; line-height: 1.15; }
.results-actions .btn.is-saved { background: var(--green); color: #0B0B0B; }
.save-status { margin: -12px 0 0; min-height: 0; }
.save-status:empty { display: none; }
@media (max-width: 340px) { .results-actions { grid-template-columns: 1fr; } }

/* pasek postępu znika po zakończeniu */
.progress { transition: opacity .25s ease, transform .25s ease; }
.progress.leaving { opacity: 0; transform: translateY(-6px); }

/* arkusz „to już jest w lodówce?” */
.dup-all { margin: 4px 0 2px; }
.dup-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 10px; }
.dup-row { display: grid; gap: 10px; padding: 12px; background: var(--surface); border: var(--bw) solid var(--ink); border-radius: var(--r-lg); box-shadow: 3px 3px 0 var(--ink); }
.dup-names { display: grid; gap: 2px; min-width: 0; }
.dup-names strong { font: 800 1rem var(--display); overflow-wrap: anywhere; }
.dup-names small { color: var(--muted); font-size: .84rem; }
.seg { display: grid; grid-template-columns: 1fr 1fr; border: var(--bw) solid var(--ink); border-radius: var(--r-pill); overflow: hidden; }
.seg button { min-height: 44px; border: 0; background: var(--surface); color: var(--ink); font: 800 .9rem var(--text); cursor: pointer; }
.seg button + button { border-left: var(--bw) solid var(--ink); }
.seg button[aria-checked="true"] { background: var(--yellow); color: #0B0B0B; }
.seg button[data-dup-pick="new"][aria-checked="true"] { background: var(--mint); }
.dup-help { font-size: .84rem; }

/* rejestracja: akceptacja regulaminu */
.stack-form .terms-check, .terms-check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; line-height: 1.35; cursor: pointer; }
.stack-form .terms-check input, .terms-check input { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; flex: 0 0 auto; margin: 0;
  background: var(--surface) center / 18px no-repeat; border: var(--bw) solid var(--ink); border-radius: 8px; box-shadow: var(--sh-sm); cursor: pointer;
  transition: transform .12s var(--ease), background-color .15s; }
.terms-check input:checked { background-color: var(--yellow);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B0B0B' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.terms-check input:active { transform: translate(2px, 2px); box-shadow: none; }
.terms-check input:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.terms-links { margin: -4px 0 0 38px; font-size: .86rem; font-weight: 700; }
a.set-row { color: inherit; text-decoration: none; }
.foot a { color: inherit; }

/* płynne przejście strona wizytówka ↔ aplikacja */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
.rm-summary { margin: 10px 0 16px; font-size: 1rem; line-height: 1.5; }
.rm-source a { color: inherit; }

/* „+ do lodówki” przy każdym produkcie (zbiorczy przycisk zapisuje pozostałe) */
.prod-name { flex: 1 1 auto; min-width: 0; }
.addf { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 11px 4px 9px;
  background: var(--yellow); color: #0B0B0B; border: var(--bw-sm) solid #0B0B0B; border-radius: 999px; box-shadow: 2px 2px 0 #0B0B0B;
  font: 800 .78rem/1 var(--display, inherit); cursor: pointer; transition: transform .08s, box-shadow .08s, background .15s; }
.addf > span[aria-hidden] { font-size: 1.05rem; line-height: 1; }
.addf:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 #0B0B0B; }
.addf:active { transform: translate(2px, 2px); box-shadow: none; }
.addf.on { background: var(--green); }
.addf.on:hover .addf-txt { text-decoration: line-through; }
.addf.busy { opacity: .6; cursor: progress; }
.addf.on > span[aria-hidden] { animation: addf-pop .3s ease-out; }
@keyframes addf-pop { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } }
@media (max-width: 380px) { .addf-txt { display: none; } .addf { width: 36px; justify-content: center; padding: 0; } .addf > span[aria-hidden] { font-size: 1.3rem; } }
@media (prefers-reduced-motion: reduce) { .addf, .addf > span[aria-hidden] { animation: none; transition: none; } }
