/* Layout: kuchenne pasy. Pełnoszerokie pasy na przemian w dwóch odcieniach skorupki kaczego jaja;
   w każdym asymetryczny podział stawia obiekt (jajko, szklankę, wykres) obok kontrolek, które go zmieniają. */
:root {
  --bg: #EEF3EF;
  --bg-alt: #E2EBE6;
  --surface: #FAFCFA;
  --ink: #15201C;
  --ink-2: #4A5A54;
  --line: #C5D3CC;
  --yolk: #F4A300;
  --yolk-ink: #8F4E00;
  --on-yolk: #1D1405;
  --good: #2E7A58;
  --warn: #B45309;
  --bad: #B42318;
  --fav: #D2365A;
  --stamp: #B4232A;
  --shell-hi: #FFF6E8;
  --shell: #EFD7B3;
  --shell-shade: #C9A578;
  --shell-ink: #6B5436;
  --crack: #6E4F2B;
  --albumen: #FFFFFF;
  --albumen-thin: #E4F0F3;
  --albumen-thick: #CDE2EA;
  --cord: #8DB3C1;
  --membrane: #9FB5AE;
  --air: #B5D3E2;
  --yolk-set: #F7D160;
  --yolk-runny: #F39200;
  --chick: #FFD23F;
  --chick-ink: #2A2118;
  --cheek: #FF9E8A;
  --beak: #F08A00;
  --glint: #FFFFFF;
  --water: #7FC1D3;
  --glass: #8FA6A0;
  --shadow: rgba(21, 32, 28, .14);
  --carton: #D6C9B1;
  --carton-cup: #CBBDA3;
  --carton-shade: #A39274;
  --scrim: rgba(0, 0, 0, .55);
  --on-scrim: #FFFFFF;
  --av-0: #F4A300;
  --av-1: #EFD7B3;
  --av-2: #B5D3E2;
  --av-3: #F5B8A8;
  --av-4: #C9E2B0;
  --av-ink: #1D1405;

  --f-display: "Unbounded", "Arial Black", "Helvetica Neue", system-ui, sans-serif;
  --f-body: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --t-xs: .75rem;
  --t-sm: .875rem;
  --t-base: 1rem;
  --t-md: 1.125rem;
  --t-lg: clamp(1.1rem, 1rem + .5vw, 1.3rem);
  --t-xl: clamp(1.9rem, 1.1rem + 3.2vw, 3.1rem);
  --t-hero: clamp(4.5rem, 14vw, 13rem);

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 16px;
  --radius-sm: 10px;
  --nav-h: 60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0C1412;
    --bg-alt: #111C19;
    --surface: #16221E;
    --ink: #E3ECE8;
    --ink-2: #98AAA3;
    --line: #283833;
    --yolk: #FFB01F;
    --yolk-ink: #FFC24D;
    --on-yolk: #1D1405;
    --good: #5DCB98;
    --warn: #F5A04A;
    --bad: #FF7B6B;
    --fav: #FF6F8E;
    --stamp: #B4232A;
    --shell-hi: #FFF3DF;
    --shell: #E6CCA4;
    --shell-shade: #B08C5C;
    --shell-ink: #5E4A2F;
    --crack: #6E4F2B;
    --albumen: #EEF2EF;
    --albumen-thin: #1B2D33;
    --albumen-thick: #25404A;
    --cord: #5F8A99;
    --membrane: #56716B;
    --air: #36596A;
    --yolk-set: #F2C94C;
    --yolk-runny: #F59B00;
    --chick: #FFD23F;
    --chick-ink: #2A2118;
    --cheek: #FF9E8A;
    --beak: #F08A00;
    --glint: #FFFFFF;
    --water: #3F95AB;
    --glass: #6C847E;
    --shadow: rgba(0, 0, 0, .45);
    --carton: #5A5144;
    --carton-cup: #4F473B;
    --carton-shade: #2B2620;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0C1412;
  --bg-alt: #111C19;
  --surface: #16221E;
  --ink: #E3ECE8;
  --ink-2: #98AAA3;
  --line: #283833;
  --yolk: #FFB01F;
  --yolk-ink: #FFC24D;
  --on-yolk: #1D1405;
  --good: #5DCB98;
  --warn: #F5A04A;
  --bad: #FF7B6B;
  --fav: #FF6F8E;
  --stamp: #B4232A;
  --shell-hi: #FFF3DF;
  --shell: #E6CCA4;
  --shell-shade: #B08C5C;
  --shell-ink: #5E4A2F;
  --crack: #6E4F2B;
  --albumen: #EEF2EF;
  --albumen-thin: #1B2D33;
  --albumen-thick: #25404A;
  --cord: #5F8A99;
  --membrane: #56716B;
  --air: #36596A;
  --yolk-set: #F2C94C;
  --yolk-runny: #F59B00;
  --chick: #FFD23F;
  --chick-ink: #2A2118;
  --cheek: #FF9E8A;
  --beak: #F08A00;
  --glint: #FFFFFF;
  --water: #3F95AB;
  --glass: #6C847E;
  --shadow: rgba(0, 0, 0, .45);
  --carton: #5A5144;
  --carton-cup: #4F473B;
  --carton-shade: #2B2620;
  color-scheme: dark;
}

/* ---------- Podstawy ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--t-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--yolk);
  outline-offset: 3px;
}

.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;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
  font-weight: 600;
}
.skip-link:focus { top: calc(env(safe-area-inset-top, 0px) + 8px); }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.eyebrow {
  margin: 0;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--yolk-ink);
}

.note {
  margin: 0;
  font-size: var(--t-sm);
  color: var(--ink-2);
  max-width: 62ch;
}

/* ---------- Przyciski ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-height: 48px;
  padding: 0 1.4rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 600 var(--t-base)/1 var(--f-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:active { transform: translateY(1px) scale(.98); }
.btn-primary { background: var(--yolk); color: var(--on-yolk); }
.btn-primary:hover { background: color-mix(in srgb, var(--yolk) 86%, var(--ink)); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink-2); }

.chip {
  padding: .55rem .95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: 500 var(--t-sm)/1 var(--f-body);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-mono { font-family: var(--f-mono); letter-spacing: .02em; }

/* ---------- Nawigacja ---------- */

.nav {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.nav-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: var(--nav-h);
}
.brand {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.02em;
  color: var(--ink);
  text-decoration: none;
}
.brand svg { width: 17px; height: 22px; fill: var(--yolk); }
.nav-links {
  display: flex;
  gap: .15rem;
  min-width: 0;
  margin: 0 0 0 auto;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a {
  display: block;
  padding: .45rem .75rem;
  border-radius: 999px;
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--bg-alt); }
.nav-links a[aria-current] { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.theme-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.theme-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-btn[data-mode="dark"] .i-moon,
.theme-btn[data-mode="light"] .i-sun { display: none; }

/* ---------- Hero ---------- */

.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(3rem, 7vw, 5.5rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 21rem);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: end;
}
.hero-title {
  margin: .5rem 0 0;
  padding-bottom: .1em;
  font-family: var(--f-display);
  font-weight: 900;
  font-size: var(--t-hero);
  line-height: .9;
  letter-spacing: -.045em;
  white-space: nowrap;
}
.egg-hint {
  margin: .5rem 0 0;
  min-height: 1.6em;
  font-family: var(--f-mono);
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.lead {
  margin: 1.5rem 0 0;
  max-width: 34ch;
  font-size: var(--t-lg);
  line-height: 1.5;
}
.cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

/* Jajko w miejscu litery „o” */
.egg-btn {
  appearance: none;
  display: inline-block;
  position: relative;
  width: .57em;
  height: .74em;
  margin: 0 0 -.03em .04em;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  vertical-align: baseline;
  cursor: pointer;
  border-radius: 50% 50% 46% 46% / 58% 58% 42% 42%;
  -webkit-tap-highlight-color: transparent;
}
.egg-btn:focus-visible { outline-width: 4px; outline-offset: 6px; }
.egg-btn svg { display: block; width: 100%; height: 100%; overflow: visible; }

.stop-hi { stop-color: var(--shell-hi); }
.stop-mid { stop-color: var(--shell); }
.stop-lo { stop-color: var(--shell-shade); }
.shell { fill: url(#eggShell); stroke: var(--shell-shade); stroke-width: 2; }
.shell-gloss { fill: var(--shell-hi); opacity: .75; }
.egg-shadow { fill: var(--ink); opacity: .13; }

.egg-body {
  transform-box: fill-box;
  transform-origin: 50% 100%;
}
.egg-btn[data-stage="0"] .egg-body { animation: egg-idle 6s ease-in-out 1s infinite; }
.egg-btn.is-wobbling .egg-body { animation: egg-wobble .55s ease-out; }

.crack {
  fill: none;
  stroke: var(--crack);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .25s ease-out, opacity .15s ease;
}
.egg-btn[data-stage="1"] .crack-l { stroke-dashoffset: .55; }
.egg-btn[data-stage="2"] .crack-l { stroke-dashoffset: .15; }
.egg-btn[data-stage="2"] .crack-r { stroke-dashoffset: .5; }
.egg-btn[data-stage="3"] .crack { stroke-dashoffset: 0; }
.egg-btn[data-stage="4"] .crack { stroke-dashoffset: 0; opacity: 0; }

.egg-top {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  transition: transform .55s cubic-bezier(.3, 1.4, .5, 1) .2s;
}
.egg-btn[data-stage="4"] .egg-top {
  transform: translate(40px, -92px) rotate(32deg);
  transition-delay: 0s;
}

.chick { transition: transform .45s cubic-bezier(.3, 1.6, .5, 1); }
.egg-btn[data-stage="4"] .chick { transform: translateY(-40px); transition-delay: .15s; }
.chick-body { fill: var(--chick); }
.chick-eyes circle { fill: var(--chick-ink); }
.chick-glint { fill: var(--glint); }
.chick-cheek { fill: var(--cheek); opacity: .75; }
.chick-beak { fill: var(--beak); }
.chick-eyes { transform-box: fill-box; transform-origin: center; }
.egg-btn[data-stage="4"] .chick-eyes { animation: blink 3.4s ease-in-out 1s infinite; }

@keyframes egg-idle {
  0%, 80%, 100% { transform: rotate(0); }
  84% { transform: rotate(-5deg); }
  88% { transform: rotate(4deg); }
  92% { transform: rotate(-2deg); }
  96% { transform: rotate(1deg); }
}
@keyframes egg-wobble {
  0% { transform: rotate(0); }
  20% { transform: rotate(-9deg); }
  40% { transform: rotate(7deg); }
  60% { transform: rotate(-4deg); }
  80% { transform: rotate(2deg); }
  100% { transform: rotate(0); }
}
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  96% { transform: scaleY(.1); }
}

/* Karta techniczna */
.spec {
  padding: 1.25rem 1.25rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 48px -32px var(--shadow);
}
.spec-title {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
}
.spec-sub { margin: .25rem 0 .9rem; font-size: var(--t-sm); color: var(--ink-2); }
.spec-list { display: grid; margin: 0; font-family: var(--f-mono); font-size: var(--t-sm); }
.spec-list div {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding-block: .5rem;
  border-top: 1px dashed var(--line);
}
.spec-list dt { color: var(--ink-2); }
.spec-list dd {
  margin: 0 0 0 auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* ---------- Sekcje ---------- */

.band { padding-block: clamp(3.5rem, 8vw, 6.5rem); background: var(--bg); }
.band-alt { background: var(--bg-alt); }

.section-head {
  display: grid;
  gap: .6rem;
  max-width: 48rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head h2 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 700;
  font-size: var(--t-xl);
  line-height: 1.08;
  letter-spacing: -.035em;
}
.section-lede {
  margin: .25rem 0 0;
  max-width: 60ch;
  font-size: var(--t-md);
  color: var(--ink-2);
}

/* ---------- Formularze ---------- */

.field {
  display: grid;
  gap: .6rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.field legend,
.field-top label,
.input-label {
  padding: 0;
  font-size: var(--t-sm);
  font-weight: 600;
}
.field legend { margin-bottom: .6rem; }
.field-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .25rem 1rem;
}
output {
  font-family: var(--f-mono);
  font-size: var(--t-sm);
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
}
.field-note { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }

.seg { position: relative; display: grid; gap: .5rem; }
.seg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}
.seg label {
  display: grid;
  gap: .15rem;
  padding: .75rem .5rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.seg label:hover { border-color: var(--ink-2); }
.seg label b { font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; }
.seg-2 label b { font-size: .95rem; }
.seg label small { font-family: var(--f-mono); font-size: var(--t-xs); color: var(--ink-2); }
.seg input:checked + label {
  border-color: var(--yolk);
  background: color-mix(in srgb, var(--yolk) 16%, var(--surface));
  box-shadow: inset 0 0 0 1px var(--yolk);
}
.seg input:focus-visible + label { outline: 3px solid var(--yolk); outline-offset: 2px; }

/* Suwaki z uchwytem w kształcie jajka */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 30px;
  margin: 0;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--yolk) var(--p, 50%), var(--line) var(--p, 50%));
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 27px;
  margin-top: -10.5px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--surface);
  box-shadow: 0 2px 6px var(--shadow);
}
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: var(--line); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--yolk); }
input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 23px;
  border: 2px solid var(--ink);
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--surface);
  box-shadow: 0 2px 6px var(--shadow);
}
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 3px solid var(--yolk); outline-offset: 2px; }
input[type="range"]:focus-visible::-moz-range-thumb { outline: 3px solid var(--yolk); outline-offset: 2px; }
input[type="range"]:disabled { cursor: not-allowed; }

.presets { display: flex; flex-wrap: wrap; gap: .5rem; }

/* ---------- Minutnik ---------- */

.timer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.timer-fields {
  display: grid;
  gap: 1.75rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  transition: opacity .2s ease;
}
.timer-fields:disabled { opacity: .5; }
.timer-fields:disabled label { cursor: not-allowed; }

