:root {
  --bg: #0a0d26;
  --panel: #05061a;
  --ink: #eef0ff;
  --muted: #a3a9e0;
  --frame: #c7cbf5;
  --frame-dark: #3b4080;
  --dark: #06081a;
  --cyan: #22e6f0;
  --yellow: #f5e43a;
  --purple: #b04cff;
  --green: #3be36b;
  --red: #ff4d4d;
  --blue: #3560f0;
  --orange: #ffa31a;
  --pixel: 'Press Start 2P', ui-monospace, monospace;
  --mono: 'VT323', ui-monospace, monospace;
  --bevel: inset 3px 3px 0 rgba(255, 255, 255, 0.45), inset -3px -3px 0 rgba(0, 0, 0, 0.35);
  color-scheme: dark;
}

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

body {
  margin: 0;
  min-height: 100dvh;
  color: var(--ink);
  font: 22px/1.15 var(--mono);
  background:
    linear-gradient(rgba(90, 110, 255, 0.06) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, rgba(90, 110, 255, 0.06) 1px, transparent 1px) 0 0 / 32px 32px,
    radial-gradient(ellipse at 50% 0%, #1a1f5c 0%, var(--bg) 60%) fixed,
    var(--bg);
}

/* CRT scanlines + vignette */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.5));
}

button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

/* ---------- header ---------- */
.top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px 16px 12px;
}

.title {
  display: flex;
  gap: 0.6em;
  margin: 0;
  font: 400 clamp(11px, 1.5vw, 21px)/1 var(--pixel);
}

.title .word { display: flex; gap: 3px; }

.title .l {
  display: grid;
  place-items: center;
  width: 1.65em;
  height: 1.65em;
  padding-top: 0.1em;
  color: var(--fg);
  background: var(--c);
  box-shadow: inset 0.2em 0.2em 0 rgba(255, 255, 255, 0.5), inset -0.2em -0.2em 0 rgba(0, 0, 0, 0.35);
}

.live {
  position: absolute;
  right: 16px;
  z-index: 31; /* above the CRT vignette, which would dim it below readable contrast */
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font: 10px var(--pixel);
  color: var(--muted);
}

.live .dot { width: 10px; height: 10px; background: var(--muted); }
.live[data-state='live'] { color: var(--green); }
.live[data-state='live'] .dot { background: var(--green); box-shadow: 0 0 8px var(--green); animation: blink 1.4s steps(2) infinite; }
.live[data-state='offline'] { color: var(--red); }
.live[data-state='offline'] .dot { background: var(--red); }

/* ---------- layout ---------- */
.game {
  display: grid;
  grid-template-columns: minmax(200px, 270px) auto minmax(200px, 270px);
  gap: 28px;
  justify-content: center;
  align-items: start;
  padding: 6px 16px 20px;
}

.hud { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; padding-top: 10px; } /* a long name ellipsizes */

.box {
  position: relative;
  padding: 20px 14px 14px;
  background: var(--panel);
  border: 3px solid var(--frame);
  box-shadow: 0 0 0 3px var(--frame-dark), 6px 6px 0 3px rgba(0, 0, 0, 0.55);
}

.box > h2,
.stat h2 {
  margin: 0;
  font: 10px/1 var(--pixel);
  letter-spacing: 1px;
  color: var(--cyan);
}

.box > h2 {
  position: absolute;
  top: -8px;
  left: 10px;
  padding: 0 6px;
  background: var(--panel);
}

.small { margin: 6px 0 0; font-size: 18px; color: var(--muted); text-align: center; }

/* ---------- day picker ---------- */
.day-nav { display: flex; align-items: center; gap: 8px; }

.arrow,
.btn {
  border: 0;
  cursor: pointer;
  font-family: var(--pixel);
  color: var(--dark);
  background: var(--cyan);
  box-shadow: var(--bevel);
}

