:root {
  --bg: #050506;
  --text: #ececee;
  --dim: #8a8a90;
  --hair: rgba(255, 255, 255, 0.08);
  --fill: rgba(8, 8, 10, 0.72);
  --fill-2: rgba(255, 255, 255, 0.04);
  --rim: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.62);
  --title: 34px;
  --body: 17px;
  --sub: 13px;
  --radius: 12px;
  --pad: 20px;
  --target: 44px;
  --tab-h: 64px;
  --scroll-end: calc(var(--tab-h) + env(safe-area-inset-bottom, 0px) + 28px);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  height: 100dvh;
}

html.is-panel {
  overflow: hidden;
  width: 100%;
  max-width: 100%;
}

body {
  font-family: "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont,
    "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-size: var(--body);
  line-height: 1.25;
  color: var(--text);
  background: var(--bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--text);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

.svg-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
}

.skip:focus {
  left: 8px;
  z-index: 80;
  background: #111;
  padding: 8px 12px;
}

.field {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(255, 255, 255, 0.05), transparent 55%),
    radial-gradient(900px 500px at 92% 8%, rgba(255, 255, 255, 0.035), transparent 50%),
    radial-gradient(800px 600px at 70% 95%, rgba(255, 255, 255, 0.03), transparent 55%),
    #050506;
}

.caustic {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  mix-blend-mode: screen;
  opacity: 0.18;
}

.c1 {
  width: 58vw;
  height: 34vh;
  left: -8vw;
  top: 6vh;
  background: radial-gradient(ellipse at 40% 40%, rgba(255, 255, 255, 0.22), transparent 62%);
  transform: rotate(-18deg);
  animation: caustic-a 32s ease-in-out infinite;
}

.c2 {
  width: 42vw;
  height: 28vh;
  right: -6vw;
  top: 18vh;
  background: radial-gradient(ellipse at 50% 50%, rgba(220, 220, 220, 0.16), transparent 64%);
  transform: rotate(22deg);
  animation: caustic-b 38s ease-in-out infinite;
}

.c3 {
  width: 70vw;
  height: 40vh;
  left: 10vw;
  bottom: -12vh;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.1), transparent 68%);
  animation: caustic-c 44s ease-in-out infinite;
}

.c4 {
  width: 24vw;
  height: 18vh;
  left: 38vw;
  top: 38vh;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 70%);
  filter: blur(18px);
  animation: caustic-d 26s ease-in-out infinite;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  filter: url(#grain);
  mix-blend-mode: overlay;
}

.shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
}

body.is-login {
  min-height: 100dvh;
  overflow: auto;
}

body.is-panel {
  height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-touch-callout: none;
}

body.is-panel .shell {
  height: 100dvh;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.login-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px var(--pad) 32px;
  max-width: 390px;
  margin: 0 auto;
}

.login-title {
  margin: 0 4px 22px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.large-title {
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, "Segoe UI Variable Display",
    "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  font-size: var(--title);
  font-weight: 700;
  letter-spacing: 0.37px;
  line-height: 1.05;
  margin: 0;
}

.large-title.login-title {
  margin: 0 4px 0;
}

.panel,
.panel-fit {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: min(720px, 100%);
  height: 100dvh;
  max-height: 100dvh;
  min-height: 0;
  overflow: hidden;
  padding: max(24px, env(safe-area-inset-top, 0px)) var(--pad) 0;
  margin: 0 auto;
}

.panel-wide {
  max-width: min(1600px, 100%);
  width: 100%;
}

.panel-wide .title-row,
.panel-fit .title-row {
  margin-bottom: 10px;
  flex: 0 0 auto;
}

.panel-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
}

.panel > .flash,
.panel-body > .flash {
  flex: 0 0 auto;
}

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

.stack-fill {
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
}

.stack-fill:not(.stack-scroll) {
  padding-bottom: var(--scroll-end);
}

.stack-scroll {
  flex: 1 1 0%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

.stack-fill.stack-scroll {
  overflow-x: hidden;
  overflow-y: auto;
}

.stack-scroll::after {
  content: "";
  display: block;
  flex: 0 0 auto;
  height: var(--scroll-end);
  pointer-events: none;
}

.sheet-fill {
  flex: 1 1 0%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.stack-fill > .group-foot {
  flex: 0 0 auto;
}

.filter-sheet {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  padding: 4px 8px 4px 12px;
  flex: 0 0 auto;
}

.filter-sheet::after {
  border-radius: inherit;
}

.filter-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 36px;
  flex: 0 0 auto;
}

.filter-item:not(:last-of-type)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: var(--hair);
  transform: scaleX(0.5);
}

.filter-q {
  flex: 1 1 180px;
  min-width: 140px;
}

.filter-q::after {
  display: none;
}

.world-clocks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 0;
  min-height: 36px;
  padding: 6px 12px;
  flex: 0 0 auto;
}

.world-clock {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 4px 10px;
}

.world-clock .cell-dim {
  font-size: 11px;
}

.filter-input {
  width: 100%;
  min-height: 36px;
  border: 0;
  background: transparent;
  outline: none;
  padding: 0 10px 0 0;
  text-align: left;
}

.filter-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.filter-select {
  appearance: none;
  -webkit-appearance: none;
  min-height: 36px;
  max-width: 148px;
  padding: 0 22px 0 10px;
  border: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a3a3a8' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 8px center;
  color: #fff;
  text-align: left;
}

.filter-count {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  min-width: 0;
  margin-left: auto;
  padding: 0 8px;
  font-size: 12px;
  color: var(--dim);
  font-variant-numeric: tabular-nums;
}

.title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 4px 14px;
  flex: 0 0 auto;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.group-label {
  margin: 18px 16px 6px;
  font-size: 13px;
  color: var(--dim);
}

.group-foot {
  margin: 6px 16px 0;
  font-size: 13px;
  color: var(--dim);
}

.group-foot a {
  color: var(--text);
}

.group {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  overflow: clip;
  border-radius: var(--radius);
  background: var(--fill);
  border: 1px solid var(--hair);
  --mx: 28%;
  --my: 0%;
  box-shadow:
    0 10px 40px var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(18px) saturate(120%) brightness(0.88);
  -webkit-backdrop-filter: blur(18px) saturate(120%) brightness(0.88);
}

.group::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    280px circle at var(--mx) var(--my),
    rgba(255, 255, 255, 0.08),
    transparent 58%
  );
  mix-blend-mode: overlay;
  opacity: 0.65;
}

.group::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1),
    rgba(255, 255, 255, 0.02) 28%,
    transparent 58%
  );
  mix-blend-mode: overlay;
  opacity: 0.55;
}

.row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--target);
  padding: 10px 16px;
  transition: background-color 160ms cubic-bezier(0.4, 0, 0.2, 1);
}

.row:hover {
  background-color: rgba(255, 255, 255, 0.03);
}

.row:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--hair);
  transform: scaleY(0.5);
  transform-origin: bottom;
}

.session-row:not(:last-child)::after {
  left: 60px;
}

.session-row {
  min-height: 60px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.glyph {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 15px;
  text-transform: lowercase;
}

.row-main {
  flex: 1 1 auto;
  min-width: 0;
}

.row-title,
.row-sub,
.row-k,
.row-v,
.empty {
  margin: 0;
}

.row-title {
  font-size: 17px;
  font-weight: 560;
}

.row-sub,
.empty {
  font-size: var(--sub);
  color: var(--dim);
}

.row-sub {
  min-width: 0;
  overflow-wrap: anywhere;
}

.row-k {
  color: var(--dim);
  min-width: 72px;
}

.row-v {
  min-width: 0;
  margin-left: auto;
  text-align: right;
  font-size: 15px;
  overflow-wrap: anywhere;
}

.row-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.field-row {
  padding-top: 0;
  padding-bottom: 0;
}

.row-input {
  flex: 1;
  min-width: 0;
  min-height: var(--target);
  width: 100%;
  border: 0;
  background: transparent;
  outline: none;
  padding: 0;
  text-align: right;
}

.row-input[type="number"] {
  padding-right: 28px;
  appearance: auto;
  -moz-appearance: auto;
}

.row-input[type="number"]::-webkit-inner-spin-button,
.row-input[type="number"]::-webkit-outer-spin-button {
  margin: 0 2px 0 8px;
  height: 1.15em;
  opacity: 0.85;
}

.row-input::placeholder {
  color: rgba(255, 255, 255, 0.28);
}

.status {
  font-size: 12px;
  letter-spacing: 0.02em;
}

.status-active,
.status-online {
  color: #fff;
  font-weight: 600;
}

.status-idle {
  color: var(--dim);
}

.status-down {
  color: rgba(255, 255, 255, 0.38);
}

.btn-primary {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  width: 100%;
  border: 1px solid var(--rim);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.16),
    rgba(255, 255, 255, 0.03) 32%,
    transparent 60%
  );
  mix-blend-mode: overlay;
}

.btn-primary {
  z-index: 1;
  transition: transform 140ms cubic-bezier(0.4, 0, 0.2, 1), filter 140ms ease;
}

.btn-primary:active {
  transform: scale(0.985);
  filter: brightness(1.08);
}

.btn-row {
  min-height: var(--target);
  min-width: var(--target);
  padding: 0 12px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  transition: transform 120ms cubic-bezier(0.4, 0, 0.2, 1), opacity 120ms ease;
}

.btn-row:active {
  transform: scale(0.96);
  opacity: 0.82;
}

.btn-wide {
  width: 100%;
  text-align: left;
  padding: 0;
}

.chrome-glass {
  backdrop-filter: blur(16px) saturate(120%) brightness(0.86);
  -webkit-backdrop-filter: blur(16px) saturate(120%) brightness(0.86);
}

@supports (backdrop-filter: url(#liquid)) {
  .chrome-glass {
    backdrop-filter: blur(2px) saturate(160%) url(#liquid);
    -webkit-backdrop-filter: blur(2px) saturate(160%) url(#liquid);
  }
}

.tabbar {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 2px;
  width: min(560px, calc(100vw - 24px));
  width: min(560px, calc(100svw - 24px));
  max-width: min(560px, calc(100vw - 24px));
  max-width: min(560px, calc(100svw - 24px));
  min-width: 0;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--rim);
  isolation: isolate;
  --mx: 50%;
  --my: 0%;
  background: rgba(6, 6, 8, 0.78);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.62),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04);
}

.tabbar::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(
    220px circle at var(--mx) var(--my),
    rgba(255, 255, 255, 0.1),
    transparent 55%
  );
  mix-blend-mode: overlay;
  opacity: 0.7;
}

.tabbar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.02) 34%,
    transparent 62%
  );
  mix-blend-mode: overlay;
}

.tab-pill {
  position: absolute;
  z-index: 0;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  pointer-events: none;
  opacity: 0;
  transition: left 260ms cubic-bezier(0.4, 0, 0.2, 1), width 260ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tabbar.is-pill-ready .tab-pill {
  opacity: 1;
}

.tab {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  min-height: var(--target);
  min-width: 0;
  padding: 8px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 999px;
  color: var(--dim);
  font-size: clamp(9px, 2.5vw, 12px);
  letter-spacing: 0.01em;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: color 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tab:hover {
  text-decoration: none;
  color: #fff;
}

.tab.is-on {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.tabbar.is-pill-ready .tab.is-on {
  background: transparent;
}

.tab-ico {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  display: block;
}

.flash {
  margin: 0 4px 12px;
  color: var(--text);
  font-size: 15px;
  transition: opacity 1.2s ease;
}

.foot-lines {
  margin: 18px 4px 0;
  color: var(--dim);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.foot-lines a {
  color: var(--dim);
}

:focus,
:focus-visible {
  outline: none;
}

.skip:focus,
.skip:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (min-width: 720px) {
  .panel,
  .panel-fit {
    padding-top: max(32px, env(safe-area-inset-top, 0px));
  }
}

@media (min-height: 900px) {
  .panel,
  .panel-fit {
    padding-top: max(48px, env(safe-area-inset-top, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .caustic {
    filter: blur(22px);
  }

  @supports (backdrop-filter: url(#liquid)) {
    .chrome-glass {
      backdrop-filter: blur(14px) saturate(170%);
      -webkit-backdrop-filter: blur(14px) saturate(170%);
    }
  }
}

@media (prefers-contrast: more) {
  :root {
    --dim: #cfcfd2;
    --hair: rgba(255, 255, 255, 0.35);
    --fill: rgba(255, 255, 255, 0.12);
  }

  .status-down {
    color: #d0d0d0;
    text-decoration: underline;
  }
}

@media (max-width: 420px) {
  :root {
    --tab-h: 56px;
    --pad: 14px;
  }

  .tabbar {
    padding: 4px;
    gap: 0;
  }

  .tab-pill {
    top: 4px;
    bottom: 4px;
  }

  .tab {
    font-size: 11px;
    padding: 6px 4px;
  }
}

@media (max-width: 380px) {
  .tab {
    font-size: 10px;
    padding-left: 2px;
    padding-right: 2px;
    gap: 0;
  }

  .tab span {
    display: none;
  }

  .row-aside .btn-row {
    padding: 0 8px;
  }
}

.row-select {
  margin-left: auto;
  min-height: var(--target);
  min-width: 120px;
  max-width: 58%;
  border: 0;
  background: transparent;
  color: #fff;
  text-align: right;
}

#tz-select,
.sel:has(#tz-select) {
  max-width: 78%;
  min-width: 180px;
}

.sel:has(select[name="log"]),
.filter-select[name="log"] {
  max-width: 168px;
}

.sel {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.sel.filter-select {
  appearance: none;
  background: none;
  padding: 0;
  border: 0;
  max-width: 148px;
  min-height: 36px;
}

.sel.row-select {
  background: transparent;
}

select.sel-native {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  min-width: 0 !important;
  max-width: 1px !important;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  border: 0;
  opacity: 0;
  pointer-events: none;
  appearance: none;
  -webkit-appearance: none;
}

.sel-btn {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 0;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a3a3a8' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding: 0 22px 0 10px;
  color: #fff;
  font: inherit;
  font-style: italic;
  text-transform: lowercase;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sel-btn.row-select {
  margin-left: 0;
  min-width: 0;
  max-width: none;
  text-align: right;
  padding-left: 0;
}

.sel-btn.filter-select {
  max-width: none;
  min-height: 36px;
  text-align: left;
}

.sel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.sel-menu {
  position: fixed;
  z-index: 76;
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 160px;
  max-width: min(360px, calc(100vw - 16px));
  max-height: min(360px, calc(100dvh - 16px));
  padding: 4px 0 4px 4px;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--rim);
  background: rgba(8, 8, 10, 0.78);
  color: var(--text);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  isolation: isolate;
  user-select: none;
  -webkit-user-select: none;
  --mx: 50%;
  --my: 0%;
  backdrop-filter: blur(32px) saturate(1.2);
  -webkit-backdrop-filter: blur(32px) saturate(1.2);
}

.sel-menu[hidden] {
  display: none;
}

.sel-scroller {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

html.cursor-ring .sel-scroller {
  padding-right: 10px;
  scrollbar-width: none !important;
}

html.cursor-ring .sel-scroller::-webkit-scrollbar,
html.cursor-ring .sel-menu::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.sel-menu > .ptr-sb-y {
  position: absolute;
  z-index: 4;
  right: 0;
  left: auto !important;
}

.sel-menu::before,
.sel-menu::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
}

.sel-menu::before {
  background: radial-gradient(
    160px circle at var(--mx) var(--my),
    rgba(255, 255, 255, 0.1),
    transparent 58%
  );
  mix-blend-mode: overlay;
  opacity: 0.7;
}

.sel-menu::after {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12),
    rgba(255, 255, 255, 0.02) 34%,
    transparent 62%
  );
  mix-blend-mode: overlay;
  opacity: 0.55;
}

.sel-menu .sel-opt {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 32px;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--dim);
  font-size: 13px;
  font-style: italic;
  text-transform: lowercase;
  text-align: left;
  cursor: pointer;
}

.sel-menu .sel-opt:hover,
.sel-menu .sel-opt:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
}

.sel-menu .sel-opt:active {
  transform: scale(0.98);
}

.sel-menu .sel-opt.is-on,
.sel-menu .sel-opt[aria-selected="true"] {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.sel-menu .sel-opt.is-off,
.sel-menu .sel-opt:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

body.motion-reduce .sel-menu .sel-opt:active {
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .sel-menu .sel-opt:active {
    transform: none;
  }
}

.sheet-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  max-width: 100%;
}

.group.sheet-fill,
.sheet-fill {
  overflow: auto;
  overscroll-behavior: contain;
}

:is(.stack-scroll, .sheet-fill, .panel-body, .chart-block, .sheet-wrap) {
  scrollbar-width: thin;
  scrollbar-color: rgba(196, 196, 200, 0.42) transparent;
}

:is(.stack-scroll, .sheet-fill, .panel-body, .chart-block, .sheet-wrap)::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

:is(.stack-scroll, .sheet-fill, .panel-body, .chart-block, .sheet-wrap)::-webkit-scrollbar-corner,
:is(.stack-scroll, .sheet-fill, .panel-body, .chart-block, .sheet-wrap)::-webkit-scrollbar-track {
  background: transparent;
}

:is(.stack-scroll, .sheet-fill, .panel-body, .chart-block, .sheet-wrap)::-webkit-scrollbar-thumb {
  background-color: rgba(196, 196, 200, 0.4);
  border-style: solid;
  border-color: transparent;
  border-width: 4px 0 4px 3px;
  border-radius: 99px;
  background-clip: padding-box;
  min-height: 28px;
  min-width: 28px;
  transition: border-width 180ms ease, background-color 180ms ease;
}

@media (hover: hover) and (pointer: fine) {
  :is(.stack-scroll, .sheet-fill, .panel-body, .chart-block, .sheet-wrap):hover {
    scrollbar-color: rgba(222, 222, 226, 0.72) transparent;
  }

  :is(.stack-scroll, .sheet-fill, .panel-body, .chart-block, .sheet-wrap):hover::-webkit-scrollbar-thumb,
  :is(.stack-scroll, .sheet-fill, .panel-body, .chart-block, .sheet-wrap)::-webkit-scrollbar-thumb:hover {
    background-color: rgba(222, 222, 226, 0.72);
    border-width: 1px 0 1px 1px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :is(.stack-scroll, .sheet-fill, .panel-body, .chart-block, .sheet-wrap)::-webkit-scrollbar-thumb {
    transition: none;
  }
}

body.motion-reduce :is(.stack-scroll, .sheet-fill, .panel-body, .chart-block, .sheet-wrap)::-webkit-scrollbar-thumb {
  transition: none;
}

.sheet {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.sheet th,
.sheet td {
  padding: 10px 12px;
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}

.sheet th {
  color: var(--dim);
  font-weight: 500;
  font-size: 12px;
}

.sheet td {
  border-top: 1px solid var(--hair);
}

.sheet td .btn-row {
  min-height: var(--target);
}

.cell-strong {
  font-weight: 560;
}

.cell-dim {
  color: var(--dim);
  font-size: 12px;
}

.ticket-link {
  display: inline-block;
  min-height: 32px;
  line-height: 32px;
  font-size: 12px;
  color: var(--dim);
  margin-left: 4px;
}

.empty-match {
  position: relative;
  z-index: 1;
}

.stat-row {
  gap: 10px;
}

.stat-n {
  min-width: 28px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.bar-track {
  flex: 1 1 auto;
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.bar-fill {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  background: #fff;
  border-radius: 99px;
  transform: scaleX(0);
  transform-origin: left center;
  animation: grow-x 0.48s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 40ms);
}

html.js .noscript-only {
  display: none;
}

body.density-compact {
  --title: 28px;
  --pad: 16px;
}

body.glass-low .group,
body.glass-low .tabbar,
body.glass-low .btn-primary,
body.glass-low .sel-menu {
  backdrop-filter: blur(10px) saturate(110%) brightness(0.82);
  -webkit-backdrop-filter: blur(10px) saturate(110%) brightness(0.82);
}

body.glass-high .group,
body.glass-high .tabbar,
body.glass-high .btn-primary,
body.glass-high .sel-menu {
  backdrop-filter: blur(40px) saturate(1.3) brightness(0.9);
  -webkit-backdrop-filter: blur(40px) saturate(1.3) brightness(0.9);
}

body.motion-reduce *,
body.motion-reduce *::before,
body.motion-reduce *::after {
  animation: none !important;
  transition: none !important;
}

body.motion-reduce .chrome-glass {
  backdrop-filter: blur(14px) saturate(120%) brightness(0.86);
  -webkit-backdrop-filter: blur(14px) saturate(120%) brightness(0.86);
}

.cell-mono {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "SF Mono", "Segoe UI Mono", Consolas, monospace;
  font-size: 12px;
  color: var(--dim);
}

.geo-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cc {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.04);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: lowercase;
}

.onpill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(255, 255, 255, 0.04);
  color: var(--dim);
  font-size: 11px;
}

.onpill.is-on {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.08);
}

.ondot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.28);
}

.onpill.is-on .ondot {
  background: #fff;
  animation: on-pulse 2.4s ease-in-out infinite;
}

.period {
  display: flex;
  gap: 6px;
  margin: 0 4px 4px;
  flex: 0 0 auto;
}

.chip {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hair);
  background: rgba(8, 8, 10, 0.55);
  color: var(--dim);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.chip:hover {
  color: #fff;
  text-decoration: none;
}

.chip.is-on {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.clock-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.clock-chip {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 70px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.clock-k {
  color: var(--dim);
  font-size: 11px;
  text-transform: lowercase;
}

.clock-v {
  font-size: 13px;
}

.kpi {
  padding: 16px 16px 14px;
}

.kpi-k,
.kpi-n,
.chart-title {
  margin: 0;
  position: relative;
  z-index: 1;
}

.kpi-k,
.chart-title {
  color: var(--dim);
  font-size: 12px;
}

.kpi-n {
  margin-top: 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 8px;
}

.chart-block {
  padding: 14px 12px 12px;
}

.chart-title {
  margin: 0 4px 12px;
}

.hour-chart {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: clamp(56px, 14dvh, 140px);
  padding: 0 4px 4px;
}

.hour-col {
  flex: 1 1 0;
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.hour-bar {
  display: block;
  width: 100%;
  height: var(--h, 2%);
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: #fff;
  opacity: 0.85;
  transform: scaleY(0);
  transform-origin: bottom center;
  animation: grow-y 0.48s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  animation-delay: calc(var(--i, 0) * 18ms);
}

.host-k {
  min-width: 0;
  max-width: 42%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .kpi-row,
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .kpi-row {
    grid-template-columns: 1fr 1fr;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .filter-sheet {
    flex-wrap: wrap;
  }

  .filter-q {
    flex: 1 1 100%;
  }

  .sheet {
    min-width: 640px;
    font-size: 12px;
  }

  .sheet th,
  .sheet td {
    padding: 8px 8px;
  }
}

@media (min-width: 1100px) {
  .sheet {
    min-width: 0;
  }
}

.sheet tbody tr {
  transition: background-color 140ms cubic-bezier(0.4, 0, 0.2, 1);
}

.sheet tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.04);
}

.stats-fit {
  gap: 6px;
}

.stats-fit .kpi-row,
.stats-fit .period,
.stats-fit .group-foot {
  flex: 0 0 auto;
}

.stats-fit .stat-grid {
  flex: 0 1 auto;
  min-height: 0;
}

.stats-fit .chart-block {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

.stats-fit .hour-chart {
  flex: 1 1 auto;
  min-height: 48px;
}

.stats-fit .stat-row {
  min-height: 32px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.stats-fit .group-label {
  margin: 8px 12px 2px;
}

@media (max-height: 780px) {
  .panel,
  .panel-fit {
    padding-top: max(16px, env(safe-area-inset-top, 0px));
  }

  .large-title {
    font-size: 28px;
  }

  .kpi {
    padding: 10px 12px 8px;
  }

  .kpi-n {
    font-size: 22px;
    margin-top: 4px;
  }

  .chart-block {
    padding: 10px 10px 8px;
  }

  .hour-chart {
    height: clamp(48px, 12dvh, 100px);
  }

  .group-label {
    margin: 8px 16px 4px;
  }

  .row {
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .caustic {
    will-change: transform;
  }

  body.is-panel #main:not(.is-ready),
  body.is-login #main {
    animation: page-enter 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
  }

  body.is-panel:not(.motion-reduce) #panel-body {
    view-transition-name: panel-body;
  }
}

body.is-panel #main.is-ready {
  animation: none;
}

html:active-view-transition #main,
html:active-view-transition .tabbar,
html:active-view-transition .field {
  animation: none;
  view-transition-name: none;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-group(root) {
  animation: none;
}

::view-transition-old(panel-body) {
  animation: 180ms ease both content-fade-out;
}

::view-transition-new(panel-body) {
  animation: 180ms ease both content-fade-in;
}

#panel-body.is-swap-in {
  animation: content-fade-in 180ms ease both;
}

body.motion-reduce #panel-body.is-swap-in {
  animation: none;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes content-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes content-fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes grow-y {
  to {
    transform: scaleY(1);
  }
}

@keyframes grow-x {
  to {
    transform: scaleX(1);
  }
}

@keyframes on-pulse {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.28);
  }
  50% {
    opacity: 0.55;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0);
  }
}

@keyframes caustic-a {
  0%,
  100% {
    transform: rotate(-18deg) translate3d(0, 0, 0);
  }
  50% {
    transform: rotate(-12deg) translate3d(3vw, 2vh, 0);
  }
}

@keyframes caustic-b {
  0%,
  100% {
    transform: rotate(22deg) translate3d(0, 0, 0);
  }
  50% {
    transform: rotate(16deg) translate3d(-2.4vw, 1.6vh, 0);
  }
}

@keyframes caustic-c {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(2vw, -2vh, 0);
  }
}

@keyframes caustic-d {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-1.5vw, 1.2vh, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .caustic {
    will-change: auto;
    animation: none;
  }

  .bar-fill,
  .hour-bar {
    transform: none;
  }

  #main,
  #panel-body,
  .tabbar,
  .field {
    view-transition-name: none;
  }
}

body.motion-reduce .caustic {
  will-change: auto;
}

body.motion-reduce .bar-fill,
body.motion-reduce .hour-bar {
  transform: none;
  animation: none;
}

body.motion-reduce #main,
body.motion-reduce #panel-body,
body.motion-reduce .tabbar,
body.motion-reduce .field {
  view-transition-name: none;
}

@media (hover: hover) and (pointer: fine) {
  html.cursor-ring,
  html.cursor-ring *,
  body.is-panel.cursor-ring,
  body.is-panel.cursor-ring * {
    cursor: none !important;
  }

  html.cursor-ring * {
    scrollbar-width: none !important;
  }

  html.cursor-ring *::-webkit-scrollbar,
  html.cursor-ring *::-webkit-scrollbar-button,
  html.cursor-ring *::-webkit-scrollbar-thumb,
  html.cursor-ring *::-webkit-scrollbar-track,
  html.cursor-ring *::-webkit-scrollbar-corner,
  html.cursor-ring *::-webkit-scrollbar-resizer {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent !important;
    cursor: none !important;
  }
}

.ptr {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10000;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.86);
  background: rgba(255, 255, 255, 0.05);
  box-shadow:
    0 0 0.5px rgba(255, 255, 255, 0.55),
    0 0 10px rgba(255, 255, 255, 0.32),
    inset 0 0 5px rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
  user-select: none;
  opacity: 0;
  visibility: hidden;
  contain: layout style;
  will-change: transform;
  transition: none;
}

.ptr.is-on {
  opacity: 1;
  visibility: visible;
}

.ptr-sb-layer {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
}

.ptr-sb {
  position: absolute;
  pointer-events: auto;
  box-sizing: border-box;
}

.ptr-sb-y {
  width: 10px !important;
  right: auto;
}

.ptr-sb-x {
  height: 12px !important;
  bottom: auto;
}

.ptr-sb-thumb {
  position: absolute;
  box-sizing: border-box;
  background-color: rgba(196, 196, 200, 0.4);
  border-style: solid;
  border-color: transparent;
  border-width: 4px 0 4px 3px;
  border-radius: 99px;
  background-clip: padding-box;
}

.ptr-sb-y .ptr-sb-thumb {
  left: auto;
  right: 0;
  width: 10px;
  min-height: 28px;
}

.ptr-sb-x .ptr-sb-thumb {
  top: 0;
  height: 12px;
  min-width: 28px;
}

.ptr-sb:hover .ptr-sb-thumb,
.ptr-sb.is-drag .ptr-sb-thumb {
  background-color: rgba(222, 222, 226, 0.72);
}

.ptr-sb-y:hover .ptr-sb-thumb,
.ptr-sb-y.is-drag .ptr-sb-thumb {
  border-width: 1px 0 1px 1px;
}

.ptr.is-cross {
  /* box-shadow идёт по border-box: radius 0 = квадратная «подсветка» вокруг прицела */
  border: 0;
  border-radius: 0;
  background-color: transparent;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96)),
    linear-gradient(rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96)),
    linear-gradient(rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96)),
    linear-gradient(rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.96));
  background-repeat: no-repeat;
  background-size:
    1.5px calc(50% - 3px),
    1.5px calc(50% - 3px),
    calc(50% - 3px) 1.5px,
    calc(50% - 3px) 1.5px;
  background-position:
    50% 0,
    50% 100%,
    0 50%,
    100% 50%;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  contain: none;
  overflow: visible;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, 0.85));
}

.ptr.is-cross::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.22) 0%,
    rgba(255, 255, 255, 0.08) 36%,
    transparent 68%
  );
  pointer-events: none;
  z-index: -1;
}

/* prod polish (append-only). no @font-face here — skip font-display.
   preload skipped: cache-bust agent owns base.html. intended:
   <link rel="preload" href="/static/css/app.css" as="style"> */

.connect-row,
tr.connect-row {
  content-visibility: auto;
  contain: content;
  contain-intrinsic-size: auto 48px;
}

.totp-bind {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 20px 12px;
}

.totp-qr {
  padding: 0;
  background: #fff;
  line-height: 0;
  isolation: isolate;
}

.totp-qr svg,
.totp-qr-svg {
  display: block;
  width: auto;
  height: auto;
  max-width: min(240px, 100%);
  aspect-ratio: 1 / 1;
  shape-rendering: crispEdges;
}

.totp-phrase {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}

.totp-secret {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, "SF Mono", "Segoe UI Mono", Consolas, monospace;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-align: left;
  cursor: pointer;
}

.totp-secret:hover {
  color: #fff;
}

.chip .tab-ico {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}
