/* DOC CONTROL SIMULATOR 2
 *
 * Same beige workstation as the first game, but the screen is now a file
 * manager rather than a mail client: uncontrolled documents land on the
 * desktop and you drag them into one of two registers. The arcade lives in the
 * furniture — heavy display type, hard offset shadows, amber LCD readouts —
 * while the desktop itself stays period-honest so REV A / REV B / REV 0 reads
 * instantly under pressure.
 *
 * Flat fills and hard shadows only; no glow, no blur.
 */

:root {
  --paper:   #f3ede1;   /* the page: warm manila */
  --wall:    #e8e0cf;
  --desk:    #dcc4a0;
  --desk-dk: #c2a680;
  --case:    #e2d8c0;   /* beige plastic */
  --case-hi: #f2ebda;
  --case-dk: #c6b997;
  --case-sh: #9a8c6b;

  --ink:  #20211f;
  --ink2: #55524a;

  --red:   #d92d20;     /* the arcade accent, and OUT OF CONTROL */
  --amber: #f0a500;
  --teal:  #0f7b6c;     /* IN CONTROL */

  --pims: #14508c;      /* the two registers, high contrast on white */
  --tb:   #b3126b;

  /* period Windows chrome */
  --w-face: #d4d0c8;
  --w-hi:   #ffffff;
  --w-lo:   #808080;
  --w-dk:   #000000;
  --w-bar1: #000e80;
  --w-bar2: #1084d0;
  --w-desk: #3a6ea5;    /* the classic desktop blue */

  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --disp: "Arial Black", "Helvetica Neue", Impact, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; overflow-x: hidden; }

body {
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: 14px 12px 26px;
  font-family: var(--mono);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    repeating-linear-gradient(90deg, rgba(32,33,31,.045) 0 1px, transparent 1px 34px),
    repeating-linear-gradient(0deg, rgba(32,33,31,.045) 0 1px, transparent 1px 34px),
    linear-gradient(180deg, var(--wall) 0%, var(--paper) 38%, var(--paper) 100%);
}

.room { width: min(100%, 760px); display: flex; flex-direction: column; gap: 14px; }

/* ---------------------------------------------------------------- wordmark -- */

.plaque {
  position: relative;
  padding: 14px 18px 12px;
  text-align: center;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 7px 7px 0 var(--ink);
}
.plaque::before {
  content: ""; position: absolute; inset: 6px 6px auto auto; width: 74px; height: 34px;
  background-image: radial-gradient(var(--ink) 1.1px, transparent 1.2px);
  background-size: 7px 7px; opacity: .22; pointer-events: none;
}
.wordmark {
  margin: 0;
  font-family: var(--disp);
  font-size: clamp(25px, 7.6vw, 55px);
  line-height: .92;
  letter-spacing: -.015em;
  font-style: italic;
}
.wordmark span { display: block; }
.wordmark__a { color: var(--ink); text-shadow: 4px 4px 0 var(--amber); }
.wordmark__b { color: var(--red); text-shadow: 4px 4px 0 var(--ink); }
.wordmark__b em { font-style: italic; color: var(--ink); text-shadow: 4px 4px 0 var(--amber); }
.plaque__sub {
  margin: 10px 0 0; font-size: clamp(8px, 2vw, 10px);
  letter-spacing: .26em; color: var(--ink2);
}

/* ------------------------------------------------------------- scoreboard -- */

