:root {
  --bg: #101216;
  --panel: #181b22;
  --panel-2: #202530;
  --text: #f3f5f7;
  --muted: #a8b0bd;
  --line: #303744;
  --accent: #d99a2b;
  --accent-dark: #a86f13;
  --danger: #d9534f;
  --success: #42b883;
  --input: #0e1117;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top left, #242936 0, var(--bg) 42%);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.topbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--line);
  background: rgba(16, 18, 22, .88);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand-area {
  justify-self: start;
  display: flex;
  align-items: baseline;
  gap: .85rem;
  min-width: 0;
}
.brand {
  color: var(--text);
  font-weight: 800;
  letter-spacing: .04em;
  white-space: nowrap;
}
.signed-in-user {
  color: var(--muted);
  font-size: .92rem;
  white-space: nowrap;
}
.signed-in-user strong { color: var(--text); font-weight: 800; }
.topnav {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: .35rem;
  color: var(--muted);
  font-size: .95rem;
}
.topnav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  min-height: 36px;
  padding: .42rem .68rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.topnav .nav-link:hover {
  background: rgba(217, 154, 43, .10);
  border-color: rgba(217, 154, 43, .22);
  text-decoration: none;
}
.topnav .nav-link.active {
  background: rgba(217, 154, 43, .17);
  border-color: rgba(217, 154, 43, .42);
  color: var(--text);
}
.topnav .admin-nav-text { color: inherit; }

.page { width: min(1180px, calc(100% - 2rem)); margin: 2rem auto; }
.page > * + * { margin-top: 1.5rem; }
.hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 1.5rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.card, .panel {
  background: linear-gradient(180deg, var(--panel), #131720);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.25rem;
  box-shadow: 0 18px 48px rgba(0,0,0,.22);
}
.page > .panel + .panel, .page > .card + .card { margin-top: 1.5rem; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .75rem; }
h1 { font-size: clamp(2rem, 4vw, 3.8rem); }
h2 { font-size: clamp(1.45rem, 2vw, 2rem); }
h3 { font-size: 1.1rem; }
p { color: var(--muted); margin: 0 0 1rem; }
.muted { color: var(--muted); }
.small-text { font-size: .88rem; }

.grid { display: grid; gap: 1rem; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; margin-top: 1rem; }
.actions.no-margin { margin-top: 0; }

.button, button, input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: .65rem 1rem;
  border: 1px solid var(--accent-dark);
  border-radius: 999px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: #18120a;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
}
.button:hover, button:hover, input[type="submit"]:hover { text-decoration: none; filter: brightness(1.06); }
.button.secondary, button.secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

button.hotspot-preview-toggle.is-active {
  color: #18120a;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  border-color: var(--accent-dark);
}
.button.danger, button.danger {
  background: transparent;
  color: #ff9b98;
  border-color: rgba(217, 83, 79, .55);
}
.button.small { min-height: 32px; padding: .35rem .7rem; font-size: .85rem; }

form { margin: 0; }
.form-grid { display: grid; gap: 1rem; }
label { display: block; color: var(--text); font-weight: 700; margin-bottom: .35rem; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--input);
  color: var(--text);
  padding: .75rem .85rem;
  font: inherit;
}
input[type="checkbox"] { width: auto; }
textarea { min-height: 110px; resize: vertical; }
.help { color: var(--muted); font-size: .88rem; margin-top: .25rem; }

.notice {
  padding: .8rem 1rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.notice-success { border-color: rgba(66, 184, 131, .45); }
.notice-error { border-color: rgba(217, 83, 79, .55); }
.notice-centered { text-align: center; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: .85rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: 0; }

.viewer {
  width: 100%;
  height: 70vh;
  min-height: 420px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}
.viewer.embed { height: 100vh; min-height: 100vh; border: 0; border-radius: 0; }
.editor-viewer,
.public-viewer {
  height: clamp(620px, 78vh, 820px);
  min-height: 620px;
}

.codebox {
  width: 100%;
  min-height: 80px;
  font-family: Consolas, Monaco, monospace;
  font-size: .9rem;
}
.badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 999px;
  padding: .2rem .55rem;
  font-size: .8rem;
}
.kv {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: .5rem;
  font-size: .95rem;
}
.kv strong { color: var(--muted); }

.public-body, .embed-body { background: #050608; }
.public-shell { width: min(1320px, calc(100% - 2rem)); margin: 1rem auto; }
.public-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .8rem; }
.public-title { margin: 0; font-size: clamp(1.4rem, 2vw, 2.2rem); }
.embed-body { margin: 0; overflow: hidden; }
.embed-body .page { width: 100%; margin: 0; }

.empty {
  border: 1px dashed var(--line);
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 820px) {
  .hero, .grid.two, .grid.three { grid-template-columns: 1fr; }
  .topbar {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .brand-area,
  .topnav {
    justify-self: start;
  }
  .brand-area {
    flex-direction: column;
    align-items: flex-start;
    gap: .2rem;
  }
  .signed-in-user {
    white-space: normal;
  }
  .topnav { flex-wrap: wrap; }
  .viewer { height: 62vh; }
  .kv { grid-template-columns: 1fr; }
}
.embed-body .topbar { display: none; }
.embed-body main.page { width: 100%; margin: 0; }



/* Dashboard project card layout */
.dashboard-project-grid {
  align-items: stretch;
  grid-auto-rows: 1fr;
}

/* Keep cards/panels aligned when they are children of a row/grid layout.
   This prevents the global stacked-card spacing from pushing the second item lower. */
.grid > .card,
.grid > .panel,
.dashboard-project-grid > .dashboard-project-card,
.project-editor-forms > .panel,
.scene-editor-forms > .panel,
.settings-grid > .panel {
  margin-top: 0;
}

.dashboard-project-card {
  display: grid;
  grid-template-rows: 38px 22px 54px 38px;
  gap: .55rem;
  height: 100%;
  min-height: 184px;
  padding: .9rem;
  align-items: stretch;
}

.project-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  min-height: 38px;
  margin: 0;
}

