:root {
  color-scheme: dark;
  --bg: #071019;
  --panel: #101b27;
  --panel-2: #0c1520;
  --line: rgba(174, 202, 230, 0.18);
  --text: #eef5fb;
  --muted: #9eb0c4;
  --accent: #5fd0b5;
  --accent-2: #62b7ff;
  --danger: #ff6d6d;
  --warn: #ffd166;
  --ok: #74d99f;
}

* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(98, 183, 255, 0.46) rgba(8, 18, 29, 0.3);
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: rgba(8, 18, 29, 0.22);
}

*::-webkit-scrollbar-thumb {
  min-height: 36px;
  border: 1px solid rgba(8, 18, 29, 0.54);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(98, 183, 255, 0.68), rgba(95, 208, 181, 0.58));
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(118, 205, 255, 0.92), rgba(110, 231, 207, 0.82));
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #071019;
  color: var(--text);
  font-family: "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

body.viewer-open {
  height: 100vh;
  overflow: hidden;
}

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

select {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  background-color: #142231;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2L6 6L10 2' stroke='%23d7e8f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 12px 8px;
  color: #f2f7fc;
  padding-right: 42px;
}

select option {
  background: #142231;
  color: #f2f7fc;
}

select option:checked {
  background: #214f74;
  color: #ffffff;
}

select:focus {
  outline: none;
  border-color: rgba(95, 208, 181, 0.64);
  box-shadow: 0 0 0 2px rgba(95, 208, 181, 0.14);
}

select:hover:not(:disabled) {
  border-color: rgba(98, 183, 255, 0.52);
  background-color: #182a3d;
}

select:disabled {
  border-color: rgba(174, 202, 230, 0.12);
  background: #101923;
  color: #aebdcc;
  opacity: 1;
  cursor: not-allowed;
}

button {
  min-height: 36px;
  border: 1px solid rgba(98, 183, 255, 0.34);
  border-radius: 7px;
  padding: 0 14px;
  background: linear-gradient(180deg, rgba(47, 130, 189, 0.95), rgba(26, 92, 145, 0.95));
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

button:hover {
  border-color: rgba(98, 183, 255, 0.7);
  transform: translateY(-1px);
}

button.secondary {
  background: rgba(255, 255, 255, 0.055);
  border-color: var(--line);
  box-shadow: none;
}

.icon-button {
  width: 36px;
  min-width: 36px;
  padding: 0;
  font-size: 18px;
}

button.danger {
  background: linear-gradient(180deg, rgba(168, 55, 55, 0.95), rgba(127, 39, 39, 0.95));
  border-color: rgba(255, 109, 109, 0.5);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button[data-busy="true"] {
  position: relative;
}

button[data-busy="true"]::after {
  content: "";
  width: 12px;
  height: 12px;
  margin-left: 8px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  display: inline-block;
  vertical-align: -2px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

select {
  appearance: none;
  -webkit-appearance: none;
  border-color: rgba(98, 183, 255, 0.24);
  background-color: #122233;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 2L6 6L10 2' stroke='%23d7e8f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 14px center;
  background-repeat: no-repeat;
  background-size: 12px 8px;
  color: #f2f7fc;
  padding-right: 42px;
}

select:disabled {
  background: #101923;
  color: #aebdcc;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.login-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

.login-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

.login-brand {
  position: fixed;
  top: 28px;
  left: 34px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #f3f8ff;
}

.login-brand-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(55, 191, 255, 0.42));
}

.login-brand-name {
  background: linear-gradient(90deg, #ffffff 0%, #e9f8ff 44%, #7ad7ff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-size: 23px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: 0;
  text-shadow: 0 0 20px rgba(90, 202, 255, 0.18);
}

.login-card {
  position: relative;
  width: min(586px, 100%);
  padding: 32px;
  border: 1px solid rgba(112, 147, 184, 0.24);
  border-radius: 8px;
  background: rgba(4, 10, 18, 0.94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(18px);
}

.login-eyebrow {
  margin: 0 0 10px !important;
  color: #69adff !important;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.22em;
}

.login-card h1 {
  margin: 0 0 24px;
  font-size: 26px;
  letter-spacing: 0;
}

.login-card p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.7;
}

.login-segment {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 24px;
  padding: 4px;
  border: 1px solid rgba(112, 147, 184, 0.22);
  border-radius: 8px;
  background: rgba(2, 8, 15, 0.62);
}

.login-segment button,
.login-code-button {
  min-width: 0;
  box-shadow: none;
}

.login-segment button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: rgba(219, 232, 245, 0.74);
}

.login-segment button.active {
  background: rgba(43, 84, 128, 0.58);
  color: #ffffff;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-input {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  min-height: 52px;
  border: 1px solid rgba(112, 147, 184, 0.26);
  border-radius: 8px;
  background: rgba(16, 28, 42, 0.72);
  overflow: hidden;
}

.login-code-input {
  grid-template-columns: 42px minmax(0, 1fr) auto;
}

.login-input:focus-within {
  border-color: rgba(33, 174, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(33, 174, 255, 0.12);
}

.login-input span {
  display: grid;
  place-items: center;
  color: rgba(180, 200, 224, 0.72);
  font-size: 18px;
}

.password-login-form .login-input-icon {
  color: #2f8eff;
}

.login-input-icon svg {
  width: 20px;
  height: 20px;
}

.login-input input {
  border: 0;
  background: transparent;
  min-width: 0;
  min-height: 52px;
  padding-left: 4px;
}

.login-code-button {
  align-self: stretch;
  min-height: 52px;
  padding: 0 18px;
  border: 0;
  border-left: 1px solid rgba(112, 147, 184, 0.22);
  border-radius: 0;
  background: transparent;
  color: #2bd4ff;
  font-size: 14px;
}

.login-code-button:disabled {
  color: rgba(180, 200, 224, 0.52);
  cursor: not-allowed;
}

.login-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  margin: -2px 0 0 !important;
  padding: 9px 12px;
  border: 1px solid rgba(47, 135, 224, 0.32);
  border-radius: 8px;
  background: rgba(18, 53, 92, 0.44);
  color: #dceeff !important;
  font-size: 13px;
}

.login-tip i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5ca7ff;
}

.login-submit {
  min-height: 52px;
  border: 0;
  background: linear-gradient(90deg, #22a7dc, #2f65e8);
  font-size: 17px;
  font-weight: 800;
}

.login-error {
  margin: 0 !important;
  padding: 9px 12px;
  border: 1px solid rgba(255, 121, 121, 0.34);
  border-radius: 8px;
  background: rgba(255, 121, 121, 0.1);
}

.form-grid {
  display: grid;
  gap: 12px;
}

@media (max-width: 640px) {
  .login-shell {
    padding: 88px 16px 20px;
  }

  .login-brand {
    top: 16px;
    left: 16px;
    gap: 10px;
  }

  .login-brand-logo {
    width: 24px;
    height: 24px;
  }

  .login-brand-name {
    font-size: 20px;
  }

  .login-card {
    padding: 24px 18px;
  }

  .login-code-input {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .login-code-button {
    grid-column: 1 / -1;
    border-top: 1px solid rgba(112, 147, 184, 0.22);
    border-left: 0;
  }

}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 17, 26, 0.96);
}

.brand h1 {
  margin: 0;
  font-size: 20px;
  letter-spacing: 0;
}

.brand span,
.userbar {
  color: var(--muted);
  font-size: 13px;
}

.userbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.topbar.scene-topbar {
  position: relative;
  z-index: 120;
  min-width: 0;
  min-height: 68px;
  flex-direction: row;
  align-items: center;
}

.scene-topbar + .stage-layout {
  height: calc(100vh - 68px);
}

.scene-header-main {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.scene-header-main > .brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.scene-brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.scene-header-title {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-library-button,
.scene-topbar > .userbar {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.scene-config-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.scene-config-actions [data-action="toggle-panel"].active {
  border-color: rgba(85, 185, 243, 0.5);
  color: #eaf8ff;
  background: rgba(43, 154, 217, 0.2);
}

.scene-user-menu {
  position: relative;
  flex: 0 0 auto;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.scene-user-menu > summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 4px 6px;
  border-radius: 8px;
  cursor: pointer;
  list-style: none;
}

.scene-user-menu > summary::-webkit-details-marker {
  display: none;
}

.scene-user-menu > summary:hover,
.scene-user-menu[open] > summary {
  background: rgba(85, 185, 243, 0.09);
}

.scene-user-menu > summary:focus-visible,
.scene-header-main > .brand:focus-visible {
  outline: 2px solid #55b9f3;
  outline-offset: 3px;
}

.scene-user-identity {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-user-chevron {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.scene-user-menu[open] .scene-user-chevron {
  transform: rotate(180deg);
}

.scene-user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 160px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.scene-user-dropdown > button {
  width: 100%;
  text-align: left;
}

@media (max-width: 860px) {
  .topbar.scene-topbar {
    min-height: 62px;
    gap: 8px;
    padding: 8px 14px;
  }

  .scene-topbar + .stage-layout {
    height: calc(100vh - 62px);
  }

  .scene-header-main {
    gap: 8px;
  }

  .scene-brand-copy {
    display: none;
  }

  .scene-header-title {
    font-size: 13px;
  }

  .scene-user-menu {
    padding-left: 6px;
  }

  .scene-user-identity {
    max-width: 76px;
  }
}

.content {
  padding: 22px;
}

.home-hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 150px;
  margin: -4px 0 22px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.home-hero h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  text-align: center;
  font-size: clamp(30px, 4vw, 54px);
  letter-spacing: 0;
  text-shadow: 0 0 26px rgba(98, 183, 255, 0.34);
}

.home-hero p {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  color: var(--muted);
}

.home-orbit {
  position: absolute;
  width: min(760px, 86vw);
  aspect-ratio: 3.8;
  border: 1px solid rgba(95, 208, 181, 0.18);
  border-radius: 50%;
  animation: orbitPulse 5s ease-in-out infinite;
}

.home-orbit::before,
.home-orbit::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(98, 183, 255, 0.14);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.home-orbit::after {
  inset: 38px;
  border-color: rgba(255, 209, 102, 0.11);
  transform: rotate(11deg);
}

@keyframes orbitPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.98); }
  50% { opacity: 1; transform: scale(1.03); }
}

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

.toolbar h2 {
  margin: 0;
  font-size: 18px;
}

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

.scene-group-list {
  display: grid;
  gap: 28px;
}

.scene-group {
  display: grid;
  gap: 14px;
}

.scene-group-title {
  margin: 0;
  color: #f2f7fc;
  font-size: 20px;
  line-height: 1.35;
}

.scene-empty {
  margin: 22px 0 0;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.scene-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 430px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(18, 31, 45, 0.94), rgba(9, 17, 26, 0.96));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.scene-card:hover {
  transform: translateY(-3px);
  border-color: rgba(98, 183, 255, 0.38);
}

.cover {
  position: relative;
  min-height: 220px;
  background: #0b1420;
  overflow: hidden;
}

.cover img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.cover.empty {
  display: grid;
  place-items: center;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.cover-tag,
.status-tag {
  position: absolute;
  top: 10px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 12px;
  font-weight: 650;
  backdrop-filter: blur(8px);
}

.cover-tag {
  left: 10px;
  color: #eafff9;
  background: rgba(10, 48, 58, 0.78);
  border-color: rgba(95, 208, 181, 0.38);
}

.status-tag {
  right: 10px;
  background: rgba(0, 0, 0, 0.56);
}

.status-tag.placeholder,
.status-tag.draft {
  color: var(--warn);
}

.status-tag.protected {
  top: 10px;
  right: 10px;
  bottom: auto;
  color: #eafff9;
  background: rgba(18, 70, 61, 0.78);
  border-color: rgba(95, 208, 181, 0.46);
}

.conversion-tag {
  position: absolute;
  right: 10px;
  bottom: 10px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 20px);
  padding: 0 9px;
  border: 1px solid rgba(174, 202, 230, 0.2);
  border-radius: 999px;
  background: rgba(5, 14, 23, 0.7);
  color: #d9e8f4;
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.conversion-tag.ok {
  color: #eafff9;
  border-color: rgba(95, 208, 181, 0.42);
  background: rgba(16, 72, 62, 0.76);
}

.conversion-tag.warn {
  color: #ffe4a3;
  border-color: rgba(255, 209, 102, 0.46);
  background: rgba(80, 62, 18, 0.78);
}

.conversion-tag.error {
  color: #ffd7dc;
  border-color: rgba(255, 109, 123, 0.48);
  background: rgba(78, 23, 32, 0.78);
}

.conversion-tag.pending {
  color: #cbe3f4;
  border-color: rgba(98, 183, 255, 0.36);
  background: rgba(23, 56, 82, 0.78);
}

.scene-body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 15px;
}

.scene-body h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  color: #f4f9ff;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(95, 208, 181, 0.32);
  border-radius: 999px;
  color: #9ff0df;
  background: rgba(95, 208, 181, 0.08);
  font-size: 12px;
  font-weight: 650;
}

.scene-body p {
  margin: 0;
  color: #b6c5d6;
  line-height: 1.68;
  font-size: 13.5px;
  min-height: 86px;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-self: end;
  padding: 0 15px 15px;
}

.actions button {
  min-width: 88px;
}

.stage-layout {
  --scene-panel-width: 360px;
  height: calc(100vh - 59px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--scene-panel-width);
}

.stage-layout.scene-config-layout {
  --scene-panel-width: clamp(440px, 30vw, 560px);
}

.stage-layout.no-panel {
  grid-template-columns: 1fr;
}

.stage {
  position: relative;
  min-height: 0;
}

.stage iframe {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: transparent;
}

.stage-interaction-capture {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  overflow: hidden;
  cursor: crosshair;
  pointer-events: none;
}

.stage.is-strip-label-capturing .stage-interaction-capture {
  display: block;
  pointer-events: auto;
}

.stage-label-valid-bounds {
  position: absolute;
  left: var(--bounds-left, 0);
  top: var(--bounds-top, 0);
  width: var(--bounds-width, 0);
  height: var(--bounds-height, 0);
  display: none;
  border: 1px dashed rgba(124, 241, 210, 0.92);
  border-radius: 2px;
  background: rgba(95, 208, 181, 0.06);
  box-shadow:
    0 0 0 9999px rgba(2, 8, 14, 0.22),
    0 0 18px rgba(95, 208, 181, 0.28);
  pointer-events: none;
}

.stage.has-label-valid-bounds .stage-label-valid-bounds {
  display: block;
}

.stage-label-valid-bounds::before,
.stage-label-valid-bounds::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(88, 190, 255, 0.36);
  pointer-events: none;
}

