/* DOC CONTROL SIMULATOR
 *
 * A beige workstation on a bright desk: CRT monitor, keyboard under it, and a
 * mid-90s Outlook on the glass. The arcade lives in the furniture around the
 * machine — heavy display type with hard offset shadows, an amber LCD
 * scoreboard, a comic starburst — not in the desktop, which stays period-honest
 * so the two subject lines read instantly.
 *
 * Everything is drawn with flat fills and hard shadows; no glow, no blur.
 */

:root {
  --paper:   #f3ede1;   /* the page: warm manila */
  --wall:    #e8e0cf;
  --desk:    #dcc4a0;   /* pale beech: the room stays light overall */
  --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 */
  --amber: #f0a500;
  --teal:  #0f7b6c;

  --wel: #14508c;       /* the two mail types, high contrast on white */
  --ifs: #b3126b;

  /* period Windows chrome */
  --w-face: #d4d0c8;
  --w-hi:   #ffffff;
  --w-lo:   #808080;
  --w-dk:   #000000;
  --w-bar1: #000e80;
  --w-bar2: #1084d0;

  --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);
  /* a solid fallback under the gradients, so the room is light even if they
     never paint */
  background-color: var(--paper);
  background-image:
    /* the faint grid of a cutting mat on the desk surface */
    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 -- */

/* A pressed-tin door sign, not a backlit marquee: flat plate, hard shadow. */
.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 {           /* halftone corner, purely decorative */
  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); }
.plaque__sub {
  margin: 10px 0 0; font-size: clamp(8px, 2vw, 10px);
  letter-spacing: .26em; color: var(--ink2);
}

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

/* Four amber LCD windows bolted to the desk. */
.scoreboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.readout {
  min-width: 0; padding: 5px 9px 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: 8px; letter-spacing: .2em; color: #6f7a5e;
}
.readout b {
  display: block; margin-top: 1px;
  font-size: clamp(14px, 3.6vw, 21px); 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--streak b.is-hot { animation: streakpop .28s ease-out; }
@keyframes streakpop { 0% { transform: scale(1.4); } 100% { transform: scale(1); } }

/* -------------------------------------------------------------- the tray --- */

/* A physical paper in-tray filling up, not a countdown bar. */
.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);
}

/* ---------------------------------------------------------------- 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: 58dvh;
  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 outlook window -- */

/* Period Windows: 1px bevels, no radius, no gradients except the title bar. */
.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);
  color: var(--ink);
}
/* The gap belongs between menu items, not between a hotkey and its word —
   `margin` on the <u> renders "F ile E dit". */
.win__menu span { margin-right: 12px; }
.win__menu u { text-decoration: underline; }

.win__ribbon {
  display: flex; gap: 6px; padding: 5px;
  border-bottom: 2px solid var(--w-lo);
}
.act {
  flex: 1 1 0; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 5px 6px;
  font-family: var(--mono); font-weight: 700;
  font-size: clamp(7px, 1.45vw, 10px); letter-spacing: .06em;
  cursor: pointer; touch-action: manipulation; user-select: none;
  background: var(--w-face); color: var(--ink);
  border: 2px solid; border-color: var(--w-hi) var(--w-dk) var(--w-dk) var(--w-hi);
}
.act span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act kbd {
  flex: 0 0 auto;
  font-family: var(--mono); font-size: clamp(8px, 1.6vw, 11px); font-weight: 900;
  padding: 1px 5px; color: #fff;
  border: 1px solid var(--w-dk);
}
.act--wel { border-bottom-color: var(--wel); }
.act--wel kbd { background: var(--wel); }
.act--ifs { border-bottom-color: var(--ifs); }
.act--ifs kbd { background: var(--ifs); }
.act:active, .act.is-hit {
  border-color: var(--w-dk) var(--w-hi) var(--w-hi) var(--w-dk);
}
.act.is-hit { animation: acthit .18s steps(2) 1; }
@keyframes acthit { 0% { background: var(--amber); } }

