/* Copied from the Beacon design system's bundle.css by design/build.mjs — edit the design system, not this file. */

/* Beacon — component styles. Every value comes from tokens.css. */
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 24px; -webkit-font-smoothing: antialiased; }
.bc-shell, .bc-card, .bc-sheet, .bc-list, .bc-signin, .bc-notice, .bc-empty, .bc-seg, .bc-field, .bc-toggle, .bc-badge, .bc-btn, .bc-cam { font-family: var(--font-sans); }
.bc-shell, .bc-card, .bc-sheet, .bc-list, .bc-signin, .bc-empty, .bc-field, .bc-toggle { color: var(--ink); }
.bc-more .bc-icon { stroke-width: 3.5; }
.bc-pad { padding: var(--space-5); }
.bc-row { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.bc-stack { display: flex; flex-direction: column; gap: var(--space-4); }
.bc-muted { color: var(--ink-muted); }
.bc-icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.bc-icon.lg { width: 24px; height: 24px; }
:where(button, a, input, select, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Button */
.bc-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); min-height: var(--target); padding: 0 var(--space-4); border-radius: var(--radius-md); border: 1px solid transparent; font: 600 16px/24px var(--font-sans); cursor: pointer; text-decoration: none; transition: background-color .15s ease, transform .1s ease; white-space: nowrap; }
.bc-btn:active { transform: scale(.98); }
.bc-btn[disabled] { cursor: not-allowed; opacity: .45; transform: none; }
.bc-btn-sm { min-height: 36px; padding: 0 var(--space-3); font-size: 14px; border-radius: var(--radius-sm); }
.bc-btn-lg { min-height: var(--target-lg); padding: 0 var(--space-5); font-size: 17px; }
.bc-btn-block { width: 100%; }
.bc-btn-primary { background: var(--action); color: var(--on-action); }
.bc-btn-primary:hover:not([disabled]) { background: var(--action-hover); }
.bc-btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.bc-btn-secondary:hover:not([disabled]) { background: var(--surface-sunken); }
.bc-btn-quiet { background: transparent; color: var(--ink); }
.bc-btn-quiet:hover:not([disabled]) { background: var(--surface-sunken); }
.bc-btn-signal { background: var(--signal); color: var(--on-signal); }
.bc-btn-signal:hover:not([disabled]) { filter: brightness(1.06); }
.bc-btn-danger { background: var(--danger); color: var(--on-danger); }
.bc-btn-danger:hover:not([disabled]) { filter: brightness(1.08); }

/* Status badge */
.bc-badge { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: var(--radius-pill); font: 600 14px/20px var(--font-sans); background: var(--surface-sunken); color: var(--ink-muted); white-space: nowrap; }
.bc-badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.bc-badge-online { color: var(--success); background: var(--success-soft); }
.bc-badge-offline { color: var(--ink-faint); }
.bc-badge-offline::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.bc-badge-showing, .bc-badge-calling { color: var(--signal-text); background: var(--signal-soft); }
.bc-badge-showing::before, .bc-badge-calling::before { background: var(--signal); animation: bc-pulse 2s ease-in-out infinite; }
.bc-badge-problem { color: var(--danger); background: var(--danger-soft); }
.bc-badge-waiting::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; border-top-color: transparent; }
@keyframes bc-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .bc-badge::before { animation: none !important; } .bc-btn { transition: none; } }

/* Card */
.bc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }

/* Wordmark */
.bc-wordmark { display: inline-flex; align-items: center; gap: 10px; font: 700 20px/24px var(--font-sans); letter-spacing: -0.01em; color: var(--ink); }
.bc-wordmark i { width: 12px; height: 12px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 4px var(--signal-soft); }

