:root {
  --ink: #f8fbff;
  --muted: rgba(226, 236, 247, 0.72);
  --dim: rgba(226, 236, 247, 0.48);
  --line: rgba(116, 206, 255, 0.3);
  --glass: rgba(16, 16, 22, 0.72);
  --glass-strong: rgba(18, 18, 24, 0.84);
  --cyan: #63dcff;
  --blue: #0095ff;
  --rose: #c8b7ff;
  --gold: #ffd166;
  --neon-border: linear-gradient(120deg, rgba(223, 216, 255, 0.95), rgba(110, 221, 255, 0.72) 48%, rgba(0, 145, 255, 0.95));
  --neon-border-soft: linear-gradient(120deg, rgba(223, 216, 255, 0.5), rgba(110, 221, 255, 0.34) 48%, rgba(0, 145, 255, 0.58));
  --button-glow-border:
    radial-gradient(circle at 12% 48%, rgba(200, 183, 255, 0.98) 0 16%, transparent 34%),
    radial-gradient(circle at 38% 18%, rgba(99, 220, 255, 0.98) 0 18%, transparent 36%),
    radial-gradient(circle at 74% 70%, rgba(0, 145, 255, 0.96) 0 17%, transparent 36%),
    radial-gradient(circle at 104% 34%, rgba(142, 246, 196, 0.9) 0 18%, transparent 36%),
    linear-gradient(90deg, rgba(200, 183, 255, 0.48), rgba(99, 220, 255, 0.58), rgba(0, 145, 255, 0.46));
  --surface-fill: linear-gradient(145deg, rgba(29, 29, 36, 0.9), rgba(10, 11, 16, 0.88));
  --neon-shadow: 0 0 24px rgba(79, 195, 255, 0.18), 0 0 52px rgba(162, 132, 255, 0.08);
  --body-bg:
    radial-gradient(circle at 18% 4%, rgba(200, 183, 255, 0.15), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(0, 149, 255, 0.2), transparent 34%),
    #020204;
  --app-overlay:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.04) 0 38%, rgba(0, 0, 0, 0.04) 72%, rgba(0, 0, 0, 0.22) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(0, 0, 0, 0.12));
  --glass-highlight: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  --control-fill: linear-gradient(90deg, rgba(29, 29, 35, 0.94), rgba(14, 15, 20, 0.92));
  --control-hover-fill: linear-gradient(90deg, rgba(36, 36, 43, 0.96), rgba(17, 18, 24, 0.95));
  --control-color: rgba(248, 251, 255, 0.78);
  --field-fill: linear-gradient(90deg, rgba(18, 18, 24, 0.94), rgba(10, 11, 16, 0.92));
  --status-color: rgba(248, 251, 255, 0.54);
  --modal-backdrop: rgba(3, 7, 18, 0.54);
  --radius-panel: 24px;
  --radius-card: 20px;
  --radius-inner: 16px;
  --radius-control: 999px;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

