/* Two looks: day and night (toggle in the HUD, defaults to the visitor's clock). */
:root {
  --night: #1c120c;
  --night-2: #2a1b12;
  --wood: #5a341b;
  --wood-dark: #2a140a;
  --paper: #fbf3df;
  --paper-2: #f1e3c4;
  --ink: #2a170c;
  --muted: #6e4a30;
  --cream: #f6e3b8;
  --oven: #e2601c;
  --ember: #ffc44a;
  --crust: #b45a1f;
  --live: #3f8a4a;
  /* Pixelify Sans has every Polish letter; Silkscreen had none of ąćęłńśźż, which fell back to Courier */
  --font-pixel: 'Pixelify Sans', monospace;
  --font-mono: 'OB Pixel', 'Pixelify Sans', monospace; /* the scene's own bitmap letters, sharp at 12px */
  --font-body: 'DM Sans', system-ui, sans-serif;
  /* night (default) */
  --page: #1c120c;
  --text-page: #1c120c;
  --splash-top: rgba(255, 196, 74, .08);
  --splash-glow: rgba(226, 96, 28, .32);
  --splash-ink: #f6e3b8;
  --splash-sub: #cdb48e;
  --wm1: #f6e3b8;
  --wm1-glow: rgba(246, 227, 184, .35);
  --hint: #8f7a5c;
  --ghost-bg: #2a1b12;
  --ghost-ink: #f6e3b8;
  --ghost-line: #f6e3b8;
  --ghost-shadow: #000000;
  color-scheme: dark;
}
:root[data-theme="day"] {
  --page: #f3e4c6;
  --text-page: #f1e3c4;
  --splash-top: rgba(255, 250, 230, .9);
  --splash-glow: rgba(226, 96, 28, .18);
  --splash-ink: #2a170c;
  --splash-sub: #6e4a30;
  --wm1: #2a170c;
  --wm1-glow: rgba(255, 255, 255, .6);
  --hint: #8a6a48;
  --ghost-bg: #fbf3df;
  --ghost-ink: #2a170c;
  --ghost-line: #2a170c;
  --ghost-shadow: #2a140a;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--cream);
  font: 400 1rem/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
  font-feature-settings: "liga" 0, "clig" 0; /* inherited and not reset by font shorthands: work.flow never becomes work.ﬂow */
}
body.is-game { overflow: hidden; }
canvas { display: block; image-rendering: pixelated; }
a { color: inherit; }
:focus-visible { outline: 3px dashed var(--ember); outline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }

/* --------------------------------------------------------------- buttons */
.btn {
  --sh: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: 700 1rem/1 var(--font-pixel);
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--paper);
  background: var(--oven);
  border: 3px solid var(--wood-dark);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), var(--sh) var(--sh) 0 var(--wood-dark);
  padding: 13px 20px 15px;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); transform: translate(-1px, -1px); box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .22), 5px 5px 0 var(--wood-dark); }
.btn:active { transform: translate(3px, 3px); box-shadow: inset 0 3px 0 rgba(0, 0, 0, .22), 1px 1px 0 var(--wood-dark); }
.btn-ghost { background: var(--ghost-bg); color: var(--ghost-ink); border-color: var(--ghost-line); box-shadow: 4px 4px 0 var(--ghost-shadow); }
.btn-sm { font-size: 0.875rem; padding: 9px 14px 10px; }
.btn-play::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 10px solid var(--ember);
  border-block: 7px solid transparent;
}

.wordmark {
  margin: 0;
  font: 700 clamp(2.4rem, 8vw, 4.6rem)/1 var(--font-pixel);
  letter-spacing: 0.02em;
}
.wordmark span:first-child { color: var(--wm1); text-shadow: 0 0 18px var(--wm1-glow); }
.wordmark span:last-child { color: var(--oven); text-shadow: 0 0 22px rgba(226, 96, 28, .55); }

/* ---------------------------------------------------------------- splash */
.splash {
  position: relative;
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 40px 16px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 45% at 50% 105%, var(--splash-glow), transparent 70%),
    radial-gradient(ellipse 40% 35% at 50% 30%, var(--splash-top), transparent 70%),
    var(--page);
}
.splash-dust { position: absolute; inset: 0; pointer-events: none; }
.splash-in {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  max-width: 760px;
}
.splash-baker { filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .35)); margin-bottom: 6px; }
.splash h1 {
  font: 500 clamp(1.15rem, 2.6vw, 1.6rem)/1.3 var(--font-pixel);
  color: var(--splash-ink);
  max-width: 30ch;
}
.splash-sub { margin: 0; color: var(--splash-sub); max-width: 60ch; font-size: 1rem; }
.splash-cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 8px; }
.link-quiet {
  background: none;
  border: 0;
  color: var(--hint);
  font: 400 0.75rem var(--font-mono);
  text-decoration: underline dotted;
  text-underline-offset: 4px;
  cursor: pointer;
  padding: 6px;
}
.link-quiet:hover { color: var(--splash-ink); }
.splash-hint, .game-hint { font: 400 0.75rem var(--font-mono); color: var(--hint); margin: 0; letter-spacing: 1px; }