.project-card-header h2 {
  margin: 0;
  min-width: 0;
  font-size: clamp(1.15rem, 1.55vw, 1.45rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-header .badge {
  justify-self: end;
  white-space: nowrap;
}

.project-card-description {
  height: 22px;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-links {
  align-self: start;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: .28rem .5rem;
  font-size: .88rem;
  line-height: 1.25;
  margin: 0;
}

.project-card-links strong,
.project-card-links a {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-actions {
  align-self: end;
  margin-top: 0;
  padding-top: 0;
}

.project-card-actions .button {
  flex: 1 1 135px;
  min-height: 36px;
  padding: .45rem .8rem;
}

/* Project edit layout */
.project-editor-forms {
  align-items: stretch;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-editor-forms > .panel + .panel {
  margin-top: 0;
}

.project-editor-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100%;
}

.project-editor-panel > .form-grid,
.project-editor-panel > form.form-grid {
  display: grid;
  flex: 1;
  align-content: start;
}

.project-editor-panel .codebox {
  min-height: 110px;
}

/* Scene editor navigation */
.panorama-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.panorama-editor-heading > div:first-child {
  min-width: 0;
}

.scene-step-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .55rem;
  margin-left: auto;
  white-space: nowrap;
}

.scene-step-nav .button {
  width: 158px;
  text-align: center;
}

.button.disabled,
button.disabled {
  cursor: not-allowed;
  opacity: .45;
  pointer-events: none;
}

/* Scene editor layout */
.scene-editor-forms {
  align-items: stretch;
  gap: 1.25rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Override the global .panel + .panel spacing when panels sit side-by-side in the editor grid.
   Without this, the second panel starts lower than the first one. */
.scene-editor-forms > .panel + .panel {
  margin-top: 0;
}

.scene-editor-forms > .scene-editor-panel {
  height: 100%;
  min-height: 0;
}

.scene-editor-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.scene-editor-panel form {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.scene-settings-form,
.hotspot-form {
  height: 100%;
}

.scene-settings-form .form-actions,
.hotspot-form .form-actions {
  margin-top: auto;
}

.section-heading {
  margin-bottom: 1rem;
}

.section-heading p {
  margin-bottom: 0;
}

.section-heading-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading-with-action h2 {
  margin-bottom: 0;
}

.section-heading-with-action .button {
  white-space: nowrap;
}

.form-section {
  display: grid;
  gap: .85rem;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}

.form-section h3 {
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .7rem;
  align-items: center;
}

.form-actions.vertical {
  align-items: stretch;
  flex-direction: column;
}

.form-actions.vertical > .button,
.form-actions.vertical > button {
  width: 100%;
}

.range-readout {
  display: inline-flex;
  margin-top: .4rem;
  padding: .18rem .5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .8rem;
}

input[type="range"] {
  padding: .45rem 0;
  accent-color: var(--success);
}

/* Hotspot editor + custom public hotspot rings */
.editor-viewer-wrap {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  isolation: isolate;
}

.hotspot-placement-status {
  margin-top: .75rem;
}

.editor-viewer-wrap.mobile-preview-frame {
  width: min(100%, 430px);
  margin: 0 auto;
  padding: 1.15rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 42px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)),
    #090b10;
  box-shadow:
    0 24px 70px rgba(0,0,0,.42),
    inset 0 0 0 1px rgba(255,255,255,.05);
}

.editor-viewer-wrap.mobile-preview-frame::before {
  content: '';
  display: block;
  width: 116px;
  height: 22px;
  margin: 0 auto .8rem;
  border-radius: 0 0 18px 18px;
  background: #020307;
}

.mobile-preview-label {
  margin: -.25rem 0 .75rem;
  text-align: center;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.editor-viewer.mobile-editor-viewer {
  height: min(72vh, 760px);
  min-height: 680px;
  border-radius: 30px;
}

.mobile-preview-frame .selected-hotspot-controls {
  top: 4.8rem;
  right: 1.75rem;
  max-width: min(280px, calc(100% - 3.5rem));
}

.pnlm-hotspot-base.tour-hotspot-shell {
  background: transparent !important;
  background-image: none !important;
  padding: 0 !important;
  border: 0 !important;
  box-shadow: none !important;
}

.tour-hotspot-shell {
  background: transparent !important;
  border: 0 !important;
  cursor: pointer;
  overflow: visible !important;
  perspective: 220px;
  transition: opacity .16s ease;
  width: 0 !important;
  height: 0 !important;
  margin-left: 0 !important;
  margin-top: 0 !important;
  transform-origin: 0 0;
}

.tour-hotspot-visual {
  position: absolute;
  left: 0;
  top: 0;
  width: var(--marker-size, 36px);
  height: var(--marker-size, 36px);
  transform: translate(-50%, -50%);
  transform-origin: center center;
  pointer-events: auto;
}

.tour-hotspot-shell[style*="pointer-events: none"] .tour-hotspot-label {
  opacity: 0 !important;
}


.tour-hotspot-ring {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--marker-color-wash, rgba(64,240,113,.12)) 0 42%, var(--marker-color-faint, rgba(64,240,113,.04)) 43% 56%, transparent 57%);
  border: var(--marker-border, 4px) solid var(--marker-color, #39f06d);
  box-shadow:
    0 0 0 2px rgba(214,255,225,.35),
    0 0 18px var(--marker-color-soft, rgba(37, 235, 98, .55)),
    inset 0 0 12px var(--marker-color-wash, rgba(64,240,113,.32)),
    0 12px 24px rgba(0,0,0,.45);
  transform: perspective(220px) rotateX(var(--marker-tilt, 43deg)) scaleY(var(--marker-scale-y, .45)) scale(var(--marker-zoom-scale, 1));
  transform-origin: center center;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.tour-hotspot-arrow {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--marker-color, #39f06d);
  clip-path: polygon(50% 0, 100% 58%, 69% 58%, 69% 100%, 31% 100%, 31% 58%, 0 58%);
  filter:
    drop-shadow(0 0 2px rgba(214,255,225,.72))
    drop-shadow(0 0 12px var(--marker-color-soft, rgba(37,235,98,.55)))
    drop-shadow(0 12px 18px rgba(0,0,0,.45));
  transform: perspective(220px) rotateX(var(--marker-tilt, 43deg)) scaleY(var(--marker-scale-y, .45)) translateY(-4%) scale(var(--marker-arrow-scale, .92));
  transform-origin: center center;
  transition: transform .12s ease, filter .12s ease;
}

.tour-hotspot-icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter:
    drop-shadow(0 0 2px rgba(255,255,255,.7))
    drop-shadow(0 0 12px var(--marker-color-soft, rgba(37,235,98,.4)))
    drop-shadow(0 10px 18px rgba(0,0,0,.45));
  transform: perspective(220px) rotateX(var(--marker-tilt, 43deg)) scaleY(var(--marker-scale-y, .45)) scale(var(--marker-zoom-scale, 1));
  transform-origin: center center;
  transition: transform .12s ease, filter .12s ease;
}

.tour-hotspot-shell:hover .tour-hotspot-ring,
.tour-hotspot-shell:focus .tour-hotspot-ring,
.tour-hotspot-shell:focus-within .tour-hotspot-ring {
  border-color: var(--marker-color, #75ff99);
  box-shadow:
    0 0 0 3px rgba(214,255,225,.48),
    0 0 24px var(--marker-color-soft, rgba(37, 235, 98, .72)),
    inset 0 0 14px var(--marker-color-wash, rgba(64,240,113,.42)),
    0 14px 28px rgba(0,0,0,.52);
}

.tour-hotspot-shell:hover .tour-hotspot-arrow,
.tour-hotspot-shell:focus .tour-hotspot-arrow,
.tour-hotspot-shell:focus-within .tour-hotspot-arrow {
  transform: perspective(220px) rotateX(var(--marker-tilt, 43deg)) scaleY(var(--marker-scale-y, .45)) translateY(-8%) scale(var(--marker-arrow-hover-scale, 1));
  filter:
    drop-shadow(0 0 3px rgba(214,255,225,.85))
    drop-shadow(0 0 18px var(--marker-color-soft, rgba(37,235,98,.72)))
    drop-shadow(0 14px 22px rgba(0,0,0,.52));
}

.tour-hotspot-shell:hover .tour-hotspot-icon,
.tour-hotspot-shell:focus .tour-hotspot-icon,
.tour-hotspot-shell:focus-within .tour-hotspot-icon {
  transform: perspective(220px) rotateX(var(--marker-tilt, 43deg)) scaleY(var(--marker-scale-y, .45)) scale(var(--marker-icon-hover-scale, 1.06));
  filter:
    drop-shadow(0 0 3px rgba(255,255,255,.85))
    drop-shadow(0 0 18px var(--marker-color-soft, rgba(37,235,98,.65)))
    drop-shadow(0 14px 22px rgba(0,0,0,.52));
}

.tour-hotspot-shell .tour-hotspot-label {
  position: absolute;
  left: 0;
  top: calc((var(--marker-size, 36px) / 2) + 10px);
  transform: translateX(-50%);
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: .25rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(5, 6, 8, .78);
  color: #fff;
  font-size: 13px;
  line-height: 1.2;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

.tour-hotspot-shell:hover .tour-hotspot-label,
.tour-hotspot-shell:focus .tour-hotspot-label,
.tour-hotspot-shell:focus-within .tour-hotspot-label {
  opacity: 1;
}

.tour-hotspot-shell.new-hotspot-preview {
  z-index: 10000 !important;
  cursor: grab;
  pointer-events: auto;
}

.tour-hotspot-shell.new-hotspot-preview.dragging,
.tour-hotspot-shell.new-hotspot-preview:active {
  cursor: grabbing;
}

.tour-hotspot-shell.new-hotspot-preview .tour-hotspot-ring {
  border-color: var(--marker-color, #76ff9f);
  box-shadow:
    0 0 0 4px rgba(214,255,225,.7),
    0 0 28px var(--marker-color-soft, rgba(37, 235, 98, .82)),
    inset 0 0 16px var(--marker-color-wash, rgba(64,240,113,.52)),
    0 16px 32px rgba(0,0,0,.58);
}

.tour-hotspot-shell.new-hotspot-preview .tour-hotspot-arrow,
.tour-hotspot-shell.new-hotspot-preview .tour-hotspot-icon {
  filter:
    drop-shadow(0 0 4px rgba(214,255,225,.88))
    drop-shadow(0 0 26px var(--marker-color-soft, rgba(37,235,98,.82)))
    drop-shadow(0 16px 30px rgba(0,0,0,.58));
}

.tour-hotspot-shell.new-hotspot-preview .tour-hotspot-label {
  opacity: 1;
  background: rgba(5, 6, 8, .92);
}

.tour-hotspot-shell.existing-hotspot-editor {
  cursor: grab;
  pointer-events: auto;
}

.tour-hotspot-shell.existing-hotspot-editor.dragging,
.tour-hotspot-shell.existing-hotspot-editor:active {
  z-index: 10001 !important;
  cursor: grabbing;
}

.tour-hotspot-shell.existing-hotspot-editor.dragging .tour-hotspot-ring {
  box-shadow:
    0 0 0 4px rgba(214,255,225,.68),
    0 0 28px var(--marker-color-soft, rgba(37,235,98,.82)),
    inset 0 0 16px var(--marker-color-wash, rgba(64,240,113,.52)),
    0 16px 32px rgba(0,0,0,.58);
}

.tour-hotspot-shell.existing-hotspot-editor.dragging .tour-hotspot-arrow,
.tour-hotspot-shell.existing-hotspot-editor.dragging .tour-hotspot-icon {
  filter:
    drop-shadow(0 0 4px rgba(214,255,225,.88))
    drop-shadow(0 0 26px var(--marker-color-soft, rgba(37,235,98,.82)))
    drop-shadow(0 16px 30px rgba(0,0,0,.58));
}

.inline-style-form {
  display: grid;
  grid-template-columns: 78px 92px 70px auto;
  gap: .5rem;
  align-items: end;
  min-width: 290px;
}

.inline-style-form label {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
}

.inline-style-form input {
  padding: .45rem .55rem;
  border-radius: 10px;
}

.hotspot-icon-limit {
  display: block;
  margin-top: .35rem;
}

@media (max-width: 820px) {
  .panorama-editor-heading {
    display: grid;
    gap: .85rem;
  }

  .scene-step-nav {
    justify-content: flex-start;
    margin-left: 0;
    white-space: normal;
  }

  .editor-viewer,
  .public-viewer {
    height: 68vh;
    min-height: 460px;
  }

  .editor-viewer-wrap.mobile-preview-frame {
    width: min(100%, 390px);
    padding: .8rem;
    border-radius: 34px;
  }

  .editor-viewer-wrap.mobile-preview-frame::before {
    width: 96px;
    height: 18px;
    margin-bottom: .55rem;
  }

  .editor-viewer.mobile-editor-viewer {
    height: 70vh;
    min-height: 560px;
    border-radius: 26px;
  }

  .mobile-preview-frame .selected-hotspot-controls {
    top: 3.8rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }

  .scene-editor-forms,
  .project-editor-forms {
    grid-template-columns: 1fr;
  }

  .inline-style-form { grid-template-columns: 1fr; }
  .scene-editor-panel,
  .project-editor-panel { display: block; }
}

/* Hotspot target landing view controls */
.target-scene-wrap {
  display: grid;
  gap: .85rem;
}

.target-view-fields {
  display: grid;
  gap: .75rem;
  padding: .85rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(0,0,0,.16);
}

.target-view-heading {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  align-items: center;
  justify-content: space-between;
}

.hotspot-target-cell {
  display: grid;
  gap: .55rem;
  min-width: 320px;
}

.inline-target-view-form {
  display: grid;
  grid-template-columns: 125px repeat(3, minmax(78px, 1fr)) auto;
  gap: .5rem;
  align-items: end;
}

.inline-target-view-form label {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
}

.inline-target-view-form input {
  padding: .45rem .55rem;
  border-radius: 10px;
}


.inline-info-text-form {
  display: grid;
  gap: .5rem;
  margin-top: .45rem;
  min-width: 320px;
}

.inline-info-text-form label {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
}

.inline-info-text-form textarea {
  min-height: 78px;
  padding: .55rem .65rem;
  border-radius: 10px;
}

.inline-info-text-form button {
  justify-self: start;
}

@media (max-width: 820px) {
  .inline-target-view-form {
    grid-template-columns: 1fr;
  }
}


/* Settings and defaults layout */
.page-heading-row {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.settings-form {
  display: grid;
  gap: 1.25rem;
}

.settings-grid {
  align-items: stretch;
  gap: 1.25rem;
}

.settings-grid > .settings-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-top: 0;
}

.settings-panel .form-section + .form-section {
  margin-top: 1rem;
}

.compact-options {
  align-content: start;
}

.check-row {
  display: flex;
  gap: .55rem;
  align-items: center;
  margin: 0;
  color: var(--text);
}

.check-row input[type="checkbox"] {
  flex: 0 0 auto;
}

input[type="color"] {
  min-height: 42px;
  padding: .3rem;
}

.color-swatch {
  display: inline-block;
  width: .9rem;
  height: .9rem;
  border-radius: 50%;
  background: var(--swatch, #39f06d);
  border: 1px solid rgba(255,255,255,.45);
  vertical-align: -1px;
  margin-right: .35rem;
}

.project-default-summary {
  margin-top: .5rem;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}

.project-default-summary h3 {
  margin-bottom: .8rem;
}

.settings-save-actions {
  margin-top: auto;
}

@media (max-width: 820px) {
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid > .settings-panel { display: block; }
  .inline-target-view-form { grid-template-columns: 1fr; }
}

/* Admin settings spacing */
.admin-settings-form {
  gap: 1.4rem;
}

.admin-settings-panel {
  gap: .5rem;
}

.admin-settings-panel .form-section + .form-section {
  margin-top: .5rem;
}

.admin-settings-panel .section-heading {
  margin-bottom: 0;
}

.admin-settings-panel .form-section h3 + label {
  margin-top: .1rem;
}

.admin-default-limit-notice {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  align-items: center;
  justify-content: space-between;
}

.admin-default-limit-text {
  display: inline-flex;
  align-items: baseline;
  gap: .25rem;
}

/* Super admin layout */
.grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.notice-info { border-color: rgba(90, 155, 255, .45); }

.admin-hero,
.admin-grid,
.admin-stat-grid,
.align-row-panels {
  align-items: stretch;
}

.admin-grid > .panel,
.align-row-panels > .panel,
.admin-stat-grid > .card {
  margin-top: 0;
  height: 100%;
}

.admin-panel,
.admin-quick-card,
.stat-card {
  display: flex;
  flex-direction: column;
}

.stat-card {
  gap: .35rem;
  min-height: 105px;
  justify-content: center;
}

.stat-card span {
  color: var(--muted);
  font-size: .86rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.stat-card strong {
  font-size: clamp(1.55rem, 2.4vw, 2.35rem);
}

.actions.vertical {
  align-items: stretch;
  flex-direction: column;
}

.compact-actions {
  margin-top: 0;
}

.inline-admin-form {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 1fr) auto;
  gap: .5rem;
  align-items: center;
}

.inline-admin-form select {
  min-width: 130px;
}

button.small,
input[type="submit"].small {
  min-height: 32px;
  padding: .35rem .7rem;
  font-size: .85rem;
}

@media (max-width: 1000px) {
  .grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .grid.four { grid-template-columns: 1fr; }
  .inline-admin-form { grid-template-columns: 1fr; }
}


/* Pending user approval badges */
.admin-nav-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.nav-badge,
.button-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.35rem;
  height: 1.35rem;
  padding: 0 .38rem;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: .74rem;
  font-weight: 800;
  line-height: 1;
}

.button-badge {
  margin-left: .35rem;
  min-width: 1.25rem;
  height: 1.25rem;
  font-size: .72rem;
}

.stat-link {
  color: var(--text);
  text-decoration: none;
}

.stat-link:hover {
  text-decoration: none;
  filter: brightness(1.08);
}

.stat-card.needs-attention {
  border-color: rgba(217, 83, 79, .72);
  box-shadow: 0 18px 48px rgba(217, 83, 79, .12);
}

.stat-card.needs-attention span {
  color: #ffb2af;
}

/* Admin user account deletion */
.delete-user-form {
  margin: 0;
}

.delete-user-form button {
  white-space: nowrap;
}

/* Per-user panorama image limits */
.user-admin-form {
  grid-template-columns: minmax(115px, 1fr) minmax(115px, 1fr) minmax(140px, 1fr) auto;
}

.inline-field {
  display: grid;
  gap: .2rem;
  margin: 0;
}

.inline-field span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.inline-field input {
  min-width: 130px;
}

.usage-line {
  font-weight: 700;
  white-space: nowrap;
}

.badge.warning {
  display: inline-flex;
  align-items: center;
  margin-top: .3rem;
  padding: .18rem .45rem;
  border-radius: 999px;
  background: rgba(217, 154, 43, .18);
  color: #f7c86a;
  font-size: .75rem;
  font-weight: 800;
}

.notice-compact {
  margin-top: .35rem;
  padding: .7rem .8rem;
}

@media (max-width: 1100px) {
  .user-admin-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 820px) {
  .user-admin-form {
    grid-template-columns: 1fr;
  }
}

/* Admin users table layout fix */
.admin-users-wrap {
  overflow-x: auto;
}

.admin-users-table {
  min-width: 1120px;
  table-layout: fixed;
}

.admin-users-col-user { width: 23%; }
.admin-users-col-projects { width: 8%; }
.admin-users-col-images { width: 14%; }
.admin-users-col-login { width: 15%; }
.admin-users-col-controls { width: 31%; }
.admin-users-col-delete { width: 9%; }

.admin-user-management-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  align-items: end;
  max-width: 420px;
}

.admin-user-management-form .inline-field {
  min-width: 0;
}

.admin-user-management-form .wide-field,
.admin-user-management-form button {
  grid-column: 1 / -1;
}

.admin-user-management-form select,
.admin-user-management-form input {
  min-width: 0;
  width: 100%;
}

.admin-user-management-form button {
  justify-self: start;
  min-width: 90px;
}

@media (max-width: 820px) {
  .admin-users-table {
    min-width: 980px;
  }
}


/* Admin projects table alignment fix */
.admin-project-actions-cell {
  vertical-align: middle;
}

.admin-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin: 0;
}

.admin-project-actions .button {
  white-space: nowrap;
}

/* Existing hotspots card layout */
.hotspot-card-list {
  display: grid;
  gap: 1rem;
}

.hotspot-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.035);
  padding: 1rem;
}

.hotspot-card-header {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  align-items: flex-start;
  justify-content: space-between;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1rem;
}

.hotspot-card-title-wrap {
  min-width: min(100%, 320px);
}

.hotspot-card h3 {
  margin: 0 0 .35rem;
  font-size: 1.02rem;
}

.hotspot-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .75rem;
  color: var(--muted);
  font-size: .86rem;
}

.hotspot-card-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.hotspot-card-grid.has-target .hotspot-details-section,
.hotspot-card-grid.has-target .hotspot-position-section,
.hotspot-card-grid.has-target .hotspot-appearance-section {
  grid-column: span 2;
}

.hotspot-card-grid.has-target .hotspot-target-section,
.hotspot-card-grid.has-target .hotspot-info-section {
  grid-column: span 3;
}

.hotspot-card-grid.no-target .hotspot-details-section,
.hotspot-card-grid.no-target .hotspot-position-section,
.hotspot-card-grid.no-target .hotspot-appearance-section {
  grid-column: span 2;
}

.hotspot-card-grid.no-target .hotspot-info-section {
  grid-column: 1 / -1;
}

.hotspot-card-section {
  display: grid;
  gap: .65rem;
  min-width: 0;
  height: 100%;
  padding: .85rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  background: rgba(0,0,0,.14);
}

.hotspot-card-section h4 {
  margin: 0;
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.hotspot-card-form {
  display: grid;
  gap: .6rem;
  align-content: start;
}

.hotspot-card-form label {
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
}

.hotspot-card-form input,
.hotspot-card-form select,
.hotspot-card-form textarea {
  margin-top: .28rem;
  padding: .55rem .65rem;
  border-radius: 10px;
  text-align: left;
}

.hotspot-card-form input[type="number"] {
  text-align: center;
}

.hotspot-card-form textarea {
  min-height: 92px;
}

.hotspot-card-form button {
  justify-self: start;
}

.hotspot-appearance-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.hotspot-appearance-form button {
  grid-column: 1 / -1;
}

.hotspot-target-name {
  font-weight: 700;
}

.mini-grid {
  display: grid;
  gap: .6rem;
}

.mini-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hotspot-position-form button {
  justify-self: start;
}

@media (max-width: 700px) {
  .hotspot-card {
    padding: .85rem;
  }

  .hotspot-card-header {
    display: grid;
  }

  .hotspot-card-grid,
  .hotspot-appearance-form,
  .mini-grid.two,
  .mini-grid.three {
    grid-template-columns: 1fr;
  }

  .hotspot-card-grid.has-target .hotspot-details-section,
  .hotspot-card-grid.has-target .hotspot-position-section,
  .hotspot-card-grid.has-target .hotspot-appearance-section,
  .hotspot-card-grid.has-target .hotspot-target-section,
  .hotspot-card-grid.has-target .hotspot-info-section,
  .hotspot-card-grid.no-target .hotspot-details-section,
  .hotspot-card-grid.no-target .hotspot-position-section,
  .hotspot-card-grid.no-target .hotspot-appearance-section,
  .hotspot-card-grid.no-target .hotspot-info-section {
    grid-column: 1 / -1;
  }
}

.scene-panel-actions {
  justify-content: flex-end;
}

.bulk-upload-card .form-section {
  gap: .65rem;
}

.bulk-upload-form .notice {
  margin-top: 0;
}

@media (max-width: 700px) {
  .scene-panel-actions {
    width: 100%;
    justify-content: stretch;
  }

  .scene-panel-actions .button,
  .scene-panel-actions button {
    width: 100%;
  }
}

.inline-save-status {
  min-height: 1.35rem;
  font-weight: 700;
  font-size: .92rem;
}

.inline-save-status.is-success {
  color: #1f8a4c;
}

.inline-save-status.is-error {
  color: #b42318;
}

.inline-save-status.is-saving {
  color: #6f5a22;
}

/* Hotspot appearance alignment + centered scene edit confirmations */
.hotspot-color-icon-row {
  display: grid;
  grid-template-columns: minmax(110px, .75fr) minmax(0, 1.25fr);
  gap: .6rem;
  align-items: start;
  grid-column: 1 / -1;
}

.hotspot-inline-field {
  display: grid;
  grid-template-rows: auto auto auto;
  gap: .28rem;
  min-width: 0;
  align-content: start;
}

.hotspot-inline-field label {
  margin: 0;
  min-height: 1.15rem;
  font-size: .82rem;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
}

.hotspot-inline-field input {
  margin-top: 0;
}

.hotspot-color-field input[type="color"] {
  width: 100%;
  min-height: 2.55rem;
}

.hotspot-icon-current {
  display: block;
  margin-top: 0;
  min-height: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.inline-save-status {
  text-align: center;
}

@media (max-width: 640px) {
  .hotspot-color-icon-row {
    grid-template-columns: 1fr;
  }
}

/* Bulk scene deletion controls */
.scenes-table .select-col {
  width: 44px;
  text-align: center;
  vertical-align: middle;
}

.scenes-table .select-col input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0 auto;
}

.scene-row-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: .45rem;
}

.scene-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.scene-bulk-actions .help {
  margin: 0;
  text-align: right;
}

@media (max-width: 760px) {
  .scene-bulk-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .scene-bulk-actions .help {
    text-align: left;
  }
}

/* Viewer zoom lock */
.viewer.zoom-disabled .pnlm-zoom-controls {
  display: none !important;
}

/* Project watermark controls */
.watermark-controls {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,.025);
}