body[data-theme="day"] {
  --ink: #172033;
  --muted: rgba(39, 51, 76, 0.72);
  --dim: rgba(39, 51, 76, 0.5);
  --line: rgba(52, 66, 92, 0.16);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --cyan: #147eac;
  --blue: #3d5bc7;
  --rose: #8b69d9;
  --gold: #d38b00;
  --neon-border: linear-gradient(120deg, rgba(139, 105, 217, 0.46), rgba(20, 126, 172, 0.34) 48%, rgba(38, 154, 126, 0.38));
  --neon-border-soft: linear-gradient(120deg, rgba(139, 105, 217, 0.18), rgba(20, 126, 172, 0.14) 48%, rgba(38, 154, 126, 0.16));
  --button-glow-border:
    radial-gradient(circle at 12% 48%, rgba(139, 105, 217, 0.78) 0 16%, transparent 34%),
    radial-gradient(circle at 38% 18%, rgba(20, 126, 172, 0.68) 0 18%, transparent 36%),
    radial-gradient(circle at 74% 70%, rgba(38, 154, 126, 0.64) 0 17%, transparent 36%),
    radial-gradient(circle at 104% 34%, rgba(214, 121, 150, 0.58) 0 18%, transparent 36%),
    linear-gradient(90deg, rgba(139, 105, 217, 0.18), rgba(20, 126, 172, 0.18), rgba(38, 154, 126, 0.16));
  --surface-fill: linear-gradient(145deg, rgba(255, 255, 255, 0.76), rgba(247, 249, 253, 0.62));
  --neon-shadow: 0 18px 54px rgba(55, 72, 98, 0.1), 0 0 34px rgba(139, 105, 217, 0.06);
  --body-bg:
    radial-gradient(circle at 18% 4%, rgba(139, 105, 217, 0.1), transparent 30%),
    radial-gradient(circle at 84% 10%, rgba(38, 154, 126, 0.11), transparent 34%),
    linear-gradient(180deg, #fbfcff 0%, #edf3fa 54%, #dde7f2 100%);
  --app-overlay:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.08) 0 34%, rgba(255, 255, 255, 0.035) 64%, rgba(61, 78, 108, 0.045) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(125, 139, 161, 0.035));
  --glass-highlight: rgba(255, 255, 255, 0.82);
  --glass-shadow: 0 20px 62px rgba(66, 79, 101, 0.16);
  --control-fill: linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(245, 247, 251, 0.74));
  --control-hover-fill: linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(239, 242, 248, 0.88));
  --control-color: rgba(23, 32, 51, 0.76);
  --field-fill: linear-gradient(90deg, rgba(255, 255, 255, 0.76), rgba(245, 247, 251, 0.68));
  --status-color: rgba(23, 32, 51, 0.58);
  --modal-backdrop: rgba(218, 234, 252, 0.46);
}

* {
  box-sizing: border-box;
}

@keyframes buttonBorderSweep {
  0% {
    background-position:
      0% 48%,
      38% 18%,
      86% 78%,
      118% 34%,
      0 0;
  }

  50% {
    background-position:
      58% 18%,
      4% 88%,
      54% 32%,
      74% 96%,
      0 0;
  }

  100% {
    background-position:
      108% 64%,
      64% 82%,
      6% 26%,
      26% 18%,
      0 0;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
  color: var(--ink);
  background: var(--body-bg);
  transition: background 240ms ease, color 240ms ease;
}

body.is-loading {
  overflow: hidden;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  line-height: 1;
  text-align: center;
}

[hidden] {
  display: none !important;
}

.app-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  opacity: 1;
  transform: scale(1);
  transition: opacity 420ms ease, transform 420ms ease;
}

@keyframes lockScreenShake {
  0% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1.002); }
  10% { transform: translate3d(-16px, 9px, 0) rotate(-0.45deg) scale(1.008); }
  20% { transform: translate3d(15px, -8px, 0) rotate(0.42deg) scale(1.008); }
  32% { transform: translate3d(-12px, -5px, 0) rotate(0.28deg) scale(1.006); }
  44% { transform: translate3d(11px, 7px, 0) rotate(-0.26deg) scale(1.006); }
  56% { transform: translate3d(-8px, 4px, 0) rotate(-0.18deg) scale(1.004); }
  68% { transform: translate3d(7px, -4px, 0) rotate(0.16deg) scale(1.004); }
  82% { transform: translate3d(-3px, 2px, 0) rotate(-0.08deg) scale(1.002); }
  100% { transform: translate3d(0, 0, 0) rotate(0deg) scale(1); }
}

body.lock-screen-shake .app-shell {
  animation: lockScreenShake 520ms cubic-bezier(.28, .84, .42, 1);
  transform-origin: center center;
  will-change: transform;
}

body.is-loading .app-shell {
  opacity: 0;
  transform: scale(0.985);
  pointer-events: none;
}

.app-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: var(--app-overlay);
  transition: background 240ms ease;
}

#spaceCanvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

body.dragging-view,
body.dragging-view * {
  cursor: grabbing !important;
  user-select: none;
}