/* App shell */
.bc-shell { display: grid; grid-template-columns: var(--nav-width) minmax(0, 1fr); min-height: 520px; background: var(--bg); }
.bc-nav { display: flex; flex-direction: column; gap: var(--space-1); padding: var(--space-5) var(--space-3); background: var(--surface-sunken); border-right: 1px solid var(--line); }
.bc-nav .bc-wordmark { padding: 0 var(--space-3) var(--space-5); }
.bc-nav-cast { margin: 0 0 var(--space-4); }
.bc-nav-item { display: flex; align-items: center; gap: var(--space-3); min-height: var(--target); padding: 0 var(--space-3); border-radius: var(--radius-md); color: var(--ink-muted); font: 500 16px/24px var(--font-sans); text-decoration: none; border: 0; background: none; cursor: pointer; text-align: left; }
.bc-nav-item:hover { background: var(--surface); color: var(--ink); }
.bc-nav-item[aria-current="page"] { background: var(--surface); color: var(--ink); font-weight: 650; box-shadow: var(--shadow-card); }
.bc-nav-item .bc-count { margin-left: auto; font-size: 14px; color: var(--signal-text); font-weight: 600; }
.bc-nav-spacer { flex: 1; }
.bc-nav-user { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-top: 1px solid var(--line); margin-top: var(--space-3); font-size: 14px; color: var(--ink-muted); }
.bc-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 650; font-size: 14px; }
.bc-main { padding: var(--space-6); max-width: var(--content-max); min-width: 0; }
.bc-pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); flex-wrap: wrap; }
.bc-pagehead h1 { margin: 0; font: 700 26px/32px var(--font-sans); letter-spacing: -0.01em; }
.bc-pagehead p { margin: 4px 0 0; color: var(--ink-muted); }
.bc-tabbar { display: none; }
/* Phone top bar: the wordmark and the avatar, which is how Settings is reached when the side nav is hidden. */
.bc-topbar { display: none; }
@media (max-width: 760px) {
  .bc-topbar { display: flex; align-items: center; justify-content: space-between; padding: calc(var(--space-3) + env(safe-area-inset-top)) var(--space-4) var(--space-2); }
  .bc-topbar-user { display: inline-flex; min-width: var(--target); min-height: var(--target); align-items: center; justify-content: center; border-radius: 50%; text-decoration: none; }
  .bc-topbar-user[aria-current="page"] .bc-avatar { box-shadow: 0 0 0 2px var(--ink); }
}
@media (max-width: 760px) {
  .bc-shell { grid-template-columns: minmax(0, 1fr); padding-bottom: 72px; }
  .bc-nav { display: none; }
  .bc-main { padding: var(--space-4); }
  .bc-tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 5; }
  .bc-tabbar button, .bc-tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; justify-content: center; border: 0; background: none; color: var(--ink-faint); font: 600 12px/16px var(--font-sans); cursor: pointer; border-radius: var(--radius-md); }
  .bc-tabbar button[aria-current="page"], .bc-tabbar a[aria-current="page"] { color: var(--ink); }
  .bc-tabbar .bc-tab-cast { color: var(--on-signal); }
  .bc-tabbar .bc-tab-cast span.bc-fab { width: 44px; height: 44px; border-radius: 50%; background: var(--signal); display: grid; place-items: center; margin-top: -18px; box-shadow: var(--shadow-sheet); }
}

/* Screen card */
.bc-screen { overflow: hidden; display: flex; flex-direction: column; }
.bc-screen.is-showing { box-shadow: var(--shadow-glow); border-color: transparent; }
.bc-screen-stage { position: relative; aspect-ratio: 16 / 9; background: var(--stage); color: var(--on-stage); display: grid; place-items: center; text-align: center; padding: var(--space-4); }
.bc-screen-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bc-screen-stage .bc-stage-caption { position: absolute; left: var(--space-4); bottom: var(--space-3); right: var(--space-4); text-align: left; font: 600 14px/20px var(--font-sans); color: var(--on-stage); text-shadow: 0 1px 3px rgba(0, 0, 0, .7); }
.bc-stage-empty { color: var(--stage-muted); display: flex; flex-direction: column; align-items: center; gap: var(--space-2); font-size: 14px; }
.bc-screen-body { padding: var(--space-4) var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-3); }
.bc-screen-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-3); }
.bc-screen-head h3 { margin: 0; font: 650 19px/26px var(--font-sans); }
.bc-screen-head { flex-wrap: wrap; }
.bc-screen-head > div { flex: 1 1 150px; min-width: 0; }
.bc-screen-head p { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.bc-now { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border-radius: var(--radius-md); background: var(--signal-soft); color: var(--signal-text); }
.bc-now strong { display: block; color: var(--ink); font-weight: 650; }
.bc-now span { font-size: 14px; line-height: 20px; }
.bc-screen-actions { display: flex; gap: var(--space-3); }
.bc-screen-actions .bc-btn { flex: 1; }

/* Camera tile */
.bc-cam { background: var(--stage); color: var(--on-stage); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; }
.bc-cam.is-showing { box-shadow: var(--shadow-glow); }
.bc-cam-view { position: relative; aspect-ratio: 16 / 9; display: grid; place-items: center; color: var(--stage-muted); font-size: 14px; }
.bc-cam-view img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bc-cam-live { position: absolute; top: var(--space-3); left: var(--space-3); display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--radius-pill); background: rgba(14, 15, 17, .72); color: var(--on-stage); font: 600 13px/20px var(--font-sans); }
.bc-cam-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #4cc38a; }
/* A camera that is live but not doing its job for a rule ("No motion") says so on the picture, opposite the live pill (ERR-2). */
.bc-cam-view > .bc-badge { position: absolute; top: var(--space-3); right: var(--space-3); max-width: calc(100% - 2 * var(--space-3) - 72px); overflow: hidden; text-overflow: ellipsis; }
.bc-cam-live.off::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--stage-muted); }
.bc-cam-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.bc-cam-foot strong { display: block; font-weight: 650; }
.bc-cam-foot span { font-size: 14px; color: var(--stage-muted); }
.bc-cam .bc-btn-secondary { background: transparent; color: var(--on-stage); border-color: rgba(242, 242, 240, .45); }
.bc-cam .bc-btn-secondary:hover { background: rgba(242, 242, 240, .1); }

