/* IRD Shop Labor kiosk: built for gloves, distance and bright shop light. */
/* IRD's display face (headings, tabs, buttons), as on irdgroup.com. Running text stays Segoe UI. */
@font-face { font-family: "Saira"; src: url("/static/fonts/saira-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Saira"; src: url("/static/fonts/saira-600.woff2") format("woff2"); font-weight: 600 800; font-display: swap; }
:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --ink: #111a24;
  --muted: #566170;
  --line: #d3d9e0;
  --brand: #1b2a4b;
  --brand-ink: #ffffff;
  --gold: #cbae6b;
  --primary: #1b2a4b;
  --primary-press: #111c35;
  --go: #12804a;
  --go-press: #0d6639;
  --go-soft: #e3f4ea;
  --warn: #b86e00;
  --warn-press: #935800;
  --warn-soft: #fff3d9;
  --warn-ink: #6b4200;
  --stop-soft: #fde8e6;
  --stop-ink: #8a1c14;
  --dark: #26313d;
  --dark-press: #18202a;
  --key: #ffffff;
  --key-press: #dfe5ec;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(17, 26, 36, .08), 0 2px 8px rgba(17, 26, 36, .06);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
/* Phones and tablets: the height actually showing, without the browser's own bars. */
@supports (height: 100dvh) { html, body { height: 100dvh; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
button { font: inherit; color: inherit; touch-action: manipulation; cursor: pointer; }
h1, .btn, .pill, .wl-tabs button, .brand span { font-family: "Saira", "Segoe UI", system-ui, Arial, sans-serif; }
h1 { font-weight: 600; letter-spacing: -.005em; }

/* ------------------------------------------------------------ header and footer */
.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 24px;
  background: var(--brand);
  color: var(--brand-ink);
  border-bottom: 4px solid var(--gold);
  flex: 0 0 auto;
}
.brand {
  background: none;
  border: 0;
  padding: 2px 0;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand img { height: 46px; width: auto; display: block; }
.brand span { font-size: 22px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--gold); padding-left: 16px; border-left: 1px solid rgba(255, 255, 255, .25); }
.brand .chip { color: #3a2600; border-left: 0; padding: 3px 10px; margin-left: 0; font-size: 15px; font-weight: 800; letter-spacing: .08em; }
.clock { display: flex; align-items: baseline; gap: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
#time { font-size: 30px; font-weight: 700; }
#date { font-size: 17px; opacity: .8; }
.foot {
  flex: 0 0 auto;
  padding: 8px 24px;
  font-size: 15px;
  color: var(--muted);
  display: flex;
  justify-content: flex-end;
}
.foot .stale { color: var(--warn-ink); font-weight: 600; }

/* ------------------------------------------------------------ screens */
#screen {
  flex: 1 1 auto;
  min-height: 0;
  padding: 24px clamp(16px, 3vw, 40px);
  display: flex;
  overflow: auto;
}
.split {
  margin: auto;
  width: 100%;
  max-width: 1180px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
}
.stack {
  margin: auto;
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
h1 {
  margin: 0;
  font-size: clamp(30px, 4.4vw, 46px);
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -.01em;
}
.lead { margin: 10px 0 0; font-size: clamp(19px, 2.2vw, 24px); color: var(--muted); line-height: 1.35; }

/* ------------------------------------------------------------ PIN */
.dots { display: flex; gap: 18px; margin: 28px 0 8px; min-height: 34px; }
.dot { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--ink); }
.dot.on { background: var(--ink); }
.dot.extra { width: 14px; height: 14px; margin-top: 8px; border: 0; background: var(--ink); }
.shake { animation: shake .35s; }
@keyframes shake {
  20%, 60% { transform: translateX(-10px); }
  40%, 80% { transform: translateX(10px); }
}

/* ------------------------------------------------------------ keypad */
.pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.key {
  min-height: clamp(66px, 10.5vh, 98px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--key);
  box-shadow: var(--shadow);
  font-size: clamp(30px, 4.4vh, 42px);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.key:active { background: var(--key-press); transform: translateY(1px); box-shadow: none; }
.key.fn { font-size: clamp(19px, 2.6vh, 24px); color: var(--muted); }
.key.dash { font-size: clamp(40px, 6vh, 56px); line-height: 1; }
.key.find {
  grid-column: span 2;
  background: var(--go);
  border-color: var(--go);
  color: #fff;
  font-size: clamp(24px, 3.4vh, 32px);
}
.key.find:active { background: var(--go-press); }
.key svg { width: 38px; height: 38px; }

/* ------------------------------------------------------------ code entry */
.display {
  margin-top: 22px;
  min-height: 92px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 3px solid var(--ink);
  padding: 10px 22px;
  display: flex;
  align-items: center;
  font-size: clamp(42px, 6vw, 64px);
  font-weight: 750;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  white-space: nowrap;
}
.display .ph { color: #a3acb7; font-weight: 500; letter-spacing: 0; font-size: .55em; }
.caret { display: inline-block; width: 4px; height: 1em; background: var(--primary); margin-left: 4px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.examples { list-style: none; padding: 0; margin: 16px 0 0; display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 17px; color: var(--muted); }
.examples b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ messages */
.msg { margin: 14px 0 0; font-size: 20px; min-height: 1.4em; }
.alert {
  margin-top: 16px;
  border-radius: var(--radius);
  padding: 16px 20px;
  font-size: 19px;
  line-height: 1.4;
  background: var(--stop-soft);
  color: var(--stop-ink);
  border: 1px solid #f3c2bd;
}
.alert.warn { background: var(--warn-soft); color: var(--warn-ink); border-color: #f0d49a; }
.alert b { display: block; font-size: 21px; margin-bottom: 4px; }

/* ------------------------------------------------------------ buttons */
.row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.btn {
  border: 0;
  border-radius: var(--radius);
  padding: 18px 26px;
  font-size: 21px;
  font-weight: 650;
  background: var(--surface);
  border: 2px solid var(--line);
  min-height: 64px;
}
.btn:active { transform: translateY(1px); }
.btn.big { min-height: clamp(84px, 12vh, 108px); font-size: clamp(24px, 3vw, 30px); width: 100%; border: 0; color: #fff; box-shadow: var(--shadow); }
.btn.primary { background: var(--primary); }
.btn.primary:active { background: var(--primary-press); }
.btn.go { background: var(--go); }
.btn.go:active { background: var(--go-press); }
.btn.warn { background: var(--warn); }
.btn.warn:active { background: var(--warn-press); }
.btn.dark { background: var(--dark); }
.btn.dark:active { background: var(--dark-press); }
.btn.ghost { background: transparent; }
.btn.ghost:active { background: var(--key-press); }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.actions .wide { grid-column: span 2; }
.cancel { align-self: center; }

/* Machine shop: the machines in place of Start, the planned one first. */
/* Up to 15 machines (5 across, 3 down) fit on one screen with the card and the way back. */
.machines { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.btn.big.mach { min-height: 64px; font-size: 22px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1.1; padding: 8px 14px; }
.btn.mach small { font-size: 14px; font-weight: 600; opacity: .9; }
.btn.big.plain { background: var(--surface); color: var(--ink); border: 2px solid var(--line); }
.work.compact { padding: 12px 22px; }
#screen[data-screen="machine"] .stack, #screen[data-screen="choose"] .stack:has(.machines) { gap: 12px; }
.work.compact .num { font-size: clamp(30px, 4vw, 40px); }
.work.compact .title { font-size: clamp(19px, 2.2vw, 23px); }

/* ------------------------------------------------------------ work cards */
.work {
  background: var(--surface);
  border-radius: var(--radius);
  border: 2px solid var(--line);
  padding: 22px 26px;
  box-shadow: var(--shadow);
  text-align: left;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 20px;
  align-items: center;
}
.work .kind { font-size: 17px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.work .num { font-size: clamp(38px, 5vw, 52px); font-weight: 800; line-height: 1.05; font-variant-numeric: tabular-nums; }
.work .title { font-size: clamp(21px, 2.6vw, 27px); font-weight: 600; line-height: 1.25; }
.work .detail { font-size: 18px; color: var(--muted); line-height: 1.35; }
.work .side { grid-row: 1 / span 4; grid-column: 2; }
.work .main { grid-column: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  min-height: 72px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--go);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}
button.work:active { border-color: var(--go); background: var(--go-soft); }
.work.current { border-color: var(--primary); border-width: 3px; }
.work.current .since { font-size: 20px; color: var(--ink); margin-top: 6px; }
.work.no { opacity: .75; box-shadow: none; cursor: default; }
.work.no .why { grid-column: 1 / -1; margin-top: 8px; font-size: 18px; color: var(--stop-ink); }
.helping-note {
  margin-top: 6px;
  font-size: 18px;
  font-weight: 600;
  color: var(--warn-ink);
  background: var(--warn-soft);
  border-radius: 8px;
  padding: 6px 10px;
  justify-self: start;
}
.options { display: flex; flex-direction: column; gap: 14px; }
/* Several matches: smaller cards, so they and the way back fit without scrolling. */
.options.many { gap: 10px; }
.options.many .work { padding: 14px 22px; }
.options.many .work .num { font-size: clamp(30px, 4vw, 40px); }
.options.many .work .title { font-size: clamp(19px, 2.2vw, 23px); }
.options.many .work .detail { font-size: 16px; }
.options.many .pill { min-height: 60px; min-width: 130px; }

/* Who is signed in, with a way out for whoever walks up next. */
.whobar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 6px 6px 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 18px;
  margin-bottom: 14px;
}
.btn.small { min-height: 48px; padding: 8px 16px; font-size: 18px; }
.hint { margin: 0; font-size: 18px; color: var(--muted); }
.done .whoname { font-size: 22px; font-weight: 600; color: var(--muted); }
.chip {
  display: inline-block;
  margin-left: 10px;
  padding: 3px 10px;
  border-radius: 6px;
  background: #f2b84b;
  color: #3a2600;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .08em;
  vertical-align: 3px;
}
body.practice .bar { border-bottom-color: #f2b84b; }
/* The way back stays on screen however many cards there are. */
.dock {
  position: sticky;
  bottom: 0;
  padding: 14px 0 6px;
  background: linear-gradient(to top, var(--bg) 70%, rgba(238, 241, 244, 0));
}
.dock .btn { min-width: 220px; background: var(--surface); }

/* ------------------------------------------------------------ what are you working on: list or keypad */
.pick {
  margin: 0 auto;
  width: 100%;
  max-width: 1440px;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(300px, .8fr) minmax(0, 1.2fr);
  grid-template-rows: minmax(0, 1fr);
  gap: clamp(18px, 3vw, 40px);
}
.pick.padmode {
  margin: auto;
  height: auto;
  max-width: 1180px;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  grid-template-rows: auto;
  align-items: center;
}
.pick-main { min-width: 0; }
.pick:not(.padmode) .pick-main { overflow-y: auto; }
.pick-side { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.entry { display: flex; gap: 12px; align-items: stretch; margin-top: 22px; }
.entry .display { margin-top: 0; flex: 1; min-width: 0; }
.pick:not(.padmode) .display { min-height: 76px; font-size: clamp(34px, 4.4vw, 50px); }
.btn.find { background: var(--go); border-color: var(--go); color: #fff; min-width: 130px; font-size: 24px; }
.btn.find:active { background: var(--go-press); }

.wl {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.wl-title { padding: 14px 18px; border-bottom: 1px solid var(--line); font-size: 19px; background: var(--bg); }
.wl-title.typed { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px 8px 18px; }
.wl-title.typed .btn { flex: none; min-height: 48px; font-size: 18px; }
.wl-tabs { display: flex; gap: 10px; padding: 10px; border-bottom: 1px solid var(--line); background: var(--bg); }
.wl-tabs button {
  flex: 1;
  min-height: 60px;
  border-radius: 12px;
  border: 2px solid var(--line);
  background: var(--surface);
  font-size: 21px;
  font-weight: 650;
}
.wl-tabs button.on { border-color: var(--primary); background: var(--primary); color: #fff; }
.wl-tabs .count {
  display: inline-block;
  min-width: 30px;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(17, 26, 36, .08);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.wl-tabs button.on .count { background: rgba(255, 255, 255, .22); }
.wl-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.wl-sub { padding: 10px 18px 6px; font-size: 15px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.wl-item {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  column-gap: 18px;
  row-gap: 2px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 12px 18px;
  border: 0;
  border-top: 1px solid var(--line);
  background: var(--surface);
  text-align: left;
}
.wl-sub + .wl-item, .wl-items > .wl-item:first-child { border-top: 0; }
.wl-item .n { grid-row: 1 / span 2; font-size: 27px; font-weight: 800; font-variant-numeric: tabular-nums; }
.wl-item .t { font-size: 21px; font-weight: 600; line-height: 1.25; }
.wl-item .l { font-size: 16px; color: var(--muted); line-height: 1.3; }
.wl-item:active { background: var(--go-soft); }
.wl-item.cur { background: #edf3ff; }
.wl-item.cur .l { color: var(--primary); font-weight: 650; }
.wl-empty { padding: 28px 22px; font-size: 19px; color: var(--muted); line-height: 1.4; }
.wl-foot { padding: 10px 18px; border-top: 1px solid var(--line); font-size: 16px; color: var(--muted); background: var(--bg); }
.whobar .dept { color: var(--muted); margin-left: 8px; }
.whobar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whobar .btn { flex: none; white-space: nowrap; }
.pick:not(.padmode) .row { margin-top: 16px; gap: 10px; }
.pick:not(.padmode) .row .btn { min-height: 56px; padding: 12px 16px; font-size: 19px; }
.pick:not(.padmode) .alert { margin-top: 14px; }
.notice .btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); }
.offline-note { margin-bottom: 26px; padding: 18px 22px; border-radius: var(--radius); background: #b3261e; color: #fff; font-size: 21px; line-height: 1.35; box-shadow: var(--shadow); }
.offline-note b { display: block; font-size: 27px; margin-bottom: 6px; }
body.offline .bar { box-shadow: inset 0 -5px 0 #b3261e; }

/* ------------------------------------------------------------ non-job reasons */
.reasons { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.reasons .btn { min-height: 84px; font-size: 22px; text-align: left; padding: 16px 22px; background: var(--surface); box-shadow: var(--shadow); }

/* ------------------------------------------------------------ done */
.done { margin: auto; max-width: 820px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.done .mark { width: 128px; height: 128px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; }
.done .mark svg { width: 74px; height: 74px; }
.done.ok .mark { background: var(--go); }
.done.break .mark { background: var(--warn); }
.done.out .mark { background: var(--dark); }
.done .lead { margin: 0; color: var(--ink); }
.done .today { font-size: 22px; color: var(--muted); font-variant-numeric: tabular-nums; }
.timer { width: 260px; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--muted); animation: drain linear forwards; }
@keyframes drain { from { width: 100%; } to { width: 0; } }

.notice { margin: auto; max-width: 720px; text-align: center; }
.notice p { font-size: 21px; color: var(--muted); line-height: 1.45; }
.kcode { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 22px 0 4px; }
.kcode input {
  width: 11em; max-width: 100%; min-height: 64px; padding: 8px 14px; font: inherit; font-size: 30px; text-align: center;
  letter-spacing: .12em; font-variant-numeric: tabular-nums; color: var(--ink); background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--radius);
}
.kcode input:focus { outline: 3px solid var(--primary); outline-offset: 2px; }
.kcode .btn { min-height: 64px; padding: 0 26px; font-size: 21px; }
.notice .kcode .btn.primary { color: var(--brand-ink); } /* .notice .btn makes button text dark */
.notice .kcode-msg { min-height: 1.45em; margin: 6px 0 0; color: var(--stop-ink); }

.busy { opacity: .55; pointer-events: none; }

/* ------------------------------------------------------------ English and Spanish */
/* The PIN screen, before anyone is known, is in both languages: the Spanish under the English. */
.es { display: block; margin-top: 4px; font-size: .72em; font-weight: 400; letter-spacing: 0; color: var(--muted); }
h1 .es { margin-top: 8px; font-size: .62em; font-weight: 600; }
.lead .es, .msg .es { margin-top: 2px; font-size: .92em; }
.key .es { margin-top: 2px; font-size: .8em; font-weight: 500; }
.foot .es { display: inline; margin: 0; font-size: 1em; font-weight: inherit; color: inherit; }
.offline-note .es { color: rgba(255, 255, 255, .88); font-size: .92em; }
.offline-note b .es { margin-top: 2px; font-size: .74em; }
.notice .who { margin-top: 10px; font-size: 24px; font-weight: 600; color: var(--ink); }
.notice .who .es { font-size: .9em; }
/* After the PIN: the other language, by the person's name. Where the name and both buttons do
   not fit on one line (the list screen's narrow column, phones), the buttons go under the name:
   the whole name stays readable, so the person can see it is them. */
.whobar { flex-wrap: wrap; }
.whobar > span:first-child { flex: 1 1 auto; }
.whobar > .who-acts { display: flex; gap: 8px; flex: none; overflow: visible; }
.btn.lang { display: inline-flex; align-items: center; gap: 8px; }
.btn.lang svg { width: 22px; height: 22px; flex: none; }

/* ------------------------------------------------------------ short screens (7 inch tablets, 1024x600) */
@media (max-height: 720px) {
  .bar { padding: 6px 20px; }
  #time { font-size: 24px; }
  #screen { padding-top: 12px; padding-bottom: 12px; }
  h1 { font-size: clamp(26px, 3.6vw, 36px); }
  .lead { font-size: 18px; margin-top: 6px; }
  .key { min-height: 58px; font-size: 28px; }
  .key.fn { font-size: 18px; }
  .display { min-height: 70px; margin-top: 12px; font-size: 44px; }
  .examples { margin-top: 10px; font-size: 16px; }
  .alert { margin-top: 10px; padding: 10px 14px; font-size: 17px; }
  .alert b { font-size: 18px; }
  .row { margin-top: 12px; }
  .btn { min-height: 52px; padding: 10px 18px; font-size: 19px; }
  .btn.big { min-height: 70px; font-size: 24px; }
  .whobar { margin-bottom: 8px; font-size: 16px; }
  .work { padding: 14px 20px; }
  .work .num { font-size: 36px; }
  .pill { min-height: 56px; }
  .done .mark { width: 96px; height: 96px; }
  .entry { margin-top: 12px; }
  .pick:not(.padmode) .display { min-height: 62px; font-size: 36px; }
  .wl-item { min-height: 64px; padding: 9px 16px; grid-template-columns: 116px minmax(0, 1fr); }
  .wl-item .n { font-size: 23px; }
  .wl-item .t { font-size: 19px; }
  .wl-tabs button { min-height: 50px; font-size: 19px; }
}

/* ------------------------------------------------------------ narrow and portrait screens */
@media (max-width: 860px), (orientation: portrait) {
  .split { grid-template-columns: 1fr; gap: 22px; }
  .split > * { max-width: 520px; width: 100%; margin: 0 auto; }
  .pad { max-width: 520px; width: 100%; margin: 0 auto; }
  .actions { grid-template-columns: 1fr; }
  .actions .wide { grid-column: auto; }
  /* One column: the person's part on top, the list under it scrolling on its own. */
  .pick, .pick.padmode { display: flex; flex-direction: column; margin: 0 auto; max-width: 760px; gap: 20px; }
  /* Stretch, not center: a centered column grows to its widest line and runs off a phone. */
  .pick.padmode { height: auto; margin: auto; align-items: stretch; }
  .pick.padmode .pick-side { max-width: 520px; width: 100%; margin: 0 auto; }
  .pick-main { flex: none; }
  .pick:not(.padmode) .pick-main { overflow: visible; }
  .pick-side { flex: 1 1 auto; min-height: 0; }
}
/* Narrow and short as well: no room for a list inside the screen, so the whole screen scrolls. */
@media (max-width: 860px) and (max-height: 760px), (orientation: portrait) and (max-height: 760px) {
  .pick { height: auto; }
  .pick-side, .wl { flex: none; min-height: auto; }
  .wl, .wl-items { overflow: visible; }
}
/* The header on narrower screens: the date goes first, then the name gives way, so the clock is
   never pushed off the screen. */
@media (max-width: 860px) {
  #date { display: none; }
  .brand { min-width: 0; }
  .brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .brand .chip { flex: none; overflow: visible; }
  .clock { flex: none; }
}
@media (max-width: 720px) {
  .bar { padding: 8px 16px; gap: 10px; }
  .brand { gap: 10px; }
  .brand img { height: 34px; }
  .brand span { font-size: 16px; padding-left: 10px; }
  .brand .chip { font-size: 12px; padding: 2px 7px; }
  #time { font-size: 22px; }
}
@media (max-width: 560px) {
  #screen { padding: 16px; }
  .work { grid-template-columns: 1fr; padding: 18px; }
  .work .side { grid-row: auto; grid-column: 1; margin-top: 10px; }
  .pill { width: 100%; }
  .foot { padding: 6px 16px; }
  .wl-item { grid-template-columns: 1fr; }
  .wl-item .n { grid-row: auto; font-size: 22px; }
  .btn.find { min-width: 96px; }
  /* No room for the list in a box of its own: the whole screen scrolls instead. */
  .pick { height: auto; }
  .pick-side, .wl { flex: none; min-height: auto; }
  .wl, .wl-items { overflow: visible; }
  /* The scan box: its hint wraps instead of making the screen wider than the phone. */
  .display { padding: 8px 14px; }
  .display .ph { white-space: normal; line-height: 1.2; }
}
/* Phones: only the round IRD mark from the logo, so the clock and PRACTICE still fit. */
@media (max-width: 540px) {
  .brand img { width: 34px; object-fit: cover; object-position: left center; }
}
