:root {
  --bg: #07060f;
  --bg-warm: #12081c;
  --surface: rgba(18, 14, 36, 0.62);
  --surface-2: rgba(36, 24, 64, 0.72);
  --border: rgba(180, 160, 255, 0.22);
  --text: #f6f3ff;
  --muted: #b9aed8;
  --accent: #4dffc3;
  --accent-hover: #79ffd6;
  --accent-ink: #101018;
  --accent-dark: #4dffc3;
  --danger: #ff6b7a;
  --success: #4dffc3;
  --info: #c4b08a;
  --shadow: 0 18px 40px rgba(4, 0, 20, 0.45);
  --glow: rgba(77, 255, 195, 0.35);
  --blob-1: rgba(168, 85, 255, 0.55);
  --blob-2: rgba(0, 255, 200, 0.32);
  --blob-3: rgba(255, 60, 160, 0.38);
  --topbar-bg: rgba(8, 6, 18, 0.72);
  --glass: rgba(18, 14, 36, 0.62);
  --glass-border: rgba(180, 160, 255, 0.22);
  --radius: 22px;
  --font: "Segoe UI", "SF Pro Display", "Avenir Next", "Trebuchet MS", system-ui, -apple-system, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { color-scheme: dark; }
body {
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}
body.has-player { padding-bottom: 5.8rem; }

body::before,
body::after {
  content: "";
  position: fixed;
  inset: -18% -10%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(42rem 32rem at 15% 10%, var(--blob-1) 0%, transparent 58%),
    radial-gradient(36rem 30rem at 88% 8%, var(--blob-2) 0%, transparent 55%),
    radial-gradient(40rem 34rem at 70% 90%, var(--blob-3) 0%, transparent 60%),
    var(--bg);
  animation: mesh-shift 42s ease-in-out infinite alternate;
}
body::after {
  z-index: -1;
  inset: 0;
  background: none;
  animation: mesh-drift 36s ease-in-out infinite alternate;
  background:
    radial-gradient(28rem 24rem at 80% 60%, var(--blob-2) 0%, transparent 62%),
    radial-gradient(24rem 20rem at 10% 75%, var(--blob-3) 0%, transparent 64%);
  opacity: 0.85;
}
@keyframes mesh-shift {
  to { transform: translate3d(-3.5%, 2.5%, 0) scale(1.07); }
}
@keyframes mesh-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(3%, -3%, 0) scale(1.05); }
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video, iframe { max-width: 100%; height: auto; }
code {
  font-size: 0.9em;
  background: var(--surface-2);
  padding: 0.1em 0.35em;
  border-radius: 8px;
}

.sr-only, .visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.glass,
.auth-card, .panel, .callout, .empty, .upload-form, .viewer,
.settings-block, .music-card, .yt-card, .now-playing-card,
.folder-panel, .sidebar, .select-bar, .tile, .site-player {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}

.settings-block {
  scroll-margin-top: calc(5.5rem + env(safe-area-inset-top, 0px));
}
@media (max-width: 800px) {
  .settings-block {
    scroll-margin-top: calc(6.25rem + env(safe-area-inset-top, 0px));
  }
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 0.85rem;
  padding: 0.7rem 1.1rem;
  background: var(--topbar-bg);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border-bottom: 1px solid var(--glass-border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--text);
  font-weight: 750;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}
.brand img { border-radius: 8px; }
.brand:hover { text-decoration: none; color: var(--accent); }
.nav { display: flex; gap: 0.15rem 0.2rem; flex: 1 1 auto; flex-wrap: wrap; align-items: center; }
.nav-link, .nav-group-btn {
  color: var(--muted);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  position: relative;
  background: none;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.nav-link:hover, .nav-group-btn:hover, .nav-link:focus-visible, .nav-group-btn:focus-visible {
  color: var(--text);
  background: var(--glass);
  outline: none;
}
.nav-link.is-active, .nav-group.is-active > .nav-group-btn {
  color: var(--text);
}
.nav-link.is-active::after, .nav-group.is-active > .nav-group-btn::after {
  content: "";
  position: absolute;
  left: 0.65rem; right: 0.65rem; bottom: 0.15rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}
.nav-group-btn::after {
  content: "";
  display: inline-block;
  width: 0.35rem;
  height: 0.35rem;
  margin-left: 0.4rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  opacity: 0.7;
}
.nav-group.is-open > .nav-group-btn::after { transform: translateY(1px) rotate(-135deg); }
.nav-group { position: relative; }
.nav-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  left: 0;
  min-width: 13rem;
  padding: 0.35rem;
  background: linear-gradient(var(--surface-2), var(--surface-2)), var(--bg);
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.nav-menu[hidden] { display: none !important; }
.nav-item {
  color: var(--muted);
  font-weight: 650;
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 8px;
  display: block;
}
.nav-item:hover, .nav-item:focus-visible {
  color: var(--text);
  background: var(--glass);
  outline: none;
}
.nav-item.is-active {
  color: var(--text);
  background: var(--glass);
  box-shadow: inset 3px 0 0 var(--accent);
}
.nav-search { margin-left: auto; }
.nav-search input[type="search"] {
  width: min(18rem, 42vw);
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font: inherit;
}
.nav-search input:focus { outline: 2px solid var(--accent); border-color: transparent; }
.logout { margin-left: 0.3rem; }
.linkish {
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.linkish:hover { color: var(--text); text-decoration: underline; }
.linkish.danger { color: var(--danger); }

.page { width: min(1180px, calc(100% - 1.5rem)); margin: 1.25rem auto 3rem; }
.page-wide { width: min(1440px, calc(100% - 1.5rem)); }
.auth-page { display: grid; place-items: start center; padding-top: 9vh; }
.narrow { width: min(36rem, 100%); }

.auth-card { width: min(28rem, 100%); padding: 1.8rem 1.5rem 1.5rem; }
.auth-mark { text-align: center; margin-bottom: 1.25rem; }
.auth-mark img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  box-shadow: 0 0 0 4px var(--glass-border), 0 10px 30px var(--glow);
}
.auth-mark h1, .toolbar h1, .hero h1, .page-head h1, h1, h2 {
  margin: 0 0 0.35rem;
  letter-spacing: -0.04em;
  font-weight: 780;
}
h1 { font-size: clamp(1.7rem, 3vw, 2.35rem); }
h2 { font-size: 1.15rem; }
.auth-mark p, .muted { color: var(--muted); }
.fine { text-align: center; margin: 0.4rem 0 0; }
.greeting {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.045em;
  background: linear-gradient(120deg, var(--text) 0%, var(--accent) 140%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.page-head, .hero {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 1.3rem;
}
.hero p, .page-head p { margin: 0; color: var(--muted); }

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0 0 1.2rem;
}
.stat-chip {
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}
.stat-chip span { display: block; color: var(--muted); font-size: 0.8rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; }
.stat-chip strong { font-size: 1.25rem; letter-spacing: -0.03em; }

.admin-live { margin: 0 0 1.2rem; }
.admin-live h2 { margin: 0 0 0.75rem; font-size: 1.1rem; }
.admin-live-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.6rem;
  margin: 0 0 1rem;
}
.admin-live-online-title { margin: 0.4rem 0 0.5rem; font-size: 0.95rem; }
.admin-live-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.admin-live-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.admin-live-table th, .admin-live-table td {
  text-align: left;
  padding: 0.45rem 0.6rem;
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}
.admin-live-table th { color: var(--muted); font-weight: 650; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; }
.admin-live-table td:first-child { font-weight: 650; }
.admin-live-mac, .admin-live-ip { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }

@media (max-width: 1000px) {
  .admin-live-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .admin-live-table thead { display: none; }
  .admin-live-table, .admin-live-table tbody, .admin-live-table tr, .admin-live-table th, .admin-live-table td {
    display: block;
    width: 100%;
  }
  .admin-live-table tr {
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--glass-border);
  }
  .admin-live-table td {
    padding: 0.15rem 0;
    border: 0;
    white-space: normal;
    display: grid;
    grid-template-columns: 6.2rem minmax(0, 1fr);
    gap: 0.4rem;
    align-items: baseline;
  }
  .admin-live-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
  }
}
@media (max-width: 640px) {
  .admin-live-metrics { grid-template-columns: 1fr 1fr; }
}


.stack { display: grid; gap: 0.85rem; }
.split { display: grid; gap: 0.85rem; }
@media (min-width: 720px) {
  .split { grid-template-columns: 1fr 1fr; }
}

label { display: grid; gap: 0.35rem; font-weight: 600; font-size: 0.92rem; }
input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="search"], input[type="number"], textarea, select {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  font: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}
.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 600; }
.check input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 22px var(--glow);
}
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.wide { width: 100%; }
.btn.slim { padding: 0.4rem 0.75rem; font-size: 0.9rem; }

.flashes { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: 0.5rem; }
.flash {
  padding: 0.7rem 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.flash-success { border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.flash-error { border-color: var(--danger); background: rgba(80, 16, 24, 0.35); }
.flash-info { border-color: var(--border); }

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.tiles-list { grid-template-columns: 1fr; }
.tiles-compact { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.7rem; }
.tiles-compact .tile { min-height: 8.2rem; padding: 1rem; }
.tiles-list .tile { min-height: 0; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; padding: 1rem 1.2rem; }
.tiles-list .tile-icon { grid-row: 1 / span 2; }

.tile {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  min-height: 11.5rem;
  padding: 1.2rem 1.15rem 1.1rem;
  color: var(--text);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}
.tile::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  background: var(--tile-glow, var(--glow));
  opacity: 0.55;
  filter: blur(8px);
  z-index: -1;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
a.tile:hover, a.tile:focus-visible {
  text-decoration: none;
  transform: translateY(-7px) scale(1.02);
  box-shadow: var(--shadow), 0 0 36px var(--tile-glow, var(--glow));
  border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border));
}
a.tile:hover::before { transform: scale(1.35); opacity: 0.85; }
.tile-icon {
  font-size: 1.85rem;
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--tile-fill, color-mix(in srgb, var(--accent) 22%, transparent));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
  margin-bottom: 0.55rem;
}
.tile-title { font-weight: 750; font-size: 1.12rem; letter-spacing: -0.03em; }
.tile-sub { color: var(--muted); font-size: 0.9rem; }
.tile-status, .tile-install { min-height: 0; width: 100%; max-width: 100%; }
.tile-status, .tile-install { grid-column: 1 / span 2; }
@media (min-width: 900px) {
  .tiles:not(.tiles-list):not(.tiles-compact) .tile-status,
  .tiles:not(.tiles-list):not(.tiles-compact) .tile-install { grid-column: 1 / span 2; }
}

.tile[data-tile="photos"] { --tile-glow: rgba(168, 85, 255, 0.45); --tile-fill: rgba(168, 85, 255, 0.22); }
.tile[data-tile="films"] { --tile-glow: rgba(255, 138, 76, 0.45); --tile-fill: rgba(255, 138, 76, 0.22); }
.tile[data-tile="tv"] { --tile-glow: rgba(80, 160, 255, 0.45); --tile-fill: rgba(80, 160, 255, 0.22); }
.tile[data-tile="music"] { --tile-glow: rgba(255, 90, 180, 0.5); --tile-fill: rgba(255, 90, 180, 0.22); }
.tile[data-tile="youtube"] { --tile-glow: rgba(255, 70, 70, 0.45); --tile-fill: rgba(255, 70, 70, 0.2); }
.tile[data-tile="upload"] { --tile-glow: rgba(77, 255, 195, 0.4); --tile-fill: rgba(77, 255, 195, 0.18); }
.tile[data-tile="folders"] { --tile-glow: rgba(255, 200, 80, 0.4); --tile-fill: rgba(255, 200, 80, 0.18); }
.tile[data-tile="users"] { --tile-glow: rgba(80, 220, 255, 0.4); --tile-fill: rgba(80, 220, 255, 0.18); }
.tile[data-tile="settings"] { --tile-glow: rgba(180, 160, 255, 0.4); --tile-fill: rgba(180, 160, 255, 0.18); }
.tile[data-tile="install"] { --tile-glow: rgba(100, 210, 180, 0.35); --tile-fill: rgba(100, 210, 180, 0.16); }
.tile[data-tile="status"] { --tile-glow: rgba(160, 180, 255, 0.28); }

.now-playing-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  margin-bottom: 1rem;
  color: var(--text);
  text-decoration: none;
}
.now-playing-card:hover { text-decoration: none; border-color: var(--accent); }
.now-playing-card img, .now-playing-art {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  object-fit: cover;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}
.now-playing-card strong { display: block; letter-spacing: -0.03em; }
.now-pulse { color: var(--accent); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }

.stats { display: grid; gap: 0.45rem 1rem; margin: 0.7rem 0 0; min-width: 0; }
.stats div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 0.75rem; align-items: start; min-width: 0; }
.stats dt { color: var(--muted); font-weight: 600; min-width: 0; }
.stats dd { margin: 0; min-width: 0; overflow-wrap: anywhere; word-break: break-word; }
.inline-form { margin-top: 0.9rem; }

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.toolbar p { margin: 0; }
.toolbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.85rem;
}
.frame {
  display: block;
  aspect-ratio: 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
}
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame:hover { border-color: var(--accent); }
.no-thumb { display: grid; place-items: center; width: 100%; height: 100%; color: var(--muted); font-size: 1.6rem; }
.badge {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
}
.pager { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 1rem 0; align-items: center; }
.empty { padding: 2rem 1.2rem; text-align: center; }