/* Media row */
.bc-list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.bc-mrow { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); min-height: 64px; border-top: 1px solid var(--line); }
.bc-mrow:first-child { border-top: 0; }
.bc-mrow:hover { background: var(--bg); }
.bc-thumb { width: 56px; height: 40px; border-radius: var(--radius-sm); background: var(--stage); color: var(--stage-muted); display: grid; place-items: center; flex: none; overflow: hidden; }
.bc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.bc-mrow-text { flex: 1; min-width: 0; }
/* The picture and the name open the item in the app; the row's one visible action stays Show on TV (LIB-2). */
.bc-mrow-open { display: flex; align-items: center; gap: var(--space-4); flex: 1; min-width: 0; padding: 0; margin: 0; border: 0; border-radius: var(--radius-sm); background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
/* An item opened in the app sits on stage, like everything that is a picture or a screen (LAY-4). */
.bc-media-view { display: grid; place-items: center; min-height: 200px; border-radius: var(--radius-lg); background: var(--stage); color: var(--on-stage); overflow: hidden; }
.bc-media-view img, .bc-media-view video { display: block; width: 100%; max-height: 70vh; max-height: 70dvh; object-fit: contain; background: var(--stage); }
.bc-media-view audio { width: calc(100% - 2 * var(--space-5)); margin: var(--space-5); }
.bc-media-view .bc-media-mark { display: grid; place-items: center; padding-top: var(--space-6); color: var(--stage-muted); }
.bc-mrow-text strong { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bc-mrow-text span { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
/* On a phone the row's actions drop to a second line, right-aligned, so the name keeps its room. */
@media (max-width: 480px) {
  .bc-mrow { flex-wrap: wrap; }
  .bc-mrow-text { flex: 1 1 calc(100% - 56px - var(--space-4)); }
  .bc-mrow-open { flex: 1 1 100%; }
  .bc-mrow > .bc-badge { margin-left: calc(56px + var(--space-4)); }
  .bc-mrow > .bc-btn { margin-left: auto; }
}
.bc-more { width: var(--target); height: var(--target); border-radius: var(--radius-md); border: 0; background: none; color: var(--ink-muted); cursor: pointer; display: grid; place-items: center; font: 700 18px/1 var(--font-sans); letter-spacing: 1px; }
.bc-more:hover { background: var(--surface-sunken); color: var(--ink); }

/* Sheet (Show on TV) */
.bc-sheet-wrap { background: var(--scrim); padding: var(--space-6) var(--space-4); display: grid; place-items: center; min-height: 100%; box-sizing: border-box; }
.bc-sheet { width: 100%; max-width: 560px; background: var(--surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-sheet); overflow: hidden; }
.bc-sheet-head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--line); }
.bc-sheet-head h2 { margin: 0; font: 650 19px/26px var(--font-sans); }
.bc-steps { display: flex; gap: var(--space-2); font-size: 14px; color: var(--ink-faint); padding: var(--space-4) var(--space-5) 0; }
.bc-steps b { color: var(--ink); font-weight: 650; }
.bc-sheet-body { padding: var(--space-4) var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.bc-sheet-foot { padding: var(--space-4) var(--space-5); border-top: 1px solid var(--line); display: flex; gap: var(--space-3); justify-content: flex-end; }
.bc-choices { display: grid; gap: var(--space-2); }
.bc-choice { display: flex; align-items: center; gap: var(--space-3); min-height: 56px; padding: var(--space-2) var(--space-3); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); cursor: pointer; text-align: left; font: 500 16px/24px var(--font-sans); width: 100%; }
.bc-choice:hover { border-color: var(--line-strong); }
.bc-choice[aria-checked="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.bc-choice .bc-choice-text { flex: 1; }
.bc-choice .bc-choice-text span { display: block; font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.bc-radio { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.bc-choice[aria-checked="true"] .bc-radio { border-color: var(--ink); }
.bc-choice[aria-checked="true"] .bc-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--ink); }

/* Segmented */
.bc-seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: var(--radius-md); background: var(--surface-sunken); }
.bc-seg button { min-height: 36px; padding: 0 var(--space-4); border: 0; border-radius: var(--radius-sm); background: none; color: var(--ink-muted); font: 600 14px/20px var(--font-sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.bc-seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-card); }
/* In a sheet the tabs share the width and a long label wraps to two lines instead of pushing the others out. */
.bc-sheet .bc-seg { display: flex; width: 100%; box-sizing: border-box; }
.bc-sheet .bc-seg button { flex: 1 1 auto; min-width: 0; justify-content: center; text-align: center; white-space: normal; line-height: 18px; padding: 6px var(--space-2); }
.bc-sheet .bc-seg button .bc-icon { flex: none; }
/* A long file name in a choice wraps instead of pushing the list sideways. */
.bc-sheet-body { overflow-x: hidden; }
.bc-choice { min-width: 0; }
.bc-choice .bc-choice-text { min-width: 0; overflow-wrap: anywhere; }
.bc-choice .bc-icon, .bc-choice .bc-radio, .bc-choice .bc-badge { flex: none; }

/* Rule sentence */
.bc-rule { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.bc-rule-line { font: 500 19px/40px var(--font-sans); color: var(--ink); }
.bc-rule-line .bc-word { color: var(--ink-muted); }
.bc-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; margin: 0 2px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: 600 16px/24px var(--font-sans); cursor: pointer; vertical-align: middle; }
.bc-chip::after { content: ""; width: 6px; height: 6px; border-right: 1.75px solid currentColor; border-bottom: 1.75px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); opacity: .7; }
.bc-chip:hover { background: var(--surface-sunken); }
.bc-rule-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-top: var(--space-4); border-top: 1px solid var(--line); flex-wrap: wrap; }