.topbar,
.site-panel,
.material-panel,
.status-strip {
  position: relative;
  z-index: 2;
}

.glass-surface {
  border: 1px solid transparent;
  border-radius: var(--radius-panel);
  background:
    var(--surface-fill) padding-box,
    var(--neon-border-soft) border-box;
  box-shadow:
    inset 0 1px 0 var(--glass-highlight),
    var(--neon-shadow),
    var(--glass-shadow);
  backdrop-filter: blur(22px) saturate(1.2);
  -webkit-backdrop-filter: blur(22px) saturate(1.2);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  position: fixed;
  top: 0;
  left: clamp(16px, 3.5vw, 44px);
  right: clamp(16px, 3.5vw, 44px);
  width: calc(100% - clamp(32px, 7vw, 88px));
  margin: 22px auto 0;
  padding: 12px 14px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(calc(-100% - 28px));
  transition:
    opacity 220ms ease,
    transform 260ms cubic-bezier(.2, .8, .2, 1),
    background 240ms ease,
    box-shadow 240ms ease;
}

body.nav-visible .topbar,
.topbar:focus-within {
  opacity: 1;
  transform: translateY(0);
}

body[data-theme="day"] .topbar {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(248, 249, 252, 0.66)) padding-box,
    linear-gradient(120deg, rgba(139, 105, 217, 0.18), rgba(23, 32, 51, 0.08) 46%, rgba(38, 154, 126, 0.14)) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 18px 50px rgba(55, 70, 94, 0.14);
  backdrop-filter: blur(24px) saturate(1.04);
  -webkit-backdrop-filter: blur(24px) saturate(1.04);
}

.brand,
.top-actions,
.site-panel,
.material-panel {
  pointer-events: auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 52% 42%, rgba(255, 255, 255, 0.96), transparent 15%),
    linear-gradient(135deg, var(--rose), var(--cyan) 54%, var(--blue));
  box-shadow: 0 0 26px rgba(99, 220, 255, 0.42);
}

.brand strong,
.brand small {
  display: block;
  letter-spacing: 0;
}

.brand strong {
  font-size: 17px;
  line-height: 1.1;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 760;
}

.top-actions,
.quick-nav,
.layout-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.top-actions {
  gap: 12px;
}

.quick-nav,
.layout-nav {
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: calc(var(--radius-control) + 8px);
  background: transparent;
  box-shadow: none;
}

body[data-theme="day"] .quick-nav,
body[data-theme="day"] .layout-nav {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.quick-nav .filter,
.layout-nav .layout-button {
  display: none;
}

.nav-select-field {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 158px;
  min-height: 38px;
  padding: 0 38px 0 12px;
  border: 1px solid rgba(248, 251, 255, 0.22);
  border-radius: var(--radius-control);
  color: var(--control-color);
  background: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 8px 20px rgba(4, 9, 20, 0.04);
  cursor: pointer;
  isolation: isolate;
  overflow: visible;
  position: relative;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    transform 180ms ease;
}

.nav-select-field::before {
  display: none;
}

.nav-select-field::after {
  position: absolute;
  top: 50%;
  right: 15px;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  opacity: 0.72;
  pointer-events: none;
  transform: translateY(-65%) rotate(45deg);
  transition: opacity 180ms ease, transform 180ms ease;
}

.nav-select-field:hover,
.nav-select-field:focus-within {
  border-color: rgba(99, 220, 255, 0.48);
  background: rgba(255, 255, 255, 0.035);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 18px rgba(99, 220, 255, 0.14);
  transform: translateY(-1px);
}

.nav-select-field:hover::after,
.nav-select-field:focus-within::after,
.nav-select-field.open::after {
  opacity: 0.95;
  transform: translateY(-55%) rotate(45deg);
}

.nav-select-field.open {
  border-color: rgba(99, 220, 255, 0.55);
  background: rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 20px rgba(99, 220, 255, 0.16);
}

.nav-select-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: auto;
  padding: 0 9px 0 0;
  border-right: 1px solid rgba(248, 251, 255, 0.14);
  color: var(--muted);
  background: transparent;
  font-size: 11px;
  font-weight: 860;
  letter-spacing: 0;
  line-height: 1;
}

