/* Flakk Staff (wave 3, agent D1, 05.11.2026). Phone-first, one-handed, light + dark (phone setting or the toggle in Me).
   The Flakk look: navy header with the amber diamond (as the console), paper ground, high-contrast text, 48 px+ touch targets.
   System fonts on purpose: nothing render-blocking from another host, so a dead network never holds the first paint. */
:root {
  --navy: #0F2A47; --navy-deep: #0A1D33; --amber: #F2A741; --amber-ink: #8A520C; --amber-soft: #FCEBD0;
  --ground: #F5F1E8; --surf: #FFFFFF; --surf-2: #F8F4EC; --surf-3: #EFE9DE;
  --ink: #16181D; --ink-soft: #3F444E; --ink-mute: #565C67;
  --rule: rgba(15, 42, 71, .13); --rule-strong: rgba(15, 42, 71, .26);
  --hdr: #0A1D33; --hdr-ink: #F3EDE2; --hdr-mute: rgba(243, 237, 226, .74); --hdr-rule: rgba(243, 237, 226, .16);
  --btn: #0F2A47; --btn-ink: #FFFFFF; --focus: 0 0 0 3px rgba(242, 167, 65, .55);
  --ok: #1F8A5B; --ok-bg: #E3F3EB; --ok-ink: #17694A;
  --warn: #C98612; --warn-bg: #FBF0DA; --warn-ink: #7E520A;
  --bad: #C2402F; --bad-bg: #F9E3DF; --bad-ink: #9A3123;
  --info: #2F6FB3; --info-bg: #E2ECF7; --info-ink: #245892;
  --mute: #6A707B; --mute-bg: #ECE8E0; --mute-ink: #474B54;
  --vio: #7A5BB5; --vio-bg: #EEE8F7; --vio-ink: #553A8F;
  --shadow: 0 1px 2px rgba(10, 29, 51, .06), 0 8px 24px -14px rgba(10, 29, 51, .28);
  --shadow-lg: 0 24px 70px -20px rgba(10, 29, 51, .5);
  --ui: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --r: 16px; --top-h: 56px; --tab-h: 62px; --kb: 0px; --vvh: 100vh;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0A1D33; --surf: #10263F; --surf-2: #0D2137; --surf-3: #163152;
    --ink: #EEF2F7; --ink-soft: #C6D0DC; --ink-mute: #A7B4C4;
    --rule: rgba(214, 226, 240, .14); --rule-strong: rgba(214, 226, 240, .28);
    --hdr: #071526; --btn: #F2A741; --btn-ink: #0A1D33; --amber-ink: #F2B45E; --amber-soft: rgba(242, 167, 65, .16);
    --ok-bg: rgba(31, 138, 91, .22); --ok-ink: #7FD3AA; --warn-bg: rgba(201, 134, 18, .22); --warn-ink: #F2C46E;
    --bad-bg: rgba(194, 64, 47, .25); --bad-ink: #F4A99E; --info-bg: rgba(47, 111, 179, .26); --info-ink: #9CC3EE;
    --mute-bg: rgba(214, 226, 240, .1); --mute-ink: #C3CCD8; --mute: #8F9BAB; --vio-bg: rgba(122, 91, 181, .28); --vio-ink: #CDBBF2;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 24px 70px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground: #0A1D33; --surf: #10263F; --surf-2: #0D2137; --surf-3: #163152;
  --ink: #EEF2F7; --ink-soft: #C6D0DC; --ink-mute: #A7B4C4;
  --rule: rgba(214, 226, 240, .14); --rule-strong: rgba(214, 226, 240, .28);
  --hdr: #071526; --btn: #F2A741; --btn-ink: #0A1D33; --amber-ink: #F2B45E; --amber-soft: rgba(242, 167, 65, .16);
  --ok-bg: rgba(31, 138, 91, .22); --ok-ink: #7FD3AA; --warn-bg: rgba(201, 134, 18, .22); --warn-ink: #F2C46E;
  --bad-bg: rgba(194, 64, 47, .25); --bad-ink: #F4A99E; --info-bg: rgba(47, 111, 179, .26); --info-ink: #9CC3EE;
  --mute-bg: rgba(214, 226, 240, .1); --mute-ink: #C3CCD8; --mute: #8F9BAB; --vio-bg: rgba(122, 91, 181, .28); --vio-ink: #CDBBF2;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 24px 70px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--hdr); }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--ground); color: var(--ink); font: 400 16px/1.45 var(--ui); overflow-x: hidden; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { -webkit-appearance: none; appearance: none; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.2; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }
.ic.sm { width: 18px; height: 18px; }
.ic.lg { width: 26px; height: 26px; }
[hidden] { display: none !important; }

/* ---------- boot (before staff.js has drawn the frame) ---------- */
.boot { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--ink-mute); text-align: center; padding: 24px; }
.boot .mk { width: 54px; height: 54px; }
.net-wait { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 60vh; text-align: center; padding: 24px; }
.net-wait .d, .dot-pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--amber); animation: fsPulse 1.6s ease-in-out infinite; }
.net-wait b { font-weight: 650; font-size: 19px; }
.net-wait span.s { color: var(--ink-mute); font-size: 15px; }
@keyframes fsPulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

