* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: var(--w-body) var(--fs-md)/1.5 var(--font-body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: var(--w-head); margin: 0; line-height: 1.2; letter-spacing: -.01em; }
svg.i { width: 20px; height: 20px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Sidebar ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); background: var(--nav-bg, var(--brand)); color: #fff; display: flex; flex-direction: column; z-index: 30; transition: width .2s; }
.sidebar-top { padding: 20px 18px 14px; display: flex; align-items: center; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 24px; letter-spacing: -.02em; }
.brand-mark { width: 40px; height: 40px; border-radius: 50%; border: 2px dotted rgba(255,255,255,.55); display: grid; place-items: center; flex-shrink: 0; }
.brand-mark svg { width: 24px; height: 24px; }
.brand .dot { color: var(--sun); }
.collapse-btn { margin-left: auto; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; }
.collapse-btn:hover { background: rgba(255,255,255,.22); }
.store { margin: 6px 14px 14px; padding: 10px 12px; border: 1.5px solid rgba(255,255,255,.55); border-radius: var(--radius-sm); display: flex; align-items: center; gap: 10px; }
.store b { display: block; font-weight: 700; font-size: 15px; letter-spacing: .02em; }
.store small { display: block; font-size: 13px; opacity: .8; }
.nav { padding: 6px 12px; overflow-y: auto; flex: 1; border-top: 1px solid rgba(255,255,255,.18); }
.nav a { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; padding: 11px 12px; border-radius: var(--radius-sm); margin: 3px 0; font-weight: 500; font-size: 16px; position: relative; }
.nav a:hover { background: rgba(255,255,255,.1); }
.nav a.active { background: var(--brand-deep); }
.nav a.active::before { content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 4px; border-radius: 4px; background: var(--aqua); }
.nav .count { margin-left: auto; background: rgba(255,255,255,.18); border-radius: var(--radius-pill); font-size: 13px; padding: 1px 9px; }
.nav .group-label { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; padding: 14px 12px 4px; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.18); padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--action); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.who b { display: block; font-size: 15px; }
.who small { display: block; font-size: 13px; opacity: .8; }
.demo-switch { margin-top: 4px; font-size: 13px; background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 4px; padding: 2px 4px; max-width: 150px; }
.demo-switch option { color: var(--ink); }

body.nav-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
body.nav-collapsed .sidebar .label, body.nav-collapsed .sidebar .brand-text, body.nav-collapsed .store-text,
body.nav-collapsed .nav .count, body.nav-collapsed .nav .group-label, body.nav-collapsed .who { display: none; }
body.nav-collapsed .sidebar-top { flex-direction: column; padding: 16px 0; }
body.nav-collapsed .collapse-btn { margin: 0; transform: rotate(180deg); }
body.nav-collapsed .store { justify-content: center; margin: 6px 10px 12px; padding: 10px 0; }
body.nav-collapsed .nav a { justify-content: center; padding: 12px 0; }
body.nav-collapsed .sidebar-foot { justify-content: center; }
body.nav-collapsed .shell { margin-left: var(--sidebar-w-collapsed); }

/* ---------- Shell ---------- */
.shell { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .2s; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); height: 68px; display: flex; align-items: center; gap: var(--s4); padding: 0 var(--s6); position: sticky; top: 0; z-index: 20; }
.topbar .menu-btn { display: none; }
.topbar .place { font-weight: 500; color: var(--ink); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.topbar .place svg { color: var(--brand); }
.search-box { margin-left: auto; display: flex; align-items: center; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 0 12px; width: min(380px, 40vw); background: var(--surface); }
.search-box input { border: 0; outline: 0; padding: 10px 6px; flex: 1; min-width: 0; background: transparent; }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); display: grid; place-items: center; position: relative; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn .badge-dot { position: absolute; top: 6px; right: 7px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--action); color: #fff; font-size: 11px; display: grid; place-items: center; padding: 0 4px; font-weight: 700; }
main { flex: 1; width: 100%; max-width: 1360px; margin: 0 auto; padding: var(--s6) var(--s6) var(--s7); }
.footer { text-align: center; color: var(--muted); font-size: var(--fs-xs); padding: 0 var(--s5) var(--s5); }

.demo-banner { background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--sample-line); padding: 8px var(--s6); font-size: var(--fs-sm); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.demo-banner b { font-weight: 700; }

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); padding-bottom: var(--s4); border-bottom: 1px solid var(--line); }
.eyebrow { font-size: var(--fs-sm); color: var(--muted); font-weight: 500; }
.page-head h1 { font-size: var(--fs-2xl); margin-top: 4px; }
.page-head h1 .sun-dot { color: var(--sun); }
.page-head p { margin: 6px 0 0; color: var(--ink-2); }
.head-actions { display: flex; gap: var(--s2); flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: var(--radius-pill); padding: 10px 20px; font-weight: 500; font-size: var(--fs-md); border: 2px solid transparent; text-decoration: none; white-space: nowrap; line-height: 1.2; }
.btn svg.i { width: 18px; height: 18px; }
.btn-primary { background: var(--action); color: #fff; }
.btn-primary:hover { background: var(--action-deep); }
.btn-outline { background: var(--surface); color: var(--brand); border-color: var(--brand); }
.btn-outline:hover { background: var(--info-bg); }
.btn-quiet { background: transparent; color: var(--brand); padding: 8px 10px; }
.btn-quiet:hover { background: var(--surface-2); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: var(--bad); }
.btn-sm { padding: 6px 14px; font-size: var(--fs-sm); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }

/* ---------- Cards & layout ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); min-width: 0; }
.card-pad { padding: var(--s5); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s5) var(--s5) var(--s3); flex-wrap: wrap; }
.card-head h2 { font-size: var(--fs-lg); display: flex; align-items: center; gap: 10px; }
.card-head .period { display: block; font-size: var(--fs-sm); color: var(--muted); font-weight: 400; margin-top: 2px; }
.card-head .n { font-size: var(--fs-sm); font-weight: 500; background: var(--idle-bg); color: var(--idle); border-radius: var(--radius-pill); padding: 2px 10px; }
.card-body { padding: 0 var(--s5) var(--s5); }

.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.dash > .full { grid-column: 1 / -1; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); }
.stack > * + * { margin-top: var(--s5); }

/* Quick actions (Signal-style) */
.quick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.quick button { background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--radius); padding: 22px; display: flex; align-items: center; justify-content: center; gap: 14px; font-weight: 700; font-size: var(--fs-lg); color: var(--ink); }
.quick button:hover { border-color: var(--action); }
.quick .qi { width: 44px; height: 44px; border: 2px solid var(--action); border-radius: 8px; display: grid; place-items: center; color: var(--action); }
.quick .qi svg { width: 24px; height: 24px; }

/* Big counts */
.counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.count-cell { padding: var(--s3) var(--s5) var(--s5); border-left: 1px solid var(--line); display: flex; flex-direction: column; align-items: flex-start; gap: 4px; background: none; border-top: 0; border-right: 0; border-bottom: 0; text-align: left; }
.count-cell:first-child { border-left: 0; }
button.count-cell:hover .big { color: var(--brand); }
.big { font-size: var(--fs-num); font-weight: var(--w-number); line-height: 1; letter-spacing: -.02em; color: var(--ink); }
.big.zero { color: var(--line-strong); }
.count-cell .lbl { color: var(--ink-2); font-size: var(--fs-md); }
.count-cell .sub { color: var(--muted); font-size: var(--fs-sm); }
.alert-line { display: flex; gap: var(--s5); flex-wrap: wrap; padding: 0 var(--s5) var(--s3); }
.alert-line button { background: none; border: 0; padding: 0; display: inline-flex; gap: 6px; align-items: center; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.alert-line .bad { color: var(--bad); }
.alert-line .warn { color: var(--warn); }

/* KPI cards */
.kpi { padding: var(--s5); display: flex; flex-direction: column; gap: 6px; }
.kpi-top { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-md); }
.kpi-top svg { color: var(--brand); }
.kpi .period { color: var(--muted); font-size: var(--fs-sm); }
.kpi .big { margin-top: 10px; font-size: 40px; }
.kpi .second { font-weight: 500; color: var(--ink-2); }
.kpi .source { margin-top: auto; padding-top: 10px; font-size: var(--fs-xs); color: var(--muted); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 10px; border-radius: 4px; white-space: nowrap; }
.badge svg.i { width: 14px; height: 14px; stroke-width: 2.4; }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.b-info { background: var(--info-bg); color: var(--info); }
.b-idle { background: var(--idle-bg); color: var(--idle); }
.b-sample { background: var(--sample-bg); color: var(--sample-ink); border: 1px dashed var(--sample-line); }
.b-planned { background: var(--planned-bg); color: var(--planned-ink); border: 1px dashed var(--planned-line); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 2px 10px; border-radius: var(--radius-pill); white-space: nowrap; }

/* Rows / lists */
.rows { border-top: 1px solid var(--line); }
.row { display: flex; align-items: center; gap: var(--s3); padding: 14px var(--s5); border-bottom: 1px solid var(--line); min-width: 0; }
.row:last-child { border-bottom: 0; }
.row.clickable { cursor: pointer; }
.row.clickable:hover { background: var(--surface-2); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 500; overflow-wrap: anywhere; }
.row-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; color: var(--muted); font-size: var(--fs-sm); margin-top: 4px; align-items: center; }
.row-end { display: flex; align-items: center; gap: var(--s2); flex-shrink: 0; }
.row .chev { color: var(--ink-2); }
.done .row-title { text-decoration: line-through; color: var(--muted); }
.check { appearance: none; width: 22px; height: 22px; border: 2px solid var(--line-strong); border-radius: 6px; margin: 0; flex-shrink: 0; cursor: pointer; display: grid; place-items: center; background: var(--surface); }
.check:checked { background: var(--brand); border-color: var(--brand); }
.check:checked::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) translate(-1px, -1px); }
.overdue { color: var(--bad); font-weight: 500; }
.empty { padding: var(--s6) var(--s5); text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink-2); font-size: var(--fs-md); margin-bottom: 4px; }

/* Tabs */
.tabs { display: flex; gap: var(--s5); padding: 0 var(--s5); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 0 12px; color: var(--ink-2); font-weight: 500; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--action); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-pill); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: var(--radius-pill); padding: 6px 14px; font-weight: 500; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Toolbar / filters */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: center; margin-bottom: var(--s4); }
.field { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: var(--fs-sm); color: var(--ink-2); }
.input, select.input, textarea.input { border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 10px 12px; background: var(--surface); font-size: var(--fs-md); color: var(--ink); width: 100%; font-weight: 400; }
textarea.input { resize: vertical; min-height: 84px; }
.toolbar .input { width: auto; min-width: 160px; }
.toolbar .grow { flex: 1; min-width: 200px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.form-grid .span { grid-column: 1 / -1; }
.hint { font-size: var(--fs-xs); color: var(--muted); font-weight: 400; }

/* Tool cards (ControlPoint-style) */
.tool { display: flex; align-items: center; gap: var(--s5); padding: var(--s6) var(--s5); text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-align: left; width: 100%; }
.tool:hover { border-color: var(--brand); }
.tool-icon { width: 56px; height: 56px; display: grid; place-items: center; color: var(--brand); flex-shrink: 0; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.tool-icon svg { width: 30px; height: 30px; stroke-width: 1.7; }
.tool h3 { color: var(--brand); font-size: 24px; font-weight: 500; }
.tool p { margin: 4px 0 0; color: var(--ink-2); }
.tool .chev { margin-left: auto; color: var(--brand); }

/* Projects */
.progress { height: 8px; background: var(--idle-bg); border-radius: 8px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--aqua); border-radius: 8px; }
.proj-card { padding: var(--s5); display: flex; flex-direction: column; gap: 10px; cursor: pointer; text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.proj-card:hover { border-color: var(--brand); }
.proj-card h3 { font-size: var(--fs-lg); }
.proj-stats { display: flex; gap: var(--s4); flex-wrap: wrap; font-size: var(--fs-sm); color: var(--ink-2); }

/* Meetings */
.dateblock { width: 56px; flex-shrink: 0; text-align: center; border: 1.5px solid var(--line); border-radius: 8px; padding: 6px 0; background: var(--surface-2); }
.dateblock small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--action); }
.dateblock b { font-size: 22px; font-weight: 500; }
.avatars { display: flex; }
.avatars .avatar { border: 2px solid var(--surface); margin-left: -6px; background: var(--nav-bg, var(--brand)); }
.avatars .avatar:first-child { margin-left: 0; }

