:root {
  color-scheme: dark;
  --bg: #070908;
  --bg-elevated: #0d100e;
  --panel: #111512;
  --panel-soft: #171c18;
  --text: #f7eedc;
  --text-strong: #fff7e8;
  --muted: #b7ad9c;
  --muted-soft: #817969;
  --line: rgba(247, 238, 220, 0.14);
  --line-strong: rgba(247, 238, 220, 0.28);
  --accent: #d9b46f;
  --accent-strong: #f0d39a;
  --green: #63df89;
  --danger: #ff8f78;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Noto Sans SC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

body::selection {
  background: rgba(217, 180, 111, 0.34);
}

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

button {
  color: inherit;
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 34%),
    linear-gradient(90deg, rgba(217, 180, 111, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, rgba(217, 180, 111, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: auto, 230px 230px, 230px 230px, auto;
}

.app-shell[data-route="project"] {
  min-height: 100dvh;
  overflow: hidden;
  background: #070908;
}

.app-shell[data-route="published"] {
  min-height: 100dvh;
  overflow: hidden;
  background: #070908;
}

.app-shell[data-route="project"] .topbar,
.app-shell[data-route="published"] .topbar {
  display: none;
}

.app-shell[data-route="project"] .screen,
.app-shell[data-route="published"] .screen {
  min-height: 100dvh;
}

.topbar {
  min-height: 66px;
  padding: 12px max(28px, env(safe-area-inset-right)) 12px max(28px, env(safe-area-inset-left));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(247, 238, 220, 0.12);
  background: rgba(7, 9, 8, 0.84);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}

.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.launch-app {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid rgba(247, 238, 220, 0.22);
  border-radius: 6px;
  background: rgba(247, 238, 220, 0.045);
  color: var(--text-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 720;
  line-height: 1;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.launch-app:hover,
.launch-app:focus-visible {
  border-color: rgba(217, 180, 111, 0.68);
  background: rgba(217, 180, 111, 0.12);
  transform: translateY(-1px);
}

.primary-link,
.secondary-link {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 680;
  line-height: 1;
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.secondary-link {
  border: 1px solid var(--line-strong);
  background: rgba(247, 238, 220, 0.035);
  color: var(--text);
}

.primary-link {
  border: 1px solid rgba(240, 211, 154, 0.78);
  background: linear-gradient(180deg, #f7deb0, #d7ab61);
  color: #181009;
  box-shadow: 0 14px 42px rgba(217, 180, 111, 0.18);
}

.secondary-link:hover {
  border-color: rgba(217, 180, 111, 0.7);
  background: rgba(217, 180, 111, 0.1);
}

.primary-link:hover,
.secondary-link:hover {
  transform: translateY(-1px);
}

.screen {
  width: 100%;
  min-width: 0;
  flex: 1;
}

.loading-state,
.error-state,
.empty-state {
  min-height: min(58vh, 520px);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  padding: 40px 22px;
  text-align: center;
  color: var(--muted);
}

.empty-state.compact {
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.pulse {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(217, 180, 111, 0.24);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: spin 880ms linear infinite;
}

.home-hero,
.home-section,
.tour-layout,
.creator-section {
  width: min(1360px, calc(100% - 56px));
  margin: 0 auto;
}

.home-hero {
  min-height: 760px;
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(520px, 1.14fr);
  gap: 58px;
  align-items: center;
  padding: 60px 0 62px;
  position: relative;
}

.home-hero.visual-only {
  min-height: 0;
  display: block;
  padding: 42px 0 58px;
}

.home-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 190px;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent, rgba(7, 9, 8, 0.9)),
    repeating-linear-gradient(90deg, rgba(217, 180, 111, 0.16) 0 1px, transparent 1px 84px);
  mask-image: linear-gradient(180deg, transparent, #000 40%, #000);
}

.section-heading h2,
.home-intro h1,
.tour-title,
.section-title {
  font-family: "Noto Serif SC", "Source Han Serif SC", SimSun, serif;
  color: var(--text-strong);
  font-weight: 600;
  letter-spacing: 0;
}

.home-feature {
  min-width: 0;
  position: relative;
  z-index: 2;
}

.home-intro {
  max-width: 780px;
  margin-bottom: 28px;
  position: relative;
  z-index: 2;
}

.home-intro h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: 58px;
  line-height: 1.46;
}

.home-subtitle {
  margin: 16px 0 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.72;
}

.home-stage {
  min-height: 0;
  padding-left: 268px;
  position: relative;
}

.stage-main {
  height: auto;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(247, 238, 220, 0.36);
  border-radius: 8px;
  background: #0a0c0b;
  box-shadow: var(--shadow);
  display: block;
  overflow: hidden;
  position: relative;
}

a.stage-main,
a.stage-mini,
a.tour-card {
  cursor: pointer;
}

.stage-main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 8, 0.04), rgba(7, 9, 8, 0.48));
  pointer-events: none;
}

.stage-main img,
.stage-mini img,
.tour-card .thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.stage-minis {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  padding-right: 10px;
  pointer-events: auto;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y proximity;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stage-mini {
  width: 100%;
  height: 142px;
  flex: 0 0 auto;
  margin: 0;
  border: 1px solid rgba(247, 238, 220, 0.34);
  border-radius: 7px;
  background: #090b0a;
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.34);
  display: block;
  overflow: hidden;
  position: relative;
  scroll-snap-align: start;
}

.stage-mini-title {
  position: absolute;
  left: 10px;
  bottom: 8px;
  z-index: 3;
  max-width: calc(100% - 20px);
  color: var(--text);
  font-size: 12px;
  line-height: 1.38;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.82);
}

.stage-title {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 22px;
  z-index: 3;
  display: grid;
  gap: 7px;
  color: var(--text-strong);
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.78);
}

.stage-title span {
  font-size: 30px;
  font-weight: 760;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.stage-title small {
  color: rgba(247, 238, 220, 0.82);
  font-size: 14px;
  font-weight: 560;
  line-height: 1.35;
}

.stage-mini::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent 42%, rgba(7, 9, 8, 0.72));
  pointer-events: none;
}