.stage-label-valid-bounds::after {
  inset: -4px;
  border-color: rgba(255, 209, 102, 0.42);
}

.stage.is-strip-label-capturing .stage-hotspot {
  pointer-events: none;
}

.stage-tools {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 4;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  pointer-events: none;
}

.video-toggle.active {
  border-color: rgba(95, 208, 181, 0.72);
  background: rgba(18, 105, 85, 0.88);
}

.stage-hotspots {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.stage-hotspots.hidden {
  display: none;
}

.stage-hotspot {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 10px 5px 7px;
  transform: translate(-50%, -50%) scale(var(--viewer-scale, 1)) scale(var(--label-poi-scale, 1));
  transform-origin: center;
  border: 1px solid rgba(74, 220, 185, 0.72);
  border-radius: 5px;
  background: rgba(5, 22, 28, 0.9);
  color: #f2fffb;
  font-size: 12px;
  pointer-events: auto;
  cursor: pointer;
  opacity: var(--label-opacity, 1);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.42);
  transition: opacity 140ms ease, border-color 140ms ease, background-color 140ms ease, filter 140ms ease;
}

.stage-hotspot[data-selected="true"] {
  opacity: 1;
  border-color: #ff9f0a;
  background-color: rgba(58, 34, 4, 0.96);
  color: #fff0c2;
  filter: brightness(1.32) saturate(1.4) drop-shadow(0 0 3px rgba(0, 0, 0, 0.95)) drop-shadow(0 0 11px rgba(255, 159, 10, 0.96));
}

.label-hover-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: min(260px, calc(100vw - 16px));
  padding: 6px 10px;
  border: 1px solid rgba(95, 208, 181, 0.72);
  border-radius: 5px;
  background: rgba(5, 17, 25, 0.96);
  color: #f4fffc;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.48);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 10px));
}

.label-hover-tooltip[data-placement="below"] {
  transform: translate(-50%, 10px);
}

.label-hover-tooltip[hidden] {
  display: none;
}

.stage-hotspot[data-label-type="视频"] {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.stage-hotspot[data-label-type="仿真"],
.stage-hotspot.simulation-label {
  min-width: 0;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.arweb-simulation-label,
.arweb-simulation-label > img {
  display: block;
  width: 224px;
  height: 80px;
  pointer-events: none;
  user-select: none;
}

.arweb-system-poi {
  position: relative;
  display: block;
  width: 0;
  height: 0;
  flex: 0 0 auto;
  border-right: 13px solid transparent;
  border-bottom: 0;
  border-left: 13px solid transparent;
  border-top: 36px solid #1aa3ff;
  filter: drop-shadow(0 5px 7px rgba(0, 0, 0, .46));
  transform: translateY(3px);
}

.arweb-system-poi > i {
  position: absolute;
  top: -29px;
  left: -5px;
  width: 10px;
  height: 10px;
  border: 2px solid #eaffff;
  border-radius: 50%;
  background: #0b5fc7;
  box-shadow: 0 0 8px rgba(234, 255, 255, .76);
}

.hotspot-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border: 2px solid #dffff7;
  border-radius: 50%;
  background: #22c59f;
  box-shadow: 0 0 0 5px rgba(34, 197, 159, 0.18);
}

.vector-symbol {
  position: relative;
  width: 38px;
  height: 18px;
  flex: 0 0 auto;
}

.vector-symbol i:first-child {
  position: absolute;
  left: 2px;
  top: 8px;
  width: 30px;
  height: 2px;
  background: var(--label-vector-color, #54e3a7);
  box-shadow: 0 0 8px var(--label-vector-color, #54e3a7);
}

.vector-symbol i:last-child {
  position: absolute;
  right: 2px;
  top: 4px;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--label-vector-color, #54e3a7);
  border-right: 2px solid var(--label-vector-color, #54e3a7);
  transform: rotate(45deg);
}

.polyline-symbol {
  position: relative;
  width: 38px;
  height: 24px;
  flex: 0 0 auto;
}

.polyline-symbol i {
  position: absolute;
  height: 2px;
  background: #62b7ff;
  transform-origin: left center;
  box-shadow: 0 0 7px rgba(98, 183, 255, 0.65);
}

.polyline-symbol i:nth-child(1) { left: 1px; top: 17px; width: 15px; transform: rotate(-38deg); }
.polyline-symbol i:nth-child(2) { left: 13px; top: 8px; width: 14px; transform: rotate(32deg); }
.polyline-symbol i:nth-child(3) { left: 25px; top: 15px; width: 12px; transform: rotate(-46deg); }

.simulation-symbol {
  position: relative;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(113, 232, 205, 0.7);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(72, 224, 188, 0.52) 0 12%, rgba(72, 224, 188, 0.08) 14% 48%, transparent 50%);
}

.simulation-symbol::before,
.simulation-symbol::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid rgba(113, 232, 205, 0.55);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: simulationPulse 1.8s ease-out infinite;
}

.simulation-symbol::before { width: 18px; height: 18px; }
.simulation-symbol::after { width: 28px; height: 28px; animation-delay: .5s; }

@keyframes simulationPulse {
  0% { opacity: .2; transform: translate(-50%, -50%) scale(.6); }
  65% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
}

.label-video-board-shell {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 7px;
  width: var(--label-board-width, 180px);
  padding: 6px;
  overflow: hidden;
  border: 1px solid rgba(255, 209, 102, 0.72);
  border-radius: 8px;
  background: rgba(5, 12, 18, 0.94);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.label-video-board-media,
.label-video-board-placeholder {
  display: grid;
  width: 100%;
  height: var(--label-board-height, 101px);
  place-items: center;
  object-fit: cover;
  overflow: hidden;
  border: 1px solid rgba(98, 183, 255, 0.24);
  border-radius: 6px;
  background: #03080d;
  color: #ffd166;
  font-size: 13px;
}

.label-video-board-media {
  pointer-events: none;
}

.label-video-board-standard-media {
  position: relative;
  overflow: hidden;
  background: #03080c;
}

.label-video-board-standard-media canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

.label-video-board-standard-media .label-video-board-placeholder {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: auto;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
}

.video-board-size-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.video-board-size-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.video-board-size-heading > span {
  color: var(--muted);
  font-size: 13px;
}

.field .video-board-aspect-lock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #8da4b8;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}

.field .video-board-aspect-lock:has(input:checked) {
  color: #75d9c1;
}

.video-board-aspect-lock input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #1b9f80;
}

.video-board-spatial-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.video-board-spatial-fit {
  width: 100%;
  min-height: 32px;
  margin: 8px 0;
  padding: 5px 10px;
  font-size: 12px;
}

.field .video-board-spatial-options .video-board-aspect-lock,
.field .video-board-spatial-options .video-board-occlusion {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  margin: 0;
  color: #8da4b8;
  font-size: 11px;
  line-height: 1.35;
  cursor: pointer;
  user-select: none;
}

.field .video-board-spatial-options .video-board-occlusion:has(input:checked) {
  color: #75d9c1;
}

.video-board-occlusion input {
  flex: none;
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #1b9f80;
}

.video-board-size-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.label-video-board-placeholder[data-tone="error"] {
  padding: 12px;
  border-color: rgba(255, 99, 94, 0.68);
  color: #ffb2ad;
  line-height: 1.45;
  text-align: center;
  background: rgba(38, 8, 12, 0.92);
}

.label-video-board-media::-webkit-media-controls,
.label-video-board-media::-webkit-media-controls-panel,
.label-video-board-media::-webkit-media-controls-enclosure,
.label-video-board-media::-webkit-media-controls-play-button,
.label-video-board-media::-webkit-media-controls-volume-slider,
.label-video-board-media::-webkit-media-controls-mute-button,
.label-video-board-media::-webkit-media-controls-timeline,
.label-video-board-media::-webkit-media-controls-current-time-display,
.label-video-board-media::-webkit-media-controls-time-remaining-display,
.label-video-board-media::-webkit-media-controls-fullscreen-button {
  display: none !important;
}

.label-video-board-shell strong {
  min-width: 0;
  overflow: hidden;
  color: #fff3ce;
  font-size: 12px;
  line-height: 1.35;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-popup {
  position: absolute;
  left: clamp(16px, var(--popup-left, 50%), calc(100% - 16px));
  top: clamp(16px, var(--popup-top, 50%), calc(100% - 16px));
  z-index: 8;
  display: grid;
  grid-template-rows: auto minmax(0, auto);
  gap: 10px;
  width: min(var(--popup-width, 380px), calc(100% - 32px), calc(100vw - 32px));
  max-height: min(var(--popup-max-height, 520px), calc(100% - 32px), calc(100vh - 32px));
  overflow: hidden;
  transform: translate(-50%, calc(-100% - 14px));
  padding: 16px 16px 17px;
  border: 1px solid rgba(98, 183, 255, 0.36);
  border-radius: 8px;
  background: rgba(7, 17, 27, 0.97);
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

.stage-popup-right {
  transform: translate(16px, -50%);
}

.stage-popup-bottom {
  transform: translate(-50%, 16px);
}

.stage-popup-left {
  transform: translate(calc(-100% - 16px), -50%);
}

.stage-popup-center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.stage-popup-fixed.stage-popup-top {
  transform: translate(-50%, 0);
}

.stage-popup-fixed.stage-popup-right {
  transform: translate(calc(-100% - 16px), -50%);
}

.stage-popup-fixed.stage-popup-bottom {
  transform: translate(-50%, calc(-100% - 16px));
}

.stage-popup-fixed.stage-popup-left {
  transform: translate(16px, -50%);
}

.stage-popup-custom {
  transform: none;
}

.stage-popup.stage-popup-dragged {
  transform: none;
}

.stage-popup.stage-popup-dragging {
  box-shadow: 0 28px 82px rgba(0, 0, 0, 0.68), 0 0 0 1px rgba(95, 208, 181, 0.26);
}

.stage-popup::-webkit-scrollbar,
.stage-popup-content::-webkit-scrollbar {
  display: none;
}

.stage-popup,
.stage-popup-content {
  scrollbar-width: none;
}

.stage-popup-close {
  position: absolute;
  right: 10px;
  top: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid rgba(174, 202, 230, 0.26);
  border-radius: 50%;
  background: rgba(9, 24, 38, 0.8);
  box-shadow: none;
  color: rgba(238, 248, 255, 0.86);
  font-size: 0;
  line-height: 1;
}

.stage-popup-close::before,
.stage-popup-close::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

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

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

.stage-popup-close:hover {
  border-color: rgba(98, 183, 255, 0.52);
  background: rgba(27, 76, 113, 0.86);
  color: #ffffff;
  transform: scale(1.03);
}

.stage-popup h3 {
  min-width: 0;
  margin: 0 36px 0 0;
  overflow: hidden;
  cursor: move;
  color: #f5fbff;
  font-size: 17px;
  line-height: 1.35;
  text-overflow: ellipsis;
  touch-action: none;
  user-select: none;
  white-space: nowrap;
}

.stage-popup-content {
  min-height: 0;
  max-height: min(calc(var(--popup-max-height, 520px) - 72px), calc(100vh - 140px));
  overflow: hidden;
}

.stage-popup p {
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  line-height: 1.7;
}
.stage-popup img,
.stage-popup video {
  display: block;
  width: 100%;
  max-height: min(340px, calc(var(--popup-max-height, 520px) - 96px), calc(100vh - 170px));
  object-fit: contain;
  border-radius: 5px;
  background: #020609;
}
.stage-popup .label-link-frame-shell {
  position: relative;
  width: 100%;
  height: min(430px, calc(var(--popup-max-height, 520px) - 96px), calc(100vh - 170px));
  min-height: 180px;
  overflow: hidden;
  border-radius: 5px;
  background: #081521;
}

.stage-popup-link-frame {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
  opacity: 0;
  transition: opacity 180ms ease;
}

.label-link-frame-loading {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  color: #b9d8ef;
  font-size: 13px;
  text-align: center;
  background: radial-gradient(circle at 50% 42%, rgba(27, 77, 109, 0.5), rgba(8, 21, 33, 0.98) 58%);
  opacity: 1;
  visibility: visible;
  transition: opacity 180ms ease, visibility 0s linear 0s;
}

.label-link-frame-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(112, 199, 255, 0.2);
  border-top-color: #70c7ff;
  border-radius: 50%;
  animation: label-link-frame-spin 760ms linear infinite;
}

.label-link-frame-shell.is-loaded .label-link-frame-loading {
  opacity: 0;
  visibility: hidden;
  transition-delay: 0s, 180ms;
}

.label-link-frame-shell.is-loaded .stage-popup-link-frame {
  opacity: 1;
}

@keyframes label-link-frame-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .label-link-frame-spinner { animation-duration: 1.8s; }
}
.stage-popup a { color: #70c7ff; }

.stage-tools > * {
  pointer-events: auto;
}

.stage-tools button.secondary {
  border-color: rgba(98, 183, 255, 0.5);
  background: linear-gradient(180deg, rgba(26, 63, 94, 0.96), rgba(13, 36, 58, 0.96));
  color: #f2f8ff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}

.stage-tools button.secondary:hover {
  border-color: rgba(111, 200, 255, 0.78);
  background: linear-gradient(180deg, rgba(38, 97, 142, 0.98), rgba(17, 55, 86, 0.98));
}

.viewer-zoom-control {
  display: inline-flex;
  align-items: stretch;
  min-height: 34px;
  overflow: hidden;
  border: 1px solid rgba(98, 183, 255, 0.5);
  border-radius: 7px;
  background: linear-gradient(180deg, rgba(26, 63, 94, 0.96), rgba(13, 36, 58, 0.96));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.32);
}

.viewer-zoom-control button.secondary {
  min-width: 34px;
  height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-size: 17px;
}

.viewer-zoom-control button.secondary + output,
.viewer-zoom-control output + button.secondary {
  border-left: 1px solid rgba(98, 183, 255, 0.32);
}

.viewer-zoom-control output {
  display: grid;
  place-items: center;
  min-width: 58px;
  padding: 0 9px;
  color: #f2f8ff;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.viewer-zoom-control[data-ready="false"] output {
  color: rgba(242, 248, 255, 0.58);
}

.viewer-zoom-control button.secondary:disabled {
  cursor: not-allowed;
  color: rgba(242, 248, 255, 0.38);
  opacity: 1;
}

.stage-tools .mode-toggle {
  min-width: 92px;
}

.panel {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--panel-2);
  padding: 16px 18px calc(54px + env(safe-area-inset-bottom, 0px)) 16px;
  scroll-padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 18px;
}

.protected-notice {
  margin: 0 0 12px;
  padding: 10px 11px;
  border: 1px solid rgba(255, 209, 102, 0.35);
  border-radius: 6px;
  background: rgba(255, 209, 102, 0.08);
  color: #ffe4a3;
  font-size: 13px;
}

.view-config-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(7, 18, 30, 0.72);
}

.view-status-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: var(--muted);
  font-size: 12px;
}

