@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/manrope-cyrillic-400.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/manrope-cyrillic-500.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/manrope-cyrillic-600.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/manrope-cyrillic-700.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-400.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-500.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-600.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Manrope;
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/static/fonts/manrope-latin-700.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #121212;
  --card: #1c1c1c;
  --card-2: #242424;
  --inset: #161616;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f3f3f3;
  --muted: #a3a3a3;
  --faint: #737373;
  --accent: #ff7a59;
  --accent-2: #f5b942;
  --accent-3: #c084fc;
  --ink: #1a1a1a;
  --warn: #f5b942;
  --danger: #fb7185;
  --radius: 22px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html {
  user-select: none;
  cursor: default;
}
body {
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}
button, input, textarea { font: inherit; color: inherit; }
button, [data-act], .picker-btn, .user-card, .capsule button, label.check { cursor: pointer; }
button:disabled { cursor: progress; opacity: 0.55; }
input, textarea, .link-box { user-select: text; cursor: text; }
svg { display: block; }
* { scrollbar-width: thin; scrollbar-color: #3a3a3a transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #3a3a3a;
  border-radius: 99px;
  border: 2px solid var(--bg);
}

.splash, .login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
}
.spinner {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: #ff7a59;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #242424;
  color: var(--accent);
  border: 1px solid var(--line);
}
.word { display: flex; align-items: center; gap: 12px; }
.word strong, .brand b { font-size: 18px; letter-spacing: -0.03em; font-weight: 600; }
.word span { display: block; color: var(--faint); font-size: 13px; margin-top: 1px; }

.login-card {
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 28px;
}
.login-card h1 { margin: 22px 0 6px; font-size: 32px; letter-spacing: -0.045em; font-weight: 600; }
.lede { margin: 0 0 22px; color: var(--muted); line-height: 1.5; }

