/* SoudCoh brand (see the brand kit, Desktop/Claude/soudcoh-brand): black, white and one blue; Inter for
   everything, Inter Display ExtraBold for headlines, which end with the blue full stop. Fonts are the
   brand kit's own files, served from /brand. */
@font-face { font-family: "SC Inter"; src: url("/brand/assets/fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "SC Inter"; src: url("/brand/assets/fonts/inter-arrows.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+2190, U+2192; }
:root {
  /* Light, "ice blue" (the default): the brand kit's Ice page, white cards, navy text, one SoudCoh Blue. */
  --bg: #E8F1FF;        /* Ice */
  --panel: #FFFFFF;     /* Paper */
  --panel-2: #F3F7FE;
  --panel-3: #E4EDFB;
  --line: #D3E0F3;
  --ink: #00163D;       /* Deep */
  --muted: #45597A;
  --faint: #6B7A93;
  --cloud: #C9D0DA;
  --accent: #006DFF;    /* SoudCoh Blue: one per layout */
  --accent-2: #0058d6;
  --accent-soft: rgba(0, 109, 255, .10);
  --accent-line: rgba(0, 109, 255, .35);
  --accent-text: #0058d6; /* the blue, deep enough to read as small text on white */
  --on-ink: #FFFFFF;    /* text on an ink-coloured button */
  --screen: #0E1014;    /* a TV's own screen stays dark, like the real thing */
  --screen-line: #2a3242;
  --float: rgba(255, 255, 255, .94);
  --scrim: rgba(0, 22, 61, .32);
  --shadow: 0 1px 2px rgba(0, 22, 61, .05), 0 6px 18px rgba(0, 22, 61, .06);
  --shadow-up: 0 -12px 40px rgba(0, 22, 61, .14);
  --danger-soft: #FDECEC;
  --dots: rgba(0, 109, 255, .10);
  --display: "SC Inter", "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ok: #138a4b;
  --warn: #a86400;
  --danger: #d23a3a;
  --radius: 16px;
  --radius-sm: 12px;
  --tabbar: 68px;
  color-scheme: light;
}
/* Dark, when the phone or Mac is set to dark mode: the brand's black, graphite and one blue. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --panel: #0E1014;     /* Graphite */
    --panel-2: #15181e;
    --panel-3: #1d2128;
    --line: #22262e;
    --ink: #FFFFFF;
    --muted: #9AA2AE;     /* Fog */
    --faint: #6E7683;     /* Steel */
    --accent-soft: rgba(0, 109, 255, .16);
    --accent-line: rgba(91, 140, 255, .45);
    --accent-text: #5c9dff;
    --on-ink: #000000;
    --screen: #05070b;
    --screen-line: #22262e;
    --float: rgba(14, 16, 20, .92);
    --scrim: rgba(0, 0, 0, .55);
    --shadow: none;
    --shadow-up: 0 -20px 60px rgba(0, 0, 0, .5);
    --danger-soft: #2a1416;
    --dots: rgba(201, 208, 218, .08);
    --ok: #3ecf8e;
    --warn: #f5a524;
    --danger: #ff5b5b;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
  font: 16px/1.5 "SC Inter", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
svg.i { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; }
.side { display: none; }
.main { padding: calc(env(safe-area-inset-top) + 8px) 16px calc(var(--tabbar) + env(safe-area-inset-bottom) + 96px); max-width: 1280px; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 12px; min-height: 52px; margin-bottom: 8px; }
.topbar h1 { font: 800 30px/1 var(--display); font-variation-settings: "opsz" 32; letter-spacing: -.045em; margin: 0; flex: 1; }
/* The tight tracking of the 800 headlines eats into the word gaps ("Hi there." read as one word): give them back. */
.topbar h1, .login-card h1, .station h1, .guide-article h2, .tour h2, .stage-head h2, .sheet-head h2 { word-spacing: .05em; }
.stop { color: var(--accent); }
.live-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.help-btn { color: var(--muted); }
.help-btn svg.i { width: 22px; height: 22px; }
@media (max-width: 520px) { .live-pill .conn-label { display: none; } .live-pill { padding: 6px; border: 0; } }
.conn { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); flex: none; }
.conn.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(19, 138, 75, .15); }

.tabbar {
  position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
  padding: 6px 8px calc(env(safe-area-inset-bottom) + 6px); background: var(--float);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px); border-top: 1px solid var(--line);
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border: 0; background: none; color: var(--faint); font-size: 12px; font-weight: 600; cursor: pointer; }
.tab svg.i { width: 26px; height: 26px; }
.tab.on { color: var(--accent); }
.tabbar .tab.on svg.i { background: var(--accent-soft); border-radius: 99px; padding: 2px 14px; width: 54px; box-sizing: content-box; height: 24px; }
.side .side-help { margin-top: auto; }