/* ------------------------------------------------------------------ game */
.game { position: fixed; inset: 0; background: var(--night); }
.game canvas { position: absolute; left: 0; top: 0; cursor: crosshair; touch-action: manipulation; }
.hud {
  position: absolute;
  top: env(safe-area-inset-top, 0px);
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  pointer-events: none;
}
.hud > * { pointer-events: auto; }
.hud button {
  font: 400 0.75rem/1 var(--font-mono);
  color: var(--cream);
  background: rgba(28, 18, 12, .88);
  border: 2px solid var(--wood-dark);
  box-shadow: inset 0 0 0 1px #6b4425;
  padding: 8px 10px;
  cursor: pointer;
  text-transform: uppercase;
}
.hud button:hover { color: var(--ember); }
.hud .hud-brand { font: 700 1rem/1 var(--font-pixel); text-transform: none; padding: 7px 10px; }
.hud-brand span:last-child { color: var(--oven); }
.hud-clock { font: 400 0.75rem var(--font-mono); color: var(--cream); text-shadow: 0 1px 0 #000; }
.hud-nav { display: flex; gap: 4px; margin-inline: auto; }
.hud-menu { display: none; margin-left: auto; }
@media (max-width: 1200px) {
  .hud-menu { display: block; }
  .hud-text { display: none; }
  .hud-nav {
    display: none;
    position: absolute;
    top: 52px;
    right: 14px;
    flex-direction: column;
    align-items: stretch;
    margin: 0;
  }
  .hud-nav.is-open { display: flex; }
}
.tip {
  position: fixed;
  z-index: 3;
  pointer-events: none;
  font: 400 0.75rem/1 var(--font-mono);
  color: var(--cream);
  background: var(--night);
  border: 2px solid var(--cream);
  box-shadow: 3px 3px 0 #000;
  padding: 7px 9px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 7px;
}
.tip img { flex: none; width: 18px; height: 18px; border-radius: 22%; margin-block: -4px; box-shadow: 0 0 0 1px rgba(246, 227, 184, .35); }
.game-hint {
  position: absolute;
  right: 14px;
  bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(28, 18, 12, .82);
  color: var(--cream);
  padding: 7px 10px;
  border: 2px solid var(--wood-dark);
}
@media (max-width: 600px) { .game-hint { left: 14px; right: auto; font-size: 0.6875rem; } }

/* ----------------------------------------------------------------- panel */
.panel {
  width: min(760px, 100% - 24px);
  max-height: min(86vh, 100% - 24px);
  padding: 0;
  border: 4px solid var(--wood-dark);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 0 0 4px var(--wood), 0 0 0 8px var(--wood-dark), 12px 14px 0 8px rgba(0, 0, 0, .45);
  overflow: hidden;
  display: none;
}
.panel[open] { display: flex; flex-direction: column; }
.panel::backdrop { background: rgba(20, 10, 4, .55); }
.panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--wood);
  color: var(--cream);
  padding: 8px 10px 8px 16px;
  border-bottom: 4px solid var(--wood-dark);
}
.panel-title { font: 400 0.75rem var(--font-mono); text-transform: uppercase; letter-spacing: 1px; }
.panel-close {
  font: 700 1rem/1 var(--font-pixel);
  color: var(--cream);
  background: var(--wood-dark);
  border: 2px solid #8a5530;
  width: 34px;
  height: 34px;
  cursor: pointer;
}
.panel-close:hover { color: var(--ember); }
.panel-body { overflow-y: auto; padding: 28px clamp(18px, 4vw, 40px) 36px; min-height: 0; }