/* Board */
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: var(--s4); overflow-x: auto; padding-bottom: 4px; }
.col { background: var(--col-bg); border-radius: var(--radius); padding: var(--s3); min-height: 200px; }
.col h3 { font-size: var(--fs-md); display: flex; justify-content: space-between; padding: 4px 6px 10px; }
.col .bcard { background: var(--surface); border-radius: 8px; padding: 12px; margin-bottom: 8px; box-shadow: var(--shadow); border: 1px solid var(--line); cursor: pointer; width: 100%; text-align: left; }
.col .bcard:hover { border-color: var(--brand); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal .dow { background: var(--surface-2); font-weight: 700; font-size: var(--fs-sm); padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 110px; padding: 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: var(--fs-sm); min-width: 0; }
.cal .day.out { background: var(--surface-2); color: var(--muted); }
.cal .day.today .dn { background: var(--action); color: #fff; border-radius: 50%; }
.cal .dn { display: inline-grid; place-items: center; width: 26px; height: 26px; font-weight: 500; }
.ev { display: block; width: 100%; text-align: left; border: 0; border-radius: 4px; padding: 2px 6px; margin-top: 3px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; }
.ev.t { background: var(--info-bg); border-color: var(--brand); }
.ev.m { background: var(--bad-bg); border-color: var(--action); }
.ev.e { background: var(--warn-bg); border-color: #d08a00; }

/* Charts */
.chart-wrap { padding: 0 var(--s5) var(--s5); }
.chart-wrap svg { width: 100%; height: auto; display: block; overflow: visible; }
.legend { display: flex; gap: var(--s4); flex-wrap: wrap; align-items: center; padding: var(--s3) var(--s5); font-weight: 500; font-size: var(--fs-sm); }
.legend label { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.legend input { width: 20px; height: 20px; accent-color: var(--brand); }
.swatch { width: 22px; height: 0; border-top: 3px solid; display: inline-block; }
.swatch.dash { border-top-style: dashed; }
.donut-legend { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.donut-legend .sq { width: 18px; height: 18px; border-radius: 4px; flex-shrink: 0; }
.hbar { display: grid; grid-template-columns: minmax(110px, 200px) 1fr auto; align-items: center; gap: var(--s3); padding: 6px 0; }
.hbar .bar { height: 22px; background: var(--series-1); border-radius: 0 4px 4px 0; }
.chart-toolbar { display: flex; gap: var(--s3); flex-wrap: wrap; align-items: center; padding: var(--s4) var(--s5); border-bottom: 1px solid var(--line); }
.date-nav { display: flex; align-items: center; gap: 6px; }
.round { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; color: var(--ink); }
.date-pill { border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 9px 16px; font-weight: 500; min-width: 190px; text-align: center; }
table.data { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
table.data th { text-align: left; background: var(--surface-2); padding: 10px 12px; font-weight: 700; text-transform: uppercase; font-size: 13px; letter-spacing: .04em; color: var(--ink-2); }
table.data td { padding: 10px 12px; border-top: 1px solid var(--line); }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-scroll { overflow-x: auto; }

/* Notices */
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info); margin-bottom: var(--s4); font-size: var(--fs-sm); }
.notice.sample { background: var(--sample-bg); color: var(--sample-ink); }
.notice.planned { background: var(--planned-bg); color: var(--planned-ink); }
.notice svg { margin-top: 1px; }

/* Drawer & dialogs */
.drawer { position: fixed; inset: 0 0 0 auto; width: min(620px, 100%); background: var(--surface); box-shadow: var(--shadow-lg); z-index: 60; display: flex; flex-direction: column; transform: translateX(105%); transition: transform .22s; }
.drawer.open { transform: none; }
.scrim { position: fixed; inset: 0; background: rgba(3, 40, 52, .35); z-index: 55; opacity: 0; pointer-events: none; transition: opacity .2s; }
.scrim.open { opacity: 1; pointer-events: auto; }
.drawer-head { padding: var(--s5); border-bottom: 1px solid var(--line); display: flex; gap: var(--s3); align-items: flex-start; }
.drawer-head h2 { font-size: 24px; flex: 1; }
.drawer-body { padding: var(--s5); overflow-y: auto; flex: 1; }
.drawer-body h3 { font-size: var(--fs-md); margin: var(--s5) 0 var(--s2); display: flex; align-items: center; gap: 8px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px var(--s3); font-size: var(--fs-sm); }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; }
.comment { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment p { margin: 2px 0 0; }
.activity { font-size: var(--fs-sm); color: var(--ink-2); border-left: 2px solid var(--line); padding-left: 12px; }
.activity div { padding: 3px 0; }
dialog { border: 0; border-radius: var(--radius-lg); padding: 0; background: var(--surface); width: min(640px, calc(100% - 24px)); max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); color: var(--ink); }
dialog::backdrop { background: rgba(3, 40, 52, .4); }
dialog:has(.dlg-wide) { width: min(920px, calc(100% - 24px)); }
dialog form, .dlg { padding: var(--s5); }
.dlg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--s4); }
.dlg-head h2 { font-size: 24px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; align-self: center; }
.dlg-head.sticky-head { position: sticky; top: 0; z-index: 5; background: var(--surface); margin: calc(-1 * var(--s5)) calc(-1 * var(--s5)) var(--s4); padding: var(--s5); border-bottom: 1px solid var(--line); }
table.data .link { text-align: left; white-space: nowrap; }
.av-warn { display: flex; gap: 6px; align-items: center; color: var(--warn, #9a6200); font-size: 13px; margin: 0 0 8px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: var(--s2); margin-top: var(--s5); flex-wrap: wrap; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--nav-bg, var(--brand)); color: #fff; padding: 12px 22px; border-radius: var(--radius-pill); opacity: 0; pointer-events: none; transition: .2s; z-index: 90; font-weight: 500; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Admin editor */
.layout-list .row { gap: var(--s2); }
.layout-list .row[draggable=true] { cursor: grab; }
.layout-list .row.dragging { opacity: .4; }
.layout-list .handle { color: var(--muted); }
.swatch-input { display: flex; align-items: center; gap: 10px; }
.swatch-input input[type=color] { width: 48px; height: 40px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 2px; background: var(--surface); }

/* Care card (Daywell personality) */
.care { background: linear-gradient(135deg, var(--brand) 0%, #0a6b86 100%); color: #fff; border-radius: var(--radius); padding: var(--s5); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.care small { letter-spacing: .1em; font-size: 12px; font-weight: 700; opacity: .85; }
.care h3 { font-size: 22px; margin: 6px 0; }
.care p { margin: 0; opacity: .9; }
.care svg { width: 64px; height: 64px; color: var(--sun); stroke-width: 1.4; flex-shrink: 0; }

/* Sign-in screens (live mode) */
.auth { display: none; }
body.signed-out { overflow: hidden; }
body.signed-out .auth { display: grid; place-items: center; position: fixed; inset: 0; z-index: 100; background: var(--nav-bg, var(--brand)); padding: var(--s4); overflow-y: auto; }
body.signed-out .sidebar, body.signed-out .shell { visibility: hidden; }
.auth-card { background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: var(--s6); width: min(440px, 100%); }
.auth-card h1 { font-size: var(--fs-xl); margin: var(--s5) 0 var(--s3); }
.auth-card .stack > * + * { margin-top: var(--s4); }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; font-weight: 700; font-size: 30px; color: var(--brand); letter-spacing: -.02em; text-align: center; }
.auth-brand .brand-mark { width: 56px; height: 56px; }
.auth-brand .brand-mark svg { width: 30px; height: 30px; }
.auth-card h1 { text-align: center; }
body.signed-out .auth { align-content: center; justify-items: center; }
.auth-card > p, .auth-card .auth-wait { text-align: center; }
.auth-card .auth-wait { margin: var(--s5) 0 0; font-size: 16px; }
.auth-card .auth-msg { text-align: left; }
.auth-brand .brand-mark { border-color: var(--line-strong); color: var(--sun); }
.auth-brand .dot { color: var(--sun); }
.auth-msg { padding: 10px 14px; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--info); font-size: var(--fs-sm); }
.auth-msg.bad { background: var(--bad-bg); color: var(--bad); }

/* Home: cards packed by height so nothing leaves a gap (js: packDash) */
.dash.packed { grid-auto-rows: 4px; row-gap: 0; align-items: start; }
.empty-line { padding: var(--s3) var(--s5); color: var(--muted); font-size: var(--fs-sm); }
.card-foot { padding: var(--s2) var(--s5) var(--s4); }
.card-foot .btn { padding-left: 0; }

/* Photos */
.avatar { overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 96px; height: 96px; font-size: 30px; }
.avatar-btn { background: none; border: 0; padding: 0; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.avatar-btn:hover .avatar { box-shadow: 0 0 0 3px rgba(255,255,255,.5); }
.avatar-btn:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }

/* Store switcher in the top bar */
.store-switch select { font: inherit; font-weight: 500; color: var(--ink); background: transparent; border: 1.5px solid var(--line-strong); border-radius: 999px; padding: 6px 30px 6px 12px; cursor: pointer; max-width: 340px; }
.store-boxes { display: flex; gap: 6px 16px; flex-wrap: wrap; margin-top: 6px; }
.store-box { display: flex; gap: 6px; align-items: center; font-size: var(--fs-sm); color: var(--ink-2); font-weight: 400; }
.member-row { flex-wrap: wrap; align-items: flex-start; }

/* Subtasks */
.subtask-task { display: flex; gap: 10px; align-items: center; padding: 6px 0; flex-wrap: wrap; }
.subtask-task .sub-open { text-align: left; font-weight: 500; color: var(--ink); }
#taskList .handle { color: var(--muted); cursor: grab; display: grid; }
#taskList .row.dragging { opacity: .4; }
#taskList .row.drop-target { background: var(--info-bg); box-shadow: inset 0 0 0 2px var(--aqua); }

/* Resource icon picker */
.icon-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.icon-pick input { position: absolute; opacity: 0; }
.icon-pick span { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); color: var(--action); cursor: pointer; font-weight: 400; }
.icon-pick span svg { width: 28px; height: 28px; }
.icon-pick small { color: var(--ink-2); font-size: 12px; }
.icon-pick input:checked + span { border-color: var(--action); background: var(--bad-bg); box-shadow: 0 0 0 1px var(--action); }
.icon-pick input:focus-visible + span { outline: 3px solid var(--aqua); outline-offset: 2px; }

/* Admin */
.admin-tabs { background: var(--surface); border-radius: var(--radius); margin-bottom: var(--s5); box-shadow: var(--shadow); }
.admin-tabs button { display: inline-flex; gap: 6px; align-items: center; }
table.access td, table.access th { vertical-align: middle; }
.roles-table .role-col { text-align: center; min-width: 150px; }
.roles-table th.role-col small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 4px; text-transform: none; letter-spacing: 0; }
.roles-table th.role-col b { display: block; padding: 7px 0; text-transform: none; letter-spacing: 0; color: var(--ink); font-size: var(--fs-sm); }
.roles-table .role-name { padding: 6px 8px; text-align: center; font-weight: 500; }
.roles-table input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }
.roles-table .role-col svg { color: var(--ok); }
.roles-table .group-row td { background: var(--surface-2); font-weight: 700; color: var(--brand); font-size: var(--fs-sm); }
.roles-table .muted-row td:first-child > span { color: var(--muted); }
.roles-table .page-switch { display: flex; margin-top: 4px; font-size: 12px; color: var(--ink-2); }
.toggle { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; cursor: pointer; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.pick-grid label { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-weight: 400; }
.pick-grid small { display: block; color: var(--muted); font-size: 12px; }

/* ---------- Schedule ---------- */
.sch-toolbar { align-items: center; }
.sch-stats { margin-bottom: var(--s5); display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--s4); }
.sch-stats .big { font-size: 34px; }
.sch-stats .kpi-top .badge { margin-left: auto; }
.sch-stats .of { font-size: 20px; color: var(--muted); font-weight: 400; }
.goal-input { font: inherit; font-size: 34px; font-weight: inherit; width: 3.4ch; border: 0; border-bottom: 2px dashed var(--line-strong); background: transparent; color: var(--ink); padding: 0; }
.goal-input:focus { outline: none; border-bottom-color: var(--brand); }
.goal-input:disabled { border-bottom-color: transparent; }
.labor-ok { box-shadow: inset 4px 0 0 var(--ok), var(--shadow); }
.labor-warn { box-shadow: inset 4px 0 0 var(--warn), var(--shadow); }
.labor-bad { box-shadow: inset 4px 0 0 var(--bad), var(--shadow); }
.labor-pill { display: inline-block; padding: 3px 8px; border-radius: 999px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.lp-ok { background: var(--ok-bg); color: var(--ok); } .lp-warn { background: var(--warn-bg); color: var(--warn); } .lp-bad { background: var(--bad-bg); color: var(--bad); } .lp-idle { background: var(--surface-2); color: var(--muted); }
.warn-num { color: var(--warn); } .bad-num { color: var(--bad); }
/* Computer screens: the time + counter header sticks under the top bar as the page scrolls.
   Smaller screens: the board scrolls inside its own box (so it can also scroll sideways) and the header sticks there. */
.sch-scroll { overflow: visible; }
.sch-inner { min-width: 0; }
.sch-head { position: sticky; top: 68px; z-index: 5; background: var(--surface); box-shadow: 0 6px 8px -8px rgba(0,0,0,.25); }
@media (max-width: 1180px) {
  .sch-board { overflow: hidden; }
  .sch-scroll { overflow: auto; max-height: calc(100vh - 120px); }
  .sch-inner { min-width: 900px; }
  .sch-head { top: 0; }
}
.sch-head .sch-label { z-index: 6; }
.sch-cell.ls-ok { background: var(--ok-bg); color: var(--ok); } .sch-cell.ls-under { background: var(--warn-bg); color: var(--warn); } .sch-cell.ls-over { background: var(--bad-bg); color: var(--bad); }
.sch-cell.closed-cell { color: var(--muted); }
.need-row .sch-label { color: var(--muted); font-weight: 400; font-size: 12px; }
.need-row .sch-cell span { font-size: 12px; color: var(--muted); }
.palette { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pal { width: 22px; height: 22px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); cursor: pointer; padding: 0; }
.pal:hover { transform: scale(1.15); }
.pal.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--ink); }
.setup-dept-head { flex-wrap: wrap; }
.date-box { width: auto; min-width: 160px; padding: 8px 12px; font-weight: 500; }
.edit-sales { font-size: 14px; font-weight: 500; vertical-align: middle; }
.goal-line { display: flex; align-items: baseline; gap: 2px; flex-wrap: wrap; }
.goal-line .goal-input { font-size: 16px; width: 4.2ch; font-weight: 700; }
.goal-chip { display: inline-flex; align-items: baseline; gap: 2px; font-size: var(--fs-sm); color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.goal-input.sm { font-size: 15px; width: 4.2ch; font-weight: 700; }
.sales-cell { font-weight: 700; color: var(--ink); text-decoration: underline dotted; }
.hours-trio { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.avail-two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 10px; }
.avail-two > div { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; display: grid; gap: 8px; }
.avail-two .avail-day { grid-template-columns: 38px minmax(120px, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.avail-two .input { padding: 7px 8px; min-width: 0; }
.avail-two .pref-toggle { min-width: 0; }
.avail-col-head { display: flex; gap: 8px; align-items: center; margin-bottom: 2px; }
.sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }
.sw-av, .av-on { background: var(--p-sage); } .sw-pref, .av-pref { background: var(--p-green); }
.pref-toggle { display: flex; gap: 6px; align-items: center; font-weight: 400; font-size: var(--fs-sm); }
.avail-viz { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px 10px; background: var(--surface-2); }
.av-scale, .av-line { display: grid; grid-template-columns: 44px 1fr; align-items: center; }
.av-scale > div { position: relative; height: 18px; }
.av-scale i { position: absolute; transform: translateX(-50%); font-style: normal; font-size: 11px; color: var(--muted); }
.av-line > span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.av-track { position: relative; height: 18px; background: var(--surface); border-radius: 4px; margin: 3px 0; overflow: hidden; }
.av-seg { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.av-pref { top: 4px; bottom: 4px; }
.av-none { position: absolute; inset: 0; display: flex; align-items: center; padding-left: 8px; font-size: 11px; color: var(--muted); }
.impact { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; padding: 8px 10px; background: var(--surface-2); border-radius: var(--radius-sm); font-size: var(--fs-sm); }
.to-cal .day { min-height: 96px; }
.to-cal .day.blackout { background: repeating-linear-gradient(135deg, var(--bad-bg) 0 8px, var(--surface) 8px 14px); }
.bo-label { display: block; font-size: 11px; font-weight: 700; color: var(--bad); margin-bottom: 2px; }
.bo-label svg { width: 11px; height: 11px; }
.to-chip { display: block; font-size: 12px; border-radius: 4px; padding: 1px 6px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.to-chip.approved { background: var(--info-bg); color: var(--info); } .to-chip.pending { background: var(--warn-bg); color: var(--warn); }
.reports-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: var(--s5); align-items: start; }
.report-nav { display: flex; flex-direction: column; padding: 8px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
.report-nav button { text-align: left; border: 0; background: none; padding: 10px 12px; border-radius: var(--radius-sm); cursor: pointer; font: inherit; }
.report-nav button small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.report-nav button.on { background: var(--info-bg); }
.report-nav button.on b { color: var(--brand); }
.av-table td, .av-table th { text-align: center; }
.av-table td:first-child, .av-table th:first-child { text-align: left; }
.av-cell { width: 100%; min-width: 86px; border: 0; border-radius: 8px; padding: 8px 6px; cursor: pointer; font: inherit; display: flex; flex-direction: column; align-items: center; }
.av-cell b { font-size: 22px; line-height: 1.1; } .av-cell small { font-size: 11px; opacity: .85; }
.av-cell.on { outline: 3px solid var(--ink); }
.job-filter.inline { padding: 0 20px; }
.job-filter.inline .card-body { padding: 0 0 8px; }
.pub-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.pub-dept { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: var(--radius-sm); font-weight: 400; cursor: pointer; }
.pub-dept small { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 860px) { .avail-two, .reports-layout { grid-template-columns: minmax(0, 1fr); } .report-nav { position: static; flex-direction: row; overflow-x: auto; } .report-nav button small { display: none; } .hours-trio { grid-template-columns: 1fr; } }
.lp-info { background: var(--info-bg); color: var(--info); }
.lp-over { background: #fde7d9; color: #9a3a0c; }   /* palette orange tint — over preferred */
.sched-access { display: grid; gap: 10px; }
.sa-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid var(--line); }
.sa-row > b { min-width: 160px; }
.my-shift .dateblock { flex-shrink: 0; }
/* ---------- Position chart ---------- */
:root { --pc-row: 46px; }
.pc-toolbar { align-items: center; }
.pc-time { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 220px; }
.pc-time input[type=range] { flex: 1; accent-color: var(--brand); }
.pc-time b { min-width: 52px; font-size: 18px; }
.pc-summary { display: flex; align-items: center; gap: 24px; padding: 14px 20px; margin-bottom: 16px; flex-wrap: wrap; }
.pc-stat b { font-size: 30px; display: block; line-height: 1.1; }
.pc-stat span { font-size: 13px; color: var(--muted); }
.pc-dots { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 200px; }
.pc-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line-strong); display: inline-block; }
.pc-dot.on { background: var(--brand); } .pc-dot.gap { background: var(--bad); }
.pc-legend { display: flex; gap: 12px; font-size: 12px; color: var(--ink-2); flex-wrap: wrap; }
.pc-legend span { display: flex; gap: 4px; align-items: center; }
.pc-sugg { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 20px; margin-bottom: 16px; background: var(--info-bg); color: var(--info); }
.pc-sugg-item { display: flex; gap: 8px; align-items: center; background: var(--surface); border-radius: 999px; padding: 4px 6px 4px 14px; color: var(--ink); }
.pc-wrap { overflow-x: auto; }
.pc-canvas { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; position: relative; }
.pc-zone { border-radius: 12px; background: color-mix(in srgb, var(--c) 7%, var(--surface)); border: 1.5px solid color-mix(in srgb, var(--c) 30%, var(--surface)); padding: 8px 12px; z-index: 0; position: relative; }
.pc-zone > span { font-weight: 700; color: var(--c); font-size: 18px; }
.pc-box { z-index: 1; position: relative; background: var(--surface); border-radius: 10px; border: 1.5px solid var(--line-strong); display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.pc-head { background: var(--c); color: #fff; display: flex; gap: 8px; align-items: center; padding: 6px 10px; font-weight: 700; font-size: 15px; }
.pc-head svg { width: 14px; height: 14px; }
.pc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-rank { background: rgba(255,255,255,.25); border-radius: 999px; font-size: 11px; padding: 1px 7px; flex-shrink: 0; }
.pc-body { padding: 6px 8px; display: flex; flex-direction: column; gap: 4px; flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.pc-body.multi { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); align-content: start; }
.pc-body.multi .pc-empty, .pc-body.multi .pc-next { grid-column: 1 / -1; }
.pc-person { background: var(--surface-2); border-left: 4px solid var(--c); border-radius: 6px; padding: 3px 8px; line-height: 1.25; }
.pc-person[draggable] { cursor: grab; }
.pc-person.dragging { opacity: .4; }
.pc-person b { display: block; font-size: 15px; }
.pc-person span { font-size: 12px; color: var(--ink-2); }
.pc-person.leaving { border-left-color: var(--warn); background: var(--warn-bg); }
.pc-person.moved b::after { content: ' ⇄'; color: var(--muted); font-weight: 400; }
.pc-empty { color: var(--bad); font-weight: 700; font-size: 13px; }
.pc-empty.idle { color: var(--muted); font-weight: 400; }
.pc-next { font-size: 12px; color: var(--info); }
.pc-box.gap { border: 2px dashed var(--bad); }
.pc-box.gap .pc-head { background: var(--bad); }
.pc-box.idle { opacity: .55; }
.pc-box.idle .pc-head { background: var(--p-slate); }
.pc-box.drop { outline: 3px solid var(--aqua); outline-offset: 2px; }
.pc-off { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.pc-canvas.editing { padding: 8px; border: 2px dashed var(--line-strong); border-radius: 12px; background: var(--surface); }
.pc-canvas.editing [data-id] { cursor: move; touch-action: none; user-select: none; }
.pc-resize { position: absolute; right: 3px; bottom: 3px; width: 14px; height: 14px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 50%, var(--ink-2) 50%); border-radius: 2px; z-index: 3; }
.pc-zone.sel, .pc-box.sel { outline: 3px solid var(--action); outline-offset: 2px; }
.pc-side { display: grid; gap: 16px; position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; padding-bottom: 8px; }
.side-toggle button { font-weight: 700; }
.side-tag { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em; border-radius: 4px; padding: 1px 5px; margin-right: 6px; color: #fff; vertical-align: middle; }
.side-tag.FOH { background: var(--action); } .side-tag.BOH { background: var(--sun); }
.sch-bar.training { background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.22) 0 6px, transparent 6px 12px); }
.sch-bar.training svg { width: 13px; height: 13px; }
.training-box { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); }
.skills-grid .skill-row { display: grid; grid-template-columns: 1fr 120px; gap: 8px; align-items: center; }
.skills-grid .skill-row .input { padding: 4px 8px; }
.pc-skill { margin-left: auto; display: inline-flex; align-items: center; }
.pc-skill svg { width: 15px; height: 15px; fill: #fff; }
.pc-skill.learn { font-size: 10px; background: rgba(255,255,255,.25); border-radius: 999px; padding: 1px 7px; }
.pc-trainee { font-size: 12px; background: var(--info-bg); color: var(--info); border-radius: 6px; padding: 3px 8px; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pc-trainee svg { width: 13px; height: 13px; }
.pc-box.has-trainee { box-shadow: 0 0 0 2px var(--p-sky), var(--shadow); }
.pc-why { margin: 4px 0 0; padding-left: 16px; font-size: 12px; color: var(--ink-2); }
.pc-why li { margin: 1px 0; }
.pc-sugg { flex-direction: column; align-items: stretch; }
.pc-sugg-title { display: flex; gap: 8px; align-items: center; }
.pc-sugg-item { border-radius: var(--radius-sm); padding: 10px 12px; justify-content: space-between; }
.pc-canvas.blueprint { background-image: radial-gradient(circle, var(--line-strong) 1px, transparent 1.4px); background-size: 24px 24px; border-radius: 12px; padding: 4px; }
.pc-windows { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 12px; }
.pc-win { display: inline-flex; gap: 4px; align-items: center; }
.pc-win .input { width: auto; padding: 5px 8px; }
.pc-ghost { border: 2px dashed var(--action); border-radius: 10px; display: grid; place-items: center; color: var(--action); font-weight: 700; z-index: 2; background: var(--bad-bg); }
.pc-newpos { display: flex; gap: 6px; }
.ok-num { color: var(--ok); }
.minor-tag { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px; background: #5d3754; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; vertical-align: 1px; margin-left: 4px; box-shadow: 0 0 0 1.5px #fff, 0 0 0 2.5px #5d3754; }
:root[data-mode="dark"] .minor-tag { background: #c58bb4; color: #1a1020; box-shadow: none; }
.my-shift-link { border: 0; background: none; padding: 0; font: inherit; text-align: left; cursor: pointer; color: inherit; display: flex; gap: 12px; align-items: center; flex: 1; min-width: 0; }
.co-list { display: flex; gap: 6px; flex-wrap: wrap; }
.my-shift-link:hover .row-title { text-decoration: underline; color: var(--brand); }
.pc-canvas.blueprint .pc-body { overflow: visible; }
.tab-sep { width: 1px; align-self: stretch; background: var(--line-strong); margin: 8px 6px; }
.sch-bar.callout { background: var(--p-stone) !important; color: var(--ink-2); text-decoration: line-through; box-shadow: none; }
.callout-box { background: var(--bad-bg); }
button.pc-person { border: 0; width: 100%; text-align: left; font: inherit; color: inherit; cursor: pointer; border-left: 4px solid var(--c); display: block; }
button.pc-person[draggable] { cursor: grab; }
.pc-person .ace svg { width: 13px; height: 13px; color: var(--p-gold); fill: var(--p-gold); vertical-align: -2px; }
.learn { font-size: 10px; font-weight: 700; background: var(--warn-bg); color: var(--warn); border-radius: 999px; padding: 1px 6px; vertical-align: 1px; }
.pc-tag { margin-left: auto; font-size: 10px; background: rgba(255,255,255,.25); border-radius: 999px; padding: 1px 7px; display: inline-flex; gap: 3px; align-items: center; white-space: nowrap; }
.pc-tag + .pc-tag { margin-left: 4px; }
.pc-tag svg { width: 11px; height: 11px; }
button.pc-trainee { border: 1.5px dashed var(--info); width: 100%; text-align: left; font: inherit; cursor: pointer; }
.pc-box.has-trainee { border-color: var(--info); }
.brk { display: inline-flex; gap: 3px; align-items: center; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-top: 2px; }
.brk svg { width: 11px; height: 11px; }
.brk.soon, .brk.later { background: var(--warn-bg); color: var(--warn); } .brk.overdue { background: var(--bad-bg); color: var(--bad); } .brk.done { background: var(--ok-bg); color: var(--ok); } .brk.on { background: var(--info-bg); color: var(--info); }
.pc-legend-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--ink-2); margin: -6px 0 14px; }
.pc-legend-row > span { display: inline-flex; gap: 4px; align-items: center; }
.pc-legend-row svg { width: 13px; height: 13px; }
.pc-legend-row > span:first-child svg { color: var(--p-gold); fill: var(--p-gold); }
.pc-live.with-panel { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.pc-panel { position: sticky; top: 84px; max-height: calc(100vh - 100px); display: flex; flex-direction: column; overflow: hidden; }
.tp-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.tp-hint { padding: 8px 12px 0; margin: 0; font-size: 12px; }
.tp-body { overflow-y: auto; padding: 4px 8px 12px; flex: 1; }
.tp-body.drop { outline: 3px dashed var(--aqua); outline-offset: -4px; }
.tp-group { font-size: 12px; font-weight: 700; color: var(--brand); text-transform: uppercase; letter-spacing: .04em; padding: 10px 4px 4px; }
.tp-empty { font-size: 12px; color: var(--muted); border: 1.5px dashed var(--line-strong); border-radius: 8px; padding: 10px; text-align: center; }
.tp-row { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "name btn" "meta btn"; gap: 0 8px; align-items: center; padding: 6px 6px; border-radius: 8px; border-bottom: 1px solid var(--line); }
.tp-row[draggable] { cursor: grab; }
.tp-row:hover { background: var(--surface-2); }
.tp-name { grid-area: name; border: 0; background: none; padding: 0; font: inherit; font-weight: 700; text-align: left; cursor: pointer; color: var(--ink); }
.tp-time { grid-area: meta; font-size: 12px; color: var(--muted); }
.tp-status { grid-column: 1 / -1; font-size: 12px; color: var(--ink-2); display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.tp-status svg { width: 12px; height: 12px; }
.tp-row .btn { grid-area: btn; }
.tp-row.out .tp-name, .tp-row.out .tp-time { text-decoration: line-through; color: var(--muted); }
.tp-log { font-size: 13px; padding: 8px 4px; border-bottom: 1px solid var(--line); }
.why-list { margin: 0; padding-left: 18px; } .why-list li { margin: 3px 0; }
@media (max-width: 1100px) { .pc-live.with-panel { grid-template-columns: minmax(0, 1fr); } .pc-panel { position: static; max-height: none; } }
.pc-order { max-height: 420px; overflow: auto; padding: 0 16px 12px; }
.pc-order-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.pc-order-row.sel { background: var(--info-bg); }
.pc-order-row .pc-rank { background: var(--c); color: #fff; }
.pc-order-btns { margin-left: auto; display: flex; }
.pc-order-btns .icon-btn { width: 28px; height: 28px; }
body.kiosk .sidebar, body.kiosk .topbar, body.kiosk .demo-banner, body.kiosk .footer { display: none !important; }
body.kiosk .shell { margin-left: 0 !important; }
body.kiosk main { padding: 12px 16px; max-width: none; }
.kiosk-bar { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; font-size: 18px; }
.kiosk-bar button { margin-left: auto; }
@media (max-width: 860px) { .pc-edit-layout { grid-template-columns: minmax(0, 1fr); } .pc-canvas { min-width: 760px; } .pc-side { position: static; } }
.board-legend { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 14px 20px 0; font-size: var(--fs-sm); }
.legend-mini { display: flex; gap: 4px; align-items: center; font-size: 11px; font-weight: 400; color: var(--ink-2); flex-wrap: wrap; }
.legend-mini i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-left: 4px; }
.legend-mini .ls-ok { background: var(--ok); } .legend-mini .ls-under { background: var(--warn); } .legend-mini .ls-over { background: var(--bad); }
.sch-bar.copying { opacity: .7; outline: 2px dashed #fff; }
.count-pill { background: var(--action); color: #fff; border-radius: 999px; font-size: 11px; padding: 1px 7px; margin-left: 2px; }
.roster-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--s5); align-items: start; }
.roster-part { padding: 10px 20px 4px; font-weight: 700; color: var(--brand); font-size: var(--fs-sm); background: var(--surface-2); }
.roster-row { width: 100%; border: 0; background: none; text-align: left; border-bottom: 1px solid var(--line); }
.roster-time { min-width: 110px; font-weight: 700; font-variant-numeric: tabular-nums; }
.job-filter { margin-bottom: var(--s4); }
.jf-dept { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 6px; }
.jf-dept b { min-width: 110px; font-size: var(--fs-sm); }
.jf-chip { border: 1.5px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.jf-chip.on { background: var(--c); border-color: var(--c); color: #fff; }
.av.pref { background: var(--ok); color: #fff; }
.staff-card.inactive { opacity: .65; }
.dept-dot { width: 22px; height: 22px; border-radius: 50%; display: inline-block; }
.dept-name { font-size: var(--fs-md); color: var(--c); }
.hex-input { width: 100px !important; font-family: ui-monospace, Consolas, monospace; font-weight: 400 !important; }
.job-edit label { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; }
.confirm-dlg { border: 0; border-radius: var(--radius-lg); padding: 0; box-shadow: var(--shadow-lg); width: min(460px, calc(100% - 32px)); }
.confirm-dlg::backdrop { background: rgba(16, 24, 32, .45); }
@media (max-width: 860px) { .roster-grid { grid-template-columns: minmax(0, 1fr); } .sch-scroll { max-height: calc(100vh - 120px); } }
.sch-inner { padding: var(--s4) var(--s4) 0; }
.sch-label { width: 170px; flex-shrink: 0; font-size: var(--fs-sm); font-weight: 500; color: var(--ink); padding-right: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: sticky; left: 0; background: var(--surface); z-index: 2; align-self: stretch; display: flex; align-items: center; }
.sch-scale, .sch-crow, .sch-row, .sch-dept { display: flex; }
.sch-hours { position: relative; flex: 1; height: 26px; }
.sch-hours span { position: absolute; transform: translateX(-50%); font-size: 12px; color: var(--ink-2); white-space: nowrap; top: 4px; }
.sch-counts { border-top: 1px solid var(--line); border-bottom: 2px solid var(--line-strong); padding: 6px 0; margin-bottom: 4px; }
.sch-crow { height: 30px; }
.sch-cells { flex: 1; display: grid; grid-template-columns: repeat(18, 1fr); gap: 2px; }
.sch-cell { position: relative; border-radius: 4px; display: flex; align-items: center; justify-content: center; gap: 2px; font-size: 13px; overflow: hidden; }
.sch-cell::before { content: ''; position: absolute; inset: 0; background: var(--c); opacity: calc(var(--a) * .28); }
.sch-cell b { position: relative; font-weight: 700; }
.sch-cell small { position: relative; color: var(--bad); font-weight: 700; font-size: 11px; }
.sch-dept { margin-top: 10px; align-items: center; border-left: 4px solid var(--c); background: var(--surface-2); border-radius: 0 6px 6px 0; }
.sch-dept .sch-label { background: var(--surface-2); padding: 6px 12px; font-weight: 700; color: var(--c); }
.sch-dept-meta { font-size: 12px; color: var(--muted); }
.sch-row { border-bottom: 1px solid var(--line); }
.sch-row .sch-label { color: var(--ink-2); font-weight: 400; padding-left: 16px; }
.sch-track { position: relative; flex: 1; min-height: 42px; background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / 18) 100%; }
.sch-track.editable { cursor: crosshair; touch-action: none; }
.sch-closed { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(0,0,0,.035) 0 6px, transparent 6px 12px); pointer-events: none; }
.sch-bar { position: absolute; height: 30px; border-radius: 6px; background: var(--c); color: #fff; font-size: 12px; display: flex; align-items: center; gap: 6px; padding: 0 8px; overflow: hidden; white-space: nowrap; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.15); user-select: none; }
.sch-track.editable .sch-bar { cursor: grab; }
.sch-track.editable .sch-bar::before, .sch-track.editable .sch-bar::after { content: ''; position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.sch-track.editable .sch-bar::before { left: 0; } .sch-track.editable .sch-bar::after { right: 0; }
.sch-bar-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.sch-bar-time { opacity: .9; }
.sch-bar.open { background: var(--surface); color: var(--bad); border: 2px dashed var(--bad); box-shadow: none; }
.sch-bar.open svg { width: 13px; height: 13px; }
.sch-bar.ghost { background: transparent; border: 2px dashed var(--c); color: var(--ink); justify-content: center; font-weight: 700; pointer-events: none; }
.sch-warn { width: 100%; border: 0; background: none; text-align: left; border-bottom: 1px solid var(--line); }
.sch-h { font-size: var(--fs-md); margin: var(--s5) 0 var(--s2); display: flex; gap: 8px; align-items: center; }
.sch-dlg { width: min(680px, 100%); }
.cand { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 8px; }
.cand.current { border-color: var(--ok); background: var(--ok-bg); }
.cand.blocked { opacity: .78; }
.cand-main { flex: 1; min-width: 0; }
.cand-why { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.cand-why .chip { font-size: 12px; }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.sch-more summary { margin: 8px 0; cursor: pointer; }
table.sch-week td { vertical-align: top; min-width: 120px; }
table.sch-week .open-row td { background: var(--warn-bg); }
table.sch-week .total-row td { background: var(--surface-2); }
.sch-chip { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--c); background: var(--surface-2); border-radius: 4px; padding: 4px 8px; margin-bottom: 4px; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; }
.sch-chip small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; }
.staff-card { text-align: left; border: 0; padding: var(--s5); cursor: pointer; font: inherit; display: flex; flex-direction: column; gap: 8px; }
.staff-card h3 { font-size: var(--fs-lg); margin: 0; }
.avail-row { display: flex; gap: 4px; }
.av { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--ok-bg); color: var(--ok); }
.av.off { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
.train-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.train-grid fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; margin: 0; }
.train-grid legend { font-weight: 700; font-size: var(--fs-sm); padding: 0 4px; }
.train-grid label { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-weight: 400; font-size: var(--fs-sm); }
.avail-grid { display: grid; gap: 8px; }
.avail-day { display: grid; grid-template-columns: 110px 170px 1fr 1fr; gap: 8px; align-items: center; }
.sch-setup { display: grid; gap: 14px; }
.setup-dept { border-left: 4px solid var(--c); padding: 8px 0 8px 14px; }
.setup-dept-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.setup-dept-head input[type=color] { width: 40px; height: 36px; border: 0; background: none; padding: 0; }
.setup-dept-head .input { max-width: 260px; font-weight: 700; }
.setup-jobs { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.chip-input { border: 0; background: transparent; font: inherit; width: 140px; color: inherit; }
@media (max-width: 520px) { .avail-day { grid-template-columns: 1fr 1fr; } .avail-day span { display: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .counts, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .count-cell:nth-child(3) { border-left: 0; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); width: var(--sidebar-w) !important; transition: transform .2s; }
  body.nav-open .sidebar { transform: none; }
  body.nav-collapsed .sidebar .label, body.nav-collapsed .sidebar .brand-text, body.nav-collapsed .store-text, body.nav-collapsed .who { display: initial; }
  .collapse-btn { display: none; }
  .shell, body.nav-collapsed .shell { margin-left: 0; }
  .topbar { padding: 0 var(--s4); }
  .topbar .menu-btn { display: grid; }
  .search-box { width: auto; flex: 1; }
  .topbar .place .label { display: none; }
  main { padding: var(--s5) var(--s4) var(--s7); }
  .demo-banner { padding: 8px var(--s4); }
  .dash, .grid-2, .grid-3, .quick { grid-template-columns: minmax(0, 1fr); }
  .dash > * { grid-column: 1 / -1; }
  .dash.packed { grid-auto-rows: auto; row-gap: var(--s5); }
  .store-switch select { max-width: 48vw; }
  .page-head h1 { font-size: var(--fs-xl); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .board { grid-template-columns: repeat(4, minmax(240px, 1fr)); }
  .cal .day { min-height: 74px; padding: 3px; }
  .cal .ev { font-size: 11px; padding: 1px 3px; }
  .tool { padding: var(--s5) var(--s4); gap: var(--s4); }
  .tool h3 { font-size: 20px; }
  .donut-legend { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  .counts, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .count-cell { border-left: 0; border-top: 1px solid var(--line); }
  .count-cell:first-child { border-top: 0; }
  .quick button { justify-content: flex-start; padding: 16px; font-size: var(--fs-md); }
  .row { padding: 12px var(--s4); flex-wrap: wrap; }
  .card-head, .chart-toolbar, .legend { padding-left: var(--s4); padding-right: var(--s4); }
  .card-body, .chart-wrap { padding-left: var(--s4); padding-right: var(--s4); }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .hbar { grid-template-columns: minmax(0, 1fr) auto; }
  .hbar .bar-wrap { grid-column: 1 / -1; order: 3; }
  .date-pill { min-width: 0; flex: 1; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Name search (people pickers) ---------- */
.pp { position: relative; font-weight: 400; color: var(--ink); }
.pp-box { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 44px; border: 1.5px solid var(--line-strong); border-radius: var(--radius-sm); padding: 5px 8px; background: var(--surface); cursor: text; }
.pp-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.pp-q { flex: 1; min-width: 120px; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); padding: 4px 2px; }
.pp-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 2px; font-size: var(--fs-sm); }
.pp-chip .avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.pp:not(.multi) .pp-chip { padding-right: 10px; }
.pp-x { border: 0; background: none; color: var(--muted); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; padding: 0; }
.pp-x:hover { background: var(--line); color: var(--ink); }
.pp-x svg { width: 14px; height: 14px; }
.pp-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: 300px; overflow-y: auto; padding: 4px; }
.pp-opt { display: flex; gap: 10px; align-items: center; width: 100%; border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; }
.pp-opt.on, .pp-opt:hover { background: var(--surface-2); }
.pp-opt b { display: block; font-weight: 500; }
.pp-opt small { display: block; color: var(--muted); font-size: 12px; }
.pp-none { padding: 10px 12px; color: var(--muted); font-size: var(--fs-sm); }
.who-cell { display: inline-flex; align-items: center; gap: 8px; }
.row-meta .who-cell .avatar.sm, .proj-stats .who-cell .avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.kv .avatars { display: inline-flex; margin-left: 6px; vertical-align: middle; }
.private-box { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 12px 14px; background: var(--surface-2); }
.form-grid { align-items: start; }

/* ---------- Performance: details for a clicked point ---------- */
.chart-hit { cursor: pointer; outline: none; }
.chart-hit:hover, .chart-hit:focus { fill: color-mix(in srgb, var(--brand) 7%, transparent); }
.chart-tip { padding: 0 var(--s5); margin: -8px 0 var(--s4); }
.fc-detail { margin: -6px var(--s5) var(--s5); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 14px 16px; background: var(--surface-2); }
.fc-detail-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 17px; }
.fc-rows { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 24px; margin: 0; }
.fc-rows dt { color: var(--ink-2); font-size: var(--fs-sm); display: flex; align-items: center; gap: 6px; }
.fc-rows dd { margin: 2px 0 0; font-size: 20px; font-weight: 500; }
.fc-rows dd .hint { font-size: 13px; font-weight: 400; }
.fc-key { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.fc-key.action { background: var(--action); } .fc-key.ok { background: var(--ok); } .fc-key.aqua { background: var(--aqua); } .fc-key.ly { background: var(--series-ly); } .fc-key.ly2 { background: var(--series-ly2); }

/* ---------- Play Chart: rotation & weather ---------- */
.rot { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; margin-top: 3px; background: var(--surface-2); color: var(--ink-2); width: fit-content; }
.rot svg { width: 12px; height: 12px; }
.rot.soon { background: var(--warn-bg); color: var(--warn); }
.rot.due { background: var(--bad-bg); color: var(--bad); animation: rotPulse 1.6s ease-in-out infinite; }
@keyframes rotPulse { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--bad) 25%, transparent); } }
@media (prefers-reduced-motion: reduce) { .rot.due { animation: none; } }
.weather-pill { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; border-radius: 999px; padding: 4px 6px 4px 12px; font-size: var(--fs-sm); background: var(--surface-2); border: 1px solid var(--line); }
.weather-pill.hot { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.weather-pill.cold, .weather-pill.rain { background: var(--info-bg); color: var(--info); border-color: transparent; }
.weather-pill select { border: 1px solid currentColor; background: var(--surface); color: var(--ink); border-radius: 999px; padding: 2px 6px; font: inherit; font-size: 13px; }
.rot-sugg { background: var(--bad-bg); color: var(--bad); border: 1.5px solid var(--bad); border-left-width: 6px; }
.rot-sugg .pc-sugg-title { color: var(--bad); font-size: 17px; }
.rot-sugg .pc-sugg-title .n { background: var(--bad); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 13px; margin-left: 4px; }
.rot-sugg .pc-sugg-item { border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); }
.rot-sugg .btn-primary { background: var(--bad); }
.rot-sugg .rot-alone { color: var(--bad); }
.rot-sugg .rot-alone .link { color: var(--bad); text-decoration: underline; }
.pos-flags { display: inline-flex; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.rot-grid { display: grid; grid-template-columns: auto auto auto; justify-content: start; gap: 8px 12px; align-items: center; font-size: var(--fs-sm); }
.rot-grid b { font-size: 12px; color: var(--muted); font-weight: 500; }
.inline-num { display: flex; align-items: center; gap: 6px; font-weight: 400; color: var(--ink-2); }
.inline-num .input, .rot-grid .input { width: 66px; padding: 6px 8px; }
.rot-w { display: inline-flex; gap: 4px; align-items: center; font-weight: 500; }
.rot-w svg { width: 16px; height: 16px; }
.pc-order-row:has(.pos-flags) { flex-wrap: wrap; }
.pos-flags { flex-basis: 100%; order: 3; margin: 0 0 4px 24px; gap: 12px; }
.pos-flags label { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }

/* ---------- Moolah ---------- */
.moolah { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 13px; color: var(--ok); background: var(--ok-bg); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); border-radius: 999px; padding: 1px 8px 1px 5px; white-space: nowrap; }
.moolah svg { width: 15px; height: 15px; }
.moolah.big-m { font-size: 15px; padding: 2px 10px 2px 8px; margin-left: 6px; }
.moolah-list { display: flex; flex-direction: column; gap: 6px; }
.moolah-row { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: baseline; font-size: var(--fs-sm); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.moolah-row:last-child { border-bottom: 0; }
.moolah-give { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.moolah-give .input:first-child { width: 130px; }
.moolah-give .input:nth-child(2) { flex: 1; min-width: 180px; }

/* ---------- Dark mode touch-ups ---------- */
:root[data-mode="dark"] .check:checked { background: #2f8aa6; border-color: #2f8aa6; }
:root[data-mode="dark"] .lp-over { background: #3a2414; color: #ffb07a; }
:root[data-mode="dark"] dialog::backdrop { background: rgba(0, 0, 0, .6); }
:root[data-mode="dark"] .input, :root[data-mode="dark"] select.input, :root[data-mode="dark"] textarea.input { color: var(--ink); }
:root[data-mode="dark"] .pc-zone span { color: var(--ink-2); }
:root[data-mode="dark"] input[type=date]::-webkit-calendar-picker-indicator, :root[data-mode="dark"] input[type=time]::-webkit-calendar-picker-indicator { filter: invert(.85); }.rot-alone { margin: 4px 2px 0; }
.rot-sugg .pc-sugg-item > div { min-width: 0; }

/* ---------- My Moolah page ---------- */
.moolah-hero { display: flex; align-items: center; gap: 24px; padding: 24px 28px; margin-bottom: 24px; flex-wrap: wrap; border-left: 6px solid var(--ok); }
.moolah-coin { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.moolah-coin svg { width: 44px; height: 44px; }
.moolah-big { font-size: 56px; font-weight: 700; line-height: 1.05; }
.moolah-stats { margin-left: auto; display: flex; gap: 32px; }
.moolah-stats b { display: block; font-size: 28px; }
.moolah-stats span { color: var(--ink-2); font-size: var(--fs-sm); }
.moolah-way { display: flex; gap: 12px; align-items: flex-start; }
.moolah-way .moolah { min-width: 52px; justify-content: center; }.plan-in { width: 72px; padding: 6px 8px; text-align: right; }
.plan-table td { vertical-align: middle; }
.sch-cell.below-min { box-shadow: inset 0 0 0 2px var(--bad); }
.sch-cell.below-min b { color: var(--bad); }
.agenda-row { gap: 12px; }
.agenda-open { flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; padding: 0; }
.agenda-open .row-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.agenda-row.done .row-title { text-decoration: line-through; color: var(--muted); }
.agenda-done { padding: 10px 20px 14px; border-top: 1px solid var(--line); }
.agenda-done summary { cursor: pointer; }
.topic-flags { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.topic-flags label { display: flex; gap: 8px; align-items: center; }
.agenda-n { width: 22px; color: var(--muted); }
.agenda-preview { display: block; max-width: 640px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: var(--fs-sm); }
/* Live chart: each box keeps the size it was drawn at; a box that needs more room grows on its own without stretching its neighbors. */
.pc-canvas.blueprint .pc-box { align-self: start; min-height: calc(var(--h, 2) * var(--pc-row) + (var(--h, 2) - 1) * 8px); }
.pc-canvas.blueprint .pc-body { overflow: visible; }
.plan-status { display: flex; gap: 6px; flex-wrap: wrap; }
/* Breakdown Planner: the column headings stay pinned under the top bar while scrolling through the hours. */
.plan-scroll { overflow: visible; }
.plan-table thead th { position: sticky; top: 68px; z-index: 4; background: var(--surface-2); box-shadow: 0 1px 0 var(--line); }
@media (max-width: 760px) { .plan-scroll { overflow-x: auto; } .plan-table thead th { position: static; } }
.proj-stats.dotted { gap: 0; }
.proj-stats.dotted > span + span::before { content: '·'; margin: 0 8px; color: var(--muted); font-weight: 700; }

/* ---------- Moola Store ---------- */
.mi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.mi-card { display: flex; gap: 14px; padding: 16px; align-items: flex-start; }
.mi-card.off { opacity: .6; }
.mi-thumb { width: 64px; height: 64px; flex-shrink: 0; border-radius: 14px; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; overflow: hidden; }
.mi-thumb svg { width: 32px; height: 32px; }
.mi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.mi-thumb.sm { width: 32px; height: 32px; border-radius: 8px; } .mi-thumb.sm svg { width: 18px; height: 18px; }
.mi-thumb.lg { width: 88px; height: 88px; } .mi-thumb.lg svg { width: 44px; height: 44px; }
.mi-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.mi-body h3 { margin: 0; font-size: 17px; }
.mi-top { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.mi-price { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mi-left { margin-left: auto; font-size: var(--fs-sm); font-weight: 700; }
.mi-actions { display: flex; gap: 8px; margin-top: 4px; }
.mi-pic-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.meal-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 16px; }
.meal-code { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; padding: 18px 22px; margin-bottom: 16px; border: 2px solid var(--ok); background: var(--ok-bg); }
.meal-amount { font-size: 34px; font-weight: 700; color: var(--ok); }
.meal-pin { margin-left: auto; font-size: 40px; font-weight: 700; letter-spacing: .2em; background: var(--surface); border-radius: 12px; padding: 6px 18px; }
.bonus-row { display: flex; gap: 8px; align-items: center; }
.bonus-row .input:first-child { flex: 1; } .bonus-row .input[type=number] { width: 100px; }.give-hero { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 24px; }
.give-big { font-size: 20px; padding: 16px 32px; border-radius: 14px; }
.give-big svg { width: 24px; height: 24px; }
/* Every form lines up: label, box and note rows are shared across a row of fields (see alignFields in app.js). */
.form-grid > .field.aligned { display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 6px; align-content: start; }
.form-grid > .field.aligned > .field-label { align-self: end; }
.form-grid > .field.aligned > .field-after { display: flex; flex-direction: column; gap: 4px; }
.form-grid > .field:not(.aligned) { grid-row: span 3; }

/* Give Moola: recognition categories as picture tiles */
.cat-pick { border: 0; padding: 0; margin: 14px 0 0; }
.cat-pick legend { font-weight: 500; font-size: var(--fs-sm); color: var(--ink-2); margin-bottom: 8px; }
.cat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cat-tiles label { cursor: pointer; }
.cat-tiles input { position: absolute; opacity: 0; pointer-events: none; }
.cat-tiles span { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 8px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); min-height: 86px; justify-content: center; }
.cat-tiles span svg { width: 26px; height: 26px; color: var(--ok); }
.cat-tiles b { font-size: 13px; font-weight: 500; line-height: 1.2; }
.cat-tiles input:checked + span { border-color: var(--ok); background: var(--ok-bg); box-shadow: 0 0 0 2px var(--ok); }
.cat-tiles input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 520px) { .cat-tiles { grid-template-columns: repeat(2, 1fr); } }
/* Meal code entry */
.meal-entry { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; padding: 16px 20px; margin-bottom: 24px; }
.meal-code-in { width: 110px; font-size: 22px; letter-spacing: .25em; text-align: center; font-weight: 700; }
/* Moola Store cards: buttons sit at the bottom of every card */
.mi-card { align-items: stretch; }
.mi-thumb { align-self: flex-start; }
.mi-actions { margin-top: auto; padding-top: 8px; flex-wrap: wrap; }
.mi-actions .btn { white-space: nowrap; }
/* ---------- Team Members list and side panel ---------- */
.tm-head, .tm-row { display: grid; grid-template-columns: 36px minmax(160px, 1.6fr) minmax(130px, 1fr) minmax(150px, 1.2fr) 130px 140px 18px; gap: 12px; align-items: center; padding: 10px 20px; }
.tm-head { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); border-bottom: 1px solid var(--line); padding-top: 12px; padding-bottom: 12px; }
.tm-head span:last-child { grid-column: span 2; }
.tm-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.tm-row:hover { background: var(--surface-2); }
.tm-row:last-child { border-bottom: 0; }
.tm-name { min-width: 0; } .tm-name b { display: block; font-weight: 500; } .tm-name small { display: block; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-pos { font-size: var(--fs-sm); color: var(--ink-2); }
.tm-hours { font-size: var(--fs-sm); color: var(--ink-2); }
.tm-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 900px) { .tm-head { display: none; } .tm-row { grid-template-columns: 36px 1fr auto; } .tm-access, .tm-pos, .tm-hours { grid-column: 2; } .tm-badges { grid-column: 3; grid-row: 1; } .tm-row > .chev { display: none; } }
.drawer.wide { width: min(780px, 100%); }
.access-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; background: var(--surface-2); }
.access-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.access-actions .hint { margin-right: auto; }
.panel-form .avail-two { gap: 16px; }/* Availability: an easy-to-read week, with editing on request */
.av-scale, .av-line { grid-template-columns: 44px 1fr 150px; gap: 0 10px; }
.av-scale::after { content: ''; }
.av-line { padding: 3px 0; }
.av-track { height: 22px; }
.av-text { display: flex; flex-direction: column; line-height: 1.2; font-size: 13px; } .av-text small { color: var(--ok); font-size: 12px; }
.avail-two { grid-template-columns: 1fr; }
.avail-two .avail-day { grid-template-columns: 52px minmax(150px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr); gap: 10px; }
.avail-two .input { padding: 8px 10px; }
.sch-h { display: flex; align-items: center; gap: 8px; }
.staff-status { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); margin-bottom: 14px; }
.staff-status .hint { flex: 1; min-width: 180px; }
.tm-access { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; } .tm-seen { font-size: 12px; color: var(--muted); }
.pc-canvas-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 4px 0 10px; }
.moolah-row.clickable { cursor: pointer; border-radius: 6px; padding: 6px 4px; } .moolah-row.clickable:hover { background: var(--surface-2); }
.mo-detail { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.mo-amount { font-size: 44px; font-weight: 700; line-height: 1; } .mo-amount small { display: block; font-size: 14px; font-weight: 400; color: var(--ink-2); margin-top: 4px; }
.mo-cat { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-weight: 500; } .mo-cat svg { width: 20px; height: 20px; }
.mo-giver { display: flex; gap: 16px; align-items: center; margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); }
/* Availability blocks (labeled, like ShiftAgent) */
.av-scale, .av-line { grid-template-columns: 34px 1fr; }
.av-track { height: 30px; border-radius: 6px; }
.av-blk { position: absolute; top: 2px; bottom: 2px; border-radius: 5px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: #fff; font-size: 12px; font-weight: 700; white-space: nowrap; }
.av-blk span { overflow: hidden; text-overflow: ellipsis; padding: 0 6px; }
.av-blk.off { background: color-mix(in srgb, var(--bad) 75%, var(--surface)); }
.av-blk.on { background: var(--p-green); }
.av-blk.pref { background: var(--ok); box-shadow: inset 0 0 0 2px color-mix(in srgb, #fff 35%, transparent); }
:root[data-mode="dark"] .av-blk.off { background: #8a2a3a; } :root[data-mode="dark"] .av-blk.pref { background: #1f7a5c; }
.av-line.closed-day .av-none { font-style: italic; }
.av-sum { display: flex; gap: 18px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.av-sum b { display: block; font-size: 22px; line-height: 1.1; } .av-sum small { color: var(--ink-2); font-size: 12px; }
.av-key { border-bottom: 3px solid; padding-bottom: 2px; } .av-key.pref { border-color: var(--ok); } .av-key.on { border-color: var(--p-green); } .av-key.off { border-color: var(--bad); }
.av-sum .hint { margin-left: auto; }
.legal { text-align: center; font-size: 12px; color: var(--muted); padding: 0 var(--s5) var(--s5); }
.auth-legal { color: rgba(255,255,255,.75); margin-top: 16px; max-width: 440px; padding: 0; text-align: center; }

/* ---------------- Ratings ---------------- */
.t-ok { color: var(--ok); } .t-warn { color: var(--warn); } .t-bad { color: var(--bad); }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.avatar.xs { width: 22px; height: 22px; font-size: 9px; }
.check-line { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.rt-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); margin-bottom: var(--s4); }
.rt-kpis .kpi .big { font-size: 32px; margin-top: 4px; }
.rt-toolbar select.input { width: auto; min-width: 230px; }
.rt-table th { white-space: nowrap; font-size: 12px; }
.rt-table td { vertical-align: middle; }
.rt-table tr.clickable { cursor: pointer; }
.rt-table tr.clickable:hover td, .rt-table tr.clickable:focus td { background: var(--surface-2); }
.rt-cell { text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.rt-cell.t-ok { background: color-mix(in srgb, var(--ok-bg) 70%, transparent); }
.rt-cell.t-warn { background: var(--warn-bg); }
.rt-cell.t-bad { background: var(--bad-bg); }
.rt-raters { display: inline-flex; } .rt-raters .avatar { margin-right: -6px; border: 2px solid var(--surface); }
.rt-clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 380px; }
.rt-clock { min-width: 74px; color: var(--ink-2); }

/* Unlock */
.rt-lock-wrap { display: grid; place-items: center; padding: var(--s6) 0; }
.rt-lock { width: min(420px, 100%); padding: 32px 28px; display: grid; gap: 12px; text-align: center; justify-items: center; }
.rt-lock h2 { margin: 4px 0 0; font-size: 24px; }
.rt-lock-icon { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--info-bg); color: var(--brand); transition: transform .45s ease, background .45s ease; }
.rt-lock-icon svg { width: 34px; height: 34px; }
.rt-pin-label { font-weight: 700; margin-top: 6px; }
.rt-pin { text-align: center; font-size: 28px; letter-spacing: .25em; font-variant-numeric: tabular-nums; max-width: 260px; padding: 12px; }
.rt-lock .btn { width: 100%; max-width: 260px; justify-content: center; }
.rt-lock #rtLockMsg { color: var(--bad); min-height: 1.2em; margin: 0; }
.rt-demo-pin { background: var(--sample-bg); color: var(--sample-ink); padding: 6px 10px; border-radius: 6px; margin: 0; }
.rt-lock.shake { animation: rtShake .45s; }
.rt-lock.opening .rt-lock-icon { transform: scale(1.15) rotate(-8deg); background: var(--ok-bg); color: var(--ok); }
.rt-lock.opening { animation: rtOut .5s .1s ease-in forwards; }
@keyframes rtShake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes rtOut { to { opacity: 0; transform: scale(.96) translateY(-8px); } }

/* Reveal */
.rt-hero { display: flex; align-items: center; gap: var(--s6); padding: var(--s6); margin-bottom: var(--s5); --tone: var(--ok); }
.rt-hero.tone-top { --tone: #1f8a5b; } .rt-hero.tone-ok { --tone: var(--ok); } .rt-hero.tone-warn { --tone: var(--warn); } .rt-hero.tone-bad { --tone: var(--bad); }
.rt-hero h2 { font-size: 30px; margin: 4px 0 6px; color: var(--tone); }
.rt-hero p { margin: 0 0 10px; color: var(--ink-2); }
.rt-ring { position: relative; width: 170px; height: 170px; flex-shrink: 0; }
.rt-ring.sm { width: 120px; height: 120px; }
.rt-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rt-ring-bg { fill: none; stroke: var(--line); stroke-width: 10; }
.rt-ring-fg { fill: none; stroke: var(--tone, var(--brand)); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: calc(326.73 * (1 - var(--p))); }
.rt-ring-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.rt-ring-num b { font-size: 42px; line-height: 1; font-variant-numeric: tabular-nums; }
.rt-ring.sm .rt-ring-num b { font-size: 28px; }
.rt-ring-num small { color: var(--muted); margin-top: 4px; }
.rt-check-hero { display: flex; align-items: center; gap: var(--s5); padding: var(--s5); grid-column: 1 / -1; margin-bottom: var(--s4); }
.rt-trend { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; padding: 4px 10px; border-radius: 999px; font-size: 14px; }
.rt-trend svg { width: 16px; height: 16px; }
.rt-trend.up { background: var(--ok-bg); color: var(--ok); } .rt-trend.down { background: var(--warn-bg); color: var(--warn); } .rt-trend.same { background: var(--surface-2); color: var(--ink-2); }
.rt-empty-score { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex-shrink: 0; }
.rt-grid { align-items: start; }
.rt-cat-list { padding: 4px 0; }
.rt-cat { border-bottom: 1px solid var(--line); }
.rt-cat:last-child { border-bottom: 0; }
.rt-cat summary { display: grid; grid-template-columns: 34px minmax(120px, 1fr) minmax(90px, 1.3fr) 30px; align-items: center; gap: 12px; padding: 14px var(--s5); cursor: pointer; list-style: none; }
.rt-cat summary::-webkit-details-marker { display: none; }
.rt-cat summary:hover { background: var(--surface-2); }
.rt-cat-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--info-bg); color: var(--brand); }
.rt-cat-name { font-weight: 700; }
.rt-has-note svg { width: 14px; height: 14px; color: var(--brand); vertical-align: -2px; }
.rt-bar { height: 10px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.rt-bar i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: currentColor; }
.rt-bar i.t-ok { color: var(--ok); } .rt-bar i.t-warn { color: var(--warn); } .rt-bar i.t-bad { color: var(--bad); }
.rt-cat-score { font-size: 20px; text-align: right; font-variant-numeric: tabular-nums; }
.rt-cat-more { padding: 0 var(--s5) 14px 62px; color: var(--ink-2); }
.rt-cat-more ul { margin: 0; padding-left: 18px; display: grid; gap: 3px; }
.rt-cat-note { display: flex; gap: 8px; background: var(--info-bg); color: var(--ink); padding: 10px 12px; border-radius: 8px; margin: 0 0 10px; }
.rt-cat-note svg { flex-shrink: 0; color: var(--brand); margin-top: 2px; }
.rt-comments { display: grid; gap: 12px; padding: 4px var(--s5) var(--s5); }
.rt-comment { border-radius: 12px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--brand); background: var(--surface); }
.rt-comment.k-glow { border-left-color: var(--ok); } .rt-comment.k-grow { border-left-color: var(--warn); } .rt-comment.k-step { border-left-color: var(--brand); }
.rt-comment-kind { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.rt-comment-kind svg { width: 15px; height: 15px; }
.rt-comment p { margin: 8px 0 10px; font-size: 16px; line-height: 1.5; }
.rt-author { display: flex; align-items: center; gap: 8px; }
.rt-author b { display: block; font-size: 14px; } .rt-author small { color: var(--muted); font-size: 12px; }
.avatar.anon { background: var(--surface-2); color: var(--ink-2); } .avatar.anon svg { width: 14px; height: 14px; }
.rt-summary p { line-height: 1.6; margin: 0 0 12px; }
.rt-response { background: var(--surface-2); border-radius: 10px; padding: 12px 14px; }
.rt-spark { width: 100%; height: 64px; margin-bottom: 8px; }
.rt-spark path { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linejoin: round; }
.rt-spark circle { fill: var(--surface); stroke: var(--brand); stroke-width: 2; }
.rt-hist { display: grid; }
.rt-hist-row { display: flex; justify-content: space-between; border: 0; background: none; padding: 9px 8px; border-radius: 8px; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.rt-hist-row:hover { background: var(--surface-2); } .rt-hist-row.on { background: var(--info-bg); font-weight: 700; }
.rt-guide > summary { padding: var(--s4) var(--s5); font-weight: 700; cursor: pointer; display: flex; gap: 8px; align-items: center; }
.rt-scale, .rt-guide-scale { display: grid; gap: 4px; }
.rt-scale > div, .rt-guide-scale > div { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.rt-guide-scale > div { grid-template-columns: 74px minmax(140px, .6fr) 1fr; }
.tone-top, .tone-ok { background: var(--ok-bg); } .tone-warn { background: var(--warn-bg); } .tone-bad { background: var(--bad-bg); }
.rt-hero.tone-top, .rt-hero.tone-ok, .rt-hero.tone-warn, .rt-hero.tone-bad { background: var(--surface); }
.rt-guide-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); }
.rt-guide-cat { display: grid; gap: 8px; }
.rt-guide-cat textarea { font-size: 14px; }

/* Editor */
.rt-status { display: inline-flex; border: 1px solid var(--line); margin: 0; }
.rt-status label { padding: 6px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--ink-2); }
.rt-status label.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.rt-status input { position: absolute; opacity: 0; pointer-events: none; }
.rt-status label:has(input:focus-visible) { outline: 2px solid var(--brand); }
.rt-scores-box { border: 0; padding: 0; margin: 14px 0 0; }
.rt-live { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--surface-2); border-radius: 10px; margin-bottom: 10px; }
.rt-live > span:first-child { font-weight: 700; }
.rt-live b { font-size: 22px; }
.rt-score-grid { display: grid; gap: 6px; }
.rt-score-row { display: grid; grid-template-columns: minmax(170px, 1fr) auto; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 10px; }
.rt-score-row.hl { background: var(--warn-bg); }
.rt-score-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.rt-score-name svg { color: var(--brand); }
.rt-pills { display: inline-flex; gap: 6px; }
.rt-pill input { position: absolute; opacity: 0; pointer-events: none; }
.rt-pill span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 700; cursor: pointer; background: var(--surface); color: var(--ink-2); transition: transform .1s; }
.rt-pill span:hover { border-color: var(--brand); }
.rt-pill input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.rt-pill.t-ok input:checked + span { background: var(--ok); border-color: var(--ok); color: #fff; }
.rt-pill.t-warn input:checked + span { background: var(--warn); border-color: var(--warn); color: #fff; }
.rt-pill.t-bad input:checked + span { background: var(--bad); border-color: var(--bad); color: #fff; }
.rt-pill input:checked + span { transform: scale(1.06); }
.rt-notes-box { margin-top: 10px; } .rt-notes-box summary { cursor: pointer; color: var(--brand); font-weight: 600; margin-bottom: 8px; }
.rt-raters-line { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rt-raters-line .chip { display: inline-flex; align-items: center; gap: 6px; }
.rt-other { display: grid; gap: 6px; }
.rt-other-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.rt-ap-cats, .rt-decide { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; }
.rt-ap-cats legend, .rt-decide legend { font-weight: 700; padding: 0 4px; }
.rt-ap-cats label, .rt-decide label { display: flex; gap: 6px; align-items: center; }
.rt-preview-dlg { width: min(1100px, calc(100% - 24px)); }
.rt-preview-dlg .rt-hero { margin-top: 4px; }

/* Fade-in when the rating unlocks */
.rt-anim .rv { animation: rtIn .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: var(--d, 0s); }
.rt-anim .rt-ring-fg { animation: rtRing 1.4s cubic-bezier(.2, .7, .2, 1) both; }
.rt-anim .rt-hero { animation: rtIn .5s ease-out both; }
.rt-anim .rt-bar i { animation: rtBar 1s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--d, 0s) + .15s); }
@keyframes rtIn { from { opacity: 0; transform: translateY(12px); } }
@keyframes rtRing { from { stroke-dashoffset: 326.73; } }
@keyframes rtBar { from { width: 0; } }
@media (prefers-reduced-motion: reduce) { .rt-anim .rv, .rt-anim .rt-ring-fg, .rt-anim .rt-bar i, .rt-anim .rt-hero, .rt-lock.shake, .rt-lock.opening { animation: none; } }
@media (max-width: 860px) {
  .rt-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-hero { flex-direction: column; text-align: center; }
  .rt-cat summary { grid-template-columns: 30px 1fr 30px; } .rt-cat summary .rt-bar { grid-column: 1 / -1; grid-row: 2; }
  .rt-cat-more { padding-left: var(--s5); }
  .rt-score-row { grid-template-columns: 1fr; }
  .rt-guide-scale > div { grid-template-columns: 60px 1fr; } .rt-guide-scale > div input:last-child { grid-column: 1 / -1; }
  .rt-other-row { grid-template-columns: 1fr; }
}
#rtForm [hidden], #rtForm[hidden], #arForm [hidden] { display: none !important; }
/* Ratings summary cards: title, number and note share rows across all four cards, so numbers line up. */
.rt-kpis { grid-template-rows: auto auto auto; }
.rt-kpis .kpi { display: grid; grid-row: span 3; grid-template-rows: subgrid; align-content: start; row-gap: 6px; }
.rt-kpis .kpi-top { align-items: flex-start; }
.rt-kpis .kpi-top svg { flex-shrink: 0; margin-top: 2px; }
.rt-kpis .kpi .big { align-self: end; }
.rt-dept { width: auto; min-width: 210px; }
.rt-kpis .kpi .big { white-space: nowrap; }
/* Ratings: departments and peer review */
.rt-dept-line { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rt-cross { color: var(--brand); font-weight: 600; }
.rt-hidden { color: var(--muted); font-weight: 500; font-size: 13px; background: repeating-linear-gradient(-45deg, var(--surface-2), var(--surface-2) 6px, transparent 6px, transparent 12px); }
.rt-hidden svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 4px; }
.rt-cell.rt-gap { box-shadow: inset 0 0 0 2px var(--warn); }
.rt-dept-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; background: var(--surface-2); border-radius: 10px; margin-bottom: 14px; }
.rt-dept-pick label { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.rt-dept-pick select.input { width: auto; min-width: 200px; }
.rt-blind { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px dashed var(--line-strong, var(--line)); border-radius: 10px; background: var(--surface-2); }
.rt-blind > svg { width: 22px; height: 22px; color: var(--muted); flex-shrink: 0; margin-top: 2px; }
.rt-raters-inline { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-size: 13px; }
.rt-peer-table th { white-space: nowrap; } .rt-peer-table th .avatar { vertical-align: middle; }
.rt-gap-row td { background: color-mix(in srgb, var(--warn-bg) 60%, transparent); }
.rt-peer-notes { display: grid; gap: 8px; margin-top: 10px; }
.rt-peer-note { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; background: var(--surface-2); border-radius: 8px; font-size: 14px; }
.rt-guide-cat { border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.rt-guide-cat-head { display: grid; grid-template-columns: 1fr 130px; gap: 8px; }
.rt-remove-field { color: var(--bad); justify-self: start; }
/* Rating fields: cards and the icon picker */
.rt-field-card { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: start; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.rt-field-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--info-bg); color: var(--brand); }
.rt-field-ico svg { width: 22px; height: 22px; }
.rt-field-main b { font-size: 16px; } .rt-field-main ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 14px; display: grid; gap: 2px; }
.rt-field-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.rt-icon-pick { border: 0; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.rt-icon-pick legend { font-weight: 600; margin-bottom: 8px; }
.rt-icon-pick label { display: grid; justify-items: center; gap: 4px; cursor: pointer; }
.rt-icon-pick input { position: absolute; opacity: 0; pointer-events: none; }
.rt-icon-pick span { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink-2); transition: transform .1s; }
.rt-icon-pick span svg { width: 24px; height: 24px; }
.rt-icon-pick small { font-size: 12px; color: var(--muted); }
.rt-icon-pick label:hover span { border-color: var(--brand); }
.rt-icon-pick input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; transform: scale(1.06); }
.rt-icon-pick input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.rpt-search { width: auto; min-width: 220px; flex: 1; }
/* Full screen hides the top bar, so pinned headers sit at the very top instead of below where it was. */
body.kiosk .sch-head, body.kiosk .plan-table thead th { top: 0; }
body.kiosk .report-nav, body.kiosk .pc-side, body.kiosk .pc-panel { top: 12px; }
/* Ratings table: the column headings, clock-in # and name stay pinned while scrolling through the team. */
.rt-scroll { max-height: calc(100vh - 150px); overflow: auto; }
.rt-table thead th { position: sticky; top: 0; z-index: 3; background: var(--surface); box-shadow: inset 0 -1px 0 var(--line); }
.rt-table th:nth-child(1), .rt-table td:nth-child(1) { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.rt-table th:nth-child(2), .rt-table td:nth-child(2) { position: sticky; left: var(--rt-c1, 92px); z-index: 2; background: var(--surface); box-shadow: inset -1px 0 0 var(--line); }
.rt-table thead th:nth-child(1), .rt-table thead th:nth-child(2) { z-index: 4; }
.rt-table tr.clickable:hover td:nth-child(1), .rt-table tr.clickable:hover td:nth-child(2) { background: var(--surface-2); }
.rt-table td:nth-child(1), .rt-table th:nth-child(1) { min-width: 92px; width: 92px; }

/* ---------------- Accountability ---------------- */
#docForm [hidden], #recForm [hidden] { display: none !important; }
.ac-meter { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 6px; }
.ac-meter i { width: 14px; height: 8px; border-radius: 3px; background: var(--line); }
.ac-meter.big i { width: 26px; height: 12px; border-radius: 4px; }
.ac-meter i.on.s1 { background: #e9b949; } .ac-meter i.on.s2 { background: #e38b2c; } .ac-meter i.on.s3 { background: #d4562b; } .ac-meter i.on.s4 { background: var(--bad); }
.ac-attn-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--info-bg); color: var(--brand); flex-shrink: 0; }
.ac-attn-ico.warn { background: var(--warn-bg); color: var(--warn); }
.ac-team-head, .ac-team-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) 150px 110px minmax(150px, 1fr) 20px; gap: 12px; align-items: center; padding: 10px var(--s5); }
.ac-team-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-bottom: 1px solid var(--line); }
.ac-team-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.ac-team-row:hover { background: var(--surface-2); }
.ac-kind { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; background: var(--surface-2); color: var(--ink-2); }
.ac-kind.k-s1 { background: #fbefd2; color: #8a6200; } .ac-kind.k-s2 { background: #fbe1c6; color: #8f4a07; } .ac-kind.k-s3 { background: #f7d3c3; color: #8f2f0e; } .ac-kind.k-s4 { background: var(--bad-bg); color: var(--bad); }
.ac-kind.k-coach { background: var(--info-bg); color: var(--brand); } .ac-kind.k-private { background: var(--surface-2); color: var(--ink); }
.ac-kind svg { width: 16px; height: 16px; }
.ac-void { opacity: .55; } .ac-void .row-title { text-decoration: line-through; }
.ac-person-top { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--surface-2); border-radius: 12px; }
.ac-person-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.ac-person-stats div { background: var(--surface-2); border-radius: 10px; padding: 10px; text-align: center; }
.ac-person-stats b { display: block; font-size: 20px; } .ac-person-stats small { color: var(--muted); font-size: 12px; }
.ac-strike-box { margin-top: 12px; }
.ac-strike-pick { display: grid; gap: 8px; }
.ac-step-text { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; font-size: 14px; }
.ac-sigs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.ac-sig { display: grid; gap: 6px; }
.ac-sig-label { font-weight: 600; }
.ac-pad { width: 100%; height: 110px; border: 1.5px dashed var(--line); border-radius: 10px; background: #fff; touch-action: none; cursor: crosshair; }
.ac-sig-foot { display: flex; gap: 8px; } .ac-sig-foot .input { flex: 1; }
.ac-rec-strike { display: flex; gap: 14px; align-items: flex-start; padding: 12px 14px; background: var(--surface-2); border-radius: 12px; margin-bottom: 14px; }
.ac-signed { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.ac-signed-box { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 4px; min-height: 84px; align-content: end; }
.ac-signed-box.empty { place-items: center; border-style: dashed; }
.ac-signed-box small { color: var(--muted); border-top: 1px solid var(--line); padding-top: 4px; }
.ac-sig-img { max-height: 54px; max-width: 100%; background: #fff; border-radius: 4px; }
.ac-sig-typed { font-family: 'Brush Script MT', 'Segoe Script', cursive; font-size: 26px; line-height: 1.2; color: var(--ink); }
.ac-rec-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); }
.ac-mine-hero .card-body { text-align: center; padding: 28px; }
.ac-step-row { display: flex; gap: 10px; align-items: flex-start; }
.ac-policy-step { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.ac-infractions { display: grid; gap: 12px; }
.ac-inf { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 6px; }
.ac-todo { align-items: center; } .ac-todo .btn { margin-left: auto; }
@media (max-width: 860px) { .ac-team-head { display: none; } .ac-team-row { grid-template-columns: 1fr auto; } .ac-team-row > span:nth-child(3), .ac-team-row > span:nth-child(4) { display: none; } .ac-person-stats { grid-template-columns: repeat(2, 1fr); } }
/* Date boxes match the height of the other boxes in forms. */
.form-grid input.input[type="date"], .form-grid input.input[type="time"] { height: 44px; min-height: 44px; padding-top: 0; padding-bottom: 0; box-sizing: border-box; }
.form-grid .pp-box { min-height: 44px; box-sizing: border-box; }
/* Accountability v2 */
.ac-kind[data-k="coach"] { background: var(--info-bg); color: var(--brand); } .ac-kind[data-k="private"] { background: var(--surface-2); color: var(--ink); }
.ac-auto { font-size: 11px; padding: 1px 8px; vertical-align: 1px; } .ac-auto svg { width: 12px; height: 12px; }
.ac-expired { opacity: .7; }
.ac-appeal-cta { display: flex; gap: 14px; align-items: center; justify-content: space-between; margin-top: 16px; padding: 14px; border: 1px dashed var(--line); border-radius: 12px; }
.ac-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .ac-files .chip { cursor: pointer; border: 0; font: inherit; }
.ac-decide { margin-top: 12px; padding: 12px; background: var(--surface-2); border-radius: 12px; display: grid; gap: 8px; }
#docLead2Pick { margin-bottom: 12px; }
/* Accountability: documents and the team member reveal */
.ac-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 10px; }
.ac-file { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.ac-file.pdf { grid-column: 1 / -1; }
.ac-file-head { display: flex; align-items: center; gap: 6px; padding: 6px 10px; }
.ac-thumb { display: block; width: 100%; border: 0; padding: 0; background: var(--surface-2); cursor: zoom-in; }
.ac-thumb img { display: block; width: 100%; max-height: 220px; object-fit: contain; }
.ac-viewer { width: min(1000px, calc(100% - 24px)); height: min(90vh, 900px); padding: 0; display: none; flex-direction: column; }
.ac-viewer[open] { display: flex; }
.ac-viewer iframe { flex: 1; width: 100%; border: 0; }
.ac-viewer-img { flex: 1; overflow: auto; display: grid; place-items: center; background: var(--surface-2); padding: 12px; }
.ac-viewer-img img { max-width: 100%; }
.ac-hero h2 { color: var(--tone); }
.ac-steps { display: flex; align-items: center; gap: 0; padding: 18px var(--s5) 22px; overflow-x: auto; }
.ac-step { display: grid; justify-items: center; gap: 6px; min-width: 96px; text-align: center; }
.ac-step b { font-size: 13px; color: var(--muted); }
.ac-step-dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; border: 2px solid var(--line); background: var(--surface); color: #fff; }
.ac-step.on .ac-step-dot { background: hsl(var(--h) 78% 48%); border-color: hsl(var(--h) 78% 48%); }
.ac-step.on b { color: var(--ink); }
.ac-step-line { flex: 1; min-width: 20px; height: 2px; background: var(--line); margin-bottom: 22px; }
.rt-anim .ac-step.on .ac-step-dot { animation: acPop .5s cubic-bezier(.2, .9, .3, 1.4) both; animation-delay: calc(var(--d, 0s) + .1s); }
@keyframes acPop { from { transform: scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .rt-anim .ac-step.on .ac-step-dot { animation: none; } }
.ac-clock { max-width: 130px; }
.ac-idok { color: var(--ok); font-weight: 600; } .ac-idok svg { width: 12px; height: 12px; vertical-align: -1px; }
/* Security: two-step verification and automatic sign-out */
.mfa-steps { margin: 8px 0; padding-left: 20px; display: grid; gap: 4px; }
.mfa-qr { display: grid; place-items: center; margin: 8px 0; } .mfa-qr img { background: #fff; padding: 8px; border-radius: 10px; border: 1px solid var(--line); }
.mfa-key { word-break: break-all; font-size: 13px; }
.idle-warn { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; background: var(--surface); color: var(--ink); border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 12px; padding: 12px 16px; max-width: calc(100% - 24px); }
.sec-list { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
/* Owner Portal */
/* Daywell Staff */
.nav .nav-btn { display: flex; align-items: center; gap: 12px; width: 100%; color: #fff; background: none; border: 0; text-align: left; font: inherit; font-weight: 500; font-size: 16px; padding: 11px 12px; border-radius: var(--radius-sm); margin: 3px 0; cursor: pointer; }
.nav .nav-btn:hover, .nav .nav-btn:focus-visible { background: rgba(255,255,255,.1); }
.nav .nav-btn .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.nav-collapsed .nav .nav-btn { justify-content: center; padding: 12px 0; } body.nav-collapsed .nav .nav-btn .label { display: none; }
body.dw-mode #searchForm, body.dw-mode #bellBtn { display: none; }
body.dw-mode .topbar #modeBtn { margin-left: auto; }
.own-brand { margin-bottom: var(--s4); border-left: 4px solid var(--ok); }
.own-brand.on { border-left-color: var(--bad); background: color-mix(in srgb, var(--bad-bg) 50%, var(--surface)); }
.own-brand-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.own-brand-row > div { flex: 1 1 260px !important; min-width: 0; }
.own-brand-row > .btn { flex-shrink: 0; margin-left: auto; max-width: 100%; white-space: normal; }
.own-brand-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px var(--ok-bg); flex-shrink: 0; }
.own-brand.on .own-brand-dot { background: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.dw-loading { display: flex; align-items: center; gap: 12px; padding: 28px 4px; color: var(--muted); }
.dw-spin { width: 20px; height: 20px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: dwSpin .8s linear infinite; }
@keyframes dwSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dw-spin { animation-duration: 2.4s; } }
.dw-error { background: var(--bad-bg); color: var(--bad); }
.dw-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--s4); margin-bottom: var(--s4); align-items: start; }
.dw-two > .card { margin: 0; }
main > .card, main > section.card { margin-bottom: var(--s4); }
.dw-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s4); }
.dw-ws-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.dw-search { margin-bottom: var(--s4); max-width: 520px; }
.dw-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: var(--s4); }
.dw-filters .input { width: auto; min-width: 200px; flex: 1 1 200px; max-width: 320px; }
.dw-table td { vertical-align: top; } .dw-table tr.clickable { cursor: pointer; } .dw-table tr.clickable:hover td { background: var(--surface-2); }
.dw-table a { color: inherit; text-decoration: none; }
.dw-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; } .dw-dl dt { color: var(--muted); } .dw-dl dd { margin: 0; }
.dw-steps { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.dw-steps li { display: flex; gap: 10px; align-items: center; color: var(--muted); } .dw-steps li.done { color: var(--ink); } .dw-steps li svg { width: 18px; height: 18px; color: var(--ok); }
.dw-dot { width: 14px; height: 14px; margin: 2px; border-radius: 50%; border: 2px solid var(--line); flex-shrink: 0; }
.dw-fieldset { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin: 0; } .dw-fieldset legend { padding: 0 6px; font-weight: 600; }
.dw-loc { margin-bottom: 8px; }
.dw-radio { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; cursor: pointer; } .dw-radio input { margin-top: 4px; } .dw-radio > span { display: grid; gap: 2px; }
.dw-cap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.dw-caps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dw-staff.off { opacity: .65; }
.dw-h3 { font-size: 16px; margin: 0 0 6px; }
.dw-note { white-space: pre-wrap; }
.dw-change { margin-top: 4px; }
.dw-invite { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.support-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 18px; background: #5d3754; color: #fff; font-size: 14px; position: sticky; top: 0; z-index: 30; }
.support-bar.edit { background: #8a2c1b; }
.support-bar .btn { background: #fff; color: #5d3754; border: 0; } .support-bar .btn-outline { background: transparent; color: #fff; border: 1.5px solid #fff; }
.support-bar > span { flex: 1 1 260px; }
.support-bar svg { width: 18px; height: 18px; }
@media (max-width: 700px) { .dw-dl { grid-template-columns: 1fr; } .dw-dl dt { margin-top: 6px; } .dw-filters .input { max-width: none; } }
/* Your menu (top right) */
.me-btn { border: 0; background: none; padding: 2px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.me-btn:focus-visible { outline: 3px solid var(--aqua); outline-offset: 2px; }
.me-btn .avatar.sm { width: 36px; height: 36px; font-size: 13px; }
.me-menu { position: fixed; top: 62px; right: 16px; z-index: 900; width: min(320px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; display: grid; gap: 2px; }
.me-head { display: flex; gap: 12px; align-items: center; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.me-head b { display: block; } .me-head small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.avatar.lg { width: 48px; height: 48px; font-size: 17px; flex-shrink: 0; }
.me-item { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; padding: 10px; border-radius: 10px; cursor: pointer; }
.me-item:hover, .me-item:focus-visible { background: var(--surface-2); }
.me-item svg { width: 18px; height: 18px; color: var(--muted); }
.me-out { color: var(--bad); } .me-out svg { color: var(--bad); }
.me-mode { padding: 6px 10px 10px; display: grid; gap: 6px; } .me-mode .seg button { padding: 6px 10px; font-size: 14px; }
.me-demo { padding: 6px 10px 10px; display: grid; gap: 6px; }
.me-sep { height: 1px; background: var(--line); margin: 4px 0; }
.sidebar-foot:empty { display: none; }
.name-form { display: flex; gap: 8px; flex-wrap: wrap; } .name-form .input { flex: 1 1 200px; }
.dw-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.dw-color { display: flex; align-items: center; gap: 10px; } .dw-color input[type=color] { width: 48px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.dw-mine-row .row-meta svg { width: 14px; height: 14px; vertical-align: -2px; }

/* Top bar on tablets and phones: everything fits on one line (light/dark is also in the profile menu). */
@media (max-width: 860px) {
  .topbar { gap: 8px; }
  .topbar .place { min-width: 0; flex: 0 1 auto; }
  .topbar .store-switch select { max-width: 34vw; text-overflow: ellipsis; }
  .search-box { min-width: 0; padding: 0 8px; }
}
@media (max-width: 520px) { .topbar #modeBtn { display: none; } }

/* ---------- Chat ---------- */
.chat { display: grid; grid-template-columns: 270px minmax(0, 1fr); height: calc(100vh - 150px); min-height: 540px; overflow: hidden; margin-top: 4px; }
.chat.with-thread { grid-template-columns: 270px minmax(0, 1fr) minmax(300px, 380px); }
.chat-thread { display: none; border-left: 1px solid var(--line); min-width: 0; min-height: 0; flex-direction: column; }
.chat.with-thread .chat-thread { display: flex; }
.chat-wait { padding: var(--s5); }
.chat-side { border-right: 1px solid var(--line); overflow-y: auto; padding: var(--s3) var(--s2) var(--s4); background: var(--surface-2); }
.chat-side-top { display: flex; gap: 6px; align-items: center; padding: 0 4px var(--s2); }
.chat-search-btn { flex: 1; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); padding: 8px 10px; color: var(--muted); font: inherit; font-size: var(--fs-sm); cursor: pointer; min-height: 38px; }
.chat-search-btn svg { width: 16px; height: 16px; }
.chat-side-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s3) var(--s3) 4px; font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.chat-side-head b { font-weight: 600; }
.chat .icon-btn.sm { width: 32px; height: 32px; }
.chat .icon-btn.sm svg { width: 18px; height: 18px; }
.chat .icon-btn.sm:hover { background: var(--surface-2); }
.chat-side .icon-btn.sm:hover { background: var(--surface); }
.chat-row { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 7px 12px; border-radius: var(--radius-sm); color: var(--ink-2); font: inherit; font-size: var(--fs-md); cursor: pointer; min-height: 38px; }
.chat-row:hover { background: var(--surface); }
.chat-row.on { background: var(--surface); color: var(--ink); box-shadow: inset 3px 0 0 var(--action); }
.chat-row.unread { color: var(--ink); font-weight: 700; }
.chat-row.muted { opacity: .62; }
.chat-row.chat-browse { color: var(--muted); font-size: var(--fs-sm); }
.chat-row-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row .count { background: var(--action); color: #fff; border-radius: var(--radius-pill); font-size: 12px; font-weight: 700; padding: 1px 8px; }
.chat-muted-ic svg { width: 14px; height: 14px; opacity: .6; vertical-align: -2px; }
.chat-ic { display: inline-grid; place-items: center; width: 24px; color: var(--muted); flex: none; }
.chat-hash { font-weight: 700; font-size: 17px; line-height: 1; }
.chat-archived > summary { cursor: pointer; list-style: none; }
.chat-archived > summary::-webkit-details-marker { display: none; }
.chat-archived > summary .hint { margin-left: auto; }
.chat-ic svg { width: 18px; height: 18px; }
.chat-stack { display: inline-flex; flex: none; }
.chat-stack .avatar + .avatar { margin-left: -8px; box-shadow: 0 0 0 2px var(--surface-2); }
.chat-pad { padding: 4px 12px 8px; margin: 0; }
.chat-side-foot { border-top: 1px solid var(--line); margin-top: var(--s4); padding-top: var(--s3); }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px var(--s4); border-bottom: 1px solid var(--line); min-height: 60px; }
.chat-head-text { flex: 1; min-width: 0; border: 0; background: none; text-align: left; padding: 4px 6px; border-radius: var(--radius-sm); font: inherit; color: inherit; cursor: pointer; }
.chat-head-text:not(.static):hover { background: var(--surface-2); }
.chat-head h2 { margin: 0; font-size: 17px; display: flex; gap: 6px; align-items: center; }
.chat-head small { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head-tools { display: flex; align-items: center; gap: 6px; }
.chat-people { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-pill); padding: 3px 10px 3px 4px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.chat-people .avatar + .avatar { margin-left: -10px; box-shadow: 0 0 0 2px var(--surface); }
.chat-back { display: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: var(--s2) var(--s4) var(--s4); }
.chat-msgs.drop { outline: 2px dashed var(--action); outline-offset: -8px; background: var(--info-bg); }
.chat-msgs:focus-visible { outline: 2px solid var(--action); outline-offset: -2px; }
.chat-empty { display: grid; place-items: center; height: 100%; }
.chat-note { text-align: center; color: var(--muted); font-size: 12px; margin: 6px 0 var(--s3); }
.chat-day, .chat-new-line { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 600; margin: var(--s4) 0 var(--s2); }
.chat-day::before, .chat-day::after, .chat-new-line::before, .chat-new-line::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.chat-new-line { color: var(--action); }
.chat-new-line::before, .chat-new-line::after { border-color: var(--action); }
.chat-msg { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); }
.chat-msg.join { padding-top: 1px; }
.chat-msg:hover, .chat-msg:focus-within { background: var(--surface-2); }
.chat-msg.mention { background: var(--warn-bg); }
.chat-msg.pinned { background: var(--info-bg); }
.chat-msg.flash { animation: chatFlash 2.4s ease-out; }
@keyframes chatFlash { 0%, 40% { background: var(--warn-bg); box-shadow: inset 3px 0 0 var(--warn); } 100% { background: transparent; } }
.chat-pinned { font-size: 12px; color: var(--info); font-weight: 600; display: flex; gap: 4px; align-items: center; margin-bottom: 2px; }
.chat-pinned svg { width: 13px; height: 13px; }
.chat-msg-head { display: flex; gap: 8px; align-items: baseline; }
.chat-msg-head time { color: var(--muted); font-size: 12px; }
.chat-time-side { color: transparent; font-size: 11px; text-align: right; padding-top: 3px; white-space: nowrap; }
.chat-msg:hover .chat-time-side { color: var(--muted); }
.chat-body { margin: 2px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.chat-body a { color: var(--action); }
.chat-body code { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: .9em; font-family: Consolas, 'Courier New', monospace; color: var(--bad); }
.chat-pre { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; margin: 4px 0; white-space: pre-wrap; font-family: Consolas, 'Courier New', monospace; font-size: 13px; }
.chat-quote { display: block; border-left: 3px solid var(--line-strong); padding-left: 10px; color: var(--ink-2); }
.chat-body.removed { color: var(--muted); font-style: italic; }
.chat-edited { color: var(--muted); font-size: 12px; }
.chat-at { background: var(--info-bg); color: var(--info); border-radius: 4px; padding: 0 3px; font-weight: 600; }
.chat-at.me, .chat-at.all { background: var(--warn); color: #fff; }
.chat-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chat-img { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0; background: var(--surface-2); cursor: zoom-in; overflow: hidden; line-height: 0; }
.chat-img img { max-width: min(360px, 100%); max-height: 260px; min-width: 80px; min-height: 60px; object-fit: cover; display: block; }
.chat-video { max-width: min(400px, 100%); max-height: 260px; border-radius: var(--radius-sm); background: #000; }
.chat-file { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 12px; background: var(--surface); color: var(--ink); text-decoration: none; max-width: 320px; }
.chat-file:hover { border-color: var(--action); }
.chat-file svg { width: 26px; height: 26px; color: var(--action); flex: none; }
.chat-file b { display: block; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file small { color: var(--muted); font-size: 12px; }
.chat-files .gone { opacity: .45; pointer-events: none; }
.chat-view { text-align: center; background: var(--surface-2); border-radius: var(--radius-sm); }
.chat-view img { max-width: 100%; max-height: 70vh; }
.chat-reacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chat-react { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-pill); padding: 2px 9px; font: inherit; font-size: 14px; cursor: pointer; min-height: 28px; color: var(--ink-2); }
.chat-react span { font-size: 12px; font-weight: 600; }
.chat-react.on { background: var(--info-bg); border-color: var(--info); color: var(--info); }
.chat-react.add { opacity: 0; }
.chat-react.add svg { width: 16px; height: 16px; }
.chat-msg:hover .chat-react.add, .chat-react.add:focus { opacity: 1; }
.chat-replies { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; border: 1px solid transparent; background: none; border-radius: var(--radius-sm); padding: 3px 8px 3px 3px; font: inherit; font-size: 13px; color: var(--action); cursor: pointer; }
.chat-replies:hover { border-color: var(--line); background: var(--surface); }
.chat-replies .hint { font-size: 12px; }
.chat-seen { font-size: 13px; margin-top: 4px; display: inline-flex; gap: 6px; align-items: center; }
.chat-tools { position: absolute; top: -14px; right: 8px; display: none; align-items: center; gap: 1px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); padding: 2px; z-index: 3; }
.chat-msg:hover .chat-tools, .chat-msg:focus-within .chat-tools { display: flex; }
.chat-tools .icon-btn.on { color: var(--info); }
.chat-tool-emoji { border: 0; background: none; width: 32px; height: 32px; border-radius: 6px; font-size: 16px; cursor: pointer; }
.chat-tool-emoji:hover { background: var(--surface-2); }
.chat-edit textarea { width: 100%; resize: vertical; }
.chat-edit-btns { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 6px; }
.chat-edit-btns .hint { margin-right: auto; font-size: 12px; }
.chat-compose { padding: var(--s2) var(--s4) var(--s3); }
.chat-compose.locked { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: var(--fs-sm); background: var(--surface-2); border-top: 1px solid var(--line); padding: var(--s3) var(--s4); }
.chat-compose.locked .btn { margin-left: auto; }
.chat-compose-box { position: relative; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.chat-compose-box:focus-within { border-color: var(--action); box-shadow: 0 0 0 3px color-mix(in srgb, var(--action) 18%, transparent); }
.chat-input { display: block; width: 100%; border: 0; background: transparent; resize: none; min-height: 44px; max-height: 200px; padding: 12px 14px 4px; font: inherit; font-size: 15px; line-height: 1.45; color: var(--ink); outline: none; }
.chat-bar { display: flex; align-items: center; gap: 2px; padding: 4px 6px 6px; }
.chat-fmt { display: inline-grid; place-items: center; min-width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; color: var(--ink-2); font: inherit; font-size: 14px; cursor: pointer; }
.chat-fmt:hover { background: var(--surface-2); color: var(--ink); }
.chat-fmt svg { width: 18px; height: 18px; }
.chat-fmt code { font-size: 12px; font-family: Consolas, monospace; }
.chat-bar-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.chat-send { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; min-height: 34px; }
.chat-tip { margin: 6px 2px 0; font-size: 12px; }
.chat-typing { margin: 4px 2px 0; min-height: 1.3em; font-size: 12px; font-style: italic; color: var(--muted); }
.chat-typing:empty { min-height: 0; margin: 0; }
.chat-msg.sending .chat-msg-main { opacity: .6; }
.chat-status { font-size: 12px; color: var(--muted); margin-top: 2px; }
.chat-status.bad { color: var(--bad); font-weight: 600; }
/* Taps register instantly on phones (no double-tap-to-zoom wait), and every press shows right away */
a, button, label, input, select, textarea, summary, [onclick] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button:not(:disabled):active, .btn:not(:disabled):active, .icon-btn:not(:disabled):active { transform: scale(.97); opacity: .85; }
button[aria-busy="true"] { cursor: progress; opacity: .7; }
.crop-dlg { width: min(360px, 100%); }
.crop-box { position: relative; margin: 8px auto 12px; border-radius: 12px; overflow: hidden; background: #111; touch-action: none; }
.crop-box canvas { display: block; cursor: grab; touch-action: none; }
.crop-box canvas:active { cursor: grabbing; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgba(0,0,0,.55); border: 2px solid rgba(255,255,255,.9); pointer-events: none; }
.crop-zoom input { width: 100%; }
.notify-table td { vertical-align: middle; }
.notify-table input[type=checkbox] { width: 20px; height: 20px; }
.pc-day { display: inline-flex; align-items: center; gap: 4px; }
.btn-ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn-ok:hover { filter: brightness(.92); }
#refreshBtn.spin svg { animation: dw-spin-rot .8s linear infinite; }
@keyframes dw-spin-rot { to { transform: rotate(360deg); } }
.chat-pending { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 10px 0; }
.chat-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 4px 4px 6px; background: var(--surface-2); font-size: 13px; max-width: 240px; }
.chat-chip img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; }
.chat-chip svg { width: 20px; height: 20px; color: var(--action); }
.chat-chip > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-chip small { display: block; color: var(--muted); font-size: 11px; }
.chat-at-list { position: absolute; bottom: calc(100% + 6px); left: 0; width: min(340px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 4px; z-index: 20; }
.chat-at-list button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: none; padding: 7px 8px; border-radius: 6px; text-align: left; font: inherit; color: var(--ink); cursor: pointer; }
.chat-at-list button small { margin-left: auto; color: var(--muted); font-size: 12px; }
.chat-at-list button.on, .chat-at-list button:hover { background: var(--surface-2); }
.chat-emoji { position: fixed; z-index: 1000; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; width: 296px; }
.chat-emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.chat-emoji-grid button { border: 0; background: none; font-size: 20px; height: 34px; border-radius: 6px; cursor: pointer; }
.chat-emoji-grid button:hover, .chat-emoji-grid button:focus-visible { background: var(--surface-2); }
.chat-dlg-title { display: flex; align-items: center; gap: 10px; }
.chat-detail { margin-top: var(--s3); }
.chat-about { margin: 0 0 var(--s4); display: grid; gap: 12px; }
.chat-about div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.chat-about dt { color: var(--muted); font-size: var(--fs-sm); }
.chat-about dd { margin: 0; }
.chat-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chat-leave, .chat-kick { color: var(--bad); }
.chat-members { margin-top: var(--s3); max-height: 50vh; overflow-y: auto; }
.chat-hits { margin-top: var(--s3); max-height: 60vh; overflow-y: auto; }
.chat-hits mark { background: var(--warn-bg); color: inherit; padding: 0 2px; border-radius: 3px; }
.chat-who-set { border: 0; padding: 0; margin: var(--s3) 0; display: grid; gap: 6px; }
.chat-who-set legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.chat-who { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; }
.chat-who:has(input:checked) { border-color: var(--action); box-shadow: inset 0 0 0 1px var(--action); }
.chat-who input { margin-top: 3px; }
.chat-who small { display: block; color: var(--muted); font-size: var(--fs-sm); }
.chat-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 6px 0; }
.chat-checks label { display: inline-flex; gap: 6px; align-items: center; }
.chat-wrap { container: chatbox / inline-size; }
.chat-thread .chat-send span, .chat-thread .chat-tip { display: none; }
.chat-thread .chat-fmt { min-width: 28px; }
@container chatbox (max-width: 1000px) {
  .chat.with-thread { grid-template-columns: minmax(0, 1fr) minmax(280px, 340px); }
  .chat.with-thread .chat-side { display: none; }
}
@container chatbox (max-width: 680px) {
  .chat { grid-template-columns: minmax(0, 1fr); }
  .chat.with-thread { grid-template-columns: minmax(0, 1fr); }
  .chat.with-thread .chat-main { display: none; }
  .chat.show-list .chat-main, .chat.show-convo .chat-side { display: none; }
  .chat.show-list:not(.with-thread) .chat-side { display: block; }
  .chat-side { border-right: 0; }
  .chat-back { display: grid; }
  .chat-head, .chat-msgs, .chat-compose { padding-left: var(--s3); padding-right: var(--s3); }
  .chat-head-tools .btn, .chat-people span { display: none; }
  .chat-send span { display: none; }
  .chat-tip { display: none; }
  .chat-msg:hover .chat-tools { display: none; }
  .chat-msg.tools .chat-tools { display: flex; position: static; grid-column: 2; justify-self: start; box-shadow: none; flex-wrap: wrap; }
  .chat-react.add { opacity: 1; }
}
/* Phones: Chat fills the screen under the top bar, like a messaging app. The page itself never scrolls or slides
   sideways; only the message list does. Text boxes use 16px text so iPhones don't zoom in when you tap them. */
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px !important; }
  body[data-page="chat"] { overflow: hidden; overscroll-behavior: none; }
  body[data-page="chat"] .shell { height: 100vh; height: 100dvh; min-height: 0; overflow: hidden; }
  body[data-page="chat"] main { padding: 0; max-width: none; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
  body[data-page="chat"] .footer, body[data-page="chat"] .legal { display: none; }
  body[data-page="chat"] .chat-wrap { flex: 1; min-height: 0; display: flex; }
  body[data-page="chat"] .chat { flex: 1; width: 100%; height: auto; min-height: 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
  body[data-page="chat"] .chat-wait { margin: var(--s4); }
  .chat-row { min-height: 46px; font-size: 16px; }
  .chat-msgs { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .chat-compose { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
  .chat-about div { grid-template-columns: 1fr; gap: 2px; }
  .chat-emoji { width: calc(100vw - 16px); }
}
.done-toggle { display: block; margin: 10px 16px; font-size: var(--fs-sm); }

/* Chat: emoji in the device's own style, profile cards */
.emo, .chat-emoji button, .chat-react, .chat-tool-emoji, .chat-reacts { font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', 'Twemoji Mozilla', var(--font-body), sans-serif; }
.chat-react span { font-family: var(--font-body); }
.chat-body .emo { font-size: 1.15em; line-height: 1; vertical-align: -0.05em; }
.chat-emoji { width: 340px; padding: 0; overflow: hidden; }
.chat-emoji-tabs { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: var(--surface-2); overflow-x: auto; }
.chat-emoji-tabs button { flex: none; width: 34px; height: 34px; border: 0; background: none; border-radius: 8px; font-size: 18px; cursor: pointer; opacity: .65; }
.chat-emoji-tabs button.on { background: var(--surface); opacity: 1; box-shadow: var(--shadow); }
.chat-emoji-name { font-size: 12px; font-weight: 600; color: var(--muted); padding: 8px 10px 2px; }
.chat-emoji .chat-emoji-grid { max-height: 232px; overflow-y: auto; padding: 4px 8px 8px; }
.chat-emoji-grid button { font-size: 22px; height: 38px; }
.chat-who-btn { border: 0; background: none; padding: 0; border-radius: 50%; cursor: pointer; align-self: start; line-height: 0; }
.chat-who-btn:focus-visible, .chat-name:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.chat-name { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; text-align: left; }
.chat-name:hover { text-decoration: underline; }
.chat-members .chat-name { font-weight: 500; }
.chat-profile-top { display: flex; gap: 18px; align-items: center; margin: -8px 0 var(--s4); }
.chat-profile-top h2 { margin: 0; font-size: 22px; }
.chat-profile-top p { margin: 4px 0 0; color: var(--ink-2); }
.chat-emoji .chat-emoji-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); overflow-x: hidden; }
.chat-emoji-grid button { min-width: 0; padding: 0; }

/* Get the App */
.ga-hero { display: flex; gap: 14px; align-items: center; margin: -4px 0 8px; }
.ga-hero img { border-radius: 14px; box-shadow: var(--shadow); }
.ga-steps { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 10px; }
.ga-steps li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.ga-steps li svg { width: 16px; height: 16px; vertical-align: -3px; }
.ga-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