.view-status-row strong {
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.view-min-scale-row {
  align-items: center;
}

.view-min-scale-row strong {
  min-width: 0;
}

.view-min-scale-row input {
  width: 100%;
  min-width: 0;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 700;
}

.view-min-scale-row input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.view-min-scale-row input:focus {
  outline: 1px solid rgba(84, 169, 255, 0.55);
  outline-offset: 2px;
}

.view-action-grid,
.view-param-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.view-action-grid button {
  min-width: 0;
  padding: 0 8px;
}

.view-param-grid {
  padding: 10px;
  border: 1px solid rgba(174, 202, 230, 0.12);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.025);
}

.view-param-grid .field {
  margin-bottom: 0;
}

.view-param-grid .field:last-child {
  grid-column: 1 / -1;
}

.view-param-grid .field:last-child input {
  max-width: 140px;
}

.zoom-range-grid .field:last-child {
  grid-column: auto;
}

.zoom-range-grid .field:last-child input {
  max-width: none;
}

.zoom-range-grid input:focus {
  outline: none;
  border-color: rgba(95, 208, 181, 0.72);
  box-shadow: 0 0 0 2px rgba(95, 208, 181, 0.14);
}

.view-config-box + button[data-action="save-scene"] {
  margin-top: 4px;
  scroll-margin-bottom: 88px;
}

.view-checkbox {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 8px;
  width: fit-content;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.view-checkbox input {
  width: auto;
}

.view-checkbox:has(input:disabled) {
  cursor: not-allowed;
}

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.tabs button.active {
  background: rgba(95, 208, 181, 0.18);
  border-color: rgba(95, 208, 181, 0.55);
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.field-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
}

.field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border: 1px solid rgba(98, 183, 255, 0.32);
  border-radius: 50%;
  background: rgba(98, 183, 255, 0.08);
  color: #9fd2ff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.field-help:focus-visible {
  outline: 2px solid rgba(98, 183, 255, 0.58);
  outline-offset: 2px;
}

.readonly-field,
.readonly-field:focus {
  border-color: rgba(174, 202, 230, 0.12);
  background: #101923;
  color: #7f91a4;
  box-shadow: none;
  cursor: not-allowed;
}

.field-hint {
  color: #718499;
  font-size: 11px;
  text-align: right;
}

.form-section-title {
  margin: 5px 0 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: #e8f3fc;
  font-size: 14px;
  font-weight: 650;
}

.form-section-title.compact-subtitle {
  margin: 8px 0 6px;
  padding-top: 8px;
  color: #8fb6d9;
  font-size: 12px;
  font-weight: 600;
}

.video-scheduling-box {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(98, 183, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 16, 25, 0.42);
}

.camera-tracking-enable-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  min-height: 20px;
}

.camera-tracking-enable-control input[type="checkbox"] {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  accent-color: #75d8c1;
}

.camera-tracking-enable-control label {
  width: auto;
  margin: 0;
  line-height: 20px;
  cursor: pointer;
  user-select: none;
}

.camera-tracking-enable-control input:disabled,
.camera-tracking-enable-control input:disabled + label {
  cursor: not-allowed;
}

.camera-tracking-calibration {
  border-top: 1px solid rgba(98, 183, 255, 0.18);
  padding-top: 8px;
}

.camera-tracking-calibration > summary {
  cursor: pointer;
  color: #b9d5e9;
  font-size: 12px;
  font-weight: 650;
}