/* Notice */
.bc-notice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); border-radius: var(--radius-md); background: var(--surface-sunken); color: var(--ink); }
.bc-notice .bc-icon { margin-top: 2px; }
.bc-notice-body { flex: 1; }
.bc-notice-body strong { display: block; font-weight: 650; }
.bc-notice-body p { margin: 2px 0 0; color: var(--ink-muted); }
.bc-notice-problem { background: var(--danger-soft); }
.bc-notice-problem > .bc-icon { color: var(--danger); }
.bc-notice-success { background: var(--success-soft); }
.bc-notice-success > .bc-icon { color: var(--success); }
.bc-notice-actions { display: flex; gap: var(--space-2); flex: none; align-self: center; }

/* Empty state */
.bc-empty { text-align: center; padding: var(--space-7) var(--space-5); display: flex; flex-direction: column; align-items: center; gap: var(--space-3); }
.bc-empty-icon { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-sunken); display: grid; place-items: center; color: var(--ink-muted); }
.bc-empty h3 { margin: var(--space-2) 0 0; font: 650 19px/26px var(--font-sans); }
.bc-empty p { margin: 0; max-width: 380px; color: var(--ink-muted); }

/* Field */
.bc-field { display: flex; flex-direction: column; gap: 6px; }
.bc-field label { font: 600 14px/20px var(--font-sans); color: var(--ink); }
.bc-field input, .bc-field select { min-height: var(--target); padding: 0 var(--space-3); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--ink); font: 400 16px/24px var(--font-sans); }
.bc-field input::placeholder { color: var(--ink-faint); }
.bc-field .bc-hint { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.bc-field.has-error input, .bc-field.has-error select { border-color: var(--danger); box-shadow: inset 0 0 0 1px var(--danger); }
.bc-field .bc-error { font-size: 14px; line-height: 20px; color: var(--danger); font-weight: 600; }

/* Toggle */
.bc-toggle { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: var(--target); cursor: pointer; }
.bc-toggle-text strong { display: block; font-weight: 600; }
.bc-toggle-text span { font-size: 14px; line-height: 20px; color: var(--ink-muted); }
.bc-switch { position: relative; width: 48px; height: 28px; flex: none; border-radius: var(--radius-pill); background: var(--surface-sunken); border: 1.5px solid var(--line-strong); transition: background-color .15s ease; }
.bc-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 19px; height: 19px; border-radius: 50%; background: var(--line-strong); transition: transform .15s ease; }
.bc-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.bc-toggle input:checked + .bc-switch { background: var(--action); border-color: var(--action); }
.bc-toggle input:checked + .bc-switch::after { transform: translateX(20px); background: var(--on-action); }
.bc-toggle input:focus-visible + .bc-switch { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Sign in */
.bc-signin { min-height: 560px; display: grid; place-items: center; padding: var(--space-6) var(--space-4); background: var(--bg); }
.bc-signin-card { width: 100%; max-width: 400px; padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-4); }
.bc-signin-card h1 { margin: var(--space-4) 0 0; font: 700 32px/38px var(--font-sans); letter-spacing: -0.01em; }
.bc-signin-card > p { margin: 0; color: var(--ink-muted); }
.bc-signin-foot { text-align: center; font-size: 14px; color: var(--ink-muted); }
.bc-link { color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; background: none; border: 0; padding: 0; font-size: inherit; cursor: pointer; font-family: inherit; }

/* Watchers */
.bc-watchers { display: inline-flex; align-items: center; gap: 8px; padding: 3px 10px 3px 4px; border-radius: var(--radius-pill); background: rgba(14, 15, 17, .72); color: var(--on-stage); font: 600 13px/20px var(--font-sans); }
.bc-watchers-faces { display: inline-flex; }
.bc-face { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--on-stage); color: var(--stage); font: 700 11px/1 var(--font-sans); box-shadow: 0 0 0 2px var(--stage); }
.bc-face + .bc-face { margin-left: -6px; }
/* Beacon itself among the watchers: its mark in the face, same size as a person's initial. */
.bc-face .bc-icon, .bc-face svg { width: 14px; height: 14px; }