.arrow { flex: none; width: 40px; height: 40px; font-size: 14px; }
.arrow:disabled { cursor: not-allowed; background: #2a2e5a; color: #6b70a8; box-shadow: none; }
.arrow:not(:disabled):active, .btn:active { box-shadow: inset -3px -3px 0 rgba(255, 255, 255, 0.4), inset 3px 3px 0 rgba(0, 0, 0, 0.35); }

.day-now { flex: 1; margin: 0; text-align: center; }
#dayName { display: block; font: clamp(10px, 1.05vw, 13px)/1.4 var(--pixel); white-space: nowrap; }
.day-status { display: block; font-size: 22px; color: var(--green); }
.day-status[data-kind='past'] { color: var(--yellow); }
.day-status[data-kind='past']::before { content: '\1F512\FE0E  '; }

.jump {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  font: 9px var(--pixel);
  color: var(--muted);
}

.jump input {
  min-width: 0;
  padding: 2px 6px;
  font: 20px var(--mono);
  color: var(--ink);
  background: #0d1033;
  border: 2px solid #2b3070;
  cursor: pointer;
}

.jump input:hover { border-color: var(--cyan); }
.jump .cal { display: none; }

/* week board: one row per day, its bar filling up like a Tetris line */
.week { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.week li { display: grid; }

.week-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin: 14px 0 8px;
  flex-wrap: wrap;
  font: 400 10px/1 var(--pixel);
  letter-spacing: 1px;
  white-space: nowrap;
  color: var(--cyan);
}

#dropShort { font-size: 8px; letter-spacing: 0; color: var(--orange); }

.dayb {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: 'wd dt cnt' 'bar bar me';
  align-items: center;
  gap: 4px 8px;
  width: 100%;
  padding: 5px 9px;
  line-height: 1;
  text-align: left;
  cursor: pointer;
  background: #0d1033;
  border: 2px solid #2b3070;
}

.dayb:not(:disabled):hover { border-color: var(--cyan); }
.dayb[aria-pressed='true'] { background: #1c2160; border-color: var(--yellow); box-shadow: inset 0 0 0 2px var(--yellow); }
.dayb .wd { grid-area: wd; font: 8px var(--pixel); color: var(--yellow); }
.dayb .dt { grid-area: dt; font-size: 21px; }
.dayb .cnt { grid-area: cnt; font-size: 18px; color: var(--green); }
.dayb .cnt.full { color: var(--red); }
.dayb .me { grid-area: me; min-width: 3.2ch; min-height: 1em; font-size: 18px; color: var(--yellow); text-align: right; }
.dayb .me:not(:empty)::before { content: '\2605'; }
.bar { grid-area: bar; display: grid; grid-template-columns: repeat(19, 1fr); gap: 2px; height: 8px; }
.bar i { background: #1b1f48; }
.bar i.on { background: var(--c); box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.5), inset -1px -1px 0 rgba(0, 0, 0, 0.4); }

/* past days: one grey line of history; not dropped yet: a locked "?" block */
.dayb.past { grid-template-columns: auto 1fr auto auto; grid-template-areas: 'wd dt cnt me'; background: #0a0c24; border-style: dotted; }
.dayb.past :is(.wd, .dt, .cnt, .me) { color: #8d92c0; }
.dayb.past .bar { display: none; }
.dayb.past .me { min-width: 0; }
.dayb:disabled { grid-template-areas: 'wd dt cnt'; cursor: not-allowed; color: #6b70a8; background: transparent; border-style: dashed; }
.dayb:disabled .wd { color: #6b70a8; }
.dayb:disabled .cnt { padding: 3px 7px 1px; font: 11px var(--pixel); color: var(--dark); background: var(--purple); box-shadow: var(--bevel); }
.dayb:disabled :is(.bar, .me) { display: none; }

/* ---------- floor plan ---------- */
.floor {
  position: relative;
  /* fit the screen height, and leave room for both HUD columns (2 x 200px + gaps + scrollbar) */
  width: max(300px, min(calc((100dvh - 92px) * 554 / 843), calc(100vw - 540px), 640px));
  aspect-ratio: 554 / 843;
  container-type: inline-size;
  filter: drop-shadow(0 0 18px rgba(53, 96, 240, 0.35));
}

.plan { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.plan .floor-bg { fill: #060819; }
.plan .grid-line { fill: none; stroke: rgba(110, 130, 255, 0.13); stroke-width: 1; }
.plan .block-dark { fill: #474c86; }
.plan .block-light { fill: #d4d7ff; }
.plan .block-face { fill: #8d93d4; }
.plan .window { fill: #9ff0ff; stroke: #1a7fa0; stroke-width: 1; }
.plan .glint { stroke: #fff; stroke-width: 1.5; opacity: 0.85; }
.plan .door { stroke: var(--orange); stroke-width: 5; }
.plan .door-swing { fill: rgba(255, 163, 26, 0.08); stroke: var(--orange); stroke-width: 1.5; stroke-dasharray: 4 4; }
.plan .room-label { font: 11px var(--pixel); fill: #8d93d4; }
.floor.locked .plan { filter: grayscale(0.85) brightness(0.8); }

.desk {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5cqw;
  padding: 0 0.8cqw;
  overflow: hidden;
  cursor: pointer;
  border: 0;
  font-family: var(--mono);
  line-height: 0.85;
  touch-action: manipulation;
}

.desk .id { font-size: 3cqw; }
.desk .who { max-width: 100%; overflow: hidden; font-size: 4.5cqw; line-height: 1.1; white-space: nowrap; text-overflow: ellipsis; } /* room for accents */
.desk .who.long { font-size: 3.4cqw; }

.desk.free {
  color: #c9f9ff;
  background: rgba(34, 230, 240, 0.07);
  border: 0.5cqw dashed rgba(150, 240, 255, 0.7);
}

.desk.free .who { color: var(--green); }
.desk.free:not(.past):hover { background: rgba(34, 230, 240, 0.25); border-style: solid; }

.desk.taken {
  color: var(--fg);
  background: var(--c);
  box-shadow: inset 1cqw 1cqw 0 rgba(255, 255, 255, 0.45), inset -1cqw -1cqw 0 rgba(0, 0, 0, 0.35);
}

.desk.mine {
  z-index: 1;
  box-shadow:
    inset 1cqw 1cqw 0 rgba(255, 255, 255, 0.45),
    inset -1cqw -1cqw 0 rgba(0, 0, 0, 0.35),
    0 0 0 0.7cqw #fff,
    0 0 3cqw 1cqw var(--c);
}

.desk.mine .id { font-weight: 700; }
.desk.armed { --c: var(--red) !important; --fg: var(--dark) !important; animation: blink 0.5s steps(2) infinite; }
.desk.busy { animation: pulse 0.4s ease-in-out infinite alternate; }

/* past days: grey "garbage" blocks */
.desk.past { cursor: not-allowed; }
.desk.past.taken {
  --c: #8e91a8 !important;
  --fg: var(--dark) !important;
  background-image:
    linear-gradient(45deg, rgba(0, 0, 0, 0.13) 25%, transparent 25% 75%, rgba(0, 0, 0, 0.13) 75%),
    linear-gradient(45deg, rgba(0, 0, 0, 0.13) 25%, transparent 25% 75%, rgba(0, 0, 0, 0.13) 75%);
  background-position: 0 0, 1.5cqw 1.5cqw;
  background-size: 3cqw 3cqw;
}

.desk.past.mine { box-shadow: inset 1cqw 1cqw 0 rgba(255, 255, 255, 0.45), inset -1cqw -1cqw 0 rgba(0, 0, 0, 0.35), 0 0 0 0.6cqw #c9ccdf; }
.desk.past.free { color: #8d92c0; background: transparent; border: 0.4cqw dotted rgba(160, 165, 210, 0.45); }
.desk.past.free .who { color: #8d92c0; }
.desk:focus-visible { z-index: 2; outline: 0.8cqw solid var(--yellow); outline-offset: 0.6cqw; }

/* past days: a red rubber stamp in Office B's empty corridor (top is set from layout.js) */
.stamp {
  position: absolute;
  left: 50%;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 2cqw;
  margin: 0;
  padding: 2.6cqw 4cqw 2.2cqw;
  transform: translate(-50%, -50%) rotate(-7deg);
  font-family: var(--pixel);
  white-space: nowrap;
  color: var(--red);
  background: rgba(6, 8, 26, 0.88);
  border: 1cqw solid var(--red);
  box-shadow: 0 0 0 0.6cqw var(--dark), 0 0 4cqw rgba(255, 77, 77, 0.35);
  pointer-events: none;
}

.stamp-big { display: flex; align-items: center; gap: 2.4cqw; font-size: 7cqw; line-height: 1; }
.stamp-big svg { width: 5.6cqw; fill: currentColor; }
.stamp-small { font-size: 2.4cqw; }

/* LINE CLEAR! / TETRIS! (placed by app.js in empty floor space) */
.pop {
  position: absolute;
  z-index: 3;
  margin: 0;
  font: 4.4cqw/1 var(--pixel);
  white-space: nowrap;
  color: #fff;
  text-shadow: 0.6cqw 0.6cqw 0 #000, 0 0 2.4cqw var(--yellow);
  pointer-events: none;
}

.pop.big {
  padding: 2.4cqw 3.6cqw 2cqw;
  font-size: 9cqw;
  color: var(--yellow);
  text-shadow: 0.8cqw 0.8cqw 0 var(--red);
  background: var(--dark);
  border: 1cqw solid var(--yellow);
  box-shadow: var(--bevel), 0 0 0 0.6cqw var(--dark), 0 0 6cqw var(--yellow);
}

/* who sits at a booked desk: name and email (placed above the desk by app.js) */
.tip {
  position: absolute;
  z-index: 4;
  display: grid;
  max-width: 80%;
  margin: 0;
  padding: 5px 10px 4px;
  line-height: 1;
  white-space: nowrap;
  background: var(--panel);
  border: 3px solid var(--c);
  box-shadow: 0 0 0 2px var(--dark), 5px 5px 0 2px rgba(0, 0, 0, 0.55);
  transform: translateY(calc(-100% - 6px));
  pointer-events: none;
}

.tip span { overflow: hidden; text-overflow: ellipsis; }
#tipName { font-size: 26px; }
#tipEmail { font-size: 18px; color: var(--cyan); }

/* ---------- signed out: the dimmed floor under a PRESS START panel ---------- */
.well { position: relative; }
.out .hud { visibility: hidden; }
.out .live { display: none; }
.out .floor { filter: brightness(0.4) grayscale(0.5); }

.start {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 31; /* above the CRT overlay, so Google's button shows exactly as Google specifies */
  display: grid;
  justify-items: center;
  gap: 16px;
  width: min(92%, 360px);
  padding: 28px 20px 24px;
  text-align: center;
  background: var(--panel);
  border: 3px solid var(--frame);
  box-shadow: 0 0 0 3px var(--frame-dark), 8px 8px 0 3px rgba(0, 0, 0, 0.6);
  transform: translate(-50%, -50%);
}

.start h2 { margin: 0; font: 20px var(--pixel); color: var(--yellow); text-shadow: 3px 3px 0 var(--red); animation: blink 0.8s steps(2) 3; }
.start p { margin: 0; }
.start .err { color: var(--red); }

/* Google's "Sign in with Google" button, light theme, as its branding guidelines specify */
.gsi {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  font: 500 14px/20px Roboto, Arial, sans-serif;
  letter-spacing: 0.25px;
  color: #1f1f1f;
  text-decoration: none;
  background: #fff;
  border: 1px solid #747775;
  border-radius: 4px;
}

.gsi:hover { background: #eee; }
.gsi svg { width: 20px; height: 20px; }

.dev { display: grid; gap: 10px; width: 100%; }
.dev input { width: 100%; padding: 4px 10px; font: 24px var(--mono); color: var(--green); background: #000; border: 3px solid var(--cyan); }

/* ---------- right HUD ---------- */
.player { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0; }
#playerName { overflow: hidden; font-size: 30px; white-space: nowrap; text-overflow: ellipsis; color: var(--green); }
.player-email { margin: 2px 0 0; overflow: hidden; font-size: 18px; white-space: nowrap; text-overflow: ellipsis; color: var(--muted); }
#signOut { position: absolute; top: -12px; right: 10px; background: var(--panel); } /* on the frame, like the box title */

.link {
  flex: none;
  padding: 4px 6px;
  cursor: pointer;
  font: 9px var(--pixel);
  color: var(--cyan);
  background: none;
  border: 2px solid var(--frame-dark);
}

.link:hover { border-color: var(--cyan); }

.drop { display: flex; align-items: center; justify-content: center; gap: 16px; padding-top: 4px; }
.drop-in { margin: 0; font: 14px var(--pixel); white-space: nowrap; color: var(--yellow); }

.piece {
  display: grid;
  grid-template-columns: repeat(2, 22px);
  grid-template-rows: repeat(2, 22px);
  gap: 2px;
}

.piece i { background: var(--yellow); box-shadow: var(--bevel); }
.piece.unknown i { background: #3a3f70; box-shadow: inset 0 0 0 2px #5a5f99; }

.stats-box { display: grid; gap: 16px; }
.num { margin: 6px 0 0; font: 20px var(--pixel); }
#statFree { color: var(--green); }
#statMine { color: var(--yellow); }

.legend { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; font-size: 20px; }
.legend li { display: flex; align-items: center; gap: 10px; }
.sw { display: grid; place-items: center; flex: none; width: 34px; height: 20px; font-size: 14px; font-style: normal; color: var(--dark); }
.sw-free { border: 2px dashed rgba(150, 240, 255, 0.8); background: rgba(34, 230, 240, 0.1); }
.sw-taken { background: var(--purple); box-shadow: var(--bevel); }
.sw-mine { background: var(--yellow); box-shadow: var(--bevel), 0 0 0 2px #fff; }
.sw-past { background: #8e91a8 repeating-linear-gradient(45deg, rgba(0, 0, 0, 0.18) 0 3px, transparent 3px 6px); }

/* ---------- toast + dialog ---------- */
.toast {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: 31; /* above the CRT overlay */
  width: max-content;
  max-width: min(92vw, 560px);
  margin: 0;
  padding: 12px 18px;
  font-size: 24px;
  overflow-wrap: anywhere; /* long email addresses wrap on phones */
  background: var(--panel);
  border: 3px solid var(--tc, var(--cyan));
  box-shadow: 0 0 0 3px var(--dark), 6px 6px 0 3px rgba(0, 0, 0, 0.6);
  pointer-events: none; /* taps reach the desks underneath */
  /* parked below the screen, not visibility:hidden, so screen readers always know the live region */
  opacity: 0; /* and transparent there: renders past the viewport (full-page captures) would show an empty box */
  transform: translate(-50%, calc(100% + 30px));
  transition: transform 0.2s steps(4), opacity 0s 0.2s;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); transition: transform 0.2s steps(4); }
.toast[data-kind='ok'] { --tc: var(--green); }
.toast[data-kind='warn'] { --tc: var(--yellow); }
.toast[data-kind='error'] { --tc: var(--red); }

.name-dialog {
  width: min(92vw, 440px);
  padding: 26px 24px 22px;
  color: var(--ink);
  background: var(--panel);
  border: 3px solid var(--frame);
  box-shadow: 0 0 0 3px var(--frame-dark), 8px 8px 0 3px rgba(0, 0, 0, 0.6);
}

.name-dialog::backdrop { background: rgba(5, 6, 26, 0.82); }
.name-dialog h2 { margin: 0 0 14px; font: 18px var(--pixel); color: var(--yellow); text-shadow: 3px 3px 0 var(--red); }
.name-dialog p { margin: 0 0 14px; }

.name-dialog input {
  width: 100%;
  padding: 6px 12px;
  font: 32px var(--mono);
  color: var(--green);
  caret-color: var(--green);
  background: #000;
  border: 3px solid var(--cyan);
}

.name-dialog .err { min-height: 1.2em; margin: 8px 0 6px; color: var(--red); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { padding: 13px 16px; font-size: 12px; background: var(--green); }
.btn.ghost { color: var(--ink); background: transparent; box-shadow: inset 0 0 0 2px var(--frame); }

/* ---------- animation ---------- */
@keyframes blink { 50% { opacity: 0.35; } }
@keyframes pulse { to { filter: brightness(1.8); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- short laptop screens: tighter HUDs, so they fit beside the floor ---------- */
@media (min-width: 900px) and (max-height: 820px) {
  .hud { gap: 18px; }
  .box { padding: 16px 12px 10px; }
  .week { gap: 4px; }
  .week-title { margin: 10px 0 6px; }
  .dayb { gap: 2px 8px; padding: 3px 9px; }
  .dayb .dt { font-size: 18px; }
  .dayb :is(.cnt, .me) { font-size: 16px; }
  .stats-box { gap: 8px; }
  .legend { gap: 4px; }
}

/* ---------- phones & narrow tablets: one column ---------- */
@media (max-width: 899px) {
  .top { justify-content: space-between; gap: 10px; padding: 10px 8px 4px; }
  .title { gap: 0.5em; font-size: clamp(8px, 2.9vw, 18px); }
  .title .word { gap: 2px; }
  .live { position: static; flex: none; }
  /* minmax(0, ...) keeps a long player name from widening the page */
  .game { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 8px 8px 96px; }
  .hud { display: contents; }
  .game > *, .hud > * { grid-column: 1 / -1; }
  .week-box { order: 1; }
  .day-box { order: 2; }
  .well { order: 3; }
  .stats-box { order: 4; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
  .player-box { order: 5; grid-column: 1; }
  .next-box { order: 5; grid-column: 2; min-width: 88px; } /* wide enough for its NEXT label */
  .help-box { order: 6; }
  .box { padding: 16px 10px 10px; }
  .next-box .small { display: none; }
  .drop { gap: 10px; }
  .drop-in { font-size: 10px; }
  .piece { grid-template-columns: repeat(2, 14px); grid-template-rows: repeat(2, 14px); }
  .floor { width: 100%; max-width: 560px; margin: 0 auto; }
  .num { font-size: 16px; }
  .toast { bottom: 8px; padding: 6px 12px; font-size: 19px; }
  .out .hud { display: none; }
  #signOut { position: static; display: block; margin: 8px 0 0 auto; } /* the half-width box has no room on its frame */
  .stat h2 { font-size: 8px; }

  /* one row right above the floor: ◀ day ▶ plus a calendar button for history */
  .day-box { display: flex; align-items: center; gap: 8px; padding: 10px 8px 6px; }
  .day-nav { display: contents; }
  #prevDay { order: 1; }
  .day-now { order: 2; }
  #nextDay { order: 4; }
  #dayName { font-size: 12px; }
  .day-status { font-size: 20px; line-height: 1; }
  .jump { order: 3; position: relative; flex: none; width: 40px; height: 40px; margin: 0; justify-content: center; background: #0d1033; border: 2px solid #2b3070; }
  .jump:focus-within { outline: 3px solid var(--yellow); outline-offset: 3px; }
  .jump-text { display: none; }
  .jump .cal { display: block; width: 20px; fill: var(--cyan); }
  .jump input { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; opacity: 0; }

  /* compact tiles: "MON 12" over the free count, or over your desk when you have one that day */
  .week { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
  .week-title { margin: 8px 0 5px; }
  .dayb,
  .dayb.past,
  .dayb:disabled { grid-template-columns: auto auto; grid-template-areas: 'wd dt' 'cnt cnt'; justify-content: center; justify-items: center; align-items: baseline; gap: 2px 4px; padding: 4px 0 3px; line-height: 0.9; }
  .dayb .wd { grid-area: wd; font-size: 7px; }
  .dayb .dt { grid-area: dt; font-size: 20px; }
  .dayb .cnt, .dayb .me { grid-area: cnt; min-width: 0; min-height: 0; font-size: 16px; white-space: nowrap; }
  .dayb:has(.me:not(:empty)) .cnt, .dayb .mon, .bar { display: none; }
  .dayb:disabled .cnt { padding: 3px 5px 2px; font-size: 9px; }
}

/* ---------- Windows High Contrast: colours and box-shadows are replaced, so mark state with outlines ---------- */
@media (forced-colors: active) {
  .dayb[aria-pressed='true']:not(:focus-visible) { outline: 3px solid Highlight; outline-offset: -6px; }
  .desk.taken { border: 2px solid ButtonText; }
}