.camera-tracking-pto-import {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.camera-tracking-pto-import > button {
  width: auto;
  min-height: 32px;
  padding: 6px 12px;
}
.camera-tracking-pto-import > button[hidden] { display: none; }
.camera-tracking-pto-checks summary { cursor: pointer; color: #d8b875; }
.camera-tracking-pto-checks ul { margin-top: 6px; }

.camera-tracking-pto-import > [data-camera-tracking-pto-result] {
  width: 100%;
  min-width: 0;
}

.camera-tracking-pto-preview {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(117, 216, 193, 0.28);
  border-radius: 7px;
  background: rgba(6, 28, 39, 0.66);
  font-size: 12px;
  line-height: 1.5;
}

.camera-tracking-pto-preview-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.camera-tracking-pto-preview-heading strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #e5f5ff;
}

.camera-tracking-pto-preview-heading span { color: #8eabba; white-space: nowrap; }
.camera-tracking-pto-metrics { display: flex; flex-wrap: wrap; gap: 5px; }
.camera-tracking-pto-metrics span { padding: 2px 7px; border-radius: 999px; background: rgba(89, 141, 163, 0.16); color: #b9d5e1; }
.camera-tracking-pto-warnings { display: grid; gap: 3px; margin: 0; padding-left: 18px; color: #d8b875; }
.camera-tracking-pto-warnings li { padding-left: 1px; }
.camera-tracking-pto-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.camera-tracking-pto-actions button { width: auto; min-height: 30px; padding: 5px 11px; }
.camera-tracking-pto-status { width: 100%; color: #a9c7d5; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.camera-tracking-pto-status.is-error { color: #ff9d9d; }
.camera-tracking-pto-status.is-applied { color: #75d8c1; }

.camera-tracking-calibration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.camera-tracking-calibration-grid .field {
  margin: 0;
}

.camera-tracking-feature-switches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 10px;
}

.camera-tracking-feature-switches label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  margin: 0;
  cursor: pointer;
}

.camera-tracking-feature-switches input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #75d8c1;
}

.camera-tracking-calibration-points {
  display: grid;
  gap: 0;
  margin-top: 10px;
}

.camera-tracking-calibration-point {
  display: grid;
  grid-template-columns: 26px repeat(4, minmax(0, 1fr)) 22px;
  gap: 4px;
  align-items: center;
}

.camera-tracking-calibration-point[data-camera-tracking-calibration-point] {
  padding-block: 6px;
  border-bottom: 1px solid rgba(174, 202, 230, 0.1);
}

.camera-tracking-calibration-point input {
  min-width: 0;
  height: 32px;
  padding: 0 3px;
  font-size: 12px;
  line-height: normal;
  text-align: center;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
  -moz-appearance: textfield;
}

.camera-tracking-calibration-point input::-webkit-inner-spin-button,
.camera-tracking-calibration-point input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.camera-tracking-calibration-point button {
  width: 22px;
  min-width: 22px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.camera-tracking-calibration-point .camera-tracking-calibration-locate {
  width: 26px;
  min-width: 26px;
  color: #75d8c1;
  font-variant-numeric: tabular-nums;
}

.camera-tracking-calibration-point.is-reviewing input { border-color: #ffc145; }
.camera-tracking-calibration-point.is-reviewing .camera-tracking-calibration-locate { background: #644513; color: #fff1bc; }
.camera-tracking-calibration-assist { margin-top: 0; }
.camera-tracking-calibration-assist[hidden] { display: none; }
.camera-tracking-calibration-point-quality {
  grid-column: 2 / 6;
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}
.camera-tracking-calibration-point-quality select {
  width: 76px;
  min-width: 0;
  min-height: 28px;
  height: 28px;
  margin: 0;
  padding: 0 24px 0 8px;
  font-size: 12px;
  line-height: normal;
  background-position: right 8px center;
  background-size: 10px 7px;
}
.camera-tracking-calibration-point-quality output {
  min-width: 0;
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #a7becf;
  overflow-wrap: anywhere;
}
.camera-tracking-calibration-point-quality .is-warning { color: #ffcd7c; }
@supports (appearance: base-select) {
  .camera-tracking-calibration-point-quality select {
    display: flex;
    align-items: center;
    padding-inline: 8px;
    gap: 6px;
  }
  .camera-tracking-calibration-point-quality select::picker-icon {
    align-self: center;
    font-size: 10px;
    line-height: 1;
  }
  .camera-tracking-calibration-point-quality select::picker(select) {
    min-width: 96px;
    max-width: 128px;
  }
  .camera-tracking-calibration-point-quality option {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
    line-height: 1.5;
  }
}
.camera-tracking-quality-tools { display: grid; gap: 8px; margin: 12px 0; }
.camera-tracking-quality-tools button { justify-self: start; min-height: 32px; padding: 6px 12px; }
.camera-tracking-quality-tools output, .camera-tracking-projection-samples { font-size: 12px; color: #adc7d6; }
.camera-tracking-quality-tools output { display: grid; gap: 4px; line-height: 1.6; overflow-wrap: anywhere; }
.camera-tracking-quality-tools output:empty { display: none; }
.camera-tracking-projection-sample { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 4px 0; }
.camera-tracking-projection-sample button { width: 22px; min-width: 22px; min-height: 26px; padding: 0; }
.camera-tracking-calibration-actions { flex-wrap: wrap; }

.camera-tracking-calibration-heading {
  padding-block: 4px;
  color: #97b1c5;
  font-size: 11px;
  text-align: center;
}

@media (min-width: 1200px) {
  .camera-tracking-calibration-point {
    grid-template-columns: 26px repeat(4, minmax(0, 1fr)) 76px 22px;
  }

  .camera-tracking-calibration-point > [data-action="remove-camera-tracking-calibration-point"] {
    grid-column: 7;
    grid-row: 1;
  }

  .camera-tracking-calibration-point-quality {
    display: contents;
  }

  .camera-tracking-calibration-point-quality select {
    grid-column: 6;
    grid-row: 1;
    width: 100%;
    height: 32px;
  }

  .camera-tracking-calibration-point-quality output {
    grid-column: 2 / 7;
    grid-row: 2;
  }
}

.camera-tracking-add-point {
  flex: 1;
}

.camera-tracking-calibration-controls {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.camera-tracking-calibration-controls > span {
  color: #87a7bd;
  font-size: 11px;
  line-height: 1.4;
}

.camera-tracking-calibration-actions {
  display: flex;
  gap: 7px;
}

.camera-tracking-calibration-actions button {
  min-width: max-content;
  white-space: nowrap;
}
.camera-tracking-calibration-actions button[data-action="open-camera-calibration-workbench"] { flex: 1 1 100%; order: 3; }

.camera-tracking-calibration-actions button[data-action="start-camera-tracking-calibration"] {
  width: 100%;
}

.camera-tracking-calibration-actions button[data-action="stop-camera-tracking-calibration"] {
  flex: none;
}

.camera-tracking-calibration-actions button[hidden] {
  display: none;
}

.video-scheduling-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.video-scheduling-grid .field {
  margin-bottom: 0;
}

.video-scheduling-recommendation {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(76, 224, 196, 0.22);
  border-radius: 7px;
  background: rgba(8, 32, 39, 0.58);
  color: #9fb6ca;
  font-size: 11px;
  line-height: 1.5;
}

.video-scheduling-recommendation[hidden] {
  display: none;
}

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

.video-scheduling-recommend-head strong {
  display: block;
  color: #e8f3fc;
  font-size: 13px;
}

.video-scheduling-recommend-title {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.video-scheduling-recommend-help {
  position: static;
  display: inline-flex;
}

.video-scheduling-recommend-help-button {
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid rgba(98, 183, 255, 0.34);
  border-radius: 999px;
  color: #9dcaee;
  background: rgba(21, 52, 75, 0.72);
  font-size: 11px;
  line-height: 16px;
}

.video-scheduling-recommend-help-button:hover,
.video-scheduling-recommend-help-button:focus-visible {
  border-color: rgba(95, 208, 181, 0.65);
  color: #dffdf4;
}

.video-scheduling-recommend-tooltip {
  position: absolute;
  z-index: 80;
  top: calc(100% + 7px);
  left: 0;
  right: 0;
  width: auto;
  display: none;
  gap: 5px;
  padding: 9px 10px;
  border: 1px solid rgba(98, 183, 255, 0.34);
  border-radius: 7px;
  color: #c7dbea;
  background: #102333;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
  font-size: 11px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.video-scheduling-recommend-help:hover .video-scheduling-recommend-tooltip,
.video-scheduling-recommend-help:focus-within .video-scheduling-recommend-tooltip {
  display: grid;
}

.video-folder-picker.has-delete {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.video-folder-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.video-folder-summary span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border: 1px solid rgba(58, 219, 191, 0.22);
  border-radius: 999px;
  background: rgba(58, 219, 191, 0.08);
  color: #9fb6ca;
  font-size: 11px;
}

.video-folder-summary strong {
  color: #dffdf4;
}

.video-source-switch,
.online-video-config {
  padding: 12px;
  border: 1px solid rgba(98, 183, 255, 0.22);
  border-radius: 8px;
  background: rgba(7, 16, 25, 0.42);
}

.online-video-config {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.online-video-config .field {
  margin-bottom: 0;
}

.online-video-connect-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.online-video-connect-row > * {
  min-width: 0;
}

.online-video-source-picker {
  position: relative;
  min-width: 0;
  width: 100%;
}

.online-video-source-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.online-video-source-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 12px;
  border: 1px solid rgba(98, 183, 255, 0.3);
  border-radius: 6px;
  background: #0e1e2c;
  color: #edf7ff;
  text-align: left;
}

.online-video-source-trigger:hover:not(:disabled),
.online-video-source-trigger[aria-expanded="true"] {
  border-color: rgba(95, 208, 181, 0.72);
  box-shadow: 0 0 0 2px rgba(95, 208, 181, 0.1);
}

.online-video-source-trigger:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.online-video-source-trigger > span,
.online-video-source-option > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-video-source-trigger > i {
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 6px solid #8ee5d0;
  transition: transform 0.16s ease;
}

.online-video-source-trigger[aria-expanded="true"] > i {
  transform: rotate(180deg);
}

.online-video-source-menu {
  position: fixed;
  z-index: 120;
  display: grid;
  gap: 2px;
  max-width: calc(100vw - 16px);
  padding: 5px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(95, 208, 181, 0.46);
  border-radius: 7px;
  background: #091a27;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.48);
}

.online-video-source-menu[hidden] {
  display: none;
}

.online-video-source-option {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #e3f2fc;
  text-align: left;
}

.online-video-source-option:hover,
.online-video-source-option:focus-visible {
  background: rgba(66, 143, 184, 0.22);
  outline: none;
}

.online-video-source-option[aria-selected="true"] {
  background: rgba(48, 134, 174, 0.34);
  color: #9df0dd;
}

.online-video-status {
  margin-top: 7px;
  padding: 7px 9px;
  border: 1px solid rgba(98, 183, 255, 0.16);
  border-radius: 6px;
  background: rgba(11, 26, 39, 0.6);
  color: #8fb6d9;
  font-size: 11px;
  line-height: 1.45;
}

.online-video-status.is-connected {
  border-color: rgba(76, 224, 196, 0.24);
  color: #81e3ce;
}

.online-video-status.is-error {
  border-color: rgba(255, 113, 113, 0.28);
  color: #ffb4b4;
}

.online-video-clear-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #718499;
  font-size: 11px;
}

.online-video-clear-row button {
  min-height: 28px;
  padding: 4px 9px;
}

.video-folder-label {
  position: relative;
  z-index: 80;
}

.video-folder-label label {
  margin: 0;
}

.video-folder-rule-help {
  display: inline-flex;
}

.video-folder-rule-trigger {
  min-width: 15px;
  min-height: 15px;
  padding: 0;
  appearance: none;
  font-family: inherit;
  box-shadow: none;
}

.stage-hotspot.label-template-active {
  min-width: 0;
  min-height: 0;
  padding: 0;
  gap: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.label-template-shell {
  position: relative;
  display: block;
  width: var(--label-template-width, 120px);
  height: var(--label-template-height, 48px);
  flex: 0 0 auto;
  overflow: hidden;
  pointer-events: none;
}

.label-template-background,
.label-template-text {
  position: absolute;
  display: block;
  box-sizing: border-box;
  pointer-events: none;
}

.label-template-background {
  object-fit: fill;
  user-select: none;
}

.label-template-text {
  display: flex;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.video-folder-rule-trigger:hover {
  transform: none;
}

.video-folder-rules {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 0;
  z-index: 1000;
  display: grid;
  gap: 8px;
  width: min(320px, calc(100vw - 48px));
  padding: 10px;
  border: 1px solid rgba(98, 183, 255, 0.18);
  border-radius: 8px;
  background: #08141f;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.48);
  color: #8fa4b8;
  font-size: 11px;
  line-height: 1.55;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
  visibility: hidden;
}

.video-folder-rules::before {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 78px;
  width: 8px;
  height: 8px;
  border-right: 1px solid rgba(98, 183, 255, 0.18);
  border-bottom: 1px solid rgba(98, 183, 255, 0.18);
  background: #08141f;
  transform: translateX(-50%) rotate(45deg);
}

.video-folder-rule-help:hover .video-folder-rules,
.video-folder-rule-help:focus-within .video-folder-rules {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  visibility: visible;
}

.video-folder-rules strong {
  color: #d8edf8;
  font-size: 12px;
}

.video-folder-rule-layout {
  display: grid;
  gap: 5px;
}

.video-folder-rules code {
  padding: 1px 5px;
  border: 1px solid rgba(174, 202, 230, 0.12);
  border-radius: 4px;
  background: rgba(174, 202, 230, 0.08);
  color: #d7e8f6;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.video-folder-rule-list {
  display: grid;
  gap: 4px;
  margin: 0;
}

.video-folder-rule-list span {
  position: relative;
  padding-left: 12px;
}

.video-folder-rule-list span::before {
  content: "";
  position: absolute;
  top: 0.75em;
  left: 2px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(98, 183, 255, 0.68);
}

.video-folder-progress {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 10px;
  border: 1px solid rgba(98, 183, 255, 0.2);
  border-radius: 8px;
  background: rgba(6, 18, 28, 0.72);
}

.video-folder-progress[hidden] {
  display: none;
}

.video-folder-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #d8edf8;
  font-size: 12px;
}

.video-folder-progress-head span {
  color: #8fa4b8;
  font-size: 11px;
}

.video-folder-progress-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(174, 202, 230, 0.12);
}

.video-folder-progress-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f8fd3, #4ce0c4);
  transition: width 0.18s ease;
}

.video-folder-file-list {
  display: grid;
  gap: 5px;
  max-height: 190px;
  overflow: auto;
}

.video-folder-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid rgba(98, 183, 255, 0.12);
  border-radius: 6px;
  background: rgba(11, 26, 39, 0.54);
  color: #a9bbcd;
  font-size: 11px;
}

.video-folder-file-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-folder-file-row em {
  color: #7f91a4;
  font-style: normal;
}

.video-folder-file-row strong {
  color: #8fb6d9;
  font-weight: 650;
}

.video-folder-file-row[data-state="done"] strong {
  color: #4ce0c4;
}

.video-folder-file-more {
  margin: 0;
  color: #7f91a4;
  font-size: 11px;
}

.video-mapping-box,
.manual-video-config {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid rgba(58, 219, 191, 0.22);
  border-radius: 8px;
  background: rgba(6, 18, 28, 0.58);
}

.video-mapping-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.video-mapping-head strong,
.advanced-video-json summary span,
.manual-video-config summary span {
  display: block;
  color: #e8f3fc;
  font-size: 13px;
}

.video-mapping-head span,
.advanced-video-json summary small,
.manual-video-config summary small {
  display: block;
  margin-top: 3px;
  color: #7f91a4;
  font-size: 11px;
}

.video-mapping-status {
  padding: 8px 10px;
  border: 1px solid rgba(98, 183, 255, 0.18);
  border-radius: 6px;
  background: rgba(11, 26, 39, 0.72);
  color: #b9d8ef;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.video-stream-guide {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.video-stream-guide span {
  color: #96a9bc;
  font-size: 11px;
  line-height: 1.45;
}

.video-stream-guide strong {
  margin-right: 6px;
  color: #d8edf8;
}

.video-mapping-table-wrap {
  max-height: 280px;
  overflow: auto;
  border: 1px solid rgba(98, 183, 255, 0.16);
  border-radius: 6px;
}

.video-mapping-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}

.video-mapping-table th,
.video-mapping-table td {
  padding: 8px;
  border-bottom: 1px solid rgba(98, 183, 255, 0.12);
  color: #a9bbcd;
  text-align: left;
  vertical-align: top;
}

.video-mapping-table th {
  position: sticky;
  top: 0;
  background: #0b1723;
  color: #d8edf8;
  font-weight: 650;
}

.video-mapping-table th:first-child,
.video-mapping-table td:first-child {
  width: 28px;
}

.video-mapping-table th:nth-child(2),
.video-mapping-table td:nth-child(2) {
  width: 112px;
}

.video-mapping-table td strong,
.video-mapping-table td span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-mapping-table td.ok strong {
  color: #4ce0c4;
}

.video-mapping-table td.missing {
  color: #718499;
}

.video-mapping-more,
.video-mapping-empty {
  margin: 0;
  padding: 10px;
  color: #8ba1b5;
  font-size: 12px;
  line-height: 1.5;
}

.video-mapping-empty.error {
  color: #ffb4b4;
}

.online-video-mapping-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 209, 102, 0.2);
  border-radius: 6px;
  background: rgba(37, 29, 8, 0.34);
  color: #b9a765;
  font-size: 11px;
}

.online-video-mapping-summary.is-ready {
  border-color: rgba(76, 224, 196, 0.22);
  background: rgba(8, 37, 33, 0.34);
  color: #81e3ce;
}

.online-video-mapping-table,
.online-video-mapping-table tbody {
  display: block;
}

.online-video-mapping-table thead {
  display: none;
}

.online-video-mapping-table tr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 8px;
  align-items: center;
  padding: 9px;
  border-bottom: 1px solid rgba(98, 183, 255, 0.12);
}

.online-video-mapping-table td,
.online-video-mapping-table td:first-child,
.online-video-mapping-table td:nth-child(2) {
  width: auto;
  padding: 0;
  border: 0;
}

.online-video-mapping-table td:first-child {
  display: none;
}

.online-video-mapping-table td:nth-child(2) {
  grid-column: 1 / -1;
  grid-row: 1;
}

.online-video-mapping-table td:nth-child(3) {
  grid-column: 1 / -1;
  grid-row: 2;
}

.online-video-mapping-table td:nth-child(4) {
  grid-column: 1;
  grid-row: 3;
  justify-self: start;
}

.online-video-mapping-table td:nth-child(5) {
  grid-column: 2;
  grid-row: 3;
  justify-self: end;
}

.online-video-mapping-table select {
  width: 100%;
  min-width: 0;
}

.online-video-mapping-table td small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #718499;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.online-video-mapping-table .compact {
  min-height: 28px;
  padding: 4px 8px;
  font-size: 11px;
}

.online-video-mapping-status {
  display: inline-flex !important;
  width: fit-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.12);
  color: #e7ca7c;
}

.online-video-mapping-status.is-matched,
.online-video-mapping-status.is-manual {
  background: rgba(76, 224, 196, 0.12);
  color: #81e3ce;
}

.online-video-mapping-status.is-stale {
  background: rgba(255, 113, 113, 0.14);
  color: #ffb4b4;
}

.video-stream-json-panel {
  margin-top: 10px;
}

.advanced-video-json {
  padding: 10px;
  border: 1px solid rgba(255, 209, 102, 0.22);
  border-radius: 8px;
  background: rgba(31, 25, 10, 0.36);
}

.advanced-video-json summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.advanced-video-json[open] summary {
  margin-bottom: 10px;
}

.advanced-video-json-hint {
  margin: 0 0 10px;
  color: #b6a778;
  font-size: 11px;
  line-height: 1.5;
}

.online-video-mapping-hint {
  margin: 10px 0 0;
  padding: 0 10px 2px;
  color: #929b9f;
  line-height: 1.55;
}

.video-stream-json-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.video-stream-json {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(98, 183, 255, 0.16);
  border-radius: 6px;
  background: rgba(8, 20, 31, 0.74);
}

.video-stream-json header {
  display: grid;
  gap: 2px;
}

.video-stream-json header strong {
  color: #e8f3fc;
  font-size: 12px;
}

.video-stream-json header span {
  color: #7f91a4;
  font-size: 11px;
}

.video-stream-json textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  line-height: 1.45;
  overflow-x: hidden;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.video-stream-json-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.manual-video-config {
  display: block;
}

.manual-video-config summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
}

.manual-video-config[open] summary {
  margin-bottom: 10px;
}

.scene-resource-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.scene-resource-picker.has-cover-capture {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.scene-resource-picker.readonly-resource-picker {
  grid-template-columns: minmax(0, 1fr);
}

.scene-resource-picker input[readonly] {
  overflow: hidden;
  color: #a9bbcd;
  text-overflow: ellipsis;
}

.scene-resource-picker button {
  min-width: 92px;
  padding: 0 12px;
}

.scene-resource-picker [data-action="generate-scene-cover"] {
  min-width: 132px;
}

.resource-readonly-hint {
  text-align: left;
}

.resource-health {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid rgba(58, 219, 191, 0.24);
  border-radius: 8px;
  background: rgba(8, 20, 31, 0.72);
}

.resource-health.pending {
  color: #91a6b9;
}

.resource-health.error {
  border-color: rgba(255, 109, 123, 0.36);
}

.resource-health.warning {
  border-color: rgba(255, 209, 102, 0.34);
  background: rgba(31, 25, 10, 0.42);
}

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

.resource-health-head strong {
  color: #ecf7ff;
  font-size: 14px;
}

.resource-health-head span {
  color: #89a0b4;
  font-size: 11px;
}

.resource-health-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.resource-health-tags span {
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(89, 157, 192, 0.24);
  border-radius: 6px;
  background: rgba(18, 36, 50, 0.72);
  color: #a9c4d6;
  font-size: 11px;
  line-height: 14px;
}

.resource-health-tags .resource-health-tag.ok {
  color: #dffdf4;
  border-color: rgba(95, 208, 181, 0.4);
  background: rgba(20, 68, 58, 0.72);
}

.resource-health-tags .resource-health-tag.warn {
  color: #ffe4a3;
  border-color: rgba(255, 209, 102, 0.46);
  background: rgba(72, 55, 16, 0.72);
}

.resource-health-tags .resource-health-tag.error {
  color: #ffd7dc;
  border-color: rgba(255, 109, 123, 0.46);
  background: rgba(75, 22, 32, 0.72);
}

.resource-health-tags .resource-health-tag.pending {
  color: #d8ecfb;
  border-color: rgba(98, 183, 255, 0.36);
  background: rgba(24, 55, 80, 0.72);
}

.resource-check-list {
  display: grid;
  gap: 7px;
}

.resource-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  align-items: start;
  min-height: 28px;
  padding: 6px 8px;
  border: 1px solid rgba(75, 123, 154, 0.2);
  border-radius: 6px;
  background: rgba(12, 26, 39, 0.8);
  font-size: 11px;
  cursor: help;
}

.resource-check > span,
.resource-check > em {
  overflow: hidden;
  text-overflow: ellipsis;
}

.resource-check > span {
  color: #d9e9f5;
  white-space: nowrap;
}

.resource-check strong {
  color: #68e1c6;
  font-size: 11px;
  font-weight: 700;
  justify-self: end;
}

.resource-check em {
  grid-column: 1 / -1;
  color: #87a0b5;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-style: normal;
  min-width: 0;
}

.resource-check em b,
.resource-check em small {
  display: block;
  overflow-wrap: anywhere;
  white-space: normal;
}

.resource-check em b {
  color: #9db6c9;
  font-size: 11px;
  font-weight: 500;
}

.resource-check em small {
  color: #b8cad8;
  font-size: 10px;
  line-height: 13px;
}

.resource-check.error {
  border-color: rgba(255, 109, 123, 0.32);
}

.resource-check.error strong {
  color: #ff8f9b;
}

@media (max-width: 640px) {
  .scene-resource-picker.has-cover-capture {
    grid-template-columns: minmax(0, 1fr);
  }

  .resource-check {
    grid-template-columns: minmax(0, 1fr);
  }
}

.switch-field .switch {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.switch input { position: absolute; opacity: 0; }
.switch span { position: relative; width: 42px; height: 22px; border-radius: 11px; background: #344452; transition: background .18s ease; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #f6fbff; transition: transform .18s ease; }
.switch input:checked + span { background: #1b9f80; }
.switch input:checked + span::after { transform: translateX(20px); }
.switch b { color: var(--text); font-size: 13px; font-weight: 600; }

.basemap-preview {
  width: 100%;
  max-height: 180px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #03070d;
}

/* Base map editor */
.basemap-editor {
  gap: 14px;
}

.basemap-file-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.basemap-path-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 13px;
  cursor: default;
}

.basemap-choose-btn {
  flex: 0 0 auto;
  min-width: 92px;
}

.basemap-upload-hidden {
  display: none;
}

.basemap-picture-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 200px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #050b13;
  overflow: hidden;
}

.basemap-picture-box.is-uploading {
  pointer-events: none;
}

.basemap-picture-box.is-uploading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #21b8ff, #43c59c);
  animation: upload-progress-pulse 1.1s ease-in-out infinite;
}

.basemap-picture-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.basemap-picture-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.basemap-picture-placeholder:hover {
  background: rgba(255, 255, 255, 0.03);
}

.basemap-plus-icon {
  font-size: 32px;
  line-height: 1;
  color: rgba(174, 202, 230, 0.5);
}

.basemap-format-hint {
  font-size: 11px;
  color: rgba(174, 202, 230, 0.4);
}

.basemap-picture-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.basemap-picture-box:hover .basemap-picture-overlay {
  opacity: 1;
}

.basemap-picture-btn {
  min-height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: background 0.15s ease;
}

.basemap-picture-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

.basemap-picture-btn.danger {
  border-color: rgba(255, 109, 109, 0.5);
  background: rgba(168, 55, 55, 0.5);
}

.basemap-picture-btn.danger:hover {
  background: rgba(168, 55, 55, 0.72);
}

.basemap-param-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.resource-status-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 48px;
  margin: 0 0 14px;
  padding: 9px 10px 9px 12px;
  border: 1px solid rgba(58, 219, 191, 0.24);
  border-radius: 8px;
  background: rgba(8, 20, 31, 0.72);
}