.timer-card {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + var(--nav-h) + 20px);
  display: grid;
  gap: 1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 30px 60px -40px var(--shadow);
}
.xsection { justify-self: center; width: 100%; max-width: 230px; height: auto; }
.xs-white {
  fill: var(--albumen);
  stroke: var(--shell-shade);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}
.xs-yolk { fill: var(--yolk-set); }
.xs-core {
  fill: var(--yolk-runny);
  transform-box: fill-box;
  transform-origin: center;
  transition: transform .4s ease;
}
.xs-gloss { fill: var(--glint); opacity: .55; transition: opacity .3s ease; }

.doneness { margin: 0; text-align: center; font-weight: 600; }
.clock {
  font-family: var(--f-mono);
  font-weight: 800;
  font-size: clamp(3.5rem, 9vw, 5.5rem);
  line-height: 1;
  letter-spacing: -.04em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.timer-card[data-state="done"] .clock { color: var(--yolk-ink); animation: pulse .9s ease-in-out 3; }
@keyframes pulse { 50% { transform: scale(1.06); } }

.progress { height: 8px; border-radius: 4px; background: var(--bg-alt); overflow: hidden; }
.progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--yolk);
  transition: width .2s linear;
}
.timer-msg { margin: 0; min-height: 3.2em; text-align: center; font-size: var(--t-sm); color: var(--ink-2); }
.timer-actions { display: grid; grid-template-columns: 2fr 1fr; gap: .6rem; }

.formula {
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
  font-size: var(--t-xs);
  color: var(--ink-2);
}
.formula code {
  display: block;
  margin-bottom: .5rem;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.formula p { margin: 0; }

/* ---------- Anatomia ---------- */

.anatomy {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}
.anatomy-fig { margin: 0; }
.anatomy-fig svg { display: block; width: 100%; height: auto; }

#anatomySvg [data-part] { transition: opacity .2s ease; cursor: pointer; }
#anatomySvg.has-active [data-part]:not(.is-active) { opacity: .18; }
#anatomySvg.has-active .badge:not(.is-active) { opacity: .3; }
.a-thin { fill: var(--albumen-thin); }
.a-thick { fill: var(--albumen-thick); }
.a-air { fill: var(--air); }
.a-chalaza path { fill: none; stroke: var(--cord); stroke-width: 4.5; stroke-linecap: round; }
.a-yolk { fill: var(--yolk-runny); }
.a-disc { fill: var(--shell-hi); }
.a-membrane { fill: none; stroke: var(--membrane); stroke-width: 2; stroke-dasharray: 5 4; }
.a-shell { fill: none; stroke: var(--shell); stroke-width: 8; }
.a-shell-edge { fill: none; stroke: var(--shell-shade); stroke-width: 11; }
.badge { pointer-events: none; transition: opacity .2s ease; }
.badge circle { fill: var(--ink); }
.badge text {
  fill: var(--bg);
  font: 600 11px var(--f-mono);
  text-anchor: middle;
  dominant-baseline: central;
}
.badge.is-active circle { fill: var(--yolk); }
.badge.is-active text { fill: var(--on-yolk); }

.parts { display: grid; gap: .15rem; margin: 0; padding: 0; list-style: none; }
.parts button {
  appearance: none;
  display: grid;
  grid-template-columns: 1.75rem minmax(0, 1fr);
  gap: .8rem;
  align-items: start;
  width: 100%;
  padding: .65rem .8rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color .15s ease;
}
.parts button:hover,
.parts button.is-active { background: var(--surface); }
.num {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font: 600 var(--t-xs)/1 var(--f-mono);
}
.parts button.is-active .num { background: var(--yolk); color: var(--on-yolk); }
.part-text b { display: block; font-weight: 600; line-height: 1.4; }
.part-text span { display: block; font-size: var(--t-sm); line-height: 1.5; color: var(--ink-2); }

/* ---------- Skala ---------- */

.scale-top { margin-bottom: 1rem; }
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-weight: 500;
  cursor: pointer;
}
.switch input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.switch-track {
  position: relative;
  flex: none;
  width: 46px;
  height: 28px;
  border-radius: 999px;
  background: var(--line);
  transition: background-color .2s ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 1px 3px var(--shadow);
  transition: transform .2s ease;
}
.switch input:checked + .switch-track { background: var(--yolk); }
.switch input:checked + .switch-track::after { transform: translateX(18px); }
.switch input:focus-visible + .switch-track { outline: 3px solid var(--yolk); outline-offset: 2px; }

.scale-scroll {
  margin-bottom: 1rem;
  padding: 1rem .5rem .5rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  overflow-x: auto;
}
#scaleSvg { display: block; width: 100%; min-width: 860px; height: auto; }
.sc-egg, .sc-label {
  transform-origin: 0 0;
  transition: transform .9s cubic-bezier(.65, 0, .35, 1), opacity .5s ease;
}
.sc-still .sc-egg, .sc-still .sc-label { transition: none; }
.sc-shell { stroke: var(--ink); stroke-opacity: .3; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.sc-name { fill: var(--ink); font: 600 14px var(--f-body); text-anchor: middle; }
.sc-meta { fill: var(--ink-2); font: 400 11.5px var(--f-mono); text-anchor: middle; }
.sc-cmp { fill: var(--yolk-ink); font: 600 11.5px var(--f-mono); text-anchor: middle; }
.sc-base { stroke: var(--ink); stroke-width: 1.5; }
.sc-axis, .sc-tick { stroke: var(--ink-2); stroke-width: 1; }
.sc-gridline { stroke: var(--line); stroke-dasharray: 3 5; }
.sc-tick-label { fill: var(--ink-2); font: 500 11px var(--f-mono); text-anchor: end; dominant-baseline: central; }

/* ---------- Dekoder kodu ---------- */

.decoder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.decoder-input { display: grid; gap: .6rem; min-width: 0; }
.code-input {
  width: 100%;
  padding: .85rem 1rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: 600 clamp(1.2rem, 1rem + 1.2vw, 1.6rem)/1.2 var(--f-mono);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.code-input:focus { outline: none; border-color: var(--yolk); box-shadow: 0 0 0 4px color-mix(in srgb, var(--yolk) 28%, transparent); }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .3rem; }
.chips > span { margin-right: .25rem; font-size: var(--t-xs); color: var(--ink-2); }
.code-error { margin: 0; min-height: 1.5em; font-size: var(--t-sm); font-weight: 500; color: var(--bad); }

.decoded { min-width: 0; transition: opacity .2s ease, filter .2s ease; }
.decoded.is-stale { opacity: .45; filter: grayscale(.7); }
.stamp {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 2.25rem 12%;
  border-radius: 54% 46% 46% 54% / 50% 50% 50% 50%;
  background: radial-gradient(120% 140% at 30% 25%, var(--shell-hi), var(--shell) 55%, var(--shell-shade));
  box-shadow: 0 30px 50px -36px var(--shadow);
}
.stamp-ink {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.1rem;
  transform: rotate(-3deg);
}
.st { display: grid; justify-items: center; gap: .3rem; }
.st b {
  font: 800 clamp(1.6rem, 1rem + 2.6vw, 2.6rem)/1 var(--f-mono);
  letter-spacing: .02em;
  color: var(--stamp);
  opacity: .9;
}
.st i {
  font: 500 var(--t-xs)/1 var(--f-mono);
  font-style: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--shell-ink);
}
.dcards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-top: 1rem;
}
.dcard {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.dcard h3 {
  margin: 0;
  font-family: var(--f-mono);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.dcard-val {
  margin: .4rem 0 .35rem;
  font-family: var(--f-display);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -.01em;
  overflow-wrap: anywhere;
}
.dcard-info { margin: 0; font-size: var(--t-sm); line-height: 1.5; color: var(--ink-2); }

.welfare {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}
.wf {
  position: relative;
  display: grid;
  align-content: start;
  gap: .3rem;
  padding: 1.1rem 1rem 1.2rem;
  background: var(--surface);
  transition: background-color .2s ease;
}
.wf b { font: 800 2rem/1 var(--f-mono); color: var(--ink-2); }
.wf strong { font-weight: 600; }
.wf span { font-size: var(--t-sm); line-height: 1.5; color: var(--ink-2); }
.wf.is-current { background: color-mix(in srgb, var(--yolk) 20%, var(--surface)); }
.wf.is-current b { color: var(--yolk-ink); }
.wf.is-current::after {
  content: "Twoje jajo";
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: .2rem .5rem;
  border-radius: 999px;
  background: var(--yolk);
  color: var(--on-yolk);
  font: 600 var(--t-xs)/1.2 var(--f-mono);
}

/* ---------- Świeżość ---------- */

.fresh {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 19rem);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: center;
}
.fresh-text { display: grid; gap: 1.5rem; min-width: 0; }
.fresh-text .section-head { margin-bottom: 0; }
.age-marks { position: relative; height: 1.5em; font: 500 var(--t-xs) var(--f-mono); color: var(--ink-2); }
.age-marks span {
  position: absolute;
  top: 0;
  left: calc(11px + (100% - 22px) * var(--v) / 35);
  transform: translateX(-50%);
  white-space: nowrap;
}
.age-marks span::before {
  content: "";
  position: absolute;
  top: -.55rem;
  left: 50%;
  width: 1px;
  height: .4rem;
  background: var(--ink-2);
}

.verdict {
  --tone: var(--good);
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin: 0;
  padding: .6rem 1rem;
  border: 1px solid color-mix(in srgb, var(--tone) 50%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--tone) 14%, var(--surface));
  font-weight: 600;
  line-height: 1.4;
}
.verdict::before {
  content: "";
  flex: none;
  width: .7rem;
  height: .7rem;
  border-radius: 50%;
  background: var(--tone);
}
.verdict[data-level="mid"] { --tone: var(--yolk); }
.verdict[data-level="old"] { --tone: var(--warn); }
.verdict[data-level="bad"] { --tone: var(--bad); }

.glass-fig { margin: 0; justify-self: center; width: 100%; max-width: 280px; }
.glass { display: block; width: 100%; height: auto; }
.glass-fill { fill: var(--glass); opacity: .08; }
.water { fill: var(--water); opacity: .45; }
.water-top { stroke: var(--water); stroke-width: 2.5; }
.glass-line { fill: none; stroke: var(--glass); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.glass-gloss { stroke: var(--surface); stroke-width: 5; stroke-linecap: round; opacity: .55; }
.fresh-egg { transition: transform .75s cubic-bezier(.34, 1.25, .5, 1); }
.fresh-egg.is-floating .fresh-bob { animation: bob 2.6s ease-in-out infinite; }
.fe-shell { fill: var(--shell); }
.fe-air { fill: var(--air); opacity: .9; transition: rx .4s ease, ry .4s ease; }
.fe-edge { fill: none; stroke: var(--shell-shade); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
@keyframes bob { 50% { transform: translateY(-3px); } }

/* ---------- Stopka ---------- */

.footer {
  padding-block: clamp(3rem, 7vw, 5.5rem);
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(1.5rem, 4vw, 4rem);
  align-items: start;
}
.footer-q {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--t-xl);
  line-height: 1.05;
  letter-spacing: -.035em;
}
.footer-a { display: grid; gap: 1rem; }
.footer-a p { margin: 0; max-width: 58ch; font-size: var(--t-md); }
.footer-a .note { font-size: var(--t-sm); }

/* ---------- Szerokości ---------- */

@media (max-width: 900px) {
  .timer,
  .anatomy,
  .decoder,
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .timer-card { position: static; }
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-title { font-size: clamp(4.5rem, 25vw, 11rem); }
  .spec { max-width: 26rem; }
}

@media (max-width: 760px) {
  .fresh { grid-template-columns: minmax(0, 1fr); }
  .glass-fig { max-width: 240px; }
  .welfare { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .dcards { grid-template-columns: minmax(0, 1fr); }
  .stamp { min-height: 160px; padding: 2rem 14%; }
  .seg-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 420px) {
  .welfare { grid-template-columns: minmax(0, 1fr); }
  .brand { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    transition-delay: 0s !important;
  }
}

/* =========================================================
   Przepisy
   ========================================================= */

.nav-links a.nav-recipes { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); }
.nav-links a.nav-recipes::before {
  content: "";
  width: 7px;
  height: 9px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: var(--yolk);
}

/* Ikonki jajek: całe, żółtko, białko */
.ei { display: block; flex: none; width: 14px; height: 18px; }
.ei-whole path { fill: var(--shell); stroke: var(--shell-shade); stroke-width: 1.5; }
.ei-yolk circle { fill: var(--yolk-runny); }
.ei-white path { fill: var(--albumen); stroke: var(--membrane); stroke-width: 1.5; stroke-dasharray: 2.5 2; }
.ei-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 3px; }
.ei-row-lg .ei { width: 20px; height: 26px; }
.ei-more { margin-left: .25rem; font: 600 var(--t-xs) var(--f-mono); color: var(--ink-2); }
.ico {
  display: block;
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Nagłówek strony z przepisami */
.hero-recipes { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(2.5rem, 6vw, 4.5rem); }
.recipes-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 25rem);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.page-title {
  margin: .6rem 0 0;
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2.6rem, 1.3rem + 5vw, 5.2rem);
  line-height: .98;
  letter-spacing: -.045em;
}
.recipes-hero-text .lead { max-width: 40ch; }