/* Pages: HomeOverview and TvDetail */
.bc-page { display: flex; flex-direction: column; gap: var(--space-5); font-family: var(--font-sans); color: var(--ink); }
.bc-page .bc-pagehead { margin-bottom: 0; }
.bc-section { display: flex; flex-direction: column; }
.bc-section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-3); }
.bc-section-head h2, .bc-about h2 { margin: 0; font: 650 19px/26px var(--font-sans); }
.bc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--space-5); }
.bc-screen-open { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; text-align: inherit; color: inherit; }
.bc-titlelink { white-space: nowrap; display: inline-flex; align-items: center; gap: 2px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; text-align: left; }
.bc-titlelink .bc-icon { width: 18px; height: 18px; color: var(--ink-faint); }
.bc-titlelink:hover { text-decoration: underline; text-underline-offset: 3px; }
.bc-back { align-self: flex-start; margin: 0 0 calc(var(--space-3) * -1) calc(var(--space-3) * -1); color: var(--ink-muted); }
.bc-tvd .bc-pagehead h1 { margin: 0; }
.bc-tvd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--space-5); align-items: start; }
@media (max-width: 900px) { .bc-tvd-grid { grid-template-columns: 1fr; } }
.bc-nowcard { overflow: hidden; }
.bc-nowcard.is-showing { box-shadow: var(--shadow-glow); border-color: transparent; }
.bc-stage-tag { position: absolute; top: var(--space-3); left: var(--space-3); padding: 2px 10px; border-radius: var(--radius-pill); background: rgba(14, 15, 17, .72); color: var(--on-stage); font: 600 13px/20px var(--font-sans); }
.bc-nowcard-body { padding: var(--space-4) var(--space-5) var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.bc-controls { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }
.bc-volume { flex: 1; min-width: 200px; display: flex; align-items: center; gap: var(--space-3); color: var(--ink-muted); }
.bc-volume input { flex: 1; appearance: none; -webkit-appearance: none; height: 6px; border-radius: var(--radius-pill); background: linear-gradient(to right, var(--ink) var(--v), var(--surface-sunken) var(--v)); outline-offset: 6px; }
.bc-volume input::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); cursor: pointer; }
.bc-volume input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid var(--ink); cursor: pointer; }
.bc-volume-val { width: 28px; text-align: right; font: 600 14px/20px var(--font-sans); font-variant-numeric: tabular-nums; color: var(--ink); }
.bc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.bc-picks { display: flex; gap: var(--space-3); overflow-x: auto; padding-bottom: 4px; }
.bc-pick { display: flex; align-items: center; gap: var(--space-3); flex: none; padding: 8px 16px 8px 8px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: 600 15px/20px var(--font-sans); cursor: pointer; }
.bc-pick:hover { border-color: var(--line-strong); }
.bc-dev-ic { width: 40px; height: 40px; flex: none; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--surface-sunken); color: var(--ink-muted); }
.bc-about { padding: var(--space-5); display: flex; flex-direction: column; gap: var(--space-4); }
.bc-info { display: flex; flex-direction: column; gap: 4px; padding-bottom: var(--space-3); border-bottom: 1px solid var(--line); }
.bc-info-label { font: 600 14px/20px var(--font-sans); color: var(--ink-muted); }
.bc-info-value { font-size: 15px; line-height: 22px; }
.bc-perms { display: flex; flex-direction: column; gap: var(--space-2); }
.bc-perm { display: flex; align-items: center; gap: var(--space-2); font-size: 15px; line-height: 22px; }
.bc-perm .bc-icon { color: var(--success); width: 18px; height: 18px; }
.bc-perm.is-missing .bc-icon, .bc-perm.is-missing .bc-perm-state { color: var(--danger); }
.bc-perm-state { margin-left: auto; font-size: 14px; color: var(--ink-muted); }
.bc-about-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); padding-top: var(--space-2); }
.bc-danger-link { align-self: flex-start; color: var(--danger); }
.bc-details summary { cursor: pointer; font: 600 14px/20px var(--font-sans); color: var(--ink-muted); }
.bc-details p { margin: var(--space-2) 0 0; font-size: 14px; color: var(--ink-muted); }