.resource-status-summary strong {
  color: #ecf7ff;
  font-size: 13px;
}

.resource-status-summary.pending {
  color: #91a6b9;
}

.resource-status-summary.warning {
  border-color: rgba(255, 209, 102, 0.34);
  background: rgba(31, 25, 10, 0.42);
}

.resource-status-summary.error {
  border-color: rgba(255, 109, 123, 0.36);
}

.resource-status-summary button {
  min-height: 30px;
  padding: 5px 11px;
}

.resource-health-error-message {
  margin: 0;
  color: #ffb8c0;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.resource-status-dialog {
  width: min(720px, calc(100vw - 28px));
  max-height: min(760px, calc(100vh - 36px));
  padding: 0;
  border: 1px solid rgba(98, 183, 255, 0.3);
  border-radius: 12px;
  color: var(--text);
  background: #0c1722;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.56);
}

.resource-status-dialog::backdrop {
  background: rgba(2, 7, 12, 0.76);
  backdrop-filter: blur(7px);
}

.resource-status-dialog-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(760px, calc(100vh - 36px));
}

.resource-status-dialog-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(98, 183, 255, 0.16);
}

.resource-status-dialog-card > header span {
  color: #7f9db3;
  font-size: 11px;
}

.resource-status-dialog-card > header h2 {
  margin: 3px 0 0;
  color: #edf8ff;
  font-size: 18px;
}

.resource-status-dialog-body {
  min-height: 0;
  padding: 18px 20px;
  overflow: auto;
}

.resource-status-dialog-body .resource-health {
  margin-bottom: 0;
}

.resource-status-dialog-card > footer {
  display: flex;
  justify-content: flex-end;
  padding: 12px 20px 16px;
  border-top: 1px solid rgba(98, 183, 255, 0.16);
}

.basemap-param-row-single {
  grid-template-columns: minmax(0, 1fr);
}

.basemap-param {
  margin-bottom: 0;
}

.basemap-param label {
  font-size: 12px;
}

.basemap-number {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.basemap-number::-webkit-inner-spin-button,
.basemap-number::-webkit-outer-spin-button {
  opacity: 1;
}

.basemap-number:focus {
  outline: none;
  border-color: rgba(95, 208, 181, 0.6);
  box-shadow: 0 0 0 2px rgba(95, 208, 181, 0.12);
}

/* Panorama ground/sky mask editor */
.panorama-mask-editor {
  display: grid;
  gap: 14px;
}

.panorama-mask-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(98, 183, 255, 0.2);
  border-radius: 6px;
  background: rgba(98, 183, 255, 0.06);
  color: #8fb6d9;
  font-size: 12px;
  line-height: 1.6;
}

.panorama-mask-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 18, 30, 0.72);
  overflow: hidden;
}

.panorama-mask-card.is-uploading {
  pointer-events: none;
  opacity: 0.72;
}

.panorama-mask-card.is-uploading::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 38%;
  height: 2px;
  background: linear-gradient(90deg, #21b8ff, #43c59c);
  animation: upload-progress-pulse 1.1s ease-in-out infinite;
}

.panorama-mask-card-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.panorama-mask-card-title strong {
  color: #e8f3fc;
  font-size: 14px;
}

.panorama-mask-card-title span {
  color: #718499;
  font-size: 11px;
  text-align: right;
}

.panorama-mask-picture {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 7;
  min-height: 130px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%),
    #050b13;
  background-size: 18px 18px;
  background-position: 0 0, 0 9px;
  overflow: hidden;
}

.panorama-mask-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.panorama-mask-picture img[hidden] {
  display: none;
}