@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: 232px 1fr; }
  .side { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; padding: 22px 14px; border-right: 1px solid var(--line); background: var(--panel); }
  .side .tab svg.i { width: 22px; height: 22px; }
  .side .logo { display: flex; align-items: center; gap: 8px; padding: 6px 10px 26px; }
  .side .logo img { height: 30px; width: auto; }
  .side .tab { flex: none; flex-direction: row; gap: 12px; padding: 12px 14px; border-radius: 12px; font-size: 15.5px; color: var(--muted); }
  .side .tab:hover { background: var(--panel-2); color: var(--ink); }
  .side .tab.on { background: var(--accent-soft); color: var(--ink); }
  .side .tab.on svg { color: var(--accent); }
  .side .spacer { flex: 1; }
  .tabbar { display: none; }
  .main { padding: 24px 32px 120px; width: 100%; }
}

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); font-weight: 600; font-size: 15.5px;
  cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s;
}
.btn:hover { background: var(--panel-3); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(0, 109, 255, .22); }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { min-height: 40px; padding: 0 14px; font-size: 14.5px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--panel-2); color: var(--ink); }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; color: var(--muted); font-weight: 500; }
.input, textarea.input, select.input {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--panel); outline: none; font-size: 16px;
}
textarea.input { min-height: 96px; resize: vertical; line-height: 1.4; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hint { font-size: 13.5px; color: var(--faint); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.pano-preview { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 118px; color: #fff; border: 1px solid #25406d; border-radius: 14px; background: radial-gradient(ellipse at 50% 130%, #12366a, #050a15 75%); overflow: hidden; }
.pano-preview b { font-size: clamp(28px, 7vw, 45px); font-weight: 650; letter-spacing: -.06em; }
.pano-preview-ring { width: 55px; height: 55px; flex: none; }

.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; min-height: 40px; padding: 8px 15px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.seg { display: flex; padding: 4px; gap: 2px; border-radius: 14px; background: var(--panel-3); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.seg button { flex: 1; min-width: max-content; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 12px; border: 0; border-radius: 11px; background: none; color: var(--muted); font-size: 14.5px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--panel); color: var(--accent-text); box-shadow: var(--shadow); }
.seg svg.i { width: 17px; height: 17px; }
/* Four Library tabs (with PiHaven) don't fit a phone's width in one row: two rows, all in view. */
@media (max-width: 520px) { .seg.four { display: grid; grid-template-columns: 1fr 1fr; } }

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.stepper button { width: 40px; height: 40px; border: 0; background: var(--panel-2); cursor: pointer; font-size: 18px; }
.stepper output { min-width: 40px; text-align: center; font-weight: 600; }

/* ---------- screens ---------- */
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent-line); margin-bottom: 14px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); }
.card { position: relative; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.card.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.card .thumb { position: relative; aspect-ratio: 16 / 9; background: var(--screen); display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.card .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .thumb .glyph { display: grid; justify-items: center; gap: 6px; color: var(--faint); font-size: 12.5px; text-align: center; padding: 0 14px; }
.card .thumb .glyph svg.i { width: 30px; height: 30px; }
.card .thumb.off::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.card .body { display: flex; align-items: center; gap: 10px; padding: 11px 12px 12px 14px; }
.card .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card .now { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.on { background: var(--ok); }
.check {
  position: absolute; z-index: 2; top: 10px; left: 10px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; border: 2px solid rgba(255, 255, 255, .75); background: rgba(0, 0, 0, .35); color: #fff; cursor: pointer;
  backdrop-filter: blur(6px);
}
.check svg.i { width: 16px; height: 16px; stroke-width: 3; opacity: 0; }
.sel .check { background: var(--accent); border-color: var(--accent); }
.sel .check svg.i { opacity: 1; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; background: var(--panel-3); color: var(--muted); font-size: 11.5px; font-weight: 600; }
.badge.live { background: var(--danger-soft); color: var(--danger); }
.tag-wall { position: absolute; z-index: 2; top: 10px; right: 10px; }

.actionbar {
  position: fixed; z-index: 45; left: 12px; right: 12px; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 10px);
  display: flex; align-items: center; gap: 8px; padding: 10px 10px 10px 16px; border-radius: 16px;
  background: var(--float); border: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-up); animation: rise .2s ease;
}
@media (min-width: 900px) { .actionbar { left: calc(232px + 32px); right: 32px; bottom: 24px; max-width: 760px; margin: 0 auto; } }
@keyframes rise { from { transform: translateY(16px); opacity: 0; } }

.sharing {
  position: fixed; z-index: 46; top: calc(env(safe-area-inset-top) + 10px); left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px; border-radius: 99px;
  background: var(--danger-soft); color: var(--ink); border: 1px solid rgba(210, 58, 58, .45); box-shadow: var(--shadow-up); font-size: 14px; font-weight: 600;
}
.sharing .rec { width: 9px; height: 9px; border-radius: 50%; background: var(--danger); animation: pulse 1.4s infinite; flex: none; }
.sharing { white-space: nowrap; }
/* on a phone: a full-width bar at the top, and the page moves down so it covers nothing */
@media (max-width: 899px) {
  .sharing { left: 12px; right: 12px; transform: none; justify-content: flex-end; }
  .sharing .share-label { margin-right: auto; overflow: hidden; text-overflow: ellipsis; }
  body.is-sharing .main { padding-top: calc(env(safe-area-inset-top) + 66px); }
}
@keyframes pulse { 50% { opacity: .35; } }

/* ---------- walls ---------- */
.wall-grid { display: grid; gap: 4px; padding: 4px; border-radius: 12px; background: var(--panel-3); }
.wall-cell { aspect-ratio: 16 / 9; border-radius: 6px; background: var(--panel-2); display: grid; place-items: center; text-align: center; padding: 4px; font-size: 11.5px; color: var(--muted); overflow: hidden; }
.wall-cell.set { background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent-line); }
button.wall-cell { border: 1px dashed var(--line); cursor: pointer; font-size: 12.5px; }
button.wall-cell.set { border-style: solid; }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