/* CallScreen */
.bc-call { position: relative; display: flex; flex-direction: column; min-height: 640px; background: var(--stage); color: var(--on-stage); font-family: var(--font-sans); border-radius: var(--radius-lg); overflow: hidden; }
.bc-call-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4) var(--space-5); }
.bc-call-top strong { display: block; font: 650 19px/26px var(--font-sans); }
.bc-call-top span { font-size: 14px; color: var(--stage-muted); }
.bc-call .bc-badge-calling { background: var(--signal); color: var(--on-signal); }
.bc-call .bc-badge-calling::before { background: var(--on-signal); }
.bc-call .bc-badge-waiting { background: rgba(242, 242, 240, .12); color: var(--on-stage); }
.bc-call-view { position: relative; flex: 1; margin: 0 var(--space-3); border-radius: var(--radius-lg); background: var(--stage-raised); display: grid; place-items: center; color: var(--stage-muted); font-size: 14px; overflow: hidden; }
.bc-call-view > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bc-call-self { position: absolute; right: var(--space-3); top: var(--space-3); width: 96px; aspect-ratio: 3 / 4; border-radius: var(--radius-md); background: var(--stage-overlay); display: grid; place-items: center; color: var(--on-stage); font-size: 13px; font-weight: 600; box-shadow: 0 0 0 2px var(--signal); overflow: hidden; }
.bc-call-self img { width: 100%; height: 100%; object-fit: cover; }
.bc-call-self.is-off { box-shadow: 0 0 0 1.5px var(--stage-muted); color: var(--stage-muted); }
.bc-call-controls { display: flex; justify-content: center; gap: var(--space-4); padding: var(--space-5) var(--space-4) var(--space-6); }
.bc-round { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: none; color: var(--on-stage); font: 600 13px/18px var(--font-sans); cursor: pointer; min-width: 64px; }
.bc-round-ic { width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; background: rgba(242, 242, 240, .14); }
.bc-round[aria-pressed="true"] .bc-round-ic { background: var(--on-stage); color: var(--stage); }
.bc-round.is-end .bc-round-ic { background: var(--end-call); color: #ffffff; }

/* TV app — 10-foot UI. Sizes are 1080p pixels scaled to the frame (N px = calc(Ncqw / 19.2)). Always dark, calm, D-pad driven. */
.bc-tv { position: relative; aspect-ratio: 16 / 9; container-type: inline-size; background: var(--stage); color: var(--on-stage); border-radius: var(--radius-md); overflow: hidden; font-family: var(--font-sans); box-shadow: 0 0 0 6px var(--stage); }
.bc-tv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bc-tv h1 { margin: 0; font: 650 calc(48cqw / 19.2)/1.15 var(--font-sans); letter-spacing: -0.01em; }
.bc-tv p { margin: 0; font: 400 calc(28cqw / 19.2)/1.45 var(--font-sans); color: var(--stage-muted); }

/* the beacon: a dot with two slow rings — the TV's "I'm here" mark */
.bc-tv-beacon { position: relative; width: calc(96cqw / 19.2); height: calc(96cqw / 19.2); flex: none; display: grid; place-items: center; }
.bc-tv-beacon i { width: calc(28cqw / 19.2); height: calc(28cqw / 19.2); border-radius: 50%; background: var(--signal); }
.bc-tv-beacon b { position: absolute; inset: 0; border-radius: 50%; border: calc(3cqw / 19.2) solid var(--signal); opacity: 0; animation: bc-ring 4s ease-out infinite; }
.bc-tv-beacon b + b { animation-delay: 2s; }
.bc-tv-beacon.is-small { width: calc(40cqw / 19.2); height: calc(40cqw / 19.2); }
.bc-tv-beacon.is-small i { width: calc(12cqw / 19.2); height: calc(12cqw / 19.2); opacity: .5; }
@keyframes bc-ring { 0% { transform: scale(.3); opacity: .55; } 100% { transform: scale(1); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bc-tv-beacon b { animation: none; opacity: .25; transform: scale(.7); } }

/* Ready */
.bc-tv-ready { position: absolute; inset: 0; padding: var(--tv-safe); background: var(--stage); }
.bc-tv-ready { background: radial-gradient(circle at 10% 100%, rgba(226, 90, 11, 0.12), rgba(226, 90, 11, 0) 55%), var(--stage); }
.bc-tv-ready-main { position: absolute; left: var(--tv-safe); bottom: calc(var(--tv-safe) * 1.6); display: flex; align-items: center; gap: calc(28cqw / 19.2); }
.bc-tv-ready-main strong { display: block; font: 650 calc(56cqw / 19.2)/1.1 var(--font-sans); letter-spacing: -0.01em; color: var(--on-stage); }
.bc-tv-ready-main div > span { display: block; margin-top: calc(8cqw / 19.2); font: 400 calc(26cqw / 19.2)/1.4 var(--font-sans); color: var(--stage-muted); }
.bc-tv-clock { position: absolute; top: var(--tv-safe); right: var(--tv-safe); font: 300 calc(64cqw / 19.2)/1 var(--font-sans); color: var(--tv-dim); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bc-tv-mark { position: absolute; right: var(--tv-safe); bottom: var(--tv-safe); display: inline-flex; align-items: center; gap: calc(10cqw / 19.2); font: 600 calc(22cqw / 19.2)/1 var(--font-sans); color: var(--tv-dimmer); }
.bc-tv-mark i, .bc-tv-who i { width: .55em; height: .55em; border-radius: 50%; background: var(--signal); }
.bc-tv-mark.is-bright { position: static; color: var(--stage-muted); }
.bc-tv-night { position: absolute; inset: 0; display: grid; place-items: end; padding: var(--tv-safe); background: var(--tv-night); }

/* Content */
.bc-tv-call, .bc-tv-media { position: absolute; inset: 0; display: grid; place-items: center; }
.bc-tv-ph { width: 30%; aspect-ratio: 1; border-radius: 50%; background: var(--stage-raised); display: grid; place-items: center; color: var(--stage-muted); }
.bc-tv-ph .bc-icon { width: 40%; height: 40%; stroke-width: 1.25; }
.bc-tv-media .bc-tv-ph { border-radius: var(--radius-lg); width: 55%; aspect-ratio: 16 / 10; }
.bc-tv-who { position: absolute; left: var(--tv-safe); bottom: calc(var(--tv-safe) * 1.4); display: inline-flex; align-items: center; gap: calc(12cqw / 19.2); padding: calc(10cqw / 19.2) calc(22cqw / 19.2); border-radius: var(--radius-pill); background: rgba(14, 15, 17, .6); color: var(--on-stage); font: 600 calc(26cqw / 19.2)/1.2 var(--font-sans); }

/* Buttons on TV: focus is the only state that matters */
.bc-tvbtn { display: inline-flex; align-items: center; justify-content: center; min-height: calc(72cqw / 19.2); padding: 0 calc(40cqw / 19.2); border-radius: var(--radius-pill); background: var(--stage-overlay); color: var(--on-stage); font: 600 calc(28cqw / 19.2)/1 var(--font-sans); transition: transform .15s ease, background-color .15s ease; }
.bc-tvbtn.is-focused { background: var(--on-stage); color: var(--stage); transform: scale(1.06); box-shadow: 0 0 0 calc(4cqw / 19.2) var(--stage), 0 0 0 calc(8cqw / 19.2) var(--on-stage); }
.bc-tvbtn.is-primary:not(.is-focused) { box-shadow: inset 0 0 0 calc(3cqw / 19.2) var(--stage-muted); }

/* Pairing */
.bc-tv.is-pairing { background: var(--stage); }
.bc-tvp { position: absolute; inset: 0; padding: var(--tv-safe) calc(var(--tv-safe) * 1.4); display: grid; grid-template-columns: 1fr auto; gap: calc(96cqw / 19.2); align-items: center; }
.bc-tvp-text { display: flex; flex-direction: column; gap: calc(36cqw / 19.2); }
.bc-tvp-text h1 { font-size: calc(64cqw / 19.2); }
.bc-tvp ol, .bc-tvm-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: calc(22cqw / 19.2); }
.bc-tvp li { display: flex; align-items: center; gap: calc(22cqw / 19.2); font: 400 calc(30cqw / 19.2)/1.35 var(--font-sans); color: var(--on-stage); }
.bc-tvp li b, .bc-tvm-steps b { width: calc(52cqw / 19.2); height: calc(52cqw / 19.2); flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--stage-overlay); font: 650 calc(24cqw / 19.2)/1 var(--font-sans); color: var(--on-stage); }
.bc-tvp li em { font-style: normal; font-weight: 650; }
.bc-tvp-alt { font-size: calc(24cqw / 19.2) !important; }
.bc-tvp-alt strong { color: var(--on-stage); font-weight: 600; }
.bc-tvp-code { display: flex; flex-direction: column; align-items: center; gap: calc(24cqw / 19.2); }
.bc-qr { width: calc(400cqw / 19.2); height: calc(400cqw / 19.2); border-radius: var(--radius-lg); display: block; }
.bc-tvp-digits { font: 650 calc(64cqw / 19.2)/1 var(--font-sans); letter-spacing: .08em; font-variant-numeric: tabular-nums; color: var(--on-stage); }
.bc-tvp-timer { font: 500 calc(22cqw / 19.2)/1.3 var(--font-sans); color: var(--stage-muted); }
.bc-tvp-center, .bc-tvm { position: absolute; inset: 0; padding: var(--tv-safe) 18%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: calc(28cqw / 19.2); }
.bc-tvp-ok { width: calc(104cqw / 19.2); height: calc(104cqw / 19.2); border-radius: 50%; display: grid; place-items: center; background: var(--success); color: var(--stage); }
.bc-tvp-ok .bc-icon { width: 50%; height: 50%; stroke-width: 2.25; }

/* Messages */
.bc-tvm-ic { width: calc(104cqw / 19.2); height: calc(104cqw / 19.2); border-radius: 50%; display: grid; place-items: center; background: var(--stage-overlay); color: var(--on-stage); }
.bc-tvm-ic.is-problem { background: var(--signal); color: var(--on-signal); }
.bc-tvm-ic .bc-icon { width: 46%; height: 46%; }
.bc-tvm-steps { text-align: left; }
.bc-tvm-steps li { display: flex; align-items: center; gap: calc(20cqw / 19.2); font: 400 calc(28cqw / 19.2)/1.35 var(--font-sans); color: var(--on-stage); }
.bc-tvm-actions { display: flex; gap: calc(24cqw / 19.2); margin-top: calc(12cqw / 19.2); }
.bc-tvm-bar { width: 60%; height: calc(10cqw / 19.2); border-radius: var(--radius-pill); background: var(--stage-overlay); overflow: hidden; }
.bc-tvm-bar i { display: block; height: 100%; border-radius: inherit; background: var(--on-stage); }

/* Corner notice */
.bc-tvn { position: absolute; top: var(--tv-safe); right: var(--tv-safe); max-width: 36%; display: flex; align-items: center; gap: calc(18cqw / 19.2); padding: calc(18cqw / 19.2) calc(28cqw / 19.2) calc(18cqw / 19.2) calc(18cqw / 19.2); border-radius: var(--radius-lg); background: rgba(26, 28, 32, .92); color: var(--on-stage); font-family: var(--font-sans); box-shadow: 0 calc(8cqw / 19.2) calc(32cqw / 19.2) rgba(0, 0, 0, .5); }
.bc-tvn-ic { width: calc(56cqw / 19.2); height: calc(56cqw / 19.2); flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--stage-overlay); }
.bc-tvn-ic .bc-icon { width: 50%; height: 50%; }
.bc-tvn.is-problem .bc-tvn-ic, .bc-tvn.is-live .bc-tvn-ic { background: var(--signal); color: var(--on-signal); }
.bc-tvn strong { display: block; font: 600 calc(26cqw / 19.2)/1.3 var(--font-sans); }
.bc-tvn div > span { display: block; font: 400 calc(22cqw / 19.2)/1.35 var(--font-sans); color: var(--stage-muted); }

