:root {
  --ink: #0b0b0b;
  --paper: #f2efe6;
  --paper-2: #e4dfd1;
  --yellow: #f5d90a;
  --tape: rgba(245, 217, 10, 0.72);
  --red: #c8321e;
  --label: "Anton", "Arial Narrow", sans-serif;
  --script: "Caveat", "Comic Sans MS", cursive;
  --body: "Archivo", system-ui, sans-serif;
  --torn-a: polygon(0 3%, 6% 0, 18% 2%, 31% 0, 47% 3%, 62% 0, 78% 2%, 92% 0, 100% 4%, 99% 22%, 100% 47%, 98% 71%, 100% 96%, 86% 100%, 71% 97%, 55% 100%, 38% 98%, 22% 100%, 7% 97%, 0 100%, 1% 74%, 0 49%, 2% 24%);
  --torn-b: polygon(2% 0, 17% 3%, 33% 0, 51% 2%, 67% 0, 84% 3%, 100% 0, 98% 28%, 100% 53%, 97% 79%, 100% 100%, 81% 97%, 64% 100%, 46% 97%, 29% 100%, 13% 98%, 0 100%, 2% 76%, 0 51%, 3% 26%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--paper);
  font: 16px/1.45 var(--body);
  overflow-x: hidden;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.script { font-family: var(--script); font-weight: 700; }

/* analog grain over everything */
.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 50;
  opacity: 0.16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-3%, 2%); }
  50% { transform: translate(2%, -3%); }
  75% { transform: translate(-1%, 3%); }
}