/* ---------- top bar (navy, as the console) ---------- */
.top { position: sticky; top: 0; z-index: 40; background: var(--hdr); color: var(--hdr-ink); padding-top: env(safe-area-inset-top); }
.top-in { height: var(--top-h); display: flex; align-items: center; gap: 6px; padding: 0 max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left)); max-width: 1180px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; background: none; border: 0; padding: 4px 6px; border-radius: 12px; color: inherit; text-align: left; cursor: pointer; min-height: 48px; }
.brand .mk { width: 32px; height: 32px; flex: none; }
.brand .tt { min-width: 0; display: flex; flex-direction: column; }
.brand b { font-weight: 680; font-size: 17px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { font-size: 12.5px; color: var(--hdr-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.15; }
.top .ib { color: var(--hdr-ink); border-color: var(--hdr-rule); background: rgba(255, 255, 255, .05); }
.top .ib:active { background: rgba(255, 255, 255, .12); }
.top .back { flex: none; }
.net-chip { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px; background: var(--amber); color: #2A1A04; font-size: 13px; font-weight: 700; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; }
.net-chip .dot-pulse { width: 8px; height: 8px; background: #2A1A04; }
.demo-chip { flex: none; display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; background: rgba(242, 167, 65, .2); color: var(--amber); font-size: 12px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }

/* ---------- buttons ---------- */
.ib { width: 48px; height: 48px; flex: none; border-radius: 14px; border: 1px solid var(--rule); background: var(--surf); display: inline-grid; place-items: center; padding: 0; cursor: pointer; color: var(--ink); position: relative; }
.ib.round { border-radius: 50%; }
.ib .ic { width: 22px; height: 22px; }
.ib.av { border-radius: 50%; font-weight: 700; font-size: 15px; letter-spacing: .02em; background: var(--amber); color: #2A1A04; border: 0; }
.btn { min-height: 52px; padding: 0 20px; border-radius: 14px; border: 1.5px solid var(--rule-strong); background: var(--surf); font-weight: 650; font-size: 16.5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; text-align: center; line-height: 1.2; color: var(--ink); }
.btn.pri { background: var(--btn); color: var(--btn-ink); border-color: transparent; }
.btn.go { background: var(--ok); color: #fff; border-color: transparent; }
.btn.amber { background: var(--amber); color: #2A1A04; border-color: transparent; }
.btn.danger { background: var(--bad); color: #fff; border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sm { min-height: 48px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: default; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn .ic { width: 20px; height: 20px; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.row-btns > .btn { flex: 1 1 140px; }
.linkish { background: none; border: 0; padding: 0 4px; min-height: 48px; color: var(--info-ink); font-weight: 650; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- page ---------- */
#view { display: block; outline: none; }
.wrap { max-width: 760px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) calc(var(--tab-h) + 28px + env(safe-area-inset-bottom) + var(--kb)) max(16px, env(safe-area-inset-left)); }
.wrap.wide { max-width: 1180px; }
body.detail .wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom) + var(--kb)); }
body.kbup .wrap { padding-bottom: calc(24px + var(--kb)); }
.sec { margin-top: 22px; }
.sec-h { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; min-height: 48px; }
.sec-h h2 { font-size: 19px; flex: 1; min-width: 0; }
.sec-h .meta { color: var(--ink-mute); font-size: 13.5px; white-space: nowrap; }
.muted { color: var(--ink-mute); }
.small { font-size: 14px; }
.card { background: var(--surf); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.empty { padding: 22px 16px; text-align: center; color: var(--ink-mute); border: 1.5px dashed var(--rule-strong); border-radius: var(--r); }
.empty b { display: block; color: var(--ink); font-size: 17px; margin-bottom: 4px; }
.note { font-size: 14.5px; color: var(--ink-mute); display: flex; gap: 8px; align-items: flex-start; }
.note .ic { margin-top: 1px; width: 18px; height: 18px; }
.stale { font-size: 13.5px; color: var(--ink-mute); }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--mute-bg); color: var(--mute-ink); white-space: nowrap; line-height: 1; }
.chip .ic { width: 15px; height: 15px; stroke-width: 2.2; }
.chip.ok { background: var(--ok-bg); color: var(--ok-ink); } .chip.warn { background: var(--warn-bg); color: var(--warn-ink); }
.chip.bad { background: var(--bad-bg); color: var(--bad-ink); } .chip.info { background: var(--info-bg); color: var(--info-ink); }
.chip.vio { background: var(--vio-bg); color: var(--vio-ink); } .chip.amber { background: var(--amber-soft); color: var(--amber-ink); }
.chip.solid-bad { background: var(--bad); color: #fff; }
.chip.lang { background: var(--surf-3); color: var(--ink-soft); font-weight: 700; letter-spacing: .03em; }
.p1 { --pc: var(--bad); --pbg: var(--bad-bg); --pink: var(--bad-ink); }
.p2 { --pc: var(--warn); --pbg: var(--warn-bg); --pink: var(--warn-ink); }
.p3 { --pc: var(--info); --pbg: var(--info-bg); --pink: var(--info-ink); }
.p4 { --pc: var(--mute); --pbg: var(--mute-bg); --pink: var(--mute-ink); }
.pchip { background: var(--pbg); color: var(--pink); }
.p1 .pchip, .pchip.p1 { background: var(--bad); color: #fff; }

/* segmented filters (scroll sideways on a small phone, never the page) */
.seg { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.seg::-webkit-scrollbar { display: none; }
.seg button { flex: none; min-height: 48px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--rule-strong); background: var(--surf); font-weight: 650; font-size: 14.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surf); border-color: var(--ink); }
.seg button .n { font-variant-numeric: tabular-nums; opacity: .75; font-weight: 700; }
.seg button .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--sc, var(--mute)); flex: none; }

/* ---------- Today ---------- */
.hello { background: var(--hdr); color: var(--hdr-ink); border-radius: 22px; padding: 18px; position: relative; overflow: hidden; }
.hello::after { content: ""; position: absolute; right: -46px; top: -46px; width: 150px; height: 150px; border-radius: 34px; transform: rotate(45deg); background: rgba(242, 167, 65, .13); pointer-events: none; }
.hello h1 { font-size: 25px; font-weight: 720; position: relative; overflow-wrap: anywhere; }
.hello .who { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; position: relative; color: var(--hdr-mute); font-size: 14.5px; }
.hello .who .chip { background: rgba(242, 167, 65, .18); color: var(--amber); }
.hello .shift { display: flex; align-items: center; gap: 12px; margin-top: 16px; position: relative; flex-wrap: wrap; }
.hello .shift .btn { flex: 1 1 180px; min-height: 56px; font-size: 17px; }
.hello .shift .btn.pri { background: var(--amber); color: #2A1A04; }
.hello .shift .btn.ghost { color: var(--hdr-ink); border-color: var(--hdr-rule); }
.hello .shift .st { flex: 1 1 140px; font-size: 14.5px; color: var(--hdr-mute); display: flex; align-items: center; gap: 8px; min-width: 0; }
.hello .shift .st .on { width: 10px; height: 10px; border-radius: 50%; background: #3FD18E; box-shadow: 0 0 0 4px rgba(63, 209, 142, .2); flex: none; }
.annc { display: flex; gap: 12px; align-items: flex-start; padding: 12px 12px 12px 14px; border-radius: 14px; background: var(--amber-soft); color: var(--ink); border: 1px solid rgba(242, 167, 65, .45); margin-top: 12px; }
.annc .ic { color: var(--amber-ink); margin-top: 2px; }
.annc .tx { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.annc .tx small { display: block; color: var(--ink-mute); font-size: 13px; margin-top: 2px; }
.annc .btn { flex: none; min-height: 48px; }
.headline { display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.headline h2 { flex: 1; min-width: 0; font-size: 22px; font-weight: 720; letter-spacing: -.015em; }
.headline h2 .urg { color: var(--bad-ink); }
.upd { color: var(--ink-mute); font-size: 13px; margin-top: 2px; }
.tasks { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.task { display: flex; align-items: stretch; gap: 0; background: var(--surf); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.task::before { content: ""; width: 6px; flex: none; background: var(--pc, var(--mute)); }
.task .open { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; padding: 12px 10px 12px 12px; background: none; border: 0; text-align: left; cursor: pointer; color: inherit; min-height: 72px; }
.task .l1 { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.task .room { font-weight: 750; font-size: 15px; font-variant-numeric: tabular-nums; }
.task .ttl { font-weight: 650; font-size: 16.5px; line-height: 1.3; overflow-wrap: anywhere; }
.task .l3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--ink-mute); font-size: 13.5px; }
.task .l3 > span { display: inline-flex; align-items: center; gap: 4px; }
.task .l3 .ic { width: 16px; height: 16px; }
.task .l3 .late { color: var(--bad-ink); font-weight: 700; }
.task .l3 .pend { color: var(--amber-ink); font-weight: 700; }
.task .nx { flex: none; align-self: center; margin: 0 10px 0 2px; min-width: 96px; max-width: 42%; }
.task.done { opacity: .75; }
.task.done::before { background: var(--ok); }
.task.alarming { border-color: var(--bad); box-shadow: 0 0 0 2px var(--bad); }
.more-done { margin-top: 14px; }
.more-done summary { list-style: none; cursor: pointer; min-height: 48px; display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--ink-soft); }
.more-done summary::-webkit-details-marker { display: none; }
.more-done[open] summary .ic { transform: rotate(90deg); }

/* ---------- Task + room detail ---------- */
.dt-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dt-title { font-size: 24px; font-weight: 740; margin-top: 10px; overflow-wrap: anywhere; }
.dt-sub { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; color: var(--ink-soft); font-size: 15px; align-items: center; }
.dt-sub .roomlink { background: none; border: 0; padding: 0; min-height: 48px; font-weight: 700; color: var(--info-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 15.5px; }
.words { margin-top: 14px; border-radius: 14px; background: var(--surf-2); border: 1px solid var(--rule); padding: 14px; }
.words .lbl { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .04em; }
.words q { display: block; quotes: none; margin-top: 6px; font-size: 17px; line-height: 1.4; overflow-wrap: anywhere; }
.words .en { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--rule-strong); }
.kv { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 8px 14px; margin-top: 14px; font-size: 15px; }
.kv dt { color: var(--ink-mute); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.tl { list-style: none; margin: 10px 0 0; padding: 0; border-left: 2px solid var(--rule-strong); }
.tl li { position: relative; padding: 0 0 14px 16px; font-size: 14.5px; }
.tl li::before { content: ""; position: absolute; left: -6px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--surf); border: 2px solid var(--ink-mute); }
.tl li.ok::before { border-color: var(--ok); background: var(--ok); }
.tl li b { display: block; font-weight: 650; }
.tl li span { color: var(--ink-mute); font-size: 13.5px; }
.photos { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.photos .ph { width: 92px; height: 92px; border-radius: 12px; background: var(--surf-3) center / cover no-repeat; border: 1px solid var(--rule); }
.actbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: color-mix(in srgb, var(--ground) 92%, transparent); -webkit-backdrop-filter: blur(12px) saturate(1.3); backdrop-filter: blur(12px) saturate(1.3); border-top: 1px solid var(--rule); padding: 10px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)); }
.actbar .in { max-width: 760px; margin: 0 auto; display: flex; gap: 10px; }
.actbar .btn { flex: 1 1 0; min-width: 0; min-height: 58px; font-size: 17.5px; }
.actbar .btn.sec2 { flex: 0 1 auto; }
body.kbup .actbar { display: none; }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.field label { font-weight: 650; font-size: 15px; }
.field input, .field textarea, .field select { width: 100%; border: 1.5px solid var(--rule-strong); border-radius: 14px; background: var(--surf); padding: 12px 14px; min-height: 52px; font-size: 16px; color: var(--ink); }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--amber); box-shadow: var(--focus); }
.field .hint { font-size: 13.5px; color: var(--ink-mute); }
.form-err { color: var(--bad-ink); font-weight: 600; font-size: 14.5px; margin-top: 10px; }
.tools-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.tool { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--rule); background: var(--surf); cursor: pointer; text-align: left; font-weight: 650; color: var(--ink); box-shadow: var(--shadow); }
.tool .ic { color: var(--amber-ink); }
.tool span { min-width: 0; overflow-wrap: anywhere; }
.tool small { display: block; font-weight: 500; color: var(--ink-mute); font-size: 13px; }

/* ---------- Rooms ---------- */
.rs-dirty { --sc: var(--bad); --sbg: var(--bad-bg); --sink: var(--bad-ink); }
.rs-cleaning { --sc: var(--warn); --sbg: var(--warn-bg); --sink: var(--warn-ink); }
.rs-clean { --sc: var(--ok); --sbg: var(--ok-bg); --sink: var(--ok-ink); }
.rs-inspected { --sc: var(--info); --sbg: var(--info-bg); --sink: var(--info-ink); }
.rs-occupied { --sc: var(--vio); --sbg: var(--vio-bg); --sink: var(--vio-ink); }
.rs-out_of_order { --sc: var(--mute); --sbg: var(--mute-bg); --sink: var(--mute-ink); }
.rsum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.rsum button { min-height: 60px; border-radius: 14px; border: 1.5px solid var(--rule); background: var(--surf); padding: 8px 10px; text-align: left; cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 2px; color: var(--ink); box-shadow: inset 4px 0 0 var(--sc); min-width: 0; }
.rsum button b { font-size: 20px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.rsum button span { font-size: 13px; color: var(--ink-soft); font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
.rsum button[aria-pressed="true"] { border-color: var(--sc); background: var(--sbg); }
.filters { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.floor-h { display: flex; align-items: baseline; gap: 10px; margin: 18px 0 8px; font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.floor-h small { font-weight: 500; color: var(--ink-mute); }
.rgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.rt { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 118px; padding: 12px 12px 10px; border-radius: var(--r); background: var(--surf); border: 1px solid var(--rule); border-top: 6px solid var(--sc); text-align: left; cursor: pointer; color: var(--ink); box-shadow: var(--shadow); min-width: 0; }
.rt .u { display: flex; align-items: center; gap: 8px; }
.rt .u b { font-size: 22px; font-weight: 760; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.rt .u .ty { font-size: 12.5px; color: var(--ink-mute); font-weight: 700; }
.rt .u .cnt { margin-left: auto; display: flex; gap: 4px; flex: none; }
.rt .st { display: inline-flex; align-self: flex-start; align-items: center; gap: 6px; min-height: 26px; padding: 3px 10px; border-radius: 13px; background: var(--sbg); color: var(--sink); font-size: 13px; font-weight: 750; max-width: 100%; line-height: 1.2; overflow-wrap: anywhere; }
.rt .st .ic { width: 14px; height: 14px; stroke-width: 2.3; }
.rt .ln { font-size: 13px; color: var(--ink-soft); display: flex; align-items: center; gap: 6px; min-width: 0; }
.rt .ln .ic { width: 15px; height: 15px; color: var(--ink-mute); }
.rt .ln { align-items: flex-start; }
.rt .ln .ic { margin-top: 1px; }
.rt .ln span { min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.badge { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--ink); color: var(--surf); font-size: 12.5px; font-weight: 800; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.badge.bad { background: var(--bad); color: #fff; }
.rt.ooo { background-image: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--mute) 10%, transparent) 10px 20px); }
.room-head { display: flex; align-items: center; gap: 14px; }
.room-head .big { font-size: 40px; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.room-head .st { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--sbg); color: var(--sink); font-weight: 750; font-size: 15px; }
.stbtns { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 8px; margin-top: 10px; }
.stbtns button { min-height: 54px; border-radius: 14px; border: 1.5px solid var(--rule-strong); background: var(--surf); font-weight: 700; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--ink); box-shadow: inset 0 -4px 0 var(--sc); padding: 0 8px; text-align: center; }
.stbtns button[aria-pressed="true"] { background: var(--sbg); border-color: var(--sc); color: var(--sink); }
.stbtns button:disabled { opacity: .55; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 14px; }
.info-grid .box { background: var(--surf); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.info-grid .box small { display: block; color: var(--ink-mute); font-size: 13px; font-weight: 600; }
.info-grid .box b { display: block; font-size: 16.5px; margin-top: 2px; overflow-wrap: anywhere; }
.info-grid .box span { display: block; color: var(--ink-soft); font-size: 14px; overflow-wrap: anywhere; }

/* ---------- sign-in ---------- */
.signin-hero { text-align: center; padding: 14px 4px 4px; }
.signin-hero .mk { width: 64px; height: 64px; margin: 0 auto 12px; }
.signin-hero h1 { font-size: 27px; font-weight: 750; }
.signin-hero p { color: var(--ink-mute); margin-top: 6px; }
.demo-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--amber-soft); border: 1px solid rgba(242, 167, 65, .5); font-size: 14.5px; }
.demo-note .ic { color: var(--amber-ink); margin-top: 1px; }
.role-g { margin-top: 18px; }
.role-g h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 750; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; }
.role-g h3 .ic { width: 18px; height: 18px; color: var(--amber-ink); }
.plist { display: flex; flex-direction: column; gap: 8px; }
.prof { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--rule); background: var(--surf); text-align: left; cursor: pointer; color: var(--ink); box-shadow: var(--shadow); width: 100%; }
.prof .grow { flex: 1; min-width: 0; }
.prof .grow b { display: block; font-weight: 680; overflow-wrap: anywhere; }
.prof .grow span { display: block; font-size: 14px; color: var(--ink-mute); overflow-wrap: anywhere; }
.prof .tag { flex: none; }
.avi { width: 42px; height: 42px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 750; font-size: 15px; background: var(--navy); color: var(--amber); letter-spacing: .02em; }
.or { display: flex; align-items: center; gap: 12px; margin: 26px 0 6px; color: var(--ink-mute); font-size: 14px; font-weight: 600; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rule-strong); }

/* ---------- tab bar ---------- */
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 36; background: color-mix(in srgb, var(--surf) 94%, transparent); -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); border-top: 1px solid var(--rule); padding: 0 env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
.tabs .in { display: flex; max-width: 760px; margin: 0 auto; height: var(--tab-h); }
.tabs button { flex: 1 1 0; min-width: 0; border: 0; background: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; cursor: pointer; color: var(--ink-mute); font-size: 11.5px; font-weight: 650; padding: 4px 2px 2px; position: relative; }
.tabs button span.l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 2px; }
.tabs button .ic { width: 24px; height: 24px; }
.tabs button[aria-current="page"] { color: var(--ink); }
.tabs button[aria-current="page"] .ib2 { background: var(--amber-soft); }
.tabs button .ib2 { width: 52px; height: 30px; border-radius: 999px; display: grid; place-items: center; position: relative; }
.tabs button[aria-current="page"] .ic { color: var(--amber-ink); stroke-width: 2.2; }
.tabs .badge { position: absolute; top: -4px; right: 2px; min-width: 20px; height: 20px; font-size: 11.5px; padding: 0 5px; border: 2px solid var(--surf); }
body.detail .tabs, body.kbup .tabs, body.signin .tabs { display: none; }