/* ------------------------------------------------- copy (panels + text) */
.sec { display: flex; flex-direction: column; gap: 14px; }
.sec h2 { font: 700 clamp(1.8rem, 4.6vw, 2.6rem)/1.05 var(--font-pixel); color: var(--ink); }
.sec h3 { font: 700 1.375rem/1.15 var(--font-pixel); color: var(--ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.sec h4 { font: 400 0.75rem var(--font-mono); text-transform: uppercase; letter-spacing: 1px; color: var(--crust); margin-bottom: 6px; }
.sec p { margin: 0; max-width: 66ch; }

.product, .person, .story, .door, .dodont {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 3px dashed #d8c39b;
  scroll-margin-top: 12px;
}
.is-target > h3 { color: var(--crust); }
/* small labels in the pixel font stay in capitals, as they were with Silkscreen (a caps-only font) */
.link-quiet, .splash-hint, .game-hint, .tip, .go a, .todo-link, .mail { text-transform: uppercase; letter-spacing: 1px; }
/* a window for one thing clicked in the bakery: no divider above it, a lone door keeps a door's width */
.sec.is-single > :first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.sec.is-single .doors { width: 100%; max-width: 440px; margin-inline: auto; }
.status, .role {
  font: 400 0.75rem/1 var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  border: 2px solid currentColor;
  padding: 4px 6px;
}
.role { border: 0; padding: 0; }
.status-live { color: var(--live); }
.status-wip { color: var(--oven); }
.product h3 { align-items: center; }
.product h3 .logo {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 22%;
  box-shadow: 3px 3px 0 var(--wood-dark);
}

/* screenshots: odd count = the first one runs full width, the rest go in pairs */
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 4px 7px 10px 0; }
.shot:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.shot {
  display: block;
  border: 3px solid var(--wood-dark);
  background: var(--wood-dark);
  box-shadow: 4px 4px 0 var(--wood);
  cursor: zoom-in;
  overflow: hidden;
}
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.shot:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--wood); }
.shot:hover img { filter: brightness(1.05); }
@media (max-width: 480px) { .shots { gap: 10px; } }

.lightbox {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(56px, 7vw, 76px) clamp(68px, 7vw, 84px) 20px;
  border: 0;
  background: transparent;
  color: var(--cream);
  display: none;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.lightbox.is-zoomed { touch-action: manipulation; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(14, 7, 3, .92); }
.lb-fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; min-height: 0; max-height: 100%; }
.lb-img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 160px);
  width: auto;
  height: auto;
  object-fit: contain;
  border: 4px solid var(--wood-dark);
  box-shadow: 0 0 0 4px var(--wood), 0 0 0 8px var(--wood-dark), 10px 12px 0 8px rgba(0, 0, 0, .45);
  background: var(--wood-dark);
}
.lb-cap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 8px 16px;
  flex-wrap: wrap;
  max-width: 72ch;
  margin-top: 8px;
  padding: 7px 12px;
  background: var(--night);
  border: 2px solid var(--wood-dark);
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.lb-count { font: 400 0.75rem var(--font-mono); color: var(--ember); white-space: nowrap; }
.lb-btn {
  position: fixed;
  font: 700 1.25rem/1 var(--font-pixel);
  color: var(--cream);
  background: var(--wood-dark);
  border: 2px solid #8a5530;
  box-shadow: 3px 3px 0 #000;
  width: 44px;
  height: 44px;
  cursor: pointer;
}
.lb-btn:hover { color: var(--ember); }
.lb-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; font-size: 1rem; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }
@media (max-width: 600px) {
  .lb-prev, .lb-next { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); transform: none; }
  .lightbox { padding-bottom: 72px; padding-inline: clamp(12px, 4vw, 24px); }
  .lb-img { max-height: calc(100dvh - 210px); }
}
/* landscape phones: no room for fixed reserves, the screenshot gets the height and the caption one line */
@media (max-height: 500px) {
  .lightbox { padding: 12px 64px; }
  .lb-fig { gap: 6px; }
  .lb-img { max-height: calc(100dvh - 76px); }
  .lb-cap { display: block; max-width: 100%; margin-top: 4px; padding: 3px 10px; font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .lb-count { margin-left: 10px; }
  .lb-close { top: 8px; right: 8px; }
  .lb-prev, .lb-next { top: 50%; bottom: auto; transform: translateY(-50%); }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}
.go a { font-family: var(--font-mono); font-size: 0.75rem; color: var(--crust); }
.todo-link { font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted); }

.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0 28px; }
.mail { font: 400 0.75rem var(--font-mono); user-select: all; }
.micro { font-size: 0.875rem; color: var(--muted); }
.dodont-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.stopka p { font-size: 0.9375rem; }