.scoreboard { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.readout {
  min-width: 0; padding: 5px 8px 6px;
  background: #14180f;
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--case-sh), inset 0 0 0 2px #2c3322;
}
.readout span {
  display: block; font-size: 7px; letter-spacing: .18em; color: #6f7a5e;
}
.readout b {
  display: block; margin-top: 1px;
  font-size: clamp(12px, 3vw, 19px); letter-spacing: .06em;
  white-space: nowrap; overflow: hidden;
  color: var(--amber);
}
.readout--hi b { color: #9fd44a; }
.readout--lvl b { color: #4ad3d3; }
.readout--streak b { color: #ff7a45; }
.readout--strikes b { color: #ff4d4d; letter-spacing: .12em; }
.readout--streak b.is-hot { animation: streakpop .28s ease-out; }
.readout--strikes b.is-hot { animation: streakpop .28s ease-out; }
@keyframes streakpop { 0% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* -------------------------------------------------------------- the meter -- */

.tray {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px;
  padding: 7px 11px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--case-sh);
}
.tray__label, .tray__note { font-size: 8px; letter-spacing: .2em; }
.tray__label { color: var(--ink); font-weight: 700; }
.tray__note { color: var(--ink2); }
.tray__track {
  height: 15px; background: #efe7d6;
  border: 2px solid var(--ink);
  box-shadow: inset 2px 2px 0 rgba(32,33,31,.14);
  overflow: hidden;
}
.tray__track i {
  display: block; height: 100%; width: 0%;
  background: repeating-linear-gradient(45deg, var(--teal) 0 7px, #12a08d 7px 14px);
  transition: width .12s linear;
}
.tray__track i[data-low="1"] {
  background: repeating-linear-gradient(45deg, var(--red) 0 7px, #f0533f 7px 14px);
  animation: trayflash .5s steps(2) infinite;
}
@keyframes trayflash { 50% { opacity: .5; } }

/* ------------------------------------------------------------------ desk --- */

.desk {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  padding: 18px 16px 20px;
  background:
    repeating-linear-gradient(94deg, rgba(0,0,0,.05) 0 2px, transparent 2px 13px),
    linear-gradient(180deg, var(--desk) 0%, var(--desk-dk) 100%);
  border: 3px solid var(--ink);
  box-shadow: 7px 7px 0 var(--case-sh);
}

/* ------------------------------------------------------------ desk props -- */

/* A mending kit sat on the desk beside the machine — flat fills and the same
   hard black outline as everything else, so it reads as part of the furniture
   rather than as a sticker. The desk grows a bottom strip to sit it on. */
.desk { padding-bottom: 92px; }

.deskbits {
  position: absolute; bottom: 6px;
  pointer-events: none;
}
.deskbits--yarn  { right: 10px; bottom: 2px; width: clamp(124px, 22%, 178px); }
.deskbits--crane { left: 12px; bottom: 8px; width: clamp(112px, 20%, 162px); }
.deskbits svg { display: block; width: 100%; height: auto; overflow: visible; }

/* Crane — orange paper, three shade steps for the facets that turn away, thin
   dark creases. Colours taken from uploads/pasted-1786546755814.png. */
.cr-a, .cr-b, .cr-c { stroke: #4a1c07; stroke-width: 1.6; stroke-linejoin: round; }
.cr-a { fill: #e8501a; }
.cr-b { fill: #d2410f; }
.cr-c { fill: #b8360b; }
.cr-crease path {
  fill: none; stroke: #4a1c07; stroke-width: 1.2; stroke-linecap: round; opacity: .8;
}

/* Yarn — coral ball, darker coral winding, steel needles with ball ends.
   Colours taken from uploads/pasted-1786546799230.png. */
.yn-ball   { fill: #f4836b; }
.yn-ball-o { fill: none; stroke: #d9604a; stroke-width: 2; }
.yn-wind path {
  fill: none; stroke: #e4664e; stroke-width: 4.4; stroke-linecap: round;
}
.yn-thread {
  fill: none; stroke: #f4836b; stroke-width: 4.6; stroke-linecap: round;
}
.yn-rod-o { stroke: #8d949a; stroke-width: 8.5; stroke-linecap: round; }
.yn-rod   { stroke: #d5dade; stroke-width: 5.5; stroke-linecap: round; }
.yn-knob-o { fill: #8d949a; }
.yn-knob   { fill: #d5dade; }

/* On a phone the desk strip is dead space and the prop is thumb-sized clutter. */
@media (max-width: 560px) {
  .desk { padding-bottom: 20px; }
  .deskbits { display: none; }
}

/* ---------------------------------------------------------------- monitor -- */

.rig { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; }

.monitor {
  width: 100%;
  padding: 12px 12px 0;
  background: linear-gradient(180deg, var(--case-hi) 0%, var(--case) 22%, var(--case-dk) 100%);
  border: 3px solid var(--ink);
  border-radius: 10px 10px 4px 4px;
  box-shadow: 7px 7px 0 rgba(32,33,31,.42), inset 0 2px 0 rgba(255,255,255,.7);
}
.monitor__glass {
  position: relative;
  aspect-ratio: 4 / 3;
  max-height: 64dvh;
  display: flex;
  padding: 7px;
  background: #2b2f28;
  border: 3px solid var(--ink);
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px #6d6a5c, inset 0 0 22px rgba(0,0,0,.75);
  overflow: hidden;
}
.crt {
  position: absolute; inset: 0; pointer-events: none; z-index: 3;
  border-radius: 6px;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.12) 0 1px, rgba(0,0,0,0) 1px 3px),
    radial-gradient(ellipse at 50% 45%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 46%),
    radial-gradient(ellipse at center, rgba(0,0,0,0) 58%, rgba(0,0,0,.34) 100%);
}
.monitor__chin {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 6px 7px;
}
.monitor__badge { font-size: 8px; letter-spacing: .22em; font-weight: 700; color: #6d6047; }
.monitor__led {
  width: 8px; height: 8px; border-radius: 50%;
  background: #58e06a; border: 2px solid var(--ink);
  animation: led 2.6s ease-in-out infinite;
}
@keyframes led { 50% { background: #1f8a2e; } }

.monitor__stand {
  width: 22%; height: 16px;
  background: linear-gradient(180deg, var(--case-dk), var(--case-sh));
  border: 3px solid var(--ink); border-top: 0;
}
.monitor__foot {
  width: 42%; height: 11px; border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, var(--case), var(--case-dk));
  border: 3px solid var(--ink); border-top: 0;
  box-shadow: 6px 6px 0 rgba(32,33,31,.34);
}

/* ------------------------------------------------------ the register window -- */

.win {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column;
  background: var(--w-face);
  border: 2px solid;
  border-color: var(--w-hi) var(--w-dk) var(--w-dk) var(--w-hi);
  font-size: clamp(8px, 1.5vw, 11px);
  font-family: var(--mono);
  color: var(--ink);
  overflow: hidden;
}

.win__bar {
  display: flex; align-items: center; gap: 5px;
  padding: 3px 4px;
  background: linear-gradient(90deg, var(--w-bar1), var(--w-bar2));
  color: #fff; font-weight: 700;
  font-size: clamp(7px, 1.35vw, 10px);
}
.win__ico { color: var(--amber); }
.win__title { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.win__btns { display: flex; gap: 3px; flex: 0 0 auto; }
.win__btns i {
  font-style: normal; width: 14px; height: 12px;
  display: grid; place-items: center; font-size: 8px; line-height: 1;
  background: var(--w-face); color: var(--ink);
  border: 1px solid; border-color: var(--w-hi) var(--w-dk) var(--w-dk) var(--w-hi);
}
.win__x { font-weight: 700; }

.win__menu {
  padding: 2px 6px; font-size: clamp(7px, 1.3vw, 10px);
  border-bottom: 1px solid var(--w-lo);
}
.win__menu span { margin-right: 12px; }
.win__menu u { text-decoration: underline; }

.win__body {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 126px;
  gap: 4px; padding: 4px;
}

.win__status {
  flex: 0 0 auto;
  display: flex; justify-content: space-between; gap: 8px;
  padding: 2px 6px;
  font-size: clamp(7px, 1.25vw, 9px); color: var(--ink);
  border-top: 2px solid var(--w-hi);
  background: var(--w-face);
}
.win__status span:first-child {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
#statusline[data-bad="1"] { color: var(--red); font-weight: 700; }

/* --------------------------------------------------------------- the floor -- */

/* Where the uncontrolled copies land. Sunk into the window with a reversed
   bevel, so it reads as a pane and not as a panel. */
.floor {
  position: relative; min-width: 0; overflow: hidden;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.045) 0 6px, transparent 6px 12px),
    var(--w-desk);
  border: 2px solid; border-color: var(--w-dk) var(--w-hi) var(--w-hi) var(--w-dk);
  touch-action: none;      /* the pane is a drag surface, not a scroll surface */
}
.floor__empty {
  position: absolute; inset: auto 0 46% 0; margin: 0;
  text-align: center; color: rgba(255,255,255,.62);
  font-size: 9px; letter-spacing: .18em;
}
.floor__empty[hidden] { display: none; }
.floor.is-hot { box-shadow: inset 0 0 0 3px var(--red); }

/* ------------------------------------------------------------------ a doc -- */

.doc {
  position: absolute;
  width: 30%; min-width: 88px; max-width: 128px;
  padding: 4px 5px 5px;
  background: #fffdf6;
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(0,0,0,.45);
  cursor: grab; touch-action: none; user-select: none;
  animation: dropin .2s ease-out 1;
}
@keyframes dropin { from { opacity: 0; transform: scale(.86) rotate(-4deg); } }

.doc__no {
  display: block;
  font-size: clamp(7px, 1.5vw, 10px); font-weight: 800; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.doc__rev {
  display: block; margin-top: 2px;
  font-family: var(--disp); font-style: italic; line-height: 1;
  font-size: clamp(11px, 2.6vw, 17px);
  color: var(--ink);
}
.doc__stamp {
  display: block; margin-top: 3px;
  padding: 1px 3px;
  font-size: clamp(5.5px, 1.15vw, 8px); font-weight: 800; letter-spacing: .08em;
  text-align: center;
  color: #fff; background: var(--red);
  border: 1px solid var(--ink);
}
.doc--ok .doc__stamp { background: var(--teal); }
.doc--ok { opacity: .82; border-style: dashed; }
.doc--ok .doc__rev { color: var(--ink2); }

.doc.is-sel { box-shadow: 0 0 0 3px var(--amber), 3px 3px 0 rgba(0,0,0,.45); }
.doc.is-drag { cursor: grabbing; }
.doc.is-bad { animation: docbad .34s steps(2) 2; }
@keyframes docbad { 0% { background: #ffd2cd; } }
.doc.is-gone { animation: docgone .18s ease-in 1 forwards; pointer-events: none; }
@keyframes docgone { to { opacity: 0; transform: scale(.7); } }

/* The card being dragged is lifted out into a fixed layer so it can travel
   over the folders, which live outside the floor's overflow. */
.ghostlayer {
  position: fixed; inset: 0; z-index: 40; pointer-events: none;
}
.ghostlayer .doc {
  position: fixed;
  transform: rotate(-3deg) scale(1.06);
  box-shadow: 6px 8px 0 rgba(0,0,0,.4);
}

/* ------------------------------------------------------------- the folders -- */

.dock {
  min-width: 0;
  display: flex; flex-direction: column; gap: 5px;
  padding: 5px 5px 4px;
  background: var(--w-face);
  border: 2px solid; border-color: var(--w-hi) var(--w-dk) var(--w-dk) var(--w-hi);
}
.dock__head {
  margin: 0; font-size: 7px; letter-spacing: .2em; color: var(--ink2); text-align: center;
}
.dock__filed {
  margin: auto 0 0; text-align: center;
  font-size: 7px; letter-spacing: .16em; color: var(--ink2);
}
.dock__filed b { color: var(--ink); }

.folder {
  position: relative;
  flex: 1 1 0; min-height: 54px;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 8px 4px 5px;
  font-family: var(--mono);
  cursor: pointer; touch-action: manipulation; user-select: none;
  background: linear-gradient(180deg, #ffd98a, var(--amber));
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 rgba(32,33,31,.5);
}
.folder__tab {
  position: absolute; top: -7px; left: 6px;
  width: 42%; height: 8px;
  background: linear-gradient(180deg, #ffd98a, var(--amber));
  border: 2px solid var(--ink); border-bottom: 0;
}
.folder__body { display: block; text-align: center; }
.folder__name {
  display: block;
  font-family: var(--disp); font-style: italic; line-height: .95;
  font-size: clamp(11px, 2.5vw, 16px);
  color: var(--ink);
}
.folder__rule {
  display: block; margin-top: 3px;
  font-size: clamp(6px, 1.25vw, 8px); font-weight: 700; letter-spacing: .1em;
  color: #fff; padding: 1px 3px;
}
.folder--pims .folder__rule { background: var(--pims); }
.folder--tb .folder__rule { background: var(--tb); }
.folder__key {
  position: absolute; right: 3px; bottom: 2px;
  font-size: 8px; font-weight: 800; color: var(--ink2);
}
.folder.is-over {
  background: linear-gradient(180deg, #fff6d8, #ffd98a);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 rgba(32,33,31,.5), inset 0 0 0 3px var(--ink);
}
.folder.is-good { animation: foldgood .28s steps(2) 1; }
@keyframes foldgood { 0% { background: #7ee081; } }
.folder.is-bad { animation: foldbad .3s steps(2) 2; }
@keyframes foldbad { 0% { background: #ff8b7f; } }

/* --------------------------------------------------------------- overlay --- */

.overlay {
  position: absolute; inset: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center;
  padding: 14px; text-align: center; line-height: 1.45;
  background: rgba(32,33,31,.55);
}
.overlay[data-show="none"] { display: none; }

.card {
  width: min(100%, 460px);
  max-height: 100%; overflow: auto;
  padding: 14px 16px 16px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 8px 8px 0 rgba(32,33,31,.55);
}
.panel { display: none; }
.overlay[data-show="title"] [data-panel="title"],
.overlay[data-show="paused"] [data-panel="paused"],
.overlay[data-show="clear"] [data-panel="clear"],
.overlay[data-show="over"] [data-panel="over"] { display: block; }

.pop {
  margin: 0 0 8px;
  font-family: var(--disp); font-style: italic;
  font-size: clamp(18px, 4.8vw, 30px);
  color: var(--ink);
  text-shadow: 3px 3px 0 var(--amber);
}
.pop--dead { color: var(--red); text-shadow: 3px 3px 0 var(--ink); }
.panel p { margin: 7px 0; font-size: clamp(10px, 2.4vw, 12px); color: var(--ink); }
.big { font-size: clamp(12px, 2.9vw, 15px) !important; letter-spacing: .08em; }
.reason { color: var(--red) !important; font-weight: 700; letter-spacing: .12em; }

.rules {
  list-style: none; margin: 12px auto; padding: 9px 13px;
  display: inline-block; text-align: left;
  border: 2px dashed var(--ink2);
}
.rules li { font-size: clamp(9px, 2.1vw, 11px); letter-spacing: .04em; padding: 2px 0; }
.rules li::before { content: "▸ "; color: var(--red); font-weight: 700; }
.rules b { color: var(--red); }

.blink { color: var(--ink); font-weight: 700; animation: blink 1s steps(2, start) infinite; }
@keyframes blink { to { opacity: .18; } }

/* -------------------------------------------------- the Friday starburst --- */

.burst {
  --spikes: polygon(50.0% 0.0%, 58.2% 13.9%, 71.7% 5.0%, 73.1% 21.1%, 89.1% 18.8%,
    83.3% 33.9%, 98.7% 38.9%, 87.0% 50.0%, 98.7% 61.1%, 83.3% 66.1%, 89.1% 81.2%,
    73.1% 78.9%, 71.7% 95.0%, 58.2% 86.1%, 50.0% 100.0%, 41.8% 86.1%, 28.3% 95.0%,
    26.9% 78.9%, 10.9% 81.2%, 16.7% 66.1%, 1.3% 61.1%, 13.0% 50.0%, 1.3% 38.9%,
    16.7% 33.9%, 10.9% 18.8%, 26.9% 21.1%, 28.3% 5.0%, 41.8% 13.9%);
  position: relative;
  display: grid; place-items: center;
  width: min(100%, 400px);
  margin: 0 auto;
  padding: clamp(38px, 11vw, 62px) clamp(36px, 10.5vw, 64px);
  clip-path: var(--spikes);
  background: var(--ink);
  animation: throb 1.5s ease-in-out infinite;
}
.burst::before {
  content: ""; position: absolute; inset: 5px;
  clip-path: var(--spikes);
  background: radial-gradient(circle at 50% 36%, #ffe9a8 0%, var(--amber) 52%, #e08900 100%);
}
.burst__text {
  position: relative; z-index: 1;
  margin: 0 !important;
  color: #33240a !important;
  font-weight: 800; line-height: 1.3;
  font-size: clamp(8px, 2.15vw, 11px) !important;
}
.burst__text b {
  display: block;
  font-family: var(--disp); font-style: italic;
  font-size: clamp(19px, 6vw, 32px);
  line-height: 1; margin-bottom: 5px;
  color: var(--red);
  text-shadow: 2px 2px 0 #fff;
}
@keyframes throb {
  0%, 100% { transform: rotate(-1.5deg) scale(1); }
  50%      { transform: rotate(1.5deg) scale(1.045); }
}

/* the misfile */
.rig.is-wrong { animation: wrongshake .38s steps(2) 1; }
.rig.is-wrong::after {
  content: ""; position: absolute; inset: 0; z-index: 7; pointer-events: none;
  background: rgba(217,45,32,.5);
  animation: wrongfade .38s ease-out 1 forwards;
}
@keyframes wrongshake {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-5px, 2px); }
  50% { transform: translate(4px, -3px); }
  75% { transform: translate(-3px, -1px); }
}
@keyframes wrongfade { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .blink, .burst, .monitor__led, .doc, .tray__track i[data-low="1"],
  .rig.is-wrong, .readout b { animation: none; }
}

/* ------------------------------------------------------------ leaderboard -- */

.lb {
  position: relative;
  margin-top: 12px;
  padding: 18px 14px 12px;
  background: var(--paper);
  border: 3px solid var(--ink);
  box-shadow: 7px 7px 0 var(--case-sh);
}
.lb__clip {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  width: 74px; height: 16px;
  background: linear-gradient(180deg, var(--case), var(--case-dk));
  border: 3px solid var(--ink); border-radius: 4px 4px 0 0;
}
.lb__title {
  margin: 0 0 8px; text-align: center;
  font-size: 10px; letter-spacing: .22em; color: var(--ink);
}
.lb__list { list-style: none; margin: 0; padding: 0; counter-reset: rank; }
.lb__list li {
  display: grid; grid-template-columns: 2.2em 1fr auto auto; gap: 8px; align-items: baseline;
  font-size: 11px; padding: 3px 5px;
  border-bottom: 1px dashed var(--case-sh);
}
.lb__list li:last-child { border-bottom: 0; }
.lb__list li::before {
  counter-increment: rank; content: counter(rank) ".";
  color: var(--ink2); text-align: right;
}
.lb__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb__lvl { font-size: 9px; color: var(--ink2); }
.lb__score { color: var(--red); font-weight: 700; font-variant-numeric: tabular-nums; }
.lb__list li.is-you { background: var(--amber); }
.lb__list li.is-you .lb__name { font-weight: 700; }
.lb__empty { display: block !important; text-align: center; color: var(--ink2); font-size: 10px; }
.lb__empty::before { content: none !important; }

.entry { margin: 12px auto 8px; max-width: 320px; }
.entry__label { display: block; font-size: 9px; letter-spacing: .1em; color: var(--ink2); margin-bottom: 6px; }
.entry__row { display: flex; gap: 7px; justify-content: center; }
.entry__input {
  flex: 1 1 auto; min-width: 0;
  font-family: var(--mono); font-size: 14px; letter-spacing: .16em; text-transform: uppercase;
  padding: 6px 9px;
  background: #fff; color: var(--ink);
  border: 2px solid var(--ink); outline: none;
}
.entry__input:focus { box-shadow: 3px 3px 0 var(--amber); }
.entry__go {
  font-family: var(--mono); font-weight: 700; font-size: 12px; letter-spacing: .08em;
  padding: 6px 15px; cursor: pointer;
  background: var(--amber); color: var(--ink);
  border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink);
}
.entry__go:active { transform: translate(3px, 3px); box-shadow: none; }
.entry__go:disabled { opacity: .5; cursor: default; }
.entry__msg { margin: 7px 0 0 !important; font-size: 9px !important; min-height: 1em; color: var(--teal); }
.entry__msg[data-bad="1"] { color: var(--red); }

/* ------------------------------------------------------------------ foot --- */

.foot { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.chip {
  font-family: var(--mono); font-size: 9px; letter-spacing: .14em;
  padding: 5px 11px;
  background: var(--paper); color: var(--ink2);
  border: 2px solid var(--case-sh);
}
.chip--btn { cursor: pointer; }
.chip--btn[aria-pressed="true"] { background: var(--teal); color: #fff; border-color: var(--ink); }

/* ------------------------------------------------------------- narrowing --- */

/* Narrow: the folders move under the desktop rather than beside it. Three cards
   across a 200px pane would overlap each other, and the whole game is reading
   the revision on a card — so the pane gets the full width, and the glass turns
   portrait to keep three rows of parking spaces. */
@media (max-width: 620px) {
  .win__menu { display: none; }
  .monitor__glass { aspect-ratio: 3 / 4; max-height: 66dvh; }
  .win__body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
  }
  .dock { flex-direction: row; gap: 6px; padding: 5px; }
  .dock__head, .dock__filed { display: none; }
  .folder { min-height: 46px; padding: 7px 4px 5px; }
  .folder__name { font-size: 13px; }
  .scoreboard { grid-template-columns: repeat(3, 1fr); }
  .doc { width: 30%; min-width: 78px; }
}
@media (max-height: 700px) {
  .plaque__sub { display: none; }
  .wordmark { font-size: clamp(21px, 6.2vw, 34px); }
}
@media (max-width: 600px) {
  .tray { grid-template-columns: auto 1fr; }
  .tray__note { display: none; }
}