.form { display: grid; gap: 14px; }
label { display: grid; gap: 8px; }
label span, .section-label { color: var(--muted); font-size: 14px; }
input, textarea {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--inset);
  outline: none;
}
input { height: 48px; padding: 0 14px; }
textarea {
  min-height: 140px;
  padding: 14px;
  resize: vertical;
  font: 13px/1.5 ui-monospace, "Cascadia Mono", Consolas, monospace;
}
input:focus, textarea:focus { border-color: var(--accent-2); }
.password { position: relative; }
.password input { padding-right: 48px; }
.password.has-tools input { padding-right: 88px; }
.password .gen { right: 44px; }
.ghost-icon, .icon-button, .text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
}
.ghost-icon {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.ghost-icon:hover, .icon-button:hover, .text-button:hover { color: var(--text); background: #2a2a2a; }

.primary, .secondary {
  height: 40px;
  border-radius: 999px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.primary {
  background: #ff7a59;
  color: var(--ink);
  font-weight: 600;
}
.primary:hover { filter: brightness(1.06); }
.secondary {
  background: #2a2a2a;
  border-color: var(--line-strong);
  color: var(--text);
}
.full { width: 100%; }
.row-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.alert {
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(240, 180, 41, 0.12);
  color: #ffe3a3;
  font-size: 14px;
  line-height: 1.45;
}

.shell { min-height: 100vh; }
.brand-side {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 1;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
}
.brand b { white-space: nowrap; }
.top {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  padding: 16px 28px;
  background: var(--bg);
  box-shadow: none;
}
.capsule {
  position: absolute;
  left: 50%;
  top: 18px;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: #242424;
  border: 1px solid var(--line);
}
.capsule button {
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  white-space: nowrap;
}
.capsule button svg { flex: none; color: var(--faint); }
.capsule button.active { background: #3a3a3a; color: var(--text); }
.capsule button.active svg { color: var(--text); }
.capsule button:hover { color: var(--text); }
.page-intro {
  margin: 8px 0 18px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}
.page-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.page-intro h2 { margin: 0; font-size: 28px; letter-spacing: -0.04em; font-weight: 600; }
.page-intro p { margin: 4px 0 0; color: var(--muted); }
.account { position: relative; z-index: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.account-name {
  height: 40px;
  padding: 0 12px 0 6px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #242424;
  color: var(--text);
}
.account-name .avatar { width: 28px; height: 28px; border-radius: 999px; }
.account-name .pixel { width: 20px; height: 20px; }
.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: var(--card);
}
.icon-button.menu-toggle { display: none; }

.page {
  width: min(1080px, calc(100% - 56px));
  margin: 0 auto;
  padding: 12px 0 72px;
}
.stats-row, .actions, .grid-2 { display: grid; gap: 14px; }
.stats-row, .actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.stat-card, .action, .card, .wide {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat-card {
  min-height: 118px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  cursor: default;
}
.stat-card b {
  font-size: 40px;
  letter-spacing: -0.05em;
  font-weight: 650;
  line-height: 1;
}
.stat-card span { color: var(--muted); }
.stat-card b.compact { font-size: 28px; }
.stat-card small { color: var(--faint); font-size: 13px; }
.stat-card.coral b { color: #ff7a59; }
.stat-card.amber b { color: #f5b942; }
.stat-card.violet b { color: #c084fc; }
.section-label { margin: 22px 0 12px; }
.action {
  min-height: 84px;
  padding: 14px 16px;
  text-align: left;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  color: var(--text);
}
.action:hover { background: #242424; }
.action-copy { min-width: 0; }
.action > svg { margin-left: auto; color: var(--faint); flex: none; }
.action h3, .card h3, .wide h3 { margin: 0 0 2px; font-size: 16px; letter-spacing: -0.03em; }
.action p, .muted { margin: 0; color: var(--muted); line-height: 1.45; font-size: 14px; }
.well {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: #2a2a2a;
  color: var(--text);
  flex: none;
}
.well.coral { color: #ff7a59; }
.well.amber { color: #f5b942; }
.well.violet { color: #c084fc; }
.well.mint { color: #34d399; }
.stack { display: grid; gap: 14px; }
.wide, .card { padding: 18px; }
.band {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.card-head, .device, .split, .inline-add, .page-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.card-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: currentColor;
  color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent);
}
.dot.off { color: var(--danger); background: var(--danger); box-shadow: none; }
.host { color: var(--faint); font-size: 14px; }
.host.late { color: #fb7185; }
.monitor { display: grid; gap: 14px; }
.meter { height: 6px; border-radius: 99px; background: #2a2a2a; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: #34d399; border-radius: 99px; }
.meter.hot span { background: #ff7a59; }
.split { align-items: stretch; margin: 14px 0; }
.meta {
  flex: 1;
  background: var(--inset);
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.meta svg { color: var(--accent-2); }
.meta b { color: var(--text); font-weight: 650; }
.devices { display: grid; gap: 8px; }
.device {
  background: var(--inset);
  border-radius: 16px;
  padding: 12px 12px 12px 14px;
}
.device > div:first-child { min-width: 0; flex: 1; }
.device-actions { flex: none; flex-wrap: nowrap; }
.device b { font-weight: 650; }
.device small { display: block; color: var(--faint); margin-top: 2px; }
.config-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.config-row > div:first-child { min-width: 0; }
.config-row b { font-weight: 650; }
.config-row small { display: block; color: var(--faint); margin-top: 2px; }
.inline-add { margin-top: 12px; }
.inline-add input { flex: 1; }
.user-card { width: 100%; color: inherit; text-align: left; }
.person { display: flex; gap: 14px; align-items: center; }
.avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #2a2a2a;
  overflow: hidden;
  flex: none;
}
.avatar.plain { color: var(--accent); }
.pixel { width: 32px; height: 32px; shape-rendering: crispEdges; display: block; }
.person-actions, .device-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }

.search { position: relative; width: min(240px, 46vw); }
.search svg { position: absolute; left: 14px; top: 11px; color: var(--faint); }
.search input {
  height: 40px;
  border-radius: 999px;
  padding-left: 40px;
  background: #242424;
}

.picker { position: relative; }
.picker.open { z-index: 6; }
input[type="hidden"] { display: none; }
.picker-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--inset);
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
}
.picker-btn svg { color: var(--accent-2); flex: none; }
.picker.open .picker-btn { border-color: var(--accent-2); }
.picker-menu {
  display: none;
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  padding: 6px;
  border-radius: 16px;
  background: #242424;
  border: 1px solid var(--line-strong);
  box-shadow: 0 16px 40px rgba(2, 10, 18, 0.45);
}
.picker.open .picker-menu { display: grid; gap: 2px; }
.picker-menu button {
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  border-radius: 10px;
  min-height: 40px;
  padding: 8px 10px;
}
.picker-menu button:hover,
.picker-menu button[aria-current="true"] {
  background: #333333;
  color: var(--text);
}

.when { position: relative; }
.when-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--inset);
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  text-align: left;
}
.when-btn svg { color: var(--accent-2); flex: none; }
.when-label.empty { color: var(--faint); }
.when.open .when-btn { border-color: var(--accent-2); }
.when-pop {
  display: none;
  position: fixed;
  z-index: 40;
  padding: 14px;
  border-radius: 20px;
  background: #242424;
  border: 1px solid var(--line-strong);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
}
.when.open .when-pop { display: block; }
.when-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.when-head b { font-size: 15px; font-weight: 650; letter-spacing: -0.03em; }
.when-head > button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  background: #2a2a2a;
  color: var(--text);
  display: grid;
  place-items: center;
}
.when-body { display: grid; grid-template-columns: 1fr 108px; gap: 12px; align-items: start; }
.when-week, .when-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.when-week span {
  text-align: center;
  color: var(--faint);
  font-size: 12px;
  padding: 4px 0 8px;
}
.when-days span, .when-days button {
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
}
.when-days button.today { box-shadow: inset 0 0 0 1px var(--line-strong); }
.when-days button:hover { background: #333333; }
.when-days button.on, .when-days button.on:hover { background: #ff7a59; color: #1a100c; font-weight: 700; }
.when-clock { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.when-clock small { display: block; color: var(--faint); font-size: 12px; margin: 0 0 6px; text-align: center; }
.when-col {
  height: 204px;
  overflow: auto;
  background: #1c1c1c;
  border-radius: 14px;
  padding: 0;
}
.when-col::before,
.when-col::after {
  content: "";
  display: block;
  height: 86px;
}
.when-col button {
  width: 100%;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
}
.when-col button:hover { background: #333333; color: var(--text); }
.when-col button.on, .when-col button.on:hover { background: #ff7a59; color: #1a100c; font-weight: 700; }
.when-foot { display: flex; justify-content: space-between; margin-top: 8px; }
.when-foot .text-button { height: 36px; padding: 0 8px; border-radius: 10px; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  position: relative;
}
.check input {
  position: absolute;
  opacity: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
}
.tick {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid var(--line-strong);
  background: var(--inset);
  display: grid;
  place-items: center;
  flex: none;
}
.check input:checked + .tick {
  background: var(--accent);
  border-color: transparent;
}
.check input:checked + .tick::after {
  content: "";
  width: 5px;
  height: 9px;
  border: solid var(--ink);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}
.check input:focus-visible + .tick { outline: 2px solid var(--accent-2); outline-offset: 2px; }

.config-layout {
  display: grid;
  grid-template-columns: 196px 1fr;
  gap: 18px;
  align-items: start;
}
.config-layout.single { grid-template-columns: 1fr; }
.config-fields { display: grid; gap: 16px; min-width: 0; }
.config-field { display: grid; gap: 8px; min-width: 0; }
.config-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.config-field-head span { color: var(--muted); font-size: 14px; }
.qr {
  width: 196px;
  height: 196px;
  border-radius: 18px;
  background: #f4f1ea;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.qr img, .qr canvas { display: block; }
.link-box {
  word-break: break-all;
  background: var(--inset);
  border-radius: 16px;
  padding: 14px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  max-height: 120px;
  overflow: auto;
}

.backdrop, .drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
}
.drawer-backdrop { z-index: 10; }
.backdrop { z-index: 20; display: grid; place-items: center; padding: 20px; }
.backdrop.confirm-layer { z-index: 40; }
.confirm-modal { width: min(420px, 100%); }
.modal {
  width: min(560px, 100%);
  background: #1c1c1c;
  border: 1px solid var(--line-strong);
  border-radius: 28px;
  padding: 22px;
  position: relative;
  z-index: 21;
  cursor: default;
}
.modal.wide-modal { width: min(720px, 100%); }
.modal h3 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.04em; }
.modal .lede { margin-bottom: 16px; }
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 11;
  width: min(440px, 100%);
  height: 100%;
  background: #1a1a1a;
  border-left: 1px solid var(--line);
  padding: 22px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.drawer h3 { margin: 0; font-size: 24px; letter-spacing: -0.04em; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  background: #ff7a59;
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 16px;
  font-weight: 700;
  z-index: 14;
}
.empty, .loading-line { padding: 28px 8px; color: var(--muted); text-align: center; }

@media (max-width: 520px) {
  .when-body { grid-template-columns: 1fr; }
  .when-col { height: 120px; }
}
.menu-panel {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  z-index: 16;
  width: min(320px, 86vw);
  height: 100%;
  background: #1a1a1a;
  border-left: 1px solid var(--line);
  padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  flex-direction: column;
  gap: 18px;
  overflow: auto;
  animation: menu-in 0.22s ease;
}
.menu-backdrop { display: none; z-index: 15; }
.menu-panel .card-head h3 { font-size: 22px; }
.menu-nav { display: grid; gap: 6px; }
.menu-nav button {
  height: 48px;
  padding: 0 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  text-align: left;
}
.menu-nav button svg { flex: none; color: var(--faint); }
.menu-nav button.active { background: #3a3a3a; color: var(--text); }
.menu-nav button.active svg { color: var(--text); }
@keyframes menu-in {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
@media (max-width: 980px) {
  .icon-button.menu-toggle { display: grid; }
  .capsule { display: none; }
  .menu-backdrop { display: block; }
  .menu-panel { display: flex; }
  html:has(.menu-panel) { overflow: hidden; }
  .top {
    min-height: 64px;
    padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
    gap: 8px;
  }
  .stats-row, .actions, .grid-2, .config-layout { grid-template-columns: 1fr; }
  .page-intro, .card-head, .device, .inline-add, .band { align-items: stretch; flex-direction: column; }
  .page { width: min(1080px, calc(100% - 32px)); padding-bottom: calc(48px + env(safe-area-inset-bottom)); }
  .page-intro { gap: 14px; }
  .page-intro h2 { font-size: 24px; }
  .page-tools { width: 100%; justify-content: flex-start; }
  .search { width: 100%; }
  .person, .person > div, .config-row > div:first-child { min-width: 0; }
  .host { overflow-wrap: anywhere; }
  .person-actions, .device-actions { justify-content: flex-start; }
  .stat-card { min-height: 96px; }
  .stat-card b { font-size: 32px; }
  .wide, .card { padding: 16px; }
  .modal {
    max-height: calc(100dvh - 24px);
    overflow: auto;
    padding: 18px;
    border-radius: 22px;
  }
  .drawer {
    width: 100%;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  }
  .qr { justify-self: center; }
  .config-fields { width: 100%; }
  .login-card { padding: 22px 18px; }
  .login-card h1 { font-size: 28px; }
  .toast {
    bottom: calc(16px + env(safe-area-inset-bottom));
    max-width: calc(100% - 32px);
    text-align: center;
  }
  .row-actions .primary, .row-actions .secondary { flex: 1; }
  body { overflow-x: hidden; }
}
@media (max-width: 520px) {
  .account-name > span:last-child { display: none; }
  .account-name { width: 40px; padding: 0; justify-content: center; }
  .word strong, .brand b { font-size: 16px; }
  .top { padding-left: 12px; padding-right: 12px; }
  .page { width: calc(100% - 24px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
