/* ===== Токены ===== */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease: cubic-bezier(.22, 1, .36, 1);

  /* Светлая тема */
  --bg: #eef0f5;
  --text: #1d1d1f;
  --text-2: rgba(29, 29, 31, .62);
  --text-3: rgba(29, 29, 31, .42);
  --glass: rgba(255, 255, 255, .52);
  --glass-strong: rgba(255, 255, 255, .72);
  --glass-border: rgba(255, 255, 255, .75);
  --glass-edge: rgba(0, 0, 0, .06);
  --highlight: rgba(255, 255, 255, .9);
  --shadow: 0 1px 1px rgba(0, 0, 0, .04), 0 12px 40px -12px rgba(30, 40, 80, .22);
  --track: rgba(120, 120, 128, .14);
  --online: #30d158;
  --offline: rgba(120, 120, 128, .55);
  --blob-opacity: .55;
}

:root[data-theme="dark"] {
  --bg: #07080c;
  --text: #f5f5f7;
  --text-2: rgba(245, 245, 247, .64);
  --text-3: rgba(245, 245, 247, .4);
  --glass: rgba(36, 38, 46, .42);
  --glass-strong: rgba(44, 46, 56, .66);
  --glass-border: rgba(255, 255, 255, .12);
  --glass-edge: rgba(255, 255, 255, .04);
  --highlight: rgba(255, 255, 255, .22);
  --shadow: 0 1px 1px rgba(0, 0, 0, .3), 0 18px 50px -14px rgba(0, 0, 0, .7);
  --track: rgba(120, 120, 128, .24);
  --blob-opacity: .42;
}

/* Цветовые пресеты */
:root, :root[data-accent="ocean"] { --accent: #0a84ff; --accent-2: #5ac8fa; --blob-1: #0a84ff; --blob-2: #64d2ff; --blob-3: #5e5ce6; }
:root[data-accent="violet"] { --accent: #8e5cf7; --accent-2: #da8fff; --blob-1: #8e5cf7; --blob-2: #ff6fd8; --blob-3: #5e5ce6; }
:root[data-accent="mint"]   { --accent: #00b386; --accent-2: #63e6be; --blob-1: #00c7a3; --blob-2: #9be15d; --blob-3: #30b0c7; }
:root[data-accent="sunset"] { --accent: #ff7a1a; --accent-2: #ffb340; --blob-1: #ff6b3d; --blob-2: #ffcc4d; --blob-3: #ff375f; }

/* ===== База ===== */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -.01em;
  transition: background .6s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.hidden { display: none !important; }

/* Плавающие цветные пятна под стеклом */
.backdrop { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.blob {
  position: absolute; width: 52vmax; height: 52vmax; border-radius: 50%;
  filter: blur(90px); opacity: var(--blob-opacity);
  transition: background 1s var(--ease), opacity .6s;
  animation: drift 26s var(--ease) infinite alternate;
}
.blob.b1 { background: var(--blob-1); top: -18vmax; left: -12vmax; }
.blob.b2 { background: var(--blob-2); bottom: -22vmax; right: -14vmax; animation-duration: 32s; animation-delay: -8s; }
.blob.b3 { background: var(--blob-3); top: 30%; left: 45%; width: 36vmax; height: 36vmax; animation-duration: 38s; animation-delay: -16s; }
@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(8vmax, 6vmax) scale(1.12); }
  100% { transform: translate(-6vmax, 10vmax) scale(.94); }
}

/* ===== Liquid glass ===== */
.glass {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow), inset 0 1px 0 var(--highlight), inset 0 0 0 1px var(--glass-edge);
  border-radius: var(--radius-lg);
  isolation: isolate;
}
/* Блик по верхней кромке и мягкое преломление */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background:
    radial-gradient(120% 60% at 20% -10%, var(--highlight), transparent 55%),
    linear-gradient(180deg, rgba(255, 255, 255, .08), transparent 40%);
  opacity: .55;
}
/* Блик, следующий за курсором (координаты ставит JS) */
.glass.interactive::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .22), transparent 60%);
  opacity: 0; transition: opacity .35s var(--ease);
}
.glass.interactive:hover::after { opacity: 1; }
.glass.interactive { transition: transform .5s var(--spring), box-shadow .4s var(--ease); }
.glass.interactive:hover { transform: translateY(-3px) scale(1.01); }
.glass.interactive:active { transform: scale(.985); transition-duration: .15s; }

