:root {
  --bg: #0E0F13;
  --panel: #16181E;
  --raised: #1D2028;
  --hover: #232733;
  --border: #262A33;
  --border-strong: #353A46;
  --text: #F3F4F6;
  --muted: #9AA3AF;
  --faint: #6B7280;
  --accent: #5B8CFF;
  --accent-soft: rgba(91, 140, 255, .14);
  --live: #F43F5E;
  --live-soft: rgba(244, 63, 94, .14);
  --ok: #22C55E;
  --warn: #F59E0B;
  --hand: #FCD34D;
  --radius: 12px;
  --radius-sm: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: 13px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  display: flex; flex-direction: column; user-select: none; -webkit-font-smoothing: antialiased; overflow: hidden;
}
button { font: inherit; color: inherit; cursor: pointer; }
h2 { margin: 0; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
kbd {
  display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 4px; text-align: center;
  background: var(--raised); border: 1px solid var(--border); border-bottom-width: 2px;
  font: 600 11px/16px -apple-system, BlinkMacSystemFont, sans-serif; color: var(--text);
}

/* ---------- Top bar */
.topbar {
  height: 60px; flex: none; display: flex; align-items: center; gap: 14px;
  padding: 0 16px 0 88px; border-bottom: 1px solid var(--border); background: var(--panel);
  -webkit-app-region: drag;
}
.topbar > * { -webkit-app-region: no-drag; }
.topbar .spacer { flex: 1; -webkit-app-region: drag; align-self: stretch; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 650; font-size: 15px; letter-spacing: -.01em; -webkit-app-region: drag; margin-right: 6px; }
.brand img { width: 24px; height: 24px; border-radius: 6px; }

.room {
  display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 6px 0 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px;
}
.room:hover { border-color: var(--border-strong); }
.room-code { font-size: 18px; font-weight: 700; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.room-url { color: var(--muted); font-size: 13px; }
.room-copy {
  font-size: 12px; font-weight: 600; color: var(--accent); padding: 4px 8px; border-radius: 6px; background: var(--accent-soft);
  min-width: 70px; text-align: center;
}
.room-copy.done { color: var(--ok); background: rgba(34, 197, 94, .14); }

.chip { display: flex; align-items: baseline; gap: 8px; height: 36px; padding: 0 12px; align-items: center; border: 1px solid var(--border); border-radius: 10px; }
.chip[hidden] { display: none; }
.chip-k { color: var(--muted); font-size: 12px; }
.chip-v { font-weight: 700; font-size: 15px; letter-spacing: .08em; font-variant-numeric: tabular-nums; }

.conn { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.conn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.conn.ok .dot { background: var(--ok); box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.conn.bad { color: var(--warn); }
.conn.bad .dot { background: var(--warn); }

/* Switches */
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text); font-size: 13px; }
.toggle.row { justify-content: space-between; padding: 12px 0 0; }
.toggle.row span { color: var(--muted); }
.switch {
  position: relative; width: 34px; height: 20px; flex: none; padding: 0; border-radius: 10px;
  background: var(--border-strong); border: 0; transition: background .15s;
}
.switch::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(14px); }
#joinToggle[aria-checked="true"] { background: var(--ok); }

/* Segmented control */
.seg { display: flex; padding: 3px; gap: 2px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; color: var(--muted); font-weight: 500; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--raised); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .4), inset 0 0 0 1px var(--border); }