.watermark-controls h4 {
  margin: 0 0 .85rem;
  color: var(--text);
}

.watermark-size-position {
  align-items: start;
}

.watermark-position-field {
  grid-column: 1 / -1;
}

.viewer-checkbox-grid {
  margin-top: 1rem;
  gap: .75rem 1rem;
}

.viewer-checkbox-grid .check-row {
  min-height: 42px;
}

.small-check {
  margin-top: .5rem;
  font-size: .9rem;
  color: var(--muted);
}

.viewer {
  position: relative;
}

.tour-watermark {
  position: absolute;
  z-index: 30;
  max-width: min(55%, 500px);
  height: auto;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.45));
}

.watermark-bottom-right { right: 18px; bottom: 18px; }
.watermark-bottom-left { left: 18px; bottom: 18px; }
.watermark-top-right { right: 18px; top: 18px; }
.watermark-top-left { left: 18px; top: 18px; }
.watermark-center { left: 50%; top: 50%; transform: translate(-50%, -50%); }

@media (max-width: 760px) {
  .viewer-checkbox-grid {
    grid-template-columns: 1fr;
  }

  .watermark-controls .grid.two,
  .watermark-size-position {
    grid-template-columns: 1fr;
  }

  .tour-watermark {
    max-width: min(65%, 360px);
  }
}

