:root {
  --bg: #0a0a0c;
  --s1: #121216;
  --s2: #18181d;
  --s3: #202027;
  --line: #24242b;
  --line2: #30303a;
  --text: #ededf1;
  --muted: #8b8b96;
  --dim: #5d5d68;
  --accent: #ff7a1a;
  --accent-2: #ffa25c;
  --accent-bg: rgba(255, 122, 26, .1);
  --live: #ff3b47;
  --live-bg: rgba(255, 59, 71, .12);
  --ok: #34d17c;
  --ok-bg: rgba(52, 209, 124, .1);
  --warn: #f5b83d;
  --bad: #ff5a64;
  --r: 10px;
  --r-s: 7px;
  --mono: ui-monospace, "Cascadia Mono", "JetBrains Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.i { flex: none; display: block; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
.offscreen { position: fixed; left: -9999px; opacity: 0; }

.label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--accent);
  display: grid;
  place-items: center;
  flex: none;
  color: #1a0b02;
}
.logo-text { font-weight: 750; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: var(--s3);
  color: var(--muted);
  white-space: nowrap;
  flex: none;
  border-radius: 6px;
}
.badge.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.badge.live { background: var(--live); color: #fff; }
.badge.live::before { background: #fff; opacity: 1; animation: pulse 1.6s ease-in-out infinite; }
.badge.off { background: transparent; border: 1px dashed var(--line2); color: var(--dim); }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.bad { background: var(--live-bg); color: var(--bad); }
.badge.big { height: 34px; padding: 0 14px; font-size: 13px; }

@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 122, 26, .25); } 50% { box-shadow: 0 0 0 12px rgba(255, 122, 26, 0); } }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: var(--r-s);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn-primary { background: var(--accent); color: #1a0b02; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: var(--s2); border-color: var(--line2); color: var(--text); }
.btn-ghost:hover { border-color: #44444f; background: var(--s3); }
.btn-danger { background: #3a1216; border-color: #6b2229; color: #ffb3b7; }
.btn-danger:hover { background: #4a161b; }
.btn-icon { width: 42px; padding: 0; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }

.card {
  background: var(--s1);
  border: 1px solid var(--line);
  border-radius: var(--r);
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 9px; }
.card-head h2 .i { color: var(--accent); }
.card-body { padding: 18px; }
.card-body.tight { padding: 10px 18px; }
.card.danger { border-color: #4a1d22; }
.card.danger .card-head h2 .i { color: var(--bad); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-top .i { color: var(--dim); }
.kpi-val { font-size: 30px; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-val small { font-size: 15px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.kpi-sub { font-size: 12px; color: var(--muted); }


.spark { width: 100%; height: 40px; display: block; overflow: visible; }
.spark-line { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linejoin: round; }
.spark-area { fill: var(--accent); opacity: .1; }
.spark.blue .spark-line { stroke: #6ea8ff; }
.spark.blue .spark-area { fill: #6ea8ff; }
.spark.tall { height: 80px; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field.accent .field-label { color: var(--accent-2); }
.field-main {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line2);
  border-radius: var(--r-s);
  background: #0c0c0f;
  overflow: hidden;
  min-height: 44px;
}
.field.accent .field-main { border-color: #5a3519; background: #110c08; }
.field-val {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  font: 13px/1.45 var(--mono);
  overflow-wrap: anywhere;
  word-break: break-all;
}
.field-val.masked { letter-spacing: .1em; color: var(--muted); }
.field-btns { display: flex; flex: none; }
.field-btn {
  width: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-left: 1px solid var(--line2);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
}
.field-btn:hover { color: var(--text); background: var(--s2); }
.field-btn.on { color: var(--accent); }
.fields { display: flex; flex-direction: column; gap: 14px; }

.input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-s);
  border: 1px solid var(--line2);
  background: #0c0c0f;
  font-size: 15px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.input::placeholder { color: var(--dim); }
.form { display: flex; flex-direction: column; gap: 14px; }
.form label.f { display: flex; flex-direction: column; gap: 6px; }
.form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-msg { min-height: 20px; font-size: 13px; color: var(--bad); }

.switch { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 42px; height: 24px; border-radius: 12px; background: #34343d; position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #d8d8de; transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .track { outline: 2px solid #fff; outline-offset: 2px; }
.switch input:disabled + .track { opacity: .4; }
.switch-text { display: flex; flex-direction: column; }
.switch-text small { color: var(--muted); font-size: 12px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line2);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chip .n { font-variant-numeric: tabular-nums; color: var(--dim); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip.on .n { color: #555; }

.evs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.ev { display: grid; grid-template-columns: 10px 1fr auto; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ev:last-child { border-bottom: 0; }
.ev-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); transform: translateY(-1px); }
.ev-live .ev-dot { background: var(--live); }
.ev-bad .ev-dot { background: var(--bad); }
.ev-warn .ev-dot { background: var(--warn); }
.ev-info .ev-dot { background: var(--accent); }
.ev-text { min-width: 0; overflow-wrap: anywhere; }
.ev-time { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.empty-note { color: var(--muted); font-size: 14px; padding: 18px 0; text-align: center; }

.player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--r);
  overflow: hidden;
  isolation: isolate;
}
.player video { width: 100%; height: 100%; display: block; background: #000; }
.cover {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
  background: #08080a;
}
.cover-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.cover-ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid var(--line2);
  color: var(--dim);
  margin-bottom: 8px;
}
.player.loading .cover-ring { border-color: transparent; border-top-color: var(--accent); animation: spin 1s linear infinite; color: var(--accent); }
.player.loading .cover-ring .i { animation: spin 1s linear infinite reverse; }
.cover-title { font-size: clamp(16px, 2.6vw, 22px); font-weight: 700; }
.cover-sub { color: var(--muted); font-size: 14px; max-width: 380px; }
.player.compact .cover-title { font-size: 16px; }
.player.compact .cover-sub { font-size: 13px; }
.unmute {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  min-height: 42px;
  border: 0;
  border-radius: var(--r-s);
  background: rgba(10, 10, 12, .78);
  backdrop-filter: blur(6px);
  color: #fff;
  font-weight: 650;
  cursor: pointer;
}
.bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 22px 10px 8px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .8));
  opacity: 0;
  transition: opacity .2s;
}
.player:hover .bar, .player.show .bar, .bar:focus-within { opacity: 1; }
.player.idle .bar { display: none; }
.ico { width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: var(--r-s); background: transparent; color: #fff; cursor: pointer; }
.ico:hover { background: rgba(255, 255, 255, .12); }
.vol { width: 90px; accent-color: var(--accent); }
.lat { margin-left: auto; min-width: 0; color: #ddd; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.live-btn { flex: none; border: 0; border-radius: 6px; padding: 0 10px; height: 30px; font-size: 12px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; }
.live-btn.at { background: var(--live); }

.dlg {
  border: 1px solid var(--line2);
  border-radius: 14px;
  background: var(--s1);
  color: var(--text);
  padding: 0;
  width: min(440px, calc(100vw - 32px));
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.dlg::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(3px); }
.dlg-body { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.dlg-body h3 { font-size: 18px; }
.dlg-body p { margin: 0; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.dlg-wide { width: min(560px, calc(100vw - 32px)); }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  background: #26262e;
  border: 1px solid var(--line2);
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 550;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  z-index: 100;
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: #1f6b43; }
.toast.bad { border-color: #6b2229; }

.shell { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: #0d0d10;
}
.side .logo { padding: 2px 6px 18px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: var(--r-s);
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.nav a:hover { color: var(--text); background: var(--s1); }
.nav a.on { color: var(--text); background: var(--s2); box-shadow: inset 2px 0 0 var(--accent); }
.nav a.on .i { color: var(--accent); }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 750; background: var(--live); color: #fff; border-radius: 999px; padding: 1px 7px; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.srv-state { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); }
.srv-state .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.srv-state.down .dot { background: var(--bad); box-shadow: 0 0 0 3px var(--live-bg); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  padding: 10px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 12, .88);
  backdrop-filter: blur(10px);
}
.topbar h1 { font-size: 19px; font-weight: 750; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar h1 span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .actions { display: flex; gap: 8px; flex: none; }
.content { padding: 24px 28px 60px; display: flex; flex-direction: column; gap: 18px; max-width: 1400px; width: 100%; }
.warnbar { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-s); background: #22170c; border: 1px solid #5a3b17; color: #ffd6a6; font-size: 14px; }
.warnbar .i { color: var(--warn); margin-top: 1px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; }
.back-link:hover { color: var(--text); }

.livecards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.livecard { display: flex; flex-direction: column; gap: 10px; padding: 16px; text-decoration: none; }
.livecard:hover { border-color: var(--live); }
.livecard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.livecard-name { font-size: 17px; font-weight: 720; overflow-wrap: anywhere; }
.livecard-title { font-size: 13px; color: var(--muted); margin-top: -6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.livecard-stats { display: flex; gap: 14px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.livecard-stats span { display: inline-flex; align-items: center; gap: 5px; }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search { position: relative; flex: 1 1 240px; max-width: 360px; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); }
.search .input { padding-left: 38px; }

.table { display: flex; flex-direction: column; }
.trow {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 190px minmax(0, 1fr) 96px;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--s2); }
.trow.off { opacity: .55; }
.thead { cursor: default; padding-top: 10px; padding-bottom: 10px; }
.thead:hover { background: transparent; }
.tname { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  flex: none;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 15px;
  background: var(--s3);
  color: var(--muted);
  position: relative;
}
.avatar.live { background: var(--live-bg); color: var(--live); }
.avatar.live::after { content: ""; position: absolute; right: -2px; top: -2px; width: 10px; height: 10px; border-radius: 50%; background: var(--live); border: 2px solid var(--s1); }
.tname-text { min-width: 0; }
.tname-text b { display: block; font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tname-text small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tnum { font-variant-numeric: tabular-nums; font-size: 14px; }
.tnum small { color: var(--muted); font-size: 12px; display: block; }
.tspark .spark { height: 30px; }
.tact { display: flex; gap: 6px; justify-content: flex-end; }

.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(420px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.auth-card h1 { font-size: 22px; }
.auth-card .logo { margin-bottom: 4px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); cursor: pointer; min-height: 32px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

.info-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0; font-size: 14px; }
.info-list dt { color: var(--muted); }
.info-list dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.statgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border-radius: var(--r-s); overflow: hidden; border: 1px solid var(--line); }
.statgrid > div { background: var(--s1); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.statgrid b { font-size: 18px; font-weight: 720; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.p-top {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px max(24px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 12, .88);
  backdrop-filter: blur(10px);
}
.p-wrap { max-width: 1280px; margin: 0 auto; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.p-hero { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 18px; align-items: stretch; }
.p-id { display: flex; flex-direction: column; gap: 4px; }
.p-id h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.p-tag { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.p-tag .i { color: var(--accent); }
.p-state { display: flex; flex-direction: column; }
.p-state .card-body { display: flex; flex-direction: column; gap: 16px; flex: 1; }
.state-hero { display: flex; align-items: center; gap: 14px; }
.state-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--s3); color: var(--muted); }
.state-hero.waiting .state-icon { color: var(--accent); background: var(--accent-bg); }
.state-hero.on .state-icon { background: var(--live); color: #fff; }
.state-hero h2 { font-size: 18px; font-weight: 750; }
.state-hero p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.chart-box { display: flex; flex-direction: column; gap: 6px; }
.chart-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; color: var(--muted); }
.chart-head b { color: var(--text); font-size: 13px; font-variant-numeric: tabular-nums; }
.stab { font-weight: 700; }
.stab.stable { color: var(--ok); }
.stab.unstable { color: var(--warn); }
.stab.noSignal { color: var(--dim); }

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; counter-reset: s; }
.steps > li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: start; counter-increment: s; }
.steps > li::before {
  content: counter(s);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  background: var(--accent-bg);
  color: var(--accent-2);
  border: 1px solid #5a3519;
}
.step-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding-top: 4px; }
.step-body > b { font-size: 14px; font-weight: 650; }
.step-body > small { color: var(--muted); font-size: 13px; margin-top: -6px; }
.rec { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
.rec dt { color: var(--muted); }
.rec dd { margin: 0; font-family: var(--mono); font-size: 12.5px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row > .btn { flex: 1 1 auto; }

.site-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px max(24px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); }
.site-wrap { max-width: 1280px; margin: 0 auto; padding: 28px 24px 60px; display: flex; flex-direction: column; gap: 22px; }
.site-hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-hero h1 { font-size: clamp(26px, 4vw, 40px); font-weight: 820; letter-spacing: -.03em; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.tile {
  display: flex;
  flex-direction: column;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--s1);
  text-decoration: none;
  overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.tile:hover { border-color: var(--line2); transform: translateY(-2px); }
.tile.is-live { border-color: #45262a; }
.tile.is-live:hover { border-color: var(--live); }
.tile-screen {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  position: relative;
  background:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .02) 0 1px, transparent 1px 4px),
    #0b0b0e;
  border-bottom: 1px solid var(--line);
}
.tile.is-live .tile-screen { background: #120c0d; }
.tile-initial { font-size: 54px; font-weight: 850; letter-spacing: -.04em; color: #1f1f26; }
.tile.is-live .tile-initial { color: rgba(255, 59, 71, .35); }
.tile-screen .badge { position: absolute; left: 12px; top: 12px; }
.tile-viewers { position: absolute; right: 12px; top: 12px; display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: rgba(0, 0, 0, .6); }
.tile-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 2px; }
.tile-name { font-size: 17px; font-weight: 720; overflow-wrap: anywhere; }
.tile-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.w-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; max-width: 1560px; margin: 0 auto; padding: 18px 24px 40px; }
.w-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 0 4px; }
.w-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; overflow-wrap: anywhere; }
.w-head p { margin: 2px 0 0; color: var(--muted); }
.w-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; margin-top: 12px; }
.w-meta span { display: inline-flex; align-items: center; gap: 6px; }
.w-meta b { color: var(--text); font-weight: 650; }
.mini-list { display: flex; flex-direction: column; }
.mini-list a { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.mini-list a:last-child { border-bottom: 0; }
.mini-list .avatar { width: 34px; height: 34px; font-size: 13px; }

.center-msg { max-width: 460px; margin: 18vh auto 0; padding: 0 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; color: var(--muted); }
.center-msg .state-icon { width: 60px; height: 60px; }

body.embed .site-top, body.embed .w-head, body.embed .w-side, body.embed .w-meta { display: none !important; }
body.embed .w-wrap { display: block; padding: 0; max-width: none; }
body.embed .player { border-radius: 0; aspect-ratio: auto; height: 100vh; }


.m0 { margin: 0; }
.pt0 { padding-top: 0 !important; }
.flex-none { flex: none !important; }
.nowrap { flex-wrap: nowrap !important; }
.center { text-align: center; }
.m-in { margin: 10px auto !important; }
.stack-s { display: flex; flex-direction: column; gap: 10px; }
.stack-s:empty { display: none; }
.label.accent { color: var(--accent-2); }
.badge.sm { height: 20px; padding: 0 8px; font-size: 10.5px; }
.badge.sm::before { width: 5px; height: 5px; }
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 15px; }
.code-input { font: 600 22px/1 var(--mono); letter-spacing: .35em; text-align: center; }
.creds { margin: 0; padding: 14px; border-radius: var(--r-s); background: #0c0c0f; border: 1px solid #5a3519; font: 14px/1.7 var(--mono); white-space: pre-wrap; word-break: break-all; color: var(--accent-2); }
.dlg-sec { padding-top: 6px; border-top: 1px solid var(--line); }
.dlg-sec:first-child { border-top: 0; padding-top: 0; }
.fold > summary { list-style: none; display: inline-flex; }
.fold > summary::-webkit-details-marker { display: none; }
.fold[open] > summary { margin-bottom: 14px; }
.btn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.acc-head { display: flex; align-items: center; gap: 12px; }
.avatar.ok { background: var(--ok-bg); color: var(--ok); }
.sess-list { display: flex; flex-direction: column; }
.sess { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.sess:last-child { border-bottom: 0; }
.qr-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.qr { width: 180px; height: 180px; border-radius: 10px; flex: none; }
.secret { font: 600 14px/1.6 var(--mono); letter-spacing: .06em; padding: 10px 12px; border-radius: var(--r-s); background: #0c0c0f; border: 1px solid var(--line2); word-break: break-all; max-width: 260px; }
.state-hero.on-ok .state-icon { background: var(--ok-bg); color: var(--ok); }
.count.warn { background: var(--warn); color: #1a1000; }
.side-who { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 0 4px; }
.side-who .i { color: var(--accent); }
.nav-ext { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); text-decoration: none; padding: 6px 4px; }
.nav-ext:hover { color: var(--text); }
.p-id-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.who { display: inline-flex; align-items: center; gap: 6px; }
.auth-foot { display: flex; justify-content: center; padding-top: 4px; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 14px; }

.site-top { position: sticky; top: 0; z-index: 10; background: rgba(10, 10, 12, .88); backdrop-filter: blur(10px); }
.site-nav { display: flex; gap: 4px; margin-right: auto; margin-left: 18px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 12px; border-radius: var(--r-s); }
.site-nav a:hover { color: var(--text); background: var(--s1); }
.site-actions { display: flex; align-items: center; gap: 8px; flex: none; min-height: 34px; }
.btn-icon-s { width: 34px; padding: 0; }
.hero { border-bottom: 1px solid var(--line); }
.hero-inner { max-width: 1280px; margin: 0 auto; padding: 72px 24px 64px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr); gap: 40px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.hero-title { font-size: clamp(36px, 6vw, 68px); font-weight: 850; letter-spacing: -.035em; line-height: 1.02; }
.hero-text { margin: 0; font-size: clamp(16px, 1.6vw, 19px); color: #b9b9c2; max-width: 560px; }
.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

.hero-live-list { display: flex; flex-direction: column; }
.hero-live { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.hero-live:last-child { border-bottom: 0; }
.hero-live:hover b { color: var(--accent-2); }
.hero-live-v { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.sec-head { display: flex; flex-direction: column; gap: 6px; }
.sec-head h2 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; letter-spacing: -.02em; }
.sec-head p { margin: 0; max-width: 640px; }
.feats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; }
.feat, .how > li { padding: 18px 0 0; display: flex; flex-direction: column; gap: 6px; border-top: 2px solid var(--line2); }
.feat:hover, .how > li:hover { border-top-color: var(--accent); }
.feat h3, .how h3 { font-size: 16px; font-weight: 720; }
.feat p, .how p { margin: 0; color: var(--muted); font-size: 14px; }
.feat-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-bg); color: var(--accent-2); border: 1px solid #4b2a14; margin-bottom: 4px; }
.how { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; counter-reset: h; }
.how > li { position: relative; counter-increment: h; }
.how > li::before { content: counter(h) "."; font: 700 14px/1 var(--mono); color: var(--accent-2); }
.site-foot { max-width: 1280px; margin: 0 auto; padding: 24px; display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.site-foot a { text-decoration: none; }


.card-head h2 .i { display: none; }
.card-head { padding: 13px 18px; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 4px; font-size: 12px; font-weight: 600; background: var(--s3); color: #b4b4bd; white-space: nowrap; }
.tag.live { background: var(--live); color: #fff; }
.tag.bad { background: #3a1519; color: #ff9aa0; }
.tag.ok { background: #12301f; color: #5be39a; }
.tag.warn { background: #33270f; color: #f5c66b; }
.tag-box { display: inline-flex; }
.link { color: var(--muted); text-decoration: none; font-weight: 600; }
.link:hover { color: var(--text); text-decoration: underline; }
.linkish { background: none; border: 0; padding: 0; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.danger-text { color: #ff9aa0; }
.btn-col { display: flex; flex-direction: column; gap: 8px; }
.btn-col .btn { justify-content: flex-start; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.tab-body { display: flex; flex-direction: column; gap: 18px; }
.as-banner { background: #33270f; color: #f5c66b; border-bottom: 1px solid #5a4417; padding: 9px 24px; font-size: 14px; font-weight: 600; }
.trow.compact { grid-template-columns: minmax(0, 1.5fr) auto minmax(0, 1fr); }
.live-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) 90px 110px; }
.dlg-sec { display: flex; flex-direction: column; gap: 2px; }
.dlg-sec b { font-size: 14px; }
select.input { appearance: auto; }
.side-who .tag { height: 18px; font-size: 11px; }

.tabbar { display: none; }
.show-s { display: none; }

@media (max-width: 1100px) {
  .hero-inner { grid-template-columns: 1fr; padding: 48px 24px; }
  .feats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid2, .p-hero { grid-template-columns: 1fr; }
  .trow { grid-template-columns: minmax(0, 2fr) 90px minmax(0, 1fr) auto; }
  .trow .tspark { display: none; }
  .w-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { padding: 10px 16px; min-height: 58px; }
  .topbar h1 { font-size: 17px; }
  .content { padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); gap: 14px; }
  .tabbar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(13, 13, 16, .96);
    backdrop-filter: blur(10px);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 3px; min-height: 52px; justify-content: center; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: 11px; font-weight: 650; position: relative; }
  .tabbar a.on { color: var(--text); }
  .tabbar a.on .i { color: var(--accent); }
  .tabbar .count { position: absolute; top: 4px; left: calc(50% + 6px); font-size: 10px; font-weight: 800; background: var(--live); color: #fff; border-radius: 999px; padding: 0 5px; }
  .kpi { padding: 14px; }
  .kpi-val { font-size: 24px; }
  .card-head { padding: 12px 14px; }
  .card-body { padding: 14px; }
  .card-body.tight { padding: 6px 14px; }
  .trow { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px 14px; }
  .trow .tnum.hide-s, .thead { display: none; }
  .trow .tact { display: none; }
  .search { max-width: none; }
  .form .row2 { grid-template-columns: 1fr; }
  .statgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .p-wrap { padding: 14px; gap: 14px; }
  .p-id h1 { font-size: 22px; }
  .p-top { padding: 10px 14px; }
  .site-wrap { padding: 20px 14px 40px; }
  .site-top { padding: 12px 14px; }
  .w-wrap { padding: 0 0 30px; gap: 14px; }
  .w-main .player { border-radius: 0; }
  .w-head, .w-meta, .w-side { padding-left: 14px; padding-right: 14px; }
  .vol { display: none; }
  .lat { display: none; }
  .bar { opacity: 1; }
  .ev { grid-template-columns: 10px 1fr; }
  .ev-time { grid-column: 2; margin-top: -6px; }
  .dlg-actions { flex-direction: column-reverse; }
  .dlg-actions .btn { width: 100%; }
  .hide-s { display: none !important; }
  .trow.compact { grid-template-columns: minmax(0, 1fr) auto; }
  .live-row { grid-template-columns: minmax(0, 1fr) auto; }
  .live-row .tspark { display: none; }
  .as-banner { padding: 9px 14px; }
  .tabs a { padding: 10px 11px; }
  .site-nav { display: none; }
  .feats, .how { grid-template-columns: 1fr; }
  .hero-inner { padding: 32px 14px 36px; gap: 22px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .btn-grid { grid-template-columns: 1fr; }
  .qr { width: 160px; height: 160px; }
  .site-foot { padding: 18px 14px; }
  .show-s { display: inline; }
  .topbar .actions .btn { padding: 0 12px; }
  .topbar { flex-wrap: wrap; }
  .topbar .actions.wide { width: 100%; }
  .topbar .actions.wide .btn { flex: 1 1 0; min-width: 0; padding: 4px 8px; white-space: normal; line-height: 1.2; font-size: 13px; text-align: center; }
  .topbar .actions.wide .btn .i { display: none; }
}