.viewer { padding: 0.8rem; }
.viewer img, .viewer video { width: 100%; border-radius: 16px; background: #000; }
.viewer audio { width: 100%; margin-top: 0.6rem; }
.viewer figcaption { display: grid; gap: 0.15rem; padding: 0.7rem 0.2rem 0.2rem; }

.album-list, .tile-admin { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 0.55rem; }
.album-list a, .tile-admin li {
  display: flex;
  gap: 0.6rem;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
}
.album-list a { flex-direction: column; align-items: flex-start; }
.album-list a:hover { border-color: var(--accent); text-decoration: none; }

.row-form, .copy-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: end; }
.grow { flex: 1; min-width: 10rem; }
.icon-input { width: 4.5rem; }
.panel, .callout, .settings-block { padding: 1.2rem 1.15rem; margin-bottom: 1rem; }
.callout { border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.copy-row { margin-top: 0.7rem; }
.copy-row input { flex: 1; min-width: 12rem; }

.table-wrap { overflow-x: auto; }
table.users { width: 100%; border-collapse: collapse; }
table.users th, table.users td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
table.users th { color: var(--muted); font-size: 0.85rem; font-weight: 650; }
.actions { display: flex; flex-wrap: wrap; gap: 0.65rem; justify-content: flex-end; }

.drop {
  position: relative;
  display: grid;
  gap: 0.3rem;
  place-items: center;
  text-align: center;
  padding: 1.8rem 1rem;
  border: 1.5px dashed var(--glass-border);
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.drop.is-over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); transform: scale(1.01); }
.drop input { position: absolute; opacity: 0; width: 0; height: 0; }
.drop-title { font-weight: 750; font-size: 1.05rem; }
.file-list { list-style: none; padding: 0; margin: 0.6rem 0 0; text-align: left; width: min(100%, 28rem); color: var(--muted); }
.upload-form { padding: 1.1rem; display: grid; gap: 1rem; }

.library { display: grid; gap: 1rem; }
@media (min-width: 860px) {
  .library { grid-template-columns: 16.5rem 1fr; align-items: start; }
}
.sidebar, .folder-panel { padding: 0.9rem; }
.folder-panel { border: 0; padding: 0; background: none; box-shadow: none; backdrop-filter: none; }
.folder-panel summary { cursor: pointer; font-weight: 750; margin-bottom: 0.5rem; }
.tree, .tree ul { list-style: none; margin: 0; padding: 0 0 0 0.7rem; }
.tree { padding-left: 0; }
.tree a, .tree-all {
  display: block;
  color: var(--text);
  text-decoration: none;
  padding: 0.28rem 0.35rem;
  border-radius: 8px;
}
.tree a:hover, .tree-all:hover, .tree a.is-active, .tree-all.is-active {
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  color: var(--text);
}
.tree-all { margin-bottom: 0.35rem; }
.compact { margin-top: 0.9rem; }
.compact input { padding: 0.45rem 0.6rem; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 1.8rem; }