/* Selected hotspot quick controls */
.tour-hotspot-shell.existing-hotspot-editor.is-selected .tour-hotspot-ring {
  box-shadow:
    0 0 0 4px rgba(214,255,225,.72),
    0 0 26px var(--marker-color-soft, rgba(37,235,98,.82)),
    inset 0 0 16px var(--marker-color-wash, rgba(64,240,113,.52)),
    0 16px 32px rgba(0,0,0,.58);
}

.tour-hotspot-shell.existing-hotspot-editor.is-selected .tour-hotspot-arrow,
.tour-hotspot-shell.existing-hotspot-editor.is-selected .tour-hotspot-icon {
  filter:
    drop-shadow(0 0 4px rgba(214,255,225,.9))
    drop-shadow(0 0 24px var(--marker-color-soft, rgba(37,235,98,.8)))
    drop-shadow(0 16px 30px rgba(0,0,0,.58));
}

.selected-hotspot-controls {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10030;
  width: min(270px, calc(100% - 32px));
  display: grid;
  gap: .75rem;
  padding: .85rem;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  background: rgba(5, 7, 10, .9);
  box-shadow: 0 14px 30px rgba(0,0,0,.42);
  backdrop-filter: blur(8px);
}

.selected-hotspot-controls[hidden] {
  display: none !important;
}