/* ---------- Banners */
.banners:empty { display: none; }
.banners { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 0; flex: none; }
.banner {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px 8px 12px; font-size: 12.5px; border-radius: var(--radius);
  background: rgba(245, 158, 11, .08); border: 1px solid rgba(245, 158, 11, .28);
}
.banner.info { background: var(--accent-soft); border-color: rgba(91, 140, 255, .3); }
.banner .ico { width: 22px; height: 22px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; background: var(--warn); color: #1a1205; }
.banner.info .ico { background: var(--accent); color: #fff; }
.banner .txt { flex: 1; color: var(--muted); }
.banner .txt b { color: var(--text); font-weight: 600; }
.banner .acts { display: flex; gap: 8px; }

.btn {
  height: 30px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  background: var(--raised); font-weight: 550; white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.danger { color: #FDA4AF; }
.btn.danger:hover { background: var(--live-soft); border-color: rgba(244, 63, 94, .5); }

/* ---------- Work area: program + sidebar */
.work { flex: 1; min-height: 0; display: flex; gap: 16px; padding: 16px 16px 0; }
.left { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.program { flex: 0 0 56%; min-height: 0; display: flex; gap: 14px; align-items: stretch; }
.side { width: 300px; flex: none; display: flex; flex-direction: column; gap: 12px; min-height: 0; overflow: auto; padding-bottom: 16px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; }
.panel.grow { flex: 1; min-height: 150px; display: flex; flex-direction: column; }
.panel-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.panel-h .sub { color: var(--faint); font-size: 12px; }
.count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--warn); color: #1a1205; font-weight: 700; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.count[hidden] { display: none; }

/* A view = header + 16:9 frame that fits the space it has */
.view { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; container-type: size; }
.view-h { display: flex; align-items: center; gap: 10px; height: 26px; margin-bottom: 8px; align-self: center; width: min(100cqw - 4px, (100cqh - 70px) * 16 / 9); }
.view-h .title { font-weight: 600; font-size: 13px; }
.view-h .where { color: var(--faint); font-size: 12px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tag { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; padding: 3px 7px; border-radius: 5px; display: inline-flex; align-items: center; gap: 6px; }
.tag.live { background: var(--live); color: #fff; }
.tag.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1.6s ease-in-out infinite; }
.tag.next { background: var(--accent); color: #fff; }
@keyframes blink { 50% { opacity: .35; } }
.fit { flex: none; display: flex; justify-content: center; }
.frame {
  width: min(100cqw - 4px, (100cqh - 70px) * 16 / 9); aspect-ratio: 16 / 9; position: relative; border-radius: 10px; overflow: hidden;
  box-shadow: 0 0 0 1px var(--border);
}
.view.is-live .frame { box-shadow: 0 0 0 2px var(--live), 0 8px 30px rgba(244, 63, 94, .08); }
.view.is-next .frame { box-shadow: 0 0 0 2px var(--accent); }
.frame > .comp { position: absolute; inset: 0; }
.view .note { margin-top: 8px; color: var(--faint); font-size: 12px; min-height: 18px; text-align: center; }

/* Take button between Next and Live */
.take { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding-top: 30px; }
.view .note:empty { display: none; }
.take button {
  width: 92px; height: 92px; border-radius: 50%; border: 0; background: var(--live); color: #fff;
  font-size: 17px; font-weight: 700; letter-spacing: .02em;
  box-shadow: 0 6px 24px rgba(244, 63, 94, .35), inset 0 -3px 0 rgba(0, 0, 0, .18);
  transition: transform .08s, filter .15s;
}
.take button:hover { filter: brightness(1.08); }
.take button:active, .take button.hit { transform: scale(.95); }
.take button:disabled { background: var(--raised); color: var(--faint); box-shadow: inset 0 0 0 1px var(--border); cursor: default; }
.take .k { color: var(--faint); font-size: 11px; }

/* Slot overlays in an editable view */
.comp.editing .cell { cursor: pointer; }
.comp.editing .cell.vacant { background: #0B0C10; }
.comp.editing .cell.vacant::before {
  content: ""; position: absolute; inset: 6px; border: 1.5px dashed var(--border-strong); border-radius: 8px; pointer-events: none;
}
.comp.editing .cell.floating.vacant::before { inset: 0; }
.comp.editing .cell::after { content: ""; position: absolute; inset: 0; border-radius: 4px; pointer-events: none; transition: box-shadow .12s; }
.comp.editing .cell:hover::after { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); }
.comp.editing .cell.selected::after { box-shadow: inset 0 0 0 3px var(--accent); }
.comp.editing .cell.over::after { box-shadow: inset 0 0 0 3px var(--ok); background: rgba(34, 197, 94, .08); }
.slotui { position: absolute; inset: 0; z-index: 12; pointer-events: none; }
.slotui .num {
  position: absolute; left: 8px; top: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 6px;
  background: rgba(14, 15, 19, .85); color: var(--text); font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.cell.selected .slotui .num { background: var(--accent); box-shadow: none; }
.slotui .empty { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; color: var(--faint); font-size: 12px; font-weight: 500; }
.cell.vacant .slotui .empty { display: flex; }
.cell.selected.vacant .slotui .empty { color: var(--accent); }
.slotui .clear {
  pointer-events: auto; position: absolute; right: 8px; top: 8px; width: 22px; height: 22px; border-radius: 6px; border: 0;
  background: rgba(14, 15, 19, .85); color: var(--text); font-size: 15px; line-height: 1; padding: 0;
  opacity: 0; transition: opacity .12s; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.cell:hover .slotui .clear { opacity: 1; }
.slotui .clear:hover { background: var(--live); }
.slotui .clear[hidden] { display: none; }
.slotui .unzoom {
  pointer-events: auto; position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%); height: 24px; padding: 0 10px;
  border-radius: 12px; border: 0; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
.slotui .unzoom:hover { filter: brightness(1.1); }
.slotui .unzoom[hidden] { display: none; }
.comp.editing .cell.zoomed::after { box-shadow: inset 0 0 0 2px rgba(91, 140, 255, .55); }
.comp.editing .cell.zoomed.selected::after { box-shadow: inset 0 0 0 3px var(--accent); }
/* Drag across a picture to zoom into that part */
.comp .cell.boxing { overflow: hidden; }
.zoombox {
  position: absolute; z-index: 13; pointer-events: none; border: 2px solid var(--accent); border-radius: 3px;
  background: rgba(91, 140, 255, .16); box-shadow: 0 0 0 1px rgba(0, 0, 0, .6);
}
.zoombox span {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 3px 8px; border-radius: 6px;
  background: rgba(14, 15, 19, .8); color: #fff; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.comp.editing .cell.floating .slotui .num { left: 5px; top: 5px; }
.comp.editing .cell.floating .slotui .clear { right: 5px; top: 5px; }
/* The join card in a preview never blocks clicks on the slots under it */
.frame .joincard { pointer-events: none !important; }

/* ---------- Layout picker */
.layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.layouts button {
  display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 8px 4px 7px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; color: var(--muted); font-size: 11px; line-height: 1.2;
}
.layouts button:hover { border-color: var(--border-strong); color: var(--text); }
.layouts button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.layouts svg { width: 40px; height: 25px; }
.layouts svg rect { fill: #3A404D; }
.layouts svg rect.f { fill: #6B7383; stroke: var(--bg); stroke-width: 1; }
.layouts button.on svg rect { fill: rgba(91, 140, 255, .55); }
.layouts button.on svg rect.f { fill: var(--accent); }

/* ---------- Waiting list */
.waitlist { max-height: 260px; overflow: auto; margin: 10px -6px 0; padding: 0 6px; display: flex; flex-direction: column; gap: 8px; }
.waitlist .none { text-align: center; color: var(--faint); font-size: 12px; padding: 4px 4px 0; }
.req { display: grid; grid-template-columns: 30px 1fr; gap: 10px 10px; align-items: center; padding: 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); animation: arrive .25s ease; }
@keyframes arrive { from { opacity: 0; transform: translateY(-4px); } }
.avatar { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--raised); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); }
.req .who { flex: 1; min-width: 0; }
.req .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.req .dv { color: var(--faint); font-size: 12px; }
.req .acts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.req .btn { height: 28px; padding: 0 10px; }

/* ---------- People */
.people { flex: 1; min-height: 0; display: flex; flex-direction: column; padding-top: 14px; border-top: 1px solid var(--border); margin-top: 6px; }
.tiles {
  flex: 1; min-height: 0; overflow: auto; display: grid; gap: 14px; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); padding: 2px 2px 16px;
}
.tile { cursor: pointer; border-radius: var(--radius); }
.tile .thumb {
  position: relative; aspect-ratio: 16 / 10; background: #000; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 0 0 1px var(--border); transition: box-shadow .12s;
}
.tile:hover .thumb { box-shadow: 0 0 0 1px var(--border-strong), 0 0 0 4px rgba(255, 255, 255, .04); }
.tile.live .thumb { box-shadow: 0 0 0 2px var(--live); }
.tile.next .thumb { box-shadow: 0 0 0 2px var(--accent); }
.tile .thumb > video, .tile .thumb > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile .thumb > .wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--faint); font-size: 12px; text-align: center; padding: 10px; }
.tile .key {
  position: absolute; left: 8px; top: 8px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 5px;
  background: rgba(14, 15, 19, .82); color: var(--muted); font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.tile .badges { position: absolute; right: 8px; top: 8px; display: flex; gap: 5px; }
.badge { height: 20px; padding: 0 7px; border-radius: 5px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; display: inline-flex; align-items: center; gap: 4px; }
.badge.live { background: var(--live); color: #fff; }
.badge.next { background: var(--accent); color: #fff; }
.badge.hand { background: #3A2F12; color: var(--hand); box-shadow: inset 0 0 0 1px #6B5416; letter-spacing: 0; font-size: 12px; }
.badge.relay { background: rgba(14, 15, 19, .82); color: var(--warn); box-shadow: inset 0 0 0 1px rgba(245, 158, 11, .35); letter-spacing: 0; font-weight: 600; }
.tile .hover {
  position: absolute; inset: auto 0 0 0; padding: 22px 8px 8px; display: flex; gap: 6px; justify-content: center;
  background: linear-gradient(transparent, rgba(0, 0, 0, .85)); opacity: 0; transition: opacity .12s;
}
.tile:hover .hover { opacity: 1; }
.tile .hover .btn { height: 26px; padding: 0 10px; font-size: 12px; background: rgba(29, 32, 40, .92); }
.tile .hover .btn.danger:hover { background: var(--live); color: #fff; border-color: var(--live); }
.tile .meta { display: flex; align-items: baseline; gap: 8px; padding: 8px 2px 0; min-width: 0; }
.tile .meta .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .meta .dv { color: var(--faint); font-size: 12px; white-space: nowrap; margin-left: auto; }
.tile.hand .meta .nm::after { content: " ✋"; }

.tile.invite { cursor: default; }
.tile.invite .thumb {
  background: transparent; box-shadow: none; border: 1.5px dashed var(--border-strong);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 14px; text-align: center;
}
.tile.invite .t { font-weight: 600; }
.tile.invite .d { color: var(--faint); font-size: 12px; }

.tile.me .thumb.denied { display: flex; align-items: center; justify-content: center; }
.tile .perm { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 12px; text-align: center; color: var(--muted); font-size: 12px; background: #0B0C10; }

/* ---------- Status bar */
.statusbar {
  flex: none; height: 32px; display: flex; align-items: center; gap: 20px; padding: 0 16px;
  border-top: 1px solid var(--border); background: var(--panel); color: var(--faint); font-size: 12px;
}
.statusbar .private { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.statusbar .private svg { width: 12px; height: 12px; color: var(--ok); }
.statusbar .keys { margin-left: auto; display: flex; gap: 18px; }
.statusbar .keys [hidden] { display: none; }
.statusbar kbd { font-size: 10px; line-height: 14px; min-width: 16px; margin: 0 1px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2A2F3A; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* "Hide join code" in the live header, only while the card is up. */
.view-h .jc-hide { margin-left: 12px; padding: 4px 12px; font-size: 13px; border-color: var(--accent, #5B8CFF); color: var(--accent, #5B8CFF); }

/* ---------- Check the room */
.btn.ghost { background: transparent; border-color: var(--border); color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: var(--raised); }
.check-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; }
.check-btn svg { width: 14px; height: 14px; color: var(--ok); }

.sheet {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(6, 7, 10, .62); backdrop-filter: blur(3px); animation: fade .15s ease;
}
.sheet[hidden] { display: none; }
@keyframes fade { from { opacity: 0; } }
.sheet-box {
  width: 600px; max-width: 100%; max-height: 100%; overflow: auto; background: var(--panel); border: 1px solid var(--border-strong);
  border-radius: 16px; box-shadow: 0 24px 80px rgba(0, 0, 0, .55); padding: 20px 20px 16px; user-select: text;
}
.sheet-h { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sheet-h > div { flex: 1; }
.sheet-h h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.sheet-h p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.sheet .x { width: 28px; height: 28px; border-radius: 8px; border: 0; background: var(--raised); font-size: 17px; line-height: 1; color: var(--muted); }
.sheet .x:hover { color: var(--text); background: var(--hover); }
.sheet-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

.verdict { padding: 12px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 600; margin-bottom: 12px; border: 1px solid var(--border); background: var(--bg); }
.verdict.ok { background: rgba(34, 197, 94, .1); border-color: rgba(34, 197, 94, .35); color: #86EFAC; }
.verdict.warn, .verdict.todo { background: rgba(245, 158, 11, .08); border-color: rgba(245, 158, 11, .3); color: #FCD34D; }
.verdict.bad { background: var(--live-soft); border-color: rgba(244, 63, 94, .4); color: #FDA4AF; }
.verdict.wait { color: var(--muted); }

.checks { display: flex; flex-direction: column; gap: 6px; }
.ck { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); }
.ck-ico {
  width: 22px; height: 22px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 13px; background: var(--raised); color: var(--muted);
}
.ck.ok .ck-ico { background: var(--ok); color: #05210f; }
.ck.warn .ck-ico { background: var(--warn); color: #1a1205; }
.ck.bad .ck-ico { background: var(--live); color: #fff; }
.ck.todo .ck-ico { background: var(--accent); color: #fff; }
.ck.wait .ck-ico { border: 2px solid var(--border-strong); border-top-color: var(--accent); background: none; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ck-body { flex: 1; min-width: 0; }
.ck-t { font-weight: 600; font-size: 13px; }
.ck-d { color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.ck-url { color: var(--accent); font-size: 12.5px; font-weight: 600; margin-top: 4px; }
.ck .btn { flex: none; height: 28px; }
.ck-qr { flex: none; width: 104px; height: 104px; padding: 6px; background: #fff; border-radius: 10px; }
.ck-qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.ck.phone.ok .ck-qr, .ck.phone.warn .ck-qr { width: 64px; height: 64px; padding: 4px; opacity: .7; }

/* ---------- Watchers */
.count.blue { background: var(--accent); color: #fff; }
.toggle.row.first { padding-top: 0; }
.watch-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.watch-info { flex: 1; color: var(--muted); font-size: 12px; }
.btn.small { height: 26px; padding: 0 9px; font-size: 12px; }
.btn:disabled { opacity: .45; cursor: default; }

/* ---------- Help queue */
.count.hand { background: var(--hand); color: #1a1205; }
.helplist { display: flex; flex-direction: column; gap: 8px; max-height: 300px; overflow: auto; margin: 0 -6px; padding: 0 6px; }
.helplist .none { color: var(--faint); font-size: 12px; text-align: center; padding: 4px 0 2px; }
.help { padding: 10px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); animation: arrive .25s ease; }
.help.first { border-color: #6B5416; background: rgba(252, 211, 77, .06); }
.help-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.help-n { width: 20px; height: 20px; flex: none; border-radius: 50%; background: #3A2F12; color: var(--hand); font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.help .nm { font-weight: 600; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.help-t { color: var(--faint); font-size: 12px; white-space: nowrap; }
.help-q { margin: 6px 0 0 28px; color: var(--text); font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; user-select: text; }
.help-q.none-q { color: var(--faint); }
.help .acts { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin-top: 8px; }
.help .btn { height: 28px; padding: 0 10px; }

/* ---------- Pen */
.penbar { display: flex; align-items: center; gap: 8px; margin-left: 4px; }
.pen-btn { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; font-size: 12px; }
.pen-btn svg { width: 14px; height: 14px; }
.penbar.on .pen-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.pen-tools { display: none; align-items: center; gap: 5px; }
.penbar.on .pen-tools { display: flex; }
.swatch { width: 18px; height: 18px; padding: 0; border-radius: 50%; border: 0; background: var(--c); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35); }
.swatch.on { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--c); }
.pen-clear { margin-left: 3px; }
.comp.inking, .comp.inking .cell { cursor: crosshair !important; }
.comp.inking .slotui { display: none; }
.view.is-live:has(.comp.inking) .frame { box-shadow: 0 0 0 2px var(--accent), 0 8px 30px rgba(91, 140, 255, .12); }