/* settings */
.settings {
  position: fixed; z-index: 40;
  right: 8px; bottom: calc(8px + env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px;
  max-width: calc(100% - 16px);
}
.chip-btn {
  background: var(--ink); color: var(--paper);
  border: 1.5px solid var(--paper); border-radius: 2px;
  padding: 6px 10px; font: 13px/1.1 var(--body); font-weight: 600;
}
.chip-btn[aria-pressed="true"] { background: var(--yellow); color: var(--ink); border-color: var(--yellow); }

.screen { min-height: 100dvh; padding: 16px 16px 96px; position: relative; }

/* paper buttons */
.paper-btn {
  background: var(--paper); color: var(--ink);
  border: 0; padding: 12px 20px;
  font: 22px/1 var(--label); letter-spacing: 0.02em;
  clip-path: var(--torn-b);
  min-height: 48px;
}
.paper-btn--ghost { background: transparent; color: var(--paper); clip-path: none; border: 2px dashed var(--paper); font-size: 18px; }

/* A. the cell */
.screen-cell {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px;
  background: radial-gradient(ellipse at 50% 35%, #1b1d22 0%, var(--ink) 65%);
}
.cell-art { display: block; width: 100vw; margin: 0 -16px; }
.cell-art img { display: block; width: 100%; height: auto; }
@media (min-width: 640px) {
  .cell-art { width: auto; margin: 0; }
  .cell-art img { width: auto; max-width: min(90vw, 560px); max-height: 72dvh; }
}
.blink-btn {
  background: var(--yellow); color: var(--ink); border: 0;
  font: clamp(40px, 13vw, 64px)/1 var(--label);
  padding: 18px 28px 14px;
  clip-path: var(--torn-a);
  transform: rotate(-2deg);
}
.blink-btn.one { background: var(--paper); }
.blink-hint { margin: 0; font-size: 26px; color: var(--paper); }
body.blinking::before {
  content: ""; position: fixed; inset: 0; background: #000; z-index: 45; opacity: 0;
  animation: lid 0.18s ease-in-out 2;
}
@keyframes lid { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }

/* B. cold open */
.screen-open { display: flex; flex-direction: column; justify-content: center; gap: 20px; overflow: hidden; }
.static {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='s'><feTurbulence type='turbulence' baseFrequency='1.4' numOctaves='1'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%' height='100%' filter='url(%23s)'/></svg>");
}
.static.on { animation: fizz 0.45s steps(3) 1; }
@keyframes fizz {
  0% { opacity: 0.9; background-position: 0 0; }
  50% { opacity: 0.8; background-position: 37px 11px; }
  100% { opacity: 0; background-position: -23px 29px; }
}
.beat {
  position: relative; z-index: 1;
  background: var(--paper); color: var(--ink);
  clip-path: var(--torn-a);
  padding: 28px 22px;
  max-width: 560px; width: 100%; margin: 0 auto;
}
.beat::before {
  content: ""; position: absolute; top: 6px; left: 50%; width: 90px; height: 22px;
  background: var(--tape); transform: translateX(-50%) rotate(-3deg);
}
.beat h2 { font: clamp(30px, 9vw, 44px)/1.02 var(--label); margin: 8px 0 8px; text-transform: uppercase; }
.beat p { margin: 0; font-size: 17px; }
.beat .tv { background: var(--ink); color: var(--paper); padding: 10px 12px; margin-top: 10px; font-family: var(--script); font-size: 22px; }
.beat .doorpair { display: flex; gap: 10px; margin-top: 12px; }
.beat .doorpair span { flex: 1; text-align: center; border: 3px solid var(--ink); padding: 18px 0; font: 24px/1 var(--label); }
.beat .doorpair span.x { text-decoration: line-through 4px var(--red); }
.caption { position: relative; z-index: 1; margin: 0 auto; max-width: 560px; font-size: 26px; line-height: 1.15; color: var(--yellow); min-height: 1.2em; }
.open-controls { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* tracker */
.tracker { position: sticky; top: 0; z-index: 30; background: var(--ink); border-bottom: 2px solid var(--paper); padding: 8px 16px; }
.tracker ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.tracker li {
  font: 11px/1 var(--label); letter-spacing: 0; text-align: center; white-space: nowrap;
  padding: 6px 2px 5px; background: #222; color: #8a877f;
}
.tracker li.open { background: var(--paper); color: var(--ink); }
.tracker li.done { background: var(--yellow); color: var(--ink); }
.tracker li.done::after { content: "\00a0✓"; font-size: 9px; }

/* C. the store */
.screen-store { background: linear-gradient(#141518, #1d1f1c 60%, #2a2a24); }
.room-title {
  font: clamp(44px, 14vw, 76px)/0.9 var(--label); margin: 10px 0 14px;
  color: var(--ink); background: var(--paper); display: inline-block; padding: 8px 14px 4px;
  clip-path: var(--torn-b); transform: rotate(-1.5deg);
}
.monitor {
  display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center;
  background: #0a0c0f; border: 6px solid #333; border-bottom-width: 14px;
  padding: 10px; margin: 0 0 16px; max-width: 520px;
}
.monitor-face {
  width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, #d8c3a5, #6d5a48 70%);
  /* six levels: 1 is Room 1's blur, 6 is clear */
  filter: blur(calc((6 - var(--blur-level, 1)) * 1.2px));
}
.monitor-line { margin: 0; font-size: 24px; line-height: 1.1; color: var(--paper); }

.backwall { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 16px; opacity: 0.55; }
.hint {
  background: #1e2226; border: 1px solid #3a3f44; color: #b9bdb6;
  font: 12px/1.1 var(--label); letter-spacing: 0.03em; padding: 18px 2px 8px; min-height: 64px;
}
.hint-fridge { background: linear-gradient(#cfe6ef22, #1e2226); }
.hint-tv { background: #10161c; }
.hint-tv span { display: block; color: #4f6e86; letter-spacing: -1px; }

.gun-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 10px; }
.gun { width: 40px; height: 28px; background: var(--yellow); clip-path: polygon(0 0, 100% 0, 100% 45%, 45% 45%, 40% 100%, 15% 100%, 22% 45%, 0 45%); }
.gun-help { margin: 0; font-size: 15px; color: #cfcabd; flex: 1; }
.tally { margin: 0; font: 20px/1 var(--label); color: var(--yellow); }

.aisle-label { font: 20px/1 var(--label); margin: 18px 0 10px; color: var(--paper); }
.shelf {
  list-style: none; margin: 0; padding: 0 0 14px;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 10px;
  border-bottom: 10px solid #5b5246;
}
@media (min-width: 640px) { .shelf { grid-template-columns: repeat(4, 1fr); } }

.item {
  width: 100%; min-height: 132px; position: relative;
  background: var(--paper); color: var(--ink); border: 0;
  padding: 26px 10px 10px; text-align: left;
  clip-path: var(--torn-a);
  display: flex; flex-direction: column; justify-content: space-between; gap: 8px;
  perspective: 600px;
}
.shelf li:nth-child(odd) .item { transform: rotate(-1deg); }
.shelf li:nth-child(even) .item { transform: rotate(1.2deg); clip-path: var(--torn-b); }
.item::before {
  content: ""; position: absolute; top: 4px; left: 18%; width: 54px; height: 16px;
  background: var(--tape); transform: rotate(-6deg);
}
.item-name { font: 22px/1 var(--label); text-transform: uppercase; }
.tag {
  background: #fff; border: 2px solid var(--ink); padding: 6px 8px;
  font-size: 13px; line-height: 1.25; transform-origin: top center;
}
.tag .price { font: 22px/1 var(--label); display: block; }
.tag .price s { color: var(--red); margin-right: 6px; font-size: 16px; }
.item.scanned .tag { animation: flip 0.45s ease-out; }
@keyframes flip { 0% { transform: rotateX(90deg); } 100% { transform: rotateX(0); } }
.item.free { background: var(--yellow); }
.item.free .tag { animation: stamp 0.5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes stamp { 0% { transform: scale(1.6) rotate(-8deg); opacity: 0; } 100% { transform: scale(1) rotate(0); opacity: 1; } }
.chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip { font: 12px/1 var(--label); letter-spacing: 0.03em; padding: 4px 6px 3px; background: var(--ink); color: var(--paper); }
.chip.documented { background: var(--ink); }
.chip.reported { background: #555; }
.chip.imagined { background: var(--paper); color: var(--ink); border: 1.5px dashed var(--ink); }
.chip.pending { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); font-family: var(--body); font-weight: 600; }

.readout { margin: 16px 0 0; min-height: 1px; }
.readout .card {
  background: var(--paper); color: var(--ink); padding: 14px 16px;
  clip-path: var(--torn-b); max-width: 560px;
}
.readout .card strong { font: 24px/1 var(--label); display: block; margin-bottom: 6px; text-transform: uppercase; }
.readout .card p { margin: 0 0 6px; }
.quip { margin: 12px 0 0; font-size: 26px; line-height: 1.1; color: var(--yellow); min-height: 1.1em; max-width: 560px; }

.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 22px; }
.door {
  min-height: 150px; border: 4px solid #8f8a7e; background: #2c2e2b; color: var(--paper);
  font: 30px/1 var(--label); text-transform: uppercase;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 14px;
}
.door-third {
  grid-column: 1 / -1; min-height: 170px; border: 0;
  background: var(--yellow); color: var(--ink);
  clip-path: var(--torn-a); font-size: 40px;
  animation: swing 0.7s ease-out; transform-origin: left center;
}
@keyframes swing { 0% { transform: perspective(700px) rotateY(-70deg); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* D. transition */
.screen-transit { display: flex; flex-direction: column; justify-content: center; gap: 20px; overflow: hidden; }
.monitor--clearer { --blur-level: 2; position: relative; z-index: 1; margin: 0 auto; width: 100%; }
.intercom { margin: 0; font: 22px/1.1 var(--label); letter-spacing: 0.02em; color: var(--paper); min-height: 1.1em; }
.screen-transit .caption { min-height: 2.4em; }

/* E. room 2: the plate */
.screen-plate { background: linear-gradient(#101214, #1b1d1b 60%, #26251f); }
.framing {
  background: var(--paper); color: var(--ink); padding: 16px 16px 14px;
  clip-path: var(--torn-b); max-width: 560px; margin-bottom: 14px;
}
.framing p { margin: 0 0 12px; font-size: 22px; line-height: 1.15; }
.framing .paper-btn--ghost { color: var(--ink); border-color: var(--ink); }

.tray { position: sticky; top: 42px; z-index: 20; background: var(--ink); padding: 8px 0; margin: 0 0 6px; }
.tray-label { margin: 0 0 6px; font: 16px/1 var(--label); color: var(--yellow); }
.slots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.slot {
  width: 100%; min-height: 52px; padding: 4px 2px; border: 2px dashed #8f8a7e; background: #1a1b19;
  color: var(--paper); font: 12px/1.05 var(--label); letter-spacing: 0.02em;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
}
.slot .n { color: #8f8a7e; font-size: 11px; }
.slot.filled { border-style: solid; border-color: var(--paper); background: var(--paper); color: var(--ink); }
.slot.filled .n { color: #555; }
.slot.over, .slot.target { border-color: var(--yellow); }
.slot.wrong { border-color: var(--red); }
.slot.right { background: var(--yellow); border-color: var(--yellow); }

.fridge {
  position: relative; margin-top: 10px; padding: 14px 10px 0;
  background: #e9ecea; border: 10px solid #c9ccc8; border-radius: 6px 6px 2px 2px;
  box-shadow: inset 0 0 0 3px #9a9d99;
}
/* lit by default; the click-on is a one-shot animation, so a stalled one can only leave it lit */
.fridge-light { position: absolute; inset: 0; pointer-events: none; z-index: 5; background: transparent; }
.fridge.light-on .fridge-light { animation: light-on 0.5s linear 1; }
@keyframes light-on {
  0%, 70% { background: rgba(6, 6, 6, 0.94); }
  71%, 100% { background: transparent; }
}
.fridge-shelves {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 10px;
}
@media (min-width: 640px) { .fridge-shelves { grid-template-columns: repeat(3, 1fr); } }
.fridge-shelves > li {
  padding: 22px 0 12px; position: relative;
  border-bottom: 7px solid #b7bbb6;
  /* packaged filler behind the cards: nothing fresh */
  background:
    linear-gradient(90deg, transparent 0 4%, #2b2b2b 4% 18%, transparent 18% 22%, #f2efe6 22% 34%, transparent 34% 38%, #3a3a3a 38% 47%, transparent 47%) bottom / 100% 34px no-repeat;
}

.pkg {
  width: 100%; height: 206px; padding: 0; border: 0; background: none; color: var(--ink);
  position: relative; text-align: left;
}
/* trading-card flip, flat: squeeze to an edge, swap faces, open back out */
.pkg-inner { position: absolute; inset: 0; }
.pkg.turning .pkg-inner { animation: turn 0.32s ease-in-out 1; }
@keyframes turn { 0%, 100% { transform: scaleX(1); } 50% { transform: scaleX(0.02); } }
.pkg-face {
  position: absolute; inset: 0;
  background: var(--paper); clip-path: var(--torn-a); padding: 40px 9px 9px;
  display: flex; flex-direction: column; gap: 6px; overflow: hidden;
}
.pkg-back { display: none; background: #fff; clip-path: var(--torn-b); font-size: 12px; line-height: 1.2; }
.pkg.flipped .pkg-front { display: none; }
.pkg.flipped .pkg-back { display: flex; }
.pkg-face::before {
  content: ""; position: absolute; top: 4px; left: 20%; width: 52px; height: 15px;
  background: var(--tape); transform: rotate(-5deg);
}
.pkg-name { font: 21px/1 var(--label); text-transform: uppercase; }
.pkg-art { width: 64px; height: 72px; margin-top: auto; align-self: center; }
.pkg-art * { fill: var(--ink); stroke: var(--ink); stroke-width: 2; stroke-linejoin: round; }
.pkg-art .hi { fill: var(--paper); stroke: var(--paper); }
.pkg.never .pkg-art .hi { fill: var(--red); stroke: var(--red); }
.use-by { font: 12px/1.1 var(--body); font-weight: 600; border: 2px solid var(--ink); padding: 3px 5px; align-self: flex-start; }
.pkg-back .use-by { margin-top: auto; }
.chain { margin: 0; padding: 0; list-style: none; }
.chain li { padding: 1px 0; }
.chain li + li::before { content: "↓ "; }
.grip {
  position: absolute; right: 6px; top: 4px; z-index: 3;
  font: 12px/1 var(--label); letter-spacing: 0.03em; padding: 8px 8px 6px; min-width: 44px; min-height: 32px;
  background: var(--ink); color: var(--paper); touch-action: none; cursor: grab; user-select: none;
}
.pkg.selected .pkg-face { outline: 4px solid var(--yellow); outline-offset: -4px; }
.pkg.placed { opacity: 0.45; }
.pkg.placed .grip { display: none; }
.pkg.never .pkg-front { background: var(--yellow); }
.pkg .flag {
  display: none; position: absolute; left: 6px; top: 46%; z-index: 4; transform: rotate(-8deg);
  background: var(--red); color: var(--paper); font: 18px/1 var(--label); padding: 6px 8px 4px;
}
.pkg.never .flag { display: block; }
.drag-ghost {
  position: fixed; z-index: 60; pointer-events: none; transform: translate(-50%, -50%) rotate(-4deg);
  background: var(--yellow); color: var(--ink); font: 18px/1 var(--label); padding: 10px 12px 8px;
}

.crisper {
  position: relative; margin: 6px -10px 0; height: 64px; overflow: hidden;
  background: #cfd3cf; border-top: 6px solid #a9ada8;
  transition: height 0.7s ease;
}
.crisper-face {
  position: absolute; left: 0; right: 0; top: 0; height: 64px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  font: 20px/1 var(--label); letter-spacing: 0.06em; color: #6b6f6a; text-transform: uppercase;
  background: linear-gradient(#dfe3df, #c3c7c3);
  transition: transform 0.7s ease;
}
.crisper.open { height: 200px; }
.crisper.open .crisper-face { transform: translateY(150px); }
.soil {
  position: absolute; inset: 0 0 64px; width: 100%; border: 0;
  background:
    radial-gradient(circle at 20% 30%, #3a2c20 0 3px, transparent 4px) 0 0 / 34px 28px,
    radial-gradient(circle at 70% 60%, #2a2018 0 2px, transparent 3px) 0 0 / 22px 26px,
    #15100c;
  color: var(--yellow); font: 30px/1 var(--label); text-transform: uppercase;
  display: flex; align-items: center; justify-content: center;
}

/* F. clock-in transition */
.screen-clockin { display: flex; flex-direction: column; justify-content: center; gap: 18px; overflow: hidden; }
.monitor--level3 { --blur-level: 3; margin: 0 auto; width: 100%; }
.screen-clockin .caption { min-height: 1.2em; }
.timeclock {
  align-self: center; width: 132px; height: 150px; position: relative;
  background: var(--paper); clip-path: var(--torn-a); border-bottom: 10px solid #555;
}
.timeclock::before { /* the dial */
  content: ""; position: absolute; left: 34px; top: 16px; width: 64px; height: 64px; border-radius: 50%;
  border: 4px solid var(--ink); background: conic-gradient(var(--ink) 0 2%, transparent 2% 48%, var(--ink) 48% 50%, transparent 50%);
}
.timeclock-slot { position: absolute; left: 30px; right: 30px; top: 100px; height: 8px; background: var(--ink); }
.timecard {
  position: absolute; left: 44px; top: 60px; width: 44px; height: 46px; z-index: -1;
  background: var(--yellow); color: var(--ink); font: 16px/1 var(--label); text-align: center; padding-top: 4px;
  transform: translateY(-40px); opacity: 0;
}
.timecard.punched { z-index: 1; opacity: 1; transform: translateY(0); animation: punch 0.3s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes punch { 0% { transform: translateY(-40px); } 100% { transform: translateY(0); } }
.floor { height: 64px; margin: 0 -16px; transition: background 0.8s ease; }
.floor.tiles { background: repeating-conic-gradient(#d8d6cf 0 25%, #b9b7b0 0 50%) 0 0 / 32px 32px; }
.floor.carpet {
  background:
    radial-gradient(circle at 30% 40%, #5c6066 0 1px, transparent 2px) 0 0 / 6px 6px,
    radial-gradient(circle at 70% 70%, #3e4247 0 1px, transparent 2px) 0 0 / 5px 7px,
    #4a4e54;
}

/* G. room 3: the job */
.screen-job { background: linear-gradient(#141516, #232526); }
.cube {
  position: relative; max-width: 560px;
  background: #4a4e54; border: 8px solid #6f7274; border-bottom: 0; padding: 0;
}
.cube-wall {
  position: relative; z-index: 2; padding: 12px;
  background: repeating-linear-gradient(90deg, #8e9194 0 3px, #868a8d 3px 6px);
  border-bottom: 6px solid #6f7274;
  display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start;
  transform-origin: top center; transition: transform 0.8s ease, opacity 0.8s ease;
}
.cube.folded .cube-wall { transform: perspective(800px) rotateX(-88deg); opacity: 0; pointer-events: none; }
/* the third door waits behind the wall, in the same grid cell */
.cube-stack { display: grid; }
.cube-stack > * { grid-area: 1 / 1; }
.cube-door { z-index: 1; padding: 12px; display: flex; align-items: stretch; background: #15100c; }
.cube-third { width: 100%; min-height: 140px; }
.calendar { width: 96px; height: auto; transform: rotate(-3deg); }
.cal-paper { fill: var(--paper); }
.cal-head { fill: var(--red); }
.cal-x line { stroke: var(--ink); stroke-width: 1.6; }
.painted-doors { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.door-painted {
  min-height: 120px; font-size: 20px; padding-bottom: 10px;
  background: transparent; border: 3px dashed var(--paper); color: var(--paper);
  border-radius: 40% 40% 0 0 / 18% 18% 0 0;
}
.desk {
  background: #6d6152; border-top: 8px solid #8b7d6a; padding: 10px 12px 12px;
  display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: end;
}
.cube-monitor {
  height: 74px; background: #0a0c0f; border: 5px solid #2c2e31; border-bottom-width: 10px;
  display: flex; align-items: center; justify-content: center;
  font: 12px/1 var(--label); color: #7f8a96; letter-spacing: 0.03em;
}
.desk-tray { background: #2b2b2b; padding: 6px; border: 3px solid #1b1b1b; }
.docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.doc {
  width: 100%; min-height: 44px; border: 0; background: var(--paper); color: var(--ink);
  font: 18px/1 var(--label); text-transform: uppercase; text-align: left; padding: 12px 10px 10px;
  clip-path: var(--torn-b); touch-action: none; user-select: none;
}
.doc.selected { background: var(--yellow); }
.doc.read::after { content: " · read"; font: 12px/1 var(--body); text-transform: none; color: #555; }
.doc.shredded { visibility: hidden; }
.under-desk { background: #26272a; padding: 12px; display: flex; justify-content: center; }
.shredder {
  width: 170px; min-height: 88px; border: 0; position: relative;
  background: linear-gradient(#3a3c40, #2a2b2e); color: var(--paper);
  font: 18px/1 var(--label); letter-spacing: 0.04em; text-transform: uppercase; padding-top: 30px;
  border-top: 10px solid #55585d;
}
.shredder-mouth { position: absolute; left: 18px; right: 18px; top: 4px; height: 6px; background: #0b0b0b; }
.shredder.over, .shredder.ready { outline: 4px solid var(--yellow); outline-offset: 2px; }
.shredder.chewing { animation: chew 0.12s steps(2) 4; }
@keyframes chew { 50% { transform: translateX(2px); } }

.strips-wrap { margin-top: 16px; max-width: 560px; }
.strips { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 6px; }
.strip {
  min-height: 48px; padding: 12px 12px 9px; border: 0; background: var(--paper); color: var(--ink);
  font: 24px/1 var(--label); touch-action: none; user-select: none;
  clip-path: polygon(0 8%, 100% 0, 98% 92%, 2% 100%);
  transform: rotate(var(--r, 0deg)) translateY(var(--y, 0px));
}
.strip.selected { background: var(--yellow); }
.strip.over { outline: 3px solid var(--yellow); }
.strips.solved .strip { background: var(--yellow); transform: none; }
.strips.solved .strip:disabled { color: var(--ink); opacity: 1; }

/* H. restroom transition */
.screen-restroom { display: flex; flex-direction: column; justify-content: center; gap: 18px; overflow: hidden; }
.monitor--level4 { --blur-level: 4; margin: 0 auto; width: 100%; }
.screen-restroom .caption { min-height: 2.4em; }
.restroom-set {
  height: 220px; position: relative; border: 6px solid #6f7274;
  transition: background 0.8s ease;
}
.restroom-set.tile { background: repeating-conic-gradient(#e9ece9 0 25%, #cfd3cf 0 50%) 0 0 / 26px 26px; }
.restroom-set.wallpaper {
  background:
    radial-gradient(circle at 50% 50%, #6b5a3c 0 3px, transparent 4px) 0 0 / 28px 28px,
    repeating-linear-gradient(90deg, #3a3326 0 14px, #332c21 14px 28px);
}
.restroom-set.flicker { animation: flicker 0.9s steps(1) 1; }
@keyframes flicker { 0%, 30%, 60% { filter: brightness(1); } 15%, 45% { filter: brightness(0.35); } 75% { filter: brightness(0.6); } }
.rest-mirror {
  position: absolute; left: 16px; top: 18px; width: 120px; height: 90px;
  background: linear-gradient(135deg, #cfd8dc, #9aa6ab); border: 5px solid #8f9497;
  transition: all 0.8s ease;
}
.restroom-set.cabinet .rest-mirror { width: 90px; height: 120px; border-color: #e3dccb; background: linear-gradient(135deg, #b9c2c6, #6c777c); }
.stalls { position: absolute; right: 12px; top: 12px; bottom: 0; display: flex; gap: 6px; transition: opacity 0.6s ease; }
.stalls span { width: 40px; background: #8d9092; border: 3px solid #6f7274; border-bottom: 0; }
.restroom-set.wallpaper .stalls { opacity: 0; }

/* I. room 4: the pharmacy */
.screen-pharmacy { background: linear-gradient(#0e1014, #191b22 60%, #1f1c1a); }
.bath {
  max-width: 560px; padding: 12px; position: relative;
  background:
    radial-gradient(circle at 50% 50%, #6b5a3c 0 2px, transparent 3px) 0 0 / 24px 24px,
    repeating-linear-gradient(90deg, #3a3326 0 12px, #332c21 12px 24px);
  border: 6px solid #2a2620;
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
.med-cabinet { background: #e3dccb; padding: 6px; clip-path: var(--torn-b); }
.med-cabinet svg { display: block; width: 100%; height: auto; }
.cab-back { fill: #f2efe6; }
.cab-shelf { fill: #9a9184; }
.cab-stock .pill { fill: #fff; stroke: var(--ink); stroke-width: 2; }
.cab-stock .cap { fill: var(--ink); }
.cab-stock .label { fill: var(--yellow); }
.cab-stock .tube { fill: #d7dbe0; stroke: var(--ink); stroke-width: 2; }
.mirror-wrap { position: relative; height: 380px; }
.mirror-green {
  position: absolute; inset: 0; z-index: 1; padding: 14px;
  background: radial-gradient(circle at 40% 30%, #3f7a35, #1d3d18 70%);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px;
}
.leaves { width: 150px; height: 150px; }
.leaves path { fill: #6fae4a; stroke: #0b0b0b; stroke-width: 2; }
.leaves path:first-child { fill: none; stroke-width: 3; }
.mirror-third { width: 100%; min-height: 110px; font-size: 32px; }
.mirror {
  position: absolute; inset: 0; z-index: 2; overflow: hidden;
  background: linear-gradient(135deg, #c9d3d7 0%, #8e9ba1 55%, #b7c2c6 70%, #7d8a90 100%);
  border: 8px solid #e3dccb; transform-origin: left center;
  transition: transform 1.1s ease;
}
.mirror.open { transform: perspective(900px) rotateY(-105deg); pointer-events: none; }
.mirror-text {
  position: absolute; inset: 0; padding: 18px 16px; color: #10161a;
  font-size: 16px; line-height: 1.35; display: flex; flex-direction: column; justify-content: center; gap: 10px;
}
.mirror-text .chips { margin-top: 4px; }
.fog { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: grab; }
.sink { height: 46px; background: #e9ecea; border: 4px solid #c9ccc8; border-radius: 0 0 40% 40% / 0 0 100% 100%; position: relative; }
.faucet { position: absolute; left: 50%; top: -14px; width: 30px; height: 14px; margin-left: -15px; background: #9aa1a6; }
.shower {
  position: relative; height: 150px; overflow: hidden;
  background: repeating-conic-gradient(#e9ece9 0 25%, #cfd3cf 0 50%) 0 0 / 24px 24px;
  border: 5px solid #6f7274; display: flex; align-items: flex-end; justify-content: flex-end; padding: 10px;
}
.shower-head { position: absolute; left: 22px; top: 10px; width: 54px; height: 16px; background: #8b9196; border-radius: 0 0 20px 20px; }
.hot-tap {
  min-width: 120px; min-height: 52px; border: 0; background: var(--red); color: var(--paper);
  font: 22px/1 var(--label); text-transform: uppercase; clip-path: var(--torn-b); position: relative; z-index: 2;
}
.hot-tap[aria-pressed="true"] { background: var(--yellow); color: var(--ink); }
.steam { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 1.4s ease; }
.steam.on { opacity: 1; }
.steam span {
  position: absolute; bottom: -40px; width: 70px; height: 70px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 70%);
  animation: rise 3.2s linear infinite;
}
.steam span:nth-child(1) { left: 8%; }
.steam span:nth-child(2) { left: 30%; animation-delay: 0.8s; }
.steam span:nth-child(3) { left: 52%; animation-delay: 1.6s; }
.steam span:nth-child(4) { left: 74%; animation-delay: 2.4s; }
@keyframes rise { 0% { transform: translateY(0) scale(0.7); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(-200px) scale(1.6); opacity: 0; } }
#wipe { margin-top: 8px; }

/* J. room 5 stub */
.screen-shortage { background: linear-gradient(90deg, #08090a 0 50%, #1c1e21 50%); }
.breakroom {
  max-width: 420px; padding: 14px; border: 6px solid #3a3c40; position: relative;
  background: linear-gradient(90deg, #0d0e10 0 45%, #2a2c30 45%);
  display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: end;
}
.vending {
  height: 260px; background: #1a1c20; border: 5px solid #3c4046; padding: 10px 8px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; align-content: start;
  box-shadow: 0 0 36px rgba(245, 217, 10, 0.25), inset 0 0 22px rgba(245, 217, 10, 0.35);
}
.vending span { height: 40px; background: linear-gradient(#f5d90a, #b89f05); opacity: 0.85; }
.break-door {
  height: 300px; background: linear-gradient(90deg, #4a4e54, #3a3d42); border: 5px solid #26282c;
  display: flex; align-items: center; justify-content: center; position: relative;
}
.break-door::after { content: ""; position: absolute; right: 14px; top: 72%; width: 18px; height: 6px; background: #1a1a1a; }
.break-door .sign { font-size: 22px; padding: 10px 10px 7px; }
.sign {
  background: var(--paper); color: var(--ink); font: 38px/1 var(--label); text-transform: uppercase;
  padding: 14px 16px 10px; clip-path: var(--torn-b); transform: rotate(-4deg); position: relative;
}
.fridge-controls { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.share-note { font-size: 22px; color: var(--yellow); }

/* motion off: the toggle, or the OS preference */
body.calm *, body.calm *::before, body.calm *::after,
body.calm .grain {
  animation: none !important; transition: none !important;
}
body.calm .static, body.calm .steam { display: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after, .grain { animation: none !important; transition: none !important; }
  .static, .steam { display: none; }
}