.selected-hotspot-controls-header {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  color: #fff;
}

.selected-hotspot-controls-header strong {
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.icon-button {
  display: inline-flex;
  width: 28px;
  height: 28px;
  min-height: 0;
  padding: 0;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
}

.icon-button:hover,
.icon-button:focus {
  background: rgba(255,255,255,.15);
}

.selected-hotspot-control-row {
  display: grid;
  gap: .35rem;
}

.selected-hotspot-control-row label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  color: rgba(255,255,255,.84);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.selected-hotspot-control-row label span {
  color: var(--success);
}

.selected-hotspot-control-row input[type="range"] {
  width: 100%;
  margin: 0;
  padding: 0;
}

.selected-hotspot-help {
  color: rgba(255,255,255,.62);
  font-size: .76rem;
  line-height: 1.35;
}

@media (max-width: 760px) {
  .selected-hotspot-controls {
    top: 10px;
    right: 10px;
    width: min(245px, calc(100% - 20px));
  }
}


.hotspot-details-form {
  align-content: start;
}

.hotspot-details-form select,
.hotspot-details-form input {
  width: 100%;
}

.hotspot-keep-visible-option {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: .1rem 0 0;
  padding: .45rem .55rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  background: rgba(255,255,255,.04);
  color: var(--text);
  font-size: .84rem;
  text-align: center;
}

.hotspot-keep-visible-option input[type="checkbox"] {
  width: auto;
  margin: 0;
}


@media (hover: none), (pointer: coarse) {
  .tour-hotspot-shell:hover .tour-hotspot-ring,
  .tour-hotspot-shell:focus .tour-hotspot-ring,
  .tour-hotspot-shell:focus-within .tour-hotspot-ring,
  .tour-hotspot-shell:hover .tour-hotspot-arrow,
  .tour-hotspot-shell:focus .tour-hotspot-arrow,
  .tour-hotspot-shell:focus-within .tour-hotspot-arrow,
  .tour-hotspot-shell:hover .tour-hotspot-icon,
  .tour-hotspot-shell:focus .tour-hotspot-icon,
  .tour-hotspot-shell:focus-within .tour-hotspot-icon {
    transition-duration: .08s;
  }
}

/* Dashboard duplicate project button */
.project-duplicate-form {
  flex: 1 1 135px;
  display: flex;
  margin: 0;
}

.project-duplicate-form button {
  width: 100%;
  min-height: 36px;
  padding: .45rem .8rem;
}

/* Desktop/mobile tour edit modes */
.view-mode-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .65rem;
}