/* ---------- sheets (bottom sheet on phones, dialog from 768 px) ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(5, 12, 22, .55); display: flex; align-items: flex-end; justify-content: center; padding-bottom: var(--kb); animation: fsFade .16s ease-out; }
.sheet { width: 100%; max-width: 640px; max-height: calc(var(--vvh) - 24px - env(safe-area-inset-top)); display: flex; flex-direction: column; background: var(--surf); color: var(--ink); border-radius: 22px 22px 0 0; box-shadow: var(--shadow-lg); animation: fsUp .2s ease-out; }
.sheet .sh-h { display: flex; align-items: center; gap: 10px; padding: 10px 10px 6px 18px; flex: none; }
.sheet .sh-h h2 { flex: 1; min-width: 0; font-size: 19px; font-weight: 720; overflow-wrap: anywhere; }
.sheet .sh-b { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 4px 18px calc(18px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
body.kbup .sheet .sh-b { padding-bottom: 14px; }
@media (min-width: 768px) {
  .scrim { align-items: center; padding: 24px; }
  .sheet { border-radius: 22px; max-height: min(86vh, calc(var(--vvh) - 48px)); }
}
@keyframes fsFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fsUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 12px; border-radius: 12px; border: 0; background: none; text-align: left; cursor: pointer; color: var(--ink); }
.opt:hover { background: var(--surf-2); }
.opt .grow { flex: 1; min-width: 0; }
.opt .grow b { display: block; font-weight: 650; overflow-wrap: anywhere; }
.opt .grow span { display: block; color: var(--ink-mute); font-size: 13.5px; overflow-wrap: anywhere; }
.opt[aria-checked="true"] { background: var(--amber-soft); }
.opt .ck { color: var(--amber-ink); }
.optlist { display: flex; flex-direction: column; gap: 2px; }
.me-h { display: flex; align-items: center; gap: 14px; padding: 6px 0 14px; }
.me-h .avi { width: 56px; height: 56px; font-size: 19px; }
.me-h b { display: block; font-size: 18px; }
.me-h span { color: var(--ink-mute); font-size: 14px; }
.setrow { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.setrow > .ic { color: var(--ink-mute); }
.setrow .grow { flex: 1 1 160px; min-width: 0; }
.setrow .grow b { display: block; font-weight: 650; }
.setrow .grow span { display: block; color: var(--ink-mute); font-size: 13.5px; }
.seg3 { display: flex; border: 1.5px solid var(--rule-strong); border-radius: 12px; overflow: hidden; flex: none; }
.seg3 button { min-height: 48px; min-width: 48px; padding: 0 12px; border: 0; background: var(--surf); cursor: pointer; font-weight: 650; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; color: var(--ink); }
.seg3 button + button { border-left: 1.5px solid var(--rule-strong); }
.seg3 button[aria-pressed="true"] { background: var(--ink); color: var(--surf); }
.steps { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: s; display: flex; flex-direction: column; gap: 12px; }
.steps li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps li::before { content: counter(s); flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: var(--amber); display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.steps li div { flex: 1; min-width: 0; padding-top: 4px; overflow-wrap: anywhere; }
.steps .glyph { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--surf-3); vertical-align: middle; margin: 0 2px; }
.steps .glyph .ic { width: 19px; height: 19px; color: var(--info-ink); }

/* ---------- toasts ---------- */
#toasts { position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + 14px + env(safe-area-inset-bottom) + var(--kb)); z-index: 80; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
body.detail #toasts { bottom: calc(92px + env(safe-area-inset-bottom) + var(--kb)); }
body.kbup #toasts { bottom: calc(14px + var(--kb)); }
.toast { max-width: 520px; background: var(--ink); color: var(--surf); padding: 12px 16px; border-radius: 14px; font-weight: 600; font-size: 15px; box-shadow: var(--shadow-lg); animation: fsUp .18s ease-out; overflow-wrap: anywhere; }