/* ===== Каркас ===== */
.shell { display: grid; grid-template-columns: 248px 1fr; gap: 20px; padding: 20px; min-height: 100vh; }
.sidebar {
  position: sticky; top: 20px; height: calc(100vh - 40px);
  display: flex; flex-direction: column; padding: 22px 14px; border-radius: var(--radius-xl);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 22px; font-weight: 700; font-size: 17px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px -6px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .5);
  transition: background .8s var(--ease);
}
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: var(--radius-md);
  color: var(--text-2); font-weight: 500; transition: background .3s var(--ease), color .3s;
}
.nav a svg { width: 20px; height: 20px; flex: none; }
.nav a:hover { background: var(--track); color: var(--text); }
.nav a.active { background: var(--glass-strong); color: var(--accent); box-shadow: inset 0 1px 0 var(--highlight), 0 4px 14px -8px rgba(0, 0, 0, .3); }
.sidebar-foot { margin-top: auto; padding: 12px 10px 0; font-size: 13px; color: var(--text-3); display: flex; flex-direction: column; gap: 10px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 500; text-align: left; }

.main { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 6px 4px 0; }
.title { font-size: 34px; font-weight: 700; letter-spacing: -.03em; margin: 0; }
.subtitle { color: var(--text-2); margin: 4px 0 0; font-size: 15px; }

/* ===== Сегментированный переключатель со скользящей «пилюлей» ===== */
.segmented { position: relative; display: inline-flex; padding: 4px; border-radius: 14px; gap: 2px; }
.segmented button {
  position: relative; z-index: 1; border: 0; background: none; padding: 8px 16px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--text-2); transition: color .3s; white-space: nowrap;
}
.segmented button.on { color: var(--text); }
.segmented .pill {
  position: absolute; top: 4px; bottom: 4px; left: 0; border-radius: 10px; background: var(--glass-strong);
  box-shadow: 0 3px 10px -3px rgba(0, 0, 0, .25), inset 0 1px 0 var(--highlight);
  transition: transform .55s var(--spring), width .55s var(--spring);
}