/* Wytłaczanka */
.carton-card {
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: 0 30px 60px -40px var(--shadow);
}
.carton-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1rem;
}
.carton-title { margin: 0; font-family: var(--f-display); font-size: 1rem; font-weight: 700; }
.carton-count { margin: 0; font-family: var(--f-mono); color: var(--ink-2); }
.carton-count b {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.carton {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .55rem;
  padding: .8rem;
  border-radius: 16px;
  background: var(--carton);
  box-shadow: inset 0 -4px 0 var(--carton-shade);
}
.cup {
  appearance: none;
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 38%, var(--carton-cup) 0 52%, var(--carton-shade) 100%);
  box-shadow: inset 0 5px 9px var(--carton-shade);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.cup:focus-visible { outline: 3px solid var(--yolk); outline-offset: 2px; }
.cup-egg {
  width: 76%;
  height: 86%;
  border-radius: 50% 50% 50% 50% / 56% 56% 44% 44%;
  background: radial-gradient(circle at 36% 30%, var(--shell-hi), var(--shell) 55%, var(--shell-shade));
  box-shadow: 0 4px 5px var(--carton-shade);
  opacity: 0;
  transform: scale(.5) translateY(-40%);
  transition: transform .35s cubic-bezier(.3, 1.5, .5, 1), opacity .2s ease;
}
.cup.is-full .cup-egg { opacity: 1; transform: none; }
.cup:not(.is-full):hover .cup-egg { opacity: .35; transform: scale(.92); }
.carton-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-top: .9rem;
}
.carton-note { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.chip:disabled { opacity: .45; cursor: default; }

/* Filtry */
.rfilters {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.1rem;
}
.rfilter-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip[aria-checked="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.chip-count { margin-left: .4rem; font-family: var(--f-mono); font-size: var(--t-xs); opacity: .65; }
.egg-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem 1rem;
  margin: 0;
  font: 500 var(--t-xs) var(--f-mono);
  color: var(--ink-2);
}
.egg-legend > span { display: inline-flex; align-items: center; gap: .35rem; }
.rstatus { margin: 0 0 1.25rem; font-weight: 600; }

/* Karty przepisów */
.rgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
  gap: 1.25rem;
}
.rcard {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease;
}
.rcard:hover { transform: translateY(-3px); box-shadow: 0 26px 44px -30px var(--shadow); }
.rcard:has(.rcard-link:focus-visible) { outline: 3px solid var(--yolk); outline-offset: 3px; }
.rcard-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-alt); }
.rcard-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease, filter .3s ease, opacity .3s ease;
}
.rcard:hover .rcard-media img { transform: scale(1.04); }
.rcard-timer {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .3rem .6rem;
  border-radius: 999px;
  background: var(--yolk);
  color: var(--on-yolk);
  font: 700 var(--t-xs) var(--f-mono);
  font-variant-numeric: tabular-nums;
}
.rcard-body { display: grid; align-content: start; gap: .5rem; padding: 1rem 1.1rem 1.1rem; }
.rcard-cat {
  margin: 0;
  font: 600 var(--t-xs) var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.rcard-title {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.02em;
}
.rcard-link { color: inherit; text-decoration: none; }
.rcard-link:focus-visible { outline: none; }
.rcard-link::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.rcard-intro {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-size: var(--t-sm);
  line-height: 1.5;
  color: var(--ink-2);
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.rcard-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem 1rem;
  margin: 0;
  font: 500 var(--t-xs) var(--f-mono);
  color: var(--ink-2);
}
.rcard-meta > span { display: inline-flex; align-items: center; gap: .35rem; }
.rcard-meta .ico { width: 14px; height: 14px; }
.rcard-eggs {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-top: .2rem;
  padding-top: .75rem;
  border-top: 1px dashed var(--line);
}
.rcard-servings { font: 500 var(--t-xs) var(--f-mono); color: var(--ink-2); white-space: nowrap; }
.rcard-fit { margin: 0; font-size: var(--t-sm); font-weight: 600; color: var(--yolk-ink); }
.rcard.is-short .rcard-fit { color: var(--bad); }
.rcard.is-short .rcard-media img { filter: grayscale(.9); opacity: .6; }

/* Okno przepisu */
html:has(.rdialog[open]) { overflow: hidden; }
.rdialog {
  width: min(1000px, calc(100% - 2rem));
  max-width: none;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--surface);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 0 40px 80px -30px var(--shadow);
}
.rdialog::backdrop { background: rgba(8, 14, 12, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.rdialog[open] { animation: rd-in .28s cubic-bezier(.2, .9, .3, 1); }
@keyframes rd-in { from { opacity: 0; transform: translateY(18px) scale(.985); } }

.rd { position: relative; }
.rd-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  height: 0;
  padding-right: .9rem;
}
.rd-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-top: calc(env(safe-area-inset-top, 0px) + .9rem);
  border: 0;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 6px 18px var(--shadow);
  cursor: pointer;
}
.rd-close .ico { width: 20px; height: 20px; }
.rd-photo { position: relative; margin: 0; }
.rd-photo img {
  display: block;
  width: 100%;
  height: clamp(220px, 36vw, 380px);
  object-fit: cover;
}
.rd-photo figcaption {
  position: absolute;
  right: .75rem;
  bottom: .7rem;
  max-width: calc(100% - 1.5rem);
  padding: .25rem .55rem;
  border-radius: 8px;
  background: var(--scrim);
  color: var(--on-scrim);
  font: 500 11px/1.4 var(--f-mono);
}
.rd-photo figcaption a { color: inherit; }
.rd-content { display: grid; gap: 1.75rem; padding: clamp(1.25rem, 3.5vw, 2.5rem); }
.rd-head { display: grid; gap: .5rem; }
.rd-title {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.7rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.rd-title:focus { outline: none; }
.rd-intro { margin: 0; max-width: 60ch; font-size: var(--t-md); color: var(--ink-2); }
.rd-facts { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 0; }
.rd-facts div {
  display: grid;
  gap: .1rem;
  padding: .55rem .85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.rd-facts dt {
  font: 600 var(--t-xs) var(--f-mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.rd-facts dd { margin: 0; font-weight: 600; }

.rd-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr);
  gap: clamp(1.5rem, 3.5vw, 2.5rem);
  align-items: start;
}
.rd-body h3 {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.rd-ing {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
}
.rd-ing-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem; }
.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}
.stepper button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  font: 600 1.2rem/1 var(--f-body);
  cursor: pointer;
}
.stepper button:hover:not(:disabled) { background: var(--bg-alt); }
.stepper button:disabled { opacity: .3; cursor: default; }
.stepper output {
  min-width: 6.5em;
  text-align: center;
  font: 600 var(--t-sm) var(--f-mono);
  color: var(--ink);
}
.rd-eggs { display: grid; gap: .5rem; font-size: var(--t-sm); }
.rd-eggs p { margin: 0; }
.rd-eggs-warn { color: var(--bad); font-weight: 600; }
.rd-eggs-extra { color: var(--ink-2); }
.rd-eggs a, .rd-tip a { color: var(--yolk-ink); font-weight: 600; }