.panorama-mask-preview-status {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.panorama-mask-preview-status[hidden] {
  display: none;
}

.panorama-mask-preview-status[data-state="error"] {
  color: #ff9a9a;
}

.panorama-mask-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.panorama-mask-picture[data-has-image="false"]:hover {
  border-color: rgba(77, 184, 255, 0.7);
}

.panorama-mask-placeholder:hover {
  background: rgba(38, 147, 226, 0.08);
}

.panorama-mask-placeholder:focus-visible {
  outline: 2px solid rgba(77, 184, 255, 0.85);
  outline-offset: -3px;
}

.panorama-mask-placeholder small {
  color: rgba(174, 202, 230, 0.4);
}

.panorama-mask-plus {
  color: rgba(174, 202, 230, 0.5);
  font-size: 32px;
  line-height: 1;
}

.panorama-mask-picture-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.panorama-mask-picture:hover .panorama-mask-picture-overlay,
.panorama-mask-picture:focus-within .panorama-mask-picture-overlay {
  opacity: 1;
}

.panorama-mask-picture-overlay button {
  min-height: 30px;
  padding: 0 14px;
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
}

.panorama-mask-picture-overlay button.danger {
  border-color: rgba(255, 109, 109, 0.5);
  background: rgba(168, 55, 55, 0.5);
}

.panorama-mask-param-row {
  display: grid;
  grid-template-columns: 72px minmax(80px, 1fr) 74px;
  gap: 9px;
  align-items: center;
}

.panorama-mask-param-row > label {
  color: var(--muted);
  font-size: 12px;
}

.panorama-mask-range {
  width: 100%;
  min-width: 0;
  height: 20px;
  padding: 0;
  border: 0;
  background: transparent;
  accent-color: #2aa7ff;
}

.panorama-mask-value {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px;
  gap: 3px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}

.panorama-mask-value input {
  width: 100%;
  padding: 7px 6px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.panorama-mask-value b {
  font-weight: 500;
}

.panorama-mask-follow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  color: var(--text);
  font-size: 12px;
}

.panorama-mask-follow input {
  width: auto;
}

.label-editor {
  display: grid;
  gap: 12px;
  min-height: 0;
  padding-bottom: 10px;
}

.label-management-page {
  flex: 1 1 auto;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  align-content: start;
  overflow: hidden;
  padding-bottom: 0;
}

.panel:has(.label-management-page) {
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
  padding-bottom: 16px;
}

.label-editor-detail {
  flex: 1 1 auto;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding-bottom: 0;
}

.panel:has(.label-editor-detail) {
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
  padding-bottom: 16px;
}

.label-editor-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.label-editor-detail-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.label-editor-detail-head span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-editor-back {
  min-height: 34px;
  padding: 6px 10px;
}

.label-create-panel {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}

.label-create-title,
.label-property-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.label-create-title strong,
.label-property-title {
  min-width: 0;
  color: #f2f7fc;
  font-size: 15px;
}

.label-create-title span,
.label-property-head span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.label-management-section-title {
  color: #dbeaf6;
  font-size: 12px;
  font-weight: 700;
}

.label-capability-note {
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid rgba(98, 183, 255, 0.22);
  border-radius: 6px;
  background: rgba(98, 183, 255, 0.08);
}

.label-capability-note strong {
  color: #dff3ff;
  font-size: 13px;
}

.label-capability-note span,
.label-coordinate-meta,
.label-capability-inline {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.label-capability-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 13px;
  border: 1px dashed rgba(98, 183, 255, 0.3);
  border-radius: 6px;
  color: var(--muted);
  text-align: center;
}

.label-create-grid,
.label-type-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.label-create-button,
.label-type-option {
  display: grid;
  grid-template-rows: 24px auto auto;
  place-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 78px;
  padding: 8px 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(12, 26, 38, 0.86);
  color: var(--text);
  box-shadow: none;
}

.label-create-button:hover,
.label-type-option:hover,
.label-type-option.active {
  border-color: rgba(95, 208, 181, 0.58);
  background: rgba(95, 208, 181, 0.12);
}

.label-create-button i,
.label-type-option i,
.label-item-select > i {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(95, 208, 181, 0.45);
  background: rgba(95, 208, 181, 0.12);
  color: #dffdf5;
  font-style: normal;
  font-weight: 800;
  font-size: 12px;
}

.label-create-button span,
.label-type-option span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.label-create-button small,
.label-type-option small {
  max-width: 100%;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.label-list {
  display: grid;
  gap: 8px;
  min-height: 0;
  max-height: none;
  align-content: start;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1px 5px 8px 1px;
  scroll-padding-bottom: 12px;
}

.label-list-load-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  color: var(--muted);
  font-size: 11px;
}

.label-list-load-state small {
  color: rgba(111, 200, 255, .86);
  font-size: 10px;
}

.label-add-button { width: 100%; }
.label-empty { margin: 0; padding: 18px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 6px; }
.label-separator { height: 1px; background: var(--line); margin: 2px 0; }
.label-property-title { margin: 0; }
.label-item.unsupported {
  opacity: 0.72;
  border-color: rgba(255, 209, 102, 0.32);
}
.label-item.unsupported [data-edit-label] {
  color: #ffd166;
}
.label-property-card {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid rgba(98, 183, 255, .26);
  border-radius: 6px;
  background: rgba(4, 13, 21, .42);
}

.label-property-head > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.label-property-section {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(139, 181, 215, .18);
  border-radius: 6px;
  background: rgba(255, 255, 255, .025);
}
.label-property-section-head {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(139, 181, 215, .14);
}
.label-property-section-head h4 {
  margin: 0;
}
.label-property-section-head h4 {
  color: #e7f2fb;
  font-size: 13px;
  line-height: 1.35;
}
.label-property-section-index {
  display: inline-grid;
  place-items: center;
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(95, 208, 181, .34);
  border-radius: 50%;
  background: rgba(95, 208, 181, .1);
  color: #8ee5d0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}
.label-property-section-body {
  min-width: 0;
}
.label-property-section-body > .field:last-child {
  margin-bottom: 0;
}
.label-basic-grid {
  display: grid;
  grid-template-columns: minmax(92px, .62fr) minmax(0, 1.38fr);
  align-items: end;
  gap: 10px;
  min-width: 0;
}
.label-basic-grid > .field {
  min-width: 0;
  margin-bottom: 0;
}
.label-type-readonly {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(95, 208, 181, .38);
  border-radius: 999px;
  background: rgba(95, 208, 181, .1);
  color: #e7fff9;
  font-size: 13px;
  font-weight: 700;
}
.label-basic-grid .label-type-readonly {
  justify-content: flex-start;
  width: 100%;
  min-height: 41px;
  padding: 7px 9px;
  border-color: var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .06);
}
.label-type-readonly span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.label-type-readonly i {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(95, 208, 181, .45);
  color: #dffdf5;
  font-style: normal;
  font-size: 12px;
}
.label-unsupported-notice {
  padding: 8px 10px;
  border: 1px solid rgba(255, 209, 102, 0.34);
  border-radius: 6px;
  background: rgba(255, 209, 102, 0.1);
  color: #ffe3a3;
  font-size: 12px;
  line-height: 1.45;
}
.compact-danger {
  min-width: 64px;
  min-height: 32px;
  padding: 0 12px;
}
.coordinate-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(66px, auto); gap: 8px; }
.coordinate-row .icon-command { min-width: 66px; padding: 0 12px; }
.coordinate-row-flat-map { align-items: end; }
.coordinate-row-flat-map .coordinate-axis-field { display: grid; gap: 4px; min-width: 0; }
.coordinate-row-flat-map .coordinate-axis-field span { color: #a9c7d8; font-size: 11px; line-height: 1; }
.coordinate-row-flat-map .coordinate-axis-field input { min-width: 0; padding-inline: 7px; }
.style-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.poi-style-grid { grid-template-columns: repeat(3, 1fr); }
.style-option { position: relative; display: grid; place-items: center; min-height: 50px; border: 1px solid var(--line); border-radius: 5px; background: #101c28; cursor: pointer; }
.poi-style-option { min-height: 74px; background: radial-gradient(circle at 50% 65%, rgba(35, 155, 220, .18), rgba(7, 18, 28, .96)); }
.style-option.active, .style-option:has(input:checked) { border-color: var(--accent); background: rgba(95, 208, 181, .12); }
.style-option input { position: absolute; opacity: 0; pointer-events: none; }
.style-option span { position: absolute; right: 4px; bottom: 2px; color: var(--muted); font-size: 10px; }
.label-style-section { display: grid; gap: 7px; }
.label-style-section + .label-style-section { margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(139, 181, 215, .14); }
.label-style-section-title { color: #d9e9f5; font-size: 12px; font-weight: 600; }
.label-style-toolbar { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; }
.label-style-toolbar select { min-width: 0; padding: 7px 28px 7px 8px; font-size: 12px; }
.imported-poi-style-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); max-height: 330px; padding: 2px; overflow-y: auto; overscroll-behavior: contain; }
.imported-poi-style-option { min-height: 84px; padding: 5px; overflow: hidden; background: #09141f; }
.imported-poi-style-option img { display: block; width: 100%; height: 58px; object-fit: contain; }
.imported-poi-style-option span { position: static; width: 100%; overflow: hidden; color: #b9cfdf; font-size: 10px; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.simulation-style-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.simulation-model-library-summary { color: var(--muted); font-size: 11px; line-height: 1.4; }
.simulation-transform-editor { padding-top: 10px; border-top: 1px solid rgba(139, 181, 215, .14); }
.simulation-rotation-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.simulation-rotation-grid label { display: grid; gap: 5px; min-width: 0; }
.simulation-rotation-grid label span { color: var(--muted); font-size: 11px; }
.simulation-rotation-grid input { min-width: 0; }
.simulation-style-option { position: relative; display: grid; min-width: 0; gap: 3px; place-items: center; padding: 5px 3px; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #09141f; cursor: pointer; }
.simulation-style-option:has(input:checked) { border-color: var(--accent); background: rgba(95, 208, 181, .12); }
.simulation-style-option input { position: absolute; opacity: 0; pointer-events: none; }
.simulation-style-option img { display: block; width: 42px; height: 42px; object-fit: contain; }
.simulation-style-option span { max-width: 100%; overflow: hidden; color: #c5d9e7; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.label-style-image-placeholder { display: grid; width: 100%; height: 58px; place-items: center; color: var(--muted); font-size: 11px; font-style: normal; }
.label-style-load-state,
.label-style-static-note { padding: 9px; border: 1px dashed rgba(139, 181, 215, .25); border-radius: 5px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.label-style-load-state.error { border-color: rgba(255, 121, 121, .35); color: #ff9d9d; }
.label-font-editor { margin-top: 2px; padding: 9px; border: 1px solid rgba(95, 208, 181, .2); border-radius: 6px; background: rgba(15, 36, 48, .62); }
.label-font-editor-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.label-font-editor-title .text-button { min-height: 0; padding: 2px 0; border: 0; background: transparent; color: #75d9c1; font-size: 11px; }
.label-font-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(72px, .6fr); gap: 8px; }
.label-font-grid label { display: grid; gap: 4px; color: var(--muted); font-size: 10px; }
.label-font-grid input,
.label-font-grid select { min-width: 0; padding: 7px; }
.label-font-grid input[type="color"] { width: 100%; min-height: 34px; padding: 3px; }
.label-vector-color-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 8px; align-items: center; }
.label-vector-color-row input { min-width: 0; }
.label-vector-color-row input[type="color"] { width: 58px; min-height: 36px; padding: 3px; cursor: pointer; }
.label-icon-editor { margin-top: 2px; padding: 9px; border: 1px solid rgba(89, 188, 235, .22); border-radius: 6px; background: rgba(10, 29, 43, .72); }
.label-icon-editor-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.label-icon-editor-title > span,
.label-icon-slot-name { color: var(--muted); font-size: 10px; }
.label-icon-slot-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; color: var(--muted); font-size: 10px; }
.label-icon-slot-row select,
.label-icon-scale-row input,
#label-icon-search { min-width: 0; padding: 7px; }
.label-icon-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); max-height: 288px; padding: 2px; overflow-y: auto; overscroll-behavior: contain; }
.label-icon-option { min-height: 66px; padding: 4px; overflow: hidden; background: #09141f; }
.label-icon-option[hidden] { display: none; }
.label-icon-option img,
.label-icon-default { display: grid; width: 100%; height: 40px; place-items: center; object-fit: contain; }
.label-icon-default { border: 1px dashed rgba(139, 181, 215, .3); border-radius: 4px; color: #9db8ca; font-size: 10px; font-style: normal; }
.label-icon-option span { position: static; width: 100%; overflow: hidden; color: #b9cfdf; font-size: 9px; line-height: 1.2; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.poi-style { position: relative; width: 28px; height: 28px; display: inline-grid; place-items: center; border: 2px solid #5fd0b5; border-radius: 50%; box-shadow: 0 0 12px rgba(48, 179, 255, .45), inset 0 0 12px rgba(110, 221, 255, .22); }
.poi-style em { width: 8px; height: 8px; border-radius: 2px; background: #eaffff; box-shadow: 0 0 8px rgba(255,255,255,.8); }
.style-2, .style-6 { border-radius: 3px; border-color: #62b7ff; }
.style-3, .style-7 { border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); border-color: #ffd166; }
.style-4, .style-8 { width: 24px; border-radius: 12px; border-color: #ff7979; }
.style-5, .style-9 { border-style: dashed; border-color: #b58cff; }
.style-10 { border-color: #fff; background: rgba(255,255,255,.12); }
.poi-01 { width: 0; height: 0; border-left: 13px solid transparent; border-right: 13px solid transparent; border-top: 36px solid #1aa3ff; border-bottom: 0; border-radius: 0; background: transparent; transform: translateY(4px); }
.poi-01 em { position: absolute; top: -30px; left: -4px; }
.poi-02 { border-color: #8ec7ff; background: radial-gradient(circle, #2564bb, #122d6a); }
.poi-03 { clip-path: polygon(25% 3%,75% 3%,100% 50%,75% 97%,25% 97%,0 50%); border-radius: 0; background: linear-gradient(180deg,#2097e6,#0e3e79); }
.poi-04 { border-radius: 50% 50% 50% 8px; transform: rotate(-45deg); background: linear-gradient(135deg,#1ec6ff,#0d3b7d); }
.poi-04 em { transform: rotate(45deg); }
.poi-05 { width: 34px; height: 38px; border-radius: 50% / 15%; background: linear-gradient(180deg,#12315f,#0b1b35); }
.poi-05::after { content:""; position:absolute; left:3px; right:3px; bottom:-5px; height:8px; border:1px solid #43d7ff; border-radius:50%; background:rgba(33,151,230,.35); }
.poi-06 { clip-path: polygon(50% 0,100% 50%,50% 100%,0 50%); border-radius:0; background:linear-gradient(180deg,#20b8ff,#0b458f); }
.poi-07 { width:46px; height:22px; border-radius:3px; background:linear-gradient(180deg,#153765,#07182e); }
.poi-07::after { content:""; position:absolute; left:50%; bottom:-8px; width:0; height:0; transform:translateX(-50%); border-left:7px solid transparent; border-right:7px solid transparent; border-top:8px solid #1d8fe3; }
.poi-08 { clip-path: polygon(50% 0,94% 24%,82% 100%,18% 100%,6% 24%); border-radius:0; background:linear-gradient(180deg,#2bb7ff,#0b3f82); }
.poi-09 { width:54px; height:20px; border-radius:12px 2px 12px 2px; background:linear-gradient(90deg,#0e5868,#0d8c7a); }
.poi-10 { background:radial-gradient(circle,#1b7cff,#063376); border-color:#b8e1ff; }
.poi-11 { border-style:double; border-color:#7df8d5; background:radial-gradient(circle,#153c58,#071725); }
.poi-12 { width:46px; height:20px; border-radius:2px; border-color:#ffad42; background:linear-gradient(180deg,#b56a14,#6b3304); }
.poi-13 { width:42px; height:22px; border-radius:4px; background:linear-gradient(180deg,#0a5ea3,#08274d); }
.poi-14 { width:46px; height:22px; border-radius:2px; border-color:#4ebeff; background:rgba(10,45,82,.72); }
.poi-marker { border-radius: inherit; }
.shape-toolbar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.shape-toolbar button { min-width: 0; min-height: 38px; padding: 0 10px; font-size: 12px; }
.shape-toolbar [data-action="start-label-drawing"] { grid-column: 1 / -1; }
.shape-toolbar .primary-step,
.shape-toolbar .active-step,
.shape-toolbar .is-active,
.shape-toolbar .is-drawing,
.shape-toolbar button.is-active,
.shape-toolbar button.is-drawing,
button[data-action="pick-label-position"].is-active,
button[data-action="pick-label-position"].is-picking {
  border-color: rgba(95, 208, 181, .7);
  background: linear-gradient(180deg, #278cc9, #146598);
  color: #fff;
  box-shadow: 0 0 0 2px rgba(95, 208, 181, .14), 0 10px 22px rgba(0, 0, 0, .28);
}
.shape-toolbar .is-picking,
.shape-toolbar button.is-picking,
button[data-action="pick-label-position"].is-picking {
  border-color: rgba(255, 209, 102, .72);
  background: linear-gradient(180deg, rgba(178, 127, 36, .96), rgba(116, 75, 18, .96));
}
.point-list { display: grid; gap: 6px; max-height: 160px; overflow-y: auto; overscroll-behavior: contain; padding: 7px 9px 9px 7px; border: 1px solid var(--line); border-radius: 6px; background: #09131d; }
.point-list p { margin: 8px; color: var(--muted); text-align: center; font-size: 12px; }
.point-row { display: grid; grid-template-columns: 24px 1fr 1fr; gap: 6px; align-items: center; }
.point-row.point-row-flat-map { grid-template-columns: 24px repeat(2, minmax(0, 1fr)); }
.point-row span { color: var(--muted); font-size: 11px; text-align: center; }
.point-row input { min-width: 0; padding: 7px; }
.popup-editor { padding-top: 2px; }
.popup-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.popup-config-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.popup-config-grid input,
.popup-config-grid select {
  min-width: 0;
  width: 100%;
  padding: 8px 10px;
  font-size: 12px;
}

.popup-config-grid select {
  padding-right: 38px;
}

.popup-config-grid label.hidden {
  display: none;
}

.label-catalog-picker {
  position: relative;
  width: 100%;
  min-width: 0;
}

.popup-config-grid .label-catalog-native,
.label-action-field .label-catalog-native,
.online-video-mapping-table .label-catalog-native {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  appearance: none;
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.label-catalog-trigger {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(98, 183, 255, .3);
  border-radius: 6px;
  background: #0e1e2c;
  color: #eaf5fc;
  text-align: left;
}

.label-catalog-trigger:hover:not(:disabled),
.label-catalog-trigger[aria-expanded="true"] {
  border-color: rgba(95, 208, 181, .72);
  box-shadow: 0 0 0 2px rgba(95, 208, 181, .1);
}

.label-catalog-trigger:disabled {
  color: #718499;
  cursor: not-allowed;
  opacity: .72;
}

.label-catalog-trigger > span,
.label-catalog-option > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-catalog-trigger > i {
  width: 0;
  height: 0;
  border-right: 5px solid transparent;
  border-left: 5px solid transparent;
  border-top: 6px solid #8ee5d0;
  transition: transform .16s ease;
}

.label-catalog-trigger[aria-expanded="true"] > i {
  transform: rotate(180deg);
}

.label-catalog-menu {
  position: fixed;
  z-index: 240;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  max-height: 280px;
  padding: 5px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(95, 208, 181, .46);
  border-radius: 7px;
  background: #091a27;
  box-shadow: 0 16px 42px rgba(0, 0, 0, .48);
}

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

.label-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  min-width: 0;
}

.label-list-toolbar strong {
  margin-right: auto;
  color: #f2f7fc;
  font-size: 14px;
}

.label-list-toolbar label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.label-board-display-mode-static,
.label-board-display-mode-trigger {
  display: flex;
  width: 100%;
  min-height: 41px;
  align-items: center;
  box-sizing: border-box;
  padding: 9px 11px;
  border: 1px solid rgba(98, 183, 255, .24);
  border-radius: 6px;
  color: #f2f7fc;
  background: #122233;
  font: inherit;
  text-align: left;
}

.label-board-display-mode-select {
  position: relative;
}

.label-board-display-mode-trigger {
  justify-content: space-between;
  cursor: pointer;
}

.label-board-display-mode-trigger:hover,
.label-board-display-mode-select[data-open] .label-board-display-mode-trigger {
  border-color: rgba(95, 208, 181, .64);
  background: #182a3d;
}

.label-board-display-mode-trigger i {
  width: 8px;
  height: 8px;
  border-right: 2px solid #75d9c1;
  border-bottom: 2px solid #75d9c1;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 140ms ease;
}

.label-board-display-mode-select[data-open] .label-board-display-mode-trigger i {
  transform: rotate(225deg) translate(-2px, -2px);
}

.label-board-display-mode-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  right: 0;
  left: 0;
  padding: 4px;
  border: 1px solid rgba(95, 208, 181, .42);
  border-radius: 6px;
  background: #10202d;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .34);
}

.label-board-display-mode-menu[hidden] {
  display: none;
}

.label-board-display-mode-menu button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  color: #e8f3fa;
  background: transparent;
  font: inherit;
  text-align: left;
}

.label-board-display-mode-menu button:hover,
.label-board-display-mode-menu button[aria-selected="true"] {
  color: #ffffff;
  background: rgba(95, 208, 181, .16);
}

.label-list-toolbar select {
  width: auto;
  min-width: 92px;
  min-height: 32px;
  padding: 4px 28px 4px 9px;
}

.label-list-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.label-list-search input {
  min-width: 0;
  min-height: 34px;
  padding: 7px 10px;
}

.label-list-error {
  color: #ff9f9f;
}

.label-catalog-search {
  position: sticky;
  top: -5px;
  z-index: 1;
  margin: -5px -5px 3px;
  padding: 7px;
  background: #091a27;
}

.label-catalog-search input {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  padding: 7px 9px;
  border-color: rgba(95, 208, 181, .46);
  background: #0d2231;
  color: #eaf5fc;
}

.label-catalog-search input::placeholder {
  color: #71899b;
}

.label-catalog-search input:focus {
  border-color: rgba(95, 208, 181, .82);
  box-shadow: 0 0 0 2px rgba(95, 208, 181, .12);
  outline: none;
}

.label-catalog-option {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  overflow: hidden;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #e3f2fc;
  text-align: left;
}

.label-catalog-option:hover,
.label-catalog-option:focus-visible {
  background: rgba(66, 143, 184, .22);
  outline: none;
}

.label-catalog-option[aria-selected="true"] {
  background: rgba(48, 134, 174, .34);
  color: #9df0dd;
}

.label-catalog-option[hidden],
.label-catalog-empty[hidden] {
  display: none;
}

.label-catalog-empty {
  padding: 16px 10px;
  color: #71899b;
  font-size: 12px;
  text-align: center;
}

/* 统一配置面板和弹窗中的原生下拉控件样式。 */
select {
  border-color: rgba(98, 183, 255, .3);
  background-color: #0e1e2c;
  background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Crect x='1' y='1' width='22' height='22' rx='6' fill='%23162b3b' stroke='%235fd0b5' stroke-opacity='.5'/%3E%3Cpath d='M8 10L12 14L16 10' stroke='%238ee5d0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 7px center;
  background-size: 24px 24px;
  color: #eaf5fc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035), 0 1px 2px rgba(0, 0, 0, .2);
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
}

select:hover:not(:disabled) {
  border-color: rgba(95, 208, 181, .56);
  background-color: #12283a;
}

select:focus,
select:open {
  border-color: rgba(95, 208, 181, .78);
  background-color: #102536;
  box-shadow: 0 0 0 2px rgba(95, 208, 181, .14), inset 0 1px 0 rgba(255, 255, 255, .04);
}

select:disabled {
  background-color: #101923;
  color: #718499;
  cursor: not-allowed;
}

select option {
  background-color: #0b1824;
  color: #dceaf4;
}

select option:checked {
  background-color: #18505a;
  color: #f3fffc;
}

@supports (appearance: base-select) {
  select,
  select::picker(select) {
    appearance: base-select;
  }

  select:not([multiple]) {
    background-image: none;
    padding-inline-end: 9px;
  }

  select::picker-icon {
    flex: 0 0 auto;
    margin-inline-start: auto;
    margin-inline-end: 1px;
    color: #8ee5d0;
    transition: transform .18s ease;
  }

  select:open::picker-icon {
    transform: rotate(180deg);
  }

  select::picker(select) {
    max-height: 280px;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin-block: 5px;
    padding: 5px;
    border: 1px solid rgba(95, 208, 181, .42);
    border-radius: 8px;
    background: #091722;
    color: #dceaf4;
    box-shadow: 0 14px 32px rgba(0, 0, 0, .48), 0 0 0 1px rgba(98, 183, 255, .08);
  }

  select option {
    min-height: 34px;
    padding: 8px 10px;
    border-radius: 6px;
    background: transparent;
    color: #c8d9e6;
  }

  select option + option {
    margin-top: 2px;
  }

  select option:hover,
  select option:focus-visible {
    background: #163247;
    color: #ffffff;
  }

  select option:checked {
    background: linear-gradient(90deg, rgba(95, 208, 181, .26), rgba(98, 183, 255, .16));
    color: #f3fffc;
  }

  select option::checkmark {
    order: 1;
    margin-left: auto;
    color: #8ee5d0;
  }

}

html.scene-modal-open,
html.scene-modal-open body {
  overflow: hidden;
  overscroll-behavior: none;
}

.resource-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.resource-picker button { min-width: 92px; padding: 0 12px; }

.resource-picker.is-uploading {
  position: relative;
  overflow: hidden;
}

.resource-picker.is-uploading::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 35%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #21b8ff, #43c59c);
  animation: upload-progress-pulse 1.1s ease-in-out infinite;
}

.scene-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(1, 7, 13, .78);
  backdrop-filter: blur(5px);
}

.scene-modal {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(98, 183, 255, .36);
  border-radius: 8px;
  padding: 18px 20px 22px 18px;
  background: #0c1722;
  box-shadow: 0 28px 80px rgba(0,0,0,.56);
  scroll-padding-bottom: 18px;
}

.scene-modal-backdrop.is-uploading .scene-modal {
  border-color: rgba(67, 197, 156, 0.48);
}

.scene-modal > header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.scene-modal h2 { margin: 0; font-size: 19px; }

.logout-confirm-dialog {
  width: min(430px, calc(100vw - 28px));
  padding: 0;
  border: 1px solid rgba(255, 127, 135, 0.3);
  border-radius: 14px;
  color: var(--text);
  background: #0c1722;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.56);
}

.logout-confirm-dialog::backdrop {
  background: rgba(2, 7, 12, 0.76);
  backdrop-filter: blur(7px);
}

.logout-confirm-card {
  display: grid;
  justify-items: center;
  padding: 30px 28px 26px;
  text-align: center;
}

.logout-confirm-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 127, 135, 0.25);
  border-radius: 14px;
  color: #ff7f87;
  background: rgba(193, 50, 63, 0.1);
}

.logout-confirm-icon svg {
  width: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

.logout-confirm-card h2 {
  margin: 16px 0 0;
  font-size: 20px;
}

.logout-confirm-card p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.logout-confirm-actions {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 24px;
}

.label-item {
  position: relative;
  display: block;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.03));
}

.label-item-select {
  width: 100%;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 54px;
  text-align: left;
  border: 0;
  border-radius: 5px;
  padding: 9px 108px 9px 8px;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.label-item.active {
  border-color: rgba(95, 208, 181, 0.58);
  background: rgba(95, 208, 181, 0.12);
}

.label-item.is-hidden {
  opacity: .72;
}

.label-item-actions {
  position: absolute;
  z-index: 2;
  top: 50%;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 4px;
  transform: translateY(-50%);
}

.label-item-actions button {
  width: 28px;
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
}

.label-item-actions svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.label-item-actions button:hover:not(:disabled) {
  background: rgba(98, 183, 255, .12);
  color: #dff3ff;
}

.label-item-actions [data-toggle-label-visible][data-label-visible="true"] {
  color: #6ce7c7;
  background: rgba(38, 177, 143, .12);
}

.label-item-actions [data-toggle-label-visible][data-label-visible="false"] {
  color: #71889b;
}

.label-item-actions .danger-text {
  color: #ff9a9a;
}

.label-item-main {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding-right: 2px;
  align-content: center;
}

.label-item strong,
.label-item small {
  display: block;
  overflow: hidden;
  min-height: 16px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.label-item small {
  color: var(--muted);
  font-size: 12px;
}

.upload-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.new-scene-file-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 50px;
  padding: 5px;
  border: 1px solid rgba(98, 183, 255, 0.24);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.045);
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.new-scene-file-picker:hover {
  border-color: rgba(98, 183, 255, 0.48);
  background: rgba(98, 183, 255, 0.055);
}

.new-scene-file-picker:focus-within {
  border-color: rgba(95, 208, 181, 0.64);
  box-shadow: 0 0 0 2px rgba(95, 208, 181, 0.12);
}

.new-scene-file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 118px;
  min-height: 38px;
  padding: 0 14px;
  border-color: rgba(98, 183, 255, 0.42);
  background: linear-gradient(180deg, rgba(37, 105, 156, 0.84), rgba(25, 75, 115, 0.88));
  color: #f3f9ff;
}

.new-scene-file-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.new-scene-file-name {
  min-width: 0;
  overflow: hidden;
  padding-right: 8px;
  color: #d9e8f5;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.new-scene-file-name.is-empty {
  color: #8295a8;
}

.upload-box.is-uploading .new-scene-file-picker {
  opacity: 0.72;
}

.upload-box.is-uploading input,
.upload-box.is-uploading select,
.upload-box.is-uploading textarea {
  opacity: 0.72;
}

.new-scene-upload-progress {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(67, 197, 156, 0.28);
  border-radius: 6px;
  background: rgba(67, 197, 156, 0.07);
}

.new-scene-upload-progress[hidden] {
  display: none;
}

.new-scene-upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #ddfff5;
  font-size: 13px;
}

.new-scene-upload-progress-head strong {
  flex: 0 0 auto;
  color: #8af0d1;
  font-size: 12px;
  font-weight: 700;
}

.new-scene-upload-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.new-scene-upload-progress-track i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #21b8ff, #43c59c);
  transition: width 160ms ease;
}

.new-scene-upload-progress.is-indeterminate .new-scene-upload-progress-track i {
  animation: upload-progress-pulse 1.1s ease-in-out infinite;
}

.new-scene-upload-progress-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.notice {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.error {
  color: var(--danger);
}

@media (max-width: 860px) {
  .topbar,
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .content {
    padding: 14px;
  }

  .stage-layout {
    height: calc(100vh - 96px);
    grid-template-columns: 1fr;
  }

  .panel {
    display: none;
  }
}

@media (min-width: 861px) and (max-width: 1199px) {
  .stage-layout.scene-config-layout {
    --scene-panel-width: 380px;
  }
}

@media (max-width: 1180px) {
  .scene-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .scene-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}
/* Operation feedback stays outside rerendered application content. */
.global-loading {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 1220;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(98, 183, 255, 0.35);
  border-radius: 8px;
  background: rgba(9, 20, 31, 0.94);
  color: #eef8ff;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px);
  transition: opacity 160ms ease, transform 160ms ease;
}

.global-loading.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-top-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.toast-stack {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 1230;
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: calc(100vw - 40px);
  pointer-events: none;
  transform: translateX(-50%);
}

@keyframes upload-progress-pulse {
  0% {
    margin-left: -35%;
  }
  50% {
    margin-left: 45%;
  }
  100% {
    margin-left: 100%;
  }
}

.toast {
  width: max-content;
  max-width: min(360px, calc(100vw - 40px));
  transform: translateY(-8px);
  opacity: 0;
  padding: 9px 14px;
  border: 1px solid rgba(67, 197, 156, 0.42);
  border-radius: 6px;
  background: rgba(7, 29, 27, 0.92);
  color: #e9fff7;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  line-height: 1.4;
  overflow-wrap: anywhere;
  transition: opacity 180ms ease, transform 180ms ease;
  white-space: normal;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.error {
  width: max-content;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 16px;
  border-color: rgba(255, 116, 116, 0.46);
  border-radius: 8px;
  background: rgba(58, 18, 22, 0.94);
  color: #ffecec;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  line-height: 1.45;
  white-space: pre-line;
}

/* 标签动作：ARC 对齐后的弹窗、在线设备和多格式视频。 */
.stage-popup.is-maximized {
  left: 16px;
  top: 16px;
  width: calc(100% - 32px);
  height: calc(100% - 32px);
  max-height: calc(100% - 32px);
  grid-template-rows: auto minmax(0, 1fr);
  transform: none;
}

.stage-popup-actions {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 7px;
}

.stage-popup-actions .stage-popup-close {
  position: relative;
  inset: auto;
}

.stage-popup-maximize {
  position: relative;
  display: grid;
  place-items: center;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid rgba(174, 202, 230, 0.26);
  border-radius: 50%;
  background: rgba(9, 24, 38, 0.8);
  box-shadow: none;
  color: rgba(238, 248, 255, 0.86);
}

.stage-popup-maximize::before {
  content: "";
  width: 11px;
  height: 9px;
  border: 1.5px solid currentColor;
  border-radius: 1px;
}

.stage-popup.is-maximized .stage-popup-maximize::before {
  width: 9px;
  height: 7px;
  box-shadow: -3px 3px 0 -1px #091826, -3px 3px 0 0 currentColor;
}

.stage-popup-maximize:hover {
  border-color: rgba(98, 183, 255, 0.52);
  background: rgba(27, 76, 113, 0.86);
  color: #ffffff;
}

.stage-popup canvas {
  display: block;
  width: 100%;
  max-height: min(340px, calc(var(--popup-max-height, 520px) - 96px), calc(100vh - 170px));
  border-radius: 5px;
  background: #020609;
}

.stage-popup.is-maximized .stage-popup-media-host,
.stage-popup.is-maximized .label-link-frame-shell,
.stage-popup.is-maximized .stage-popup-link-frame {
  height: 100%;
  max-height: none;
}

.stage-popup.is-maximized .stage-popup-content {
  height: auto;
  max-height: none;
  overflow: auto;
}

.stage-popup.is-maximized img,
.stage-popup.is-maximized video,
.stage-popup.is-maximized canvas {
  height: 100%;
  max-height: none;
}

.stage-popup-media-host {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: auto;
  max-height: min(420px, calc(var(--popup-max-height, 520px) - 96px), calc(100vh - 170px));
  aspect-ratio: var(--popup-media-aspect, 16 / 9);
  overflow: hidden;
  border-radius: 5px;
  background: #020609;
}

.stage-popup-media-host video,
.stage-popup-media-host canvas {
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: contain;
}

.stage-popup-media-status {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #a9c1d2;
  text-align: center;
  background: rgba(2, 6, 9, 0.86);
}

.stage-popup-media-status[hidden] {
  display: none;
}

.stage-popup-media-status[data-tone="buffering"] {
  inset: auto 10px 10px auto;
  display: block;
  padding: 6px 10px;
  border: 1px solid rgba(169, 193, 210, 0.22);
  border-radius: 999px;
  background: rgba(2, 6, 9, 0.76);
  font-size: 12px;
  pointer-events: none;
}

.stage-popup-media-status[data-tone="error"] {
  color: #ffb2ad;
}

.stage-popup-ptz {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  user-select: none;
}

.stage-popup-ptz-surface {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}

.stage-popup-ptz.is-surface-active .stage-popup-ptz-surface {
  cursor: grabbing;
}

.stage-popup-ptz.has-pointer-direction .stage-popup-ptz-surface {
  cursor: none;
}

.stage-popup-ptz-direction {
  position: absolute;
  z-index: 2;
  display: grid;
  width: 38px;
  height: 38px;
  min-width: 0;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(222, 240, 252, 0.36);
  border-radius: 50%;
  background: rgba(5, 20, 31, 0.42);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  color: #f4fbff;
  opacity: 0.22;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: opacity 140ms ease, background 140ms ease, border-color 140ms ease, transform 140ms ease;
  backdrop-filter: blur(3px);
}

.stage-popup-media-host:hover .stage-popup-ptz-direction:not(:disabled),
.stage-popup-ptz-direction:focus-visible:not(:disabled) {
  opacity: 0.68;
}

.stage-popup-media-host:hover .stage-popup-ptz-direction:hover:not(:disabled),
.stage-popup-media-host:hover .stage-popup-ptz-direction:active:not(:disabled) {
  border-color: rgba(210, 240, 255, 0.82);
  background: rgba(12, 48, 70, 0.78);
  opacity: 0.96;
}

.stage-popup-ptz-direction:disabled {
  cursor: default;
  opacity: 0.12;
}

.stage-popup-ptz.is-surface-active .stage-popup-ptz-direction {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.stage-popup-ptz-direction svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stage-popup-ptz-direction.is-up {
  top: 12px;
  left: 50%;
  transform: translate(-50%, 0);
}

.stage-popup-ptz-direction.is-up:hover:not(:disabled),
.stage-popup-ptz-direction.is-up:active:not(:disabled) {
  transform: translate(-50%, 0) scale(1.08);
}

.stage-popup-ptz-direction.is-right {
  top: 50%;
  right: 12px;
  transform: translate(0, -50%);
}

.stage-popup-ptz-direction.is-right:hover:not(:disabled),
.stage-popup-ptz-direction.is-right:active:not(:disabled) {
  transform: translate(0, -50%) scale(1.08);
}

.stage-popup-ptz-direction.is-down {
  bottom: 12px;
  left: 50%;
  transform: translate(-50%, 0);
}

.stage-popup-ptz-direction.is-down:hover:not(:disabled),
.stage-popup-ptz-direction.is-down:active:not(:disabled) {
  transform: translate(-50%, 0) scale(1.08);
}

.stage-popup-ptz-direction.is-left {
  top: 50%;
  left: 12px;
  transform: translate(0, -50%);
}

.stage-popup-ptz-direction.is-left:hover:not(:disabled),
.stage-popup-ptz-direction.is-left:active:not(:disabled) {
  transform: translate(0, -50%) scale(1.08);
}

.stage-popup-ptz-pointer-arrow {
  position: absolute;
  z-index: 4;
  top: var(--ptz-pointer-y, 50%);
  left: var(--ptz-pointer-x, 50%);
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #f4fbff;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.9));
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(var(--ptz-pointer-angle, 0deg));
}

.stage-popup-ptz-pointer-arrow[hidden] {
  display: none;
}

.stage-popup-ptz-pointer-arrow svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stage-popup-ptz-zoom {
  position: absolute;
  z-index: 5;
  right: 10px;
  bottom: 10px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 32px;
  overflow: hidden;
  border: 1px solid rgba(222, 240, 252, 0.38);
  border-radius: 9px;
  background: rgba(5, 20, 31, 0.58);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
  backdrop-filter: blur(4px);
}

.stage-popup-ptz-zoom-button {
  display: grid;
  width: 32px;
  height: 30px;
  min-width: 0;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #f4fbff;
  font: 500 22px/1 Arial, sans-serif;
}

.stage-popup-ptz-zoom-button + .stage-popup-ptz-zoom-button {
  border-left: 1px solid rgba(222, 240, 252, 0.24);
}

.stage-popup-ptz-zoom-button:hover:not(:disabled),
.stage-popup-ptz-zoom-button:focus-visible:not(:disabled),
.stage-popup-ptz-zoom-button:active:not(:disabled) {
  background: rgba(20, 74, 104, 0.82);
  transform: none;
}

.stage-popup-ptz-zoom-button:disabled {
  color: rgba(244, 251, 255, 0.34);
  cursor: default;
}

.stage-popup-ptz-feedback {
  position: absolute;
  z-index: 6;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 72px);
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(91, 24, 27, 0.88);
  color: #ffe0dd;
  font-size: 10px;
  line-height: 1.2;
  pointer-events: none;
  backdrop-filter: blur(3px);
}

.stage-popup-ptz-feedback[hidden] {
  display: none;
}

@media (hover: none) {
  .stage-popup-ptz-direction:not(:disabled) {
    opacity: 0.62;
  }
}

.label-action-editor,
.label-action-detail {
  display: grid;
  gap: 9px;
}

.label-action-detail {
  margin-top: 2px;
  padding: 10px;
  border: 1px solid rgba(98, 183, 255, .18);
  border-radius: 6px;
  background: rgba(6, 18, 28, .56);
}

.label-action-field {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 11px;
}

.label-action-field select,
.label-action-field input {
  min-width: 0;
  width: 100%;
}

.label-online-service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
}

.label-online-service-row button {
  padding: 7px 10px;
  white-space: nowrap;
}

.label-action-empty,
.label-action-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.label-action-capture,
.label-action-catalog-status {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.label-action-catalog-status.is-error {
  color: #ffb2ad;
}

.label-action-catalog-status.is-connected {
  color: #8fe3c1;
}

.label-action-capture button,
.label-action-catalog-status button {
  flex: none;
  margin-left: auto;
  padding: 7px 10px;
  font-size: 11px;
}

.online-device-editor,
.label-video-source-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.label-video-source-grid.is-upload {
  grid-template-columns: minmax(0, 1fr);
}

.label-action-catalog-status,
.label-video-source-control {
  grid-column: 1 / -1;
}

.popup-config-grid .popup-maximize-field {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.popup-config-grid .popup-maximize-field input {
  width: 18px;
  height: 18px;
  padding: 0;
}