/* Call minimize + CallBar */
.bc-call-min { width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(242, 242, 240, .14); color: var(--on-stage); cursor: pointer; }
.bc-call-min .is-down { transform: rotate(90deg); }
.bc-callbar { position: fixed; left: var(--space-3); right: var(--space-3); bottom: calc(72px + var(--space-3)); z-index: 20; display: flex; align-items: center; gap: var(--space-2); padding: 8px; border-radius: var(--radius-lg); background: var(--stage); color: var(--on-stage); box-shadow: var(--shadow-sheet), 0 0 0 2px var(--signal); font-family: var(--font-sans); }
@media (min-width: 760px) { .bc-callbar { left: auto; right: var(--space-5); bottom: var(--space-5); width: 380px; } }
.bc-callbar.is-inline { position: relative; left: auto; right: auto; bottom: auto; max-width: 380px; }
.bc-callbar-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-3); padding: 0; border: 0; background: none; color: inherit; cursor: pointer; text-align: left; }
.bc-callbar-thumb { position: relative; width: 64px; height: 44px; flex: none; border-radius: var(--radius-sm); background: var(--stage-raised); display: grid; place-items: center; color: var(--stage-muted); overflow: hidden; }
.bc-callbar-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bc-callbar-thumb i { position: absolute; top: 5px; left: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--signal); }
.bc-callbar-text { min-width: 0; }
.bc-callbar-text strong { display: block; font: 650 15px/20px var(--font-sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bc-callbar-text span { display: block; font-size: 13px; line-height: 18px; color: var(--stage-muted); }
.bc-callbar-btn { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(242, 242, 240, .14); color: var(--on-stage); cursor: pointer; }
.bc-callbar-btn.is-on { background: var(--on-stage); color: var(--stage); }
.bc-callbar-btn.is-end { background: var(--end-call); color: #ffffff; }

/* Dialog: a sheet over the page. A bottom sheet on a phone, a centred dialog of at most 560px on a desktop, over scrim (SHOW-6). is-inline is for previews. */
.bc-sheet-wrap--app { position: fixed; inset: 0; z-index: 30; height: 100vh; height: 100dvh; min-height: 0; overflow-y: auto; align-items: center; animation: bc-fade .15s ease; }
.bc-sheet-wrap--app .bc-sheet { max-height: calc(100vh - 2 * var(--space-6)); max-height: calc(100dvh - 2 * var(--space-6)); display: flex; flex-direction: column; animation: bc-rise .2s ease; }
.bc-sheet-wrap--app.is-wide .bc-sheet { max-width: 760px; }
.bc-sheet-wrap--app .bc-sheet-body { overflow-y: auto; flex: 1; }
.bc-sheet-wrap--app.is-menu .bc-sheet { max-width: 360px; }
.bc-sheet-wrap--app.is-inline { position: relative; inset: auto; min-height: 0; z-index: auto; border-radius: var(--radius-lg); }
@media (max-width: 760px) {
  .bc-sheet-wrap--app:not(.is-inline) { padding: 0; align-items: end; place-items: end stretch; }
  .bc-sheet-wrap--app:not(.is-inline) .bc-sheet { max-width: none; max-height: 90vh; max-height: 90dvh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; padding-bottom: env(safe-area-inset-bottom); }
  .bc-sheet-wrap--app:not(.is-inline) .bc-sheet-foot { flex: none; }
}
@keyframes bc-fade { from { opacity: 0; } }
@keyframes bc-rise { from { transform: translateY(16px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bc-sheet-wrap--app, .bc-sheet-wrap--app .bc-sheet { animation: none; } }

/* ••• menu inside a Dialog kind="menu" */
.menu { display: flex; flex-direction: column; padding: var(--space-2); }
.menu__item { display: flex; align-items: center; gap: var(--space-3); min-height: var(--target); padding: 0 var(--space-3); border: 0; border-radius: var(--radius-md); background: none; color: var(--ink); font: 500 16px/24px var(--font-sans); cursor: pointer; text-align: left; width: 100%; }
.menu__item:hover { background: var(--surface-sunken); }
.menu__item.is-danger { color: var(--danger); }

/* Toast: confirmations only, above the tab bar */
.toasts { position: fixed; left: var(--space-4); right: var(--space-4); bottom: calc(72px + var(--space-4) + env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); pointer-events: none; }
@media (min-width: 761px) { .toasts { bottom: var(--space-5); } }
.toasts.is-inline { position: relative; inset: auto; bottom: auto; }
.toast { display: inline-flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-radius: var(--radius-pill); background: var(--action); color: var(--on-action); font: 600 15px/20px var(--font-sans); box-shadow: var(--shadow-sheet); animation: bc-rise .2s ease; }

/* Skeleton: the known shape of what is loading, for at most a second (LOAD-1) */
.skel { display: block; height: 14px; border-radius: var(--radius-pill); background: var(--surface-sunken); animation: bc-skel 1.2s ease-in-out infinite; }
.skeleton { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-2) 0; }
@keyframes bc-skel { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }
