/* Workshop jobs. The look of the whiteboard it replaces: pale board, dark marker, thick
   ruled lines, one hazard-yellow thing to press. Status is always shape + word + colour. */

@font-face { font-family: 'Sofia Sans'; font-style: normal; font-display: swap; font-weight: 1 1000; src: url(/assets/fonts/sofia-sans-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sofia Sans'; font-style: normal; font-display: swap; font-weight: 1 1000; src: url(/assets/fonts/sofia-sans-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sofia Sans'; font-style: normal; font-display: swap; font-weight: 1 1000; src: url(/assets/fonts/sofia-sans-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Sofia Sans'; font-style: normal; font-display: swap; font-weight: 1 1000; src: url(/assets/fonts/sofia-sans-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Sofia Sans Condensed'; font-style: normal; font-display: swap; font-weight: 1 1000; src: url(/assets/fonts/sofia-sans-condensed-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Sofia Sans Condensed'; font-style: normal; font-display: swap; font-weight: 1 1000; src: url(/assets/fonts/sofia-sans-condensed-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Sofia Sans Condensed'; font-style: normal; font-display: swap; font-weight: 1 1000; src: url(/assets/fonts/sofia-sans-condensed-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Sofia Sans Condensed'; font-style: normal; font-display: swap; font-weight: 1 1000; src: url(/assets/fonts/sofia-sans-condensed-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }

:root {
  --paper: #EEF1EF;
  --paper-2: #E1E6E3;
  --field: #FAFBFA;
  --ink: #17202A;
  --ink-2: #434D58;
  --rule: #17202A;
  --rule-soft: #B9C2BE;
  --hazard: #FFC72C;
  --on-hazard: #17202A;
  --signal: #9E2117;
  --on-signal: #FFFFFF;
  --ok: #136036;
  --on-ink: #EEF1EF;
  --scrim: rgba(23, 32, 42, 0.5);
  --body: 'Sofia Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --cond: 'Sofia Sans Condensed', 'Sofia Sans', 'Arial Narrow', system-ui, sans-serif;
  --nav-h: 68px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14181C; --paper-2: #1E242A; --field: #0D1013; --ink: #E9EDF0; --ink-2: #A5AFB8;
    --rule: #C9D1D7; --rule-soft: #3A444D; --signal: #FF6F61; --on-signal: #14181C; --ok: #4CC38A;
    --on-ink: #14181C; --scrim: rgba(0, 0, 0, 0.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #14181C; --paper-2: #1E242A; --field: #0D1013; --ink: #E9EDF0; --ink-2: #A5AFB8;
  --rule: #C9D1D7; --rule-soft: #3A444D; --signal: #FF6F61; --on-signal: #14181C; --ok: #4CC38A;
  --on-ink: #14181C; --scrim: rgba(0, 0, 0, 0.6); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--paper); color: var(--ink);
  font: 400 18px/1.42 var(--body); -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.5; }
a { color: inherit; }
img { max-width: 100%; display: block; }
p { margin: 0 0 12px; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 6px var(--hazard); }

.ic { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.ic svg { width: 100%; height: 100%; }
.muted { color: var(--ink-2); }
.small { font-size: 15px; }
.pad { padding: 16px; max-width: 720px; margin: 0 auto; }
.top-gap { margin-top: 24px; }
.stack { display: grid; gap: 10px; }
.plain { list-style: none; margin: 0 0 16px; padding: 0; }
.plain li { padding: 8px 0; border-bottom: 1px solid var(--rule-soft); }
.error { color: var(--signal); font-weight: 700; }
.ok-line { display: flex; gap: 8px; align-items: center; color: var(--ok); font-weight: 600; }
.ok-line .ic { width: 24px; height: 24px; }
.lead { font-size: 20px; }

.h1 { font: 800 32px/1.04 var(--cond); margin: 4px 0 14px; letter-spacing: -0.005em; }
.h2 { font: 700 22px/1.15 var(--cond); margin: 28px 0 10px; }
.view-open .h2:first-child, .sheet .h2:first-of-type { margin-top: 4px; }

.boot { min-height: 100dvh; display: grid; place-items: center; font: 800 30px var(--cond); color: var(--ink-2); }

/* ---------------------------------------------------------------- top bar and nav */

#app { min-height: 100dvh; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 16px); }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(var(--safe-t) + 8px) 16px 8px; background: var(--paper); border-bottom: 3px solid var(--rule);
}
.top-title { flex: 1; min-width: 0; font: 800 24px/1.1 var(--cond); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sync {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 10px; border: 2px solid transparent;
  background: none; border-radius: 6px; font: 600 16px var(--cond); color: var(--ink-2);
}
.sync .ic { width: 22px; height: 22px; }
.sync-ok .ic { color: var(--ok); }
.sync-busy { color: var(--ink); border-color: var(--rule-soft); }
.sync-warn { color: var(--signal); border-color: var(--signal); }

.nav {
  position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex;
  padding-bottom: var(--safe-b); background: var(--paper); border-top: 3px solid var(--rule);
}
.nav-btn {
  flex: 1; position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: var(--nav-h); padding: 6px 2px; border: 0; background: none; color: var(--ink-2); font: 700 15px/1.1 var(--cond);
}
.nav-btn .ic { width: 28px; height: 28px; }
.nav-btn.is-current { color: var(--ink); }
.nav-btn.is-current::before { content: ''; position: absolute; top: -3px; left: 18%; right: 18%; height: 6px; background: var(--ink); }
.nav-add { color: var(--on-hazard); background: var(--hazard); margin: -3px 0 0; border-left: 3px solid var(--rule); border-right: 3px solid var(--rule); }
.nav-add.is-current { color: var(--on-hazard); }
.nav-add.is-current::before { background: var(--on-hazard); }
.nav-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge {
  position: absolute; top: 6px; left: calc(50% + 8px); min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--signal); color: var(--on-signal); font: 700 14px/22px var(--cond); text-align: center;
}
.nav-add .badge { display: none; }

/* ---------------------------------------------------------------- buttons, fields */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 6px 16px;
  border: 2px solid var(--ink); border-radius: 6px; background: transparent; color: var(--ink);
  font: 700 18px/1.1 var(--cond); text-decoration: none; text-align: center;
}
.btn .ic { width: 22px; height: 22px; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn-primary { background: var(--hazard); color: var(--on-hazard); border-color: var(--on-hazard); }
.btn-solid { background: var(--ink); color: var(--on-ink); }
.btn-line { background: transparent; }
.btn-quiet { border-color: transparent; text-decoration: underline; text-underline-offset: 3px; font-weight: 600; padding-left: 4px; padding-right: 4px; justify-content: flex-start; }
.btn-danger { background: var(--signal); color: var(--on-signal); border-color: var(--signal); }
.btn-tall { min-height: 56px; }
.btn-big { min-height: 60px; font-size: 20px; padding: 6px 24px; }
.btn-xl { min-height: 64px; width: 100%; font-size: 22px; }
.btn-xl .ic { width: 28px; height: 28px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-col { display: grid; gap: 12px; margin-top: 16px; }
.link { border: 0; background: none; padding: 0; text-align: left; text-decoration: underline; text-underline-offset: 3px; font: inherit; color: inherit; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 48px; padding: 0 8px 0 0; border: 0; background: none; font: 700 18px var(--cond); color: var(--ink-2); }
.back .ic { width: 24px; height: 24px; }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.label { font-weight: 650; font-size: 17px; }
.hint { font-size: 15px; color: var(--ink-2); }
.input {
  width: 100%; min-height: 52px; padding: 10px 12px; border: 2px solid var(--ink); border-radius: 6px;
  background: var(--field); font-size: 18px;
}
textarea.input { resize: vertical; line-height: 1.35; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 15px) 50%; background-size: 7px 7px; background-repeat: no-repeat; padding-right: 40px; }
.input-big { font-size: 21px; }
.check { display: flex; align-items: center; gap: 12px; min-height: 48px; font-weight: 600; }
.check input { width: 26px; height: 26px; accent-color: var(--ink); flex: none; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.seg-btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 56px; padding: 6px; border: 0; border-left: 2px solid var(--ink); background: none; font: 700 17px/1.1 var(--cond); }
.seg-btn:first-child { border-left: 0; }
.seg-btn .ic { width: 22px; height: 22px; }
.seg-btn.is-on { background: var(--ink); color: var(--on-ink); }
.seg-small .seg-btn { min-height: 48px; }

.toggles { display: grid; border-top: 2px solid var(--rule-soft); }
.toggle {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 10px 0; border: 0;
  border-bottom: 2px solid var(--rule-soft); background: none; text-align: left;
}
.toggle > .ic { width: 26px; height: 26px; }
.toggle-text { flex: 1; display: grid; gap: 2px; }
.toggle-label { font-weight: 650; }
.switch { position: relative; width: 56px; height: 32px; flex: none; border: 2px solid var(--ink); border-radius: 16px; background: var(--paper-2); }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); transition: transform 0.15s; }
.toggle.is-on .switch { background: var(--ok); border-color: var(--ok); }
.toggle.is-on .switch::after { transform: translateX(24px); background: #fff; }
.me .toggle { border-top: 2px solid var(--rule-soft); margin-bottom: 12px; }

.chips { display: flex; gap: 8px; padding: 0 16px 12px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips-wrap { flex-wrap: wrap; overflow: visible; padding: 0; }
.chip {
  flex: none; min-height: 44px; padding: 4px 14px; border: 2px solid var(--ink); border-radius: 6px; background: none;
  font: 700 17px var(--cond); white-space: nowrap;
}
.chip.is-on { background: var(--ink); color: var(--on-ink); }
.chip-big { min-height: 52px; font-size: 18px; white-space: normal; text-align: left; }

/* ---------------------------------------------------------------- the list */

.totals { margin: 0; padding: 12px 16px 10px; font: 600 17px/1.3 var(--cond); color: var(--ink-2); }
.banner {
  display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); margin: 0 16px 12px; min-height: 56px; padding: 8px 14px;
  border: 0; border-radius: 6px; background: var(--ink); color: var(--on-ink); font: 700 19px var(--cond); text-align: left;
}
.banner .ic { width: 26px; height: 26px; }

.rows { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--rule); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) 104px; border-bottom: 3px solid var(--rule); background: var(--paper); }
.row-main { min-width: 0; padding: 14px 12px 14px 16px; cursor: pointer; }
.row-title { display: flex; gap: 10px; align-items: flex-start; }
.row-title > .ic { width: 28px; height: 28px; margin-top: 1px; }
.title-text { font: 650 21px/1.22 var(--body); overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-left: 38px; }
.chip-s {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1.5px solid var(--rule-soft); border-radius: 4px;
  font: 600 15px/1.35 var(--cond); color: var(--ink-2); max-width: 100%;
}
.chip-s .ic { width: 17px; height: 17px; }
.chip-urgent { border-color: var(--signal); color: var(--signal); }
.chip-tag { border-color: var(--signal); color: var(--signal); border-style: dashed; }
.chip-onit { border-color: var(--ink); color: var(--ink); }
.chip-sending { border-style: dashed; }
.row-side { display: grid; grid-template-rows: 1fr auto; border-left: 3px solid var(--rule); }
.done-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 84px;
  border: 0; background: var(--hazard); color: var(--on-hazard); font: 800 19px/1 var(--cond);
}
.done-btn .ic { width: 36px; height: 36px; }
.done-btn:active { filter: brightness(0.92); }
.row-side .btn { min-height: 48px; border: 0; border-top: 3px solid var(--rule); border-radius: 0; padding: 4px; font-size: 16px; gap: 4px; }
.row-side .btn .ic { width: 18px; height: 18px; }
.row.is-urgent { box-shadow: inset 8px 0 0 var(--signal); }
.row.is-urgent .row-main { padding-left: 24px; }
.row.is-pending .title-text { opacity: 0.85; }
.row.is-leaving { transition: transform 0.22s ease-in, opacity 0.22s ease-in; transform: translateX(40%); opacity: 0; }
.g-done { color: var(--ok); }
.g-urgent, .g-tag { color: var(--signal); }
.g-cant { color: var(--ink-2); }

.row-done { grid-template-columns: 1fr; }
.row-done .title-text { font-weight: 600; }
.row-btns { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 14px 54px; }
.done-line { margin: 6px 0 0 38px; font-size: 16px; color: var(--ink-2); }
.reason { margin: 6px 0 0 38px; padding-left: 10px; border-left: 3px solid var(--rule-soft); font-size: 16px; }
.detail .done-line, .detail .reason { margin-left: 0; }
.rows-plain .row { grid-template-columns: 1fr; }
.rows-plain .row-main { cursor: default; }

.empty { display: grid; justify-items: center; gap: 12px; padding: 48px 24px; text-align: center; font-size: 20px; }
.empty-ic { width: 64px !important; height: 64px !important; color: var(--ok); }
.search-entry {
  display: flex; align-items: center; gap: 10px; width: calc(100% - 32px); margin: 14px 16px 0; min-height: 52px; padding: 0 14px;
  border: 2px solid var(--ink); border-radius: 6px; background: var(--field); color: var(--ink-2); font-size: 18px; text-align: left;
}
.search-entry .ic { width: 24px; height: 24px; }
.view-done > .h2 { padding: 0 16px; }
.search-form { display: flex; gap: 8px; margin-bottom: 16px; }
.search-form .input { flex: 1; }

/* ---------------------------------------------------------------- add */

.photo-pick .btn { width: 100%; }
.thumb-wrap { display: flex; gap: 12px; align-items: center; }
.thumb { width: 112px; height: 112px; object-fit: cover; border: 2px solid var(--ink); border-radius: 6px; }
.add-more { display: grid; gap: 10px; padding-top: 18px; border-top: 2px solid var(--rule-soft); }
.add-more .btn { justify-content: flex-start; }

/* ---------------------------------------------------------------- detail */

.detail-title { display: flex; gap: 12px; align-items: flex-start; }
.detail-title > .ic { width: 36px; height: 36px; margin-top: 4px; }
.detail .meta { padding-left: 0; margin-bottom: 14px; }
.actions { display: grid; gap: 10px; margin: 18px 0 8px; }
.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.photo-btn { padding: 0; border: 2px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--paper-2); aspect-ratio: 1; }
.photo-btn img { width: 100%; height: 100%; object-fit: cover; }
.photo-full { width: 100%; max-height: 75dvh; object-fit: contain; margin-top: 36px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; gap: 2px; padding: 10px 0 10px 16px; border-left: 3px solid var(--rule); position: relative; }
.timeline li::before { content: ''; position: absolute; left: -8px; top: 16px; width: 13px; height: 13px; border-radius: 50%; background: var(--paper); border: 3px solid var(--rule); }
.tl-when { font: 600 15px var(--cond); color: var(--ink-2); }
.tl-reason { font-size: 16px; padding-left: 10px; border-left: 3px solid var(--rule-soft); }
.danger-zone { margin-top: 32px; padding-top: 16px; border-top: 2px dashed var(--rule-soft); }

/* ---------------------------------------------------------------- sheets and snackbar */

.scrim { position: fixed; inset: 0; z-index: 40; background: var(--scrim); }
.sheet {
  position: fixed; z-index: 41; left: 0; right: 0; bottom: 0; max-height: 90dvh; overflow-y: auto;
  padding: 18px 16px calc(20px + var(--safe-b)); background: var(--paper); border-top: 3px solid var(--rule);
  border-radius: 14px 14px 0 0; max-width: 720px; margin: 0 auto;
}
.sheet.is-new { animation: sheet-in 0.18s ease-out; }
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet .h2 { padding-right: 52px; }
.sheet-x { position: absolute; top: 8px; right: 8px; width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: none; }
.sheet-x .ic { width: 24px; height: 24px; }
.sheet-job { font-weight: 650; font-size: 20px; }
.sheet .form, .sheet form { display: grid; gap: 14px; margin-top: 14px; }
.sheet .chips-wrap { margin-top: 8px; }

.snack {
  position: fixed; z-index: 30; left: 12px; right: 12px; bottom: calc(var(--nav-h) + var(--safe-b) + 12px); max-width: 680px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 8px 8px 16px; border-radius: 8px;
  background: var(--ink); color: var(--on-ink); font-weight: 600; box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15);
}
.snack > span { flex: 1; }
.snack-warn { background: var(--signal); color: var(--on-signal); }
.snack-btn { min-height: 48px; padding: 0 20px; border: 0; border-radius: 6px; background: var(--hazard); color: var(--on-hazard); font: 800 19px var(--cond); }
.snack-x { width: 44px; height: 44px; border: 0; background: none; color: inherit; display: grid; place-items: center; }
.snack-x .ic { width: 20px; height: 20px; }