.nav-select {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.nav-select-trigger {
  position: relative;
  z-index: 1;
  min-width: 58px;
  height: 100%;
  min-height: 34px;
  padding: 0;
  border: 0;
  color: var(--control-color);
  background: transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  outline: none;
  text-align: left;
}

.nav-select-value {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.layout-nav .nav-select-trigger {
  min-width: 50px;
}

.nav-select-menu {
  position: absolute;
  top: calc(100% + 9px);
  left: 0;
  z-index: 20;
  display: grid;
  gap: 4px;
  width: max(100%, 168px);
  max-height: min(320px, calc(100vh - 124px));
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(24, 25, 34, 0.88), rgba(10, 12, 18, 0.82)) padding-box,
    var(--neon-border-soft) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 18px 44px rgba(0, 0, 0, 0.34),
    0 0 26px rgba(99, 220, 255, 0.1);
  backdrop-filter: blur(22px) saturate(1.22);
  -webkit-backdrop-filter: blur(22px) saturate(1.22);
  opacity: 0;
  overflow: auto;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top left;
  transition:
    opacity 160ms ease,
    transform 180ms cubic-bezier(.2, .8, .2, 1),
    visibility 160ms ease;
  visibility: hidden;
}

.nav-select-field.open .nav-select-menu,
.nav-select-menu.open {
  opacity: 1 !important;
  pointer-events: auto;
  transform: translateY(0) scale(1) !important;
  transition: none !important;
  visibility: visible !important;
}

.nav-select-option {
  min-height: 34px;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0 12px;
  color: rgba(248, 251, 255, 0.78);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 860;
  line-height: 1;
  outline: none;
  text-align: left;
  transition:
    background 150ms ease,
    color 150ms ease,
    transform 150ms ease,
    box-shadow 150ms ease;
}

.nav-select-option::after {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
  content: "";
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 150ms ease, transform 150ms ease;
}

.nav-select-option:hover,
.nav-select-option:focus-visible {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transform: translateX(1px);
}

.nav-select-option.active {
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(99, 220, 255, 0.2), rgba(200, 183, 255, 0.13));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 8px 22px rgba(99, 220, 255, 0.08);
}

.nav-select-option.active::after {
  opacity: 0.9;
  transform: scale(1);
}

body[data-theme="day"] .nav-select-field {
  border-color: rgba(23, 32, 51, 0.18);
  background: transparent;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.36),
    0 8px 18px rgba(60, 76, 104, 0.04);
}

body[data-theme="day"] .nav-select-field::before {
  display: none;
}

body[data-theme="day"] .nav-select-label {
  border-right-color: rgba(23, 32, 51, 0.12);
  background: transparent;
}

body[data-theme="day"] .nav-select-field:hover,
body[data-theme="day"] .nav-select-field:focus-within {
  border-color: rgba(23, 32, 51, 0.3);
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    0 10px 22px rgba(60, 76, 104, 0.08);
}

body[data-theme="day"] .nav-select-field.open {
  border-color: rgba(23, 32, 51, 0.34);
  background: rgba(255, 255, 255, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 12px 26px rgba(60, 76, 104, 0.1);
}

body[data-theme="day"] .nav-select-menu {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(246, 248, 252, 0.76)) padding-box,
    linear-gradient(125deg, rgba(255, 255, 255, 0.92), rgba(92, 105, 132, 0.14), rgba(139, 105, 217, 0.12)) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 18px 42px rgba(60, 76, 104, 0.17);
}

body[data-theme="day"] .nav-select-option {
  color: rgba(23, 32, 51, 0.72);
}

body[data-theme="day"] .nav-select-option:hover,
body[data-theme="day"] .nav-select-option:focus-visible {
  color: var(--ink);
  background: rgba(23, 32, 51, 0.055);
}

body[data-theme="day"] .nav-select-option.active {
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(139, 105, 217, 0.12), rgba(92, 105, 132, 0.08));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 8px 20px rgba(60, 76, 104, 0.08);
}

.filter,
.layout-button,
.theme-toggle,
.hand-camera-toggle,
.account-button,
.logout-button,
.auth-button,
.primary-action,
.site-panel button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--ink);
  background:
    var(--control-fill) padding-box,
    var(--neon-border-soft) border-box;
  box-shadow: 0 0 18px rgba(77, 193, 255, 0.08);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  line-height: 1;
  overflow: hidden;
  position: relative;
  text-align: center;
  white-space: nowrap;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    opacity 160ms ease;
}

.filter::before,
.layout-button::before,
.theme-toggle::before,
.hand-camera-toggle::before,
.account-button::before,
.logout-button::before,
.auth-button::before,
.primary-action::before,
.site-panel button::before,
.text-button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  padding: 2.5px;
  background: var(--button-glow-border);
  background-position:
    0% 48%,
    38% 18%,
    86% 78%,
    118% 34%,
    0 0;
  background-size:
    170% 170%,
    160% 160%,
    180% 180%,
    165% 165%,
    100% 100%;
  filter: drop-shadow(0 0 10px rgba(99, 220, 255, 0.7));
  opacity: 0;
  pointer-events: none;
  animation: buttonBorderSweep 4.8s ease-in-out infinite alternate;
  transition: opacity 160ms ease;
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
}

.filter:hover::before,
.layout-button:hover::before,
.theme-toggle:hover::before,
.hand-camera-toggle:hover::before,
.account-button:hover::before,
.logout-button:hover::before,
.auth-button:hover::before,
.primary-action:hover::before,
.site-panel button:hover::before,
.text-button:hover::before,
.text-button:focus-visible::before {
  opacity: 1;
  animation-play-state: running;
}

button:disabled::before {
  opacity: 0 !important;
  animation-play-state: paused !important;
}

.filter,
.layout-button,
.theme-toggle,
.hand-camera-toggle,
.account-button,
.logout-button,
.auth-button {
  padding: 0 13px;
  color: var(--control-color);
  font-size: 13px;
  font-weight: 820;
}

.filter {
  min-width: 58px;
}

.layout-button {
  min-width: 54px;
}

.theme-toggle {
  min-width: 58px;
}

.hand-camera-toggle {
  min-width: 92px;
}

.account-button {
  min-width: 98px;
}

.account-group {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  color: var(--control-color);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.025)) padding-box,
    var(--neon-border-soft) border-box;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

body[data-theme="day"] .account-group {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.36), rgba(247, 249, 253, 0.26)) padding-box,
    var(--neon-border-soft) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.62),
    0 10px 28px rgba(71, 86, 110, 0.08);
}

.logout-button {
  min-width: 76px;
}

.auth-button {
  min-width: 68px;
}

.account-group[hidden],
.logout-button[hidden],
.auth-button[hidden] {
  display: none;
}

.filter.active,
.filter:hover,
.layout-button.active,
.layout-button:hover,
.theme-toggle.active,
.theme-toggle:hover,
.hand-camera-toggle.active,
.hand-camera-toggle:hover,
.account-button.active,
.account-button:hover,
.logout-button:hover,
.auth-button:hover,
.primary-action:hover,
.site-panel button:hover {
  background:
    var(--control-hover-fill) padding-box,
    var(--neon-border) border-box;
  box-shadow:
    0 0 20px rgba(99, 220, 255, 0.28),
    0 0 44px rgba(162, 132, 255, 0.14);
  transform: translateY(-1px);
}

.hand-camera-toggle.loading {
  opacity: 0.72;
  cursor: progress;
}

.hand-camera-toggle.error {
  border-color: rgba(255, 143, 189, 0.48);
  background: rgba(255, 143, 189, 0.13);
}

body.gesture-disabled #spaceCanvas {
  cursor: default;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 17px;
  font-weight: 900;
  text-decoration: none;
}

.site-panel {
  position: absolute;
  right: clamp(16px, 3.6vw, 44px);
  bottom: clamp(24px, 5vh, 44px);
  width: min(390px, calc(100vw - 32px));
  max-height: min(78vh, 760px);
  overflow: auto;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(248, 251, 255, 0.34) rgba(255, 255, 255, 0.06);
}

.site-panel::-webkit-scrollbar,
body::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

.site-panel::-webkit-scrollbar-track,
body::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.055);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-panel::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb {
  border: 3px solid rgba(9, 15, 25, 0.62);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.62), rgba(103, 232, 255, 0.34)),
    rgba(255, 255, 255, 0.18);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.34),
    0 0 18px rgba(103, 232, 255, 0.2);
}

.site-panel[hidden] {
  display: none;
}

.material-panel {
  position: absolute;
  left: clamp(18px, 4vw, 44px);
  top: 104px;
  display: grid;
  gap: 11px;
  width: min(286px, calc(100vw - 32px));
  padding: 12px;
}

.material-panel[hidden] {
  display: none;
}

.material-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.material-head strong {
  font-size: 14px;
}

.material-head .text-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.material-control {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.material-control span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.material-control output {
  min-width: 42px;
  color: var(--ink);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.material-control input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}

.material-control input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(103, 232, 255, 0.5), rgba(255, 143, 189, 0.34)),
    rgba(255, 255, 255, 0.07);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 18px rgba(103, 232, 255, 0.08);
}

.material-control input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -6px;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffffff, rgba(255, 255, 255, 0.2) 32%, transparent 34%),
    linear-gradient(135deg, var(--cyan), var(--rose));
  box-shadow:
    0 0 0 4px rgba(103, 232, 255, 0.12),
    0 8px 20px rgba(0, 0, 0, 0.28);
}

.material-control input[type="range"]::-moz-range-track {
  height: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(103, 232, 255, 0.5), rgba(255, 143, 189, 0.34)),
    rgba(255, 255, 255, 0.07);
}

.material-control input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--rose));
  box-shadow: 0 0 0 4px rgba(103, 232, 255, 0.12);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head > div {
  display: grid;
  gap: 3px;
}

.panel-head strong {
  font-size: 14px;
}

.panel-head span {
  color: var(--dim);
  font-size: 12px;
  font-weight: 800;
}

.site-panel form,
.auth-card form {
  display: grid;
  gap: 10px;
}

.site-panel form {
  grid-template-columns: 1fr 1fr;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-panel label:first-child,
.site-panel label:nth-child(2),
.site-panel .wide-field,
.site-panel .form-actions {
  grid-column: 1 / -1;
}

.site-panel label,
.auth-card label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.site-panel input,
.site-panel select,
.auth-card input {
  width: 100%;
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  padding: 0 15px;
  color: var(--ink);
  background:
    var(--field-fill) padding-box,
    linear-gradient(120deg, rgba(223, 216, 255, 0.28), rgba(99, 220, 255, 0.24), rgba(0, 145, 255, 0.36)) border-box;
  outline: none;
}

.admin-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
}

.admin-tools input {
  width: 100%;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  padding: 0 15px;
  color: var(--ink);
  background:
    var(--field-fill) padding-box,
    linear-gradient(120deg, rgba(223, 216, 255, 0.28), rgba(99, 220, 255, 0.24), rgba(0, 145, 255, 0.36)) border-box;
  outline: none;
}

.admin-stats {
  color: var(--dim);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 8px !important;
  min-height: 34px;
}

.check-row input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--cyan);
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.site-panel select option {
  color: #111827;
}

.site-panel input:focus,
.site-panel select:focus,
.auth-card input:focus {
  box-shadow:
    0 0 0 1px rgba(99, 220, 255, 0.18),
    0 0 24px rgba(99, 220, 255, 0.18);
}

.site-panel button {
  min-height: 40px;
  font-weight: 900;
}

.captcha-field {
  display: grid;
  gap: 8px;
}

.captcha-field[hidden] {
  display: none;
}

.captcha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.captcha-head label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.captcha-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.captcha-image {
  width: 150px;
  height: 46px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  background:
    rgba(6, 10, 20, 0.72) padding-box,
    var(--neon-border-soft) border-box;
  object-fit: cover;
}

.captcha-refresh {
  min-height: 30px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  padding: 0 12px;
  color: var(--ink);
  background:
    rgba(12, 16, 28, 0.74) padding-box,
    var(--neon-border-soft) border-box;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.captcha-refresh:hover {
  box-shadow: 0 0 20px rgba(99, 220, 255, 0.18);
}

.text-button {
  min-height: 34px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  padding: 0 12px;
  color: var(--muted);
  background:
    linear-gradient(90deg, rgba(25, 25, 31, 0.94), rgba(12, 13, 18, 0.92)) padding-box,
    var(--neon-border-soft) border-box;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
  line-height: 1;
  overflow: hidden;
  position: relative;
  white-space: nowrap;
}

.admin-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.admin-item {
  --category-accent: var(--cyan);
  --category-secondary: var(--blue);
  --category-rgb: 103, 232, 255;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(var(--category-rgb), 0.22);
  border-radius: var(--radius-inner);
  background:
    linear-gradient(135deg, rgba(var(--category-rgb), 0.095), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.045);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 12px 28px rgba(0, 0, 0, 0.16);
}

.admin-item.is-pinned {
  border-color: rgba(var(--category-rgb), 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 26px rgba(var(--category-rgb), 0.22),
    0 16px 36px rgba(0, 0, 0, 0.18);
}

.admin-item-main {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.admin-item strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  text-shadow: 0 0 18px rgba(var(--category-rgb), 0.18);
}

.admin-item small {
  display: block;
  margin-top: 3px;
  color: var(--dim);
  font-size: 11px;
}

.admin-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.admin-badges span {
  border: 1px solid rgba(var(--category-rgb), 0.18);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--muted);
  background:
    linear-gradient(135deg, rgba(var(--category-rgb), 0.11), rgba(255, 255, 255, 0.04)),
    rgba(255, 255, 255, 0.05);
  font-size: 11px;
  font-weight: 800;
}

.admin-badges .badge-category {
  color: var(--category-accent);
  border-color: rgba(var(--category-rgb), 0.42);
  background: rgba(var(--category-rgb), 0.14);
}

.admin-badges .badge-pinned,
.admin-badges .badge-glow {
  color: var(--category-accent);
  border-color: rgba(var(--category-rgb), 0.58);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.22), transparent 34%),
    rgba(var(--category-rgb), 0.16);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 0 16px rgba(var(--category-rgb), 0.34);
  text-shadow: 0 0 12px rgba(var(--category-rgb), 0.72);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-actions button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.status-strip {
  position: absolute;
  left: clamp(18px, 4vw, 44px);
  right: clamp(18px, 4vw, 44px);
  bottom: 18px;
  display: flex;
  gap: 14px;
  color: var(--status-color);
  font-size: 12px;
  font-weight: 800;
  pointer-events: none;
}

.status-strip span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.status-strip span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 16px var(--cyan);
}

.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--ink);
  background:
    radial-gradient(circle at 24% 16%, rgba(139, 105, 217, 0.12), transparent 28%),
    radial-gradient(circle at 78% 22%, rgba(38, 154, 126, 0.1), transparent 32%),
    var(--body-bg);
  opacity: 1;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.loading-screen.is-complete {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.loading-panel {
  width: min(640px, calc(100vw - 40px));
  padding: 22px;
  border-radius: 26px;
}

.loading-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.loading-brand strong,
.loading-brand span {
  display: block;
}

.loading-brand strong {
  margin-bottom: 3px;
  font-size: 18px;
  line-height: 1.1;
}

.loading-brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.loading-progress {
  height: 12px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    var(--field-fill) padding-box,
    var(--neon-border-soft) border-box;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 10px 30px rgba(55, 70, 94, 0.1);
}

.loading-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, var(--rose), var(--cyan) 46%, var(--blue));
  box-shadow: 0 0 18px rgba(20, 126, 172, 0.24);
  transition: width 260ms ease;
}

.loading-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 10px;
  color: var(--dim);
  font-size: 12px;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
}

.loading-error-panel {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(255, 180, 199, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 180, 199, 0.08), rgba(99, 220, 255, 0.05)),
    rgba(8, 10, 17, 0.42);
  color: var(--muted);
}

.loading-error-panel[hidden] {
  display: none;
}

.loading-error-panel strong {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}

.loading-error-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  line-height: 1.55;
}

.loading-error-panel pre {
  max-height: 150px;
  margin: 0;
  overflow: auto;
  padding: 12px;
  border: 1px solid rgba(226, 236, 247, 0.12);
  border-radius: 14px;
  background: rgba(2, 4, 10, 0.55);
  color: rgba(248, 251, 255, 0.78);
  font-family: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.loading-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.loading-error-actions button,
.loading-error-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: var(--radius-control);
  padding: 0 14px;
  color: var(--ink);
  background:
    var(--control-fill) padding-box,
    var(--neon-border-soft) border-box;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

body.loading-failed .loading-progress span {
  background: linear-gradient(90deg, #ff8fad, var(--rose));
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: var(--modal-backdrop);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.auth-modal[hidden] {
  display: none;
}

.auth-card {
  position: relative;
  width: min(380px, 100%);
  padding: 24px;
  background:
    var(--surface-fill) padding-box,
    var(--neon-border-soft) border-box;
}

.auth-card h2 {
  margin: 0 0 18px;
  font-size: 30px;
  letter-spacing: 0;
}

.auth-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    var(--field-fill) padding-box,
    var(--neon-border-soft) border-box;
}

.auth-switch button {
  min-height: 34px;
  border: 0;
  border-radius: var(--radius-control);
  color: rgba(248, 251, 255, 0.72);
  background: transparent;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
}

.auth-switch button.active {
  color: var(--ink);
  background: rgba(99, 220, 255, 0.16);
  box-shadow: 0 0 18px rgba(99, 220, 255, 0.24);
}

.auth-card .primary-action {
  width: 100%;
  margin-top: 4px;
}

.auth-error {
  min-height: 18px;
  margin: 0;
  color: #ffb4c7;
  font-size: 12px;
  font-weight: 800;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(25, 25, 31, 0.94), rgba(12, 13, 18, 0.92)) padding-box,
    var(--neon-border-soft) border-box;
  cursor: pointer;
}

.modal-close::before,
.modal-close::after {
  position: absolute;
  top: 15px;
  left: 9px;
  width: 14px;
  height: 2px;
  content: "";
  border-radius: 2px;
  background: var(--ink);
}

.modal-close::before {
  transform: rotate(45deg);
}

.modal-close::after {
  transform: rotate(-45deg);
}

@media (max-width: 760px) {
  body {
    overflow: auto;
  }

  .app-shell {
    min-height: 100vh;
    height: 100svh;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    margin: 16px;
  }

  .top-actions,
  .quick-nav,
  .layout-nav {
    justify-content: flex-start;
  }

  .top-actions {
    align-items: stretch;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    width: min(328px, 100%);
  }

  .quick-nav,
  .layout-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .nav-select-field {
    grid-column: 1 / -1;
    justify-content: space-between;
    width: 100%;
  }

  .nav-select-trigger {
    flex: 1;
    min-width: 0;
  }

  .nav-select-menu {
    width: 100%;
  }

  .filter {
    min-width: 0;
    padding: 0 8px;
  }

  .theme-toggle,
  .hand-camera-toggle,
  .account-button,
  .account-group,
  .logout-button,
  .auth-button {
    align-self: stretch;
    width: 100%;
  }

  .site-panel {
    left: 16px;
    right: 16px;
    bottom: 38px;
    width: auto;
    max-height: 360px;
  }

  .material-panel {
    left: 16px;
    right: 16px;
    top: auto;
    bottom: 16px;
    width: auto;
    max-height: 238px;
    overflow: auto;
  }

  .status-strip {
    display: none;
  }
}