/* ------------------------------------------------------------- text mode */
.content { display: block; }
body.is-text { background: var(--text-page); color: var(--ink); }
.is-text .content {
  width: min(820px, 100% - 32px);
  margin-inline: auto;
  padding-block: 24px 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.is-text .sec, .is-text .text-hero {
  background: var(--paper);
  border: 4px solid var(--wood-dark);
  box-shadow: 8px 8px 0 var(--wood);
  padding: clamp(20px, 4vw, 40px);
}
.text-bar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 2; padding-block: 8px; }
.text-hero { --wm1: #f6e3b8; --wm1-glow: rgba(246, 227, 184, .35); background: var(--night) !important; color: var(--cream); display: flex; flex-direction: column; gap: 16px; }
.text-hero h1 { font: 500 clamp(1.3rem, 3vw, 1.8rem)/1.3 var(--font-pixel); }
.text-hero .lead { margin: 0; color: #cdb48e; max-width: 62ch; }
.text-hero .wordmark { font-size: clamp(2rem, 6vw, 3.2rem); }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover, .btn:active, .shot:hover { transform: none; }
}

/* pixel fonts: no "fl"/"fi" ligatures (work.flow must read as work.flow) */
.sec h2, .sec h3, .sec h4, .text-hero h1, .btn, .wordmark, .hud .hud-brand, .splash h1, .panel-close { font-variant-ligatures: none; }

/* the walking hint steps aside once you have used it, and never covers the floor on short screens */
.game-hint { transition: opacity 0.6s; }
.game.is-used .game-hint { opacity: 0; pointer-events: none; }
@media (max-height: 500px) { .game-hint { display: none; } }
@media (max-height: 520px) { .splash-baker { display: none; } .splash-in { gap: 12px; } }

/* day / night toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 400 0.75rem/1 var(--font-mono);
  text-transform: uppercase;
  color: var(--cream);
  background: rgba(28, 18, 12, .88);
  border: 2px solid var(--wood-dark);
  box-shadow: inset 0 0 0 1px #6b4425;
  padding: 7px 10px;
  cursor: pointer;
}
.theme-toggle svg { flex: none; color: var(--ember); }
.theme-toggle:hover { color: var(--ember); }
.splash-toggles { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: 14px; z-index: 2; display: flex; gap: 8px; }
.text-toggles { display: flex; gap: 8px; }
.text-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
@media (max-width: 1320px) { .hud .theme-toggle span { display: none; } }

/* ================================================================ windows
   Each window looks like the thing you clicked: a chalkboard, the shop sign, two doors,
   a brass plate, the TV, an envelope. Same markup in the panel (a clone) and in text mode. */
:root {
  --sheet: #f4e8cc;                /* window paper at night, under the evening lamps */
  --crust-ink: #a9400f;            /* small orange text on paper, 5.5:1 (--crust is 4.3:1, --oven 3.2:1) */
  --live-ink: #2f6a3a;             /* small green text on paper, 5.9:1 (--live is 3.8:1) */
  --door-1: #b04a1c;
  --door-1-hi: #d26a34;
  --door-2: #2f6f68;
  --door-2-hi: #4c948a;
  --brass: #d9a93a;
  --brass-hi: #fff0a8;
  --brass-lo: #a87a22;
  --brass-dark: #3a2408;
  --slate: #25322b;
  --chalk: #efece2;
  --chalk-amber: #f0b86a;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' shape-rendering='crispEdges'%3E%3Cpath fill='%235a341b' fill-opacity='.09' d='M1 2h1v1H1zM7 5h1v1H7zM4 9h1v1H4zM10 11h1v1h-1zM9 1h1v1H9z'/%3E%3C/svg%3E");
  --chalk-dust: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' shape-rendering='crispEdges'%3E%3Cpath fill='%23324238' d='M2 3h2v1H2zM11 6h1v1h-1zM6 12h2v1H6zM14 14h1v1h-1zM9 1h1v1H9z'/%3E%3C/svg%3E");
  --chalk-wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='3' shape-rendering='crispEdges'%3E%3Cpath fill='%23c9c4b4' d='M0 1h1v1H0zM1 0h2v1H1zM3 1h1v1H3zM4 2h2v1H4z'/%3E%3C/svg%3E");
  --cork-dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' shape-rendering='crispEdges'%3E%3Cpath fill='%23a87a44' d='M1 1h1v1H1zM6 3h1v1H6zM3 7h1v1H3zM8 8h1v1H8z'/%3E%3C/svg%3E");
  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 6' shape-rendering='crispEdges'%3E%3Cpath fill='%232f6a3a' d='M0 2h2v2H0zM2 4h2v2H2zM4 2h2v2H4zM6 0h2v2H6z'/%3E%3C/svg%3E");
  --cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 6 6' shape-rendering='crispEdges'%3E%3Cpath fill='%23c4342a' d='M0 0h2v2H0zM4 0h2v2H4zM2 2h2v2H2zM0 4h2v2H0zM4 4h2v2H4z'/%3E%3C/svg%3E");
  --antenna: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 13 7' shape-rendering='crispEdges'%3E%3Cpath fill='%232a140a' d='M0 0h1v1H0zM12 0h1v1h-1zM1 1h1v1H1zM11 1h1v1h-1zM2 2h1v1H2zM10 2h1v1h-1zM3 3h1v1H3zM9 3h1v1H9zM4 4h1v1H4zM8 4h1v1H8zM5 5h1v1H5zM7 5h1v1H7zM4 6h5v1H4z'/%3E%3C/svg%3E");
}
:root[data-theme="day"] { --sheet: var(--paper); }

/* ----------------------------------------------------- the window frame */
.panel { width: min(820px, 100% - 24px); background: var(--sheet); }
.panel[open] { animation: ob-pop 0.2s steps(4, end); }
@keyframes ob-pop { from { opacity: 0; transform: translateY(12px); } }
.panel-bar {
  padding: 7px 8px 7px 10px;
  background:   /* a plank: lit top edge, a grain line every 8 px */
    linear-gradient(#7a4a24, #7a4a24) top / 100% 2px no-repeat,
    repeating-linear-gradient(180deg, transparent 0 7px, rgba(42, 20, 10, .3) 7px 8px),
    var(--wood);
}
/* the window's name on a brass plate, like the plates under the portraits and on the oven */
.panel-plate {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-right: auto;
  padding: 6px 12px 6px 8px;
  color: var(--wood-dark);
  background: var(--brass);
  border: 2px solid var(--brass-dark);
  box-shadow: inset 0 2px 0 var(--brass-hi), inset 0 -2px 0 var(--brass-lo), 2px 2px 0 rgba(20, 8, 2, .5);
}
.panel-ico { display: inline-flex; flex: none; }
.panel-ico:empty { display: none; }
.panel-ico svg { display: block; }
.panel-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-close { flex: none; width: 36px; height: 36px; box-shadow: 2px 2px 0 rgba(20, 8, 2, .5); }

/* the sheet: flour-dusted paper, a touch dimmer under the evening lamps */
.panel-body, .is-text .sec { background: var(--grain) 0 0 / 36px 36px, var(--sheet); }
.panel-body { scrollbar-color: var(--wood) transparent; }
.panel-body [tabindex="-1"]:focus { outline: none; }  /* headings focused by script: the window switch or the jump shows where you are */
/* the ember focus ring is invisible on cream paper; dark surfaces keep it */
:where(.panel-body, .is-text .sec) :focus-visible { outline-color: var(--crust-ink); }
:where(.board, .story-golf) :focus-visible { outline-color: var(--ember); }
.is-text .content [id] { scroll-margin-top: 72px; }  /* clears the sticky text bar */

/* ----------------------------------------------------- shared copy parts */
.sec { gap: 16px; }
.sec .lead { font-size: 1.125rem; line-height: 1.6; }
.sec h4 { color: var(--crust-ink); }
.status-live { color: var(--live-ink); }
.status-wip { color: var(--crust-ink); }
.go a { color: var(--crust-ink); }
.sec .btn { max-width: 100%; white-space: normal; text-align: center; line-height: 1.2; }  /* long labels wrap on phones */
.btn-door-1 { background: var(--door-1); }   /* paper on these: 4.9:1 and 5.3:1 */
.btn-door-2 { background: var(--door-2); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
/* a sentence moved out of its paragraph, in reading order (never repeated) */
.sec .pull {
  max-width: 60ch;
  margin: 4px 0;
  padding: 12px 16px 13px;
  font: 500 1.25rem/1.4 var(--font-pixel);
  color: var(--ink);
  background: var(--paper-2);
  border: 3px solid var(--wood-dark);
  border-left: 8px solid var(--oven);
  box-shadow: 4px 4px 0 rgba(42, 20, 10, .18);
}
.sec .sign-off { padding-top: 12px; font: 500 1.25rem/1.35 var(--font-pixel); color: var(--ink); border-top: 3px dashed #d8c39b; }
/* facts that already stand in the text, as labels */
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.facts li {
  padding: 5px 9px 6px;
  font: 600 0.8125rem/1.2 var(--font-body);
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--wood-dark);
  box-shadow: 2px 2px 0 var(--wood-dark);
}
.facts b { font: 700 0.9375rem/1 var(--font-body); color: var(--crust-ink); }  /* plain digits: a pixel 5 read as 8 */

/* --------------------------------------------- misja: the chalkboard */
.board {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 2px 2px 12px;
  padding: 20px clamp(16px, 4vw, 28px) 24px;
  background: var(--chalk-dust) 0 0 / 32px 32px, var(--slate);
  border: 6px solid #8a5530;
  border-top-color: #b07446;
  box-shadow: 0 0 0 2px var(--wood-dark), inset 0 0 0 2px #5a341b, 6px 6px 0 2px rgba(42, 20, 10, .3);
}
.board h2 { width: fit-content; padding-bottom: 12px; color: var(--chalk); background: var(--chalk-wave) left bottom / 12px 6px repeat-x; }
.board-chalk { display: flex; flex-wrap: wrap; margin: 0; font: 400 0.75rem/1.6 var(--font-mono); text-transform: uppercase; letter-spacing: 1px; color: var(--chalk-amber); }
.board-chalk span + span::before { content: '·'; margin-inline: 8px; color: #c9c4b4; }
/* two sticks of chalk and a sponge on the tray */
.board::after { content: ''; position: absolute; left: 18px; bottom: -6px; width: 22px; height: 4px; background: #f4f1e6; box-shadow: 30px 0 0 var(--chalk-amber); }
.board::before { content: ''; position: absolute; right: 18px; bottom: -8px; width: 30px; height: 4px; background: #3c6f9a; border-top: 3px solid #e8dcc0; box-shadow: 0 0 0 2px var(--wood-dark); }

/* ------------------------------------------ produkty: the shop sign */
.sign {
  position: relative;
  align-self: flex-start;
  max-width: 100%;
  margin-top: 16px;
  padding: 10px 18px 12px;
  background: repeating-linear-gradient(180deg, #5a341b 0 9px, #4e2d17 9px 10px);
  border: 3px solid var(--wood-dark);
  box-shadow: inset 0 2px 0 #7a4a24, 5px 5px 0 var(--wood-dark);
}
.sign::before, .sign::after { content: ''; position: absolute; top: -19px; width: 2px; height: 16px; background: repeating-linear-gradient(180deg, #3a3330 0 2px, transparent 2px 3px); }
.sign::before { left: 22px; }
.sign::after { right: 22px; }
.sign h2 { color: #f2d27a; text-shadow: 2px 2px 0 #140803; }
/* the shelf: one tag per product, jumps to it */
.shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.shelf a {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  padding: 8px 10px;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 2px solid var(--wood-dark);
  box-shadow: 3px 3px 0 var(--wood-dark);
}
.shelf img { flex: none; width: 32px; height: 32px; border-radius: 22%; }
.shelf-name { font: 700 1rem/1.1 var(--font-pixel); }
.shelf .status { margin-left: auto; padding: 3px 5px; font-size: 0.625rem; }
.shelf a:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--wood-dark); }
/* every product stands on its own shelf board */
.product { position: relative; margin-top: 12px; padding-top: 28px; border-top: 0; }
.product::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: var(--wood); box-shadow: inset 0 2px 0 #7a4a24, 0 3px 0 var(--wood-dark); }
a.go-btn { display: inline-flex; padding: 9px 12px; text-decoration: none; background: var(--paper); border: 2px solid var(--wood-dark); box-shadow: 3px 3px 0 var(--wood-dark); }
a.go-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--wood-dark); }

/* --------------------------------------- wspolpraca: the two doors */
.door-call { font: 500 1.25rem/1.3 var(--font-pixel); color: var(--ink); }
.doors { gap: 24px 30px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.door { --d: var(--door-1); --d-hi: var(--door-1-hi); gap: 0; align-items: stretch; margin-top: 0; padding-top: 0; border-top: 0; }
.door-2 { --d: var(--door-2); --d-hi: var(--door-2-hi); }
/* the painted sign above each door, as in the bakery */
.sec .door-sign {
  align-self: center;
  margin-bottom: 16px;
  padding: 8px 14px 9px;
  font-size: 1.25rem;
  background: var(--paper);
  border: 3px solid var(--wood-dark);
  box-shadow: 3px 3px 0 var(--wood-dark);
}
.door.is-target > .door-sign { color: var(--ink); background: var(--ember); }
.door-slab {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 6px;
  padding: 10px 16px 12px 10px;
  background: var(--d);
  border: 3px solid var(--wood-dark);
  /* lit top edge, warm light under the door, then the wooden frame */
  box-shadow: inset 0 3px 0 var(--d-hi), inset 0 -3px 0 #ffd27a, 0 0 0 4px var(--wood), 0 0 0 6px var(--wood-dark);
}
.door-slab::before { content: ''; position: absolute; right: 2px; top: 48%; width: 6px; height: 6px; background: #f2c94c; border: 2px solid var(--wood-dark); }  /* brass knob */
.sec .door-pane { display: flex; align-items: center; gap: 12px; max-width: none; padding: 10px 12px; background: var(--d-hi); border: 3px solid var(--wood-dark); }
.door-no { flex: none; font: 700 2.5rem/1 var(--font-pixel); color: var(--paper); text-shadow: 3px 3px 0 var(--wood-dark); }
.door-lead { font: 500 1.125rem/1.3 var(--font-pixel); color: var(--wood-dark); }  /* 4.9:1 on both panes */
.door-panel { flex: 1; display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--paper); border: 3px solid var(--wood-dark); }
.door dl { display: grid; grid-template-columns: 1fr; gap: 2px; margin: 0; }
.door dt { font: 400 0.75rem/1.5 var(--font-mono); text-transform: uppercase; letter-spacing: 1px; color: var(--crust-ink); }
.door dd { margin: 0 0 6px; }
.door-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: auto; }
.door .btn { margin-top: 0; background: var(--d); }
.mail { overflow-wrap: anywhere; }
/* robimy / nie robimy: the cork board with two pinned notes */
.dodont {
  gap: 16px;
  margin-top: 24px;
  padding: 18px clamp(12px, 3vw, 22px) 22px;
  background: var(--cork-dots) 0 0 / 20px 20px, #c4955b;
  border: 5px solid #7a4a24;
  border-top-color: #a06636;
  box-shadow: 0 0 0 2px var(--wood-dark), 6px 6px 0 2px rgba(42, 20, 10, .25);
}
.dodont > h3 { align-self: flex-start; padding: 6px 12px 7px; font-size: 1.125rem; background: var(--paper); border: 2px solid var(--wood-dark); box-shadow: 2px 2px 0 rgba(42, 20, 10, .4); }
.dodont-cols { gap: 22px; }
.note { position: relative; padding: 20px 16px 16px; background: var(--paper); border: 2px solid var(--wood-dark); box-shadow: 3px 4px 0 rgba(42, 20, 10, .4); }
.note-do { transform: rotate(-0.6deg); }
.note-dont { background: #fde9a8; transform: rotate(0.6deg); }
.note::before { content: ''; position: absolute; top: -7px; left: calc(50% - 7px); width: 14px; height: 14px; background: #e2412a; border: 2px solid var(--wood-dark); box-shadow: inset -3px -3px 0 #a3241a; }  /* push pin */
.note h4 { margin: 0 0 8px; }
.note-do h4 { color: var(--live-ink); }
.note-dont h4 { color: #a3271d; }
.note ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.note li { position: relative; padding-left: 24px; }
.note li::before { content: ''; position: absolute; left: 0; top: 0.45em; width: 16px; height: 12px; background: var(--tick) center / contain no-repeat; }
.note-dont li::before { width: 12px; background-image: var(--cross); }

/* ---------------------------------------------- my: the gallery wall */
.sec h2.plate {
  position: relative;
  align-self: flex-start;
  padding: 6px 24px 8px;
  color: var(--wood-dark);
  background: var(--brass);
  border: 3px solid var(--brass-dark);
  box-shadow: inset 0 3px 0 var(--brass-hi), inset 0 -3px 0 var(--brass-lo), 4px 4px 0 var(--wood-dark);
}
.plate::before, .plate::after { content: ''; position: absolute; top: calc(50% - 2px); width: 4px; height: 4px; background: #7a4e12; }  /* two rivets */
.plate::before { left: 8px; }
.plate::after { right: 8px; }
.person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  grid-template-areas: "pic head" "pic text";
  column-gap: 24px;
  row-gap: 12px;
  align-items: start;
}
.person-head { grid-area: head; display: flex; flex-direction: column; gap: 10px; }
.person > p { grid-area: text; }
.person h3 { flex-direction: column; align-items: flex-start; gap: 4px; font-size: 1.5rem; }
.person .role { color: var(--crust-ink); }
.person.is-target h3 { color: var(--crust); }
/* the founder's portrait from the wall, painted by world.js; whole-pixel scale only */
.portrait { grid-area: pic; display: block; width: 150px; height: 240px; image-rendering: pixelated; filter: drop-shadow(4px 4px 0 rgba(42, 20, 10, .3)); }
.portrait:not([src]) { display: none; }
@media (max-width: 520px) {
  .person { grid-template-areas: "pic head" "text text"; grid-template-rows: auto auto; column-gap: 16px; }
  .portrait { width: 100px; height: 160px; }
}
.story { margin-top: 18px; padding: 18px clamp(16px, 3vw, 22px) 20px; border: 3px solid var(--wood-dark); }
/* jak to się zaczęło: the golf bag's green, the trophy from the shelf */
.story-golf { color: var(--cream); background: #2f5d4b; box-shadow: inset 0 3px 0 #3f7a62, 5px 5px 0 var(--wood-dark); }  /* cream on green 6:1 */
.story-golf h3, .story-golf.is-target > h3 { align-items: center; color: var(--paper); }
.story-ico { flex: none; align-self: center; color: #f2c94c; }
.story-golf .sign-off { color: var(--paper); border-top-color: rgba(246, 227, 184, .35); }
/* czemu nam ufać: a gilt plaque */
.story-plaque { background: var(--paper); border: 6px solid #c08a2a; box-shadow: 0 0 0 2px var(--brass-dark), inset 0 0 0 2px #e8c25a, 5px 5px 0 2px var(--wood-dark); }

/* the words the team promises to use, stamped like the products' statuses */
.say { display: inline-block; padding: 3px 5px 2px; font: 400 0.75rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: 1px; vertical-align: 2px; white-space: nowrap; color: var(--muted); border: 2px solid currentColor; }
.say-live { color: var(--live-ink); }
.say-wip { color: var(--crust-ink); }
.channels { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
/* where to follow along: paper tags, dashed like a cut-out coupon */
.channels li {
  display: flex; align-items: center; gap: 10px; padding: 10px 15px;
  color: var(--ink); background: var(--paper); border: 3px solid var(--wood-dark); box-shadow: 3px 3px 0 var(--wood);
  outline: 2px dashed rgba(42, 20, 10, .28); outline-offset: -8px;
}
.ch-name { font: 700 1rem/1 var(--font-pixel); }
.channels .todo-link { color: var(--muted); }

/* -------------------------------------------- stopka: an airmail envelope */
.envelope {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px clamp(16px, 3vw, 28px);
  padding: clamp(16px, 3vw, 26px);
  background: var(--grain) 0 0 / 36px 36px, var(--sheet);
  border: 8px solid transparent;
  border-image: repeating-linear-gradient(-45deg, #c4342a 0 10px, var(--paper) 10px 20px, var(--door-2) 20px 30px, var(--paper) 30px 40px) 8;
  box-shadow: 0 0 0 2px var(--wood-dark), 6px 6px 0 2px var(--wood);
}
.mailbox { display: block; width: 72px; height: 108px; }
.envelope-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; padding-right: 58px; }
/* a postage stamp in the corner of the envelope */
.stamp { position: absolute; top: 12px; right: 12px; width: 44px; height: 52px; filter: drop-shadow(2px 2px 0 rgba(42, 20, 10, .35)); }
/* zajrzyj do środka: a letter on ruled paper with a red margin */
.letter {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(18px, 3vw, 26px) clamp(16px, 3vw, 26px) clamp(18px, 3vw, 24px) clamp(34px, 6vw, 52px);
  background: repeating-linear-gradient(180deg, transparent 0 25px, rgba(79, 143, 208, .2) 25px 26px), var(--paper);
  border: 3px solid var(--wood-dark);
  box-shadow: 5px 5px 0 var(--wood);
}
.letter::before { content: ''; position: absolute; top: 0; bottom: 0; left: clamp(20px, 4vw, 34px); width: 2px; background: rgba(196, 52, 42, .5); }
.stopka .letter p { font-size: 1rem; }
.stopka .letter .letter-lead { font-size: 1.125rem; }
.stopka > .envelope-small { margin-top: 2px; }
.envelope-mail a { font: 700 1.125rem/1.3 var(--font-pixel); color: var(--ink); overflow-wrap: anywhere; }
.stopka .envelope-small { font-size: 0.875rem; color: var(--muted); }

/* ------------------------------------------------------------- phones */
@media (max-width: 520px) {
  .shelf { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .door-slab { margin: 6px 2px; padding: 6px 10px 8px 6px; }
  .door-panel { padding: 12px; }
  .sec .door-pane { gap: 10px; padding: 8px 10px; }
  .door-no { font-size: 2rem; }
  .envelope { grid-template-columns: 1fr; }
  .mailbox { width: 48px; height: 72px; }
  .stamp { width: 33px; height: 39px; top: 10px; right: 10px; }
  .envelope-body { padding-right: 0; }
  .text-toggles .theme-toggle span { display: none; }  /* the text bar fits a 360 px phone */
}
@media (prefers-reduced-motion: reduce) {
  .panel[open] { animation: none; }
  .shelf a:hover, a.go-btn:hover { transform: none; }
}

/* after the font shorthands above, which reset it: pixel fonts must not join fi/fl (work.flow) */
.sec .pull, .sec .sign-off, .facts b, .door-call, .door-lead, .door-no, .shelf-name, .ch-name, .envelope-mail a { font-variant-ligatures: none; }
