:root {
  --ink: #17201f;
  --muted: #66736f;
  --line: #dbe3df;
  --paper: #f7f8f4;
  --panel: #ffffff;
  --green: #0f9f8a;
  --coral: #d94f3d;
  --blue: #5267d8;
  --yellow: #d79b22;
  --shadow: 0 18px 48px rgba(28, 36, 35, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(15, 159, 138, 0.08), transparent 360px),
    var(--paper);
  font-family:
    Inter, "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", Arial,
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.boot-screen {
  display: grid;
  place-items: center;
  min-height: 100vh;
  gap: 14px;
  text-align: center;
}

.boot-screen.error {
  color: var(--coral);
}

.site-shell {
  min-height: 100vh;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1520px;
  margin: 0 auto 16px;
  padding: 12px 4px;
}

.brand-lockup,
.top-actions,
.viewer-toolbar,
.tool-group,
.editor-title,
.target-row,
.view-hud,
.scene-strip,
.scene-strip div,
.hotspot-row,
.split-title,
.split-title span,
.button-row {
  display: flex;
  align-items: center;
}

.brand-lockup {
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: white;
  background: var(--ink);
  border-radius: 8px;
  font-weight: 900;
}

.brand-lockup p,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-lockup h1,
.project-heading h2,
.viewer-toolbar h2,
.editor-title h2,
.section-heading h2,
.case-card h3,
.selected-editor h4 {
  margin: 0;
  letter-spacing: 0;
}

.brand-lockup h1 {
  font-size: 24px;
  font-weight: 850;
}

.top-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.ghost-button,
.solid-button,
.small-button,
.icon-button,
.round-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.ghost-button {
  padding: 0 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.solid-button {
  padding: 0 16px;
  color: white;
  background: var(--coral);
  box-shadow: 0 10px 24px rgba(217, 79, 61, 0.25);
}

.small-button {
  min-width: 82px;
  padding: 0 10px;
  color: var(--ink);
  background: #eef4f1;
}

.small-button.dark,
.round-action {
  color: white;
  background: var(--ink);
}

.round-action {
  width: 40px;
  min-width: 40px;
  padding: 0;
  font-size: 24px;
}

.ghost-button:hover,
.solid-button:hover,
.small-button:hover,
.icon-button:hover,
.room-item:hover,
.round-action:hover {
  transform: translateY(-1px);
}

.token-input {
  width: 128px;
  height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.small-button.danger {
  color: white;
  background: var(--coral);
}

.portal-shell {
  width: min(1180px, calc(100vw - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 42px;
}

.portal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 18px;
}

.portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding: 34px 0 28px;
  border-top: 1px solid rgba(23, 32, 31, 0.1);
  border-bottom: 1px solid rgba(23, 32, 31, 0.1);
}

.portal-hero h2 {
  max-width: 720px;
  margin: 6px 0 10px;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: 0;
}

.portal-hero p,
.section-heading p {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.portal-summary {
  display: grid;
  place-items: center;
  width: 132px;
  aspect-ratio: 1;
  color: white;
  background: var(--ink);
  border-radius: 8px;
}

.portal-summary strong {
  font-size: 42px;
  line-height: 1;
}

.project-gallery {
  padding: 28px 0 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.section-heading h2 {
  font-size: 24px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.project-card {
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(28, 36, 35, 0.08);
}

.project-card-link {
  display: grid;
  color: inherit;
}

.project-card-cover {
  display: block;
  aspect-ratio: 16 / 9;
  background-color: #dfe8e4;
  background-position: center;
  background-size: cover;
}

.project-card-body {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.project-card-body strong {
  font-size: 18px;
  line-height: 1.35;
}

.project-card-body small,
.project-card-meta {
  color: var(--muted);
  line-height: 1.5;
}

.project-status {
  width: fit-content;
  padding: 3px 8px;
  color: #fff;
  background: var(--green);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.project-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
}

.admin-board {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.create-project-panel {
  display: grid;
  gap: 16px;
  padding: 18px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(28, 36, 35, 0.08);
}

.create-project-grid {
  display: grid;
  gap: 10px;
}

.create-project-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.create-project-grid input {
  min-width: 0;
  height: 42px;
  padding: 0 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.project-empty {
  padding: 22px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.product-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 300px) minmax(520px, 1fr) minmax(300px, 360px);
  gap: 16px;
  max-width: 1520px;
  min-height: 720px;
  margin: 0 auto;
}

.product-workspace.is-view-only {
  grid-template-columns: minmax(250px, 300px) minmax(520px, 1fr);
}

.project-panel,
.editor-panel {
  align-self: stretch;
}

.project-panel,
.editor-card,
.viewer-stage,
.case-card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.project-panel,
.viewer-stage {
  overflow: hidden;
  border-radius: 8px;
}

.project-panel {
  padding: 18px;
}

.project-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.project-heading h2,
.viewer-toolbar h2,
.section-heading h2 {
  font-size: 22px;
  font-weight: 820;
}

.project-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.floor-summary {
  display: grid;
  grid-template-columns: 1fr 86px;
  gap: 10px;
  margin: 16px 0;
}

.floor-summary div {
  display: grid;
  gap: 4px;
  min-height: 72px;
  padding: 14px;
  background: #eef4f1;
  border-radius: 8px;
}

.floor-summary strong {
  font-size: 18px;
}

.floor-summary span,
.room-copy small,
.upload-drop small,
.case-card p,
.helper,
label {
  color: var(--muted);
  font-size: 13px;
}

.project-fields {
  display: grid;
  gap: 9px;
  margin-bottom: 14px;
  padding: 12px;
  background: #fbfcfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

label {
  display: grid;
  gap: 6px;
  font-weight: 750;
}

input,
select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  color: var(--ink);
  background: #fbfcfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.room-list {
  display: grid;
  gap: 10px;
}

.room-item {
  display: grid;
  grid-template-columns: 58px 1fr 18px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 8px;
  color: var(--ink);
  text-align: left;
  background: #fbfcfa;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.room-item.is-active {
  background: #e7f5f1;
  border-color: rgba(15, 159, 138, 0.42);
}

.room-thumb {
  width: 58px;
  height: 54px;
  background: #dbe3df center / cover;
  border-radius: 6px;
}

.room-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.room-copy strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chevron {
  color: var(--muted);
  font-size: 22px;
}

.viewer-stage {
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr) auto;
}

.viewer-toolbar {
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--line);
}

.tool-group {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button {
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: #eef4f1;
}

.panorama-shell {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  isolation: isolate;
  background: #17201f;
}

.panorama-frame {
  position: absolute;
  inset: 0;
  min-height: 100%;
  background: #17201f;
}

.view-hud {
  position: absolute;
  z-index: 12;
  right: 18px;
  bottom: 18px;
  left: 18px;
  justify-content: space-between;
  gap: 12px;
  color: white;
  pointer-events: none;
}

.view-hud span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 10px;
  background: rgba(13, 20, 24, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  backdrop-filter: blur(12px);
}

.pano-hotspot-anchor.pnlm-hotspot-base {
  width: auto;
  height: auto;
  background: transparent;
  border: 0;
  z-index: 40 !important;
}

.pano-hotspot-anchor.pnlm-hotspot-draft-anchor {
  z-index: 45 !important;
}

.pano-hotspot {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 150px;
  min-height: 36px;
  padding: 0 11px;
  color: white;
  white-space: nowrap;
  background: rgba(217, 79, 61, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(12, 18, 18, 0.28);
  cursor: pointer;
}

.pano-hotspot::after {
  position: absolute;
  inset: -8px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  content: "";
}

.pano-hotspot span {
  overflow: hidden;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
}

.scene-strip {
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
  padding: 14px 18px;
  background: #17201f;
}

.scene-strip > span {
  color: #a8b5b1;
  font-size: 13px;
  font-weight: 800;
}

.scene-strip div {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.scene-strip button {
  min-height: 34px;
  padding: 0 12px;
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  cursor: pointer;
}

.scene-strip em {
  color: #a8b5b1;
  font-size: 13px;
  font-style: normal;
}

.editor-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.editor-card {
  padding: 16px;
  border-radius: 8px;
}

.editor-title {
  gap: 9px;
  margin-bottom: 14px;
}

.editor-title h2 {
  font-size: 16px;
  font-weight: 820;
}

.split-title {
  justify-content: space-between;
}

.split-title span {
  gap: 9px;
}

.panel-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  color: white;
  background: var(--green);
  border-radius: 6px;
  font-size: 14px;
}

.danger-text {
  min-height: 34px;
  padding: 0 10px;
  color: var(--coral);
  background: #fff1ef;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.upload-drop {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(15, 159, 138, 0.14), rgba(82, 103, 216, 0.1)),
    #f9fbf8;
  border: 1px dashed rgba(15, 159, 138, 0.5);
  border-radius: 8px;
  cursor: pointer;
}

.upload-drop input {
  display: none;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: white;
  background: var(--green);
  border-radius: 8px;
  font-size: 22px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.button-row {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

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

.view-metrics span {
  min-height: 38px;
  padding: 10px 8px;
  color: var(--ink);
  text-align: center;
  background: #eef4f1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 780;
}

.helper {
  margin: 10px 0 0;
  line-height: 1.45;
}

.target-row {
  display: grid;
  grid-template-columns: 1fr 1fr 82px;
  gap: 8px;
}

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

.hotspot-row {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 8px;
  align-items: center;
  min-height: 48px;
  padding: 7px;
  background: #f5f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hotspot-row.selected {
  border-color: rgba(15, 159, 138, 0.54);
}

.hotspot-row > button:first-child {
  display: grid;
  gap: 3px;
  padding: 0 6px;
  color: var(--ink);
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.hotspot-row strong,
.hotspot-row small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hotspot-row small {
  color: var(--muted);
}

.danger-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--coral);
  background: white;
  border: 0;
  border-radius: 6px;
  font-size: 22px;
  cursor: pointer;
}

.selected-editor {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  background: #eef4f1;
  border-radius: 8px;
}

.selected-editor h4 {
  font-size: 15px;
}

.view-range-card {
  gap: 14px;
}

.initial-view-panel {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px;
  background: #f5f7f4;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.initial-view-image {
  display: block;
  width: 112px;
  height: 66px;
  background: #dbe3df center / cover;
  border-radius: 6px;
}

.initial-view-panel div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.initial-view-panel small,
.range-fields span {
  color: var(--muted);
  font-size: 12px;
}

.range-block {
  display: grid;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.range-block > strong {
  font-size: 14px;
}

.range-fields {
  display: grid;
  gap: 8px;
}

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

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

.range-fields label {
  gap: 5px;
  text-align: center;
}

.range-fields input {
  text-align: center;
}

.setting-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  color: var(--ink);
  border-top: 1px solid var(--line);
}

.setting-check input {
  width: 18px;
  min-width: 18px;
  height: 18px;
  padding: 0;
}

.number-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.share-url {
  width: 100%;
}

.portfolio-band {
  max-width: 1520px;
  margin: 18px auto 0;
  padding: 20px 0 34px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-heading strong {
  color: var(--green);
  font-size: 14px;
}

.case-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.case-card {
  display: grid;
  grid-template-columns: 116px 1fr auto;
  align-items: center;
  gap: 16px;
  min-height: 128px;
  padding: 14px;
  border-radius: 8px;
}

.case-visual {
  height: 96px;
  background: #dbe3df center / cover;
  border-radius: 8px;
}

.case-card h3 {
  font-size: 17px;
  font-weight: 820;
}

.case-card p {
  margin: 5px 0 0;
}

.case-card > strong {
  color: var(--green);
  font-size: 14px;
  white-space: nowrap;
}

.notice {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: min(420px, calc(100vw - 36px));
  min-height: 42px;
  padding: 12px 14px;
  color: white;
  background: rgba(23, 32, 31, 0.92);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.notice:empty {
  display: none;
}

@media (max-width: 1180px) {
  .product-workspace {
    grid-template-columns: 270px minmax(460px, 1fr);
  }

  .editor-panel {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .product-workspace.is-view-only {
    grid-template-columns: 270px minmax(460px, 1fr);
  }
}

@media (max-width: 860px) {
  .site-shell {
    padding: 12px;
  }

  .topbar,
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    justify-content: stretch;
  }

  .ghost-button,
  .solid-button,
  .token-input {
    flex: 1;
  }

  .product-workspace,
  .product-workspace.is-view-only,
  .editor-panel,
  .case-grid {
    grid-template-columns: 1fr;
  }

  .product-workspace {
    min-height: 0;
  }

  .viewer-stage {
    grid-template-rows: auto 420px auto;
  }

  .viewer-toolbar,
  .scene-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .scene-strip div,
  .tool-group {
    justify-content: flex-start;
  }

  .case-card {
    grid-template-columns: 96px 1fr;
  }

  .case-card > strong {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .brand-lockup h1 {
    font-size: 19px;
  }

  .brand-lockup p,
  .eyebrow {
    font-size: 11px;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .project-heading h2,
  .viewer-toolbar h2,
  .section-heading h2 {
    font-size: 19px;
  }

  .floor-summary,
  .form-grid,
  .target-row,
  .view-metrics {
    grid-template-columns: 1fr;
  }

  .viewer-stage {
    grid-template-rows: auto 360px auto;
  }

  .viewer-toolbar {
    gap: 12px;
    padding: 14px;
  }

  .tool-group {
    width: 100%;
  }

  .view-hud {
    align-items: flex-start;
    flex-direction: column;
  }

  .initial-view-panel,
  .range-fields.three,
  .range-fields.two {
    grid-template-columns: 1fr;
  }
}

/* Functional tour controls: all-room scene selector and arrow hotspots. */
.scene-selector {
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 118px;
  padding: 12px 18px;
  color: white;
  background: rgba(23, 32, 31, 0.78);
  backdrop-filter: blur(10px);
}

.viewer-stage .scene-selector {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.tour-view-shell .scene-selector {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  pointer-events: none;
}

.scene-selector-label {
  display: grid;
  place-items: center;
  gap: 7px;
  min-width: 84px;
  color: white;
  font-size: 12px;
}

.grid-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--coral);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  font-size: 21px;
}

.scene-selector-track {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  overflow-x: auto;
  padding: 2px 2px 8px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
}

.scene-selector-track.is-dragging {
  cursor: grabbing;
}

.tour-view-shell .scene-selector-track {
  pointer-events: auto;
}

.scene-thumb {
  display: grid;
  gap: 5px;
  min-width: 86px;
  width: 86px;
  color: white;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.tour-view-shell .scene-selector-label,
.tour-view-shell .scene-thumb {
  pointer-events: auto;
}

.scene-image {
  display: block;
  width: 86px;
  height: 58px;
  object-fit: cover;
  background: #dbe3df center / cover;
  border: 3px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.scene-thumb.active .scene-image {
  border-color: #f6b332;
}

.scene-thumb span:last-child {
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.45);
}

.tour-view-shell {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  color: white;
  background: #101514;
}

.tour-panorama {
  position: absolute;
  inset: 0;
  height: 100% !important;
  min-height: 100%;
}

.tour-panorama .pnlm-ui {
  pointer-events: auto;
}

.tour-panorama .pnlm-render-container,
.panorama-frame .pnlm-render-container {
  z-index: 2;
  pointer-events: none;
}

.tour-panorama .pnlm-hotspot-base,
.panorama-frame .pnlm-hotspot-base {
  pointer-events: auto;
}

.tour-panorama canvas,
.panorama-frame canvas {
  pointer-events: none;
}

.tour-logo {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 30;
  display: grid;
  gap: 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.tour-logo strong {
  font-size: 18px;
}

.tour-logo span {
  font-size: 13px;
}

.tour-actions {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 32;
  display: flex;
  gap: 14px;
}

.tour-actions button {
  display: grid;
  place-items: center;
  min-width: 54px;
  min-height: 54px;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  cursor: pointer;
}

.pano-hotspot-anchor.pnlm-hotspot-base {
  width: auto;
  height: auto;
  background: transparent;
  border: 0;
  z-index: 40 !important;
}

.pano-hotspot {
  min-width: 76px;
  min-height: 58px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.pano-hotspot::after {
  display: none;
}

.pano-arrow-hotspot {
  display: grid;
  place-items: center;
  gap: 2px;
  color: white;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.pano-hotspot.is-draft {
  filter: drop-shadow(0 0 10px rgba(244, 63, 94, 0.55));
}

.pano-hotspot.is-draft .pano-arrow-hotspot {
  cursor: default;
}

.pano-hotspot.is-draft .hotspot-label {
  background: rgba(244, 63, 94, 0.9);
}

.pano-hotspot.is-draft .hotspot-arrow {
  color: #fff;
  text-shadow:
    0 2px 2px rgba(0, 0, 0, 0.5),
    0 0 10px rgba(244, 63, 94, 0.8);
}

.hotspot-label {
  max-width: 96px;
  padding: 4px 9px;
  overflow: hidden;
  color: white;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(53, 53, 53, 0.76);
  border-radius: 5px;
  font-size: 13px;
  font-weight: 760;
}

.hotspot-arrow {
  color: white;
  font-size: 38px;
  font-weight: 900;
  line-height: 0.9;
  text-shadow:
    0 2px 2px rgba(0, 0, 0, 0.42),
    0 0 2px rgba(0, 0, 0, 0.6);
}

.target-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.placement-status {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  padding: 10px;
  color: #dce6e3;
  background: rgba(238, 244, 241, 0.08);
  border: 1px dashed rgba(220, 230, 227, 0.32);
  border-radius: 8px;
}

.placement-status.is-ready {
  color: white;
  background: rgba(47, 115, 255, 0.12);
  border-color: rgba(47, 115, 255, 0.58);
}

.placement-status strong,
.placement-status small {
  display: block;
}

.placement-status small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

.compact-row {
  flex-wrap: wrap;
  gap: 8px;
}

.wide-action {
  width: 100%;
  min-height: 40px;
  margin-top: 10px;
  color: white;
  background: var(--blue);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.empty-state {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

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

  .scene-selector-label {
    display: flex;
    min-width: 0;
  }

  .tour-actions {
    display: none;
  }
}

/* 720-style management workspace: full screen with a fixed 2:1 editor viewport. */
.edit-shell {
  --left-panel-width: 260px;
  --right-panel-width: 300px;
  --stage-x-padding: 32px;
  display: grid;
  grid-template-rows: 40px minmax(0, 1fr);
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  color: #f4f6f5;
  background: #282828;
}

.edit-shell .topbar {
  max-width: none;
  height: 40px;
  margin: 0;
  padding: 0 14px;
  color: white;
  background: #303030;
  border-bottom: 1px solid #111;
}

.edit-shell .brand-mark {
  width: 28px;
  height: 28px;
  background: #1e1e1e;
  font-size: 12px;
}

.edit-shell .brand-lockup p {
  display: none;
}

.edit-shell .brand-lockup h1 {
  font-size: 15px;
  font-weight: 850;
}

.edit-shell .ghost-button,
.edit-shell .solid-button,
.edit-shell .token-input {
  min-height: 30px;
  height: 30px;
  color: white;
  background: #3a3a3a;
  border-color: #555;
  box-shadow: none;
}

.edit-shell .solid-button {
  background: #2f73ff;
}

.edit-shell .product-workspace {
  grid-template-columns: var(--left-panel-width) minmax(640px, 1fr) var(--right-panel-width);
  gap: 0;
  max-width: none;
  height: calc(100vh - 40px);
  min-height: 0;
  margin: 0;
  background: #242424;
}

.edit-shell .project-panel,
.edit-shell .viewer-stage,
.edit-shell .editor-panel,
.edit-shell .editor-card {
  color: #f4f6f5;
  background: #2f2f2f;
  border-color: #151515;
  border-radius: 0;
  box-shadow: none;
}

.edit-shell .project-panel,
.edit-shell .editor-panel {
  height: 100%;
  overflow-y: auto;
}

.edit-shell .viewer-stage {
  display: grid;
  grid-template-rows: 48px minmax(0, 1fr) 118px;
  padding: 0 16px;
  background: #252525;
}

.edit-shell .viewer-toolbar {
  min-height: 48px;
  padding: 0;
  color: white;
  background: transparent;
  border-bottom: 0;
}

.edit-shell .viewer-toolbar h2 {
  font-size: 16px;
}

.edit-shell .icon-button,
.edit-shell .small-button,
.edit-shell .wide-action {
  color: white;
  background: #2f73ff;
}

.edit-shell .panorama-shell.edit-panorama {
  align-self: center;
  justify-self: start;
  width: min(100%, calc(100vw - var(--left-panel-width) - var(--right-panel-width) - var(--stage-x-padding)));
  max-width: 100%;
  height: auto;
  max-height: none;
  min-height: 0;
  aspect-ratio: 2 / 1;
  border: 1px solid #111;
  background: #111;
}

.edit-shell .panorama-frame {
  min-height: 0;
}

.initial-view-target {
  position: absolute;
  inset: 15% 29%;
  z-index: 24;
  display: grid;
  place-items: center;
  pointer-events: none;
  border: 1px dotted rgba(255, 255, 255, 0.5);
}

.initial-view-target .corner {
  position: absolute;
  width: 46px;
  height: 46px;
  border-color: white;
  border-style: solid;
}

.initial-view-target .tl {
  top: -1px;
  left: -1px;
  border-width: 3px 0 0 3px;
}

.initial-view-target .tr {
  top: -1px;
  right: -1px;
  border-width: 3px 3px 0 0;
}

.initial-view-target .bl {
  bottom: -1px;
  left: -1px;
  border-width: 0 0 3px 3px;
}

.initial-view-target .br {
  right: -1px;
  bottom: -1px;
  border-width: 0 3px 3px 0;
}

.set-view-button {
  min-width: 200px;
  min-height: 34px;
  padding: 0 16px;
  color: white;
  background: #2f73ff;
  border-radius: 4px;
  cursor: pointer;
  pointer-events: auto;
  font-size: 13px;
  font-weight: 800;
}

.fixed-range-values {
  display: grid;
  gap: 8px;
}

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

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

.fixed-range-values span {
  display: grid;
  gap: 4px;
  text-align: center;
}

.fixed-range-values strong {
  min-height: 28px;
  padding: 5px 4px;
  color: #dfe7e5;
  background: #262626;
  border: 1px solid #444;
  font-size: 13px;
}

.fixed-range-values small {
  color: #aeb7b4;
  font-size: 12px;
}

.fixed-check {
  width: 16px;
  height: 16px;
  background: #f4f4f4;
  border: 1px solid #d8d8d8;
}

@media (max-width: 860px) {
  .portal-topbar,
  .portal-hero,
  .section-heading,
  .admin-board {
    grid-template-columns: 1fr;
  }

  .portal-topbar,
  .section-heading {
    align-items: stretch;
  }

  .portal-topbar {
    flex-direction: column;
  }

  .portal-hero h2 {
    font-size: 30px;
  }

  .portal-summary {
    width: 100%;
    aspect-ratio: auto;
    min-height: 86px;
  }
}

@media (max-width: 560px) {
  .portal-shell {
    width: min(100vw - 20px, 460px);
    padding-top: 10px;
  }

  .portal-hero {
    padding: 22px 0;
  }

  .portal-hero h2 {
    font-size: 26px;
  }

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

  .project-card-actions .small-button {
    flex: 1;
  }
}