.ing-list { margin: 0; padding: 0; list-style: none; }
.ing-h {
  padding: .9rem 0 .3rem;
  font: 600 var(--t-xs) var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--yolk-ink);
}
.ing-h:first-child { padding-top: 0; }
.ing label {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: .7rem;
  padding-block: .55rem;
  border-bottom: 1px dashed var(--line);
  cursor: pointer;
}
.ing-check { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.box {
  display: grid;
  place-items: center;
  flex: none;
  align-self: center;
  width: 20px;
  height: 20px;
  border: 1.5px solid var(--ink-2);
  border-radius: 6px;
  color: transparent;
  transition: background-color .15s ease, border-color .15s ease;
}
.box .ico { width: 14px; height: 14px; stroke-width: 3; }
.ing-check:checked + .box { border-color: var(--good); background: var(--good); color: var(--surface); }
.ing-check:focus-visible + .box { outline: 3px solid var(--yolk); outline-offset: 2px; }
.ing-name { flex: 1; min-width: 0; }
.ing-name small { font-size: var(--t-xs); color: var(--ink-2); }
.ing-q { font: 600 var(--t-sm) var(--f-mono); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ing.is-have .ing-name,
.ing.is-have .ing-q { color: var(--ink-2); text-decoration: line-through; }

.rd-steps { display: grid; gap: .75rem; }
.rd-steps-hint { margin: -.4rem 0 0; font-size: var(--t-sm); color: var(--ink-2); }
.steps { display: grid; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.step {
  display: grid;
  gap: .6rem;
  padding: .85rem;
  border: 1px solid transparent;
  border-radius: 14px;
  transition: background-color .2s ease, border-color .2s ease;
}
.step.is-next {
  border-color: color-mix(in srgb, var(--yolk) 45%, transparent);
  background: color-mix(in srgb, var(--yolk) 10%, var(--surface));
}
.step-toggle {
  appearance: none;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .9rem;
  align-items: start;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.step-num {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font: 600 var(--t-sm)/1 var(--f-mono);
  transition: background-color .2s ease;
}
.step-num .ico { width: 16px; height: 16px; stroke-width: 3; }
.step-text { padding-top: .2rem; line-height: 1.55; }
.step.is-done .step-num { background: var(--good); color: var(--surface); }
.step.is-done .step-text { color: var(--ink-2); }
.step-timer {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: .45rem;
  margin-left: 2.9rem;
  padding: .45rem .85rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 600 var(--t-sm) var(--f-mono);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.step-timer:hover { border-color: var(--ink-2); }
.step-timer.is-running { border-color: var(--yolk); background: var(--yolk); color: var(--on-yolk); }
.step-timer.is-paused { border-color: var(--yolk); }
.step-timer.is-done { border-color: var(--good); background: color-mix(in srgb, var(--good) 16%, var(--surface)); animation: pulse .9s ease-in-out 3; }

.rd-tip {
  display: grid;
  gap: .4rem;
  margin-top: .5rem;
  padding: 1rem 1.15rem;
  border-radius: 14px;
  background: var(--bg-alt);
}
.rd-tip p { margin: 0; }
.rd-tip-label {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font: 600 var(--t-xs) var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--yolk-ink);
}

/* Komunikat minutnika */
.toast {
  position: fixed;
  inset: auto auto calc(env(safe-area-inset-bottom, 0px) + 1.25rem) 50%;
  z-index: 100;
  max-width: min(32rem, calc(100% - 2rem));
  margin: 0;
  padding: .85rem 1.15rem;
  border: 0;
  border-radius: 14px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  box-shadow: 0 20px 40px -16px var(--shadow);
  transform: translateX(-50%);
}

/* Autorzy zdjęć */
.credits {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: .25rem 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--t-sm);
}
.credits li { display: grid; gap: .1rem; padding-block: .6rem; border-top: 1px dashed var(--line); }
.credit-recipe { font-weight: 600; color: var(--ink); text-decoration: none; }
.credit-recipe:hover { text-decoration: underline; }
.credits span { color: var(--ink-2); }
.credits span a { color: inherit; }

/* Zajawka przepisów na stronie głównej */
.teaser-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}
.teaser {
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: 18px;
  color: var(--on-scrim);
  text-decoration: none;
  aspect-ratio: 4 / 3;
  max-width: 100%;
}
.teaser img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.teaser:hover img { transform: scale(1.04); }
.teaser span {
  position: relative;
  width: 100%;
  padding: 2.5rem 1.1rem 1rem;
  background: linear-gradient(to top, var(--scrim), transparent);
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.teaser-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-top: 1.5rem; }

@media (max-width: 900px) {
  .recipes-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .carton-card { max-width: 28rem; }
  .rd-body { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 700px) {
  .teaser-grid { grid-template-columns: minmax(0, 1fr); }
  .teaser { aspect-ratio: 16 / 9; }
}

@media (max-width: 640px) {
  .nav-links li:has(.nav-recipes) { order: -1; }
  .rdialog {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }
  .rdialog[open] { animation-name: rd-up; }
  @keyframes rd-up { from { transform: translateY(40px); opacity: 0; } }
  .step-timer { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .rcard:hover { transform: none; }
  .rcard:hover .rcard-media img, .teaser:hover img { transform: none; }
}

/* =========================================================
   Przepisy od czytelników
   ========================================================= */

.community-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}
.community-head .section-head { margin-bottom: 0; }
.account { display: grid; justify-items: end; gap: .55rem; max-width: 26rem; text-align: right; }
.account-note { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.account-error { margin: 0; font-size: var(--t-sm); font-weight: 600; color: var(--bad); }
.account-error:empty { display: none; }
.account-who { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .25rem .9rem; margin: 0; font-size: var(--t-sm); }
.linklike {
  padding: 0;
  border: 0;
  background: none;
  color: var(--yolk-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.community-state { margin: 0 0 1.25rem; color: var(--ink-2); }
.community-state:empty { display: none; }

.rcard-noimg {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 45%, var(--surface), var(--bg-alt));
}
.rcard-noimg .ei { width: 54px; height: 70px; }

.mine {
  margin-bottom: 1.75rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.mine h3 { margin: 0 0 .6rem; font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; }
.mine-list { display: grid; margin: 0; padding: 0; list-style: none; }
.mine-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: .9rem;
  align-items: center;
  padding-block: .7rem;
  border-top: 1px dashed var(--line);
}
.mine-item:first-child { border-top: 0; }
.mine-thumb {
  display: grid;
  place-items: center;
  width: 56px;
  height: 42px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-alt);
}
.mine-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mine-text { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; min-width: 0; }
.mine-text small { flex-basis: 100%; color: var(--ink-2); }
.mine-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.chip.is-confirm { border-color: var(--bad); color: var(--bad); }

.pill {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink-2);
  font: 600 var(--t-xs) var(--f-mono);
}
.pill[data-status="pending"] { background: color-mix(in srgb, var(--yolk) 22%, var(--surface)); color: var(--yolk-ink); }
.pill[data-status="approved"] { background: color-mix(in srgb, var(--good) 18%, var(--surface)); color: var(--good); }
.pill[data-status="rejected"] { background: color-mix(in srgb, var(--bad) 14%, var(--surface)); color: var(--bad); }

.rd-nophoto .rd-content { padding-top: 4.75rem; }
.rd-status {
  margin: 0 0 .5rem;
  padding: .6rem .9rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--yolk) 16%, var(--surface));
  font-size: var(--t-sm);
  font-weight: 600;
}
.rd-status[data-status="rejected"] { background: color-mix(in srgb, var(--bad) 12%, var(--surface)); color: var(--bad); }

/* Formularz dodawania */
.fdialog { width: min(840px, calc(100% - 2rem)); }
.rform-body { display: grid; gap: 2rem; padding: 1rem clamp(1.25rem, 3.5vw, 2.5rem) clamp(1.5rem, 3.5vw, 2.5rem); }
.fdialog .rd-bar {
  height: auto;
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.fdialog .rd-close { margin-top: env(safe-area-inset-top, 0px); box-shadow: none; border: 1px solid var(--line); }
.rform-head { display: grid; gap: .45rem; }
.rform-head h2,
.rform-done h2 {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -.03em;
}
.rform-head h2:focus,
.rform-done h2:focus { outline: none; }
.fgroup { display: grid; gap: .8rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.fgroup legend {
  margin-bottom: .8rem;
  padding: 0;
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.fwide { grid-column: 1 / -1; }
.ffield { display: grid; gap: .4rem; min-width: 0; }
.ffield > span { font-size: var(--t-sm); font-weight: 600; }
.ffield small { font-weight: 400; color: var(--ink-2); }
.fhint { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.rform input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.rform textarea,
.rform select {
  width: 100%;
  min-width: 0;
  padding: .65rem .8rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.rform textarea { resize: vertical; line-height: 1.5; }
.rform input:focus,
.rform textarea:focus,
.rform select:focus {
  outline: none;
  border-color: var(--yolk);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--yolk) 28%, transparent);
}
.rform input:disabled,
.rform select:disabled { opacity: .55; }
.rform .ffield.has-error input,
.rform .ffield.has-error textarea,
.rform .ffield.has-error select { border-color: var(--bad); }
.rform .fgroup.has-error > legend { color: var(--bad); }
.frows { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.frow { display: grid; gap: .5rem; align-items: center; }
.ing-row { grid-template-columns: minmax(0, 1fr) 5.5rem 7.5rem 8.5rem 2.25rem; }
.rform .frows .ing-row.is-egg input.fi-name {
  border-color: color-mix(in srgb, var(--yolk) 60%, var(--line));
  background: color-mix(in srgb, var(--yolk) 8%, var(--surface));
}
#fSteps { counter-reset: krok; }
.step-row { grid-template-columns: 1.75rem minmax(0, 1fr) 6.5rem 2.25rem; align-items: start; counter-increment: krok; }
.step-row::before {
  content: counter(krok);
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-top: .4rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  font: 600 var(--t-xs)/1 var(--f-mono);
}
.fs-timer { display: grid; gap: .2rem; font-size: var(--t-xs); color: var(--ink-2); }
.frow-del {
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}
.step-row .frow-del { margin-top: .3rem; }
.frow-del:hover { border-color: var(--bad); color: var(--bad); }
.fadd { display: flex; flex-wrap: wrap; gap: .5rem; }
.fegg {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin: 0;
  padding: .6rem .8rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--good) 10%, var(--surface));
  font-size: var(--t-sm);
  font-weight: 600;
}
.fegg.is-missing { background: color-mix(in srgb, var(--bad) 10%, var(--surface)); color: var(--bad); }
.fphoto {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 160px;
  overflow: hidden;
  border: 2px dashed var(--line);
  border-radius: 14px;
  background: var(--bg);
  cursor: pointer;
}
.fphoto input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.fphoto img { display: block; width: 100%; max-height: 320px; object-fit: cover; }
.fphoto-empty { padding: 1.5rem; color: var(--ink-2); font-weight: 600; text-align: center; }
.fphoto:focus-within { border-color: var(--yolk); }
.fphoto-bar { display: flex; justify-content: space-between; align-items: center; gap: .75rem; min-height: 1.5rem; }
.fcheck { position: relative; display: flex; align-items: flex-start; gap: .7rem; font-size: var(--t-sm); cursor: pointer; }
.fcheck .box { margin-top: .1rem; }
.fcheck.has-error .box { border-color: var(--bad); }
.ferrors {
  padding: 1rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--bad) 10%, var(--surface));
}
.ferrors p { margin: 0 0 .4rem; }
.ferrors ul { margin: 0; padding-left: 1.2rem; color: var(--bad); }
.factions { display: flex; flex-wrap: wrap; gap: .6rem; }
.rform-done { display: grid; justify-items: center; gap: 1rem; padding: 4.5rem 2rem 3rem; text-align: center; }
.rform-done p { margin: 0; max-width: 42ch; color: var(--ink-2); }
.done-egg .ei { width: 64px; height: 84px; transform-origin: 50% 100%; animation: egg-wobble .8s ease-out 2; }

@media (max-width: 700px) {
  .account { justify-items: start; text-align: left; }
  .account-who { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .rdialog.fdialog { width: 100%; }
  .fgrid { grid-template-columns: minmax(0, 1fr); }
  .ing-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 2.25rem;
    grid-template-areas: "name name del" "q u u" "egg egg egg";
    padding-bottom: .75rem;
    border-bottom: 1px dashed var(--line);
  }
  .ing-row .fi-name { grid-area: name; }
  .ing-row .fi-q { grid-area: q; }
  .ing-row .fi-u { grid-area: u; }
  .ing-row .fi-egg { grid-area: egg; }
  .ing-row .frow-del { grid-area: del; }
  .step-row { grid-template-columns: 1.75rem minmax(0, 1fr) 2.25rem; }
  .step-row .fs-timer { grid-column: 2; grid-row: 2; }
  .mine-item { grid-template-columns: 48px minmax(0, 1fr); }
  .mine-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Panel moderacji */
.chip[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.mod-page { min-height: 70vh; }
.mod-title { font-size: clamp(2.2rem, 1.4rem + 3.5vw, 3.8rem); }
.mod-box {
  display: grid;
  justify-items: start;
  gap: .8rem;
  max-width: 44rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.mod-box p { margin: 0; }
.mod-uid { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.mod-uid code, .mod-steps code {
  padding: .2rem .45rem;
  border-radius: 6px;
  background: var(--bg-alt);
  font-family: var(--f-mono);
  font-size: var(--t-sm);
  overflow-wrap: anywhere;
}
.mod-steps { margin: 0; padding-left: 1.3rem; display: grid; gap: .35rem; }
.mod-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.mod-empty { padding: 2rem 0; }
.mod-item {
  display: grid;
  grid-template-columns: minmax(0, 18rem) minmax(0, 1fr);
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}
.mod-photo {
  display: grid;
  place-items: center;
  align-self: start;
  aspect-ratio: 4 / 3;
  max-width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: var(--bg-alt);
  color: var(--ink-2);
  font-size: var(--t-sm);
}
.mod-photo img { width: 100%; height: 100%; object-fit: cover; }
.mod-body { display: grid; gap: .6rem; min-width: 0; }
.mod-body h2 { margin: 0; font-family: var(--f-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; }
.mod-body h3 { margin: 0 0 .4rem; font-size: var(--t-sm); font-weight: 700; }
.mod-intro, .mod-tip { margin: 0; }
.mod-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin: 0; font: 500 var(--t-xs) var(--f-mono); color: var(--ink-2); }
.mod-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; font-size: var(--t-sm); }
.mod-cols ul { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; }
.mod-cols li { display: flex; justify-content: space-between; gap: .75rem; }
.mod-cols ul li { padding-bottom: .25rem; border-bottom: 1px dashed var(--line); }
.mod-cols ol { display: grid; gap: .4rem; margin: 0; padding-left: 1.2rem; }
.mod-cols ol li { display: list-item; }
.mod-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.mod-del.is-confirm { border-color: var(--bad); color: var(--bad); }
.mod-reject { display: grid; gap: .6rem; padding: 1rem; border-radius: 14px; background: var(--bg); }
.mod-reason {
  width: 100%;
  padding: .65rem .8rem;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

@media (max-width: 760px) {
  .mod-item, .mod-cols { grid-template-columns: minmax(0, 1fr); }
}

/* =========================================================
   Polubienia, komentarze, awatary
   ========================================================= */

.like-slot {
  position: absolute;
  bottom: .7rem;
  left: .7rem;
  z-index: 2;
}
.like-slot:empty { display: none; }
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .7rem .35rem .55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--ink);
  font: 700 var(--t-sm) var(--f-mono);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 14px -6px var(--shadow);
  cursor: pointer;
  transition: background-color .15s ease, transform .15s ease;
}
.like-btn:hover { transform: translateY(-1px); }
.like-btn:disabled { cursor: progress; opacity: .8; }
.like-egg { width: 15px; height: 19px; flex: none; }
.like-egg path { fill: var(--surface); stroke: var(--ink-2); stroke-width: 2; transition: fill .2s ease, stroke .2s ease; }
.like-btn.is-liked { background: var(--yolk); color: var(--on-yolk); }
.like-btn.is-liked .like-egg path { fill: var(--shell-hi); stroke: var(--on-yolk); }
.like-btn.is-liked .like-egg { animation: egg-wobble .5s ease-out; transform-origin: 50% 100%; }
.like-big { padding: .55rem 1rem .55rem .8rem; border-color: var(--line); box-shadow: none; font-size: var(--t-sm); }
.like-big .like-egg { width: 18px; height: 23px; }
.rd-social { display: none; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin-top: .4rem; }
.has-social .rd-social { display: flex; }
.comments-link { color: var(--yolk-ink); font-weight: 600; font-size: var(--t-sm); text-underline-offset: 3px; }

.rcard-author,
.rd-author { position: relative; z-index: 2; color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.rcard-author:hover,
.rd-author:hover { color: var(--yolk-ink); }

.avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 2.25rem;
  height: 2.8rem;
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  background: var(--av-1);
  color: var(--av-ink);
  font: 800 1rem/1 var(--f-display);
  padding-top: .35rem;
}
.av-0 { background: var(--av-0); }
.av-1 { background: var(--av-1); }
.av-2 { background: var(--av-2); }
.av-3 { background: var(--av-3); }
.av-4 { background: var(--av-4); }
.av-guest { background: var(--bg-alt); color: var(--ink-2); border: 1.5px dashed var(--line); }
.avatar-xl { width: 6.5rem; height: 8.2rem; font-size: 2.8rem; padding-top: 1rem; }

.rd-comments { display: none; gap: 1rem; padding-top: 1.75rem; border-top: 1px solid var(--line); }
.has-social .rd-comments { display: grid; }
.rd-comments-head h3 {
  margin: 0;
  font-family: var(--f-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.rd-comments-head .count { margin-left: .35rem; font-family: var(--f-mono); font-size: var(--t-sm); color: var(--ink-2); }
.cform { display: grid; gap: .6rem; }
.cform textarea {
  width: 100%;
  min-height: 5.5rem;
  padding: .7rem .85rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  line-height: 1.5;
  resize: vertical;
}
.cform textarea:focus { outline: none; border-color: var(--yolk); box-shadow: 0 0 0 3px color-mix(in srgb, var(--yolk) 28%, transparent); }
.cform-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; }
.cform-foot .fhint { flex: 1 1 16rem; }
.clist { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.clist-empty { padding: .75rem 0; color: var(--ink-2); font-size: var(--t-sm); }
.comment {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .85rem;
  align-items: start;
  padding-block: .9rem;
  border-top: 1px dashed var(--line);
}
.comment:first-child { border-top: 0; }
.c-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; margin: 0 0 .2rem; font-size: var(--t-sm); }
.c-name { font-weight: 700; color: var(--ink); text-decoration: none; }
a.c-name:hover { text-decoration: underline; }
.c-name.is-guest { font-weight: 600; color: var(--ink-2); }
.c-time { font: 500 var(--t-xs) var(--f-mono); color: var(--ink-2); }
.c-text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.c-del {
  padding: .3rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 500 var(--t-xs) var(--f-body);
  cursor: pointer;
}
.c-del:hover, .c-del.is-confirm { border-color: var(--bad); color: var(--bad); }

/* Profil kucharza */
.profile-page { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); background: var(--bg); }
.profile-loading { padding-block: 3rem; }
.profile-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.25rem, 4vw, 2.5rem);
  align-items: start;
  margin-bottom: 2rem;
}
.profile-id { display: grid; gap: .45rem; min-width: 0; }
.profile-name {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 1.4rem + 3.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.04em;
  overflow-wrap: anywhere;
}
.profile-since { margin: 0; font: 500 var(--t-sm) var(--f-mono); color: var(--ink-2); }
.profile-egg { display: inline-flex; align-items: center; gap: .45rem; margin: .2rem 0 0; }
.profile-egg .ei { width: 16px; height: 21px; }
.profile-bio { margin: .3rem 0 0; max-width: 60ch; font-size: var(--t-md); white-space: pre-line; }
.profile-bio.is-empty { color: var(--ink-2); font-style: italic; }
.profile-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-top: .6rem; }
.profile-edit {
  display: grid;
  gap: 1rem;
  max-width: 44rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.profile-edit h2 { margin: 0; font-family: var(--f-display); font-size: 1.15rem; font-weight: 700; }
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 clamp(2rem, 4vw, 3rem);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--line);
}
.profile-stats div { display: grid; gap: .25rem; padding: 1.1rem 1.25rem; background: var(--surface); }
.profile-stats dt {
  font: 600 var(--t-xs) var(--f-mono);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.profile-stats dd {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.8rem, 1.3rem + 2vw, 2.6rem);
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.profile-section { display: grid; gap: 1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.profile-section h2 { margin: 0; font-family: var(--f-display); font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; }
.profile-comment { grid-template-columns: minmax(0, 1fr); }
.profile-login { margin-block: 2rem; }
.like-btn.is-static { cursor: default; }
.like-btn.is-static:hover { transform: none; }

@media (max-width: 560px) {
  .profile-head { grid-template-columns: minmax(0, 1fr); }
  .avatar-xl { width: 5rem; height: 6.3rem; font-size: 2.2rem; padding-top: .8rem; }
  .profile-stats div { padding: .9rem .8rem; }
}

/* Ikona konta w pasku nawigacji */
.nav-account { position: relative; flex: none; }
.account-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.account-btn .ico { width: 20px; height: 20px; stroke-width: 1.8; }
.account-btn.is-member { border-color: transparent; background: transparent; }
.account-btn[aria-expanded="true"] { box-shadow: 0 0 0 3px color-mix(in srgb, var(--yolk) 35%, transparent); }
.avatar-nav { width: 30px; height: 38px; font-size: .85rem; padding-top: .25rem; }
.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 40;
  display: grid;
  gap: .75rem;
  width: min(18.5rem, calc(100vw - 32px));
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 48px -20px var(--shadow);
}
.am-title { margin: 0; font-family: var(--f-display); font-size: 1rem; font-weight: 700; }
.am-text { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.am-login { width: 100%; }
.am-head { display: flex; align-items: center; gap: .75rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.am-head b { display: block; font-size: 1rem; overflow-wrap: anywhere; }
.am-head small { display: block; font-size: var(--t-xs); color: var(--ink-2); }
.am-list { display: grid; gap: .15rem; }
.am-item {
  display: block;
  width: 100%;
  padding: .6rem .7rem;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: 500 var(--t-base) var(--f-body);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.am-item:hover, .am-item:focus-visible { background: var(--bg-alt); }

/* Zdjęcia profilowe i banery */
.avatar-photo { padding: 0; overflow: hidden; background: var(--bg-alt); }
.avatar-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-banner {
  position: relative;
  height: clamp(140px, 24vw, 280px);
  overflow: hidden;
  border-radius: 22px;
  background: var(--bg-alt);
}
.profile-banner img { display: block; width: 100%; height: 100%; object-fit: cover; }
.profile-banner.is-default,
.pick-wide.is-default {
  background:
    radial-gradient(circle at 18% 120%, color-mix(in srgb, var(--yolk) 55%, transparent) 0 22%, transparent 22.5%),
    radial-gradient(circle at 86% -20%, color-mix(in srgb, var(--shell) 70%, transparent) 0 30%, transparent 30.5%),
    linear-gradient(120deg, var(--bg-alt), var(--surface));
}
.profile-banner + .profile-head,
.profile-admin + .profile-head { margin-top: 0; }
.profile-head .avatar-xl {
  position: relative;
  z-index: 1;
  margin-top: calc(-1 * clamp(2.5rem, 5vw, 4rem));
  margin-left: clamp(.5rem, 2vw, 1.5rem);
  border: 4px solid var(--bg);
  box-shadow: 0 10px 24px -14px var(--shadow);
}
.profile-head .profile-id { padding-top: 1rem; }
.profile-admin {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: .4rem .6rem;
  margin-top: .75rem;
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.profile-admin .chip.is-confirm { border-color: var(--bad); color: var(--bad); }

.pick { display: grid; gap: .6rem; min-width: 0; margin: 0; padding: 0; border: 0; }
.pick legend { margin-bottom: .6rem; padding: 0; font-size: var(--t-sm); font-weight: 600; }
.pick-grid { display: grid; gap: .5rem; }
.pick-avatar .pick-grid { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
.pick-banner .pick-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.pick-opt {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: .35rem;
  min-width: 0;
  padding: .45rem;
  border: 2px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}
.pick-opt:hover { background: var(--bg-alt); }
.pick-opt input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.pick-opt:has(input:checked) { border-color: var(--yolk); background: color-mix(in srgb, var(--yolk) 12%, var(--surface)); }
.pick-opt:has(input:focus-visible) { outline: 3px solid var(--yolk); outline-offset: 2px; }
.pick-opt:has(input:disabled) { cursor: default; opacity: .55; }
.pick-opt:has(input:disabled):hover { background: transparent; }
.pick-face { display: grid; place-items: center; width: 100%; }
.pick-face .avatar { width: 52px; height: 66px; font-size: 1.3rem; padding-top: .5rem; }
.pick-face .avatar-photo { padding-top: 0; }
.pick-wide {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-alt);
}
.pick-wide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pick-plus {
  display: grid;
  place-items: center;
  width: 52px;
  height: 66px;
  border: 2px dashed var(--line);
  border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%;
  color: var(--ink-2);
  font-size: 1.6rem;
  line-height: 1;
}
.pick-plus.pick-wide { width: 100%; height: auto; border-radius: 8px; }
.pick-name { font-size: var(--t-xs); line-height: 1.25; text-align: center; color: var(--ink-2); }
.pick-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.pick-upload { min-height: 40px; font-size: var(--t-sm); cursor: pointer; }
.pick-upload:focus-within { outline: 3px solid var(--yolk); outline-offset: 2px; }
.am-head .avatar-photo, .comment .avatar-photo { padding-top: 0; }

/* Okno logowania */
.ldialog { width: min(440px, calc(100% - 2rem)); }
@media (max-width: 640px) {
  .rdialog.ldialog { width: 100%; }
}
.ld { display: grid; gap: .9rem; padding: clamp(1.5rem, 5vw, 2.25rem); }
.ld p { max-width: none; }
.ld .eyebrow { margin-bottom: -.4rem; color: var(--yolk-ink); }
.ld-title {
  margin: 0;
  padding-right: 2.5rem;
  font-family: var(--f-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
}
.ld-lede { margin: 0; color: var(--ink-2); }
.ld-lede b { color: var(--ink); overflow-wrap: anywhere; }
.ld .btn { width: 100%; }
.ld-google { gap: .7rem; background: var(--surface); }
.ld-g { width: 20px; height: 20px; flex: none; }
.ld-or {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin: .2rem 0 0;
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.ld-or::before,
.ld-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ld-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-alt);
}
.ld-tabs button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-2);
  font: 600 var(--t-sm) var(--f-body);
  cursor: pointer;
}
.ld-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 2px 8px -3px var(--shadow); }
.ld-form { display: grid; gap: .85rem; }
.ld-form[hidden] { display: none; }
.ld .ffield > label { font-size: var(--t-sm); font-weight: 600; }
.ld-pass { position: relative; display: block; }
.rform .ld-pass input { padding-right: 4.6rem; }
.ld-show {
  position: absolute;
  top: 50%;
  right: .35rem;
  min-height: 34px;
  padding: 0 .7rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--yolk-ink);
  font: 600 var(--t-sm) var(--f-body);
  cursor: pointer;
  transform: translateY(-50%);
}
.ld-show:hover { background: var(--bg-alt); }
.ld-forgot, .ld-back { justify-self: start; font-size: var(--t-sm); }
.ld-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0; font-size: var(--t-sm); }
.ld-mail {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--yolk) 18%, var(--surface));
}
.ld-mail svg { width: 32px; height: 32px; fill: none; stroke: var(--yolk-ink); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; }
.account-btn.is-pending { position: relative; }
.account-btn.is-pending::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: var(--yolk);
}