/* ===== Сетки и карточки ===== */
.grid { display: grid; gap: 18px; }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid.devices { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid.two { grid-template-columns: 1.15fr 1fr; }
.card { padding: 22px; }
.card h3 { margin: 0 0 16px; font-size: 17px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.card h3 small { font-weight: 500; color: var(--text-3); font-size: 13px; }

.kpi-label { color: var(--text-2); font-size: 13px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-size: clamp(24px, 2.4vw, 34px); font-weight: 700; letter-spacing: -.03em; margin-top: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi-value.small { font-size: 22px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-hint { color: var(--text-3); font-size: 13px; margin-top: 6px; }

.device-card { display: flex; flex-direction: column; gap: 14px; cursor: pointer; }
.device-head { display: flex; align-items: center; gap: 12px; }
.device-icon {
  width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  box-shadow: 0 8px 20px -10px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.device-name { font-weight: 600; font-size: 16px; }
.device-sub { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.device-active { font-size: 26px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--offline); }
.dot.on { background: var(--online); box-shadow: 0 0 0 0 var(--online); animation: pulse 2.2s infinite; }
.dot.warn { background: #ff9f0a; }
.dot.removed { background: #ff453a; }
.device-card.removed { opacity: .6; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(48, 209, 88, .55); }
  70% { box-shadow: 0 0 0 8px rgba(48, 209, 88, 0); }
  100% { box-shadow: 0 0 0 0 rgba(48, 209, 88, 0); }
}

/* Полоски «программы» */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.bar-name { font-size: 14px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.bar-name i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.bar-time { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.bar-fill { height: 100%; border-radius: inherit; width: 0; transition: width 1.1s var(--ease); }

/* Окна */
.list { display: flex; flex-direction: column; }
.list-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--track); }
.list-row:last-child { border-bottom: 0; }
.list-title { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-app { font-size: 12px; color: var(--text-3); }
.list-time { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* Столбики по дням */
.chart { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding-top: 8px; }
.col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; justify-content: flex-end; min-width: 0; }
.col-bar {
  width: 100%; max-width: 38px; border-radius: 10px 10px 6px 6px; height: 0;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: height 1s var(--spring);
}
.col-label { font-size: 11px; color: var(--text-3); white-space: nowrap; }
.col:hover .col-bar { filter: brightness(1.12); }

/* Хронология */
.timeline { display: flex; flex-direction: column; gap: 10px; }
.tl-row { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 12px; }
.tl-label { font-size: 12px; color: var(--text-2); }
.tl-track { position: relative; height: 26px; border-radius: 8px; background: var(--track); overflow: hidden; }
.tl-seg { position: absolute; top: 0; bottom: 0; min-width: 1px; transform-origin: left; animation: grow .9s var(--ease) both; }
@keyframes grow { from { transform: scaleX(0); opacity: 0; } }
.tl-axis { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-3); padding-left: 108px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }

/* ===== Формы и кнопки ===== */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: var(--text-2); font-weight: 500; }
.input, select.input {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-md); border: 1px solid var(--glass-border);
  background: var(--glass-strong); outline: none; transition: box-shadow .3s, border-color .3s;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.btn {
  border: 0; padding: 13px 20px; border-radius: var(--radius-md); font-weight: 600; color: #fff;
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  box-shadow: 0 10px 24px -12px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .4s var(--spring), filter .3s;
}
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .6; }
.btn.ghost { background: var(--glass-strong); color: var(--text); box-shadow: inset 0 1px 0 var(--highlight); }

/* Вход */
.login-wrap { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 18px; padding: 20px; }
.credit { margin-top: auto; padding: 18px 4px 4px; text-align: center; font-size: 12px; color: var(--text-3); }
.credit a { color: inherit; text-decoration: none; white-space: nowrap; }
.credit a:hover { color: var(--accent); }
.login { width: min(400px, 100%); padding: 34px; border-radius: var(--radius-xl); display: flex; flex-direction: column; gap: 18px; }
.login .brand { padding: 0 0 4px; justify-content: center; font-size: 20px; }
.login h1 { margin: 0; text-align: center; font-size: 26px; letter-spacing: -.02em; }
.login p { margin: -8px 0 4px; text-align: center; color: var(--text-2); }
.error { color: #ff453a; font-size: 14px; text-align: center; min-height: 20px; }

/* Настройки */
.settings { display: flex; flex-direction: column; gap: 18px; max-width: 760px; }
.swatches { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.swatch {
  border: 1px solid var(--glass-border); background: var(--glass-strong); border-radius: var(--radius-lg);
  padding: 14px; display: flex; flex-direction: column; gap: 10px; text-align: left;
  transition: transform .45s var(--spring), box-shadow .3s;
}
.swatch:hover { transform: translateY(-2px); }
.swatch.on { box-shadow: 0 0 0 2px var(--sw-accent), 0 10px 26px -14px var(--sw-accent); }
.swatch-preview { height: 54px; border-radius: 12px; }
.swatch-name { font-weight: 600; font-size: 14px; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.muted { color: var(--text-2); font-size: 14px; }
.empty { color: var(--text-3); text-align: center; padding: 30px 0; font-size: 14px; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-weight: 500; font-size: 15px; margin-bottom: 6px; }

/* ===== Анимации появления ===== */
.view { animation: viewIn .6s var(--ease) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(14px) scale(.99); filter: blur(6px); } }
.stagger > * { animation: rise .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.98); } }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--track), transparent, var(--track)); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ===== Таблицы-списки управления ===== */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.rows { display: flex; flex-direction: column; }
.row {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.2fr) auto; gap: 14px; align-items: center;
  padding: 14px 4px; border-bottom: 1px solid var(--track);
}
.row:last-child { border-bottom: 0; }
.row.head { color: var(--text-3); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding-top: 0; }
.row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { color: var(--text-3); font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 500; background: var(--track); color: var(--text-2); white-space: nowrap; }
.chip.accent { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }
.chip.warn { background: rgba(255, 69, 58, .14); color: #ff453a; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 0; display: grid; place-items: center;
  background: var(--track); color: var(--text-2); transition: background .25s, color .25s, transform .3s var(--spring);
}
.icon-btn:hover { background: var(--glass-strong); color: var(--text); transform: scale(1.06); }
.icon-btn.danger:hover { color: #ff453a; }
.icon-btn svg { width: 17px; height: 17px; }
.btn.small { padding: 9px 16px; font-size: 14px; }
.btn.danger { background: linear-gradient(180deg, #ff6961, #ff3b30); box-shadow: 0 10px 24px -12px #ff3b30, inset 0 1px 0 rgba(255, 255, 255, .45); }
select.input.compact { padding: 9px 12px; font-size: 14px; }

/* ===== Модальное окно ===== */
.overlay {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 20px;
  background: rgba(0, 0, 0, .28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  animation: fadeIn .3s var(--ease) both;
}
.overlay.closing { animation: fadeOut .25s var(--ease) both; }
.sheet {
  width: min(480px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 26px; border-radius: var(--radius-xl);
  background: var(--glass-strong); display: flex; flex-direction: column; gap: 16px;
  animation: sheetIn .55s var(--spring) both;
}
.overlay.closing .sheet { animation: sheetOut .25s var(--ease) both; }
.sheet h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.sheet .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 6px; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px) scale(.94); } }
@keyframes sheetOut { to { opacity: 0; transform: translateY(12px) scale(.97); } }

.checks { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; padding: 4px; border-radius: var(--radius-md); background: var(--track); }
.check { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; }
.check:hover { background: var(--glass); }
.check input { accent-color: var(--accent); width: 17px; height: 17px; }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: var(--track); transition: background .3s; cursor: pointer; }
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25); transition: transform .45s var(--spring);
}
.switch input:checked + span { background: var(--online); }
.switch input:checked + span::after { transform: translateX(20px); }