.view-mode-badge {
  margin-left: .5rem;
  vertical-align: middle;
}

.share-link-grid {
  align-items: stretch;
}

.share-code-group + .share-link-grid,
.share-link-grid + div {
  margin-top: .25rem;
}

@media (max-width: 720px) {
  .view-mode-toggle {
    width: 100%;
  }
  .view-mode-toggle .button {
    flex: 1 1 100%;
    justify-content: center;
  }
}

/* Project import/export controls */
.import-project-action {
  margin-top: .75rem;
}

.inline-action-form {
  margin: 0;
}

.project-heading-actions {
  align-items: center;
}

.tall-codebox { min-height: 220px; }

/* Landing page */
.landing-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(49, 95, 120, 0.25), transparent 34%),
    radial-gradient(circle at bottom right, rgba(25, 63, 84, 0.28), transparent 32%),
    linear-gradient(180deg, #0f1720 0%, #16222d 55%, #0f1720 100%);
  color: #eef2f5;
}

.landing-modal-open {
  overflow: hidden;
}

.landing-page {
  max-width: 1220px;
  margin: 0 auto;
  padding: 1.4rem 1.4rem 2.5rem;
}

.landing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0 1.5rem;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 700;
  text-decoration: none;
}

.landing-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.55);
  background: rgba(255,255,255,0.06);
  color: #ffffff;
  font-size: 1rem;
}

.landing-nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(320px, 0.94fr);
  gap: 2rem;
  align-items: center;
  padding: 2rem 0 1.5rem;
}

.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: #d5e6f0;
}

.landing-hero-copy h1,
.landing-value-card h2 {
  color: #ffffff;
}

.landing-hero-copy h1 {
  font-size: clamp(2.3rem, 4.2vw, 4.2rem);
  line-height: 1.08;
  margin: 0.8rem 0 1rem;
}

.landing-hero-copy p,
.landing-value-card p,
.landing-feature-strip article span,
.landing-visual-core span,
.landing-auth-intro,
.landing-auth-footnote {
  color: #d7e1e8;
}

.landing-hero-copy p {
  max-width: 640px;
  font-size: 1.08rem;
}

.landing-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.35rem;
}

.landing-hero-visual {
  position: relative;
  min-height: 420px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 28px;
  background:
    radial-gradient(circle at center, rgba(49,95,120,0.36) 0, rgba(49,95,120,0.14) 28%, rgba(49,95,120,0.04) 47%, transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  box-shadow: 0 30px 70px rgba(5, 10, 15, 0.35);
  overflow: hidden;
}

.landing-orbit {
  position: absolute;
  inset: 50% auto auto 50%;
  border-radius: 50%;
  border: 1px dashed rgba(255,255,255,0.2);
  transform: translate(-50%, -50%);
}

.landing-orbit-one { width: 84%; height: 84%; }
.landing-orbit-two { width: 62%; height: 62%; }
.landing-orbit-three { width: 40%; height: 40%; }

.landing-visual-core {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(280px, 75%);
  padding: 1.35rem;
  border-radius: 18px;
  text-align: center;
  background: rgba(12, 22, 30, 0.78);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
}

.landing-visual-core strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 1.3rem;
  color: #ffffff;
}

.landing-visual-pill {
  position: absolute;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.12);
  color: #ffffff;
  font-size: 0.92rem;
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(7, 11, 16, 0.25);
}

.pill-a { top: 12%; right: 8%; }
.pill-b { left: 9%; bottom: 16%; }
.pill-c { right: 13%; bottom: 11%; }

.landing-feature-strip,
.landing-value-grid {
  margin-top: 1.5rem;
}

.landing-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.landing-feature-strip article,
.landing-value-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 1.15rem 1.2rem;
  box-shadow: 0 18px 40px rgba(6, 12, 17, 0.18);
}

.landing-feature-strip article strong {
  display: block;
  margin-bottom: 0.35rem;
  color: #ffffff;
  font-size: 1.02rem;
}

.landing-value-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.landing-value-card h2 {
  margin-top: 0;
  font-size: 1.28rem;
}

.landing-auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  z-index: 3000;
}

.landing-auth-modal.is-open {
  display: flex;
}

.landing-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 12, 18, 0.72);
}

.landing-auth-card {
  position: relative;
  width: min(620px, 100%);
  max-height: calc(100vh - 2.4rem);
  overflow: auto;
  padding: 1.35rem 1.35rem 1.25rem;
  border-radius: 22px;
  background: #ffffff;
  color: #1f2930;
  box-shadow: 0 24px 60px rgba(8, 15, 21, 0.35);
}

.landing-auth-card .landing-eyebrow,
.landing-auth-card h2,
.landing-auth-card label,
.landing-auth-card .landing-auth-tab.is-active {
  color: #1f2930;
}

.landing-auth-card h2 {
  margin: 0.45rem 0 0.35rem;
}

.landing-auth-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: 0;
  background: transparent;
  color: #66727c;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
}

.landing-auth-tabs {
  display: inline-flex;
  gap: 0.5rem;
  margin: 1rem 0 1rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: #eef2f5;
}

.landing-auth-tab {
  border: 0;
  background: transparent;
  color: #66727c;
  font-weight: 700;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.landing-auth-tab.is-active {
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(0,0,0,0.08);
}

.landing-auth-pane {
  display: none;
}

.landing-auth-pane.is-active {
  display: block;
}

.landing-auth-notice {
  margin-bottom: 1rem;
}

.landing-auth-form {
  display: grid;
  gap: 0.95rem;
}

.landing-auth-form-two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.landing-auth-disabled {
  display: inline-block;
  padding: 0.8rem 1rem;
  background: #fff4d2;
  color: #6c5513;
  border-radius: 12px;
}

@media (max-width: 980px) {
  .landing-hero,
  .landing-value-grid,
  .landing-feature-strip {
    grid-template-columns: 1fr;
  }

  .landing-hero-visual {
    min-height: 340px;
  }
}

@media (max-width: 700px) {
  .landing-page {
    padding: 1rem 1rem 2rem;
  }

  .landing-nav {
    flex-direction: column;
    align-items: flex-start;
  }

  .landing-nav-actions,
  .landing-hero-actions {
    width: 100%;
  }

  .landing-nav-actions .button,
  .landing-hero-actions .button {
    flex: 1 1 auto;
    text-align: center;
    justify-content: center;
  }

  .landing-auth-form-two-col {
    grid-template-columns: 1fr;
  }

  .landing-hero-visual {
    min-height: 300px;
  }

  .landing-visual-pill {
    position: static;
    display: inline-flex;
    margin: 0.35rem;
  }

  .landing-hero-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
  }

  .landing-orbit {
    display: none;
  }

  .landing-visual-core {
    position: static;
    transform: none;
    width: 100%;
  }
}