.stage-mini img {
  position: relative;
  z-index: 1;
}

.mini-2 {
  display: block;
}

.home-section {
  padding: 72px 0 84px;
  border-top: 1px solid rgba(247, 238, 220, 0.12);
}

.section-kicker-line {
  width: 78px;
  height: 2px;
  margin-bottom: 30px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

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

.section-heading h2,
.section-title {
  margin: 0;
  font-size: 42px;
  line-height: 1.22;
}

.work-summary {
  margin: 14px 0 26px;
  color: var(--muted);
  font-size: 14px;
}

.work-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 0.9fr;
  grid-auto-rows: 236px;
  gap: 10px;
}

.tour-card {
  min-width: 0;
  min-height: 0;
  border: 1px solid rgba(247, 238, 220, 0.15);
  border-radius: 8px;
  background: #0b0d0c;
  display: block;
  overflow: hidden;
  position: relative;
  color: var(--text);
}

.tour-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 38%, rgba(7, 9, 8, 0.88));
  pointer-events: none;
}

.tour-card:hover {
  border-color: rgba(217, 180, 111, 0.58);
}

.large-card {
  grid-row: span 2;
}

.tour-card-body {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  display: grid;
  gap: 6px;
}

.tour-card-title,
.scene-name {
  display: block;
  min-width: 0;
  font-weight: 760;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.tour-card-title {
  font-size: 17px;
}

.large-card .tour-card-title {
  font-size: 25px;
}

.tour-card-note,
.scene-note {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.58;
  overflow-wrap: anywhere;
}

.process-section {
  width: min(1360px, calc(100% - 56px));
  margin: 0 auto;
  padding: 72px 0 84px;
  border-top: 1px solid rgba(247, 238, 220, 0.12);
}

.process-grid {
  margin-top: 46px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.process-step {
  min-height: 260px;
  padding: 38px 30px 42px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  border-right: 1px solid var(--line);
  position: relative;
}

.process-step:last-child {
  border-right: 0;
}

.process-step::after {
  content: "";
  position: absolute;
  left: 30px;
  right: 30px;
  bottom: 32px;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 180, 111, 0.6), transparent);
}

.step-number {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 58px;
  line-height: 0.9;
}

.process-step h3 {
  margin: 4px 0 14px;
  color: var(--text-strong);
  font-size: 21px;
  line-height: 1.25;
}

.process-step p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.tour-layout {
  padding: 34px 0 80px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  align-items: start;
}

.tour-main,
.side-panel,
.home-section,
.creator-section {
  min-width: 0;
}