.win__body {
  flex: 1 1 auto; min-height: 0;
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 152px;
}

.rail {
  min-width: 0; padding: 5px 6px;
  background: var(--w-face);
  border-right: 2px solid var(--w-lo);
  font-size: clamp(7px, 1.3vw, 9px);
  color: var(--ink);
}
.rail__head { margin: 0 0 5px; color: var(--w-lo); }
.rail__list { list-style: none; margin: 0; padding: 0; }
.rail__list li {
  display: flex; justify-content: space-between; gap: 4px;
  padding: 2px 4px; overflow: hidden; white-space: nowrap;
}
.rail__list li.is-on { background: var(--w-bar1); color: #fff; }
.rail__list b { font-weight: 700; }

.listwrap {
  min-width: 0; display: flex; flex-direction: column;
  background: #fff; position: relative;
  border: 2px solid; border-color: var(--w-dk) var(--w-hi) var(--w-hi) var(--w-dk);
}
.listwrap__head {
  display: grid; grid-template-columns: 62px minmax(0, 1fr) 34px; gap: 6px;
  padding: 2px 6px 2px 16px;
  background: var(--w-face);
  border-bottom: 1px solid var(--w-lo);
  color: var(--ink); font-size: 8px; letter-spacing: .06em;
}
.mail {
  flex: 1 1 auto; min-height: 0;
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden;
}
/* One eighth each, so a full inbox fills the list exactly and the visible fill
   level always agrees with the IN-TRAY gauge. Keep the divisor in step with
   CAPACITY in app.js. */
.mail li {
  flex: 0 0 12.5%;
  display: grid; grid-template-columns: 10px 62px minmax(0, 1fr) 34px; gap: 6px;
  align-items: center;
  padding: 0 6px;
  border-bottom: 1px solid #e3e3e3;
  border-left: 5px solid transparent;
  color: var(--ink);
  animation: slidein .18s ease-out 1;
}
@keyframes slidein { from { opacity: 0; transform: translateY(-7px); } }
.mail li.type-wel { border-left-color: var(--wel); }
.mail li.type-ifs { border-left-color: var(--ifs); }
.mail__mark { color: transparent; font-size: 9px; }
.mail__from { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink2); }
.mail__subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.mail li.type-wel .mail__subj { color: var(--wel); }
.mail li.type-ifs .mail__subj { color: var(--ifs); }
.mail__time { font-size: 8px; color: var(--ink2); text-align: right; }
.mail li.is-target {
  background: #fff4c2;
  box-shadow: inset 0 0 0 2px var(--ink);
}
.mail li.is-target .mail__mark { color: var(--ink); }
.mail__empty {
  position: absolute; inset: auto 0 42% 0; margin: 0;
  text-align: center; color: #9a9a9a; font-size: 9px; letter-spacing: .18em;
}
.mail__empty[hidden] { display: none; }