/* Scene edit: add-hotspot controls on panorama preview */
.new-hotspot-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 10025;
  width: min(350px, calc(100% - 32px));
  height: auto;
  display: grid;
  align-content: start;
  gap: .55rem;
  padding: .8rem;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  background: rgba(5, 7, 10, .90);
  box-shadow: 0 14px 34px rgba(0,0,0,.46);
  backdrop-filter: blur(8px);
}

.new-hotspot-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .7rem;
  color: #fff;
}

.new-hotspot-panel-header strong {
  display: block;
  font-size: .84rem;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.new-hotspot-panel-header span {
  display: block;
  margin-top: .12rem;
  color: rgba(255,255,255,.62);
  font-size: .76rem;
}

.new-hotspot-panel .compact-form-section {
  gap: .5rem;
  padding: .65rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.045);
}

.new-hotspot-panel .compact-form-section h3 {
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.new-hotspot-panel label {
  margin-bottom: .2rem;
  color: rgba(255,255,255,.86);
  font-size: .74rem;
  line-height: 1.2;
}

.new-hotspot-panel input,
.new-hotspot-panel select,
.new-hotspot-panel textarea {
  min-height: 34px;
  padding: .42rem .5rem;
  border-radius: 10px;
  font-size: .82rem;
}

.new-hotspot-panel textarea {
  min-height: 68px;
}

.new-hotspot-panel input[type="color"] {
  min-height: 34px;
  padding: .18rem;
}

.new-hotspot-panel input[type="file"] {
  font-size: .74rem;
}

.new-hotspot-panel input[type="range"] {
  padding: .25rem 0;
}

.new-hotspot-panel .help {
  margin-top: .15rem;
  color: rgba(255,255,255,.56);
  font-size: .72rem;
  line-height: 1.25;
}

.new-hotspot-panel .range-readout {
  margin-top: .25rem;
  font-size: .7rem;
}

.new-hotspot-panel .compact-field-grid {
  gap: .5rem;
}

.new-hotspot-panel .grid.three.compact-field-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.new-hotspot-panel .target-scene-wrap {
  display: grid;
  gap: .5rem;
}

.new-hotspot-panel .compact-target-view-fields {
  gap: .45rem;
  padding: .55rem;
  border-radius: 12px;
  background: rgba(0,0,0,.18);
}

.new-hotspot-panel .target-view-heading {
  display: grid;
  gap: .45rem;
}

.new-hotspot-panel .target-view-heading strong {
  color: rgba(255,255,255,.76);
  font-size: .74rem;
}

.new-hotspot-panel .form-actions {
  position: sticky;
  bottom: -.8rem;
  margin: 0;
  padding: .65rem 0 0;
  background: linear-gradient(180deg, rgba(5,7,10,0), rgba(5,7,10,.96) 40%);
}

.new-hotspot-panel .form-actions button {
  width: 100%;
}

.new-hotspot-panel + .selected-hotspot-controls {
  right: auto;
  left: 16px;
}

.viewer-save-status {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  margin-left: .2rem;
}

.scene-settings-only {
  grid-template-columns: 1fr;
}

.scene-settings-only > .scene-editor-panel {
  grid-column: 1 / -1;
  height: auto;
}

.scene-settings-only .scene-settings-form {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, .95fr);
  gap: 1rem;
  height: auto;
  align-items: start;
}

.scene-settings-only .scene-settings-secondary-actions {
  grid-column: 1 / -1;
  margin-top: 0;
}

@media (max-width: 1100px) {
  .new-hotspot-panel {
    width: min(315px, calc(100% - 32px));
  }

  .scene-settings-only .scene-settings-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .new-hotspot-panel {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: .85rem;
  }

  .new-hotspot-panel + .selected-hotspot-controls,
  .selected-hotspot-controls {
    left: 10px;
    right: 10px;
    width: auto;
  }

  .viewer-save-status {
    width: 100%;
  }
}

.viewer-save-controls {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 10024;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  max-width: min(430px, calc(100% - 390px));
  padding: .65rem;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 16px;
  background: rgba(5, 7, 10, .78);
  box-shadow: 0 12px 28px rgba(0,0,0,.38);
  backdrop-filter: blur(8px);
}

.viewer-save-controls button {
  min-height: 36px;
  padding: .45rem .85rem;
}

.viewer-save-controls .viewer-save-status {
  margin: 0;
  color: rgba(255,255,255,.74);
}

@media (max-width: 1100px) {
  .viewer-save-controls {
    max-width: calc(100% - 350px);
  }
}

@media (max-width: 820px) {
  .viewer-save-controls {
    position: static;
    max-width: none;
    margin-top: .85rem;
  }
}

/* Scene edit: collapsible Add Hotspot panel */
.new-hotspot-panel-toggle {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10026;
  min-height: 36px;
  padding: .45rem .85rem;
  border-color: rgba(255,255,255,.28);
  background: rgba(5, 7, 10, .78);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.34);
  backdrop-filter: blur(8px);
}

.new-hotspot-panel-toggle.is-active {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  border-color: var(--accent-dark);
  color: #18120a;
}

.new-hotspot-panel[hidden] {
  display: none !important;
}

.new-hotspot-panel.is-open {
  top: 64px;
}

.new-hotspot-panel-close {
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 50%;
  color: #fff;
}

.new-hotspot-quick-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: .45rem;
}

.new-hotspot-quick-actions .button,
.new-hotspot-quick-actions button {
  width: 100%;
  min-height: 32px;
  padding: .38rem .55rem;
  font-size: .76rem;
}

@media (max-width: 820px) {
  .new-hotspot-panel-toggle {
    position: static;
    width: 100%;
    margin-top: .85rem;
  }

  .new-hotspot-panel.is-open {
    top: auto;
  }
}

/* Scene edit Add Hotspot panel refinements */
.new-hotspot-panel .marker-color-icon-grid {
  grid-template-columns: minmax(90px, .72fr) minmax(0, 1.28fr);
  align-items: start;
}

.new-hotspot-panel .marker-color-icon-grid input[type="color"] {
  width: 100%;
}

.new-hotspot-panel .target-manual-row {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.current-view-actions {
  justify-content: center;
  text-align: center;
}

.current-view-actions .badge,
.current-view-actions button {
  justify-content: center;
}

.viewer-save-controls {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.viewer-save-button.is-clean {
  border-color: rgba(255,255,255,.28);
  background: rgba(5, 7, 10, .78);
  color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.34);
  backdrop-filter: blur(8px);
}

.viewer-save-button.is-dirty {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  border-color: var(--accent-dark);
  color: #18120a;
  box-shadow: 0 10px 24px rgba(0,0,0,.34);
}

@media (max-width: 520px) {
  .new-hotspot-panel .target-manual-row,
  .new-hotspot-panel .marker-color-icon-grid {
    grid-template-columns: 1fr !important;
  }
}


/* Scene edit Add Hotspot panel spacing and button state refinements */
.new-hotspot-panel-toggle,
.viewer-save-button.is-clean {
  border-color: rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.10) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.24) !important;
  backdrop-filter: blur(10px) !important;
}