.viewer-wrap {
  width: 100%;
  aspect-ratio: 16 / 9;
  min-height: 350px;
  background: #090b0a;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.viewer,
.fallback-preview {
  position: absolute;
  inset: 0;
}

.fallback-preview {
  background-color: #090b0a;
  background-position: center;
  background-size: cover;
  transition: opacity 180ms ease;
}

.fallback-preview[hidden] {
  display: block;
  opacity: 0;
  pointer-events: none;
}

.viewer-status {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  padding: 8px 10px;
  border: 1px solid rgba(247, 238, 220, 0.14);
  border-radius: 6px;
  background: rgba(7, 9, 8, 0.78);
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  z-index: 5;
}

.project-fullscreen {
  width: 100%;
  height: 100dvh;
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  background: #070908;
}

.project-viewer-wrap {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.project-panorama-viewer {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
  background: #090b0a;
}

.project-panorama-viewer:active {
  cursor: grabbing;
}

.project-panorama-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.published-viewer-shell {
  width: 100%;
  height: 100dvh;
  min-height: 100vh;
  overflow: hidden;
  background: #070908;
}

.published-viewer-stage {
  width: 100%;
  height: 100%;
  position: relative;
  background: #090b0a;
}

.published-panorama-viewer,
.published-panorama-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #090b0a;
}

.published-panorama-viewer {
  z-index: 1;
}

.published-panorama-fallback {
  z-index: 0;
  object-fit: cover;
  transition: opacity 180ms ease;
}

.published-panorama-fallback[hidden] {
  display: block;
  opacity: 0;
  pointer-events: none;
}

.published-topbar,
.published-scene-rail,
.published-scene-message,
.published-status-pill {
  position: absolute;
  z-index: 6;
}

.published-topbar {
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(247, 238, 220, 0.18);
  border-radius: 8px;
  background: rgba(7, 9, 8, 0.72);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.published-status-pill {
  left: max(16px, env(safe-area-inset-left));
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 118px);
  max-width: min(360px, calc(100vw - 32px));
  padding: 8px 10px;
  border: 1px solid rgba(247, 238, 220, 0.14);
  border-radius: 6px;
  background: rgba(7, 9, 8, 0.78);
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.35;
}

.published-scene-message {
  left: max(16px, env(safe-area-inset-left));
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 158px);
  max-width: min(480px, calc(100vw - 32px));
  padding: 10px;
  border: 1px solid rgba(247, 238, 220, 0.14);
  border-radius: 8px;
  background: rgba(7, 9, 8, 0.82);
  color: var(--muted);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.published-scene-message[hidden] {
  display: none;
}

.published-scene-message span {
  min-width: 0;
}

.published-scene-retry {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(240, 211, 154, 0.72);
  border-radius: 6px;
  background: rgba(240, 211, 154, 0.12);
  color: var(--text-strong);
  cursor: pointer;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 780;
}

.published-scene-retry:hover,
.published-scene-retry:focus-visible {
  background: rgba(240, 211, 154, 0.2);
}

.published-scene-rail {
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  border: 1px solid rgba(247, 238, 220, 0.16);
  border-radius: 8px;
  background: rgba(7, 9, 8, 0.7);
  backdrop-filter: blur(18px);
  overflow: hidden;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.34);
}

.published-scene-list {
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  grid-auto-flow: column;
  grid-auto-columns: minmax(224px, 300px);
  cursor: grab;
  user-select: none;
}

.published-scene-list.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.published-scene-button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(247, 238, 220, 0.055);
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  scroll-snap-align: start;
}

.published-scene-button:hover {
  border-color: rgba(217, 180, 111, 0.48);
  background: var(--panel-soft);
}

.published-scene-button[aria-current="true"] {
  border-color: rgba(99, 223, 137, 0.68);
  background: rgba(99, 223, 137, 0.1);
}

.published-scene-button .thumb {
  width: 84px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: #090b0a;
}

.published-scene-meta {
  min-width: 0;
  display: block;
}

.project-overlay,
.project-scene-rail {
  position: absolute;
  z-index: 6;
}