.name-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
.name-btn { min-height: 64px; padding: 6px 10px; border: 2px solid var(--ink); border-radius: 8px; background: none; font: 700 21px/1.1 var(--cond); }
.pin-dots { display: flex; justify-content: center; gap: 14px; margin: 12px 0 16px; }
.pin-dots span { width: 18px; height: 18px; border-radius: 50%; border: 3px solid var(--ink); }
.pin-dots span.is-on { background: var(--ink); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 360px; margin: 0 auto; }
.key { min-height: 66px; border: 2px solid var(--ink); border-radius: 8px; background: var(--field); font: 700 30px var(--cond); }
.key .ic { width: 28px; height: 28px; }
.key-quiet { background: none; border-color: var(--rule-soft); }
.key-go { background: var(--hazard); color: var(--on-hazard); border-color: var(--on-hazard); }
.big-pin { font: 800 56px/1 var(--cond); letter-spacing: 0.12em; text-align: center; margin: 16px 0; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- me, team, admin */

.cards { list-style: none; margin: 12px 0 16px; padding: 0; display: grid; gap: 10px; }
.card { padding: 14px; border: 2px solid var(--ink); border-radius: 8px; }
.card.is-off { border-style: dashed; color: var(--ink-2); }
.card-btn { display: grid; gap: 4px; width: 100%; margin: -14px; padding: 14px; width: calc(100% + 28px); border: 0; background: none; text-align: left; }
.card p { margin-bottom: 8px; }
.menu { list-style: none; margin: 0; padding: 0; border-top: 3px solid var(--rule); }
.menu-btn { display: grid; gap: 2px; width: 100%; min-height: 64px; padding: 12px 0; border: 0; border-bottom: 2px solid var(--rule-soft); background: none; text-align: left; }
.menu-btn > span:first-child { font: 700 20px var(--cond); }
.menu-btn .muted { font-size: 15px; }
.table-wrap { overflow-x: auto; margin: 0 -16px; padding: 0 16px; }
.table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 10px 8px; border-bottom: 2px solid var(--rule-soft); text-align: right; white-space: nowrap; }
.table th:first-child { text-align: left; }
.table thead th { font: 700 15px var(--cond); color: var(--ink-2); border-bottom: 3px solid var(--rule); }
.qr-box { width: 220px; max-width: 70%; margin: 12px 0; padding: 8px; background: #fff; border: 2px solid var(--ink); }
.qr-box svg { width: 100%; height: auto; display: block; }
.mono-url { font-size: 14px; overflow-wrap: anywhere; color: var(--ink-2); }
.prose p { max-width: 64ch; }

/* ---------------------------------------------------------------- signed out, install */

.signed-out { padding-top: calc(var(--safe-t) + 32px); }
.signed-out .h1 { font-size: 38px; }
.install-steps { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 14px; counter-reset: step; }
.install-steps li { display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: center; font-size: 19px; font-weight: 600; }
.install-steps li span::before { counter-increment: step; content: counter(step) '. '; font: 800 22px var(--cond); }
.pic { width: 128px; height: auto; color: var(--ink); }
.waiting-dot { width: 22px; height: 22px; margin: 24px 0; border-radius: 50%; background: var(--hazard); border: 3px solid var(--ink); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(1.35); } }

