/* =========================================================================
   AFTER95 — fikcyjne studio gier (demo ITTI)
   Retro geometria Windows 95, współczesna typografia i kompozycja.
   Kontrakt z app.js:
   - pozycje/rozmiary okien na desktopie inline (left/top/width/height),
   - .win.is-active, .win.is-max, .case[aria-selected=true], .task[aria-pressed=true],
   - ikony pikselowe = <svg> wstawiane w [data-px], znak = <svg> w [data-wordmark],
   - ≤700px okna pełnoekranowe (CSS nadpisuje inline geometrię).
   ========================================================================= */

@font-face {
  font-family: "Instrument Sans";
  src: url("../../assets/fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../../assets/fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;

  /* pulpit */
  --desk: #087275;
  --desk-hi: #0b8487;
  --desk-lo: #05595b;

  /* ciepłe szarości okien */
  --face: #cbc7bd;
  --face-2: #dcd8ce;
  --hi: #fdfbf5;
  --lo: #87827a;
  --dk: #1b1a17;

  /* papier i tekst */
  --paper: #fbfaf5;
  --paper-2: #f2efe6;
  --ink: #15151b;
  --ink-2: #4b4a52;
  --ink-3: #75737a;

  /* paski tytułowe */
  --navy: #0d1f78;
  --navy-2: #2a4db4;
  --off: #8b877e;
  --off-2: #aaa69c;

  /* akcenty */
  --coral: #e2584e;
  --amber: #e9a23b;
  --yellow: #ffd45a;
  --cyan: #7fe1dd;
  --sel: #0d1f78;

  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --bar: 46px;            /* wysokość paska zadań */
  --safe-b: env(safe-area-inset-bottom, 0px);

  /* bevel w stylu 95: dwie linie światła i cienia */
  --raised: inset -1px -1px 0 var(--dk), inset 1px 1px 0 var(--hi), inset -2px -2px 0 var(--lo), inset 2px 2px 0 var(--face-2);
  --pressed: inset 1px 1px 0 var(--dk), inset -1px -1px 0 var(--hi), inset 2px 2px 0 var(--lo), inset -2px -2px 0 var(--face-2);
  --sunken: inset 1px 1px 0 var(--lo), inset -1px -1px 0 var(--hi), inset 2px 2px 0 var(--dk), inset -2px -2px 0 var(--face-2);
  --hairline: inset 1px 1px 0 var(--lo), inset -1px -1px 0 var(--hi);
  --drop: 0 28px 60px -24px rgba(2, 30, 32, .55), 0 6px 14px -6px rgba(2, 30, 32, .35);

  --ease: cubic-bezier(.2, .75, .2, 1);
}

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

html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: var(--desk);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, canvas, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--navy); color: #fff; }

/* Ikony pikselowe: SVG wstawiane przez JS */
[data-px] { display: inline-flex; flex: none; width: 32px; height: 32px; line-height: 0; }
[data-px] svg { width: 100%; height: 100%; shape-rendering: crispEdges; image-rendering: pixelated; }
[data-px][data-scale="1"] { width: 16px; height: 16px; }
[data-px][data-scale="2"] { width: 24px; height: 24px; }
[data-px][data-scale="3"] { width: 40px; height: 40px; }

/* Fokus: kropkowany jak w 95, ale wyraźny */
:focus { outline: none; }
:focus-visible { outline: 2px dotted var(--dk); outline-offset: -6px; }
.desktop > .icons :focus-visible,
.taskbar :focus-visible { outline-color: currentColor; }

.skip {
  position: fixed; left: 12px; top: 12px; z-index: 100000;
  padding: 10px 16px; background: var(--face); color: var(--ink);
  font: 600 14px/1 var(--mono); text-decoration: none;
  box-shadow: var(--raised);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

/* ============================ PULPIT ============================ */
.desktop {
  position: fixed;
  inset: 0 0 calc(var(--bar) + var(--safe-b)) 0;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 20%, var(--desk-hi) 0%, transparent 60%),
    radial-gradient(90% 70% at 100% 100%, var(--desk-lo) 0%, transparent 70%),
    var(--desk);
  isolation: isolate;
}

/* Tapeta: wielki znak z pikseli w prawym dolnym rogu */
.wall {
  position: absolute;
  right: clamp(24px, 3.4vw, 56px);
  bottom: clamp(24px, 4vh, 48px);
  width: min(54vw, 860px);
  z-index: 0;
  pointer-events: none;
  user-select: none;
  color: #f7f3e8;
}
.wall__mark { width: 100%; line-height: 0; }
.wall__mark svg { width: 100%; height: auto; shape-rendering: crispEdges; overflow: visible; }
.wall__caption {
  display: flex; justify-content: space-between; gap: 16px;
  margin-top: clamp(10px, 1.4vw, 18px);
  padding-top: 10px;
  border-top: 2px solid rgba(247, 243, 232, .32);
  font: 600 12px/1.2 var(--mono);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(247, 243, 232, .78);
}