.project-topbar {
  top: max(16px, env(safe-area-inset-top));
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(247, 238, 220, 0.18);
  border-radius: 8px;
  background: rgba(7, 9, 8, 0.72);
  backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.project-title-block {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 3px;
  text-align: center;
}

.project-title-block strong,
.project-title-block small {
  max-width: min(52vw, 680px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-title-block strong {
  color: var(--text-strong);
  font-size: 18px;
  line-height: 1.42;
}

.project-title-block small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.project-scene-rail {
  left: max(16px, env(safe-area-inset-left));
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  border: 1px solid rgba(247, 238, 220, 0.16);
  border-radius: 8px;
  background: rgba(7, 9, 8, 0.7);
  backdrop-filter: blur(18px);
  overflow: hidden;
  box-shadow: 0 18px 70px rgba(0, 0, 0, 0.34);
}

.project-scene-list {
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  touch-action: pan-x;
  -webkit-overflow-scrolling: touch;
  grid-auto-flow: column;
  grid-auto-columns: minmax(224px, 300px);
  cursor: grab;
  user-select: none;
}

.project-scene-list.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

.project-scene-list .scene-button {
  scroll-snap-align: start;
}

.project-fullscreen .viewer-status {
  left: max(16px, env(safe-area-inset-left));
  bottom: calc(max(16px, env(safe-area-inset-bottom)) + 118px);
}

.tour-copy {
  padding: 18px 0 0;
}

.tour-title {
  margin: 0;
  font-size: 42px;
  line-height: 1.12;
}

.tour-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.meta-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.meta-pill {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.side-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(17, 21, 18, 0.9);
  overflow: hidden;
}

.panel-header {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.scene-list {
  max-height: calc(100vh - 150px);
  overflow: auto;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.scene-button {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  background: rgba(247, 238, 220, 0.055);
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 8px;
  text-align: left;
  cursor: pointer;
}

.scene-button:hover {
  border-color: rgba(217, 180, 111, 0.48);
  background: var(--panel-soft);
}

.scene-button[aria-current="true"] {
  border-color: rgba(99, 223, 137, 0.68);
  background: rgba(99, 223, 137, 0.1);
}

.scene-button .thumb {
  width: 84px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: #090b0a;
}

.scene-note {
  margin-top: 5px;
}

.hotspot-strip {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hotspot-chip {
  border: 1px solid rgba(217, 180, 111, 0.52);
  border-radius: 999px;
  background: rgba(217, 180, 111, 0.12);
  padding: 7px 10px;
  cursor: pointer;
}

.creator-section {
  padding: 44px 0 82px;
}

.creator-grid {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  grid-auto-rows: 230px;
  gap: 10px;
}

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

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

@media (max-width: 1180px) {
  .home-hero {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 38px;
  }
}

@media (max-width: 920px) {
  .home-hero,
  .home-section,
  .process-section,
  .tour-layout,
  .creator-section {
    width: min(100% - 28px, 720px);
  }

  .home-hero {
    padding-top: 46px;
  }

  .home-intro h1 {
    font-size: 48px;
  }

  .home-stage,
  .stage-main {
    min-height: 0;
  }

  .home-stage {
    padding-left: 0;
  }

  .stage-main {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .stage-minis {
    position: static;
    margin-top: 10px;
    width: 100%;
    padding: 0 0 4px;
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }

  .stage-mini {
    position: relative;
    left: auto;
    top: auto;
    width: min(240px, 72vw);
    flex-basis: min(240px, 72vw);
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .work-grid {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: 220px;
  }

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

  .process-step {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .process-step:last-child {
    border-bottom: 0;
  }

  .large-card {
    grid-row: span 1;
    grid-column: span 2;
  }

  .tour-layout {
    display: block;
  }

  .side-panel {
    margin-top: 14px;
  }

  .scene-list {
    max-height: none;
    grid-auto-flow: column;
    grid-auto-columns: minmax(224px, 78vw);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    touch-action: pan-x;
    -webkit-overflow-scrolling: touch;
  }

  .scene-button {
    scroll-snap-align: start;
  }
}

@media (max-width: 620px) {
  .topbar {
    min-height: 58px;
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
    display: flex;
    justify-content: space-between;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .launch-app {
    min-height: 36px;
    padding: 0 12px;
    font-size: 13px;
  }

  .home-hero {
    padding: 34px 0 18px;
  }

  .home-intro {
    margin-bottom: 20px;
  }

  .home-intro h1 {
    font-size: 38px;
  }

  .home-subtitle {
    margin-top: 12px;
    font-size: 15px;
  }

  .stage-title {
    left: 14px;
    right: 14px;
    bottom: 14px;
    gap: 5px;
  }

  .stage-title span {
    font-size: 22px;
  }

  .stage-title small {
    font-size: 12px;
  }

  .home-section {
    padding: 22px 0 54px;
  }

  .process-section {
    padding: 52px 0 58px;
  }

  .section-kicker-line {
    margin-bottom: 10px;
  }

  .section-heading {
    display: block;
  }

  .stage-minis {
    display: flex;
  }

  .section-heading h2,
  .section-title {
    font-size: 32px;
  }

  .work-grid,
  .creator-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 230px;
  }

  .process-step {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 30px 0;
  }

  .process-step::after {
    left: 0;
    right: 0;
  }

  .large-card {
    grid-column: auto;
  }

  .viewer-wrap {
    min-height: 242px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    margin-left: calc((100vw - 100%) / -2);
    width: 100vw;
  }

  .tour-title {
    font-size: 31px;
  }
}
