/* Solace Living — Demo Home button + iPad / shared styles */

.solace-bar  {
  margin: 0 0 12px;
}
a.solace-launch,
button.solace-launch  {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 16px;
  border-radius: 16px;
  border: 1px solid rgba(114, 217, 248, 0.22);
  background: linear-gradient(135deg, rgba(18, 26, 37, 0.86), rgba(13, 19, 28, 0.78));
  color: var(--text, #edf4fa);
  text-decoration: none;
  cursor: pointer;
  font-family: "Montserrat", "Helvetica Neue", sans-serif;
  font-weight: 750;
  letter-spacing: 0.04em;
  box-shadow:
    inset 0 1px 0 rgba(237, 244, 250, 0.10),
    0 8px 20px rgba(0, 0, 0, 0.22);
  -webkit-tap-highlight-color: transparent;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  a.solace-launch,
  button.solace-launch  {
    background: linear-gradient(135deg, rgba(18, 26, 37, 0.62), rgba(13, 19, 28, 0.72));
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    backdrop-filter: blur(14px) saturate(1.2);
  }
}
a.solace-launch:active,
button.solace-launch:active  { transform: scale(0.99); }
.solace-mark  {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #ffffff;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.14), 0 6px 14px rgba(0,0,0,0.30);
  overflow: hidden;
}
.solace-mark img  {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
  box-sizing: border-box;
  display: block;
}
.solace-launch .solace-copy  {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 0;
  flex: 1;
}
.solace-launch .solace-name  {
  font-family: "Oswald", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  line-height: 1;
}
.solace-launch .solace-sub  {
  color: var(--muted, #99a8b8);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 650;
}
.solace-launch .solace-chev  {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--sky, #72d9f8);
  opacity: 0.9;
}

/* ---------- Standalone iPad page ---------- */
html.solace-page, body.solace-page, html.solace-tv, body.solace-tv,
html.solace-page *,  body.solace-page *,  html.solace-tv *,  body.solace-tv *  {
  box-sizing: border-box;
}
html.solace-page,  body.solace-page  {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #0b1018;
  color: #edf4fa;
  font-family: "Montserrat", "Helvetica Neue", sans-serif;
  font-weight: 650;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}
body.solace-page  {
  min-height: 100dvh;
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(114, 217, 248, 0.16), transparent 55%),
    radial-gradient(800px 380px at 100% 0%, rgba(254, 44, 85, 0.08), transparent 50%),
    #0b1018;
}
.solace-app  {
  max-width: 1180px;
  margin: 0 auto;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 20px calc(28px + env(safe-area-inset-bottom, 0px));
}
.solace-top  {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: -12px -20px 16px;
  padding: 12px 20px 14px;
  background: linear-gradient(180deg, rgba(11, 16, 24, 0.94), rgba(11, 16, 24, 0.82) 70%, rgba(11, 16, 24, 0));
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  backdrop-filter: blur(12px) saturate(1.15);
}
.solace-brand  {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.solace-brand h1  {
  font-family: "Oswald", sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}
.solace-brand .sub  {
  display: block;
  color: #99a8b8;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-top: 4px;
  font-weight: 650;
}
a.solace-back  {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 16px 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(114, 217, 248, 0.22);
  background: rgba(13, 19, 28, 0.72);
  color: #72d9f8;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
a.solace-back svg  { width: 18px; height: 18px; display: block; }
a.solace-back:active  { transform: scale(0.98); }

.solace-updated  {
  color: #99a8b8;
  font-size: 12px;
  letter-spacing: 0.03em;
  background: rgba(18, 26, 37, 0.78);
  border: 1px solid rgba(114, 217, 248, 0.12);
  border-radius: 14px;
  padding: 10px 14px;
  min-width: 160px;
}
.solace-updated strong  {
  display: block;
  color: #edf4fa;
  font-weight: 700;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.solace-updated.warn  { border-color: rgba(255, 196, 77, 0.35); }
.solace-updated.warn strong  { color: #ffc44d; }

.solace-page .card  {
  position: relative;
  background: #121a25;
  border: 1px solid rgba(114, 217, 248, 0.12);
  border-radius: 22px;
  padding: 16px 18px;
  min-width: 0;
  box-shadow:
    inset 0 1px 0 rgba(237, 244, 250, 0.07),
    0 12px 28px rgba(0, 0, 0, 0.28);
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .solace-page .card  {
    background: linear-gradient(180deg, rgba(18, 26, 37, 0.78), rgba(13, 19, 28, 0.86));
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    backdrop-filter: blur(16px) saturate(1.15);
  }
}
.solace-page .card h3  {
  font-family: "Montserrat", sans-serif;
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #99a8b8;
  font-weight: 750;
}
.solace-page .section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 14px;
  flex-wrap: wrap;
}
.solace-page .section-title h2 {
  font-family: "Oswald", sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}
.solace-page .range {
  font-size: 11px;
  color: #99a8b8;
  background: rgba(13, 19, 28, 0.8);
  border: 1px solid rgba(114, 217, 248, 0.12);
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  font-weight: 650;
  letter-spacing: 0.04em;
}
.solace-page .note,  .solace-page .note  { font-size: 12px; color: #99a8b8; font-weight: 650; }
.solace-page .grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.solace-page .kpi-panel.month { border-top: 3px solid #72d9f8; }
.solace-page .kpi-panel.ytd { border-top: 3px solid #fe2c55; }

.solace-page .kpi-panel.inventory { border-top: 3px solid #ffc44d; }
.solace-page .inv-sources {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.solace-page .inv-source {
  background: rgba(13, 19, 28, 0.7);
  border: 1px solid rgba(114, 217, 248, 0.10);
  border-radius: 14px;
  padding: 10px 12px;
}
.solace-page .inv-source .name {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b8c4d0;
}
.solace-page .inv-source .units {
  font-family: "Oswald", sans-serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.solace-page .inv-source .paid { font-size: 12px; color: #99a8b8; font-weight: 650; margin-top: 2px; }
@media (max-width: 700px) {
  .solace-page .inv-sources { grid-template-columns: 1fr; }
}

.tv-kpis-wrap { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.tv-inv-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 22px;
  background: linear-gradient(180deg, rgba(18, 26, 37, 0.88), rgba(13, 19, 28, 0.92));
  border: 1px solid rgba(255, 196, 77, 0.22);
  border-radius: 20px;
  padding: 10px 22px;
  color: #edf4fa;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: 0.03em;
}
.tv-inv-line .hand {
  font-family: "Oswald", sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: #ffc44d;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
}
.tv-inv-line .bit { color: #edf4fa; }
.tv-inv-line .muted { color: #99a8b8; font-size: 18px; }
.solace-page .big-metric {
  font-family: "Oswald", sans-serif;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.05;
  margin: 4px 0 4px;
  font-variant-numeric: tabular-nums;
  color: #edf4fa;
}
.solace-page .big-metric .currency { font-size: 0.5em; opacity: 0.7; margin-right: 2px; vertical-align: 0.18em; }
.solace-page .metric-label { color: #99a8b8; font-size: 13px; }
.solace-page .metric-range { color: #6e7c8c; font-size: 11px; margin-top: 2px; }
.solace-page .stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.solace-page .stat {
  background: rgba(13, 19, 28, 0.7);
  border: 1px solid rgba(114, 217, 248, 0.10);
  border-radius: 14px;
  padding: 12px;
}
.solace-page .stat .val {
  font-family: "Oswald", sans-serif;
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #72d9f8;
  line-height: 1.1;
}
.solace-page .stat .lbl { color: #99a8b8; font-size: 10px; letter-spacing: 0.10em; text-transform: uppercase; margin-top: 4px; font-weight: 750; }

.solace-page .chart-row { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 12px; }
.solace-page .donut-wrap { display: flex; align-items: center; justify-content: center; }
.solace-page .donut { position: relative; width: 230px; height: 230px; max-width: 100%; }
.solace-page .donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.solace-page .donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
}
.solace-page .donut-center .amt { font-family: "Oswald", sans-serif; font-size: 22px; font-weight: 700; line-height: 1.1; }
.solace-page .donut-center .lbl { color: #99a8b8; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; font-weight: 650; }
.solace-page .legend { display: flex; flex-direction: column; gap: 8px; }
.solace-page .legend-item { display: grid; grid-template-columns: 12px 1fr auto; gap: 10px; align-items: center; }
.solace-page .swatch { width: 12px; height: 12px; border-radius: 4px; display: block; }
.solace-page .legend-item .name { font-size: 13px; font-weight: 700; }
.solace-page .legend-item .detail { color: #99a8b8; font-size: 11px; }
.solace-page .legend-item .amt { font-variant-numeric: tabular-nums; font-weight: 750; text-align: right; }
.solace-page .legend-item .pct { display: block; color: #99a8b8; font-size: 11px; font-weight: 650; }

.solace-page .source-bars { display: flex; flex-direction: column; gap: 14px; }
.solace-page .bar-row .bar-head { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.solace-page .track {
  height: 10px;
  background: rgba(237, 244, 250, 0.06);
  border-radius: 999px;
  overflow: hidden;
}
.solace-page .track > span { display: block; height: 100%; border-radius: inherit; }
.solace-page .subbars { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.solace-page .subbar { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; font-size: 11px; color: #99a8b8; }
.solace-page .subbar .mini { height: 6px; background: rgba(237,244,250,0.06); border-radius: 999px; overflow: hidden; }
.solace-page .subbar .mini i { display: block; height: 100%; }

.solace-page .action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.solace-page .clear-card { border-color: rgba(34, 224, 122, 0.28); }
.solace-page .alert-card { border-color: rgba(255, 61, 79, 0.4); }
.solace-page .clear-badge, .solace-page .alert-badge {
  display: inline-flex; align-items: center; gap: 7px; border-radius: 999px;
  padding: 4px 10px; font-size: 10px; font-weight: 750; letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 8px;
}
.solace-page .clear-badge { background: rgba(34, 224, 122, 0.16); color: #22e07a; }
.solace-page .alert-badge { background: rgba(255, 61, 79, 0.16); color: #ff3d4f; }
.solace-page .clear-badge .dot, .solace-page .alert-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.solace-page .headline { font-size: 16px; font-weight: 750; margin: 0 0 4px; }
.solace-page .subhead { color: #99a8b8; font-size: 12px; margin: 0 0 12px; }
.solace-page .mini-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.solace-page .mini-stats div { background: rgba(13,19,28,0.65); border-radius: 12px; padding: 10px; }
.solace-page .mini-stats .v { font-family: "Oswald", sans-serif; font-size: 20px; font-weight: 700; color: #72d9f8; }
.solace-page .mini-stats .l { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: #99a8b8; margin-top: 2px; font-weight: 750; }

.solace-page .status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.solace-page .status-chip {
  background: rgba(18, 26, 37, 0.8);
  border: 1px solid rgba(114, 217, 248, 0.12);
  border-radius: 14px;
  padding: 12px 10px;
  text-align: center;
}
.solace-page .status-chip .v { font-family: "Oswald", sans-serif; font-size: 26px; font-weight: 700; }
.solace-page .status-chip .l { font-size: 10px; letter-spacing: 0.10em; text-transform: uppercase; color: #99a8b8; margin-top: 2px; font-weight: 750; }
.solace-page .status-chip .hint { font-size: 10px; color: #99a8b8; margin-top: 4px; }
.solace-page .status-chip.all { border-color: rgba(114, 217, 248, 0.28); }
.solace-page .status-chip.good { border-color: rgba(34, 224, 122, 0.28); }
.solace-page .status-chip.good .v { color: #22e07a; }
.solace-page .status-chip.warn { border-color: rgba(255, 61, 79, 0.35); }
.solace-page .status-chip.warn .v { color: #ff3d4f; }

.solace-page .products, .solace-page .orders { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.solace-page .product .pname, .solace-page .order-id { font-weight: 750; font-size: 14px; line-height: 1.3; }
.solace-page .badge {
  display: inline-flex; border-radius: 999px; padding: 3px 8px;
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 750; margin-bottom: 8px;
}
.solace-page .badge.active { background: rgba(34, 224, 122, 0.16); color: #22e07a; }
.solace-page .badge.inactive { background: rgba(153, 168, 184, 0.16); color: #99a8b8; }

.solace-page .finance-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.solace-page .finance .v { font-family: "Oswald", sans-serif; font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.solace-page .finance .hint { color: #99a8b8; font-size: 11px; margin-top: 4px; }
.solace-page .finance.hold .v { color: #ffc44d; }
.solace-page .finance.paid .v { color: #22e07a; }
.solace-page .hold-note, .solace-page .warn-note {
  margin-top: 12px; font-size: 12px; color: #99a8b8;
  background: rgba(255, 196, 77, 0.10);
  border: 1px solid rgba(255, 196, 77, 0.18);
  border-radius: 14px; padding: 10px 12px;
}
.solace-page .pill-row, .solace-page .todo-row { display: flex; flex-wrap: wrap; gap: 8px; }
.solace-page .pill  {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 6px 10px;
  font-size: 11px; letter-spacing: 0.06em;
  background: rgba(237, 244, 250, 0.06); color: #99a8b8; font-weight: 650;
}
.solace-page .pill b  { color: #edf4fa; font-weight: 750; }
.solace-page .meter { height: 6px; background: rgba(237,244,250,0.08); border-radius: 999px; margin-top: 8px; overflow: hidden; }
.solace-page .meter i { display: block; height: 100%; background: #72d9f8; }
.solace-page .compare { display: flex; flex-direction: column; gap: 10px; }
.solace-page .compare-row .meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; margin-bottom: 4px; font-weight: 650; }
.solace-page .delta { font-family: "Oswald", sans-serif; font-size: 28px; font-weight: 700; margin-top: 10px; }
.solace-page .delta.neg { color: #ff3d4f; }
.solace-page .delta.pos { color: #22e07a; }

.solace-cast  {
  margin: 0 0 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.solace-cast .cast-label  {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #99a8b8;
  font-weight: 750;
  margin-right: 4px;
}
.solace-cast .btn,
.solace-page button.btn  {
  appearance: none;
  border: 1px solid rgba(114, 217, 248, 0.22);
  background: #0d131c;
  color: #edf4fa;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.06em;
  padding: 0 16px;
  height: 48px;
  border-radius: 14px;
  cursor: pointer;
}
.solace-page button.btn.primary  { background: #72d9f8; color: #0b1018; border-color: transparent; }
.solace-page button.btn.confirm  { background: #c6f581; color: #0b1018; border-color: transparent; }
.solace-page button.btn:active  { transform: scale(0.98); }
.solace-cast-msg  {
  flex-basis: 100%;
  font-size: 12px;
  color: #99a8b8;
  min-height: 1.2em;
}
.solace-cast-msg.ready  { color: #c6f581; }
.solace-cast-msg.err  { color: #ff3d4f; }

.solace-error  {
  max-width: 640px; margin: 40px auto;
  background: rgba(18, 26, 37, 0.9);
  border: 1px solid rgba(255, 61, 79, 0.3);
  border-radius: 22px; padding: 24px;
}
.solace-error h1  { font-family: "Oswald", sans-serif; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 8px; }
.solace-foot  {
  margin-top: 28px;
  color: #6e7c8c;
  font-size: 11px;
  letter-spacing: 0.04em;
  line-height: 1.5;
}

@media (orientation: portrait), (max-width: 900px) {
.solace-page .grid-2, .solace-page .chart-row, .solace-page .action-grid, .solace-page .products, .solace-page .orders { grid-template-columns: 1fr; }
.solace-page .status-grid, .solace-page .finance-grid { grid-template-columns: 1fr 1fr; }
.solace-page .big-metric { font-size: 36px; }
  .solace-top  { align-items: flex-start; }
}
@media (orientation: landscape) and (max-height: 800px) {
  .solace-app  { padding-top: calc(8px + env(safe-area-inset-top, 0px)); }
  .solace-brand h1  { font-size: 20px; }
.solace-page .big-metric { font-size: 34px; }
.solace-page .donut { width: 200px; height: 200px; }
}

/* ---------- TV page (16:9, 1920x1080) ---------- */
html.solace-tv,  body.solace-tv  {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden;
  background: #000;
  color: #f4f7fb;
  font-family: "Montserrat", "Helvetica Neue", sans-serif;
  font-weight: 650;
}
body.solace-tv  {
  width: 1920px;
  height: 1080px;
  background:
    radial-gradient(1200px 600px at 12% -10%, rgba(114, 217, 248, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(254, 44, 85, 0.10), transparent 50%),
    #070b10;
}
.tv-stage  {
  width: 1920px;
  height: 1080px;
  padding: 36px 64px 24px;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  gap: 16px;
  animation: solace-drift 180s ease-in-out infinite;
}
@keyframes solace-drift {
.solace-page 0%, .solace-page 100% { transform: translate(0, 0); }
.solace-page 25% { transform: translate(6px, 4px); }
.solace-page 50% { transform: translate(-4px, 6px); }
.solace-page 75% { transform: translate(5px, -5px); }
}
@media (prefers-reduced-motion: reduce) {
  .tv-stage  { animation: none; }
}
.tv-head  {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.tv-head h1  {
  font-family: "Oswald", sans-serif;
  font-size: 64px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0;
  line-height: 0.95;
}
.tv-head .kicker  {
  color: #72d9f8;
  font-size: 16px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 750;
  margin-bottom: 6px;
}
.tv-meta  { text-align: right; }
.tv-clock  {
  font-family: "Oswald", sans-serif;
  font-size: 56px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
  line-height: 1;
}
.tv-asof  { color: #b8c4d0; font-size: 20px; margin-top: 8px; letter-spacing: 0.04em; }
.tv-asof.warn  { color: #ffc44d; }

.tv-kpis  {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.tv-kpi  {
  background: linear-gradient(180deg, rgba(18, 26, 37, 0.88), rgba(13, 19, 28, 0.92));
  border: 1px solid rgba(114, 217, 248, 0.18);
  border-radius: 24px;
  padding: 16px 22px 14px;
  min-width: 0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 16px 32px rgba(0,0,0,0.35);
}
.tv-kpi .lbl  {
  font-size: 16px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b8c4d0;
  font-weight: 750;
}
.tv-kpi .val  {
  font-family: "Oswald", sans-serif;
  font-size: 64px;
  font-weight: 700;
  line-height: 1;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
}
.tv-kpi .hint  { color: #99a8b8; font-size: 16px; margin-top: 8px; }
.tv-kpi.accent .val  { color: #72d9f8; }
.tv-kpi.pink .val  { color: #ff6b8a; }
.tv-kpi.ok .val  { color: #3ee07a; }
.tv-kpi.amber .val  { color: #ffc44d; }

.tv-mid  {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr 0.9fr;
  gap: 18px;
  min-height: 0;
  overflow: hidden;
}
.tv-card  {
  background: linear-gradient(180deg, rgba(18, 26, 37, 0.88), rgba(13, 19, 28, 0.92));
  border: 1px solid rgba(114, 217, 248, 0.16);
  border-radius: 24px;
  padding: 18px 22px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  display: flex;
  flex-direction: column;
}
.tv-card h2  {
  font-family: "Oswald", sans-serif;
  font-size: 22px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 14px;
}
.tv-donut-row  { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: center; flex: 1; }
.tv-donut  { position: relative; width: 250px; height: 250px; }
.tv-donut svg  { width: 100%; height: 100%; transform: rotate(-90deg); }
.tv-legend .legend-item  { margin-bottom: 10px; }
.tv-legend .name  { font-size: 18px; }
.tv-legend .amt  { font-size: 20px; }
.tv-status  {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
}
.tv-stat  {
  background: rgba(7, 11, 16, 0.45);
  border-radius: 16px;
  padding: 14px 16px;
}
.tv-stat .v  { font-family: "Oswald", sans-serif; font-size: 36px; font-weight: 700; line-height: 1; }
.tv-stat .l  { font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; color: #b8c4d0; margin-top: 4px; font-weight: 750; }
.tv-badge  {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; padding: 6px 12px;
  font-size: 14px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 750;
  margin-bottom: 12px;
}
.tv-badge.ok  { background: rgba(34, 224, 122, 0.16); color: #3ee07a; }
.tv-badge.alert  { background: rgba(255, 61, 79, 0.18); color: #ff5a6a; }
.tv-foot  {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #8a97a6;
  font-size: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Shared chart bits on the TV page (scoped separately from the iPad page). */
.solace-tv .donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
}
.solace-tv .donut-center .amt { font-family: "Oswald", sans-serif; font-size: 28px; font-weight: 700; line-height: 1.1; color: #fff; }
.solace-tv .donut-center .lbl { color: #b8c4d0; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 4px; font-weight: 650; }
.solace-tv .legend { display: flex; flex-direction: column; gap: 12px; }
.solace-tv .legend-item { display: grid; grid-template-columns: 14px 1fr auto; gap: 12px; align-items: center; }
.solace-tv .swatch { width: 14px; height: 14px; border-radius: 4px; display: block; }
.solace-tv .legend-item .name { font-size: 18px; font-weight: 700; }
.solace-tv .legend-item .amt { font-size: 20px; font-variant-numeric: tabular-nums; font-weight: 750; text-align: right; }
.solace-tv .legend-item .pct { display: block; color: #b8c4d0; font-size: 14px; font-weight: 650; }

/* ---------------- Dashboard row (4 tiles) — Demo Home room tabs + Overview screens ---------------- */
/* 5-tile Dashboards row — Concept C2 (full-bleed live motifs)
   Name + subtitle live in a bottom scrim. Motion is phase-locked to
   wall-clock via --quad-phase so panel re-renders do not restart it. */
.quad-bar  { margin: 0 0 12px; border-radius: 18px; transition: box-shadow .4s ease; scroll-margin-top: 12px; --quad-phase: 0ms; }
.quad-bar.quad-flash  { animation: quadFlash 2.2s ease; }
@keyframes quadFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(114,217,248,0); }
  15%, 60% { box-shadow: 0 0 0 3px rgba(114,217,248,.55), 0 0 28px rgba(114,217,248,.35); }
}
.quad-head  {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin: 0 4px 10px; font-family: "Montserrat","Helvetica Neue",sans-serif;
  font-size: 10px; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; color: var(--muted, #99a8b8);
}
.quad-head .quad-where  { letter-spacing: .08em; text-transform: none; font-weight: 600; font-size: 11px; opacity: .85; text-align: right; }
.quad-row  { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.quad-row.three  { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.quad-tile  {
  position: relative; min-width: 0; height: 152px;
  border-radius: 17px;
  background: #0d1520;
  border: 1px solid rgba(237,244,250,.10);
  box-shadow: inset 0 1px 0 rgba(237,244,250,.08), 0 10px 24px rgba(0,0,0,.32), 0 2px 6px rgba(0,0,0,.18);
  overflow: hidden;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .22s cubic-bezier(.2,.8,.2,1), border-color .22s cubic-bezier(.2,.8,.2,1);
}
.quad-tile:hover {
  transform: translateY(-2px);
  border-color: rgba(237,244,250,.16);
  box-shadow: inset 0 1px 0 rgba(237,244,250,.12), 0 16px 28px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.18);
}
.quad-tile:active  { transform: scale(0.985); }
.quad-tile.on-tv, .quad-tile.screen.live  {
  border-color: rgba(114,217,248,.55);
  box-shadow:
    inset 0 1px 0 rgba(237,244,250,.10),
    0 0 0 1px rgba(114,217,248,.30),
    0 0 28px rgba(114,217,248,.30),
    0 10px 24px rgba(0,0,0,.32);
}
.quad-tile.on-tv:hover, .quad-tile.screen.live:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 1px 0 rgba(237,244,250,.12),
    0 0 0 1px rgba(114,217,248,.4),
    0 0 34px rgba(114,217,248,.38),
    0 16px 28px rgba(0,0,0,.4);
}
.quad-tile.pending  { border-color: rgba(255, 196, 92, 0.75); }

.quad-main  {
  appearance: none; -webkit-appearance: none;
  position: absolute; inset: 0;
  display: block; width: 100%; height: 100%;
  min-height: 0; padding: 0; margin: 0; box-sizing: border-box;
  border: 0; background: none; color: var(--text, #edf4fa);
  text-align: left; cursor: pointer; font: inherit;
  -webkit-tap-highlight-color: transparent; -webkit-touch-callout: none;
  user-select: none; -webkit-user-select: none;
}
.quad-bleed { position: absolute; inset: 0; overflow: hidden; border-radius: inherit; pointer-events: none; }
.quad-scrim {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; pointer-events: none;
  padding: 32px 10px 11px;
  background: linear-gradient(180deg, rgba(6,10,16,0) 0%, rgba(6,10,16,.72) 48%, rgba(6,10,16,.94) 100%);
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.quad-name  {
  font-family: "Oswald", "Montserrat", sans-serif;
  font-size: 13.5px; font-weight: 750; letter-spacing: .055em; text-transform: uppercase;
  color: var(--text, #edf4fa); line-height: 1.1;
  text-shadow: 0 1px 4px rgba(0,0,0,.45);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.quad-sub  {
  margin: 0;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; font-weight: 500; color: var(--muted, #99a8b8); letter-spacing: .01em;
  text-shadow: 0 1px 4px rgba(0,0,0,.45);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.quad-tile.on-tv .quad-sub, .quad-tile.screen.live .quad-sub  { color: #72d9f8; }
.quad-dot  { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; background: #99a8b8; }
.quad-tile.screen.live .quad-dot  { background: #44e3a0; box-shadow: 0 0 8px rgba(68,227,160,.7); }
.quad-tile.screen.off .quad-dot  { background: #4b5866; }
.quad-tile.screen.off .quad-name  { opacity: .9; }

.quad-open  {
  position: absolute; top: 6px; right: 6px; z-index: 6;
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center; appearance: none; -webkit-appearance: none; padding: 0;
  border: 0; background: rgba(6,10,16,.4); color: #edf4fa; opacity: .85;
  box-shadow: 0 1px 4px rgba(0,0,0,.35);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.quad-open svg  { width: 15px; height: 15px; }
.quad-open:active  { background: rgba(114,217,248,.18); color: #edf4fa; opacity: 1; }

.quad-badge {
  position: absolute; top: 8px; left: 8px; z-index: 6;
  display: flex; align-items: center; gap: 5px;
  font-size: 8.5px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase;
  color: #072028; background: #72d9f8;
  padding: 2px 6px 2px 5px; border-radius: 999px;
  box-shadow: 0 0 10px rgba(114,217,248,.45);
  pointer-events: none;
}
.quad-badge i {
  width: 5px; height: 5px; border-radius: 50%; background: #072028;
  animation: quad-livepulse 1.6s ease-out infinite;
  animation-delay: var(--quad-phase, 0ms);
}
@keyframes quad-livepulse {
  0%{box-shadow:0 0 0 0 rgba(7,32,40,.45)}
  70%{box-shadow:0 0 0 5px rgba(7,32,40,0)}
  100%{box-shadow:0 0 0 0 rgba(7,32,40,0)}
}

.quad-confirm  {
  margin-top: 9px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  padding: 10px 12px; border-radius: 14px; border: 1px solid rgba(255,196,92,.35);
  background: linear-gradient(135deg, rgba(40,32,18,.72), rgba(18,22,30,.78)); color: var(--text, #edf4fa);
  font-size: 13px; line-height: 1.3;
}
.quad-would  { flex: 1 1 260px; min-width: 0; }
.quad-actions  { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.quad-btn  {
  appearance: none; -webkit-appearance: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; padding: 0 14px; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; font-size: 13px;
  border: 1px solid rgba(237,244,250,.16); background: rgba(237,244,250,.06); color: var(--text, #edf4fa);
}
.quad-btn svg  { width: 17px; height: 17px; }
.quad-btn.primary  { background: linear-gradient(135deg, #72d9f8, #3a7bd5); color: #08111b; border-color: transparent; }
.quad-btn[disabled]  { opacity: .5; }

/* ---- Solace Living ---- */
.quad-bleed.w-solace {
  background: radial-gradient(ellipse at 50% 28%, #fbf6ee 0%, #e8dcc8 55%, #c9b898 100%);
}
.quad-logo-glow {
  position: absolute; left: 50%; top: 38%; width: 130px; height: 90px; margin: -45px 0 0 -65px;
  background: radial-gradient(circle, rgba(176,196,140,.45), transparent 70%);
  filter: blur(8px); pointer-events: none;
}
.quad-mark {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%,-54%);
  width: 72%; height: auto; display: block;
  filter: drop-shadow(0 4px 8px rgba(80,60,30,.18));
}
.quad-shimmer {
  position: absolute; inset: -40%; z-index: 3; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0) 44%, rgba(255,255,255,.75) 50%, rgba(255,240,200,.28) 54%, transparent 62%);
  animation: quad-shimmer 3.2s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
  mix-blend-mode: overlay;
}
@keyframes quad-shimmer {
  0%,28%{transform:translateX(-70%);opacity:0}
  42%{opacity:1}
  70%,100%{transform:translateX(70%);opacity:0}
}
.quad-dust { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 2; }
.quad-dust i { position: absolute; width: 2.5px; height: 2.5px; border-radius: 50%; background: rgba(180,150,80,.75); animation: quad-dust 3.2s ease-in-out infinite; }
.quad-dust i:nth-child(1){left:18%;top:58%;animation-delay:calc(var(--quad-phase, 0ms) + .2s)}
.quad-dust i:nth-child(2){left:62%;top:22%;animation-delay:calc(var(--quad-phase, 0ms) + .8s)}
.quad-dust i:nth-child(3){left:78%;top:48%;animation-delay:calc(var(--quad-phase, 0ms) + 1.4s)}
.quad-dust i:nth-child(4){left:36%;top:30%;animation-delay:calc(var(--quad-phase, 0ms) + 1.9s)}
.quad-dust i:nth-child(5){left:50%;top:62%;animation-delay:calc(var(--quad-phase, 0ms) + 1.1s)}
@keyframes quad-dust{0%,100%{opacity:0;transform:translateY(0)}40%{opacity:.85;transform:translateY(-10px)}80%{opacity:0;transform:translateY(-18px)}}

/* ---- Tradezella ---- */
.quad-bleed.w-trade {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(90,60,180,.28), transparent 50%),
    linear-gradient(180deg,#16122a 0%,#0c0a16 100%);
}
.quad-tz-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(114,217,248,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114,217,248,.05) 1px, transparent 1px);
  background-size: 22px 18px;
  mask-image: linear-gradient(180deg,#000 0%,#000 60%,transparent 90%);
  -webkit-mask-image: linear-gradient(180deg,#000 0%,#000 60%,transparent 90%);
  opacity: .7;
}
.quad-tz-mark { position: absolute; right: -8px; top: 4px; width: 96px; height: 96px; opacity: .22; pointer-events: none; }
.quad-tz-mark img { width: 100%; height: 100%; object-fit: contain; }
.quad-pnl {
  position: absolute; top: 10px; left: 10px; z-index: 3;
  font-size: 15px; font-weight: 750; letter-spacing: .01em; color: #44e3a0;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(68,227,160,.35);
}
.quad-pnl.neg { color: #ff8b9a; text-shadow: 0 0 12px rgba(255,139,154,.35); }
.quad-pnl em {
  font-style: normal; display: block; margin-bottom: 1px;
  font-size: 8px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #99a8b8; text-shadow: none;
}
.quad-spark { position: absolute; left: 0; right: 0; top: 36px; height: 86px; z-index: 2; }
.quad-spark svg { width: 100%; height: 100%; display: block; overflow: visible; }
.quad-spark path.line {
  fill: none; stroke: #44e3a0; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 420; stroke-dashoffset: 420;
  animation: quad-draw 3.6s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
  filter: drop-shadow(0 0 4px rgba(68,227,160,.55));
}
.quad-spark.neg path.line { stroke: #ff8b9a; filter: drop-shadow(0 0 4px rgba(255,139,154,.55)); }
.quad-spark path.area { fill: url(#quad-spfill); opacity: 0; animation: quad-areain 3.6s ease-in-out infinite; animation-delay: var(--quad-phase, 0ms); }
@keyframes quad-draw {
  0%{stroke-dashoffset:420}
  38%{stroke-dashoffset:0}
  82%{stroke-dashoffset:0}
  100%{stroke-dashoffset:420}
}
@keyframes quad-areain {
  0%,8%{opacity:0}
  38%,82%{opacity:.95}
  100%{opacity:0}
}

/* ---- Demo Frame / photo caster ---- */
.quad-bleed.w-cast {
  container-type: inline-size;
  background:
    radial-gradient(ellipse at 72% 38%, rgba(58,123,213,.22), transparent 55%),
    radial-gradient(ellipse at 18% 50%, rgba(114,217,248,.08), transparent 45%),
    linear-gradient(180deg,#141a26 0%,#0a1018 100%);
}
/* Land the flyer on the TV screen at any tile width.
   Flyer rests at left:10 top:42 size 36x21 (center 28, 52.5).
   Default TV: right 8 / top 14 / width 122, bezel 4px, screen 114x64.125
   → screen center = (100cqi - 69, 50.06); translate = (100cqi - 97, -2.4).
   Scale fills the 16:9 screen. */
.quad-bleed.w-cast .quad-flyer {
  --fly-tx: calc(100cqi - 97px);
  --fly-ty: -2.4px;
  --fly-sx: 3.167;
  --fly-sy: 3.054;
}
.quad-cast-beam {
  position: absolute; left: 28px; top: 18px; width: 92px; height: 70px; pointer-events: none; z-index: 2;
  opacity: .55;
}
.quad-cast-beam path.flow {
  stroke: #72d9f8; stroke-width: 1.4; fill: none; stroke-dasharray: 3 5;
  animation: quad-beamdash 1.2s linear infinite;
  animation-delay: var(--quad-phase, 0ms);
  opacity: .75;
}
.quad-cast-beam path.glow {
  stroke: rgba(114,217,248,.28); stroke-width: 6; fill: none; filter: blur(2px);
  animation: quad-beamop 1.8s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
}
@keyframes quad-beamdash { to { stroke-dashoffset: -32; } }
@keyframes quad-beamop { 0%,100%{opacity:.25} 50%{opacity:.6} }

.quad-phone {
  position: absolute; left: 9px; top: 34px; width: 28px; height: 50px; z-index: 4;
  border-radius: 6px; padding: 4px 2.5px 3px;
  background: linear-gradient(160deg,#4a5564,#1a1e26 55%,#0e1116);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 6px 14px rgba(0,0,0,.45);
}
.quad-phone::before {
  content: ""; position: absolute; left: 50%; top: 2px; width: 8px; height: 1.5px; margin-left: -4px;
  border-radius: 1px; background: rgba(255,255,255,.22);
}
.quad-phone-screen { position: relative; width: 100%; height: 100%; border-radius: 2.5px; overflow: hidden; background: #0a0c10; }
.quad-phone-screen img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
  animation: quad-phsrc 5.4s linear infinite;
}
/* Same tiger on every slot — keep it visible on the phone for the whole cast. */
.quad-bleed.w-cast .quad-phone-screen img:nth-child(1){ opacity: 1; animation: none; }
.quad-bleed.w-cast .quad-phone-screen img:nth-child(n+2){ display: none; }
.quad-phone-screen img:nth-child(1){ animation-delay: var(--quad-phase, 0ms); opacity: 1; }
.quad-phone-screen img:nth-child(2){ animation-delay: calc(var(--quad-phase, 0ms) + 1.8s); }
.quad-phone-screen img:nth-child(3){ animation-delay: calc(var(--quad-phase, 0ms) + 3.6s); }
@keyframes quad-phsrc {
  0%,30%{opacity:1}
  36%,100%{opacity:0}
}

.quad-airplay {
  position: absolute; left: 40px; top: 22px; width: 22px; height: 22px; z-index: 4;
  color: #72d9f8; filter: drop-shadow(0 0 6px rgba(114,217,248,.65));
  animation: quad-apulse 1.8s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
}
.quad-airplay svg { width: 100%; height: 100%; display: block; }
@keyframes quad-apulse { 0%,100%{opacity:.7;transform:scale(1)} 50%{opacity:1;transform:scale(1.08)} }

.quad-flyer {
  position: absolute; left: 10px; top: 42px; width: 36px; height: 21px; z-index: 5;
  border-radius: 3px; overflow: hidden;
  box-shadow: 0 8px 18px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.2), 0 0 12px rgba(114,217,248,.55);
  opacity: 0; transform-origin: center center;
  animation: quad-fly 5.4s cubic-bezier(.2,.7,.2,1) infinite;
}
.quad-flyer img { width: 100%; height: 100%; object-fit: cover; display: block; }
.quad-flyer.f1 { animation-delay: var(--quad-phase, 0ms); }
.quad-flyer.f2 { animation-delay: calc(var(--quad-phase, 0ms) + 1.8s); }
.quad-flyer.f3 { animation-delay: calc(var(--quad-phase, 0ms) + 3.6s); }
/* One tiger, one flight — extra copies would stack and look static. */
.quad-bleed.w-cast .quad-flyer.f2,
.quad-bleed.w-cast .quad-flyer.f3 { display: none; }
@keyframes quad-fly {
  0%,3%{transform:translate(0px,8px) scale(.85) rotate(-12deg);opacity:0}
  7%{transform:translate(2px,4px) scale(1.05) rotate(-8deg);opacity:1}
  22%{transform:translate(calc(var(--fly-tx, 116px) * 0.45), -10px) scale(1.18) rotate(-3deg);opacity:1}
  30%{transform:translate(calc(var(--fly-tx, 116px) * 0.80), -4px) scale(1.28) rotate(0deg);opacity:1}
  38%{transform:translate(var(--fly-tx, 116px), var(--fly-ty, 0px)) scale(var(--fly-sx, 3.2), var(--fly-sy, 3.2)) rotate(0deg);opacity:1;border-radius:2px}
  44%{transform:translate(var(--fly-tx, 116px), var(--fly-ty, 0px)) scale(var(--fly-sx, 3.2), var(--fly-sy, 3.2)) rotate(0deg);opacity:0;border-radius:2px}
  100%{transform:translate(var(--fly-tx, 116px), var(--fly-ty, 0px)) scale(var(--fly-sx, 3.2), var(--fly-sy, 3.2));opacity:0}
}

.quad-tv {
  position: absolute; right: 8px; top: 14px; width: 122px; z-index: 3;
  animation: quad-tvpulse 5.4s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
}
@keyframes quad-tvpulse {
  0%,3%,8%,36%,44%,73%,82%,100%{filter:drop-shadow(0 0 0 rgba(114,217,248,0))}
  5%{filter:drop-shadow(0 0 10px rgba(114,217,248,.55))}
  38%,40%{filter:drop-shadow(0 0 10px rgba(114,217,248,.55))}
  76%,78%{filter:drop-shadow(0 0 10px rgba(114,217,248,.55))}
}
.quad-tv-bezel {
  background: linear-gradient(160deg,#4a5564,#1c2128 42%,#0c0e12);
  border-radius: 5px; padding: 4px 4px 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 0 1px rgba(255,255,255,.06), 0 8px 16px rgba(0,0,0,.45);
}
.quad-tv-screen { position: relative; aspect-ratio: 16/9; border-radius: 2px; overflow: hidden; background: #07090c; }
.quad-tv-screen img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
}
.quad-tv-screen img.l1 { animation: quad-tv1 5.4s linear infinite; animation-delay: var(--quad-phase, 0ms); }
.quad-tv-screen img.l2 { animation: quad-tv2 5.4s linear infinite; animation-delay: var(--quad-phase, 0ms); }
.quad-tv-screen img.l3 { animation: quad-tv3 5.4s linear infinite; animation-delay: var(--quad-phase, 0ms); }
/* Hold the tiger on the TV after it lands; stay lit into the next flight so
   mid-cast frames show phone + flyer + TV together. */
.quad-bleed.w-cast .quad-tv-screen img.l2,
.quad-bleed.w-cast .quad-tv-screen img.l3 { display: none; animation: none; }
.quad-bleed.w-cast .quad-tv-screen img.l1 {
  animation: quad-tv-cast 5.4s linear infinite;
  animation-delay: var(--quad-phase, 0ms);
}
@keyframes quad-tv-cast {
  0%, 32%{opacity:1}
  35%{opacity:.25}
  38%, 100%{opacity:1}
}
@keyframes quad-tv1 {
  0%,37%{opacity:0}
  39%,70%{opacity:1}
  74%,100%{opacity:0}
}
@keyframes quad-tv2 {
  0%,5%{opacity:1}
  9%,72%{opacity:0}
  75%,100%{opacity:1}
}
@keyframes quad-tv3 {
  0%,37%{opacity:1}
  41%,100%{opacity:0}
}
.quad-tv-flash {
  position: absolute; inset: 0; background: rgba(200,230,255,.7); opacity: 0; pointer-events: none;
  animation: quad-flash 5.4s ease-out infinite;
  animation-delay: var(--quad-phase, 0ms);
}
@keyframes quad-flash {
  0%,3%,8%,36%,44%,73%,82%{opacity:0}
  5%{opacity:.4}
  38%{opacity:.45}
  76%{opacity:.45}
}
.quad-bleed.w-cast .quad-tv-flash {
  animation-name: quad-flash-cast;
}
@keyframes quad-flash-cast {
  0%, 34%, 46%, 100%{opacity:0}
  38%{opacity:.5}
}
.quad-tv-led { position: absolute; bottom: 2px; left: 50%; width: 3px; height: 3px; margin-left: -1.5px; border-radius: 50%; background: #44e3a0; box-shadow: 0 0 4px #44e3a0; opacity: .8; }
.quad-tv-neck { width: 22px; height: 5px; margin: 2px auto 0; background: linear-gradient(#2a3038,#14181e); border-radius: 0 0 1px 1px; }
.quad-tv-base { width: 44px; height: 3px; margin: 0 auto; background: #1a1e24; border-radius: 2px; box-shadow: 0 2px 4px rgba(0,0,0,.4); }

/* Idle TV motif used by Overview screens when nothing is cast */
.quad-bleed.w-screen {
  background:
    radial-gradient(ellipse at 50% 30%, rgba(58,123,213,.16), transparent 55%),
    linear-gradient(180deg,#141a26 0%,#0a1018 100%);
}
/* Status / Screens — room-specific C2 atmospheres (phase-locked via --quad-phase) */
.quad-bleed.w-screen.w-living {
  background:
    radial-gradient(ellipse at 16% 30%, rgba(255,180,90,.16), transparent 42%),
    radial-gradient(ellipse at 88% 20%, rgba(114,217,248,.10), transparent 46%),
    linear-gradient(160deg, #161820 0%, #0c1016 55%, #080a0e 100%);
}
.quad-bleed.w-screen.w-office {
  background:
    radial-gradient(ellipse at 80% 18%, rgba(160,200,255,.16), transparent 44%),
    radial-gradient(ellipse at 12% 70%, rgba(80,110,160,.14), transparent 50%),
    linear-gradient(160deg, #141a24 0%, #0b1018 58%, #070a10 100%);
}
.quad-bleed.w-screen.w-bedroom {
  background:
    radial-gradient(ellipse at 20% 24%, rgba(255,160,120,.18), transparent 44%),
    radial-gradient(ellipse at 86% 70%, rgba(120,70,140,.16), transparent 50%),
    linear-gradient(160deg, #1a1418 0%, #100c12 55%, #0a080c 100%);
}
.quad-bleed.w-screen .scr-orbs i {
  position: absolute; border-radius: 50%; filter: blur(8px);
  animation: scrDrift 18s ease-in-out infinite alternate;
  animation-delay: var(--quad-phase, 0ms);
  pointer-events: none;
}
.w-living .scr-orbs i:first-child { width: 160px; height: 160px; left: -50px; top: -40px; background: rgba(255,170,80,.22); }
.w-living .scr-orbs i:last-child { width: 140px; height: 140px; right: -40px; bottom: 10px; background: rgba(114,217,248,.10); animation-name: scrDrift2; }
.w-office .scr-orbs i:first-child { width: 170px; height: 170px; left: -40px; top: -50px; background: rgba(140,180,255,.18); }
.w-office .scr-orbs i:last-child { width: 130px; height: 130px; right: -30px; bottom: 0; background: rgba(90,130,200,.12); animation-name: scrDrift2; }
.w-bedroom .scr-orbs i:first-child { width: 180px; height: 180px; left: -50px; top: -40px; background: rgba(255,140,100,.20); }
.w-bedroom .scr-orbs i:last-child { width: 150px; height: 150px; right: -40px; bottom: -10px; background: rgba(160,80,160,.14); animation-name: scrDrift2; }
.quad-bleed.w-screen .quad-tv {
  right: 50%; top: 14px; width: 132px; margin-right: -66px;
  animation: scrTvFloat 7s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
}
.quad-tile.screen.live .quad-tv,
.quad-bleed.w-screen.is-on .quad-tv {
  filter: drop-shadow(0 0 14px rgba(114,217,248,.35));
}
.quad-bleed.w-screen.is-on .quad-tv-screen,
.quad-tile.screen.live .w-screen .quad-tv-screen {
  background: linear-gradient(160deg, rgba(114,217,248,.18), rgba(20,30,40,.9) 60%, #07090c);
  animation: scrScreenGlow 4s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
}
.quad-tile.screen.off .quad-tv-led {
  background: #c44; box-shadow: 0 0 6px rgba(200,60,60,.45); opacity: .85;
}
.quad-tile.screen.off .quad-tv-screen { background: #07080b; }
@keyframes scrDrift { from { transform: translate(0,0); } to { transform: translate(16px,10px); } }
@keyframes scrDrift2 { from { transform: translate(0,0); } to { transform: translate(-14px,8px); } }
@keyframes scrTvFloat { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-3px)} }
@keyframes scrScreenGlow { 0%,100%{opacity:.85} 50%{opacity:1} }


/* ---- Dog Cam ---- */
.quad-bleed.w-cam { background: #0a0d10; }
.quad-cam-view { position: absolute; inset: 0; }
.quad-cam-view img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: contrast(1.08) saturate(.65) brightness(1.18);
  animation: quad-camdrift 6s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
  transform: scale(1.08);
}
@keyframes quad-camdrift { 0%,100%{transform:scale(1.06) translate(0,0)} 50%{transform:scale(1.14) translate(1.6%,-1.2%)} }
.quad-noise {
  position: absolute; inset: -20%; opacity: .22; pointer-events: none; mix-blend-mode: overlay; z-index: 2;
  background-size: 80px 80px;
  animation: quad-noiseshift .35s steps(3) infinite;
  animation-delay: var(--quad-phase, 0ms);
}
@keyframes quad-noiseshift { to { transform: translate(8px,-6px); } }
.quad-scanlines {
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(180deg, transparent 0 2px, rgba(0,0,0,.18) 2px 3px);
  opacity: .32;
}
.quad-scanbar {
  position: absolute; left: 0; right: 0; height: 14px; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg,transparent,rgba(114,217,248,.2),transparent);
  animation: quad-scanbar 2.8s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
}
@keyframes quad-scanbar { 0%{top:-14px;opacity:0} 12%{opacity:1} 100%{top:100%;opacity:0} }
.quad-recbadge {
  position: absolute; top: 28px; left: 8px; z-index: 6;
  display: flex; align-items: center; gap: 4px;
  font-size: 8px; font-weight: 800; letter-spacing: .14em; color: #fff;
  background: rgba(0,0,0,.5); padding: 2px 6px 2px 5px; border-radius: 4px;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.quad-tile.on-tv .quad-recbadge { top: 30px; }
.quad-recbadge i { width: 5px; height: 5px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 5px #ff3b3b; animation: quad-rec 1s ease-in-out infinite; animation-delay: var(--quad-phase, 0ms); }
@keyframes quad-rec { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ---- Good Morning ---- */
.quad-bleed.w-gm { background: #141a28; overflow: hidden; }
.quad-gm-sky {
  position: absolute; inset: 0;
  background: linear-gradient(180deg,#1a2744 0%,#3a3a6a 28%,#c46a48 52%,#f0b060 68%,#3a2418 68%);
  animation: quad-sky 5.6s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
}
@keyframes quad-sky { 0%,100%{filter:saturate(.8) brightness(.72)} 50%{filter:saturate(1.15) brightness(1.08)} }
.quad-gm-rays {
  position: absolute; left: 50%; top: 42%; width: 220px; height: 220px; margin: -110px 0 0 -110px;
  background: repeating-conic-gradient(from 0deg, rgba(255,220,150,0) 0 14deg, rgba(255,230,170,.42) 14deg 15.2deg, rgba(255,220,150,0) 15.2deg 30deg);
  animation: quad-rayspin 16s linear infinite, quad-rayop 5.6s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms), var(--quad-phase, 0ms);
  mix-blend-mode: screen; pointer-events: none;
}
@keyframes quad-rayspin { to { transform: rotate(360deg); } }
@keyframes quad-rayop { 0%,100%{opacity:.25} 50%{opacity:.85} }
.quad-gm-sun {
  position: absolute; left: 50%; width: 36px; height: 36px; margin-left: -18px; bottom: 48px; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #fff8d8, #ffd56a 42%, #ff8a2a 80%);
  box-shadow: 0 0 18px 8px rgba(255,170,50,.55), 0 0 40px 14px rgba(255,120,40,.28);
  animation: quad-rise 5.6s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
  z-index: 2;
}
@keyframes quad-rise {
  0%,100%{transform:translate(-58px, 28px) scale(.85);filter:brightness(.75)}
  50%{transform:translate(58px, -22px) scale(1.08);filter:brightness(1.12)}
}
.quad-gm-arc {
  position: absolute; left: 6px; right: 6px; top: 8px; height: 100px; z-index: 2; pointer-events: none;
}
.quad-gm-arc svg { width: 100%; height: 100%; display: block; overflow: visible; }
.quad-gm-arc path.arc-live {
  animation: quad-arcdraw 5.6s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
}
.quad-horizon {
  position: absolute; left: 0; right: 0; bottom: 0; height: 42%; z-index: 3;
  background: linear-gradient(180deg,#3a2416 0%,#1a100c 100%);
  clip-path: polygon(0 42%, 14% 28%, 28% 46%, 46% 22%, 62% 40%, 78% 24%, 100% 38%, 100% 100%, 0 100%);
  box-shadow: 0 -10px 18px rgba(255,140,40,.12);
}
.quad-tod {
  position: absolute; top: 10px; left: 0; right: 0; text-align: center; z-index: 4;
  font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #f0c48a;
  animation: quad-todfade 5.6s ease-in-out infinite;
  animation-delay: var(--quad-phase, 0ms);
}
@keyframes quad-todfade { 0%,100%{opacity:.55} 50%{opacity:1;color:#ffe2b0} }
@keyframes quad-arcdraw { 0%,100%{stroke-dashoffset:210} 50%{stroke-dashoffset:16} }

@media (max-width: 900px), (orientation: portrait) {
  .quad-row  { gap: 8px; }
  .quad-tile { height: 128px; }
  .quad-name { font-size: 12px; letter-spacing: .03em; }
  .quad-sub  { font-size: 10px; }
  .quad-open { top: 5px; right: 5px; width: 26px; height: 26px; }
  .quad-head .quad-where { font-size: 10px; }
  .quad-tv { width: 100px; right: 4px; top: 10px; }
  .quad-flyer { transform-origin: center center; }
  /* Compact TV: right 4 / top 10 / width 100, screen 92x51.75
     → screen center = (100cqi - 54, 39.88); translate = (100cqi - 82, -12.6). */
  .quad-bleed.w-cast .quad-flyer {
    --fly-tx: calc(100cqi - 82px);
    --fly-ty: -12.6px;
    --fly-sx: 2.556;
    --fly-sy: 2.464;
  }
  .quad-pnl { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  .quad-bar *, .quad-bar *::before, .quad-bar *::after {
    animation: none !important;
    transition: none !important;
  }
  .quad-bleed.w-screen .quad-tv { transform: none; }
  .quad-spark path.line { stroke-dashoffset: 0; }
  .quad-spark path.area { opacity: .95; }
  .quad-flyer { display: none; }
  .quad-tv-screen img.l1 { opacity: 1; }
  .quad-phone-screen img:nth-child(1) { opacity: 1; }
  .quad-cam-view img { transform: scale(1.06); }
  .quad-gm-sun { transform: translate(20px,-10px); }
  .quad-tile:hover, .quad-tile.on-tv:hover, .quad-tile.screen.live:hover { transform: none; }
}


/* ---------- TV fit (2026-11-14): fixed 1920x1080 stage scaled to the viewport + TV safe area ---------- */
html.solace-tv, body.solace-tv { width: 100vw; height: 100vh; overflow: hidden; }
body.solace-tv { width: 100vw; height: 100vh; }
.tv-fit {
  position: fixed; left: 0; top: 0;
  width: 1920px; height: 1080px;
  transform-origin: 0 0;
  overflow: hidden;
}
/* ~4.5% left/right, ~5% top/bottom: clear of LG overscan even with "Just Scan" off. */
.solace-tv .tv-stage { padding: 54px 86px 46px; gap: 14px; animation: none; }
/* Readability at couch distance: nothing under 16px on the 1920 stage. */
.solace-tv .tv-kpi .lbl { font-size: 16px; }
.solace-tv .tv-kpi .hint { font-size: 17px; }
.solace-tv .tv-stat .l { font-size: 15px; }
.solace-tv .donut-center .lbl { font-size: 15px; }
.solace-tv .legend-item .pct { font-size: 15px; }
.solace-tv .tv-foot { font-size: 17px; }
.solace-tv .tv-donut { width: 230px; height: 230px; }
.solace-tv .tv-donut-row { grid-template-columns: 240px 1fr; }