/* Ikony pulpitu */
.icons {
  position: absolute;
  left: 14px; top: 16px;
  z-index: 1;
  display: grid;
  grid-auto-flow: row;
  grid-template-columns: 96px;
  gap: 6px;
}
.icon {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 96px; min-height: 84px;
  padding: 8px 4px 6px;
  border: 0; background: none;
  color: #fff; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.icon__img { width: 44px; height: 44px; filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .28)); }
.icon__label {
  padding: 1px 5px 2px;
  font: 600 12.5px/1.25 var(--mono);
  text-align: center;
  letter-spacing: .01em;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .45);
}
.icon:hover .icon__label { background: rgba(4, 50, 52, .45); }
.icon:focus-visible { outline: none; }
.icon:focus-visible .icon__label,
.icon[aria-current="true"] .icon__label,
.icon:active .icon__label {
  background: var(--navy);
  text-shadow: none;
  outline: 1px dotted #fff;
  outline-offset: 0;
}
.icon:focus-visible .icon__img,
.icon:active .icon__img { filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, .28)) sepia(1) hue-rotate(185deg) saturate(3) brightness(.8); }
.icon--link .icon__label { color: var(--yellow); }

/* Lasso zaznaczenia na pulpicie */
.lasso {
  position: absolute; z-index: 2; pointer-events: none;
  border: 1px dotted #fff;
  background: rgba(255, 255, 255, .06);
  mix-blend-mode: normal;
}

/* ============================ OKNO ============================ */
.win {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
  max-height: 100%;
  padding: 4px;
  background: var(--face);
  box-shadow: var(--raised), var(--drop);
  container: win / inline-size;
  contain: layout style;
}
.win:focus { outline: none; }
.win.is-max { box-shadow: var(--raised); }