/* ===== Уведомления ===== */
.toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { padding: 11px 18px; border-radius: 99px; font-size: 14px; font-weight: 500; animation: toastIn .5s var(--spring) both; background: var(--glass-strong); }
.toast.err { color: #ff453a; }
.toast.out { animation: toastOut .3s var(--ease) both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-16px) scale(.9); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) scale(.95); } }

.notice { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; }
.notice-icon {
  flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent);
}
.notice-icon svg { width: 20px; height: 20px; }
.notice-title { font-weight: 600; margin-bottom: 3px; }
.notice-text { color: var(--text-2); font-size: 14px; line-height: 1.45; }
.notice-text a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.notice-text a:hover { text-decoration: underline; }

.section-title { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; margin: 6px 4px -6px; }

@media (max-width: 900px) {
  .row { grid-template-columns: minmax(0, 1fr) auto; }
  .row > .hide-sm, .row.head { display: none; }
}

.demo-badge {
  position: fixed; right: 18px; bottom: 18px; padding: 8px 14px; border-radius: 99px; font-size: 13px; font-weight: 600;
  z-index: 10;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===== Мобильные ===== */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; padding: 12px 16px 96px; }
  .sidebar {
    position: fixed; top: auto; bottom: 12px; left: 16px; right: 16px; height: auto; z-index: 20;
    flex-direction: row; padding: 8px; border-radius: 22px;
  }
  .brand, .sidebar-foot { display: none; }
  .nav { flex-direction: row; flex: 1; justify-content: space-around; }
  .nav a { flex-direction: column; gap: 3px; font-size: 11px; padding: 8px 10px; }
  .grid.two { grid-template-columns: 1fr; }
  .title { font-size: 28px; }
  .tl-row { grid-template-columns: 1fr; gap: 4px; }
  .tl-axis { padding-left: 0; }
  .segmented { max-width: 100%; overflow-x: auto; }
}