/* ---------- library ---------- */
.media-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(46%, 170px), 1fr)); }
.media { position: relative; border-radius: 12px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); cursor: pointer; text-align: left; padding: 0; }
.media .mthumb { aspect-ratio: 16 / 10; background: var(--screen); display: grid; place-items: center; color: var(--faint); }
.media .mthumb img, .media .mthumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.media .mname { padding: 8px 10px; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media .mname small { display: block; color: var(--faint); }
.media.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.media .order { position: absolute; top: 8px; left: 8px; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.media .kind { position: absolute; top: 8px; right: 8px; }
.uploads { display: grid; gap: 8px; margin-bottom: 14px; }
.upload { padding: 10px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.bar { height: 4px; border-radius: 4px; background: var(--panel-3); margin-top: 8px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); transition: width .2s; }

/* ---------- lists ---------- */
.list { display: grid; gap: 10px; }
.item { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.item .ico { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; color: var(--accent); flex: none; }
.item .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .s { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item .t.wrap2 { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.item .poster { width: 38px; height: 54px; border-radius: 6px; object-fit: cover; background: var(--panel-3); flex: none; }
.item.dim .t, .item.dim .ico, .item.dim .poster { opacity: .55; }
.jump { padding-bottom: 4px; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty svg.i { width: 36px; height: 36px; color: var(--faint); margin-bottom: 8px; }
.empty p { margin: 6px 0 16px; }
.section-title { font-size: 12.5px; text-transform: uppercase; letter-spacing: .18em; color: var(--accent-text); font-weight: 700; margin: 28px 0 10px; }

/* ---------- sheet ---------- */
.scrim { position: fixed; inset: 0; z-index: 60; background: var(--scrim); animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--panel); border-radius: 22px 22px 0 0; border: 1px solid var(--line); border-bottom: 0;
  box-shadow: var(--shadow-up);
}
.sheet.enter { animation: up .25s cubic-bezier(.2, .9, .3, 1); }
@keyframes up { from { transform: translateY(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: center; gap: 10px; padding: 16px 16px 8px 20px; }
.sheet-head h2 { margin: 0; font: 800 22px/1.1 var(--display); font-variation-settings: "opsz" 32; letter-spacing: -.03em; flex: 1; }
.sheet-body { padding: 8px 20px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.sheet-foot { display: flex; gap: 10px; padding: 12px 20px calc(env(safe-area-inset-bottom) + 14px); border-top: 1px solid var(--line); }
.sheet-foot .btn { flex: 1; }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; transform: translate(-50%, -50%); width: min(640px, calc(100vw - 48px)); max-height: 86dvh; border-radius: 20px; border-bottom: 1px solid var(--line); }
  .sheet.enter { animation: pop .2s ease; }
  @keyframes pop { from { transform: translate(-50%, -48%); opacity: 0; } }
}
.targets { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); margin-bottom: 14px; font-size: 13.5px; }
.targets b { font-weight: 600; }
.pick { display: grid; gap: 8px; }
.pick label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); cursor: pointer; }
.pick input { width: 20px; height: 20px; accent-color: var(--accent); }
.hours-form { display: grid; gap: 10px; }
.hours { display: grid; gap: 6px; }
.hours-row { display: grid; grid-template-columns: 66px minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; align-items: center; max-width: 560px; }
.hours-row label { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.hours-row label input { width: 18px; height: 18px; accent-color: var(--accent); }
.hours-row .input { min-width: 0; padding: 8px 10px; font-size: 15px; }
/* on a phone the clock button would push "am/pm" out of view; tapping the time still opens the picker */
@media (max-width: 520px) { .hours-row .input::-webkit-calendar-picker-indicator { display: none; } .hours-row .input { padding: 8px 6px; } }
.hours-row:has(label input:not(:checked)) .input { opacity: .45; }
.hours-form:not(.on) .hours { opacity: .4; }

.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); word-break: break-all; user-select: all; }
.steps { padding-left: 20px; margin: 8px 0; }
.steps li { margin-bottom: 8px; }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(380px, 100%); text-align: center; }
.login { background: radial-gradient(var(--dots) 1.2px, transparent 1.6px) 0 0 / 22px 22px, var(--bg); }
.login-card { padding: 28px 22px; border-radius: 24px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.login-brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 28px; }
.login-brand img { height: 40px; width: auto; }
.logo-tv { font: 800 13px/1 var(--display); letter-spacing: .22em; color: var(--muted); padding: 4px 6px 3px 8px; border: 1px solid var(--line); border-radius: 6px; }
.login-card h1 { margin: 0 0 10px; font: 800 32px/1.02 var(--display); font-variation-settings: "opsz" 32; letter-spacing: -.045em; }
.login-card p { margin: 0 0 24px; color: var(--muted); }
.login-card .login-hint { margin: 14px 0 0; font-size: 13px; }

#toast {
  position: fixed; z-index: 90; left: 50%; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 84px); transform: translateX(-50%) translateY(20px);
  padding: 12px 18px; border-radius: 14px; background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 15px; box-shadow: var(--shadow-up);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; width: max-content; max-width: calc(100vw - 32px);
}
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.err { background: var(--danger); color: #fff; }
#toast.has-btn { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; }
#toast.show.has-btn { pointer-events: auto; }
.toast-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.toast-btn svg.i { width: 16px; height: 16px; }
/* On a phone the message sits at the top, clear of the buttons it's about. */
@media (max-width: 899px) { #toast { top: calc(env(safe-area-inset-top) + 10px); bottom: auto; transform: translateX(-50%) translateY(-20px); } }
@media (min-width: 900px) { #toast { bottom: 100px; } }

/* ---------- live pictures of the TVs ---------- */
.pv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pv-img[hidden] { display: none; }
.pv-age { position: absolute; z-index: 1; right: 4px; top: 4px; padding: 1px 6px; border-radius: 6px; background: #000a; color: #dfe6f1; font-size: 10px; font-weight: 600; }
.pv-age.old, [data-pv-age][data-long].old { color: var(--faint); }
.pics { margin: 12px 0 4px; }
.pics figcaption { min-height: 18px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.pic-grid { display: grid; gap: 3px; }
.pic-cell { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: var(--screen); border: 1px solid var(--screen-line); }
.pics.one .pic-cell { border-radius: 12px; }
.pic-none { position: absolute; inset: 0; display: grid; place-items: center; padding: 6px; text-align: center; color: #8e97a6; font-size: 12.5px; }
.pic-name { position: absolute; z-index: 1; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 6px; background: #000a; color: #dfe6f1; font-size: 10px; font-weight: 600; max-width: calc(100% - 8px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pics { min-width: 0; }
.pics.compact { margin: 0; }
.desk-tv .pv-img { z-index: 0; opacity: .95; }
.desk-tv > span { z-index: 1; }
.desk.with-pics .desk-app { background: rgba(0, 109, 255, .12); box-shadow: none; }
.desk.with-pics .desk-app .desk-title { background: rgba(8, 16, 29, .75); }

/* ---------- now playing ---------- */
.np-list { display: grid; gap: 10px; margin-bottom: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.np { padding: 14px; border-radius: var(--radius); background: var(--panel-2); border: 1px solid var(--line); }
.np .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np .s { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-ico { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; flex: none; }
.np-bar { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.np-range { flex: 1; min-width: 0; height: 28px; accent-color: var(--accent); background: transparent; }
.np-btns { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 4px; }
.np-btns .icon-btn { color: var(--ink); }
.np-play { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; cursor: pointer; }
.np-play svg.i { width: 22px; height: 22px; fill: currentColor; }
.np-play:active { transform: scale(.95); }

/* ---------- remote ---------- */
.remote { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 420px; margin: 0 auto; }
.r-row { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 10px; }
.r-pill { min-height: 46px; }
.r-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 66px; border-radius: 18px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); color: var(--ink); font-size: 13px; font-weight: 600; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.r-btn svg.i { width: 22px; height: 22px; }
.r-btn.pressed, .dp.pressed { background: var(--accent-soft); border-color: var(--accent); transform: scale(.97); }
.r-sent { margin: -10px 0 -6px; min-height: 20px; font-size: 14px; color: var(--muted); }
.r-sent.flash { animation: r-sent 1.2s ease-out; }
@keyframes r-sent { 0% { color: var(--ink); } 100% { color: var(--muted); } }
.r-scroll { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.r-scroll .r-label { grid-column: 1 / -1; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.r-scroll .r-btn { min-height: 54px; }
.dpad { position: relative; width: min(78vw, 280px); aspect-ratio: 1; margin: 4px auto; border-radius: 50%; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow), 0 18px 40px rgba(0, 22, 61, .10); }
@media (prefers-color-scheme: dark) { .dpad { background: radial-gradient(circle at 50% 40%, #1d2333, #121621); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .04), 0 18px 40px rgba(0, 0, 0, .35); } }
.dp { position: absolute; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink); cursor: pointer; touch-action: manipulation; user-select: none; -webkit-user-select: none; border-radius: 18px; transition: transform .08s; }
.dp svg.i { width: 30px; height: 30px; stroke-width: 2.4; }
.dp.up { left: 33%; right: 33%; top: 3%; height: 30%; }
.dp.down { left: 33%; right: 33%; bottom: 3%; height: 30%; }
.dp.left { top: 33%; bottom: 33%; left: 3%; width: 30%; }
.dp.right { top: 33%; bottom: 33%; right: 3%; width: 30%; }
.dp.ok { left: 32%; top: 32%; width: 36%; height: 36%; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-size: 19px; box-shadow: 0 8px 20px rgba(0, 109, 255, .35); }
.pad-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 52px; gap: 10px; }
.touchpad { min-width: 0; min-height: 0; overflow: hidden; padding: 8px; aspect-ratio: 16 / 10; border-radius: 18px; border: 1px solid var(--line); background: repeating-linear-gradient(45deg, var(--panel) 0 12px, var(--panel-2) 12px 24px); display: grid; place-items: center; text-align: center; color: var(--faint); font-size: 12.5px; line-height: 1.5; touch-action: none; user-select: none; -webkit-user-select: none; }
.scrollstrip b { font-size: 10px; font-weight: 600; writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .04em; }
.scrollstrip { border-radius: 18px; border: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 10px 0; color: var(--faint); touch-action: none; }
.r-type { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.remote select.input { font-weight: 600; }
.tab { min-width: 0; }

/* ---------- never wider than the phone ---------- */
body, .main { overflow-x: clip; }
.list { grid-template-columns: minmax(0, 1fr); }
.item, .card, .np, .media, .pick label, .targets { min-width: 0; }
.item .grow, .pick label .grow, .targets .grow { min-width: 0; overflow-wrap: anywhere; }

/* ---------- TVs tab: the room map and the selected TV or wall ---------- */
.tvs-layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
.tvs-layout > * { min-width: 0; }
.stage-col { display: grid; gap: 16px; min-width: 0; align-content: start; }
@media (min-width: 1100px) { .tvs-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } .stage-col { position: sticky; top: 24px; } }

/* ---------- guide ---------- */
.guide-layout { display: grid; gap: 16px; }
.guide-nav { display: grid; gap: 6px; align-content: start; }
.guide-link { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); color: var(--ink); text-align: left; cursor: pointer; }
.guide-link:hover { background: var(--panel-2); }
.guide-link.on { border-color: var(--accent); background: var(--accent-soft); }
.guide-link b { display: block; font-weight: 600; }
.guide-link .hint { display: block; margin-top: 2px; }
.guide-ico { width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--accent-soft); color: var(--accent); }
.guide-article { padding: 22px; border-radius: 20px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); line-height: 1.6; min-width: 0; }
.guide-article h2 { margin: 6px 0 8px; font: 800 30px/1.04 var(--display); font-variation-settings: "opsz" 32; letter-spacing: -.045em; }
.guide-article h3 { margin: 22px 0 6px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.guide-article .lead { color: var(--accent-text); font-weight: 600; margin: 0 0 14px; }
.guide-article ul { padding-left: 20px; }
.guide-article li { margin-bottom: 6px; }
.guide-article li::marker { color: var(--accent); }
.guide-article .tip { padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--ink); }
.guide-back { padding: 0; margin-bottom: 12px; display: inline-flex; align-items: center; gap: 4px; }
.guide-back svg.i { width: 16px; height: 16px; }
.terms { margin: 8px 0; }
.terms dt { font-weight: 700; margin-top: 12px; }
.terms dd { margin: 2px 0 0; color: var(--muted); }
.guide-next { display: grid; gap: 2px; width: 100%; margin-top: 22px; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); color: var(--ink); text-align: left; cursor: pointer; }
.guide-next:hover { border-color: var(--accent); }
.guide-intro .btn { margin-top: 6px; }
/* phone: the list, or the open topic */
@media (max-width: 899px) { .guide-layout.has-topic .guide-nav { display: none; } .guide-layout:not(.has-topic) .guide-intro { order: -1; } }
@media (min-width: 900px) { .guide-layout { grid-template-columns: 300px minmax(0, 1fr); align-items: start; } .guide-back { display: none; } .guide-article { position: sticky; top: 24px; } }

/* ---------- camera station (a phone fixed on a wall) ---------- */
.station { min-height: 100dvh; max-width: 560px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 20px) 16px 32px; display: grid; gap: 14px; align-content: start; }
.station .login-brand { margin-bottom: 0; }
.station video { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); }
.station h1 { margin: 4px 0 0; font: 800 32px/1.02 var(--display); font-variation-settings: "opsz" 32; letter-spacing: -.045em; }
.station p { margin: 0; color: var(--muted); }
.station-status { padding: 12px 14px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--ink) !important; display: flex; align-items: center; gap: 10px; }
.station-status.live { border-color: rgba(210, 58, 58, .5); background: var(--danger-soft); font-weight: 600; }
.station-status .rec { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: pulse 1.4s infinite; flex: none; }

/* ---------- welcome tour ---------- */
.tour { text-align: center; padding: 8px 4px 4px; }
.tour h2 { margin: 14px 0 8px; font: 800 30px/1.04 var(--display); font-variation-settings: "opsz" 32; letter-spacing: -.045em; }
.tour p { color: var(--muted); margin: 0 auto; max-width: 34ch; }
.tour-mark { display: block; margin: 0 auto; }
/* Each step's picture: Pixel itself (live, it waves, listens and cheers) or the app's icon for that part. */
.tour-art { width: 150px; height: 150px; margin: -4px auto 0; display: grid; place-items: center; }
.tour-art .tour-pixel { position: relative; display: block; width: 100%; height: 100%; }
.tour-ico { display: grid; place-items: center; width: 84px; height: 84px; border-radius: 24px; color: var(--accent);
  background: radial-gradient(circle at 50% 35%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%), var(--panel-3);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent); }
.tour-ico svg { width: 40px; height: 40px; }
.tour-dots { display: flex; justify-content: center; gap: 8px; margin: 22px 0 4px; }
.tour-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.tour-dots i.done { background: var(--faint); }
.tour-dots i.on { background: var(--accent); transform: scale(1.35); }
.room { padding: 14px; border-radius: 22px; background: radial-gradient(var(--dots) 1px, transparent 1.4px) 0 0 / 16px 16px, var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); }
.room-grid { display: grid; gap: 8px; }
.tile { position: relative; display: grid; gap: 3px; min-width: 0; padding: 0 0 8px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-align: left; cursor: pointer; overflow: hidden; transition: border-color .15s, box-shadow .15s, opacity .15s; }
.tile.extra { margin-top: 10px; }
.tile-screen { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 9; background: var(--screen); color: #6E7683; overflow: hidden; }
.tile-screen img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile-screen .glyph svg.i { width: 22px; height: 22px; }
.tile-win { position: absolute; background: #1a2d4a; border: 1px solid #4a6690; overflow: hidden; }
.tile-win.focused { border-color: #8db2ff; background: #1d3456; }
.tile-win i { display: block; padding: 1px 4px; background: #2c4569; color: #dbe6f8; font-size: 9px; font-weight: 600; line-height: 1.5; font-style: normal; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-name { display: flex; align-items: center; gap: 5px; padding: 2px 8px 0; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-now { padding: 0 8px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile.in { border-color: var(--accent-line); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.tile.in .tile-screen { box-shadow: inset 0 0 0 2px var(--accent-line); }
.tile.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.tile.off .tile-screen::after, .tile.offline .tile-screen::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.tile.offline { opacity: .7; }
.target-chips { padding: 12px 0 0; flex-wrap: wrap; overflow: visible; } /* every wall, desktop and Combine TVs always in view */
.chip { display: inline-flex; align-items: center; gap: 6px; }
.chip svg.i { width: 15px; height: 15px; }
.chip.ghost { background: transparent; border-style: dashed; }
.chips.wrap { flex-wrap: wrap; overflow: visible; }

.stage { padding: 18px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.stage-head { display: flex; align-items: center; gap: 12px; }
.stage-head h2 { margin: 0; font: 800 26px/1.05 var(--display); font-variation-settings: "opsz" 32; letter-spacing: -.035em; overflow-wrap: anywhere; }
.stage-ico { width: 46px; height: 46px; flex: none; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.eyebrow { display: block; font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-text); }
.now-line { display: flex; align-items: center; gap: 10px; margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); font-size: 15px; color: var(--muted); }
.now-line b { color: var(--ink); }
.now-line svg.i { color: var(--accent); }
.link-btn { border: 0; padding: 0 0 0 6px; background: none; color: var(--accent-text); font-weight: 600; cursor: pointer; font-size: inherit; }
.stage-actions { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 8px; margin: 14px 0 4px; }
.stage-actions .btn { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.stage-actions .btn { padding: 0 12px; }
.stage .np-list { margin-top: 14px; grid-template-columns: minmax(0, 1fr); }
.stage .banner { margin: 0 0 4px; }
@media (max-width: 520px) { .stage-actions { grid-template-columns: 1fr 1fr; } .stage-actions .btn.primary { grid-column: 1 / -1; min-height: 54px; font-size: 16.5px; } }

/* the desktop drawn to scale, with draggable app windows */
.desk { position: relative; overflow: hidden; margin-bottom: 2px; color: #dbe6f8; border-radius: 12px; border: 1px solid #2c4366; background: radial-gradient(ellipse at 50% 160%, #23436e, #08101d 75%); }
.desk-tv { position: absolute; pointer-events: none; border: 1px solid #4e648066; }
.desk-tv > span { position: absolute; left: 6px; bottom: 4px; color: #96abcc; font-size: 10px; }
.desk-app { position: absolute; background: #14243d; border: 1px solid #546d93; border-radius: 4px; overflow: hidden; touch-action: none; cursor: grab; box-shadow: 0 6px 16px #0005; }
.desk-app.focused { border-color: #92b6ff; box-shadow: 0 0 0 1px #5288e7, 0 6px 16px #0005; }
.desk-title { display: flex; align-items: center; gap: 5px; background: #2c4569; padding: 3px 6px; font-size: 11px; white-space: nowrap; }
.desk-title span { overflow: hidden; text-overflow: ellipsis; }
.desk-title > .i { width: 12px; height: 12px; flex: none; }
.desk-resize { position: absolute; right: 0; bottom: 0; width: 22px; height: 22px; cursor: nwse-resize; background: linear-gradient(135deg, transparent 56%, #9dbce6 57%, #9dbce6 62%, transparent 63%); }
.apps { display: grid; gap: 8px; margin-top: 14px; }
.app-row { display: flex; align-items: center; gap: 10px; padding: 10px 10px 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel-2); min-width: 0; }
.app-row.on { border-color: var(--accent-line); background: var(--accent-soft); }
.app-row .ico { width: 36px; height: 36px; border-radius: 10px; background: var(--panel); display: grid; place-items: center; color: var(--accent); flex: none; }
.app-row .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-row .s { font-size: 13px; color: var(--muted); }

/* ---------- picking what to control ---------- */
.target-bar { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--accent-line); background: var(--panel); box-shadow: var(--shadow); color: var(--ink); text-align: left; cursor: pointer; }
.target-bar b { display: block; font-size: 16px; }
.target-bar .hint { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.target-bar .grow { min-width: 0; }
.target-bar > svg.i { color: var(--muted); }
.item.tap { width: 100%; text-align: left; color: var(--ink); cursor: pointer; font: inherit; }
.item.tap:hover { background: var(--panel-2); }
.item.tap.on { border-color: var(--accent); }
.item.tap > svg.i { color: var(--accent); }
.item.tap[disabled] { opacity: .5; cursor: default; }
.item > .dot { margin: 0 4px; }
button.plain { border: 0; background: none; padding: 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }

/* ---------- "Show something" ---------- */
.launch-input { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.tile-btn { display: grid; gap: 4px; justify-items: start; align-content: start; min-height: 100px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); color: var(--ink); text-align: left; cursor: pointer; }
.tile-btn:hover { border-color: var(--accent-line); }
.tile-btn > .i { width: 26px; height: 26px; padding: 6px; box-sizing: content-box; border-radius: 12px; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.tile-btn b { font-size: 14.5px; overflow-wrap: anywhere; }
.tile-btn span { font-size: 12.5px; color: var(--muted); }
.upload-status progress { width: 100%; height: 18px; accent-color: var(--accent); }

/* ---------- remote, library, settings ---------- */
.remote .target-bar { margin-bottom: 2px; }
.more-keys { border-top: 1px solid var(--line); padding-top: 14px; }
.more-keys summary, details summary { cursor: pointer; color: var(--accent-text); font-weight: 700; font-size: 15px; }
[data-act=voice][aria-pressed=true] { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }
.add-site { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 600px) { .add-site { grid-template-columns: 1fr 1.6fr auto; } }
.wall-icon { display: grid; gap: 2px; width: 38px; flex: none; }
.wall-icon i { aspect-ratio: 16 / 9; border-radius: 2px; background: var(--accent-soft); border: 1px solid var(--accent-line); }
.wall-cell { position: relative; cursor: pointer; border: 1px dashed var(--line); }
.wall-cell.set { border-style: solid; }
.wall-cell select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.code.inline { display: inline; padding: 2px 6px; }
.section-title .btn { text-transform: none; letter-spacing: 0; }

/* ---------- combining TVs ---------- */
.room.combining { border-color: var(--accent); }
.combine-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.combine-head b { flex: 1; }
.tile .tick { position: absolute; z-index: 2; top: 6px; left: 6px; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid rgba(255, 255, 255, .7); background: rgba(0, 0, 0, .4); color: #fff; }
.tile .tick svg.i { width: 13px; height: 13px; stroke-width: 3; opacity: 0; }
.tile.picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.tile.picked .tick { background: var(--accent); border-color: var(--accent); }
.tile.picked .tick svg.i { opacity: 1; }
.chips-label { flex: none; align-self: center; font-size: 12.5px; }
.stage.combine h2 { margin: 2px 0 0; font-size: 21px; }

/* ---------- arranging apps ---------- */
.desk-ghost { position: absolute; z-index: 5; pointer-events: none; border: 2px dashed #8db2ff; background: rgba(91, 140, 255, .18); border-radius: 6px; display: grid; place-items: center; color: #dbe6ff; font-size: 12px; font-weight: 700; text-shadow: 0 1px 3px #000; }
.desk-hint { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.desk-hint .chip { padding: 5px 11px; font-size: 12.5px; }
.arrange summary { margin-bottom: 10px; }
.arrange { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 12px 0; }

/* ---------- phones: the picked TV's main actions stay in reach ---------- */
.quickbar { display: none; }
@media (max-width: 899px) {
  .quickbar {
    position: fixed; z-index: 39; left: 10px; right: 10px; bottom: calc(var(--tabbar) + env(safe-area-inset-bottom) + 8px);
    display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 14px; border-radius: 18px;
    background: var(--float); border: 1px solid var(--line); box-shadow: var(--shadow-up);
    backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
    transform: translateY(12px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s, transform .18s, visibility 0s .18s;
  }
  body.qb-on .quickbar { transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .18s, transform .18s; }
  .quickbar .grow { min-width: 0; }
  .quickbar b { display: block; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .quickbar .hint { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .quickbar .btn { min-height: 44px; padding: 0 14px; font-size: 14.5px; }
}
.menu-group { margin: 4px 0 14px; }
.menu-group > .section-title { margin: 6px 0 8px; }
.badge.warn { background: var(--danger-soft); color: var(--danger); }
.sheet .item .s { white-space: normal; }

/* ---------- guided TV installation ---------- */
.setup-fields { min-inline-size:0; width:100%; margin:0; padding:0; border:0; }
.setup-entry { width:100%; margin-bottom:10px; text-align:left; }
.setup-progress { list-style:none; display:flex; gap:8px; padding:0; margin:0 0 22px; }
.setup-progress li { display:flex; flex:1; flex-direction:column; align-items:center; gap:5px; font-size:11px; color:var(--muted); text-align:center; }
.setup-progress li > span { width:26px; height:26px; border-radius:50%; display:grid; place-items:center; background:var(--panel-3); font-weight:700; }
.setup-progress [aria-current] { color:var(--accent-text); font-weight:700; }
.setup-progress [aria-current] > span, .setup-progress .done > span { background:var(--accent); color:#fff; }
.setup-error { padding:12px; border-radius:10px; background:var(--danger-soft); color:var(--danger); font-size:14px; }
.setup-inventory { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.setup-pick { display:flex; align-items:center; gap:9px; min-width:0; padding:10px; border:1px solid var(--line); border-radius:13px; background:var(--panel-2); color:var(--ink); text-align:left; cursor:pointer; }
.setup-pick .grow { min-width:0; }
.setup-pick b, .setup-pick small { display:block; overflow-wrap:anywhere; }
.setup-pick small { margin-top:4px; font-size:11px; color:var(--muted); }
.setup-pick.selected { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.setup-tick { flex:none; color:var(--accent); }
.setup-picture { position:relative; display:grid; place-items:center; flex:none; width:64px; aspect-ratio:16/9; overflow:hidden; border-radius:7px; background:var(--screen); color:var(--cloud); }
.setup-picture img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.setup-identify { display:flex; align-items:center; flex-direction:column; gap:10px; padding:14px; margin:14px 0; border:1px solid var(--line); border-radius:16px; }
.setup-identify .setup-picture { width:min(280px,100%); }
.setup-identify p { margin:0; text-align:center; }
.setup-identify .btn { max-width:100%; white-space:normal; overflow-wrap:anywhere; }
.setup-number { display:inline-grid; place-items:center; flex:none; width:30px; height:30px; border-radius:9px; background:var(--accent-soft); color:var(--accent-text); font-size:15px; font-weight:700; }
.setup-confirm { display:flex; align-items:center; gap:10px; min-height:48px; font-size:14px; cursor:pointer; }
.setup-confirm input, .setup-modes input { width:20px; height:20px; flex:none; accent-color:var(--accent); }
.setup-modes { display:grid; gap:8px; margin:12px 0 18px; }
.setup-modes label { display:flex; gap:10px; align-items:center; padding:13px; border:1px solid var(--line); border-radius:13px; cursor:pointer; }
.setup-modes small { display:block; font-size:12px; color:var(--muted); margin-top:5px; }
.setup-dimensions { margin:14px 0; font-size:13px; gap:8px; }
.setup-dimension { display:inline-flex; align-items:center; gap:8px; }
.setup-grid-scroll { overflow-x:auto; border:1px solid var(--line); border-radius:12px; background:var(--panel-3); padding:6px; }
.setup-grid { display:grid; gap:5px; }
.setup-cell { min-width:0; min-height:70px; aspect-ratio:16/9; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; padding:8px; border:1px dashed var(--line); border-radius:8px; background:var(--panel); color:var(--muted); font:inherit; font-size:12px; text-align:center; overflow-wrap:anywhere; }
.setup-cell > span { display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
button.setup-cell { cursor:pointer; }
.setup-cell.filled { border-style:solid; color:var(--ink); }
.setup-cell b { color:var(--accent-text); font-size:20px; }
.setup-cell.active { border:2px solid var(--accent); background:var(--accent-soft); }
.setup-assign { display:flex; flex-wrap:wrap; gap:7px; margin-bottom:10px; }
.setup-assign .btn { max-width:100%; white-space:normal; text-align:left; overflow-wrap:anywhere; }
.setup-advanced { margin-top:20px; color:var(--muted); font-size:13px; }
.setup-advanced summary { cursor:pointer; margin-bottom:12px; }
.setup-review { display:grid; gap:9px; margin:16px 0; }
.setup-review > div { display:grid; grid-template-columns:30px minmax(0,1fr); column-gap:10px; align-items:center; }
.setup-review .setup-number { grid-row:span 2; }
.setup-review b { overflow-wrap:anywhere; font-size:14px; }
.setup-review small { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.setup-pick:focus-visible, .setup-cell:focus-visible { outline:3px solid var(--accent); outline-offset:2px; }
@media(max-width:500px){ .setup-inventory { grid-template-columns:1fr; } .setup-picture { width:80px; } }

/* ---------- Home ---------- */
.home-date { margin: 4px 0 -6px; font-size: 13.5px; color: var(--muted); }
.home { display: grid; gap: 14px; max-width: 760px; }
.home > .section-title { margin: 14px 0 -4px; }
.home-now { display: grid; gap: 8px; padding: 14px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); cursor: pointer; }
.home-now:hover { border-color: var(--accent-line); }
.home-now-head { display: flex; align-items: center; justify-content: space-between; }
.home-now-head b { font-size: 16px; }
.home-now-head .link-btn { display: inline-flex; align-items: center; gap: 2px; }
.home-now-head .link-btn svg.i { width: 16px; height: 16px; }
.home-now .pics { margin: 0; }
.home-now .pics figcaption { display: none; }
.home-now .hint { margin: 0; }
.home-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.home-act { display: grid; gap: 4px; justify-items: start; align-content: start; min-height: 112px; padding: 14px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); box-shadow: var(--shadow); color: var(--ink); text-align: left; cursor: pointer; }
.home-act:hover { border-color: var(--accent-line); }
.home-act > svg.i { width: 26px; height: 26px; padding: 7px; box-sizing: content-box; border-radius: 13px; background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.home-act b { font-size: 16px; }
.home-act span { font-size: 13px; color: var(--muted); }
.home-act.primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 10px 24px rgba(0, 109, 255, .28); }
.home-act.primary > svg.i { background: rgba(255, 255, 255, .18); color: #fff; }
.home-act.primary span { color: rgba(255, 255, 255, .85); }
@media (min-width: 900px) { .home-actions { grid-template-columns: repeat(4, 1fr); } }
.item.tap .link-btn { flex: none; }
.home-now .pic-none { font-size: 0; }
.home-now .pic-name { font-size: 9.5px; }
@media (min-width: 1100px) {
  .home { max-width: 1120px; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
  .home > * { grid-column: 1 / -1; }
  .home > .home-now { grid-column: 1; }
  .home > .home-actions { grid-column: 2; grid-template-columns: 1fr 1fr; }
}

/* PiHaven library: the real album and film collection, with imports kept separate from TV playback. */
.ph-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.ph-services{margin:12px 0 18px}.ph-services a{text-decoration:none;font-size:13px}
.ph-tools{gap:10px;margin-bottom:12px}.ph-tools .seg{min-width:170px}.ph-tools .btn{flex:none}
.ph-search{margin:14px 0}.ph-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:12px}
.ph-photo{padding:0;min-width:0;text-align:left;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;color:var(--ink);cursor:pointer}
.ph-thumb{display:grid;place-items:center;aspect-ratio:4/3;background:var(--panel-3)}.ph-thumb img{width:100%;height:100%;object-fit:cover;min-height:0}
.ph-name{display:block;padding:10px 12px;font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ph-photo.dim{opacity:.55}.ph-slideshow{margin-top:14px}.ph-slideshow .grow{min-width:0}.ph-slideshow .s{white-space:normal}.ph-photo[hidden],[data-ph-item][hidden]{display:none}
@media(min-width:800px){.ph-grid{grid-template-columns:repeat(auto-fill,minmax(170px,1fr))}}

/* Visual TV picker: current pictures, physical positions, and highlighted wall membership. */
.where-map{display:grid;gap:8px;margin-bottom:18px}.where-tv{padding:0 0 9px;min-width:0;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--panel-2);color:var(--ink);cursor:pointer;text-align:left}
.where-tv.selected{border:2px solid var(--accent)}.where-tv b,.where-tv>small{display:block;padding:0 7px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.where-tv b{font-size:13px;margin-top:7px}.where-tv>small{font-size:10px;color:var(--muted);margin-top:2px}
.where-picture{display:grid;position:relative;place-items:center;aspect-ratio:16/9;overflow:hidden;background:var(--screen);color:#9aa2ae}.where-picture .pv-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.where-picture>small{position:absolute;bottom:3px;left:3px;padding:2px 4px;border-radius:4px;background:#000b;color:#fff;font-size:10px}
.where-mini{display:grid;align-self:center;gap:3px;width:70px;flex:none}.where-mini i{display:block;aspect-ratio:16/9;background:var(--panel-3);border:1px solid var(--line);border-radius:3px}.where-mini i.picked{background:var(--accent);border-color:var(--accent)}
@media(min-width:700px){.where-tv b{font-size:15px}.where-tv>small{font-size:12px}}

.ph-thumb{position:relative}.ph-video-mark{position:absolute;right:7px;bottom:7px;padding:3px 6px;border-radius:5px;background:#00163ddd;color:#fff;font-size:11px}
.drive-card{padding:16px;border:1px solid var(--line,#cdddf5);border-radius:16px;margin-bottom:18px;background:var(--panel,#fff)}
.drive-card summary{cursor:pointer;font-size:14px;margin:12px 0}

/* ---------- the Universe tab, ⌘K and Pixel ---------- */
/* The 3D world sits beside #main (renderMain never rebuilds it) and fills the space next to the side bar; on a
   phone it runs under the tab bar, and the universe's HUD keeps var(--tabbar) clear itself. */
.universe-root { position: fixed; z-index: 30; inset: 0; background: #000; outline: none; }
.universe-root[hidden] { display: none; }
@media (min-width: 900px) { .universe-root { left: 232px; } }
body.view-universe { overflow: hidden; }
body.view-universe .main { padding-bottom: 0; }
/* Pixel's orb rides above the HUD's TV card and rail when they reach under it (app.js placeOrb). */
/* Pixel's side panel covers the right of the universe on a desktop: the HUD (its views, Live, Walk, Edit layout,
   Help and Full screen up top; the TV card and rail below; 360°'s compass) moves left of it, so the TV Pixel just
   flew to stays in reach. Narrower screens keep the panel over the view as before. */
@media (min-width: 1200px) {
  body:has(.ai-panel[data-layout="side"]:not([hidden]):not(.is-closing)) .universe-root .u-ui { --u-x-end: calc(432px + var(--u-safe-right, 0px)); }
  body:has(.ai-panel[data-layout="side"]:not([hidden]):not(.is-closing)) .universe-root .u-pano { right: calc(432px + var(--u-safe-right, 0px)); }
  /* Too narrow beside the panel for the views and the tools in one row: the tools go under, on the right. */
  body:has(.ai-panel[data-layout="side"]:not([hidden]):not(.is-closing)) .universe-root .u-top { flex-wrap: wrap; row-gap: 8px; }
  body:has(.ai-panel[data-layout="side"]:not([hidden]):not(.is-closing)) .universe-root .u-actions { margin-left: auto; }
}
/* On a phone Pixel's sheet lowers itself after it opens a view (assistant.mjs setCompact): the HUD's bottom row
   rides above that lowered sheet instead of under it (hud.css reads --u-dock). Talk to Pixel hides the sheet. */
@media (max-width: 639px) {
  body:has(.ai-panel.is-compact:not([hidden]):not(.is-closing)):not(:has(.tk:not([hidden]))) .universe-root { --u-dock: min(46dvh, 420px); }
}
/* A phone's way into ⌘K from the universe (it has no top bar there): a glass magnifier riding above Pixel's orb
   (app.js placeOrb sets --u-search-bottom). Wider screens have the side bar's Search. */
.universe-search { display: none; }
@media (max-width: 899px) {
  body.view-universe .universe-search { display: grid; place-items: center; position: fixed; z-index: 50; width: 44px; height: 44px; padding: 0; border-radius: 50%;
    right: calc(var(--ai-orb-right, 16px) + 5px); bottom: var(--u-search-bottom, calc(var(--tabbar, 68px) + env(safe-area-inset-bottom) + 78px));
    color: #DCE8FF; border: 1px solid rgba(138, 184, 255, .3); background: linear-gradient(180deg, rgba(16, 30, 62, .94), rgba(4, 9, 22, .94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 26px -12px rgba(0, 0, 0, .8); } /* no backdrop blur: it would recomposite over the live 3D every frame */
  body.view-universe .universe-search svg.i { width: 20px; height: 20px; }
  /* Talk to Pixel hides the orb: the magnifier takes its place instead of floating above a gap. */
  body.view-universe:has(.tk:not([hidden])) .universe-search { bottom: calc(var(--ai-orb-bottom, calc(var(--tabbar, 68px) + env(safe-area-inset-bottom) + 12px)) + 5px); }
}
/* The universe's own help sits inside its layer, under the app's floating buttons: they step aside while it's open. */
body.view-universe:has(#universe-root .u-help:not([hidden])) :is(.ai-orb, .universe-search) { opacity: 0; visibility: hidden; pointer-events: none; }
.universe-failed { position: absolute; inset: 0; display: grid; place-content: center; gap: 4px; padding: 24px; text-align: center; color: #EEF4FF; background: radial-gradient(ellipse at 50% 40%, #00163d, #000 70%); }
.universe-failed h2 { margin: 0; font: 800 26px/1.1 var(--display); letter-spacing: -.03em; }
.universe-failed p { margin: 6px auto 16px; max-width: 34ch; color: #A6B5CE; }
.universe-failed .row { justify-content: center; }

/* Six tabs on a 375 px phone: a little less padding round the lit icon, the labels unchanged. */
@media (max-width: 899px) {
  .tabbar { padding-left: 4px; padding-right: 4px; }
  .tabbar .tab { min-width: 0; font-size: 11.5px; letter-spacing: -.01em; }
  .tabbar .tab.on svg.i { padding: 2px 10px; width: 40px; }
}
@media (max-width: 380px) { .tabbar .tab { font-size: 11px; } .tabbar .tab svg.i { width: 24px; height: 24px; } .tabbar .tab.on svg.i { padding: 2px 8px; width: 36px; } }

/* ⌘K: Search in the side bar on a computer, a magnifier in each tab's top bar on a phone. */
.side .side-search { margin-top: auto; }
.side .side-search + .side-help { margin-top: 0; }
.side .side-search { white-space: nowrap; }
.side-search .kbd { margin-left: auto; padding: 1px 7px; border: 1px solid var(--line); border-radius: 6px; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.search-btn { color: var(--muted); }
.search-btn svg.i { width: 21px; height: 21px; }
@media (min-width: 900px) { .search-btn { display: none; } }

/* TVs: 3D at the end of the walls under the map (the chips and it share one wrapping row). */
.room-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 12px; }
.room-foot .target-chips { display: contents; }
.room-3d { flex: none; margin-left: auto; min-height: 40px; border-radius: 99px; gap: 6px; }
.room-3d svg.i { width: 17px; height: 17px; }
/* Phones: a round "3D" that fits at the end of the last row of wall chips, instead of a row of its own. */
@media (max-width: 559px) { .room-3d { width: 44px; min-height: 40px; padding: 0; justify-content: center; font-weight: 750; } .room-3d svg.i { display: none; } }

/* Home: Enter the universe, and Talk to Pixel. Both are windows onto deep space in either look. */
.home-hero { display: grid; gap: 10px; }
@media (min-width: 760px) { .home-hero { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }
.hero-universe, .hero-pixel { position: relative; overflow: hidden; isolation: isolate; border-radius: 22px; color: #EEF4FF; border: 1px solid rgba(138, 184, 255, .22);
  background: radial-gradient(120% 90% at 78% 8%, rgba(0, 109, 255, .38), transparent 58%), radial-gradient(90% 80% at 0% 100%, rgba(0, 22, 61, .95), transparent 70%), #02050d;
  box-shadow: inset 0 1px 0 rgba(200, 222, 255, .08), 0 18px 40px -24px rgba(0, 40, 120, .9); }
.hero-universe { display: grid; grid-template-columns: minmax(0, 1fr); padding: 16px 16px 18px; min-height: 236px; }
.hero-sky { position: absolute; inset: 0; z-index: -1; opacity: .85; pointer-events: none;
  background: radial-gradient(1px 1px at 12% 22%, #fff, transparent 60%), radial-gradient(1px 1px at 28% 68%, #cfe0ff, transparent 60%), radial-gradient(1.4px 1.4px at 46% 14%, #fff, transparent 60%),
    radial-gradient(1px 1px at 63% 40%, #9cc2ff, transparent 60%), radial-gradient(1.2px 1.2px at 82% 74%, #fff, transparent 60%), radial-gradient(1px 1px at 92% 18%, #cfe0ff, transparent 60%),
    radial-gradient(1px 1px at 6% 86%, #9cc2ff, transparent 60%), radial-gradient(1.3px 1.3px at 38% 92%, #fff, transparent 60%), radial-gradient(1px 1px at 71% 9%, #fff, transparent 60%); }
/* The wall, as it hangs, turned a little towards you, with its real pictures and a soft blue backlight. */
.hero-wall { display: block; perspective: 900px; margin: 4px 0 14px; }
.hero-grid { display: grid; gap: 3px; padding: 4px; border-radius: 8px; transform: rotateY(-16deg) rotateX(5deg); transform-origin: 60% 50%;
  background: #0b0f17; box-shadow: 0 0 0 1px rgba(138, 184, 255, .32), 0 0 34px -2px rgba(0, 109, 255, .75), 0 0 90px 4px rgba(0, 109, 255, .35); }
.hero-tv { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 2px; background: radial-gradient(circle at 50% 45%, #0c1a33, #03060c); }
.hero-tv .pv-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-tv.off { background: #020306; }
.hero-tv.off::after { content: ""; position: absolute; right: 6%; bottom: 9%; width: 4px; height: 4px; border-radius: 50%; background: #ff4d4d; box-shadow: 0 0 6px #ff4d4d; }
.hero-tv.offline { background: repeating-linear-gradient(0deg, #0a0d14 0 2px, #121722 2px 4px); }
.hero-copy { display: grid; gap: 6px; justify-items: start; align-content: end; min-width: 0; }
.hero-copy .eyebrow { display: inline-flex; align-items: center; gap: 6px; color: #9CC2FF; }
.hero-copy .eyebrow svg.i { width: 15px; height: 15px; }
.hero-copy h2 { margin: 0; font: 800 26px/1.05 var(--display); font-variation-settings: "opsz" 32; letter-spacing: -.02em; word-spacing: .04em; color: #fff; }
.hero-copy p { margin: 0 0 8px; color: #B6C6E2; font-size: 14.5px; max-width: 46ch; }
.hero-copy .btn.primary { box-shadow: 0 0 0 1px rgba(92, 157, 255, .45), 0 10px 26px -8px rgba(0, 109, 255, .9); }
@media (min-width: 560px) {
  .hero-universe { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 18px; padding: 22px; }
  .hero-wall { order: 2; margin: 0; }
}
@media (min-width: 760px) { .hero-universe { grid-template-columns: minmax(0, 1fr); } .hero-wall { order: 0; margin: 2px 0 12px; } }
@media (min-width: 1100px) { .hero-universe { grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); padding: 24px; } .hero-wall { order: 2; margin: 0; } }
.hero-pixel { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: radial-gradient(90% 90% at 12% 18%, rgba(124, 77, 255, .3), transparent 60%), radial-gradient(120% 100% at 100% 100%, rgba(0, 109, 255, .3), transparent 60%), #03050d; }
@media (min-width: 760px) { .hero-pixel { flex-direction: column; align-items: flex-start; justify-content: flex-end; } }
.pixel-face { flex: none; display: grid; place-items: center; width: 76px; height: 76px; border-radius: 24px; color: #CDB8FF;
  background: radial-gradient(circle at 35% 30%, rgba(160, 120, 255, .35), rgba(60, 30, 140, .2) 60%, transparent); box-shadow: inset 0 0 0 1px rgba(180, 150, 255, .28), 0 0 30px -6px rgba(124, 77, 255, .8); }
.pixel-face > svg.i { width: 40px; height: 40px; stroke-width: 1.6; }
.pixel-face .pixel-live { position: relative; display: block; width: 100%; height: 100%; }
.pixel-face.is-live { background: radial-gradient(circle at 50% 55%, rgba(124, 77, 255, .28), transparent 68%); box-shadow: none; overflow: visible; }
.hero-pixel-acts { gap: 8px; }
.hero-pixel .btn.ghost { color: #DCE7FF; border-color: rgba(138, 184, 255, .3); background: rgba(255, 255, 255, .04); }
.hero-universe .btn, .hero-pixel .btn { min-height: 44px; }

/* Settings → Pixel. */
.pixel-badge { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; flex: none; color: #B79CFF;
  background: radial-gradient(circle at 50% 60%, rgba(124, 77, 255, .42), rgba(40, 20, 110, .5) 62%, #0b0820); box-shadow: inset 0 0 0 1px rgba(180, 150, 255, .3), 0 0 18px -6px rgba(124, 77, 255, .9); }
.pixel-badge > svg.i { width: 32px; height: 32px; }
.pixel-model { white-space: nowrap; }
.pixel-sep { color: var(--faint); }
.pixel-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 12px 0 0; font-size: 14px; }
.pixel-facts dt { color: var(--muted); }
.pixel-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.badge.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.pixel-setup { margin-top: 14px; }
.pixel-setup summary { cursor: pointer; font-family: inherit; font-size: 14px; font-weight: 600; }
@media (min-width: 760px) { .hero-pixel .pixel-face { width: 112px; height: 112px; border-radius: 30px; } }
/* Wide screens: the two cards mirror each other. Copy on the left, the picture on the right: the wall in one, Pixel
   standing big in a pool of violet light in the other. */
@media (min-width: 1100px) {
  .home-hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .hero-pixel { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 22px 18px 22px 22px; }
  .hero-pixel .hero-copy { order: 1; }
  .hero-pixel .pixel-face { order: 2; width: 172px; height: 196px; border-radius: 0; box-shadow: none;
    background: radial-gradient(closest-side at 50% 58%, rgba(124, 77, 255, .35), rgba(124, 77, 255, .12) 60%, transparent); }
  .hero-pixel .pixel-face > svg.i { width: 88px; height: 88px; }
  .hero-pixel .hero-copy p { max-width: 30ch; }
}

/* While a sheet is open, the ambient motion behind its scrim (the twinkling stars, the Live ping, Pixel's breathing
   orb) rests: nothing moves behind what you're reading, and a phone spends nothing drawing it. */
body.sheet-open::before, body.sheet-open::after,
body.sheet-open :not(#sheet-root, #sheet-root *),
body.sheet-open :not(#sheet-root, #sheet-root *)::before,
body.sheet-open :not(#sheet-root, #sheet-root *)::after { animation-play-state: paused !important; }
@media (max-width: 559px) { .hero-wall { width: 86%; margin: 2px auto 14px; } }
.ai-tiers { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; padding: 3px; border-radius: 14px; background: var(--panel-3); border: 1px solid var(--line); }
.ai-tiers label { display: grid; place-items: center; min-height: 40px; padding: 0 4px; border-radius: 11px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; text-align: center; }
.ai-tiers label.on { background: var(--accent); color: #fff; box-shadow: 0 4px 14px -6px rgba(0, 109, 255, .8); }
.ai-tiers label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 380px) { .ai-tiers label { font-size: 12.5px; } }
/* In the universe the HUD owns the top bar and the bottom card: messages appear just under the top bar. */
body.view-universe #toast { top: calc(env(safe-area-inset-top) + 82px); bottom: auto; transform: translateX(-50%) translateY(-20px); }
body.view-universe #toast.show { transform: translateX(-50%); }
@media (min-width: 900px) { body.view-universe #toast { margin-left: 116px; } }
@media (max-width: 899px) { body.view-universe #toast { top: calc(env(safe-area-inset-top) + 132px); } }
/* Talk to Pixel's small bar sits where toasts appear (the top of a phone, or under the universe's HUD): while it's
   up, toasts come in just below it instead of over it. */
@media (max-width: 899px) { body:has(.tk.is-mini:not([hidden])) #toast { top: calc(env(safe-area-inset-top) + 108px); } }
body.view-universe:has(.tk.is-mini:not([hidden])) #toast { top: calc(var(--tk-mini-top, 82px) + 98px); }

/* Settings → Your brand: a small preview of the "Your brand" screensaver. */
.brand-preview { display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center; gap: 6px; aspect-ratio: 16 / 9; max-width: 360px; margin: 4px 0 12px; border-radius: 14px; overflow: hidden; padding: 12px;
  background: radial-gradient(120% 90% at 50% 35%, color-mix(in srgb, var(--ss-accent, #006DFF) 38%, #05070d) 0%, #05070d 72%); color: #fff; text-align: center; }
.brand-preview img { max-width: 60%; max-height: 100%; min-height: 0; object-fit: contain; }
.brand-preview b { font-size: 22px; letter-spacing: -.02em; }
.brand-preview span { font-size: 13px; opacity: .85; }
.brand-colour { height: 44px; padding: 4px; max-width: 120px; }