.win__bar {
  display: flex; align-items: center; gap: 8px;
  flex: none;
  height: 32px;
  padding: 0 4px 0 8px;
  background: linear-gradient(90deg, var(--off) 0%, var(--off-2) 100%);
  color: #e9e6df;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
.win.is-active .win__bar {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
}
@media (min-width: 701px) {
  .win__bar { cursor: grab; }
  .win__bar:active { cursor: grabbing; }
  .win.is-max .win__bar { cursor: default; }
}
.win__ico { width: 16px; height: 16px; }
.win__title {
  flex: 1; min-width: 0;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font: 700 13.5px/1 var(--mono);
  letter-spacing: .02em;
}
.win__ctl { display: flex; gap: 2px; flex: none; }
.win__ctl button:nth-child(2):last-child,
.win__ctl [data-act="close"] { margin-left: 4px; }
.win__ctl button {
  display: grid; place-items: center;
  width: 28px; height: 24px;
  padding: 0; border: 0;
  background: var(--face);
  color: var(--dk);
  box-shadow: var(--raised);
}
.win__ctl button:active { box-shadow: var(--pressed); }
.win__ctl button:active .g { transform: translate(1px, 1px); }
.win__ctl button:focus-visible { outline-offset: -5px; outline-width: 1px; }

/* Glify kontrolek: natywne pikselowe SVG jako maski */
.g {
  display: block;
  width: 9px; height: 8px;
  background: currentColor;
  -webkit-mask: var(--m) center / 100% 100% no-repeat;
          mask: var(--m) center / 100% 100% no-repeat;
}
.g--close { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v1h1v1h1v1h1V2h1V1h1V0h2v1H8v1H7v1H6v1H5v1h1v1h1v1h1v1H7V7H6V6H5V5H4v1H3v1H2v1H0V7h1V6h1V5h1V4h1V3H3V2H2V1H0z'/%3E%3C/svg%3E"); }
.g--min { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 8' shape-rendering='crispEdges'%3E%3Crect x='1' y='6' width='6' height='2'/%3E%3C/svg%3E"); }
.g--max { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 8' shape-rendering='crispEdges'%3E%3Cpath fill-rule='evenodd' d='M0 0h9v8H0zM1 2v5h7V2z'/%3E%3C/svg%3E"); }
.win.is-max .g--max { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 8' shape-rendering='crispEdges'%3E%3Cpath fill-rule='evenodd' d='M2 0h7v5H8V2H3v1H2zM0 3h6v5H0zM1 5v2h4V5z'/%3E%3C/svg%3E"); }
.g--play { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 8' shape-rendering='crispEdges'%3E%3Cpath d='M2 0h1v1h1v1h1v1h1v2H5v1H4v1H3v1H2z'/%3E%3C/svg%3E"); }
[aria-pressed="true"] > .g--play { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 8' shape-rendering='crispEdges'%3E%3Cpath d='M1 0h3v8H1zM5 0h3v8H5z'/%3E%3C/svg%3E"); }
.g--prev { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 8' shape-rendering='crispEdges'%3E%3Cpath d='M0 0h2v8H0zM7 0h1v8H7V7H6V6H5V5H4V3h1V2h1V1h1z'/%3E%3C/svg%3E"); }
.g--next { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 8' shape-rendering='crispEdges'%3E%3Cpath d='M7 0h2v8H7zM1 0h1v1h1v1h1v1h1v2H4v1H3v1H2v1H1z'/%3E%3C/svg%3E"); }

/* Pasek adresu (Projekty) */
.win__addr {
  display: flex; align-items: center; gap: 10px;
  flex: none;
  margin-top: 4px;
  padding: 4px 4px 4px 8px;
  font: 600 12px/1 var(--mono);
  color: var(--ink-2);
}
.win__addr .field { flex: 1; min-width: 0; }

/* Ciało okna: przewija się samo, nigdy strona */
.win__body {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 4px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: auto;
  scrollbar-color: var(--lo) var(--face-2);
}
.win__body::-webkit-scrollbar { width: 16px; height: 16px; }
.win__body::-webkit-scrollbar-track { background: repeating-conic-gradient(var(--face) 0 25%, var(--hi) 0 50%) 0 0 / 2px 2px; }
.win__body::-webkit-scrollbar-thumb { background: var(--face); box-shadow: var(--raised); }
.win__body::-webkit-scrollbar-button { display: none; }

/* Pasek stanu */
.win__status {
  display: flex; gap: 4px;
  flex: none;
  margin-top: 4px;
  font: 500 12px/1 var(--mono);
  color: var(--ink-2);
}
.win__status > * {
  display: flex; align-items: center;
  min-width: 0; min-height: 24px;
  padding: 4px 8px;
  box-shadow: var(--hairline);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.win__status > :first-child { flex: 1; }
.win__status a { color: var(--navy); font-weight: 700; text-decoration: none; }
.win__status a:hover { text-decoration: underline; }

/* ============================ ELEMENTY WSPÓLNE ============================ */
.sheet {
  position: relative;
  min-height: 100%;
  padding: clamp(22px, 5cqi, 56px) clamp(20px, 5.5cqi, 64px) clamp(26px, 5cqi, 52px);
  background: var(--paper);
  box-shadow: var(--sunken);
}
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: clamp(14px, 2.4cqi, 22px);
  font: 700 12px/1.3 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow::before {
  content: ""; flex: none;
  width: 10px; height: 10px;
  background: var(--coral);
  box-shadow: 10px 0 0 var(--amber), 20px 0 0 var(--cyan);
  margin-right: 20px;
}
.sheet__title {
  max-width: 22ch;
  font: 600 clamp(26px, 4.6cqi, 44px)/1.08 var(--sans);
  letter-spacing: -.022em;
  text-wrap: balance;
}
.sub {
  margin: clamp(30px, 5cqi, 44px) 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  font: 700 12px/1.2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* Przyciski 95: bevel, duże pola, wyraźny tekst */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  background: var(--face);
  color: var(--ink);
  font: 700 14px/1 var(--mono);
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--raised);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--face-2); text-decoration: none; }
.btn:active { box-shadow: var(--pressed); padding-top: 2px; padding-left: 24px; padding-right: 20px; }
/* przycisk domyślny: dodatkowa czarna ramka jak w 95, plus granat dla CTA */
.btn--default {
  background: var(--navy);
  color: #fff;
  box-shadow:
    0 0 0 1px var(--dk),
    inset -1px -1px 0 #050b33, inset 1px 1px 0 #6b84de,
    inset -2px -2px 0 #0a1658, inset 2px 2px 0 #3a5ac4;
}
.btn--default:hover { background: #172b8f; }
.btn--default:active {
  box-shadow:
    0 0 0 1px var(--dk),
    inset 1px 1px 0 #050b33, inset -1px -1px 0 #6b84de,
    inset 2px 2px 0 #0a1658;
}
.btn--default:focus-visible { outline-color: #fff; }
.btn--ghost { background: transparent; box-shadow: none; padding-inline: 8px; color: var(--navy); }
.btn--ghost:hover { background: transparent; text-decoration: underline; }
.btn--ghost:active { box-shadow: none; padding: 0 8px; }
.btn--sq { width: 48px; padding: 0; }
.btn--sq:active { padding: 2px 0 0 2px; }

/* Pola formularzy */
.field {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0; border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: 400 16px/1.4 var(--sans);
  box-shadow: var(--sunken);
  -webkit-appearance: none;
  appearance: none;
}
.field:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
.field--ro {
  min-height: 30px;
  padding: 6px 10px;
  font: 500 12.5px/1.2 var(--mono);
  color: var(--ink-2);
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
textarea.field { resize: vertical; min-height: 132px; }

.lbl { display: block; margin: 18px 0 8px; font: 700 13px/1.3 var(--mono); letter-spacing: .02em; }
.err { min-height: 0; margin-top: 6px; font: 600 13px/1.35 var(--mono); color: #b0281f; }
.err:empty { display: none; }
.field[aria-invalid="true"] { box-shadow: var(--sunken), 0 0 0 2px var(--coral); }

.select { position: relative; }
.select .field { padding-right: 52px; cursor: pointer; }
.select::after {
  content: "";
  position: absolute; right: 2px; top: 2px; bottom: 2px;
  width: 40px;
  pointer-events: none;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 4' shape-rendering='crispEdges'%3E%3Cpath fill='%231b1a17' d='M0 0h7v1H6v1H5v1H4v1H3V3H2V2H1V1H0z'/%3E%3C/svg%3E") center / 14px 8px no-repeat,
    var(--face);
  box-shadow: var(--raised);
}

.check {
  display: flex; align-items: center; gap: 12px;
  min-height: 44px;
  margin-top: 14px;
  font: 500 15px/1.3 var(--sans);
  cursor: pointer;
}
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check__box {
  flex: none;
  width: 22px; height: 22px;
  background: #fff;
  box-shadow: var(--sunken);
}
.check input:checked + .check__box {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 7 7' shape-rendering='crispEdges'%3E%3Cpath fill='%231b1a17' d='M6 0h1v3H6v1H5v1H4v1H3v1H2V6H1V5H0V2h1v1h1v1h1V3h1V2h1V1h1z'/%3E%3C/svg%3E") center / 12px 12px no-repeat,
    #fff;
}
.check input:focus-visible + .check__box { outline: 2px dotted var(--dk); outline-offset: 3px; }

.note {
  margin-top: clamp(28px, 4cqi, 40px);
  padding: 14px 16px;
  background: #fff6d6;
  box-shadow: inset 0 0 0 1px #d9c27a;
  font-size: 14.5px;
  color: var(--ink-2);
}

/* ============================ WITAJ ============================ */
.welcome { display: flex; flex-direction: column; }
.welcome__title {
  max-width: 14ch;
  font: 600 clamp(40px, 8.6cqi, 92px)/.98 var(--sans);
  letter-spacing: -.035em;
  text-wrap: balance;
}
.welcome__title span { color: var(--navy); }
.welcome__lede {
  max-width: 52ch;
  margin-top: clamp(18px, 3cqi, 28px);
  font-size: clamp(16.5px, 2.15cqi, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.welcome__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 4cqi, 36px); }
.welcome__cta .btn { min-height: 48px; padding-inline: 26px; font-size: 14.5px; }

.recent { margin-top: auto; padding-top: clamp(32px, 6cqi, 56px); }
.recent__head {
  display: flex; justify-content: space-between; gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink);
  font: 700 12px/1.2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.recent__head span + span { color: var(--ink-3); letter-spacing: .06em; }
.recent__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 2cqi, 18px); }

.tile {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 8px 10px;
  width: 100%;
  padding: 6px 6px 10px;
  border: 0;
  background: transparent;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.tile .thumb { grid-column: 1 / -1; }
.tile__name { padding-left: 2px; font: 700 13px/1.2 var(--mono); letter-spacing: .04em; }
.tile__meta { font: 500 12px/1.2 var(--mono); color: var(--ink-3); text-align: right; }
.tile:hover { background: var(--paper-2); }
.tile:hover .thumb { box-shadow: var(--sunken), 0 0 0 2px var(--navy); }
.tile:active .thumb { transform: translate(1px, 1px); }
.tile:focus-visible { outline: 2px dotted var(--dk); outline-offset: 0; }

/* Pikselowe miniatury: niska rozdzielczość, ostre powiększenie */
.thumb {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #10183a;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  box-shadow: var(--sunken);
  padding: 2px;
}

/* ============================ PROJEKTY ============================ */
.proj {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 4px;
  overflow: hidden;
}
.proj__list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(150px, 1fr);
  gap: 4px;
  padding: 6px;
  background: #fff;
  box-shadow: var(--sunken);
  overflow-x: auto;
  overscroll-behavior-x: contain;
}
.case {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  min-height: 44px;
  padding: 6px;
  border: 0;
  background: transparent;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
.case .thumb { box-shadow: none; padding: 0; }
.case__name { font: 700 13px/1.2 var(--mono); letter-spacing: .04em; }
.case__meta { font: 500 12px/1.3 var(--mono); color: var(--ink-3); }
.case:hover { background: var(--paper-2); }
.case[aria-selected="true"] { background: var(--sel); color: #fff; }
.case[aria-selected="true"] .case__meta { color: #c9d2f5; }
.case[aria-selected="true"] .thumb { outline: 1px solid rgba(255, 255, 255, .6); }
.case:focus-visible { outline: 1px dotted currentColor; outline-offset: -3px; }

.proj__detail {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  box-shadow: var(--sunken);
  padding: 2px;
}
.proj__detail:focus-visible { outline: 2px dotted var(--dk); outline-offset: -6px; }

@container win (min-width: 760px) {
  .proj { grid-template-columns: 236px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
  .proj__list {
    grid-auto-flow: row;
    grid-auto-columns: auto;
    align-content: start;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .case { grid-template-columns: 76px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 12px; row-gap: 3px; align-items: center; padding: 8px; }
  .case .thumb { grid-row: 1 / 3; width: 76px; }
  .case__name { align-self: end; }
  .case__meta { align-self: start; }
}

/* Grafika projektu i pikselowe odsłonięcie */
.art {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 64cqi;
  overflow: hidden;
  background: #0b1030;
  width: 100%;
}
.art__img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
}
.art__img[data-pixel], .art__img.is-pixel { image-rendering: pixelated; }
.art__wipe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  pointer-events: none;
}
.art__tag {
  position: absolute; left: 12px; bottom: 12px;
  padding: 5px 9px 6px;
  background: var(--face);
  box-shadow: var(--raised);
  font: 700 11.5px/1 var(--mono);
  letter-spacing: .06em;
  color: var(--ink);
}

/* Treść studium przypadku (renderowana z danych w app.js) */
.case-copy {
  display: grid;
  gap: 0 clamp(24px, 5cqi, 56px);
  padding: clamp(22px, 4cqi, 44px) clamp(18px, 4cqi, 44px) clamp(28px, 4cqi, 48px);
}
.case-copy > * { min-width: 0; }
.case-copy h3 {
  font: 600 clamp(32px, 6.4cqi, 72px)/.95 var(--sans);
  letter-spacing: -.035em;
}
.case-copy h4 {
  margin: 26px 0 10px;
  font: 700 12px/1.2 var(--mono);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.case-copy p { max-width: 60ch; color: var(--ink-2); text-wrap: pretty; }
.case-copy p + p { margin-top: 12px; }
.case-copy .lede,
.case-copy h3 + p {
  margin: 14px 0 18px;
  font-size: clamp(18px, 2.6cqi, 24px);
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -.01em;
}
.case-copy ul { display: grid; gap: 8px; }
.case-copy li { position: relative; padding-left: 22px; color: var(--ink-2); }
.case-copy li::before {
  content: ""; position: absolute; left: 2px; top: .62em;
  width: 8px; height: 8px; background: var(--coral);
}
.case-copy li:nth-child(3n+2)::before { background: var(--amber); }
.case-copy li:nth-child(3n)::before { background: var(--navy-2); }
.case-copy dl { display: grid; grid-template-columns: auto 1fr; margin-top: 22px; border-top: 1px solid var(--lo); }
.case-copy dl > div { display: contents; }
.case-copy dt, .case-copy dd { padding: 10px 0; border-bottom: 1px solid rgba(135, 130, 122, .45); }
.case-copy dt { padding-right: 20px; font: 700 12px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.case-copy dd { font-weight: 500; }
.case-copy .btn { margin-top: 24px; }
@container win (min-width: 1000px) {
  .case-copy { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .case-copy > h3, .case-copy > .lede, .case-copy > h3 + p, .case-copy > .eyebrow { grid-column: 1 / -1; }
  .case-copy > dl { grid-column: 2; grid-row: span 6; align-self: start; margin-top: 0; }
}

/* ============================ O STUDIU ============================ */
.about__lede { max-width: 60ch; margin-top: 18px; font-size: clamp(16.5px, 2.2cqi, 19px); color: var(--ink-2); text-wrap: pretty; }
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 2px;
  margin-top: clamp(24px, 4cqi, 36px);
  background: var(--face);
  box-shadow: var(--raised);
  padding: 4px;
}
.facts > div { padding: 12px 14px 14px; background: var(--paper); box-shadow: var(--hairline); }
.facts dt { font: 700 11.5px/1.2 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.facts dd { margin-top: 6px; font: 600 clamp(18px, 2.8cqi, 26px)/1.15 var(--sans); letter-spacing: -.015em; }
.facts > div:last-child dd { font-size: 15px; line-height: 1.4; font-weight: 500; letter-spacing: 0; }

.offer { display: grid; gap: 0; }
.offer li { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 14px 0; border-bottom: 1px solid rgba(135, 130, 122, .45); }
.offer b { font-size: 17px; font-weight: 600; }
.offer span { color: var(--ink-2); }
@container win (min-width: 620px) {
  .offer li { grid-template-columns: 15em minmax(0, 1fr); gap: 24px; }
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.steps li { position: relative; padding: 16px 16px 18px; background: #fff; box-shadow: var(--hairline); }
.steps li span {
  display: inline-block; margin-bottom: 10px; padding: 3px 6px;
  background: var(--navy); color: #fff;
  font: 700 12px/1 var(--mono); letter-spacing: .06em;
}
.steps li:nth-child(2) span { background: var(--coral); }
.steps li:nth-child(3) span { background: var(--amber); color: var(--ink); }
.steps li:nth-child(4) span { background: var(--desk); }
.steps b { display: block; font-size: 17px; font-weight: 600; line-height: 1.25; }
.steps p { margin-top: 6px; font-size: 15px; color: var(--ink-2); }

/* ============================ LABORATORIUM ============================ */
.lab {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "intro" "tools" "stage" "side";
  gap: 14px;
  align-content: start;
  padding: clamp(14px, 3cqi, 24px);
  background: var(--face);
}
.lab__intro { grid-area: intro; }
.lab__title { font: 600 clamp(24px, 4.4cqi, 36px)/1.05 var(--sans); letter-spacing: -.025em; }
.lab__intro p { max-width: 54ch; margin-top: 8px; color: var(--ink-2); font-size: 15.5px; }

.lab__tools { grid-area: tools; display: flex; flex-wrap: wrap; gap: 4px; }
.tool {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 0 14px 0 10px;
  border: 0;
  background: var(--face);
  font: 700 13px/1 var(--mono);
  box-shadow: var(--raised);
}
.tool:hover { background: var(--face-2); }
.tool[aria-pressed="true"] {
  box-shadow: var(--pressed);
  background: repeating-conic-gradient(var(--face) 0 25%, var(--hi) 0 50%) 0 0 / 2px 2px;
  padding-top: 2px; padding-left: 12px; padding-right: 12px;
}
.tool:active { box-shadow: var(--pressed); }

.lab__stage { grid-area: stage; display: grid; place-items: center; min-width: 0; padding: 10px; background: var(--dk); box-shadow: var(--sunken); }
.lab__canvas {
  position: relative;
  width: min(100%, 560px, 62vh);
  aspect-ratio: 1;
  background: repeating-conic-gradient(#d7d3c9 0 25%, #f3f0e8 0 50%) 0 0 / calc(100% / 16) calc(100% / 16);
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.lab__canvas canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  touch-action: none;
  cursor: crosshair;
}
.lab__canvas canvas:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.lab__grid {
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(27, 26, 23, .12) 1px, transparent 1px) 0 0 / calc(100% / 32) 100%,
    linear-gradient(to bottom, rgba(27, 26, 23, .12) 1px, transparent 1px) 0 0 / 100% calc(100% / 32),
    linear-gradient(to right, rgba(27, 26, 23, .22) 1px, transparent 1px) 0 0 / calc(100% / 4) 100%,
    linear-gradient(to bottom, rgba(27, 26, 23, .22) 1px, transparent 1px) 0 0 / 100% calc(100% / 4);
}
.lab__cursor {
  position: absolute;
  width: calc(100% / 32); height: calc(100% / 32);
  pointer-events: none;
  outline: 2px solid #fff;
  box-shadow: 0 0 0 3px var(--dk);
  opacity: 0;
}
.lab__canvas:focus-within .lab__cursor, .lab__cursor.is-on { opacity: 1; }

.lab__side { grid-area: side; display: grid; gap: 14px; align-content: start; }
.lab__palette {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 4px;
  padding: 6px;
  background: var(--face);
  box-shadow: var(--sunken);
}
.lab__palette > * {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  min-height: 36px;
  padding: 0;
  border: 0;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, .35), inset -1px -1px 0 rgba(0, 0, 0, .35);
}
.lab__palette > [aria-checked="true"] {
  outline: 3px solid var(--dk);
  outline-offset: -3px;
  box-shadow: inset 0 0 0 5px #fff;
}
.lab__palette > :focus-visible { outline: 2px dotted var(--dk); outline-offset: 2px; }
.lab__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.lab__actions .btn { flex: 1 1 auto; padding-inline: 14px; }

@container win (min-width: 720px) {
  .lab {
    grid-template-columns: minmax(0, 1fr) 260px;
    grid-template-areas: "intro intro" "tools tools" "stage side";
  }
  .lab__palette { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .lab__actions { flex-direction: column; }
  .lab__actions .btn { width: 100%; }
}

/* ============================ KONTAKT ============================ */
.contact { max-width: none; }
.contact .sheet__title { margin-bottom: 18px; }
.info {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px 16px;
  background: #fff6d6;
  box-shadow: inset 0 0 0 1px #d9c27a;
  font-size: 15px;
  color: var(--ink-2);
}
.info__ico { margin-top: 2px; }
.contact__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 22px; }

.msgbox {
  position: absolute;
  left: 50%; top: 50%;
  z-index: 5;
  width: min(440px, calc(100% - 24px));
  padding: 4px;
  background: var(--face);
  box-shadow: var(--raised), 0 30px 60px -20px rgba(0, 0, 0, .55);
  transform: translate(-50%, -50%);
}
.msgbox__bar {
  height: 30px; padding: 0 10px;
  display: flex; align-items: center;
  background: linear-gradient(90deg, var(--navy), var(--navy-2));
  color: #fff;
  font: 700 13px/1 var(--mono);
}
.msgbox__body { display: flex; gap: 16px; padding: 22px 18px 10px; font-size: 15.5px; }
.msgbox__body p + p { margin-top: 10px; color: var(--ink-2); }
.msgbox__actions { display: flex; justify-content: center; padding: 12px 0 14px; }
.msgbox__actions .btn { min-width: 112px; }

/* ============================ RADIO ============================ */
.radio { display: grid; gap: 12px; align-content: start; padding: 10px 6px 8px; }
.lcd {
  display: grid; gap: 10px;
  padding: 14px 14px 12px;
  background: #0b1424;
  color: var(--cyan);
  box-shadow: var(--sunken);
  font: 600 13px/1.2 var(--mono);
}
.lcd__row { display: flex; gap: 12px; align-items: baseline; min-width: 0; }
.lcd__row > :first-child { color: var(--yellow); }
.lcd__name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; color: #e8fbfa; }
.lcd__row--small { justify-content: space-between; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #5fa9a6; }
.lcd__row--small > :first-child { color: inherit; }
.lcd__bars {
  display: flex; align-items: flex-end; gap: 3px;
  height: 44px;
  padding: 2px 0;
  background: repeating-linear-gradient(to top, rgba(127, 225, 221, .07) 0 4px, transparent 4px 6px);
}
.lcd__bars > * {
  flex: 1;
  min-height: 2px;
  height: calc(var(--h, .08) * 100%);
  background: repeating-linear-gradient(to top, var(--cyan) 0 4px, transparent 4px 6px);
}
.lcd__bars > :nth-child(n+10) { background: repeating-linear-gradient(to top, var(--amber) 0 4px, transparent 4px 6px); }

.radio__ctl { display: flex; gap: 6px; }
.btn--play { flex: 1; }
.btn--play[aria-pressed="true"] { box-shadow: var(--pressed); background: var(--face-2); }

.now { padding: 12px 12px 14px; background: var(--paper); box-shadow: var(--sunken); }
.now__head { margin-bottom: 10px; font: 700 11.5px/1.2 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.now__list { display: grid; gap: 12px; }
.now__list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; align-items: center; font-size: 14px; }
.now__list li > span:first-child { grid-column: 1 / -1; font-weight: 500; }
.now__list b { font: 700 12px/1 var(--mono); min-width: 3.4em; text-align: right; }
.progress {
  display: block;
  height: 18px;
  padding: 3px;
  background: #fff;
  box-shadow: var(--sunken);
}
.progress i {
  display: block;
  height: 100%;
  width: calc(var(--p, 0) * 100%);
  background: repeating-linear-gradient(90deg, var(--navy) 0 8px, transparent 8px 10px);
}

/* ============================ MENU START ============================ */
.start {
  position: fixed;
  left: 4px;
  bottom: calc(var(--bar) + var(--safe-b) - 2px);
  z-index: 100000;
  display: flex;
  min-width: 288px;
  max-width: calc(100vw - 8px);
  max-height: calc(100dvh - var(--bar) - 12px);
  padding: 4px;
  background: var(--face);
  box-shadow: var(--raised), 0 20px 40px -16px rgba(0, 0, 0, .5);
}
.start__side {
  display: flex; align-items: flex-end; justify-content: center;
  flex: none;
  width: 34px;
  padding: 12px 0;
  background: linear-gradient(0deg, var(--navy), #04093a);
  color: #fff;
}
.start__side span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 800 22px/1 var(--sans);
  letter-spacing: .02em;
  color: var(--face-2);
}
.start__side b { color: var(--yellow); font-weight: 800; }
.start__items { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 2px 0; overflow-y: auto; }
.start__items > button,
.start__items > a {
  display: flex; align-items: center; gap: 14px;
  min-height: 46px;
  padding: 4px 18px 4px 12px;
  border: 0;
  background: none;
  color: var(--ink);
  font: 600 14px/1.2 var(--mono);
  text-align: left;
  text-decoration: none;
}
.start__items > :is(button, a):hover,
.start__items > :is(button, a):focus-visible { background: var(--navy); color: #fff; outline: none; }
.start__items hr { width: calc(100% - 8px); margin: 4px; border: 0; height: 2px; box-shadow: inset 0 1px 0 var(--lo), inset 0 -1px 0 var(--hi); }
.start__items [data-back] { color: var(--navy); }
.start__items [data-back]:is(:hover, :focus-visible) { color: var(--yellow); }

/* ============================ PASEK ZADAŃ ============================ */
.taskbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 99999;
  display: flex; align-items: center; gap: 6px;
  height: calc(var(--bar) + var(--safe-b));
  padding: 4px 4px calc(4px + var(--safe-b));
  background: var(--face);
  box-shadow: inset 0 1px 0 var(--face-2), inset 0 2px 0 var(--hi);
}
.start-btn {
  display: inline-flex; align-items: center; gap: 8px;
  flex: none;
  height: 100%;
  padding: 0 14px 0 8px;
  border: 0;
  background: var(--face);
  font: 800 14.5px/1 var(--mono);
  letter-spacing: .02em;
  box-shadow: var(--raised);
}
.start-btn[aria-expanded="true"] { box-shadow: var(--pressed); background: repeating-conic-gradient(var(--face) 0 25%, var(--hi) 0 50%) 0 0 / 2px 2px; padding-top: 2px; }
.start-btn:focus-visible { outline: 1px dotted var(--dk); outline-offset: -5px; }

.tasks {
  display: flex; gap: 4px;
  flex: 1; min-width: 0;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.tasks::-webkit-scrollbar { display: none; }
.task {
  display: inline-flex; align-items: center; gap: 8px;
  flex: 0 1 190px;
  min-width: 44px;
  height: 100%;
  padding: 0 12px 0 8px;
  border: 0;
  background: var(--face);
  font: 600 13px/1 var(--mono);
  text-align: left;
  box-shadow: var(--raised);
  overflow: hidden;
}
.task > span:last-child, .task__label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.task [data-px], .task svg { flex: none; width: 16px; height: 16px; }
.task[aria-pressed="true"] {
  box-shadow: var(--pressed);
  background: repeating-conic-gradient(var(--face) 0 25%, var(--hi) 0 50%) 0 0 / 2px 2px;
  font-weight: 800;
  padding-top: 2px;
}
.task:focus-visible { outline: 1px dotted var(--dk); outline-offset: -5px; }

.tray { display: flex; align-items: center; gap: 6px; flex: none; height: 100%; }
.tray__back {
  display: inline-flex; align-items: center;
  height: 100%;
  padding: 0 14px;
  background: var(--face);
  color: var(--navy);
  font: 700 12.5px/1 var(--mono);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--raised);
}
.tray__back:hover { background: var(--navy); color: #fff; text-decoration: none; }
.tray__back:active { box-shadow: var(--pressed); }
.tray__back:focus-visible { outline: 1px dotted currentColor; outline-offset: -5px; }
.tray__btn {
  display: grid; place-items: center;
  width: 36px; height: 100%;
  padding: 0; border: 0;
  background: transparent;
}
.tray__btn:hover { background: var(--face-2); }
.tray__btn[aria-pressed="true"] { background: var(--face-2); }
.tray__clock {
  display: flex; align-items: center;
  height: 100%;
  padding: 0 12px;
  font: 600 13px/1 var(--mono);
  font-variant-numeric: tabular-nums;
  box-shadow: var(--hairline);
}
.tray:has(.tray__btn) .tray__clock { margin-left: -6px; }

/* ============================ ŚREDNIE EKRANY ============================ */
@media (max-width: 1180px) {
  .wall { width: min(60vw, 640px); }
}
@media (max-width: 960px) and (min-width: 701px) {
  .tray__back { padding: 0 10px; font-size: 12px; }
  .task { flex-basis: 150px; }
}
@media (max-height: 700px) and (min-width: 701px) {
  .icons { grid-template-columns: 96px 96px; grid-auto-flow: row; }
  .icon { min-height: 76px; }
}

/* ============================ TELEFON ≤700px ============================ */
@media (max-width: 700px) {
  :root { --bar: 58px; }

  .desktop { background: var(--desk); }

  /* ekran główny: duża siatka ikon i znak studia */
  .icons {
    left: 0; right: 0; top: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: max(18px, env(safe-area-inset-top)) 16px 0;
  }
  .icon { width: 100%; min-height: 96px; padding: 10px 4px; }
  .icon__img { width: 48px; height: 48px; }
  .icon__label { font-size: 13px; }

  .wall { left: 16px; right: 16px; bottom: 20px; width: auto; }
  .wall__caption { font-size: 11px; letter-spacing: .12em; }

  /* jedno aktywne okno na całą szerokość; inline geometria z JS ignorowana */
  .win {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: calc(var(--bar) + var(--safe-b)) !important;
    width: auto !important;
    height: auto !important;
    max-height: none;
    padding: 3px 3px 0;
    padding-top: max(3px, env(safe-area-inset-top));
    box-shadow: var(--raised);
  }
  .win__bar { height: 50px; padding: 0 3px 0 12px; gap: 10px; }
  .win__ico { width: 20px; height: 20px; }
  .win__title { font-size: 15px; }
  .win__ctl { gap: 3px; }
  .win__ctl button { width: 46px; height: 44px; }
  .win__ctl [data-act="max"] { display: none; }
  .win__ctl [data-act="close"] { margin-left: 3px; }
  .g { width: 12px; height: 11px; }

  .win__addr { display: none; }
  .win__status { margin-bottom: 3px; font-size: 11.5px; }
  .win__status > :not(:first-child):not(:has(a)) { display: none; }
  .win__status > * { min-height: 32px; }
  #win-welcome .win__status > :first-child { display: none; }
  #win-welcome .win__status > a { flex: 1; justify-content: center; min-height: 44px; font-size: 13px; }

  .sheet { padding: 26px 20px 30px; }
  .welcome__title { font-size: clamp(40px, 12.4vw, 56px); }
  .welcome__cta .btn { flex: 1 1 100%; min-height: 50px; }
  .recent__list { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .tile { grid-template-columns: 112px minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; min-height: 72px; padding: 6px; gap: 2px 14px; }
  .tile .thumb { grid-column: 1; grid-row: 1 / 3; }
  .tile__name { align-self: end; }
  .tile__meta { text-align: left; align-self: start; }

  .proj { grid-template-rows: auto minmax(0, 1fr); }
  .proj__list { grid-auto-columns: minmax(132px, 42%); scroll-snap-type: x mandatory; }
  .case { scroll-snap-align: start; }
  .art { max-height: none; }
  .art__tag { left: 8px; bottom: 8px; }

  .lab__canvas { width: min(100%, 72vh); }
  .lab__palette > * { min-height: 38px; }
  .lab__actions .btn { min-height: 48px; }

  .msgbox { position: fixed; top: auto; bottom: calc(var(--bar) + 16px); transform: translateX(-50%); }

  /* pasek zadań: Start, ikony okien, zegar */
  .taskbar { gap: 4px; padding-inline: 4px; }
  .start-btn { padding: 0 12px 0 10px; min-width: 52px; }
  .task { flex: 0 0 auto; width: 52px; min-width: 52px; justify-content: center; padding: 0; }
  .task > span:last-child:not(:first-child), .task__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .task [data-px], .task svg { width: 22px; height: 22px; }
  .tray__back { display: none; }
  .tray__btn { width: 44px; }
  .tray__clock { padding: 0 8px; font-size: 12px; }

  .start { left: 0; right: 0; min-width: 0; max-width: none; }
  .start__items > button, .start__items > a { min-height: 52px; font-size: 15px; }
}

@media (max-width: 380px) {
  .tray__clock { display: none; }
  .start-btn b { font-size: 13.5px; }
}

/* ============================ RUCH ============================ */
@media (prefers-reduced-motion: no-preference) {
  .btn, .tool, .task, .case, .tile, .icon__label, .start__items > * { transition: background-color .12s linear, color .12s linear; }
  .lcd__bars > * { transition: height .09s steps(3, end); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .taskbar, .start, .icons, .wall { display: none !important; }
  body { overflow: visible; background: #fff; }
  .desktop { position: static; }
  .win { position: static !important; width: auto !important; height: auto !important; box-shadow: none; margin-bottom: 24px; }
}

/* Integration: case metadata and aligned independent content blocks. */
.case-copy__meta{display:flex;flex-wrap:wrap;gap:10px 24px;margin-block:24px;font-family:var(--mono);font-size:12px;color:var(--ink-2)}
@media (min-width:701px) and (max-height:950px) {
  .welcome{padding:28px 40px}
  .welcome__title{font-size:clamp(40px,7.5cqi,76px)}
  .welcome__cta{margin-top:24px}
  .recent{padding-top:28px}
}