/* Ulubione */
.fav-btn {
  position: absolute;
  right: .7rem;
  bottom: .7rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  color: var(--ink-2);
  box-shadow: 0 4px 14px -6px var(--shadow);
  cursor: pointer;
  transition: transform .15s ease, color .15s ease;
}
.fav-btn:hover { transform: translateY(-1px); color: var(--fav); }
.fav-btn .ico { width: 19px; height: 19px; }
.fav-btn.is-on, .fav-wide.is-on { color: var(--fav); }
.fav-btn.is-on .ico-heart, .fav-wide.is-on .ico-heart { fill: currentColor; }
.fav-btn.is-pop .ico-heart, .fav-wide.is-pop .ico-heart { animation: fav-pop .4s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes fav-pop { 40% { transform: scale(1.3); } }
.rd-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin-top: .4rem; }
.rd-actions .rd-social { margin-top: 0; }
.fav-wide {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1rem .55rem .8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: 600 var(--t-sm) var(--f-body);
  cursor: pointer;
  transition: border-color .15s ease;
}
.fav-wide:hover { border-color: var(--fav); }
.fav-wide .ico { width: 18px; height: 18px; }
.fav-wide.is-on { border-color: color-mix(in srgb, var(--fav) 45%, var(--line)); background: color-mix(in srgb, var(--fav) 8%, var(--surface)); }
.fav-wide.is-on .fav-label { color: var(--ink); }
.chip-fav { display: inline-flex; align-items: center; gap: .35rem; }
.chip-fav .ico { width: 14px; height: 14px; color: var(--fav); }
.chip-fav[aria-checked="true"] .ico { fill: currentColor; }
.rstatus.is-empty-favs {
  padding: 1rem 1.15rem;
  border: 1.5px dashed var(--line);
  border-radius: 16px;
}
@media (prefers-reduced-motion: reduce) {
  .fav-btn.is-pop .ico-heart, .fav-wide.is-pop .ico-heart { animation: none; }
}

/* =========================================================
   Forum
   ========================================================= */

.nav-links a.nav-forum { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); }
.nav-links a.nav-forum::before {
  content: "";
  width: 9px;
  height: 8px;
  border-radius: 3px 3px 3px 0;
  background: var(--av-3);
}
@media (max-width: 640px) {
  .nav-links li:has(.nav-forum) { order: -1; }
}

.forum-page { min-height: 70vh; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); background: var(--bg); }
.forum-page:focus { outline: none; }
.forum-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.forum-head .section-head { margin-bottom: 0; }
.forum-title { font-size: clamp(2.4rem, 1.2rem + 4.5vw, 4.4rem); }
.forum-cta { display: grid; justify-items: end; gap: .5rem; }
.forum-stats { margin: 0; font: 500 var(--t-xs) var(--f-mono); color: var(--ink-2); }
.forum-stats:empty { display: none; }

.forum-tools { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: .9rem; }
.forum-search {
  position: relative;
  flex: 1 1 18rem;
  display: flex;
  align-items: center;
}
.forum-search .ico { position: absolute; left: .9rem; width: 18px; height: 18px; color: var(--ink-2); pointer-events: none; }
.forum-search input,
.forum-sort select {
  width: 100%;
  min-height: 46px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}
.forum-search input { padding: 0 1rem 0 2.6rem; }
.forum-sort { display: flex; align-items: center; gap: .6rem; font-size: var(--t-sm); color: var(--ink-2); }
.forum-sort select { width: auto; padding: 0 1rem; font-size: var(--t-sm); }
.forum-search input:focus,
.forum-sort select:focus { outline: none; border-color: var(--yolk); box-shadow: 0 0 0 3px color-mix(in srgb, var(--yolk) 28%, transparent); }
.forum-tags { margin-bottom: 1.25rem; }
.forum-state { margin: 0 0 1rem; color: var(--ink-2); }
.forum-state:empty { display: none; }

.ft-list { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.ft-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .9rem 1.1rem;
  align-items: start;
  padding: 1.05rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  transition: border-color .15s ease, transform .15s ease;
}
.ft-item:hover { border-color: color-mix(in srgb, var(--ink-2) 55%, var(--line)); }
.ft-item.is-pinned { border-color: color-mix(in srgb, var(--yolk) 55%, var(--line)); background: color-mix(in srgb, var(--yolk) 6%, var(--surface)); }
.ft-main { display: grid; gap: .3rem; min-width: 0; }
.ft-title { margin: 0; font-family: var(--f-display); font-size: 1.05rem; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; overflow-wrap: anywhere; }
.ft-title a { color: var(--ink); text-decoration: none; }
.ft-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ft-item.is-closed .ft-title a { color: var(--ink-2); }
.ft-meta { margin: 0; font-size: var(--t-sm); color: var(--ink-2); overflow-wrap: anywhere; }
.ft-meta a { color: inherit; font-weight: 600; text-underline-offset: 2px; }
.ft-tags { display: flex; flex-wrap: wrap; gap: .3rem; margin: .15rem 0 0; }
.ft-tags:empty { display: none; }
.tag {
  padding: .25rem .65rem;
  border: 0;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink-2);
  font: 600 var(--t-xs)/1.3 var(--f-body);
  cursor: pointer;
}
.tag:hover { color: var(--ink); background: color-mix(in srgb, var(--yolk) 18%, var(--bg-alt)); }
.ft-count {
  display: grid;
  justify-items: center;
  min-width: 4.5rem;
  color: var(--ink-2);
  text-decoration: none;
}
.ft-count .ico { width: 18px; height: 18px; margin-bottom: .15rem; }
.ft-count b { font: 800 1.25rem/1.1 var(--f-display); color: var(--ink); }
.ft-count span { font-size: var(--t-xs); }
.ft-badges { display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--ink-2);
  font: 600 var(--t-xs)/1.3 var(--f-mono);
  letter-spacing: .02em;
}
.badge .ico { width: 12px; height: 12px; }
.badge-pin { background: color-mix(in srgb, var(--yolk) 22%, var(--surface)); color: var(--yolk-ink); }
.badge-op { background: color-mix(in srgb, var(--av-3) 40%, var(--surface)); color: var(--ink); }