.read {
  min-width: 0; padding: 6px 8px;
  background: #fff;
  border: 2px solid; border-color: var(--w-dk) var(--w-hi) var(--w-hi) var(--w-dk);
  display: flex; flex-direction: column; gap: 5px; overflow: hidden;
}
.read__idle { margin: 0; color: #9a9a9a; font-size: 9px; }
.read__label { margin: 0; font-size: 7px; letter-spacing: .16em; color: var(--ink2); }
.read__subj {
  margin: 0; font-size: clamp(9px, 1.85vw, 12px); font-weight: 800; line-height: 1.25;
}
.read[data-type="wel"] .read__subj { color: var(--wel); }
.read[data-type="ifs"] .read__subj { color: var(--ifs); }
.read__meta { margin: 0; font-size: 8px; line-height: 1.55; color: var(--ink2); }
.read__key {
  margin: auto 0 0; padding: 4px; text-align: center;
  font-size: 9px; font-weight: 700; letter-spacing: .1em;
  color: #fff; background: var(--ink);
}
.read[data-type="wel"] .read__key { background: var(--wel); }
.read[data-type="ifs"] .read__key { background: var(--ifs); }

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

/* --------------------------------------------------------------- keyboard -- */

.keyboard {
  width: min(100%, 560px);
  margin-top: 16px;
  padding: 9px 10px 11px;
  background: linear-gradient(180deg, var(--case-hi), var(--case) 40%, var(--case-dk));
  border: 3px solid var(--ink);
  border-radius: 6px;
  box-shadow: 6px 6px 0 rgba(32,33,31,.42), inset 0 2px 0 rgba(255,255,255,.75);
  /* sat back on the desk behind the monitor's foot */
  transform: perspective(520px) rotateX(9deg);
}
.keyboard__rows { display: flex; flex-direction: column; gap: 4px; }
.krow { display: flex; gap: 4px; }

.key {
  flex: 1 1 0; min-width: 0;
  height: 22px;
  display: grid; place-items: center;
  font-family: var(--mono); font-size: 9px; font-weight: 700; line-height: 1;
  color: var(--ink2);
  background: linear-gradient(180deg, #fbf7ec, var(--case));
  border: 1.5px solid var(--case-sh);
  border-radius: 3px;
  box-shadow: 0 2px 0 var(--case-sh);
  user-select: none;
}
.key--wide { flex: 1.7 1 0; }
.key--space { flex: 6 1 0; }

.key--act {
  flex: 1 1 0;
  cursor: pointer; touch-action: manipulation;
  font-family: var(--mono);
  color: #fff;
  border: 2px solid var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}
.key--act .key__cap { font-size: 12px; font-weight: 900; }
.key__hint { display: none; }
.key--wel { background: linear-gradient(180deg, #2f74b8, var(--wel)); }
.key--ifs { background: linear-gradient(180deg, #d94a92, var(--ifs)); }
.key--act:active, .key--act.is-hit { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.key--act.is-hit { animation: keyhit .18s steps(2) 1; }
@keyframes keyhit { 0% { filter: brightness(1.8); } }

/* --------------------------------------------------------------- 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; }

/* The panels arrive as a printed sheet dropped on the screen. */
.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; }

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

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

/* A comic "spiky balloon": two stacked star polygons, the outer one showing
   through as the outline. --spikes is shared so they stay concentric. */
.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 fatal keypress */
.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, .mail li, .tray__track i[data-low="1"],
  .rig.is-wrong, .readout b { animation: none; }
}

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

/* A sheet on a clipboard. */
.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 --- */

/* The reading pane goes first — the list carries the same subject, and the list
   is what you actually read under time pressure. */
@media (max-width: 700px) {
  .win__body { grid-template-columns: 84px minmax(0, 1fr); }
  .read { display: none; }
}
@media (max-width: 560px) {
  .win__body { grid-template-columns: minmax(0, 1fr); }
  .rail { display: none; }
  .win__menu { display: none; }
}

/* Without a hover-capable pointer the decorative keys are unusable targets, so
   the keyboard collapses to the only two keys that do anything. */
@media (hover: none), (max-width: 560px) {
  .keyboard { transform: none; width: 100%; }
  .krow--deco, .krow__hide { display: none; }
  .krow--home { gap: 10px; }
  .key--act { height: 54px; flex-direction: row; gap: 8px; }
  .key__hint { display: inline; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
  .key--act .key__cap {
    font-size: 15px; padding: 2px 8px;
    background: rgba(0,0,0,.32); border: 1px solid rgba(255,255,255,.5);
  }
}

@media (max-height: 700px) {
  .plaque__sub, .rules { display: none; }
  .wordmark { font-size: clamp(21px, 6.2vw, 34px); }
}
@media (max-width: 600px) {
  .rules { display: none; }
  .tray { grid-template-columns: auto 1fr; }
  .tray__note { display: none; }
}