.select-bar {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
  padding: 0.7rem 0.9rem;
  margin: 0 0 0.8rem;
}
.select-bar label { font-weight: 600; font-size: 0.92rem; }
.select-bar select { min-width: 12rem; }
.grid li { position: relative; display: grid; gap: 0.3rem; }
.pick { position: absolute; top: 0.4rem; left: 0.4rem; z-index: 2; }
.pick-box { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.caption { font-size: 0.85rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.play-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: color-mix(in srgb, var(--accent) 90%, #000);
  color: var(--accent-ink);
  border-radius: 50%;
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  place-items: center;
  font-size: 1rem;
  pointer-events: none;
}
.grid-films .frame, .grid-tv .frame { aspect-ratio: 16 / 10; }

/* Settings */
.choice-row { display: flex; flex-wrap: wrap; gap: 0.8rem 1.1rem; border: 0; padding: 0; margin: 0 0 0.6rem; }
.choice-row legend, fieldset legend { font-weight: 750; margin-bottom: 0.4rem; }
fieldset { border: 0; padding: 0; margin: 0 0 0.9rem; }
.preset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0.7rem; }
.preset-card {
  display: grid;
  gap: 0.4rem;
  padding: 0.8rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  position: relative;
  overflow: hidden;
  min-height: 6.4rem;
}
.preset-card input { position: absolute; opacity: 0; }
.preset-card strong { position: relative; z-index: 1; }
.preset-card.is-on, .preset-card:has(input:checked) {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 50%, transparent);
}
.preset-neon { background: linear-gradient(145deg, #2a1050, #062820); }
.preset-sunset { background: linear-gradient(145deg, #4a1810, #7a3a10); }
.preset-ocean { background: linear-gradient(145deg, #073044, #0a5a58); }
.preset-candy { background: linear-gradient(145deg, #4a1038, #6a2060); color: #fff; }
.preset-minimal { background: linear-gradient(145deg, #f7efe3, #d7e6ea); color: #1d1914; }
.swatches { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.swatch { display: flex; align-items: center; gap: 0.35rem; }
.section-edit, .tile-edit-list li {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.55rem;
  align-items: end;
  margin-bottom: 0.7rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}
.tile-edit-list { list-style: none; padding: 0; margin: 0 0 0.8rem; }
.tile-edit-name { font-weight: 700; }

/* Music */
.music-tools { display: grid; gap: 1rem; margin-bottom: 1.2rem; align-items: start; }
@media (min-width: 800px) {
  .music-tools { grid-template-columns: 1.4fr 1fr; }
}
.music-search { display: flex; gap: 0.5rem; align-items: center; }
.music-search input { flex: 1; min-width: 0; }
.music-search .btn { flex-shrink: 0; align-self: center; }
.music-tools form:not(.music-search) { display: flex; flex-direction: column; gap: 0.7rem; }

.browse-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.4rem 0 0.8rem; }
.pill {
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--text);
  border-radius: 999px;
  padding: 0.28rem 0.75rem;
  font-weight: 650;
  text-decoration: none;
  font-size: 0.9rem;
}
.pill:hover, .pill.is-on { background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.track-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.35rem; }
.track {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.45rem 0.5rem;
  border-radius: 14px;
  color: var(--text);
}
.track:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.track img, .track-art {
  width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface-2);
  display: grid; place-items: center;
}
.play-btn {
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  width: 2.1rem; height: 2.1rem;
  border-radius: 50%;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 16px var(--glow);
}
.group-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.7rem; }
.group-card {
  padding: 0.9rem;
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  text-decoration: none;
}
.group-card:hover { border-color: var(--accent); text-decoration: none; }

/* YouTube */
.yt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.9rem; }
.yt-item { color: var(--text); text-decoration: none; display: grid; gap: 0.4rem; }
.yt-item:hover { text-decoration: none; color: var(--text); }
.yt-item img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 14px; border: 1px solid var(--glass-border); background: #111; }
.yt-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 18px;
  overflow: hidden;
  background: #000;
  margin-bottom: 1rem;
  border: 1px solid var(--glass-border);
}
.yt-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.banner-missing {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  border: 1px dashed var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  margin-bottom: 1rem;
}

/* Persistent player */
.site-player {
  position: fixed;
  left: 0.7rem;
  right: 0.7rem;
  bottom: 0.7rem;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto minmax(8rem, 1.6fr) auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.55rem 0.75rem;
  border-radius: 22px;
}
.site-player[hidden] { display: none !important; }
.player-art { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--surface-2); }
.player-meta { min-width: 0; }
.player-meta strong, .player-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player-controls, .player-extra { display: flex; gap: 0.25rem; align-items: center; }
.icon-btn {
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: lowercase;
  padding: 0.35rem 0.45rem;
  border-radius: 10px;
  cursor: pointer;
}
.icon-btn:hover, .icon-btn[aria-pressed="true"], .icon-btn.is-on { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.player-play { width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 1rem; }
.player-progress { display: flex; align-items: center; gap: 0.4rem; }
.player-progress input[type="range"] { flex: 1; accent-color: var(--accent); }
.player-queue {
  position: absolute;
  right: 0.6rem;
  bottom: calc(100% + 0.5rem);
  width: min(22rem, 80vw);
  max-height: 50vh;
  overflow: auto;
  padding: 0.8rem;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
}
.player-queue ol { margin: 0.4rem 0 0; padding-left: 1.2rem; }

@media (max-width: 800px) {
  .topbar { flex-wrap: wrap; }
  .nav { order: 3; width: 100%; }
  .nav-search { margin-left: 0; flex: 1; }
  .nav-search input[type="search"] { width: 100%; }
  .quick-stats { grid-template-columns: 1fr 1fr; }
  .site-player {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "art meta controls"
      "progress progress progress";
    left: 0.4rem; right: 0.4rem; bottom: 0.4rem;
  }
  .player-art { grid-area: art; }
  .player-meta { grid-area: meta; }
  .player-controls { grid-area: controls; }
  .player-progress { grid-area: progress; }
  .player-extra { display: none; }
  body.has-player { padding-bottom: 7.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none !important; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  a.tile:hover, a.tile:focus-visible { transform: none; }
}

/* Cameras */
.camera-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.camera-card, .camera-stage { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; color: inherit; cursor: pointer; touch-action: manipulation; }
.camera-poster, .camera-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.camera-video { opacity: 0; }
.camera-card.is-live .camera-video { opacity: 1; }
.camera-live { position: absolute; top: 0.6rem; left: 0.6rem; background: rgba(12, 10, 22, 0.78); color: var(--muted); font-size: 0.7rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.25rem 0.5rem; border-radius: 999px; z-index: 2; }
.camera-live.is-live, .camera-card.is-live .camera-live { background: #e23; color: #fff; }
.camera-poster.is-broken { display: none; }
.camera-name { position: absolute; left: 0.6rem; right: 0.6rem; bottom: 0.6rem; font-weight: 750; text-shadow: 0 1px 8px #000; }
.camera-lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(0,0,0,0.8); display: grid; place-items: center; padding: max(0.8rem, env(safe-area-inset-top)) max(0.8rem, env(safe-area-inset-right)) max(0.8rem, env(safe-area-inset-bottom)) max(0.8rem, env(safe-area-inset-left)); }
.camera-lightbox[hidden] { display: none !important; }
.camera-lightbox-inner { width: min(1100px, 100%); }
.camera-lightbox-bar { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; margin-bottom: 0.5rem; color: #fff; }
.camera-lightbox-video { width: 100%; max-height: 80dvh; background: #000; border-radius: 12px; }
.camera-admin-list, .nas-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.2rem; }
.camera-form .split { margin: 0; }
.camera-test-result.is-ok, .nas-test-result.is-ok { color: var(--success); }
.camera-test-result.is-bad, .nas-test-result.is-bad { color: var(--danger); }
.tile[data-tile="cameras"] { --tile-glow: rgba(255, 80, 80, 0.45); --tile-fill: rgba(255, 80, 80, 0.2); }
.tile[data-tile="my-videos"] { --tile-glow: rgba(255, 160, 80, 0.45); --tile-fill: rgba(255, 160, 80, 0.2); }
.tile[data-tile="my-files"] { --tile-glow: rgba(120, 200, 255, 0.4); --tile-fill: rgba(120, 200, 255, 0.18); }
.tile[data-tile="smarthome"] { --tile-glow: rgba(255, 220, 80, 0.45); --tile-fill: rgba(255, 220, 80, 0.18); }
.tile[data-tile="storage"] { --tile-glow: rgba(160, 255, 180, 0.4); --tile-fill: rgba(160, 255, 180, 0.16); }
.tile[data-tile="usage"] { --tile-glow: rgba(180, 140, 255, 0.4); --tile-fill: rgba(180, 140, 255, 0.18); }
.tile[data-tile="private"] { --tile-glow: rgba(255, 200, 80, 0.35); --tile-fill: rgba(255, 200, 80, 0.16); }
.tile[data-tile="recycle"] { --tile-glow: rgba(140, 200, 160, 0.35); }

/* Smart Home */
.device-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.8rem; }
.device-tile { padding: 1rem; border-radius: 18px; border: 1px solid var(--glass-border); background: var(--glass); display: grid; gap: 0.6rem; min-height: 8rem; }
.device-tile header { display: flex; justify-content: space-between; gap: 0.5rem; align-items: start; }
.device-tile .toggle.is-on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.setup-card ol { padding-left: 1.2rem; }
.pdf-frame { width: 100%; min-height: 70vh; border: 0; background: #111; border-radius: 12px; }
.text-preview { white-space: pre-wrap; overflow: auto; max-height: 70vh; padding: 1rem; border-radius: 12px; background: var(--surface-2); }

/* Usage */
.meter { height: 0.7rem; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 0.8rem 0 1.2rem; }
.meter > span { display: block; height: 100%; background: var(--accent); }
.usage-bars { list-style: none; padding: 0; margin: 0 0 1.2rem; display: grid; gap: 0.4rem; }
.usage-bars li { display: flex; justify-content: space-between; gap: 1rem; }
.bar-chart { display: flex; align-items: end; gap: 0.25rem; height: 8rem; margin: 1rem 0; }
.bar-chart .bar { flex: 1; background: var(--accent); min-height: 2px; border-radius: 4px 4px 0 0; position: relative; opacity: 0.85; }
.bar-chart .bar span { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); font-size: 0.65rem; color: var(--muted); margin-top: 0.2rem; }

/* NAS */
.nas-card { padding: 1rem; border-radius: 18px; border: 1px solid var(--glass-border); background: var(--glass); display: grid; gap: 0.5rem; }
.nas-card header { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }

/* Hamburger + mobile + safe areas */
.nav-toggle {
  display: none;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--glass-border);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
}
html { height: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
}
.topbar {
  padding-top: calc(0.7rem + env(safe-area-inset-top, 0px));
  padding-left: calc(1.1rem + env(safe-area-inset-left, 0px));
  padding-right: calc(1.1rem + env(safe-area-inset-right, 0px));
}
.page, .page-wide {
  width: min(1180px, calc(100% - 1.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
}
.auth-page { padding-top: max(9vh, calc(2rem + env(safe-area-inset-top, 0px))); }
.site-player {
  left: calc(0.7rem + env(safe-area-inset-left, 0px));
  right: calc(0.7rem + env(safe-area-inset-right, 0px));
  bottom: calc(0.7rem + env(safe-area-inset-bottom, 0px));
}
body.has-player { padding-bottom: calc(5.8rem + env(safe-area-inset-bottom, 0px)); }

input[type="text"], input[type="email"], input[type="password"], input[type="url"], input[type="search"], input[type="number"], textarea, select {
  font-size: 16px;
  min-height: 44px;
}
.btn { min-height: 44px; }
.btn.slim { min-height: 44px; }
.icon-btn { min-height: 44px; min-width: 44px; }
.nav a { min-height: 44px; display: inline-flex; align-items: center; padding: 0.5rem 0.4rem; }
.linkish { min-height: 44px; padding: 0.4rem 0.2rem; }
.pill { min-height: 44px; display: inline-flex; align-items: center; }
.tree a, .tree-all { min-height: 44px; display: flex; align-items: center; gap: 0.4rem; justify-content: space-between; }
.check input { width: 1.2rem; height: 1.2rem; min-width: 1.2rem; }
.pick-box { width: 1.25rem; height: 1.25rem; }

@media (max-width: 800px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; margin-left: auto; }
  .logout { order: 2; margin-left: 0; flex-shrink: 0; }
  .nav-search { order: 3; flex: 1 0 100%; width: 100%; margin: 0.1rem 0 0; }
  .nav-search input[type="search"] { width: 100%; max-width: none; }
  .nav {
    display: none;
    order: 5;
    flex: 1 0 100%;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.2rem 0 0.4rem;
  }
  body.nav-open .nav { display: flex; }
  .nav-link, .nav-group-btn {
    width: 100%;
    text-align: left;
    min-height: 44px;
    border-radius: 0;
    border-bottom: 1px solid var(--glass-border);
    display: inline-flex;
    align-items: center;
  }
  .nav-group { width: 100%; }
  .nav-menu {
    position: static;
    min-width: 0;
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    padding: 0 0 0.15rem 0.7rem;
  }
  .nav-item {
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    border-radius: 0;
  }
  .topbar { gap: 0.5rem; }
  .tiles, .tiles-compact { grid-template-columns: 1fr 1fr; }
  .tiles-list { grid-template-columns: 1fr; }
  .tile-status, .tile-install { grid-column: 1 / span 2; width: 100%; }
  .camera-grid, .device-grid { grid-template-columns: 1fr; }
  .bar-chart .bar span { display: none; }
  .site-player {
    left: calc(0.4rem + env(safe-area-inset-left, 0px));
    right: calc(0.4rem + env(safe-area-inset-right, 0px));
    bottom: calc(0.4rem + env(safe-area-inset-bottom, 0px));
  }
  body.has-player { padding-bottom: calc(7.2rem + env(safe-area-inset-bottom, 0px)); }
  .copy-row input, .select-bar select, .grow { min-width: 0; }
  table.users { font-size: 0.9rem; }
}

input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.65; }
code, pre { overflow-wrap: anywhere; word-break: break-word; }


/* Narrow phones: single-column cards, status rows stack.
   Avoids grid-column 1 / -1 (dropped by some engines) and fixed rem label columns
   that collapse the value to a few pixels when the card is half-width or text is enlarged. */
@media (max-width: 640px) {
  .tiles, .tiles-compact, .tiles-list { grid-template-columns: 1fr; }
  .tile-status, .tile-install { grid-column: auto; width: 100%; max-width: 100%; }
  .stats div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .page, .page-wide, .tiles, .tile, .stats, .now-playing-card { min-width: 0; max-width: 100%; }
  .now-playing-card > div { min-width: 0; }
  .grid, .yt-grid, .group-grid, .preset-grid { grid-template-columns: 1fr 1fr; }
  .section-edit, .tile-edit-list li { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  .grid, .yt-grid, .group-grid { grid-template-columns: 1fr; }
}

/* Two-step verification */
.twofactor-card { max-width: 28rem; margin: 0 auto; }
.twofactor-qr { display: flex; justify-content: center; margin: 1rem 0; }
.twofactor-qr img {
  width: 12rem; height: 12rem; max-width: 100%; background: #fff;
  border-radius: 0.6rem; padding: 0.4rem;
}
.twofactor-secret { text-align: center; }
.twofactor-secret code {
  display: inline-block; font-size: 1.05rem; letter-spacing: 0.06em;
  overflow-wrap: anywhere;
}
.recovery-codes {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.45rem 1rem;
  list-style: none; padding: 0; margin: 0 0 1rem;
}
.recovery-codes li { min-width: 0; }
.recovery-codes code {
  display: block; font-size: 1.05rem; letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}
@media (max-width: 400px) {
  .recovery-codes { grid-template-columns: 1fr; }
}

/* YouTube result links and history */
.yt-card-item { display: grid; gap: 0.4rem; min-width: 0; }
.yt-item.yt-play {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.yt-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  min-width: 0;
}
.yt-watch-url {
  flex: 1 1 12rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
}
.yt-history-list { list-style: none; padding: 0; margin: 0 0 0.8rem; display: grid; gap: 0.35rem; }
.yt-history-item {
  display: grid;
  gap: 0.1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  color: var(--text);
  text-decoration: none;
  min-height: 44px;
}
.yt-history-item:hover { text-decoration: none; border-color: var(--accent); color: var(--text); }

/* Persistent YouTube strip. The official embed is at least 200×200 and is never covered. */
.yt-dock {
  position: fixed;
  left: calc(0.5rem + env(safe-area-inset-left, 0px));
  right: calc(0.5rem + env(safe-area-inset-right, 0px));
  bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 55;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 0.7rem;
  align-items: center;
  padding: 0.5rem;
  border-radius: 18px;
  background: var(--surface-2);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  min-height: 200px;
}
.yt-dock[hidden] { display: none !important; }
.yt-dock-player,
#yt-dock-frame,
.yt-dock-player iframe {
  width: 200px !important;
  height: 200px !important;
  min-width: 200px;
  min-height: 200px;
  max-width: 200px !important;
  max-height: 200px !important;
  border: 0;
  border-radius: 12px;
  background: #000;
  display: block;
}
.yt-dock-side { min-width: 0; display: grid; gap: 0.4rem; align-content: center; }
.yt-dock-heading { display: flex; gap: 0.55rem; align-items: center; min-width: 0; }
.yt-dock-thumb { width: 48px; height: 48px; flex: 0 0 48px; border-radius: 10px; object-fit: cover; display: block; background: #111; }
.yt-dock-thumb[hidden] { display: none; }
.yt-dock-meta { min-width: 0; flex: 1; }
.yt-dock-meta strong, .yt-dock-meta span, .yt-dock-link {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.yt-dock-controls { display: flex; flex-wrap: wrap; gap: 0.2rem; align-items: center; }
.yt-dock-queue {
  margin: 0;
  padding: 0.3rem 0 0 1.1rem;
  max-height: 6.5rem;
  overflow: auto;
}
body.has-yt-dock { padding-bottom: calc(220px + 1rem + env(safe-area-inset-bottom, 0px)); }
body.has-yt-dock .site-player { display: none !important; }

@media (max-width: 800px) {
  .yt-dock {
    left: calc(0.3rem + env(safe-area-inset-left, 0px));
    right: calc(0.3rem + env(safe-area-inset-right, 0px));
    bottom: calc(0.3rem + env(safe-area-inset-bottom, 0px));
    gap: 0.5rem;
    padding: 0.4rem;
  }
  body.has-yt-dock { padding-bottom: calc(220px + 0.8rem + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 420px) {
  .yt-dock-side { gap: 0.25rem; }
  .yt-dock-controls .icon-btn { min-width: 40px; }
}


.yt-section-head { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; justify-content: space-between; }
.yt-section-head h2 { margin: 0; }
.yt-card-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.yt-votes { display: inline-flex; gap: 0.2rem; align-items: center; }
.yt-vote {
  min-width: 44px;
  min-height: 44px;
  font-size: 1.1rem;
  line-height: 1;
}
.yt-vote.is-on {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}
.yt-card-item.is-hidden .yt-item,
.yt-card-item.is-hidden .yt-link-row,
.yt-card-item.is-hidden .yt-card-actions { display: none; }
.yt-card-item.is-hidden .yt-hidden-undo { display: block; margin: 0; }
.yt-hidden-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.yt-hidden-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.8rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: var(--glass);
  min-height: 44px;
}
.yt-hidden-list li > span { display: grid; gap: 0.1rem; min-width: 0; }


/* Inactivity warning */
.idle-dialog {
  width: min(28rem, calc(100vw - 2rem));
  padding: 1.2rem 1.3rem 1.1rem;
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  background: var(--surface-2, var(--bg));
  color: var(--text);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}
.idle-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.idle-dialog h2 { margin: 0 0 0.5rem; }
.idle-dialog p { margin: 0 0 1rem; }
.idle-dialog #idle-stay {
  min-height: 44px;
  min-width: 44px;
  width: 100%;
}


/* Live TV */
.livetv-toolbar { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; align-items: end; margin: 0.8rem 0 1rem; }
.livetv-toolbar input[type="search"] { flex: 1 1 14rem; min-height: 44px; }
.livetv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0.8rem; }
.livetv-card { position: relative; display: grid; border: 1px solid var(--glass-border); background: var(--glass); border-radius: 16px; min-width: 0; overflow: hidden; }
.livetv-card[hidden] { display: none; }
.livetv-card-play {
  display: grid; gap: 0.3rem; text-align: left; padding: 0.7rem 0.75rem 0.8rem;
  background: none; border: 0; color: inherit; font: inherit; cursor: pointer; min-height: 44px;
}
.livetv-card-play img, .livetv-logo-fallback {
  width: 100%; aspect-ratio: 16/9; object-fit: contain; border-radius: 10px; background: #111;
}
.livetv-logo-fallback { display: grid; place-items: center; font-size: 1.8rem; color: var(--muted); }
.livetv-card-play strong { font-size: 0.95rem; }
.livetv-now, .livetv-next { font-size: 0.82rem; display: block; }
.livetv-star {
  position: absolute; top: 0.35rem; right: 0.35rem; min-width: 44px; min-height: 44px;
  background: rgba(0,0,0,0.45); color: #fff;
}
.livetv-star.is-on { color: #f5c14a; }
.livetv-timeline { display: grid; gap: 0.35rem; overflow-x: auto; }
.livetv-tl-hours { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--muted); padding-left: 9rem; }
.livetv-tl-row { display: grid; grid-template-columns: 9rem 1fr; gap: 0.5rem; align-items: stretch; min-height: 44px; }
.livetv-tl-name {
  text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer;
  padding: 0.3rem 0.2rem; min-height: 44px;
}
.livetv-tl-track { position: relative; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 10px; min-height: 44px; }
.livetv-tl-prog {
  position: absolute; top: 4px; bottom: 4px; border-radius: 8px; background: var(--accent); color: var(--bg);
  font-size: 0.75rem; padding: 0.3rem 0.4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.livetv-playlist-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.livetv-playlist-list li { border: 1px solid var(--glass-border); border-radius: 14px; padding: 0.8rem; display: grid; gap: 0.6rem; }
.livetv-user-picks { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.livetv-dock {
  position: fixed;
  left: calc(0.5rem + env(safe-area-inset-left, 0px));
  right: calc(0.5rem + env(safe-area-inset-right, 0px));
  bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  display: grid;
  grid-template-columns: minmax(240px, 420px) 1fr;
  gap: 0.7rem;
  padding: 0.7rem;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(var(--surface-2), var(--surface-2)), var(--bg);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35);
}
.livetv-dock[hidden] { display: none !important; }
.livetv-dock-player, #livetv-video {
  width: 100%;
  min-width: 200px;
  aspect-ratio: 16/9;
  max-height: 240px;
  background: #000;
  border-radius: 12px;
  object-fit: contain;
}
.livetv-dock-side { min-width: 0; display: grid; gap: 0.4rem; align-content: center; }
.livetv-dock-heading { display: flex; gap: 0.55rem; align-items: center; min-width: 0; }
.livetv-dock-logo { width: 48px; height: 48px; border-radius: 10px; object-fit: contain; background: #111; }
.livetv-dock-logo[hidden] { display: none; }
.livetv-dock-meta { min-width: 0; }
.livetv-dock-meta strong, .livetv-dock-meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.livetv-dock-controls { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.livetv-proxy-note { margin: 0; font-size: 0.85rem; }
body.has-livetv-dock { padding-bottom: calc(280px + 1rem + env(safe-area-inset-bottom, 0px)); }
body.has-livetv-dock .site-player { display: none !important; }
@media (max-width: 700px) {
  .livetv-dock { grid-template-columns: 1fr; }
  .livetv-tl-hours { padding-left: 0; }
  .livetv-tl-row { grid-template-columns: 1fr; }
  .grid, .yt-grid, .livetv-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 400px) {
  .livetv-grid { grid-template-columns: 1fr; }
}


/* Network inventory */
.net-toolbar { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; align-items: center; margin: 0 0 1rem; }
.net-toolbar input[type="search"] { flex: 1 1 14rem; min-height: 44px; }
.net-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.8rem; }
.net-card { border: 1px solid var(--glass-border); background: var(--glass); border-radius: 16px; padding: 0.8rem; display: grid; gap: 0.55rem; min-width: 0; }
.net-card.is-new { border-color: color-mix(in srgb, var(--accent) 55%, var(--glass-border)); }
.net-card.is-offline { opacity: 0.72; }
.net-card[hidden] { display: none; }
.net-card-top { display: grid; grid-template-columns: auto 1fr auto; gap: 0.55rem; align-items: start; }
.net-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: #111; font-size: 1.2rem; }
.net-card-id { min-width: 0; }
.net-card-id strong, .net-card-id span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-state { font-size: 0.8rem; padding: 0.2rem 0.45rem; border-radius: 999px; border: 1px solid var(--glass-border); }
.net-state.is-on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.net-flag { margin: 0; font-size: 0.8rem; font-weight: 600; color: var(--accent); }
.net-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.3rem 0.7rem; margin: 0; }
.net-meta div { min-width: 0; }
.net-meta dt { font-size: 0.72rem; color: var(--muted); }
.net-meta dd { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.net-edit { display: grid; gap: 0.45rem; }
.net-edit input, .net-edit select { min-height: 44px; width: 100%; }
.net-edit-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.net-tools-row { display: flex; flex-wrap: wrap; gap: 0.8rem 1.2rem; align-items: end; }
.net-tools-row form { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: end; }
.net-tools-row input { min-height: 44px; }
.net-tool-result { margin: 0.8rem 0 0; }
.net-tool-result.is-err { color: var(--danger, #f38b8b); }
@media (max-width: 700px) {
  .net-grid { grid-template-columns: 1fr; }
  .net-meta { grid-template-columns: 1fr; }
}


/* Phone backup */
.backup-token .copy-row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.backup-steps { display: grid; gap: 0.55rem; padding-left: 1.3rem; }
.backup-steps ul { margin: 0.4rem 0 0; display: grid; gap: 0.35rem; padding-left: 1.1rem; }
.backup-steps .copy-row { margin-top: 0.35rem; }
.backup-notes { display: grid; gap: 0.5rem; padding-left: 1.2rem; }
.backup-add { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; margin: 1rem 0 0.5rem; }
.backup-add label { flex: 1 1 16rem; display: grid; gap: 0.3rem; }
.backup-error { color: var(--danger); font-size: 0.85rem; }
.backup-table tr.is-revoked td { opacity: 0.55; }
.backup-table form { margin: 0; }


/* Isabelle face review */
.face-prompt { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; margin: 0 0 1rem; }
.face-review-bar { display: flex; gap: 1rem; align-items: center; justify-content: space-between; margin: 0 0 1rem; }
.face-review-bar form { margin: 0; }
.face-review-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.face-card { border: 1px solid var(--glass-border); border-radius: 16px; background: var(--glass); overflow: hidden; display: grid; }
.face-card-photo { position: relative; display: block; aspect-ratio: 1; background: #000; }
.face-card-photo > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face-card-crop { position: absolute; right: 0.5rem; bottom: 0.5rem; width: 56px !important; height: 56px !important; border-radius: 50%; border: 2px solid var(--accent); object-fit: cover; }
.face-card-meta { padding: 0.6rem 0.75rem 0; display: grid; gap: 0.15rem; min-width: 0; }
.face-card-name { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.face-card-actions { display: flex; gap: 0.5rem; padding: 0.6rem 0.75rem 0.75rem; }
.face-card-actions form { margin: 0; flex: 1; }
.face-card-actions .btn { width: 100%; }
.face-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 0.6rem; }
.face-pick { position: relative; display: grid; gap: 0.35rem; justify-items: center; cursor: pointer; }
.face-pick img, .face-private { width: 96px; height: 96px; border-radius: 14px; object-fit: cover; border: 2px solid transparent; background: #111; }
.face-private { display: grid; place-items: center; font-size: 0.75rem; color: var(--muted); }
.face-pick input { position: absolute; top: 6px; left: 6px; width: 22px; height: 22px; }
.face-pick:has(input:checked) img { border-color: var(--accent); }
.face-pick.is-ref img { border-color: var(--accent); }
.face-pick-tag { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink, #000); font-size: 0.7rem; font-weight: 700; padding: 0.1rem 0.45rem; border-radius: 999px; }
.face-teach-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.face-stats { margin-bottom: 1rem; }
.face-threshold input { max-width: 8rem; }
.face-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.75rem; }
.face-stats .stat-chip { margin: 0; }
.settings-block form.stack .btn, .face-teach-actions .btn { width: auto; justify-self: start; }
.settings-block form.stack { display: grid; gap: 0.6rem; margin-bottom: 1.25rem; }

/* SER-21 Places, Groups, photo tags */
.places-search { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 1rem; }
.places-search input { flex: 1 1 260px; min-width: 0; }
.places-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 1rem; align-items: start; }
.places-map { height: 560px; border-radius: 18px; overflow: hidden; border: 1px solid var(--glass-border); background: #0d1117; }
.places-map.map-failed { display: grid; place-items: center; padding: 2rem; color: var(--muted); text-align: center; }
.places-list { border: 1px solid var(--glass-border); background: var(--glass); border-radius: 18px; padding: 0.5rem; max-height: 560px; overflow: auto; }
.places-list ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.places-list a { display: grid; grid-template-columns: 48px 1fr auto; gap: 0.6rem; align-items: center; padding: 0.4rem; border-radius: 12px; color: inherit; text-decoration: none; }
.places-list a:hover, .places-list a:focus-visible { background: rgba(255, 255, 255, 0.06); }
.places-list img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.places-name { display: grid; min-width: 0; }
.places-name strong, .places-name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.places-count { font-weight: 700; font-size: 0.85rem; background: rgba(139, 92, 246, 0.25); padding: 0.1rem 0.5rem; border-radius: 999px; }
.places-stats { padding: 0.5rem; font-size: 0.85rem; }
.empty-note { padding: 0.75rem; }
.map-pop { display: grid; gap: 0.2rem; color: #111 !important; text-decoration: none; width: 140px; }
.map-pop img { width: 140px; height: 100px; object-fit: cover; border-radius: 8px; }
.leaflet-container { font: inherit; }
@media (max-width: 860px) { .places-layout { grid-template-columns: 1fr; } .places-map { height: 360px; } .places-list { max-height: none; } }

.group-heading { margin: 1.5rem 0 0.75rem; }
.group-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; }
.group-card { display: grid; border: 1px solid var(--glass-border); background: var(--glass); border-radius: 16px; overflow: hidden; color: inherit; text-decoration: none; transition: transform 0.15s ease; }
.group-card:hover, .group-card:focus-visible { transform: translateY(-2px); }
.group-cover { aspect-ratio: 4 / 3; background: rgba(255, 255, 255, 0.04); display: grid; place-items: center; overflow: hidden; }
.group-cover img { width: 100%; height: 100%; object-fit: cover; }
.group-empty { font-size: 2.2rem; opacity: 0.7; }
.group-meta { display: grid; gap: 0.15rem; padding: 0.6rem 0.75rem 0.75rem; }
.group-grid { margin-top: 0.5rem; }
.person-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.person-tab { padding: 0.5rem 0.85rem; border-radius: 999px; border: 1px solid var(--glass-border); background: var(--glass); color: inherit; text-decoration: none; display: inline-flex; gap: 0.4rem; align-items: baseline; }
.person-tab.active { border-color: var(--accent); background: rgba(139, 92, 246, 0.2); font-weight: 700; }
.face-pick-tag.is-other { background: #475569; color: #fff; top: auto; bottom: 30px; }
.face-pick-tag.is-guess { background: rgba(255, 255, 255, 0.85); color: #111; top: auto; bottom: 30px; }
.photo-tags { margin: 1rem auto 0; max-width: 960px; display: grid; gap: 0.5rem; }
.photo-place { margin: 0; }
.photo-tag-row { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.chip { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; background: rgba(139, 92, 246, 0.22); color: inherit; text-decoration: none; font-size: 0.9rem; }
.photo-fix summary { cursor: pointer; color: var(--muted); }
.tag-form { margin-top: 0.75rem; display: grid; gap: 0.5rem; justify-items: start; }
.tag-form fieldset { border: 1px solid var(--glass-border); border-radius: 12px; padding: 0.6rem 0.8rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }
.tag-form .check { display: inline-flex; gap: 0.35rem; align-items: center; }

.tag-sep { margin-left: 0.75rem; }

/* SER-20 Android sync, phone files, share */
.sync-pair { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; margin: 1rem 0; }
.sync-qr img { display: block; border-radius: 12px; background: #fff; }
.sync-ids { display: grid; gap: 0.75rem; min-width: 0; }
.sync-ids label, .sync-add label, .sync-add-folder label { display: grid; gap: 0.3rem; }
.sync-ids input[readonly] { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; }
.sync-add { display: grid; gap: 0.6rem; justify-items: start; }
.sync-add input { width: 100%; }
.sync-list { list-style: none; padding: 0; margin: 0.5rem 0 1rem; display: grid; gap: 0.4rem; }
.sync-list li { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding: 0.55rem 0.75rem; border: 1px solid var(--glass-border); border-radius: 12px; background: var(--glass); }
.sync-list form { margin: 0; }
.sync-on { color: #34d399; font-weight: 600; }
.sync-add-folder { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; margin-bottom: 1rem; }
.sync-add-folder label { flex: 1 1 240px; }
@media (max-width: 700px) { .sync-pair { grid-template-columns: 1fr; justify-items: center; } .sync-ids { width: 100%; } }
.crumbs { margin: 0 0 0.75rem; color: var(--muted); }
.file-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.3rem; }
.file-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 0.75rem; align-items: center; padding: 0.5rem 0.75rem; border: 1px solid var(--glass-border); border-radius: 12px; background: var(--glass); }
.file-list a { color: inherit; text-decoration: none; display: flex; gap: 0.5rem; min-width: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-actions { display: flex; gap: 0.4rem; }
@media (max-width: 700px) { .file-list li { grid-template-columns: 1fr; } }
.share-list { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
.share-item { display: flex; justify-content: space-between; gap: 0.75rem; align-items: center; padding: 0.5rem 0.75rem; border: 1px solid var(--glass-border); border-radius: 12px; }
.share-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* SER-23 camera groups */
.camera-group + .camera-group { margin-top: 1.5rem; }
.camera-group-title { font-size: 1.05rem; margin: 0 0 0.6rem; display: flex; gap: 0.5rem; align-items: baseline; }

/* SER-25 aerial camera map */
.camera-views { display: flex; gap: 0.5rem; margin: 0 0 1rem; }
.camera-views .chip, .cmap-sites .chip { border: 1px solid var(--border); cursor: pointer; padding: 0.45rem 1rem; min-height: 40px; font: inherit; font-size: 0.95rem; background: var(--surface); color: var(--text); }
.camera-views .chip.is-active, .cmap-sites .chip.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.cmap-wrap[hidden], #camera-grid-view[hidden] { display: none !important; }
.cmap-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.cmap-sites { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cmap-body { display: flex; gap: 1rem; align-items: stretch; }
.cmap-stage { position: relative; flex: 1 1 auto; min-width: 0; }
.cmap { height: min(72vh, 760px); min-height: 360px; border-radius: 16px; overflow: hidden; border: 1px solid var(--border); background: #0b0a14; }
.cmap-notice { position: absolute; left: 50%; top: 1rem; transform: translateX(-50%); z-index: 500; max-width: min(92%, 520px); background: rgba(10, 8, 22, 0.9); border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem 1rem; font-size: 0.95rem; box-shadow: var(--shadow); }
.cmap-side { flex: 0 0 290px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1rem; max-height: min(72vh, 760px); overflow: auto; }
.cmap-side h3, .cmap-side h4 { margin: 0 0 0.5rem; }
.cmap-side h4 { margin-top: 1.25rem; }
.cmap-search { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; margin-bottom: 0.5rem; }
.cmap-search label { flex: 1 1 100%; font-size: 0.9rem; }
.cmap-search input { width: 100%; margin-top: 0.3rem; }
.cmap-results, .cmap-unplaced { list-style: none; margin: 0 0 0.75rem; padding: 0; display: grid; gap: 0.35rem; }
.cmap-results .linklike { background: none; border: 0; color: var(--accent); text-align: left; padding: 0.3rem 0; cursor: pointer; font: inherit; font-size: 0.9rem; }
.cmap-chip { display: flex; gap: 0.5rem; align-items: center; padding: 0.55rem 0.7rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); cursor: grab; user-select: none; }
.cmap-chip.is-picked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--glow); }
.cmap-wrap.is-placing .cmap { cursor: crosshair; }
.cmap-wrap.is-placing .leaflet-container { cursor: crosshair; }
.cmap-legend { margin-top: 0.6rem; display: flex; flex-wrap: wrap; gap: 0.35rem 0.6rem; align-items: center; }
.cpin-key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; vertical-align: middle; flex: 0 0 auto; }
.cpin-key.is-live, .cpin.is-live .cpin-dot { background: #22c55e; }
.cpin-key.is-stale, .cpin.is-stale .cpin-dot { background: #f59e0b; }
.cpin-key.is-bad, .cpin.is-bad .cpin-dot { background: #6b7280; }
.cpin-key.is-auth, .cpin.is-auth .cpin-dot { background: #ef4444; }
.cpin-wrap { background: none; border: 0; }
.cpin { position: relative; display: block; width: 22px; height: 22px; }
.cpin-dot { position: absolute; inset: 0; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6); z-index: 2; }
.cpin.is-live .cpin-dot { animation: cpin-pulse 2.4s ease-out infinite; }
@keyframes cpin-pulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); } 70% { box-shadow: 0 0 0 12px rgba(34, 197, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); } }
.cpin-cone { display: none; position: absolute; left: 50%; top: 50%; width: 130px; height: 130px; border-radius: 50%; pointer-events: none; z-index: 1;
  background: conic-gradient(from -30deg, rgba(77, 255, 195, 0.42) 0deg 60deg, transparent 60deg 360deg);
  -webkit-mask: radial-gradient(circle, #000 0 62%, transparent 70%); mask: radial-gradient(circle, #000 0 62%, transparent 70%); }
.cpin.has-cone .cpin-cone { display: block; }
.cpin-label { position: absolute; left: 50%; top: 26px; transform: translateX(-50%); white-space: nowrap; font-size: 12px; font-weight: 600; color: #fff; background: rgba(8, 6, 18, 0.82); padding: 2px 7px; border-radius: 8px; z-index: 3; pointer-events: none; }
.cmap .leaflet-popup-content-wrapper { background: #14112a; color: var(--text); border-radius: 14px; }
.cmap .leaflet-popup-tip { background: #14112a; }
.cmap .leaflet-popup-content { margin: 10px; }
.cmap-pop img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 10px; background: #000; margin-bottom: 0.5rem; }
.cmap-pop-head { display: flex; justify-content: space-between; gap: 0.5rem; align-items: center; margin-bottom: 0.5rem; }
.cmap-pop-state { font-size: 0.8rem; padding: 0.1rem 0.5rem; border-radius: 999px; background: rgba(255, 255, 255, 0.1); white-space: nowrap; }
.cmap-pop-state.is-live { color: #4ade80; } .cmap-pop-state.is-stale { color: #fbbf24; } .cmap-pop-state.is-auth { color: #f87171; } .cmap-pop-state.is-bad { color: #9ca3af; }
.cmap-pop .btn { width: 100%; }
.cmap-pop-edit { margin-top: 0.6rem; display: grid; gap: 0.4rem; font-size: 0.85rem; }
.cmap-pop-edit input[type="range"] { width: 100%; }
@media (max-width: 760px) {
  .cmap-body { flex-direction: column; }
  .cmap { height: 62vh; min-height: 320px; border-radius: 12px; }
  .cmap-side { flex: 1 1 auto; max-height: none; }
  .cmap-toolbar .btn { min-height: 40px; }
}
.cmap-pop-none { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 10px; background: #000; color: #9ca3af; font-size: 0.85rem; margin-bottom: 0.5rem; text-align: center; padding: 0 1rem; }
.cmap-far .cpin.has-cone .cpin-cone { display: none; }

/* SER-26 live video wall */
.cwall-wrap[hidden] { display: none !important; }
.cwall-toolbar { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.cwall-sites { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cwall-sites .chip { border: 1px solid var(--border); cursor: pointer; padding: 0.45rem 1rem; min-height: 40px; font: inherit; font-size: 0.95rem; background: var(--surface); color: var(--text); }
.cwall-sites .chip.is-active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.cwall-actions { display: flex; gap: 0.75rem; align-items: center; }
.cwall-toggle { display: inline-flex; gap: 0.4rem; align-items: center; font-size: 0.9rem; cursor: pointer; }
.cwall { position: relative; background: #000; border-radius: 14px; overflow: hidden; border: 1px solid var(--border); }
.cwall-grid { --cwall-cols: 3; --cwall-rows: 3; display: grid; grid-template-columns: repeat(var(--cwall-cols), minmax(0, 1fr)); gap: 3px; background: #000; }
.cwall-tile { position: relative; display: block; aspect-ratio: 16 / 9; padding: 0; border: 0; background: #0b0a14; cursor: pointer; overflow: hidden; color: #fff; font: inherit; }
.cwall-tile:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.cwall-still, .cwall-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.cwall-video { opacity: 0; transition: opacity 0.3s; }
.cwall-tile.has-video .cwall-video { opacity: 1; }
.cwall-name { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 0.85rem; font-weight: 600; background: rgba(0, 0, 0, 0.6); padding: 2px 8px; border-radius: 6px; text-shadow: 0 1px 2px #000; }
.cwall-badge { position: absolute; right: 8px; top: 8px; font-size: 0.75rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, 0.65); color: #fbbf24; max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cwall-tile.is-live .cwall-badge { color: #fff; background: rgba(220, 38, 38, 0.85); }
.cwall-tile.is-live .cwall-badge::before { content: "● "; }
.cwall-tile.is-bad .cwall-badge { color: #d1d5db; }
.cwall-clock { position: absolute; right: 10px; bottom: 10px; z-index: 5; font-variant-numeric: tabular-nums; font-size: 0.85rem; font-weight: 600; color: #fff; background: rgba(0, 0, 0, 0.6); padding: 3px 9px; border-radius: 6px; pointer-events: none; }
.cwall.no-labels .cwall-name, .cwall.no-labels .cwall-clock { display: none; }
.cwall-paused { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; gap: 0.75rem; text-align: center; background: rgba(5, 4, 12, 0.82); padding: 1rem; }
.cwall-paused[hidden] { display: none; }
.cwall-note:empty { display: none; }
.cwall-note { margin-top: 0.6rem; }
/* Full screen (desktop / TV): fill the screen, rows share the height. */
.cwall:fullscreen { border-radius: 0; border: 0; display: flex; }
.cwall:fullscreen .cwall-grid { flex: 1; height: 100vh; grid-template-rows: repeat(var(--cwall-rows), minmax(0, 1fr)); }
.cwall:fullscreen .cwall-tile { aspect-ratio: auto; height: 100%; }
@media (max-width: 700px) {
  .cwall { border-radius: 10px; }
  .cwall-name { font-size: 0.75rem; left: 5px; bottom: 5px; padding: 1px 6px; }
  .cwall-badge { font-size: 0.68rem; right: 5px; top: 5px; padding: 1px 6px; }
  .cwall-actions .cwall-toggle { font-size: 0.85rem; }
}
@media (max-width: 700px) { .cwall-clock { top: 4px; bottom: auto; right: auto; left: 50%; transform: translateX(-50%); font-size: 0.72rem; padding: 1px 7px; } }
@media (max-width: 700px) { .cwall-clock { position: static; transform: none; display: block; text-align: right; border-radius: 0; background: #000; padding: 3px 8px; } .cwall:fullscreen .cwall-clock { position: absolute; right: 6px; bottom: 6px; left: auto; top: auto; } .cwall:fullscreen { flex-direction: column; } }

/* SER-27 wall layouts + robust tiles */
.cwall-actions { flex-wrap: wrap; }
.cwall-layout { display: inline-flex; gap: 0.4rem; align-items: center; font-size: 0.9rem; }
.cwall-layout select { min-height: 36px; padding: 0.2rem 0.5rem; border-radius: 10px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); font: inherit; }
.cwall-pager { display: inline-flex; gap: 0.35rem; align-items: center; font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.cwall-pager[hidden] { display: none; }
.cwall-pager .btn { min-width: 40px; padding-inline: 0.6rem; }
.cwall-grid { width: 100%; }
.cwall-grid > .cwall-tile { width: 100%; min-width: 0; height: auto; margin: 0; box-sizing: border-box; appearance: none; -webkit-appearance: none; border-radius: 0; line-height: 1.2; text-align: left; }
.cwall-tile > * { box-sizing: border-box; }
.cwall-badge { font-size: 0.68rem; line-height: 1.3; z-index: 2; }
.cwall-name { z-index: 2; line-height: 1.3; }
.cwall-grid.is-1p5 > .cwall-tile:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.cwall-grid[data-layout="1"] > .cwall-tile { max-height: 78vh; }
.cwall:fullscreen .cwall-grid[data-layout="1"] > .cwall-tile { max-height: none; }
@media (max-width: 700px) {
  .cwall-badge { font-size: 0.62rem; }
  .cwall-actions { gap: 0.5rem; width: 100%; justify-content: space-between; }
}

/* SER-27 Admin › CCTV */
.cctv-jump { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.cctv-jump .chip { padding: 0.35rem 0.85rem; border: 1px solid var(--border); background: var(--surface); }
.cctv-sites { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.cctv-site { border: 1px solid var(--border); border-radius: 14px; padding: 1rem; background: var(--surface-2); display: grid; gap: 0.6rem; }
.cctv-site-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.4rem; align-items: baseline; }
.cctv-site-head h3 { margin: 0; }
.cctv-rename { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: flex-end; }
.cctv-rename label { flex: 1 1 180px; font-size: 0.9rem; }
.cctv-rename input { width: 100%; }
.cctv-summary { width: 100%; border-collapse: collapse; }
.cctv-summary th, .cctv-summary td { text-align: left; padding: 0.5rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.cctv-pill { display: inline-block; margin: 0 0.3rem 0.3rem 0; padding: 0.1rem 0.55rem; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 0.85rem; }
.cctv-pill.is-site { background: rgba(77, 255, 195, 0.2); }
.cctv-cam-title { margin: 0 0 0.5rem; }
.cmap-admin .cmap { height: min(64vh, 640px); }

/* Phones held sideways: keep the wall on screen, drop the intro text. */
@media (max-height: 520px) and (orientation: landscape) {
  .cameras-head { margin-bottom: 0.4rem; display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
  .cameras-head .eyebrow, .cameras-head .muted { display: none; }
  .cameras-head h1 { font-size: 1.3rem; margin: 0; }
  .cameras-head .btn { min-height: 32px; padding: 0.2rem 0.6rem; font-size: 0.8rem; }
  .camera-views { margin-bottom: 0.4rem; }
  .camera-views .chip, .cwall-sites .chip { min-height: 32px; padding: 0.2rem 0.75rem; font-size: 0.85rem; }
  .cwall-toolbar { margin-bottom: 0.4rem; gap: 0.4rem; }
  .cwall-actions .btn, .cwall-layout select { min-height: 32px; }
}

/* ---------- SER-19 doorbell popup ---------- */
.bell-pop { position: fixed; right: 18px; bottom: 18px; z-index: 9000; width: min(420px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; }
.bell-card { background: #120d24; border: 1px solid var(--accent); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.65), 0 0 0 4px var(--glow); padding: 12px; display: grid; gap: 10px; animation: bell-in .25s ease-out; }
@keyframes bell-in { from { transform: translateY(18px); opacity: 0; } to { transform: none; opacity: 1; } }
.bell-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.bell-title { display: grid; gap: 2px; }
.bell-title strong { font-size: 1.12rem; }
.bell-x { background: transparent; border: 0; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 4px; }
.bell-media { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 12px; overflow: hidden; }
.bell-media img, .bell-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bell-media video { opacity: 0; transition: opacity .3s; }
.bell-pop.is-live .bell-media video { opacity: 1; }
.bell-live { position: absolute; left: 8px; top: 8px; max-width: calc(100% - 16px); background: rgba(0,0,0,.62); color: #fff; font-size: .74rem; padding: 2px 8px; border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bell-pop.is-live .bell-live { background: rgba(220, 30, 60, .85); }
.bell-who { display: flex; flex-wrap: wrap; gap: 6px; }
.bell-who:empty { display: none; }
.bell-chip { font-size: .8rem; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--border); }
.bell-chip.is-known { background: rgba(77,255,195,.16); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.bell-actions, .bell-confirm { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bell-confirm:empty { display: none; }
.bell-confirm-q { font-weight: 600; }
.bell-actions .btn { flex: 1 1 auto; min-height: 42px; }
.bell-actions .is-on { background: var(--danger); border-color: var(--danger); color: #fff; }
.bell-msg { margin: 0; font-size: .86rem; }
.bell-msg:empty { display: none; }
.bell-msg.is-bad { color: var(--danger); }
.bell-note { margin: 0; }
@media (max-width: 700px) {
  .bell-pop { left: 8px; right: 8px; bottom: 8px; width: auto; }
}
@media (max-height: 520px) and (orientation: landscape) {
  .bell-pop { top: 8px; bottom: 8px; right: 8px; width: min(560px, calc(100vw - 16px)); }
  .bell-card { grid-template-columns: 1.3fr 1fr; align-items: start; }
  .bell-head, .bell-msg, .bell-note, .bell-confirm { grid-column: 1 / -1; }
  .bell-media { grid-row: span 3; }
}
.bell-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0 0; }
.bell-facts dt { color: var(--muted); }
.bell-facts dd { margin: 0; }
.bell-bad { color: var(--danger); }
.bell-status .cctv-site-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.bell-status .cctv-site-head h3 { margin-right: auto; }
.bell-perms td, .bell-perms th { text-align: left; }
.bell-perms input[type=checkbox] { width: 20px; height: 20px; }
.bell-logs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; margin-top: 12px; }
.bell-log { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .86rem; }
.bell-pick { margin-top: 10px; }

/* ---------- SER-27b professional pictures ---------- */
.pro-tick { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.pro-check { font-weight: 600; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; background: rgba(255,255,255,.04); cursor: pointer; }
.pro-check:has(input:checked) { border-color: #f5c84c; color: #f5c84c; background: rgba(245,200,76,.12); }
.pro-check input { width: 18px; height: 18px; accent-color: #f5c84c; }
.pro-badge { position: absolute; right: 6px; bottom: 6px; background: rgba(20,16,4,.78); color: #f5c84c; border: 1px solid rgba(245,200,76,.6); font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; pointer-events: none; }
.select-sep { width: 1px; align-self: stretch; background: var(--border); margin: 0 4px; }
.pro-btn { border-color: rgba(245,200,76,.6); color: #f5c84c; }
.group-card.is-pro .group-empty { color: #f5c84c; font-size: 2.4rem; }

/* ===== SER-29 Sentinel website ===== */
.preset-sentinel { background: linear-gradient(145deg, #16232b, #0e3a3a); }

/* Wordmark + nav icons */
.brand-wordmark { gap: 0.5rem; }
.brand-wordmark .sentinel-mark { flex: none; filter: drop-shadow(0 0 6px rgba(43, 184, 176, 0.35)); }
.wordmark {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.98rem;
  background: linear-gradient(180deg, #ffffff 0%, #c9d6dd 55%, #8fa3ae 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-wordmark:hover .wordmark { background: linear-gradient(180deg, #e8fffd, #2bb8b0); -webkit-background-clip: text; background-clip: text; }
.nav-ico { flex: none; opacity: 0.85; transition: transform 0.2s ease, opacity 0.2s ease, color 0.2s ease; }
.nav-link, .nav-group-btn { display: inline-flex; align-items: center; gap: 0.4rem; }
.nav-link:hover .nav-ico, .nav-group-btn:hover .nav-ico, .nav-group.is-open .nav-ico,
.nav-link.is-active .nav-ico, .nav-group.is-active .nav-ico { opacity: 1; color: var(--accent); transform: translateY(-1px); }

/* Dropdown animation: fade + slide */
@keyframes nav-menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.985); }
  to { opacity: 1; transform: none; }
}
.nav-menu:not([hidden]) { animation: nav-menu-in 0.18s cubic-bezier(0.2, 0.7, 0.3, 1) both; transform-origin: top left; }
.nav-menu .nav-item { transition: background 0.15s ease, color 0.15s ease, padding-left 0.15s ease; }
.nav-menu .nav-item:hover, .nav-menu .nav-item:focus-visible { padding-left: 0.9rem; }
.nav-group-btn::after { transition: transform 0.2s ease; }
.nav-group-btn:focus-visible, .nav-link:focus-visible, .nav-item:focus-visible { box-shadow: 0 0 0 2px var(--accent); }

/* Public site */
.site-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(0.8rem + env(safe-area-inset-top, 0px)) clamp(1rem, 4vw, 2.5rem) 0.8rem;
  background: linear-gradient(180deg, rgba(6, 11, 15, 0.82), rgba(6, 11, 15, 0));
}
.site-topbar .brand { color: #e6eef2; }
.site-topbar-login {
  border-color: rgba(43, 184, 176, 0.6);
  color: #e6eef2;
  background: rgba(11, 18, 23, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.site-main {
  --s-slate: #0b1217;
  --s-slate-2: #121d24;
  --s-steel: #9fb1bc;
  --s-steel-hi: #dfe8ed;
  --s-teal: #2bb8b0;
  --s-teal-hi: #4fd6cd;
  width: 100%;
  margin: 0;
  background: var(--s-slate);
  color: var(--s-steel-hi);
  min-height: 100vh;
}
.site-main > .flashes { width: min(1180px, calc(100% - 1.5rem)); margin: 0 auto; position: relative; z-index: 3; padding-top: 4.5rem; }
.site-hero {
  position: relative;
  min-height: min(88vh, 56.25vw + 4rem);
  min-height: clamp(26rem, 56.25vw, 88vh);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at 30% 40%, #173040 0%, #0b1217 70%);
}
.site-hero-media, .site-hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.site-hero-media { z-index: -2; }
.site-hero-media img { object-fit: cover; object-position: 25% 50%; }
.site-hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 18, 23, 0) 45%, rgba(11, 18, 23, 0.85) 88%, #0b1217 100%),
    linear-gradient(90deg, rgba(11, 18, 23, 0.25), rgba(11, 18, 23, 0) 55%);
}
.site-hero-copy {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0 0 clamp(1.5rem, 4vw, 3rem);
  display: grid;
  gap: 0.75rem;
  justify-items: start;
}
.site-kicker {
  margin: 0;
  color: var(--s-teal-hi);
  font-weight: 750;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.site-lede {
  margin: 0;
  max-width: 34rem;
  color: var(--s-steel-hi);
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  line-height: 1.5;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.6);
}
.btn.site-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.4rem;
  padding: 0.9rem 1.9rem;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #04201e;
  background: linear-gradient(180deg, var(--s-teal-hi), var(--s-teal));
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(43, 184, 176, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn.site-login-btn:hover { color: #04201e; transform: translateY(-2px); box-shadow: 0 14px 36px rgba(43, 184, 176, 0.5); }
.btn.site-login-btn:focus-visible { outline: 3px solid #e6eef2; outline-offset: 3px; }

.site-client {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0;
  display: flex;
  align-items: center;
  gap: 1.2rem 2rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(159, 177, 188, 0.16);
}
.site-client-label {
  margin: 0;
  color: var(--s-steel);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.site-client-logo { max-height: 72px; max-width: min(320px, 70vw); width: auto; height: auto; object-fit: contain; }
.site-client-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(300px, 80vw);
  min-height: 72px;
  padding: 0.75rem 1.4rem;
  border: 1.5px dashed rgba(159, 177, 188, 0.45);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(30, 44, 54, 0.7), rgba(18, 29, 36, 0.7));
}
.site-client-placeholder.small { min-height: 56px; min-width: 220px; }
.site-client-name { color: #dfe8ed; font-weight: 700; letter-spacing: 0.02em; font-size: 1.05rem; }
.client-logo-preview { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.client-logo-preview img { max-height: 64px; max-width: 280px; background: rgba(255, 255, 255, 0.04); border-radius: 8px; padding: 0.4rem; }

.site-features {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.5rem) 0 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1rem;
}
.site-feature {
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(159, 177, 188, 0.18);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(30, 44, 54, 0.55), rgba(18, 29, 36, 0.55));
}
.site-feature svg { color: var(--s-teal-hi); }
.site-feature h2 { margin: 0.5rem 0 0.25rem; font-size: 1.05rem; color: #e6eef2; letter-spacing: 0.02em; }
.site-feature p { margin: 0; color: var(--s-steel); }

/* Login with hero backdrop */
.site-auth {
  position: relative;
  width: 100%;
  margin: 0;
  min-height: 100vh;
  padding: calc(5rem + env(safe-area-inset-top, 0px)) 1rem 3rem;
  isolation: isolate;
  background: #0b1217;
}
.site-auth-backdrop, .site-auth-backdrop img { position: absolute; inset: 0; width: 100%; height: 100%; }
.site-auth-backdrop { z-index: -2; }
.site-auth-backdrop img { object-fit: cover; object-position: 70% 50%; filter: saturate(0.9) brightness(0.55); }
.site-auth::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(11, 18, 23, 0.55), rgba(11, 18, 23, 0.2) 60%, rgba(11, 18, 23, 0.55));
}
.site-auth > .flashes { width: min(28rem, 100%); margin: 0 auto 1rem; }
.site-auth-card {
  margin: 0 auto;
  background: rgba(14, 23, 30, 0.78);
  border: 1px solid rgba(159, 177, 188, 0.25);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.site-auth-card .auth-mark h1 { color: #e6eef2; background: none; -webkit-text-fill-color: currentColor; }
.site-auth-card .auth-mark p { color: #9fb1bc; }
.site-auth-eyebrow { color: #4fd6cd; font-size: 0.75rem; font-weight: 750; letter-spacing: 0.22em; text-transform: uppercase; }
.site-auth-card .btn.primary { background: linear-gradient(180deg, #4fd6cd, #2bb8b0); border-color: #2bb8b0; color: #04201e; }

/* Admin › Users › Console access */
.access-table { border-collapse: collapse; width: 100%; min-width: 44rem; }
.access-table th, .access-table td { padding: 0.45rem 0.5rem; border-bottom: 1px solid var(--border); text-align: center; font-size: 0.88rem; }
.access-table th[scope="row"], .access-table thead th:first-child { text-align: left; white-space: nowrap; }
.access-table thead th { font-weight: 650; color: var(--muted); vertical-align: bottom; }
.access-check { display: inline-flex; padding: 0.2rem; cursor: pointer; }
.access-check input { width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.table-wrap { overflow-x: auto; }

@media (max-width: 700px) {
  .site-hero { min-height: 82vh; }
  .site-hero-media img { object-position: 20% 50%; }
  .btn.site-login-btn { width: 100%; justify-content: center; }
  .site-client { justify-content: center; text-align: center; }
}
@media (max-width: 800px) {
  .nav-menu:not([hidden]) { animation-name: nav-menu-in; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-menu:not([hidden]) { animation: none; }
  .nav-ico, .nav-menu .nav-item, .nav-group-btn::after, .btn.site-login-btn { transition: none; }
  .nav-menu .nav-item:hover, .nav-menu .nav-item:focus-visible { padding-left: 0.7rem; }
  .btn.site-login-btn:hover { transform: none; }
}
.site-feature h2 { background: none; -webkit-text-fill-color: currentColor; }
.site-auth-card input[type="text"], .site-auth-card input[type="password"], .site-auth-card input[type="email"] {
  background: rgba(6, 12, 16, 0.75);
  border: 1px solid rgba(159, 177, 188, 0.3);
  color: #e6eef2;
}
.site-auth-card input:focus { outline: 2px solid #2bb8b0; border-color: transparent; }
.site-auth-card .check input { accent-color: #2bb8b0; }
.site-auth-card .fine a { color: #4fd6cd; }
@media (max-width: 700px) {
  .site-hero { display: block; min-height: 0; padding-top: 0; }
  .site-hero-media { position: relative; display: block; inset: auto; }
  .site-hero-media img { position: static; display: block; width: 100%; height: auto; aspect-ratio: auto; object-fit: contain; }
  .site-hero-shade { display: none; }
  .site-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 18, 23, 0) 55%, #0b1217 100%); }
  .site-hero-copy { margin-top: -3.5rem; position: relative; padding-bottom: 1.5rem; }
}

/* ===== SER-27 Photo shoots ===== */
.shoot-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; }
.shoot-card { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--glass-border); border-radius: 14px; overflow: hidden; background: var(--surface); color: var(--text); text-decoration: none; transition: transform 0.15s ease, border-color 0.15s ease; }
.shoot-card:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); }
.shoot-cover { display: block; aspect-ratio: 4 / 3; background: var(--surface-2); }
.shoot-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shoot-cover-empty { display: grid; place-items: center; height: 100%; font-size: 2.4rem; color: var(--accent); opacity: 0.7; }
.shoot-meta { display: grid; gap: 0.2rem; padding: 0.75rem 0.9rem 0.9rem; }
.shoot-meta strong { font-size: 1.05rem; }
.shoot-line { color: var(--muted); font-size: 0.88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shoot-card.is-unsorted { border-style: dashed; }
.shoot-details { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.6rem 1.2rem; margin: 0 0 1rem; padding: 0.9rem 1.1rem; border: 1px solid var(--glass-border); border-radius: 14px; background: var(--surface); }
.shoot-details dt { color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.shoot-details dd { margin: 0.15rem 0 0; }
.shoot-notes { grid-column: 1 / -1; }
.shoot-notes dd { white-space: pre-line; }
.shoot-upload { display: flex; flex-wrap: wrap; align-items: end; gap: 0.75rem; margin-bottom: 1rem; }
.shoot-bar { position: static; display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: end; margin-bottom: 0.8rem; }
.shoot-pick select { min-width: 12rem; }
.shoot-add-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.chip-checks { display: flex; flex-wrap: wrap; gap: 0.4rem 0.9rem; margin-bottom: 0.6rem; }
.shoot-people, .cover-picker { border: 1px solid var(--glass-border); border-radius: 12px; padding: 0.7rem 0.9rem; }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr)); gap: 0.5rem; }
.cover-option { position: relative; display: block; cursor: pointer; border-radius: 10px; overflow: hidden; border: 2px solid transparent; aspect-ratio: 1; }
.cover-option img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover-option input { position: absolute; top: 0.4rem; left: 0.4rem; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.cover-option:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 40%, transparent); }
.cover-option:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.danger-zone { margin-top: 1rem; }
.btn.danger-btn { border-color: var(--danger); color: var(--danger); }

/* SER-29: public tagline + client organisations */
.site-assets {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(1.4rem, 4vw, 2.4rem) 0;
  border-bottom: 1px solid rgba(159, 177, 188, 0.16);
  text-align: center;
}
.site-assets-tagline {
  margin: 0;
  color: #dfe8ed;
  font-size: clamp(1.05rem, 2.6vw, 1.45rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
.org-brand { display: inline-flex; align-items: center; margin-left: 0.6rem; padding-left: 0.75rem; border-left: 1px solid rgba(159, 177, 188, 0.3); min-width: 0; }
.org-brand-logo, .org-logo-plate, .org-console-logo { background: #f4f8fa; border-radius: 8px; padding: 4px 8px; object-fit: contain; }
.org-brand-logo { height: 34px; width: auto; max-width: 150px; }
.org-brand-name { font-weight: 700; font-size: 0.85rem; color: #dfe8ed; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 18ch; }
.org-console-brand { display: flex; align-items: center; gap: 0.9rem; flex-wrap: wrap; margin-top: 0.4rem; }
.org-console-logo { height: 64px; width: auto; max-width: min(260px, 70vw); padding: 6px 12px; }
.org-console-brand p { margin: 0; }
.org-logo-plate { max-height: 64px; max-width: 260px; }
.org-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem 1rem; }
.org-access { border: 1px solid rgba(159, 177, 188, 0.25); border-radius: 10px; padding: 0.6rem 0.9rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
.org-access legend { font-weight: 700; padding: 0 0.3rem; }
.org-access details { flex-basis: 100%; }
.org-people { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.75rem; }
.org-person { border: 1px solid rgba(159, 177, 188, 0.2); border-radius: 12px; padding: 0.75rem 1rem; }
.org-person.is-disabled { opacity: 0.7; }
.org-person-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.3rem 0.7rem; }
.org-person-edit { margin-top: 0.5rem; }
.org-person-edit form { margin-top: 0.7rem; }
.org-pill { display: inline-block; padding: 0.05rem 0.55rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; background: rgba(43, 184, 176, 0.18); color: #7fe0d8; }
.org-pill.org-pill-warn { background: rgba(231, 160, 60, 0.2); color: #f2c27c; }
@media (max-width: 700px) {
  .org-brand { margin-left: 0.4rem; padding-left: 0.5rem; }
  .org-brand-logo { height: 28px; max-width: 110px; }
}

/* SER-14: network demo (switches & VLANs) */
.net-tabs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0 0 1rem; border-bottom: 1px solid rgba(159, 177, 188, 0.2); }
.net-tab { padding: 0.55rem 0.9rem; border-radius: 10px 10px 0 0; color: inherit; text-decoration: none; display: inline-flex; gap: 0.5rem; align-items: center; border-bottom: 2px solid transparent; }
.net-tab.is-active { border-bottom-color: var(--accent, #2bb8b0); font-weight: 700; }
.net-tab-note { font-size: 0.75rem; opacity: 0.7; font-weight: 400; }
.demo-badge { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; background: #e3a33b; color: #1d1405; border-radius: 999px; padding: 0.1rem 0.5rem; }
.demo-banner { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: baseline; padding: 0.8rem 1rem; margin: 0 0 1rem; border-radius: 12px; border: 1.5px dashed #e3a33b; background: rgba(227, 163, 59, 0.1); }
.demo-banner strong { color: #f2c27c; text-transform: uppercase; letter-spacing: 0.08em; }
.vlan-table-wrap { overflow-x: auto; }
.vlan-table { width: 100%; border-collapse: collapse; }
.vlan-table th, .vlan-table td { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid rgba(159, 177, 188, 0.15); vertical-align: middle; }
.vlan-table input[type=text] { max-width: 14rem; }
.vlan-swatch { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 3px; background: var(--vc); vertical-align: middle; }
.vlan-chip { display: inline-block; padding: 0.05rem 0.5rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: color-mix(in srgb, var(--vc) 22%, transparent); color: color-mix(in srgb, var(--vc) 70%, white); border: 1px solid color-mix(in srgb, var(--vc) 55%, transparent); white-space: nowrap; }
.vlan-add { margin-top: 0.8rem; align-items: flex-end; }
.switch-head { display: flex; gap: 0.4rem 1rem; align-items: baseline; flex-wrap: wrap; }
.switch-head h2 { margin: 0; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.05em; }
.switch-face { display: flex; gap: 0.9rem; flex-wrap: wrap; padding: 0.9rem; margin-top: 0.7rem; border-radius: 10px; background: linear-gradient(180deg, #1b252c, #10171c); border: 1px solid rgba(159, 177, 188, 0.25); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05); overflow-x: auto; }
.port-block { display: grid; grid-template-rows: repeat(2, auto); grid-auto-flow: column; gap: 4px; }
.sw-port { position: relative; width: 32px; height: 28px; border-radius: 4px; display: flex; align-items: flex-end; justify-content: center; text-decoration: none; color: #dfe8ed; font-size: 0.62rem; font-weight: 700; background: #0b1013; border: 2px solid color-mix(in srgb, var(--vc) 35%, #2a3740); opacity: 0.55; }
.sw-port.is-up { opacity: 1; background: color-mix(in srgb, var(--vc) 35%, #0b1013); border-color: var(--vc); }
.sw-port.is-trunk { background-image: repeating-linear-gradient(135deg, transparent 0 4px, rgba(255, 255, 255, 0.18) 4px 7px); }
.sw-port.is-off { border-style: dashed; opacity: 0.35; }
.sw-port.sfp { width: 40px; border-radius: 2px; }
.sw-port.is-selected { outline: 3px solid #fff; outline-offset: 1px; z-index: 1; }
.sw-port:hover, .sw-port:focus-visible { outline: 2px solid #e6eef2; outline-offset: 1px; }
.sw-port-n { line-height: 1; padding-bottom: 2px; }
.sw-poe { position: absolute; top: 0; right: 1px; font-size: 0.55rem; }
.sfp-block { padding-left: 0.6rem; border-left: 1px solid rgba(159, 177, 188, 0.2); }
.switch-legend { margin: 0.5rem 0 0; }
.port-editor { border-color: var(--accent, #2bb8b0); }
@media (max-width: 700px) {
  .demo-devices thead { display: none; }
  .demo-devices tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 0.6rem; padding: 0.6rem 0; border-bottom: 1px solid rgba(159, 177, 188, 0.15); }
  .demo-devices td { border: 0; padding: 0.1rem 0; }
  .demo-devices td[data-label="Change"] { grid-column: 1 / -1; }
}

/* SER-29: slim Sentinel banner on every signed-in page */
.console-banner { --sb: 0; position: relative; height: 140px; overflow: hidden; background: #0c1418; isolation: isolate; clip-path: inset(0 0 calc(var(--sb) * 100%) 0); }
.console-banner-media, .console-banner-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.console-banner-media img { object-fit: cover; object-position: 50% 66%; transform: translateY(calc(var(--sb) * 28px)) scale(calc(1 + var(--sb) * 0.06)); transform-origin: center top; }
.console-banner-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(8, 14, 18, 0.92) 0%, rgba(8, 14, 18, 0.55) 45%, rgba(8, 14, 18, 0.15) 100%), linear-gradient(0deg, rgba(8, 14, 18, 0.7), transparent 55%); }
.console-banner-copy { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; justify-content: center; gap: 0.35rem; padding: 0 max(1.1rem, calc((100% - 1180px) / 2)); opacity: calc(1 - var(--sb) * 1.6); transform: translateY(calc(var(--sb) * -18px)); }
.console-banner-word { font-weight: 800; letter-spacing: 0.32em; text-transform: uppercase; color: #e9f1f4; font-size: clamp(1.4rem, 3.2vw, 2.4rem); line-height: 1; text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6); }
.console-banner-word::after { content: ""; display: block; width: 4.5rem; height: 2px; margin-top: 0.55rem; background: linear-gradient(90deg, #2bb8b0, transparent); }
.console-banner-kicker { color: #8fe3dc; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.24em; text-transform: uppercase; }
@media (max-width: 700px) {
  .console-banner { height: 90px; }
  .console-banner-media img { object-position: 70% 92%; }
  .console-banner-word { font-size: 1.25rem; letter-spacing: 0.26em; }
  .console-banner-word::after { margin-top: 0.4rem; width: 3rem; }
  .console-banner-kicker { font-size: 0.62rem; letter-spacing: 0.18em; }
  .console-banner-copy { padding-top: env(safe-area-inset-top, 0px); }
}
@media (prefers-reduced-motion: reduce) {
  .console-banner-media img, .console-banner-copy { transform: none; }
}
@media print { .console-banner { display: none; } }

/* SER-14: VLAN colour classes (no inline styles under the CSP) */
.vc-0 { --vc: #7b8794; }
.vc-1 { --vc: #2bb8b0; }
.vc-2 { --vc: #e5534b; }
.vc-3 { --vc: #4f8df5; }
.vc-4 { --vc: #e3a33b; }
.vc-5 { --vc: #9b6cf0; }
.vc-6 { --vc: #3fb950; }
.vc-7 { --vc: #d16ba5; }
.vc-8 { --vc: #c9a227; }
.vc-9 { --vc: #5ac8fa; }
.vc-10 { --vc: #ff8c42; }
.sw-port.row-top { grid-row: 1; }
.sw-port.row-bottom { grid-row: 2; }
.demo-devices td { white-space: nowrap; }
.demo-devices td[data-label="Device"] { white-space: normal; min-width: 9rem; }
.demo-devices .inline-form { flex-wrap: nowrap; align-items: center; gap: 0.4rem; }
.demo-devices select { min-width: 9.5rem; }
.demo-devices select { min-width: 0; width: auto; max-width: 11rem; }
.vlan-add { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.vlan-add label { flex: 0 1 12rem; }

/* SER-29: per-organisation light console (Admin › Organisations › Console look = Light).
   Scoped to html.org-light, which is only set for signed-in users of a light-theme org. */
html.org-light[data-preset], html.org-light {
  color-scheme: light;
  --bg: #ffffff;
  --bg-warm: #f5f7f9;
  --surface: #ffffff;
  --surface-2: #f3f6f8;
  --border: #d5dde3;
  --text: #16232b;
  --muted: #51626d;
  --accent: #0e7f86;
  --accent-hover: #0b6c72;
  --accent-ink: #ffffff;
  --accent-dark: #0e7f86;
  --danger: #c62f3d;
  --success: #1c7c4a;
  --info: #7a5a1c;
  --shadow: 0 6px 20px rgba(22, 35, 43, 0.08);
  --glow: rgba(14, 127, 134, 0.14);
  --blob-1: transparent;
  --blob-2: transparent;
  --blob-3: transparent;
  --topbar-bg: rgba(255, 255, 255, 0.94);
  --glass: #ffffff;
  --glass-border: #dde4e9;
}
html.org-light body { background: #ffffff; color: var(--text); }
html.org-light body::before, html.org-light body::after { background: #ffffff; animation: none; }
html.org-light .topbar { box-shadow: 0 1px 0 #e3e9ed, 0 4px 14px rgba(22, 35, 43, 0.05); }
html.org-light .brand, html.org-light .wordmark { color: #16232b; }
html.org-light .nav-menu { background: #ffffff; }
html.org-light .nav-item:hover, html.org-light .nav-item:focus-visible, html.org-light .nav-item.is-active,
html.org-light .nav-link:hover, html.org-light .nav-group-btn:hover, html.org-light .nav-group-btn:focus-visible { background: #eef3f6; }
html.org-light .settings-block, html.org-light .panel, html.org-light .stat-chip, html.org-light .tile,
html.org-light .org-person, html.org-light .flash { background: #ffffff; border-color: #dde4e9; box-shadow: var(--shadow); backdrop-filter: none; -webkit-backdrop-filter: none; }
html.org-light .org-access { background: #f8fafb; border-color: #dde4e9; }
html.org-light .tile::before { opacity: 0.35; }
html.org-light .tile-icon { background: #e6f3f4; box-shadow: inset 0 0 0 1px #c6e3e5; }
html.org-light input[type="text"], html.org-light input[type="email"], html.org-light input[type="password"],
html.org-light input[type="url"], html.org-light input[type="search"], html.org-light input[type="number"],
html.org-light textarea, html.org-light select { background-color: #ffffff; border-color: #c4cfd6; color: #16232b; }
html.org-light .btn { background: #f3f6f8; border-color: #c4cfd6; color: #16232b; }
html.org-light .btn.primary { background: var(--accent); border-color: var(--accent); color: #ffffff; box-shadow: 0 6px 16px rgba(14, 127, 134, 0.22); }
html.org-light .btn.danger-btn { color: #b3261e; border-color: #e3a6a0; background: #fff6f5; }
html.org-light .flash-error { background: #fff1f1; border-color: #e3a6a0; }
html.org-light .org-pill { background: #e2f3f4; color: #0b5f65; }
html.org-light .org-pill.org-pill-warn { background: #fff1dd; color: #8a5300; }
html.org-light .org-brand { border-left-color: #dde4e9; }
html.org-light .org-brand-name { color: #16232b; }
/* The WHS logo is dark text on transparent: on white it needs no plate, just a hairline. */
html.org-light .org-brand-logo, html.org-light .org-console-logo { background: #ffffff; box-shadow: inset 0 0 0 1px #e3e9ed; }
html.org-light a { color: var(--accent); }
html.org-light .tile, html.org-light .tile:hover, html.org-light .brand, html.org-light .nav-link, html.org-light .nav-item, html.org-light .btn { text-decoration: none; }
html.org-light .tile, html.org-light .nav-link, html.org-light .nav-item { color: var(--text); }
html.org-light .nav-link, html.org-light .nav-group-btn, html.org-light .nav-item { color: #3c4d57; }
html.org-light .nav-link.is-active, html.org-light .nav-item.is-active { color: #16232b; }
/* Video stays on dark tiles. */
html.org-light .camera-card, html.org-light .cwall-grid, html.org-light .camera-lightbox-video { background-color: #0b1013; }
html.org-light .camera-card .camera-name, html.org-light .cwall-name { color: #ffffff; }
/* The Sentinel banner stays as it is (dark image) above the white console. */
html.org-light .console-banner { border-bottom: 1px solid #dde4e9; }

/* SER-29: faint client-logo watermark behind the light console (Admin › Organisations › Show logo watermark). */
html.org-light body::before, html.org-light body::after { background: none; }
.org-watermark {
  position: fixed;
  inset: 0;
  z-index: -1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  user-select: none;
}
.org-watermark img {
  width: min(56vw, 820px);
  height: auto;
  opacity: 0.07;
  filter: grayscale(0.15);
}
@media (max-width: 700px) {
  .org-watermark img { width: 78vw; opacity: 0.06; }
}
@media print { .org-watermark { display: none; } }
/* Cards let the mark show through a touch; video stays solid. */
html.org-light .settings-block, html.org-light .panel, html.org-light .tile,
html.org-light .org-person, html.org-light .stat-chip { background: rgba(255, 255, 255, 0.84); }
/* Clean white tiles: no coloured corner glow. */
html.org-light .tile::before, html.org-light .tile::after { display: none; }

/* SER-29: the white client console opts out of the browser's forced dark mode
   (Chrome/Samsung "dark mode for web pages"), which otherwise repaints it dark. */
html.org-light, html.org-light[data-preset], html.org-light[data-preset][data-theme] { color-scheme: only light; }
html.org-light body { background-color: #ffffff; color: #16232b; }
@media (prefers-color-scheme: dark) {
  html.org-light, html.org-light[data-preset] { color-scheme: only light; }
  html.org-light body { background-color: #ffffff; color: #16232b; }
}

/* Client Network tab (demo): live stats, topology, chart, port activity. */
.net-stats { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 0 0 1rem; }
.net-stat { display: flex; flex-direction: column; padding: 0.55rem 0.9rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); min-width: 7.5rem; }
.net-stat-k { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.net-stat strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.net-live-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #3fb950; box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.6); animation: net-pulse 2s infinite; }
@keyframes net-pulse { 0% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(63, 185, 80, 0); } 100% { box-shadow: 0 0 0 0 rgba(63, 185, 80, 0); } }
@media (prefers-reduced-motion: reduce) { .net-live-dot { animation: none; } }
.netc [data-live], .netc [data-group], .netc [data-link], .net-table td { font-variant-numeric: tabular-nums; }
.topo-chain { display: flex; align-items: stretch; gap: 0; flex-wrap: nowrap; overflow-x: auto; padding: 0.4rem 0 0.8rem; }
.topo-node { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.15rem; padding: 0.7rem 0.9rem; border-radius: 14px; border: 1.5px solid var(--border); background: var(--surface); min-width: 8.5rem; }
.topo-switch { border-color: var(--accent); }
.topo-ico { font-size: 1.4rem; line-height: 1; }
.topo-link { flex: 1 1 4rem; min-width: 4.5rem; display: flex; align-items: center; justify-content: center; position: relative; }
.topo-link::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 2px dashed var(--accent); opacity: 0.7; }
.topo-link-rate { position: relative; background: var(--bg); padding: 0.1rem 0.4rem; border-radius: 8px; font-size: 0.72rem; color: var(--muted); white-space: nowrap; }
.topo-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 0.4rem; }
.topo-col-h { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0.2rem 0 0.5rem; }
.topo-group { border: 1px solid var(--border); border-left: 5px solid var(--vc); border-radius: 12px; padding: 0.6rem 0.8rem; margin-bottom: 0.6rem; background: color-mix(in srgb, var(--vc) 7%, var(--surface)); }
.topo-group header { display: flex; justify-content: space-between; gap: 0.5rem; align-items: baseline; }
.topo-count { font-weight: 800; font-size: 0.85rem; background: color-mix(in srgb, var(--vc) 22%, transparent); border-radius: 999px; padding: 0 0.5rem; }
.topo-vlans { margin: 0.35rem 0 0.2rem; display: flex; flex-wrap: wrap; gap: 0.25rem; }
.topo-devs { margin: 0.1rem 0; }
.topo-rate { margin: 0.2rem 0 0; font-weight: 700; }
.net-top { list-style: none; margin: 0 0 0.8rem; padding: 0; display: grid; gap: 0.35rem; }
.net-top li { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "sw name rate" "sw where rate"; column-gap: 0.6rem; align-items: center; padding: 0.45rem 0.6rem; border-radius: 10px; border: 1px solid var(--border); }
.net-top li .vlan-swatch { grid-area: sw; }
.net-top-name { grid-area: name; font-weight: 600; }
.net-top li .muted { grid-area: where; }
.net-top li strong { grid-area: rate; font-variant-numeric: tabular-nums; }
.net-chart-wrap { border: 1px solid var(--border); border-radius: 12px; padding: 0.5rem 0.6rem 0.3rem; background: var(--surface); }
.net-chart { width: 100%; height: 220px; display: block; }
.net-chart .net-grid { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.net-chart .net-line { fill: none; stroke: var(--vc); stroke-width: 2.2; stroke-linejoin: round; }
.net-chart-axis { display: flex; justify-content: space-between; }
.net-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; padding: 0; margin: 0.6rem 0 0; font-size: 0.85rem; }
.net-legend .vlan-swatch { margin-right: 0.35rem; }
.sw-act { position: absolute; left: 3px; right: 3px; top: 2px; height: 3px; border-radius: 2px; background: #3fb950; transform-origin: left center; transform: scaleX(var(--act, 0)); transition: transform 0.6s ease; opacity: 0.95; }
.port-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.6rem 1rem; margin: 0.4rem 0 0.6rem; }
.port-facts dt { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.port-facts dd { margin: 0.1rem 0 0; font-weight: 600; }
.net-viewonly { padding: 0.55rem 0.8rem; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); margin: 0 0 1rem; }
.eyebrow { margin: 0; font-size: 0.85rem; }
@media (max-width: 700px) {
  .topo-chain { flex-direction: column; align-items: stretch; overflow: visible; }
  .topo-node { min-width: 0; }
  .topo-link { min-height: 2.4rem; flex: 0 0 auto; }
  .topo-link::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 2px dashed var(--accent); }
  .net-stat { flex: 1 1 calc(50% - 0.6rem); min-width: 0; }
  .net-chart { height: 180px; }
  .net-table thead { display: none; }
  .net-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0.2rem 0.8rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border); }
  .net-table td { border: 0; padding: 0.1rem 0; }
  .net-table td::before { content: attr(data-label); display: block; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
}
/* White client console: keep demo colours readable on white. */
html.org-light .vlan-chip { color: color-mix(in srgb, var(--vc) 72%, #000); background: color-mix(in srgb, var(--vc) 14%, #fff); }
html.org-light .demo-banner { background: #fff7e8; border-color: #d99a2b; }
html.org-light .demo-banner strong { color: #8a5300; }
html.org-light .demo-badge { background: #f3c06a; color: #3d2600; }
html.org-light .net-stat, html.org-light .net-chart-wrap, html.org-light .topo-node { background: rgba(255, 255, 255, 0.9); }
html.org-light .topo-link-rate { background: #ffffff; }
html.org-light .topo-group { background: color-mix(in srgb, var(--vc) 6%, #ffffff); }
html.org-light .net-tabs { border-bottom-color: #dde4e9; }
html.org-light .vlan-table th, html.org-light .vlan-table td { border-color: #e3e9ed; }

/* Phones / VoIP demo. */
.section-head-row { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.door-card { border: 1px solid var(--border); border-radius: 14px; padding: 0.8rem 0.9rem; margin: 0 0 0.9rem; }
.door-card h3 { margin: 0 0 0.6rem; font-size: 1rem; }
.door-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.8rem; }
.door-plan { border: 1px dashed var(--border); border-radius: 12px; padding: 0.6rem 0.7rem; }
.door-plan.is-active { border-style: solid; border-color: var(--accent); }
.door-plan header { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.4rem; }
.door-plan header .btn { margin-left: auto; }
.ring-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.4rem; }
.ring-step { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; align-items: start; }
.ring-step > div { display: flex; flex-direction: column; }
.ring-n { display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 0.8rem; }
.ring-hik .ring-n, .sim-hik .ring-n { background: #e5534b; color: #fff; }
.sim-box { margin-top: 1rem; border: 1.5px solid var(--accent); border-radius: 14px; padding: 0.8rem 0.9rem; }
.sim-box h3 { margin: 0; font-size: 1rem; }
.sim-controls { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: flex-end; margin: 0.5rem 0; }
.sim-controls label { flex: 1 1 12rem; }
.sim-stage { display: grid; gap: 0.45rem; }
.sim-head { margin: 0.2rem 0; font-weight: 700; }
.sim-step { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; padding: 0.55rem 0.6rem; border-radius: 12px; border: 1px solid var(--border); opacity: 0.6; transition: opacity 0.3s, border-color 0.3s, background-color 0.3s; }
.sim-body { display: flex; flex-direction: column; gap: 0.2rem; }
.sim-step.is-ringing { opacity: 1; border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.sim-step.is-missed { opacity: 0.75; }
.sim-step.is-missed .sim-count { color: #c0392b; }
.sim-step.is-answered { opacity: 1; border-color: #1c7c4a; background: rgba(28, 124, 74, 0.1); }
.sim-phones { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.sim-phone { font-size: 0.78rem; padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid var(--border); }
.sim-phone.is-ringing { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, transparent); animation: sim-ring 0.5s ease-in-out infinite alternate; }
.sim-phone.is-answered { border-color: #1c7c4a; background: #1c7c4a; color: #fff; }
@keyframes sim-ring { from { transform: rotate(-2deg); } to { transform: rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .sim-phone.is-ringing { animation: none; } }
.sim-count { font-weight: 700; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.sim-end { margin: 0.3rem 0 0; font-weight: 700; }
.hours-form { margin-top: 0.8rem; flex-wrap: wrap; align-items: center; }
.plan-step { margin-bottom: 0.6rem; }
.plan-targets { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.4rem; }
.plan-ext-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0.15rem 0.8rem; margin: 0.3rem 0; }
.group-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 0.7rem; }
.group-card { border: 1px solid var(--border); border-radius: 12px; padding: 0.6rem 0.8rem; }
.group-card header { display: flex; gap: 0.6rem; align-items: baseline; flex-wrap: wrap; }
.group-card header .btn { margin-left: auto; }
.ph-status { font-size: 0.78rem; font-weight: 700; padding: 0.05rem 0.5rem; border-radius: 999px; white-space: nowrap; }
.ph-status::before { content: "●"; margin-right: 0.3rem; }
.ph-registered { color: #1c7c4a; background: rgba(28, 124, 74, 0.12); }
.ph-offline { color: #b3261e; background: rgba(179, 38, 30, 0.1); }
.ph-dnd { color: #8a5300; background: rgba(227, 163, 59, 0.18); }
html:not(.org-light) .ph-registered { color: #5fd68e; }
html:not(.org-light) .ph-offline { color: #ff8a80; }
html:not(.org-light) .ph-dnd { color: #f2c27c; }
.ext-table code { font-size: 0.82rem; }
@media (max-width: 700px) {
  .sim-controls .btn { flex: 1 1 100%; }
  .ext-table tr { grid-template-columns: 1fr 1fr; }
}
/* Plan editor: stack each step's parts instead of a stretched flex row. */
.org-access.plan-step { display: block; }
.plan-step > * + * { margin-top: 0.55rem; }
.plan-targets { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1.2rem; }
.plan-targets > .muted { flex-basis: 100%; }
.plan-targets details { flex-basis: 100%; }
.plan-step .org-grid { align-items: start; max-width: 520px; }
.plan-step .org-grid label, .plan-hik > label:not(.check) { display: grid; gap: 0.25rem; }
.plan-hik > label:not(.check) { max-width: 250px; }
.plan-hik > label.check { display: inline-flex; margin-right: 1.2rem; }
.plan-targets { display: block; text-align: left; width: 100%; }
.plan-targets > label.check { display: inline-flex; margin: 0.15rem 1.2rem 0.15rem 0; }
.plan-targets > .muted { display: block; }
.plan-targets details { display: block; width: 100%; margin-top: 0.3rem; }
.plan-targets .plan-ext-grid { width: 100%; justify-items: start; }
.org-access.plan-step { min-width: 0; min-inline-size: 0; }
@media (max-width: 600px) {
  .plan-ext-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-step .org-grid { grid-template-columns: minmax(0, 1fr); }
  .plan-step label.check { min-width: 0; flex-wrap: wrap; column-gap: 0.35rem; }
}

/* ---- Messages, Call admin & Requests (msg1) ---- */
.nav-unread { display: inline-grid; place-items: center; min-width: 1.15rem; height: 1.15rem; padding: 0 0.32rem; margin-left: 0.35rem; border-radius: 999px; background: var(--danger); color: #fff; font-size: 0.68rem; font-weight: 800; line-height: 1; vertical-align: middle; }
.nav-unread[hidden] { display: none; }
.org-title { font-weight: 700; color: var(--text); }
.support-card { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1rem 1.5rem; align-items: start; border: 1px solid color-mix(in srgb, var(--danger) 35%, var(--border)); border-radius: 14px; padding: 1rem 1.2rem; margin: 0 0 1rem; background: color-mix(in srgb, var(--danger) 6%, var(--surface)); }
.support-card h2 { margin: 0 0 0.3rem; font-size: 1.1rem; }
.support-form { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.6rem; }
.support-form input { flex: 1 1 14rem; min-width: 0; }
.btn.support-call-btn { font-weight: 800; }
.support-contact { margin: 0; display: grid; gap: 0.35rem; font-size: 0.9rem; }
.support-contact div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.5rem; }
.support-contact dt { color: var(--muted); }
.support-contact dd { margin: 0; overflow-wrap: anywhere; }
.msg-layout { display: grid; grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); gap: 1rem; align-items: start; }
.msg-list { margin: 0; }
.msg-threads, .req-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.msg-thread-link, .req-row { position: relative; display: grid; gap: 0.15rem; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; background: var(--surface); }
.msg-thread-link:hover, .req-row:hover { border-color: var(--accent); }
.msg-thread-link.is-active, .req-row.is-active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.msg-thread-link.is-unread .msg-thread-subject, .req-row.is-unread .req-row-title { font-weight: 800; }
.msg-thread-link .nav-unread { position: absolute; top: 0.5rem; right: 0.5rem; }
.msg-thread-subject { padding-right: 1.6rem; overflow-wrap: anywhere; }
.msg-main { display: grid; gap: 1rem; min-width: 0; }
.msg-main > .settings-block { margin: 0; }
.msg-back { display: none; margin-bottom: 0.4rem; }
.msg-posts { list-style: none; margin: 0.6rem 0; padding: 0; display: grid; gap: 0.55rem; max-height: 60vh; overflow-y: auto; }
.msg-post { max-width: 85%; padding: 0.55rem 0.75rem; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); }
.msg-post.is-mine { justify-self: end; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.msg-post.is-support:not(.is-mine) { border-left: 3px solid var(--accent); }
.msg-post.is-status { max-width: 100%; justify-self: center; background: transparent; border-style: dashed; font-size: 0.88rem; }
.msg-post.is-new { animation: msg-in 0.4s ease-out; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg-post-head { margin-bottom: 0.2rem; }
.msg-post-body, .req-desc { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-reply { display: flex; gap: 0.5rem; align-items: flex-end; }
.msg-reply textarea { flex: 1; min-width: 0; }
.msg-to { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }
.req-detail-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.7rem; }
.req-detail-head h2 { margin: 0; }
.req-desc { padding: 0.6rem 0.8rem; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); }
.req-row { grid-template-columns: minmax(0, 1fr) auto; }
.req-row > .muted { grid-column: 1 / -1; }
.req-status, .req-prio { display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; border-radius: 999px; padding: 0.12rem 0.55rem; white-space: nowrap; }
.req-new { background: rgba(77, 160, 255, 0.2); color: #9cc8ff; }
.req-in_progress { background: rgba(231, 160, 60, 0.2); color: #f2c27c; }
.req-done { background: rgba(60, 200, 120, 0.2); color: #8fe3b0; }
.req-declined { background: rgba(160, 160, 170, 0.2); color: #c3c3cc; }
.req-prio { background: transparent; border: 1px solid var(--border); color: var(--muted); }
.req-prio-high { border-color: var(--danger); color: var(--danger); }
.req-admin-grid { max-width: 260px; }
.user-profile-edit { margin-top: 0.3rem; }
.user-profile-edit summary { cursor: pointer; font-size: 0.85rem; }
.user-profile-edit form { margin-top: 0.4rem; max-width: 280px; }
html.org-light .req-new { background: #e4efff; color: #1b4f99; }
html.org-light .req-in_progress { background: #fff1dd; color: #8a5300; }
html.org-light .req-done { background: #e2f6ea; color: #17643b; }
html.org-light .req-declined { background: #eef0f2; color: #4c5861; }
html.org-light .support-card { background: #fff8f7; border-color: #f0c9c4; }
html.org-light .msg-thread-link, html.org-light .req-row { background: #ffffff; }
html.org-light .msg-post { background: #f5f8fa; }
html.org-light .msg-post.is-mine { background: #e6f4f5; border-color: #b9dfe1; }
@media (max-width: 760px) {
  .support-card { grid-template-columns: minmax(0, 1fr); }
  .msg-layout { grid-template-columns: minmax(0, 1fr); }
  .msgs.has-thread .msg-list { display: none; }
  .msgs.has-thread .msg-back { display: inline-block; }
  .msg-post { max-width: 94%; }
  .msg-reply { flex-direction: column; align-items: stretch; }
}

/* ---- Camera access: whole site or single cameras (cam1) ---- */
.cam-access-list { display: grid; gap: 0.6rem; }
.cam-access-user { border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.cam-access-user > summary { cursor: pointer; display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 0.8rem; padding: 0.7rem 0.9rem; list-style: none; }
.cam-access-user > summary::-webkit-details-marker { display: none; }
.cam-access-user > summary::before { content: "▸"; color: var(--muted); transition: transform 0.15s; }
.cam-access-user[open] > summary::before { transform: rotate(90deg); }
.cam-access-pills { flex-basis: 100%; }
.cam-access-form { padding: 0 0.9rem 0.9rem; display: grid; gap: 0.8rem; }
.cam-access-sites { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0.7rem; align-items: start; }
.cam-site { border: 1px solid var(--border); border-radius: 10px; padding: 0.6rem 0.8rem; margin: 0; min-width: 0; background: var(--surface); }
.cam-site legend { font-weight: 700; padding: 0 0.3rem; }
.cam-site.is-whole, .cam-site:has([data-site-all]:checked) { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.cam-site-all { font-weight: 700; }
.cam-site-cams { display: grid; gap: 0.25rem; margin: 0.35rem 0 0.1rem 1.6rem; padding-left: 0.6rem; border-left: 2px solid var(--border); }
.cam-site-cams .check { font-weight: 500; }
.cam-site-count { margin: 0.3rem 0 0; }
.cam-access-org .cam-site { margin-bottom: 0.5rem; }