/* Wątek */
.ft-back { display: inline-block; margin-bottom: 1.25rem; color: var(--yolk-ink); font-weight: 600; text-underline-offset: 3px; }
.fthread {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.25rem, 3.5vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.fth-head { display: grid; gap: .6rem; }
.fth-title {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(1.6rem, 1.1rem + 2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
}
.fpost { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: .9rem; align-items: start; }
.fpost-body { display: grid; gap: .35rem; min-width: 0; }
.fpost-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; margin: 0; font-size: var(--t-sm); }
.fpost-name { color: var(--ink); font-weight: 700; text-underline-offset: 2px; }
.fpost-time, .fpost-edited { font: 500 var(--t-xs) var(--f-mono); color: var(--ink-2); }
.fpost-text { overflow-wrap: anywhere; line-height: 1.6; }
.fpost-text p { margin: 0 0 .7em; max-width: 72ch; }
.fpost-text p:last-child { margin-bottom: 0; }
.fpost-text a { color: var(--yolk-ink); text-underline-offset: 2px; }
.fpost-op .fpost-text { font-size: var(--t-md); }
.fpost-actions { display: flex; gap: 1rem; margin: .15rem 0 0; font-size: var(--t-sm); }
.fth-actions { display: flex; flex-wrap: wrap; gap: .45rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.chip-danger { color: var(--bad); }
.chip.is-confirm, .linklike.is-confirm { border-color: var(--bad); color: var(--bad); }

.freplies { margin-top: clamp(1.75rem, 4vw, 2.5rem); }
.freplies-title { margin: 0 0 .75rem; font-family: var(--f-display); font-size: 1.25rem; font-weight: 700; letter-spacing: -.02em; }
.freplies-title span { margin-left: .3rem; font: 500 var(--t-sm) var(--f-mono); color: var(--ink-2); }
.fposts { display: grid; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.fposts > li { padding-block: 1.1rem; border-top: 1px dashed var(--line); }
.fposts > li:first-child { border-top: 0; padding-top: .25rem; }
.fposts-empty { color: var(--ink-2); }
.fpost.is-deleted { display: block; }
.fpost-gone { margin: 0; font-size: var(--t-sm); font-style: italic; color: var(--ink-2); }
.fpost.is-new { animation: fpost-new 2.4s ease-out; border-radius: 14px; }
@keyframes fpost-new { 0%, 40% { background: color-mix(in srgb, var(--yolk) 16%, transparent); } 100% { background: transparent; } }
.fedit { gap: .6rem; }
.fedit textarea { resize: vertical; line-height: 1.5; }

.freply {
  padding: clamp(1.1rem, 3vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.freply-form { display: grid; gap: .75rem; }
.freply-form textarea { resize: vertical; line-height: 1.5; }
.freply-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; }
.freply-note { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 0; color: var(--ink-2); }
.freply-note .ico { width: 18px; height: 18px; }
.freply-login p { margin: 0; flex: 1 1 16rem; }

/* Formularz wątku */
.tdialog { width: min(720px, calc(100% - 2rem)); }
.tdialog .rform-body { gap: 1.25rem; }
.tdialog textarea { resize: vertical; line-height: 1.55; }
.tag-picks { display: flex; flex-wrap: wrap; gap: .45rem; }
.tag-pick { position: relative; cursor: pointer; }
.tag-pick input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.tag-pick span {
  display: inline-block;
  padding: .5rem .9rem;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: var(--t-sm);
  font-weight: 500;
  transition: border-color .15s ease, background-color .15s ease;
}
.tag-pick:hover span { border-color: var(--ink-2); }
.tag-pick input:checked + span { border-color: var(--yolk); background: color-mix(in srgb, var(--yolk) 18%, var(--surface)); font-weight: 600; }
.tag-pick input:focus-visible + span { outline: 3px solid var(--yolk); outline-offset: 2px; }
.tag-pick input:disabled + span { opacity: .45; cursor: default; }
@media (max-width: 640px) {
  .rdialog.tdialog { width: 100%; }
}

@media (max-width: 560px) {
  .forum-cta { justify-items: start; }
  .ft-item { grid-template-columns: auto minmax(0, 1fr); padding: .95rem 1rem; }
  .ft-count {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: .35rem;
    justify-items: start;
    min-width: 0;
  }
  .ft-count .ico { margin: 0; width: 15px; height: 15px; }
  .ft-count b { font-size: var(--t-sm); }
  .forum-sort { flex: 1 1 100%; }
  .forum-sort select { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .fpost.is-new { animation: none; }
}
.fgroup legend small { font: 400 var(--t-sm) var(--f-body); letter-spacing: 0; color: var(--ink-2); }
@media (max-width: 420px) {
  .nav-links a { padding-inline: .5rem; }
  .nav-links a.nav-recipes, .nav-links a.nav-forum { gap: .3rem; }
}
@media (max-width: 380px) {
  .nav-links a.nav-recipes::before, .nav-links a.nav-forum::before { display: none; }
}

/* =========================================================
   Gry
   ========================================================= */

.nav-links a.nav-games { display: inline-flex; align-items: center; gap: .4rem; color: var(--ink); }
.nav-links a.nav-games::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--av-1);
  transform: rotate(45deg);
}
@media (max-width: 640px) {
  .nav-links li:has(.nav-games) { order: -1; }
}
@media (max-width: 420px) {
  .nav-links a.nav-games { gap: .3rem; }
}
@media (max-width: 380px) {
  .nav-links a.nav-games::before { display: none; }
}

.games-page { min-height: 70vh; padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3rem, 7vw, 5rem); background: var(--bg); }
.games-page:focus { outline: none; }
.games-head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.games-title { font-size: clamp(2.4rem, 1.2rem + 4.5vw, 4.4rem); }
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 255px), 1fr)); gap: 1.1rem; }
.game-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  transition: transform .2s ease, box-shadow .2s ease;
}
.game-card:hover { transform: translateY(-3px); box-shadow: 0 26px 44px -30px var(--shadow); }
.game-thumb { display: block; aspect-ratio: 16 / 10; background: var(--bg-alt); }
.game-thumb svg { display: block; width: 100%; height: 100%; }
.game-card-body { display: grid; align-content: start; gap: .55rem; padding: 1.1rem 1.2rem 1.25rem; }
.game-card-title { margin: 0; font-family: var(--f-display); font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; }
.game-card-title a { color: var(--ink); text-decoration: none; }
.game-card-title a:hover { text-decoration: underline; text-underline-offset: 3px; }
.game-card-text { margin: 0; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.5; }
.game-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .3rem 0 .45rem; }
.game-facts div { min-width: 0; padding: .55rem .7rem; border-radius: 12px; background: var(--bg-alt); }
.game-facts dt { font: 600 var(--t-xs) var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.game-facts dd { margin: .15rem 0 0; font-size: var(--t-sm); font-weight: 700; overflow-wrap: anywhere; }
.game-card-play { justify-self: start; }

/* Ekran gry */
.game-view .ft-back { margin-bottom: 1rem; }
.game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: start;
}
.game-play {
  width: max(min(100%, 270px), min(100%, calc((100dvh - 300px) * var(--ratio)), var(--maxw, 480px)));
  margin-inline: auto;
}
.game-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .8rem; margin-bottom: .7rem; }
.game-head .eyebrow { order: 2; }
.game-title { margin: 0; font-family: var(--f-display); font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem); font-weight: 800; letter-spacing: -.03em; }
.game-hud { display: flex; align-items: stretch; gap: .5rem; margin-bottom: .6rem; }
.hud-box {
  display: grid;
  min-width: 5.5rem;
  margin: 0;
  padding: .4rem .8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.hud-box span { font: 600 var(--t-xs) var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.hud-box b { font: 800 1.25rem/1.15 var(--f-display); font-variant-numeric: tabular-nums; }
.hud-btns { display: flex; gap: .4rem; margin-left: auto; }
.hud-btn {
  display: grid;
  place-items: center;
  width: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.hud-btn:disabled { opacity: .4; cursor: default; }
.hud-btn[aria-pressed="false"] { color: var(--ink-2); }
.hud-btn .ico { width: 20px; height: 20px; }
.game-stage {
  position: relative;
  width: 100%;
  aspect-ratio: var(--ratio);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #EAF7FC;
  box-shadow: 0 30px 60px -40px var(--shadow);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.game-stage:focus { outline: none; }
.game-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.game-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: color-mix(in srgb, #0C1412 45%, transparent);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.game-overlay[hidden] { display: none; }
.ov-card {
  display: grid;
  justify-items: center;
  gap: .6rem;
  width: min(100%, 22rem);
  padding: 1.5rem 1.25rem;
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .5);
  animation: rd-in .25s cubic-bezier(.2, .9, .3, 1);
}
.ov-kicker { margin: 0; font: 700 var(--t-xs) var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--yolk-ink); }
.ov-title { margin: 0; font-family: var(--f-display); font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; }
.ov-text { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.ov-score { margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.ov-score b { display: block; font: 800 3rem/1.05 var(--f-display); letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.ov-status { margin: 0; font-size: var(--t-sm); font-weight: 700; color: var(--good); }
.ov-status:empty { display: none; }
.ov-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .3rem; }
.ov-play { min-width: 10rem; font-size: 1.1rem; }
.ov-small { margin: .2rem 0 0; font-size: var(--t-xs); color: var(--ink-2); }

/* Tablica wyników i opis */
.game-side { display: grid; gap: 1.25rem; }
.board, .howto { padding: 1.15rem 1.2rem; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.board h2, .howto h2 { display: flex; align-items: center; gap: .45rem; margin: 0 0 .8rem; font-family: var(--f-display); font-size: 1.1rem; font-weight: 700; letter-spacing: -.02em; }
.board h2 .ico { width: 20px; height: 20px; color: var(--yolk-ink); }
.board-list { display: grid; gap: .2rem; margin: 0; padding: 0; list-style: none; }
.brow {
  display: grid;
  grid-template-columns: 1.8rem auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: .55rem;
  padding: .3rem .4rem;
  border-radius: 12px;
}
.brow.is-me { background: color-mix(in srgb, var(--yolk) 16%, var(--surface)); }
.brank { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--bg-alt); color: var(--ink-2); font: 800 var(--t-xs) var(--f-mono); }
.brank.medal-1 { background: #F4C430; color: #3A2A00; }
.brank.medal-2 { background: #C9D1D6; color: #26302F; }
.brank.medal-3 { background: #D99A6C; color: #3A1E0A; }
.bav .avatar { width: 1.75rem; height: 2.2rem; padding-top: .25rem; font-size: .8rem; }
.bav .avatar-photo { padding-top: 0; }
.bname { min-width: 0; overflow: hidden; color: var(--ink); font-size: var(--t-sm); font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.bname:hover { text-decoration: underline; }
.bscore { font: 800 var(--t-sm) var(--f-mono); font-variant-numeric: tabular-nums; }
.bdel { padding: .1rem .35rem; border: 0; background: none; color: var(--bad); font-weight: 700; cursor: pointer; }
.board-count { margin: .7rem 0 0; font: 500 var(--t-xs) var(--f-mono); color: var(--ink-2); }
.board-me { margin: .6rem 0 0; font-size: var(--t-sm); }
.howto-body { display: grid; gap: .6rem; color: var(--ink-2); font-size: var(--t-sm); line-height: 1.55; }
.howto-body p { margin: 0; }
.howto-list { display: grid; gap: .4rem; margin: 0; padding-left: 1.1rem; }
.howto-list b { color: var(--ink); }
.chain { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; list-style: none; }
.chain li { display: grid; justify-items: center; gap: .1rem; color: var(--ink-2); font: 700 10px var(--f-mono); }
.chain-art { display: block; width: 30px; height: 36px; }
.chain-art svg, .chain-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.chain-art img { border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%; }

@media (max-width: 860px) {
  .game-layout { grid-template-columns: minmax(0, 1fr); }
}

/* Jajo 2048 */
.g2048 { position: absolute; inset: 0; padding: 3.5%; background: #E6DAC2; container-type: size; }
.g2048-board { position: relative; width: 100%; height: 100%; }
.g2048-cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 3%; }
.g2048-cells span { border-radius: 12px; background: rgba(255, 255, 255, .38); }
.t2048 {
  position: absolute;
  left: calc(var(--x) * 25.75%);
  top: calc(var(--y) * 25.75%);
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  width: 22.75%;
  height: 22.75%;
  padding: 7% 6% 4%;
  border-radius: 12px;
  background: #F6EEDF;
  color: #5C4A2E;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .08);
  transition: left .11s ease, top .11s ease;
}
.t2048-art { display: block; height: 100%; aspect-ratio: 4 / 5; min-height: 0; }
.t2048-art svg, .t2048-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.t2048-art:has(img) { overflow: hidden; border-radius: 50% 50% 50% 50% / 58% 58% 42% 42%; }
.t2048-art img { transform: scale(1.22); }
.t2048 b { font: 800 clamp(.6rem, 4.4cqw, 1.15rem)/1.2 var(--f-mono); font-variant-numeric: tabular-nums; }
.t2048.lv-1 { background: #F3E3C2; }
.t2048.lv-2 { background: #F1D49C; }
.t2048.lv-3 { background: #F2C46D; }
.t2048.lv-4 { background: #F3B04A; color: #3A2400; }
.t2048.lv-5 { background: #EF9A3C; color: #fff; }
.t2048.lv-6 { background: #E6823A; color: #fff; }
.t2048.lv-7 { background: #D96D3A; color: #fff; }
.t2048.lv-8 { background: #C9583A; color: #fff; }
.t2048.lv-9 { background: #E5B400; color: #fff; }
.t2048.lv-10 { background: #D4A000; color: #fff; box-shadow: 0 0 0 3px #FFE27A, inset 0 -4px 0 rgba(0, 0, 0, .1); }
.t2048.lv-11 { background: #5B3E9E; color: #fff; }
.t2048.is-new { animation: t2048-in .16s ease-out; }
.t2048.is-merged { animation: t2048-pop .18s ease-out; z-index: 2; }
@keyframes t2048-in { from { transform: scale(.3); opacity: 0; } }
@keyframes t2048-pop { 50% { transform: scale(1.14); } }
.g2048-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  margin: 0;
  padding: .7rem 1.1rem;
  border-radius: 14px;
  background: #15201C;
  color: #FFF6E8;
  font-weight: 700;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  animation: rd-in .25s ease-out;
}

/* Pary pisanek */
.gpary { position: absolute; inset: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 2.5%; padding: 3.5%; background: #F4ECDC; }
.gpary-hud { display: flex; justify-content: space-between; gap: .5rem; margin: 0; color: #5C4A2E; font: 600 clamp(.7rem, 2.6vw, .85rem) var(--f-mono); }
.gpary-hud b { color: #15201C; }
.gpary-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); gap: 2.5%; min-height: 0; }
.pcard { position: relative; min-width: 0; min-height: 0; padding: 0; border: 0; background: none; cursor: pointer; perspective: 600px; }
.pcard-in { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .35s ease; }
.pcard.is-open .pcard-in { transform: rotateY(180deg); }
.pcard-back, .pcard-face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 12px;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.pcard-back {
  border: 2px solid #B19D78;
  background:
    radial-gradient(circle at 50% 30%, #CDBB96 0 17%, transparent 18%),
    radial-gradient(circle at 50% 72%, #CDBB96 0 17%, transparent 18%),
    #E2D3B5;
}
.pcard:hover .pcard-back { background-color: #E9DCC2; }
.pcard-face { border: 2px solid #E2D3B5; background: #FFFDF8; transform: rotateY(180deg); }
.pcard-face svg { width: 70%; height: 84%; }
.pcard.is-done .pcard-face { border-color: #2E9E5B; box-shadow: 0 0 0 3px rgba(46, 158, 91, .25); }
.pcard.is-done .pcard-in { animation: pcard-pop .3s ease-out .2s; }
@keyframes pcard-pop { 50% { scale: 1.06; } }
.pcard:focus-visible { outline: 3px solid var(--yolk); outline-offset: 2px; border-radius: 12px; }
.gpary.is-paused .pcard-face svg { filter: blur(10px); }

@media (prefers-reduced-motion: reduce) {
  .t2048, .pcard-in { transition: none; }
  .t2048.is-new, .t2048.is-merged, .pcard.is-done .pcard-in, .ov-card { animation: none; }
}
.profile-games { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: .6rem; margin: 0; padding: 0; list-style: none; }
.profile-games li { display: flex; justify-content: space-between; align-items: baseline; gap: .8rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.profile-games a { color: var(--ink); font-weight: 600; text-underline-offset: 3px; }
.profile-games b { font: 800 1.05rem var(--f-mono); font-variant-numeric: tabular-nums; }

/* Pasek: Przepisy, Forum i Gry zawsze na początku na węższych ekranach */
@media (max-width: 1000px) {
  .nav-links li:has(.nav-recipes),
  .nav-links li:has(.nav-forum),
  .nav-links li:has(.nav-games) { order: -1; }
}
@media (max-width: 480px) {
  .brand { gap: 0; margin-left: -.35rem; padding: .35rem; font-size: 0; }
  .nav-links a.nav-recipes::before,
  .nav-links a.nav-forum::before,
  .nav-links a.nav-games::before { display: none; }
}
@media (max-width: 400px) {
  .nav-row { gap: .5rem; }
  .nav-links a { padding-inline: .45rem; }
}
.games-page:has(.game-view:not([hidden])) { padding-top: clamp(1.25rem, 3vw, 2rem); }

/* =========================================================
   Kury z procy
   ========================================================= */

.procy-page { min-height: 70vh; padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3rem, 7vw, 5rem); background: var(--bg); }
.procy-page:focus { outline: none; }
.procy-menu > .ft-back { margin-bottom: 1rem; }
.procy-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1.5rem 3rem; margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }
.procy-head .section-head { margin-bottom: 0; max-width: 46rem; }
.procy-title { font-size: clamp(2.4rem, 1.2rem + 4.5vw, 4.4rem); }
.procy-summary { display: grid; justify-items: end; gap: .2rem; text-align: right; max-width: 22rem; }
.procy-total { display: flex; align-items: baseline; gap: .4rem; margin: 0; font-size: var(--t-sm); color: var(--ink-2); }
.procy-total b { font: 800 2.2rem/1 var(--f-display); color: var(--ink); }
.procy-star { color: #E5A800; font-size: 1.8rem; line-height: 1; }
.procy-score { margin: 0; font: 600 var(--t-sm) var(--f-mono); color: var(--ink-2); }
.procy-score b { color: var(--ink); }
.procy-sync { margin: .3rem 0 0; font-size: var(--t-xs); color: var(--ink-2); }
.procy-sync:empty { display: none; }

.procy-chapters { display: grid; gap: 1.1rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.procy-chapter {
  --ch-a: #8FD3F4;
  --ch-b: #E8F7FD;
  --ch-ink: #13324A;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: 22px;
  background: linear-gradient(135deg, var(--ch-a), var(--ch-b));
  color: var(--ch-ink);
}
.procy-chapter.theme-zmierzch { --ch-a: #F47C6A; --ch-b: #FFD3A0; --ch-ink: #4A1A12; }
.procy-chapter.theme-noc { --ch-a: #141C38; --ch-b: #34457A; --ch-ink: #EEF2FF; }
.procy-ch-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .2rem 1rem; align-items: baseline; margin-bottom: .9rem; }
.procy-ch-head h2 { display: flex; align-items: center; gap: .6rem; margin: 0; font-family: var(--f-display); font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em; }
.procy-ch-head h2 span { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: rgba(255,255,255,.55); color: var(--ch-ink); font-size: .95rem; }
.theme-noc .procy-ch-head h2 span { background: rgba(255,255,255,.18); }
.procy-ch-head p { margin: 0; font-size: var(--t-sm); opacity: .85; grid-column: 1; }
.procy-ch-stars { grid-column: 2; grid-row: 1; font: 800 var(--t-sm) var(--f-mono); opacity: 1 !important; }
.procy-ch-stars span { color: #E5A800; }
.procy-levels { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: .6rem; margin: 0; padding: 0; list-style: none; }
.procy-level {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "num name" "num stars" "best best";
  align-items: center;
  gap: .1rem .6rem;
  height: 100%;
  padding: .7rem .8rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, .78);
  color: #15201C;
  text-decoration: none;
  box-shadow: 0 6px 16px -10px rgba(0, 0, 0, .35);
  transition: transform .15s ease, background-color .15s ease;
}
.procy-level:hover { transform: translateY(-2px); background: #fff; }
.procy-level:focus-visible { outline: 3px solid var(--yolk); outline-offset: 2px; }
.procy-level.is-locked { background: rgba(255, 255, 255, .3); color: rgba(21, 32, 28, .55); box-shadow: none; cursor: not-allowed; }
.theme-noc .procy-level.is-locked { color: rgba(238, 242, 255, .6); background: rgba(255, 255, 255, .08); }
.procy-level.is-locked:hover { transform: none; }
.pl-num { grid-area: num; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 12px; background: #FFD23F; font: 800 1.05rem var(--f-display); }
.procy-level.is-locked .pl-num { background: rgba(0, 0, 0, .08); }
.pl-num .ico { width: 18px; height: 18px; }
.pl-name { grid-area: name; overflow: hidden; font-size: var(--t-sm); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.pl-stars { grid-area: stars; display: flex; gap: .1rem; font-size: 1rem; line-height: 1; }
.pl-stars i { font-style: normal; color: rgba(0, 0, 0, .18); }
.pl-stars i.on { color: #E5A800; text-shadow: 0 1px 0 rgba(0, 0, 0, .15); }
.procy-level.is-locked .pl-stars { display: none; }
.pl-best { grid-area: best; font: 600 var(--t-xs) var(--f-mono); color: rgba(21, 32, 28, .6); }
.pl-best:empty { display: none; }

.procy-info { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.procy-hens { display: grid; gap: .6rem; margin: 0 0 .9rem; padding: 0; list-style: none; }
.procy-hens li { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: .8rem; }
.procy-hens canvas { width: 56px; height: 56px; border-radius: 14px; background: var(--bg-alt); }
.procy-hens b { display: block; color: var(--ink); }
.procy-hens span { display: block; font-size: var(--t-sm); color: var(--ink-2); }
.procy-hens small { font: 600 var(--t-xs) var(--f-mono); color: var(--yolk-ink); }
.procy-brow { grid-template-columns: 1.8rem auto minmax(0, 1fr) auto auto auto; }
.bstars { font: 700 var(--t-xs) var(--f-mono); color: #B98500; }
@media (max-width: 760px) {
  .procy-info { grid-template-columns: minmax(0, 1fr); }
  .procy-summary { justify-items: start; text-align: left; }
}

/* Plansza gry */
.procy-stage-wrap { display: grid; place-items: center; }
.procy-stage {
  position: relative;
  width: min(100%, calc((100dvh - 120px) * 16 / 9));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #8FD3F4;
  box-shadow: 0 30px 60px -40px var(--shadow);
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.procy-hud { position: absolute; top: 2%; left: 1.5%; z-index: 3; display: flex; gap: .5rem; }
.procy-btn {
  display: grid;
  place-items: center;
  width: clamp(36px, 4.4vw, 48px);
  height: clamp(36px, 4.4vw, 48px);
  border: 2px solid rgba(255, 255, 255, .75);
  border-radius: 50%;
  background: rgba(21, 32, 28, .45);
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.procy-btn:hover { background: rgba(21, 32, 28, .65); }
.procy-btn .ico { width: 52%; height: 52%; stroke-width: 2.4; }
.procy-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 3%;
  overflow: auto;
  background: rgba(12, 20, 18, .55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.procy-overlay[hidden] { display: none; }
.procy-card {
  display: grid;
  justify-items: center;
  gap: .55rem;
  width: min(100%, 27rem);
  padding: clamp(1rem, 3vw, 1.75rem);
  border-radius: 22px;
  background: var(--surface);
  color: var(--ink);
  text-align: center;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
  animation: rd-in .25s cubic-bezier(.2, .9, .3, 1);
}
.procy-card h2 { margin: 0; font-family: var(--f-display); font-size: clamp(1.3rem, 1rem + 1.4vw, 1.9rem); font-weight: 800; letter-spacing: -.03em; }
.procy-card p { margin: 0; color: var(--ink-2); font-size: var(--t-sm); }
.procy-kicker { font: 700 var(--t-xs) var(--f-mono) !important; letter-spacing: .14em; text-transform: uppercase; color: var(--yolk-ink) !important; }
.procy-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .3rem; }
.procy-stars { display: flex; gap: .3rem; font-size: clamp(2.2rem, 6vw, 3.4rem); line-height: 1; }
.procy-stars span { color: var(--bg-alt); transform: scale(.6); animation: procy-star .45s cubic-bezier(.3, 1.6, .5, 1) forwards; animation-delay: var(--d); }
.procy-stars span.on { color: #F4C430; text-shadow: 0 3px 0 #C99700; }
@keyframes procy-star { to { transform: scale(1); } }
.procy-final { font-size: var(--t-sm); }
.procy-final b { font: 800 1.9rem/1.1 var(--f-display); color: var(--ink); }
.procy-note:empty { display: none; }
.procy-intro-hen { width: 120px; height: 120px; }
.procy-rotate {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  place-items: center;
  align-content: center;
  gap: .8rem;
  padding: 1rem;
  background: rgba(12, 20, 18, .88);
  color: #fff;
  text-align: center;
}
.procy-rotate svg { width: 56px; height: 56px; fill: none; stroke: #FFD23F; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; animation: procy-turn 2s ease-in-out infinite; }
.procy-rotate p { margin: 0; font-weight: 700; }
.procy-rotate .btn { color: #fff; border-color: rgba(255, 255, 255, .5); }
.procy-stage.needs-rotate .procy-rotate { display: grid; }
@keyframes procy-turn { 50% { transform: rotate(-90deg); } }

/* Pełny ekran na telefonie */
html.procy-full, html.procy-full body { overflow: hidden; }
html.procy-full .procy-stage-wrap {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #0C1412;
  padding: env(safe-area-inset-top, 0) env(safe-area-inset-right, 0) env(safe-area-inset-bottom, 0) env(safe-area-inset-left, 0);
}
html.procy-full .procy-stage { width: min(100vw, calc(100dvh * 16 / 9)); border-radius: 0; box-shadow: none; }
@media (prefers-reduced-motion: reduce) {
  .procy-stars span { animation: none; transform: none; }
  .procy-rotate svg { animation: none; }
}
@media (min-width: 700px) {
  .game-card-big { grid-column: span 2; }
  .game-card-big .game-thumb { aspect-ratio: 16 / 7; }
}

/* ---------- Nocne ślady (ukryte zagadki) ---------- */

/* Puste jajko w nagłówku */
.egg-void { opacity: 0; transition: opacity .3s ease .2s; }
.egg-void ellipse { fill: #0B0907; }
.egg-void-eye { fill: #C0392B; transform-box: fill-box; transform-origin: center; animation: noc-blink 3.8s ease-in-out infinite; }
.egg-btn.is-empty .egg-void { opacity: 1; }
.egg-btn.is-empty .chick { opacity: 0; transform: none; transition: none; }
@keyframes noc-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.noc-cam-link { font-family: var(--f-mono); font-weight: 700; color: var(--stamp); text-decoration: none; white-space: nowrap; }
.noc-cam-link:hover { text-decoration: underline; }

/* Kod ze skorupki z nocy */
.decoded.is-noc .st b { color: var(--stamp); animation: noc-jitter 2.4s steps(1) infinite; }
.decoded.is-noc .dcard-val { color: var(--stamp); }
@keyframes noc-jitter { 0%, 86%, 100% { transform: none; } 88% { transform: translate(-2px, 1px); } 92% { transform: translate(2px, -1px) skewX(-6deg); } }

/* Notatka Pipa */
dialog.noc-note {
  width: min(440px, calc(100vw - 32px));
  margin: auto;
  padding: 1.6rem 1.5rem 1.3rem;
  border: 1px solid #2E2C25;
  border-radius: 6px;
  color: #ECE5D2;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px),
    radial-gradient(120% 90% at 50% 0%, #1D1C17, #0B0B09);
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(180, 35, 42, .15);
  font-family: var(--f-mono);
}
dialog.noc-note[open] { animation: noc-in .7s steps(1) both; }
dialog.noc-note::backdrop { background: rgba(4, 4, 3, .78); }
@keyframes noc-in {
  0% { opacity: 0; }
  12% { opacity: 1; transform: translateX(-6px) skewX(4deg); }
  20% { opacity: .2; }
  30% { opacity: 1; transform: none; }
  42% { opacity: .6; transform: translateX(3px); }
  50%, 100% { opacity: 1; transform: none; }
}
.noc-note-kicker { margin: 0 0 1rem; color: #D2333B; font-size: var(--t-xs); font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.noc-note-text { min-height: 6.5em; margin: 0; font-size: 1.02rem; line-height: 1.65; white-space: pre-line; }
.noc-note-text { cursor: pointer; }
.noc-note-next, .noc-rd-next {
  margin: 1.1rem 0 0;
  padding: .8rem .9rem;
  border-left: 3px solid #D2333B;
  border-radius: 4px;
  background: rgba(210, 51, 59, .1);
  line-height: 1.55;
}
.noc-note-next[hidden], .noc-rd-next[hidden] { display: none; }
.noc-note-next p, .noc-rd-next p { margin: 0; font-size: var(--t-sm); }
.noc-note-next { animation: noc-in .5s steps(1) both; }
p.noc-note-next-label { margin: 0 0 .35rem; color: #FF6B70; font-family: var(--f-mono); font-size: var(--t-xs); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.noc-rd-next { color: #E4DDCA; }
.noc-profile-next { max-width: 40rem; color: var(--ink); }
.noc-note-link { margin: 1rem 0 0; }
.noc-note-link a { color: #FF5A5F; font-weight: 700; }
.noc-note-saved { margin: 1.2rem 0 0; padding-top: .8rem; border-top: 1px dashed #3A372E; color: #9C9582; font-size: var(--t-xs); line-height: 1.5; }
.noc-note-saved .linklike { color: #ECE5D2; }
.noc-note-close {
  margin-top: 1rem;
  padding: .55rem 1.1rem;
  border: 1px solid #4A463A;
  border-radius: 6px;
  color: #ECE5D2;
  background: transparent;
  font: inherit;
  font-size: var(--t-sm);
  cursor: pointer;
}
.noc-note-close:hover, .noc-note-close:focus-visible { border-color: #D2333B; color: #fff; }

/* Przepis, którego nie ma w spisie */
.rcard-noc { border-color: #2B2A24; color: #E4DDCA; background: #12120F; }
.rcard-noc .rcard-media { background: #050504; cursor: pointer; }
.rcard-noc .noc-art { display: block; width: 100%; height: 100%; }
.rcard-noc .rcard-cat { color: #D2333B; }
.rcard-noc .rcard-intro, .rcard-noc .rcard-meta { color: #A39C88; }
.rcard-noc .rcard-link {
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.rdialog.noc-recipe { color: #E4DDCA; background: #12120F; border-color: #2B2A24; }
.noc-recipe .eyebrow { color: #D2333B; }
.noc-recipe .rd-intro { color: #A39C88; }
.noc-recipe .rd-close { color: #E4DDCA; }
.noc-rd-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 1.5rem; margin-top: 1.5rem; }
.noc-rd-body h3 { margin: 0 0 .7rem; font-family: var(--f-display); font-size: var(--t-md); }
.noc-ing, .noc-steps { margin: 0; padding-left: 1.2rem; display: grid; gap: .5rem; line-height: 1.5; }
.noc-steps li::marker { color: #D2333B; font-family: var(--f-mono); font-weight: 700; }
.noc-rd-saved { margin: 1.5rem 0 0; color: #8E8874; font-family: var(--f-mono); font-size: var(--t-xs); }
@media (max-width: 640px) { .noc-rd-body { grid-template-columns: minmax(0, 1fr); } }

/* Forum: napis na ścianie i włącznik światła */
.noc-wall { display: none; margin: 0 0 1.5rem; padding: .5rem 0; pointer-events: none; user-select: none; }
html.noc-lit .noc-wall { display: block; animation: noc-in 1.3s steps(1) both; }
.noc-wall p {
  margin: 0;
  color: #8E1B1B;
  font-family: var(--f-display);
  font-size: clamp(1.2rem, 1rem + 2.4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: .02em;
  transform: rotate(-2.5deg);
}
.noc-wall p + p { margin-top: .45em; }
.noc-wall p:nth-child(2) { margin-left: 6%; transform: rotate(1.5deg); }
.noc-wall p:nth-child(3) { margin-left: 2%; transform: rotate(-1deg); }
.noc-wall p:not(.noc-wall-saved) { text-shadow: 1px 1px 0 rgba(90, 10, 10, .35); }
.noc-wall .noc-wall-saved { color: var(--ink-2); font-family: var(--f-mono); font-size: var(--t-xs); font-weight: 500; transform: none; margin-top: .8rem; }
.footer-grid:has(.noc-switch) { position: relative; }
.noc-switch {
  position: absolute;
  right: 0;
  bottom: -.4rem;
  width: 34px;
  height: 48px;
  padding: 4px 6px;
  border: 0;
  color: var(--ink);
  background: none;
  opacity: .1;
  cursor: pointer;
  transition: opacity .3s ease;
}
.noc-switch:hover, .noc-switch:focus-visible { opacity: .32; }
.noc-switch svg { display: block; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; }
.noc-switch .noc-switch-key { fill: currentColor; }
html.noc-flicker body { animation: noc-flicker 1.3s steps(1) both; }
@keyframes noc-flicker {
  0% { filter: brightness(.15); }
  10% { filter: brightness(1.5); }
  16% { filter: brightness(.25); }
  26% { filter: brightness(1.3); }
  32% { filter: brightness(.5); }
  44% { filter: brightness(1.7) contrast(.9); }
  70% { filter: brightness(1.15); }
  100% { filter: none; }
}

/* Profil Pipa */
.noc-banner {
  display: block;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .04) 0 1px, transparent 1px 4px),
    radial-gradient(80% 120% at 40% 60%, #2B2C27, #0A0A09);
  color: #D9D6C8;
  font-family: var(--f-mono);
  font-size: clamp(.8rem, .7rem + .5vw, 1.05rem);
  letter-spacing: .08em;
}
.noc-banner span { position: absolute; }
.noc-banner-cam { left: 1.2rem; top: 1rem; }
.noc-banner-rec { right: 1.2rem; top: 1rem; color: #E0161B; animation: noc-rec 1.4s steps(1) infinite; }
.noc-banner-time { right: 1.2rem; bottom: 1rem; }
@keyframes noc-rec { 50% { opacity: 0; } }
.noc-avatar { background: #141412; }
.noc-redact {
  display: inline;
  padding: .15em .35em;
  border-radius: 2px;
  color: #050505;
  background: #050505;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  line-height: 2.1;
  cursor: text;
}
.noc-redact::selection { color: #fff; background: #B42318; }
.noc-redact.is-revealed { color: var(--stamp); background: transparent; box-shadow: none; font-weight: 700; }
.noc-redact-saved { margin-top: .6rem; font-family: var(--f-mono); font-size: var(--t-xs); }

/* Sekretna gra na liście gier */
.game-card-noc { border-color: #2B2A24; color: #E4DDCA; background: #101114; }
.game-card-noc .eyebrow { color: #E0161B; }
.game-card-noc .game-card-title a { color: inherit; }
.game-card-noc .game-card-text, .game-card-noc .game-facts dt { color: #A39C88; }
.game-card-noc .game-facts div { background: #1B1C21; }
.game-card-noc .game-thumb { background: #0A0A0C; }
.game-card-noc .pip-tear { animation: noc-tear 3.7s steps(1) infinite; }
.game-card-noc .pip-walk { animation: noc-jitter 3.1s steps(1) infinite; }
/* Miniaturka gry za kamerą: zrzut menu gry, szum i „drgnięcia” twarzy (animuje je gry.js) */
.magda-thumb { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; background: #000; }
.magda-thumb img, .magda-thumb canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.magda-thumb img { opacity: 0; transition: opacity .3s; }
.magda-thumb.is-ready .magda-thumb-a { opacity: 1; transition: none; }
.magda-thumb .magda-thumb-b { opacity: 1; visibility: hidden; }
.magda-thumb.is-ready.is-twitch .magda-thumb-b { visibility: visible; }
.magda-thumb.is-ready.is-twitch .magda-thumb-a { visibility: hidden; }
.magda-thumb canvas { opacity: .2; image-rendering: pixelated; pointer-events: none; }
.magda-thumb-fallback { position: absolute; top: 9%; left: 6%; font: 800 clamp(12px, 3.4vw, 22px)/1.05 var(--f-mono); color: #F2F2EE; }
.magda-thumb.is-ready .magda-thumb-fallback { visibility: hidden; }
@keyframes noc-tear { 0%, 90%, 100% { opacity: 0; } 91% { opacity: .55; transform: translateY(-30px); } 94% { opacity: .35; transform: translateY(24px); } }
.noc-card-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.noc-card-actions .game-card-play { margin: 0; }
.noc-cam-btn { color: #FF5A5F; border-color: #4A2326; }
@media (prefers-reduced-motion: reduce) {
  .egg-void-eye, .decoded.is-noc .st b, dialog.noc-note[open], html.noc-flicker body,
  .noc-banner-rec, .game-card-noc .pip-tear, .game-card-noc .pip-walk { animation: none; }
}

/* Gra „Pip wraca do domu” */
.pip-body {
  --bg: #0B0B0A;
  --bg-alt: #161512;
  --surface: #151411;
  --ink: #E8E1CE;
  --ink-2: #A39C88;
  --line: #2B2A24;
  --yolk-ink: #F4C542;
  background: var(--bg);
  color: var(--ink);
}
.pip-body .nav { background: rgba(11, 11, 10, .9); border-color: var(--line); }
.pip-page { padding: clamp(1.5rem, 4vw, 3rem) 0 clamp(3rem, 6vw, 5rem); }
.pip-head { margin: 1rem 0 1.5rem; }
.pip-head .eyebrow { color: #E0161B; }
.pip-title { margin: .3rem 0 .6rem; }
.pip-locked { padding: 4rem 0; color: var(--ink-2); font-family: var(--f-mono); text-align: center; }
.pip-locked a { color: var(--ink); }
.pip-frame { display: grid; justify-items: center; }
.pip-frame:fullscreen { align-content: center; background: #000; }
.pip-frame:fullscreen .pip-stage { width: min(100vw, calc(100vh * 16 / 9)); border-radius: 0; }
.pip-stage {
  position: relative;
  width: min(100%, calc((100dvh - 120px) * 16 / 9));
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 18px;
  background: #000;
  box-shadow: 0 30px 70px -40px #000;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}
.pip-hud { position: absolute; top: 2.2%; right: 1.6%; z-index: 3; display: flex; gap: .5rem; }
.pip-hud .is-muted .pip-wave { opacity: 0; }
.pip-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 3%;
  overflow: auto;
  background: rgba(5, 5, 4, .62);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.pip-overlay[hidden] { display: none; }
.pip-overlay[data-kind="final"] { background: #000; }
.pip-overlay[data-kind="final"] .btn-primary { border-color: #B42318; color: #fff; background: #B42318; }
.pip-card {
  display: grid;
  justify-items: center;
  gap: .6rem;
  width: min(100%, 28rem);
  padding: clamp(1rem, 3vw, 1.75rem);
  border: 1px solid #2E2C25;
  border-radius: 10px;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px),
    #12110E;
  color: #ECE5D2;
  text-align: center;
  animation: noc-in .6s steps(1) both;
}
.pip-card h2 { margin: 0; font-family: var(--f-display); font-size: clamp(1.3rem, 1rem + 1.4vw, 1.9rem); font-weight: 800; letter-spacing: -.02em; }
.pip-card p { margin: 0; color: #B8B09A; font-size: var(--t-sm); line-height: 1.5; }
.pip-card b { color: #ECE5D2; }
.pip-kicker { font: 700 var(--t-xs) var(--f-mono) !important; letter-spacing: .14em; text-transform: uppercase; color: #F4C542 !important; }
.pip-red { color: #FF4D52 !important; }
.pip-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .3rem; }
.pip-small { font-family: var(--f-mono); font-size: var(--t-xs) !important; color: #8E8874 !important; }
.pip-stages { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 1.2rem 0 0; padding: 0; list-style: none; }
.pip-stage-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .85rem .45rem .45rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: var(--surface);
  font: 500 var(--t-sm) var(--f-body);
  cursor: pointer;
}
.pip-stage-btn:disabled { color: #5E594D; cursor: not-allowed; }
.pip-stage-btn:not(:disabled):hover { border-color: #F4C542; }
.pip-stage-n { display: grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: #23211B; font: 700 var(--t-xs) var(--f-mono); }
.pip-stage-btn.is-done .pip-stage-n { background: #F4C542; color: #1D1405; }
.pip-stage-ok { color: #F4C542; }
.pip-help { max-width: 46rem; margin: 1rem auto 0; text-align: center; }
body[data-pip-stage="2"] .pip-title, body[data-pip-stage="3"] .pip-title, body[data-pip-stage="4"] .pip-title { animation: noc-jitter 2.8s steps(1) infinite; }
body[data-pip-stage="3"] .nav, body[data-pip-stage="4"] .nav { opacity: .55; }
body[data-pip-stage="4"] .pip-head .section-lede { color: #C94A4E; }
body[data-pip-stage="koniec"] .nav { opacity: 0; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .pip-card, body[data-pip-stage] .pip-title { animation: none; }
}