/* ---------------------------------------------------------------- QR label page and TV board */

.page-area .area { padding-top: calc(var(--safe-t) + 20px); }
.area-kicker { font: 700 18px var(--cond); color: var(--ink-2); margin: 0; }
.lang-links { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.lang-links a { min-width: 44px; min-height: 44px; display: grid; place-items: center; border: 2px solid var(--rule-soft); border-radius: 6px; font: 700 16px var(--cond); text-decoration: none; }
.lang-links a[aria-current] { border-color: var(--ink); background: var(--ink); color: var(--on-ink); }
.area .card { margin-bottom: 8px; }
.area-done { padding: 18px; border: 3px solid var(--ok); border-radius: 8px; }
.area .rows { margin-bottom: 18px; }

.page-board { padding: 24px 32px; min-height: 100vh; }
.board-top { display: flex; align-items: baseline; gap: 32px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 4px solid var(--rule); }
.board-title { flex: 1; margin: 0; font: 800 48px/1 var(--cond); }
.board-totals { display: flex; gap: 28px; margin: 0; font: 600 26px var(--cond); color: var(--ink-2); }
.board-totals strong { color: var(--ink); font-size: 40px; }
.board-clock { margin: 0; font: 800 40px var(--cond); font-variant-numeric: tabular-nums; }
.board-list { list-style: none; margin: 0; padding: 0; columns: 2 640px; column-gap: 40px; }
.board-row { break-inside: avoid; display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; padding: 14px 0; border-bottom: 3px solid var(--rule-soft); }
.board-glyph { font-size: 32px; line-height: 1.1; text-align: center; }
.board-job { font: 650 32px/1.15 var(--body); }
.board-meta { grid-column: 2; display: flex; flex-wrap: wrap; gap: 4px 18px; font: 600 22px var(--cond); color: var(--ink-2); }
.board-row.is-urgent .board-glyph, .board-row.is-urgent .board-job { color: var(--signal); }
.board-empty { font: 700 40px var(--cond); margin-top: 48px; }

/* ---------------------------------------------------------------- printing: rack labels, wall poster */

#print { position: fixed; inset: 0; z-index: 60; overflow: auto; background: #fff; color: #000; padding: 16px; }
.print-bar { position: sticky; top: 0; display: flex; gap: 10px; padding: 8px 0 16px; background: #fff; }
.print-bar .btn { color: #000; border-color: #000; }
.print-bar .btn-primary { background: #FFC72C; }
.labels { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.label-card { display: grid; justify-items: center; gap: 8px; padding: 14px; border: 3px solid #000; border-radius: 10px; break-inside: avoid; page-break-inside: avoid; }
.label-name { font: 800 34px/1 var(--cond); text-align: center; }
.label-card svg { width: 72%; height: auto; }
.label-hint { font: 600 15px var(--cond); text-align: center; }
.poster { display: grid; justify-items: center; gap: 16px; text-align: center; max-width: 720px; margin: 0 auto; }
.poster h1 { font: 800 64px/1 var(--cond); margin: 12px 0 0; }
.poster-qr { width: 68%; padding: 10px; background: #FFC72C; border: 4px solid #000; }
.poster-qr svg { width: 100%; height: auto; display: block; }
.poster-url { font: 800 34px var(--cond); margin: 0; }
.poster-code { font: 800 44px var(--cond); margin: 0; padding: 6px 18px; border: 4px solid #000; }
.poster-steps { text-align: left; font: 650 26px/1.3 var(--body); margin: 0; padding-left: 1.4em; }
.poster-langs { font: 600 18px var(--cond); color: #333; }

@media print {
  @page { margin: 12mm; }
  body.printing > #app { display: none; }
  body.printing #print { position: static; overflow: visible; padding: 0; }
  .no-print { display: none !important; }
  .labels { gap: 8mm; }
}

/* ---------------------------------------------------------------- wider screens, motion */

@media (min-width: 760px) {
  .rows, .chips, .totals, .banner, .search-entry { max-width: 720px; margin-left: auto; margin-right: auto; }
  .banner, .search-entry { width: 100%; }
  .rows { border-left: 3px solid var(--rule); border-right: 3px solid var(--rule); }
  .nav { justify-content: center; }
  .nav-btn { flex: 0 1 144px; }
}
@media (max-width: 360px) {
  .row { grid-template-columns: minmax(0, 1fr) 88px; }
  .title-text { font-size: 19px; }
  .nav-label { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