.new-hotspot-panel-toggle[hidden] {
  display: none !important;
}

.new-hotspot-panel.is-open {
  top: 16px;
  bottom: 16px;
  max-height: none;
}

.new-hotspot-panel .form-actions {
  bottom: 0;
  padding: .65rem 0 .65rem;
  background: linear-gradient(180deg, rgba(5,7,10,0), rgba(5,7,10,.96) 40%);
}

.new-hotspot-panel .form-actions button {
  margin-bottom: 0;
}

.viewer-save-button.is-dirty {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark)) !important;
  border-color: var(--accent-dark) !important;
  color: #18120a !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.34) !important;
}

@media (max-width: 820px) {
  .new-hotspot-panel.is-open {
    top: auto;
    bottom: auto;
  }
}

/* Scene edit: existing hotspot settings panel */
.existing-hotspot-panel {
  top: 16px;
  bottom: 16px;
}

.existing-hotspot-panel[hidden] {
  display: none !important;
}

.existing-hotspot-panel input[readonly] {
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.08);
  cursor: default;
}

.existing-hotspot-panel .existing-hotspot-flatness-range {
  width: 100%;
}

.existing-hotspot-delete-form {
  position: sticky;
  bottom: 0;
  margin: .1rem 0 0;
  padding: .65rem 0 .65rem;
  background: linear-gradient(180deg, rgba(5,7,10,0), rgba(5,7,10,.96) 40%);
}

.existing-hotspot-delete-form button {
  width: 100%;
}

.existing-hotspot-summary-list {
  gap: .75rem;
}

.existing-hotspot-summary-card {
  padding: .9rem 1rem;
}

.existing-hotspot-summary-card .hotspot-card-header {
  align-items: center;
}

.existing-hotspot-summary-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

@media (max-width: 820px) {
  .existing-hotspot-panel {
    position: static;
    width: 100%;
    max-height: none;
    margin-top: .85rem;
  }

  .existing-hotspot-summary-card .hotspot-card-header,
  .existing-hotspot-summary-actions {
    align-items: stretch;
  }

  .existing-hotspot-summary-actions .button,
  .existing-hotspot-summary-actions button,
  .existing-hotspot-summary-actions form {
    width: 100%;
  }
}

/* Scene edit: fullscreen editor viewer */
.editor-fullscreen-button {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 10024;
  min-height: 36px;
  padding: .45rem .85rem;
  border: 1px solid rgba(255,255,255,.28) !important;
  border-radius: var(--radius);
  background: rgba(255,255,255,.10) !important;
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(0,0,0,.24) !important;
  backdrop-filter: blur(10px) !important;
}

.editor-fullscreen-button:hover,
.editor-fullscreen-button:focus-visible {
  background: rgba(255,255,255,.18) !important;
  color: #fff !important;
}

.editor-viewer-wrap:fullscreen,
.editor-viewer-wrap.is-editor-fullscreen,
.editor-viewer-wrap.is-editor-fullscreen-fallback {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: #000 !important;
}

.editor-viewer-wrap:fullscreen::before,
.editor-viewer-wrap.is-editor-fullscreen::before,
.editor-viewer-wrap.is-editor-fullscreen-fallback::before,
.editor-viewer-wrap:fullscreen .mobile-preview-label,
.editor-viewer-wrap.is-editor-fullscreen .mobile-preview-label,
.editor-viewer-wrap.is-editor-fullscreen-fallback .mobile-preview-label {
  display: none !important;
}

.editor-viewer-wrap:fullscreen .editor-viewer,
.editor-viewer-wrap.is-editor-fullscreen .editor-viewer,
.editor-viewer-wrap.is-editor-fullscreen-fallback .editor-viewer {
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  border-radius: 0 !important;
}

.editor-viewer-wrap:fullscreen .new-hotspot-panel,
.editor-viewer-wrap.is-editor-fullscreen .new-hotspot-panel,
.editor-viewer-wrap.is-editor-fullscreen-fallback .new-hotspot-panel,
.editor-viewer-wrap:fullscreen .existing-hotspot-panel,
.editor-viewer-wrap.is-editor-fullscreen .existing-hotspot-panel,
.editor-viewer-wrap.is-editor-fullscreen-fallback .existing-hotspot-panel {
  max-height: calc(100vh - 32px) !important;
}

.editor-viewer-wrap:fullscreen .viewer-save-controls,
.editor-viewer-wrap.is-editor-fullscreen .viewer-save-controls,
.editor-viewer-wrap.is-editor-fullscreen-fallback .viewer-save-controls {
  position: absolute;
  left: 16px;
  bottom: 16px;
}

.editor-viewer-fallback-open {
  overflow: hidden;
}

.editor-viewer-wrap.is-editor-fullscreen-fallback {
  position: fixed !important;
  inset: 0 !important;
  z-index: 5000 !important;
}

@media (max-width: 820px) {
  .editor-fullscreen-button {
    right: 12px;
    bottom: 12px;
  }

  .editor-viewer-wrap:fullscreen .viewer-save-controls,
  .editor-viewer-wrap.is-editor-fullscreen .viewer-save-controls,
  .editor-viewer-wrap.is-editor-fullscreen-fallback .viewer-save-controls {
    position: absolute;
    left: 12px;
    bottom: 12px;
    width: auto;
    margin: 0;
  }
}

/* Dark landing account popup */
.landing-auth-card {
  background: linear-gradient(180deg, rgba(24, 28, 36, 0.98), rgba(13, 17, 24, 0.98));
  color: #f3f5f7;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.landing-auth-card .landing-eyebrow,
.landing-auth-card h2,
.landing-auth-card label,
.landing-auth-card .landing-auth-tab.is-active {
  color: #ffffff;
}

.landing-auth-card .landing-auth-intro,
.landing-auth-card .landing-auth-footnote {
  color: #c9d2dc;
}

.landing-auth-close {
  color: #d7e1e8;
}

.landing-auth-close:hover {
  color: #ffffff;
}

.landing-auth-tabs {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.landing-auth-tab {
  color: #c9d2dc;
}

.landing-auth-tab.is-active {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  box-shadow: none;
}

.landing-auth-form input,
.landing-auth-form textarea,
.landing-auth-form select {
  background: #ffffff;
  color: #111827;
  border-color: rgba(255, 255, 255, 0.55);
}

.landing-auth-form input::placeholder,
.landing-auth-form textarea::placeholder {
  color: #6b7280;
}

.landing-auth-form input:focus,
.landing-auth-form textarea:focus,
.landing-auth-form select:focus {
  outline: 2px solid rgba(217, 154, 43, 0.75);
  outline-offset: 2px;
}


.embed-appearance-settings {
  padding-top: 0.25rem;
}

.embed-appearance-settings h4 {
  margin: 0.9rem 0 0.55rem;
}

.hotspot-default-upload-grid {
  align-items: start;
}

.info-hotspot-icon-setting {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 0.75rem;
  align-items: center;
}

.info-hotspot-icon-setting img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  display: block;
}

@media (max-width: 760px) {
  .info-hotspot-icon-setting {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .info-hotspot-icon-setting img {
    width: 48px;
    height: 48px;
  }
}