/* ---------- in-app alarm fallback (only when agent B's alarm.js did not load): full screen, one big button ---------- */
.fb-alarm { position: fixed; inset: 0; z-index: 95; background: #B3261E; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom)); text-align: center; }
.fb-alarm .lv { font-size: 15px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; opacity: .9; }
.fb-alarm h2 { font-size: 30px; font-weight: 800; overflow-wrap: anywhere; max-width: 640px; }
.fb-alarm .rm { font-size: 22px; font-weight: 700; }
.fb-alarm .btn { margin-top: 18px; min-height: 72px; min-width: min(320px, 100%); font-size: 21px; background: #fff; color: #7A1610; border: 0; border-radius: 20px; }
.fb-alarm .more { font-size: 14px; opacity: .85; }
body.sheet-open { overflow: hidden; }
@media (max-width: 400px) { .top-in.off .demo-chip { display: none; } }
.top-in.dt .brand .mk { display: none; }

/* ---------- placeholder for panes that did not load ---------- */
.calm { text-align: center; padding: 40px 18px; color: var(--ink-mute); }
.calm .ic { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--amber-ink); }
.calm b { display: block; color: var(--ink); font-size: 18px; margin-bottom: 6px; }

/* portraits (FS.portrait): the picture over its initial; a broken picture leaves the initial */
.fsp { position: relative; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; background: var(--navy); color: var(--amber); font-weight: 750; flex: none; vertical-align: middle; }
.fsp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fsp.noimg img { display: none; }
.fsp svg { width: 100%; height: 100%; }

[dir="rtl"] .task::before { order: 2; }
[dir="rtl"] .brand, [dir="rtl"] .task .open, [dir="rtl"] .prof, [dir="rtl"] .opt, [dir="rtl"] .rt, [dir="rtl"] .tool { text-align: right; }
[dir="rtl"] .rt .u .cnt { margin-left: 0; margin-right: auto; }
[dir="rtl"] .tl { border-left: 0; border-right: 2px solid var(--rule-strong); }
[dir="rtl"] .tl li { padding: 0 16px 14px 0; }
[dir="rtl"] .tl li::before { left: auto; right: -6px; }
[dir="rtl"] .ic.flip { transform: scaleX(-1); }

@media (min-width: 768px) {
  .hello { padding: 22px 24px; }
  .hello h1 { font-size: 28px; }
  .rsum { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 359px) {
  .wrap { padding-left: 12px; padding-right: 12px; }
  .task .nx { min-width: 84px; padding: 0 10px; font-size: 14.5px; }
  .hello h1 { font-size: 22px; }
  .rgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .rsum button span { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .net-wait .d, .dot-pulse { animation: none; opacity: 1; }
  .scrim, .sheet, .toast { animation: none; }
}

/* ===================================================================== role versions (CONTRACTS §17.1, agent UI, 05.11.2026)
   One calm home per job: a compact navy head (title, greeting, shift), ONE big "Next job" card, then only that job's sections.
   Touch targets >= 48 px, the primary ones >= 56 px. Light + dark through the same tokens as the rest of the app. */
.vhead { padding: 16px 16px 14px; }
.vhead .vh-top { display: flex; align-items: flex-start; gap: 10px 12px; position: relative; flex-wrap: wrap; }
.vhead .vh-t { flex: 1 1 170px; min-width: 0; }
.vhead h1 { font-size: 25px; font-weight: 740; overflow-wrap: anywhere; }
.vhead .vh-g { color: var(--hdr-mute); font-size: 14.5px; margin-top: 3px; overflow-wrap: anywhere; }
.vhead .vh-shift { flex: none; min-height: 48px; font-size: 15.5px; }
.vhead .vh-shift.pri { background: var(--amber); color: #2A1A04; }
.vhead .vh-shift.ghost { color: var(--hdr-ink); border-color: var(--hdr-rule); }
.vhead .vh-st { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; position: relative; color: var(--hdr-mute); font-size: 14px; }
.vhead .vh-st .chip { background: rgba(242, 167, 65, .18); color: var(--amber); }
.vhead .vh-st > span:not(.chip) { display: inline-flex; align-items: center; gap: 7px; min-width: 0; overflow-wrap: anywhere; }
.vhead .vh-st .on { width: 10px; height: 10px; border-radius: 50%; background: #3FD18E; box-shadow: 0 0 0 4px rgba(63, 209, 142, .2); flex: none; }

/* the Next job card */
.nextjob { display: flex; flex-direction: column; gap: 10px; width: 100%; margin-top: 14px; padding: 14px 16px 14px 20px; border-radius: 20px; border: 1.5px solid var(--rule-strong); background: var(--surf); color: var(--ink); text-align: left; cursor: pointer; box-shadow: inset 8px 0 0 var(--pc, var(--amber)), var(--shadow); min-height: 136px; position: relative; font: inherit; }
.nextjob:active:not(.clear) { transform: translateY(1px); }
.nextjob.p1 { background: var(--bad-bg); border-color: var(--bad); }
.nextjob.alarming { box-shadow: inset 8px 0 0 var(--bad), 0 0 0 3px var(--bad); }
.nextjob.clear { cursor: default; min-height: 0; box-shadow: inset 8px 0 0 var(--ok), var(--shadow); }
.nj-k { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--amber-ink); }
.nj-k .ic { width: 17px; height: 17px; }
.nj-m { display: flex; align-items: center; gap: 14px; min-width: 0; }
.nj-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nj-b b { font-size: 20px; font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; }
.nj-b span { color: var(--ink-soft); font-size: 15px; overflow-wrap: anywhere; }
.nj-f { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--ink-mute); }
.nj-f .late { color: var(--bad-ink); font-weight: 700; }
.nj-f .pend { color: var(--amber-ink); font-weight: 700; }
.nj-go { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-weight: 750; color: var(--info-ink); font-size: 15px; }
[dir="rtl"] .nj-go { margin-left: 0; margin-right: auto; }
[dir="rtl"] .nextjob, [dir="rtl"] .vrow, [dir="rtl"] .gmsg, [dir="rtl"] .rolet, [dir="rtl"] .alarmc .open { text-align: right; }

/* the room / unit box */
.vu { flex: none; min-width: 56px; height: 56px; padding: 0 8px; border-radius: 14px; background: var(--navy); color: var(--amber); display: grid; place-items: center; font-weight: 780; font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; border: 1px solid var(--rule-strong); line-height: 1; }
.vu .ic { width: 24px; height: 24px; }
.vu.nj-u { min-width: 66px; height: 66px; font-size: 24px; border-radius: 16px; }
.vu.ok { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.vu.bad { background: var(--bad-bg); color: var(--bad-ink); border-color: transparent; }

/* lists of rows (rooms, departures, recurring faults, shifts) */
.vlist { display: flex; flex-direction: column; gap: 8px; }
.vrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 10px 12px 10px 16px; border-radius: 16px; border: 1px solid var(--rule); background: var(--surf); color: var(--ink); text-align: left; cursor: pointer; box-shadow: inset 5px 0 0 var(--sc, var(--rule-strong)), var(--shadow); font: inherit; min-width: 0; }
.vrow.static { cursor: default; }
.vrow .vr-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.vrow .vr-b > b { font-size: 16.5px; font-weight: 720; overflow-wrap: anywhere; line-height: 1.25; }
.vrow .vr-b > b small { font-weight: 600; color: var(--ink-mute); font-size: 13px; }
.vr-why { color: var(--ink-soft); font-size: 14px; display: flex; align-items: center; gap: 5px; overflow-wrap: anywhere; min-width: 0; }
.vr-why .ic { width: 16px; height: 16px; color: var(--ink-mute); }
.vr-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.vr-s { flex: none; color: var(--ink-mute); display: grid; place-items: center; }
.vrow.vdone { opacity: .7; }
.rst { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 3px 10px; border-radius: 13px; background: var(--sbg, var(--mute-bg)); color: var(--sink, var(--mute-ink)); font-size: 13px; font-weight: 750; line-height: 1.2; max-width: 100%; overflow-wrap: anywhere; }
.rst .ic { width: 14px; height: 14px; stroke-width: 2.3; }
.vsec-h { min-height: 40px; }
.vtasks .headline { margin-top: 4px; }
.vlinks { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-top: 16px; }
.vlink { min-height: 56px; }
.tool.block { width: 100%; }
.ok-empty { border-color: color-mix(in srgb, var(--ok) 50%, transparent); }
.warn-note { color: var(--bad-ink); font-weight: 650; }
.warn-note .ic { color: var(--bad-ink); }

/* cleaning: one room */
.cr-why { margin-top: 10px; font-size: 15.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.cr-why b { color: var(--ink); }
.vacts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.btn.big { min-height: 64px; font-size: 18.5px; border-radius: 18px; width: 100%; }
.btn.big .ic { width: 24px; height: 24px; }
.rstrip { margin-bottom: 12px; }
.rstrip button { min-width: 64px; font-variant-numeric: tabular-nums; font-weight: 750; }
.rstrip button .sw { background: var(--sc, var(--mute)); }
.clbar { height: 10px; border-radius: 6px; background: var(--surf-3); overflow: hidden; margin: 0 0 4px; }
.clbar i { display: block; height: 100%; background: var(--ok); border-radius: 6px; transition: width .2s ease-out; }
.cl-a { font-size: 13px; font-weight: 750; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .05em; margin: 16px 0 6px; }
.cl-list { display: flex; flex-direction: column; gap: 6px; }
.cl-i { display: flex; align-items: flex-start; gap: 12px; min-height: 56px; padding: 12px; border-radius: 14px; border: 1px solid var(--rule); background: var(--surf); cursor: pointer; position: relative; }
.cl-i input { position: absolute; left: 12px; top: 14px; width: 28px; height: 28px; margin: 0; opacity: 0; }
.cl-i:focus-within { box-shadow: var(--focus); }
.cl-b { flex: none; width: 28px; height: 28px; border-radius: 8px; border: 2px solid var(--rule-strong); display: grid; place-items: center; background: var(--surf); color: transparent; }
.cl-b .ic { width: 18px; height: 18px; stroke-width: 2.6; }
.cl-i.on { background: var(--ok-bg); border-color: transparent; }
.cl-i.on .cl-b { background: var(--ok); border-color: var(--ok); color: #fff; }
.cl-t { flex: 1; min-width: 0; font-size: 15.5px; line-height: 1.4; padding-top: 2px; overflow-wrap: anywhere; }
.rnotes { display: flex; flex-direction: column; gap: 8px; }
.rnote { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--surf); border: 1px solid var(--rule); }
.rnote > .ic { margin-top: 2px; color: var(--ink-mute); }
.rnote.k-linen > .ic { color: var(--info-ink); }
.rnote.k-minibar > .ic { color: var(--vio-ink); }
.rnote .grow { flex: 1; min-width: 0; }
.rnote b { display: block; font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-mute); }
.rnote span { display: block; overflow-wrap: anywhere; }
.rnote small { display: block; color: var(--ink-mute); font-size: 12.5px; margin-top: 2px; }

/* reception: arrivals, guests' messages */
.arrs, .gmsgs, .alarms { display: flex; flex-direction: column; gap: 10px; }
.arr { background: var(--surf); border: 1px solid var(--rule); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); min-width: 0; }
.arr-h { display: flex; align-items: center; gap: 12px; }
.arr-h .grow { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.arr-h .grow b { font-size: 17px; overflow-wrap: anywhere; }
.arr-t { flex-basis: 100%; color: var(--ink-soft); font-size: 14px; display: flex; align-items: center; gap: 5px; }
.arr-t .ic { width: 16px; height: 16px; color: var(--ink-mute); }
.spec { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.spec li { display: flex; gap: 6px; align-items: flex-start; font-size: 14.5px; background: var(--amber-soft); border-radius: 10px; padding: 7px 10px; overflow-wrap: anywhere; }
.spec li .ic { margin-top: 1px; color: var(--amber-ink); width: 16px; height: 16px; }
.spec li span { min-width: 0; }
.arr-a { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--rule-strong); }
.arr-c { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0; }
.arr .chip, .vr-tags .chip, .nj-f .chip, .gm-h .chip { white-space: normal; height: auto; min-height: 26px; padding: 4px 10px; line-height: 1.2; overflow-wrap: anywhere; max-width: 100%; }
.arr-c .pend { color: var(--amber-ink); font-weight: 700; font-size: 13.5px; }
.gmsg { display: flex; flex-direction: column; gap: 6px; width: 100%; text-align: left; padding: 12px 14px 12px 18px; border-radius: 16px; border: 1px solid var(--rule); background: var(--surf); color: var(--ink); cursor: pointer; box-shadow: inset 5px 0 0 var(--warn), var(--shadow); min-height: 64px; font: inherit; min-width: 0; }
.gmsg.static { cursor: default; }
.gmsg.ans { box-shadow: inset 5px 0 0 var(--ok), var(--shadow); }
.gm-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.gm-h b { font-size: 16px; overflow-wrap: anywhere; }
.gm-h .room { font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.gm-at { margin-left: auto; color: var(--ink-mute); font-size: 13px; }
[dir="rtl"] .gm-at { margin-left: 0; margin-right: auto; }
.gm-q { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; quotes: none; font-size: 16px; line-height: 1.4; overflow-wrap: anywhere; }
.gm-en { display: block; border-top: 1px dashed var(--rule-strong); padding-top: 6px; }
.gm-en small { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-mute); text-transform: uppercase; letter-spacing: .04em; }
.gm-en q { quotes: none; display: block; overflow-wrap: anywhere; }
.hov { background: var(--surf); border: 1px solid var(--rule); border-radius: 14px; padding: 12px 14px; overflow-wrap: anywhere; white-space: pre-wrap; }
.hov small { display: block; color: var(--ink-mute); font-size: 13px; margin-top: 6px; white-space: normal; }
.drtext { white-space: pre-wrap; background: var(--surf-2); border: 1px solid var(--rule); border-radius: 14px; padding: 14px; font-size: 16.5px; line-height: 1.45; margin-top: 10px; overflow-wrap: anywhere; }

/* manager: alarms, open by role, KPIs */
.alarmc { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: 16px; background: var(--bad-bg); border: 2px solid var(--bad); }
.alarmc .open { flex: 1 1 200px; min-width: 0; background: none; border: 0; text-align: left; color: var(--ink); display: flex; flex-direction: column; gap: 4px; cursor: pointer; padding: 0; min-height: 56px; font: inherit; }
.ac-k { font-size: 12.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bad-ink); display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.alarmc .open b { font-size: 17px; overflow-wrap: anywhere; line-height: 1.3; }
.ac-l { font-size: 14px; color: var(--ink-soft); display: flex; gap: 5px; align-items: center; overflow-wrap: anywhere; }
.ac-l .ic, .ac-k .ic { width: 16px; height: 16px; flex: none; }
.alarmc .ack { flex: 1 0 140px; min-height: 56px; background: var(--bad); color: #fff; border-color: transparent; }
.rolegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.rolet { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--rule); background: var(--surf); text-align: left; cursor: pointer; color: var(--ink); box-shadow: var(--shadow); min-width: 0; font: inherit; }
.rolet > .ic { color: var(--amber-ink); }
.rolet .grow { flex: 1; min-width: 0; }
.rolet .grow b { display: block; font-size: 15px; overflow-wrap: anywhere; }
.rolet .grow span { display: block; font-size: 13px; color: var(--ink-mute); overflow-wrap: anywhere; }
.rolet .rn { flex: none; font-size: 24px; font-weight: 780; font-variant-numeric: tabular-nums; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kpi { background: var(--surf); border: 1px solid var(--rule); border-radius: 14px; padding: 10px 12px; min-width: 0; box-shadow: inset 0 -3px 0 var(--kc, transparent); }
.kpi b { display: block; font-size: 19px; font-weight: 780; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; line-height: 1.2; }
.kpi span { display: block; font-size: 12.5px; color: var(--ink-soft); font-weight: 600; overflow-wrap: anywhere; line-height: 1.25; margin-top: 3px; }
.kpi.ok { --kc: var(--ok); }
.kpi.bad { --kc: var(--bad); }

/* photos with their kind (before / after / proof) */
.phw { display: inline-flex; flex-direction: column; gap: 4px; align-items: center; }
.phw small { font-size: 12.5px; color: var(--ink-mute); font-weight: 650; }

/* the assistant's face in the tab bar */
.tabs .tav { display: grid; place-items: center; }
.tabs .tav .fsp { width: 26px !important; height: 26px !important; font-size: 12px !important; }
.tabs button.tp[aria-current="page"] .fsp { box-shadow: 0 0 0 2px var(--amber); }
.tool .fsp { flex: none; }

@media (min-width: 768px) {
  .kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .vhead h1 { font-size: 28px; }
}
@media (max-width: 359px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vhead h1 { font-size: 22px; }
  .nj-b b { font-size: 18.5px; }
  .vu { min-width: 50px; height: 50px; font-size: 17px; }
  .vu.nj-u { min-width: 58px; height: 58px; font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { .clbar i { transition: none; } }

/* ---- JT3 §18: the generic section renderer (every table-driven version) ---- */
.kpis.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vu.warnu { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.vbar { display: block; height: 8px; margin-top: 6px; border-radius: 4px; background: var(--mute-bg); overflow: hidden; }
.vbar i { display: block; height: 100%; border-radius: 4px; background: var(--navy); }
.vr-n { flex: none; min-width: 32px; text-align: right; font-size: 22px; font-weight: 800; align-self: center; font-variant-numeric: tabular-nums; }
[dir="rtl"] .vr-n { text-align: left; }
.vrow.p1 { border-color: var(--bad); }
.vrow .vr-why.selectable { font-style: italic; overflow-wrap: anywhere; }
@media (prefers-color-scheme: dark) { .vbar i { background: var(--amber); } }
