:root {
  color-scheme: dark;
  --bg: #06070a;
  --glass: rgba(13, 16, 23, 0.66);
  --glass-strong: rgba(20, 24, 33, 0.82);
  --line: rgba(255, 255, 255, 0.12);
  --line-bright: rgba(255, 255, 255, 0.22);
  --text: #f5f7fb;
  --muted: #a7afbd;
  --soft: #d8dee8;
  --accent: #8ee8df;
  --accent-2: #d6b56d;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  font-family: 'Inter', sans-serif;
}

/* Landing final overrides: keep legacy home styles from shrinking the new page. */
body.route-home .landing-page {
  width: min(100% - 36px, 1360px);
  max-width: 1360px;
  padding-top: 24px;
}

body.route-home .landing-hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(520px, 1.22fr);
  min-height: calc(100vh - 112px);
}

body.route-home .landing-hero-copy h1 {
  max-width: 11ch;
  font-size: clamp(46px, 5.7vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
}

body.route-home .landing-hero-copy p {
  max-width: 560px;
  font-size: clamp(16px, 1.55vw, 20px);
}

@media (max-width: 1120px) {
  body.route-home .landing-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.route-home .landing-page {
    width: min(100% - 28px, 1360px);
  }

  body.route-home .landing-hero {
    min-height: auto;
  }

  body.route-home .landing-hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(42px, 13vw, 62px);
  }
}

/* PREMIUM SAAS LANDING PAGE */
body.route-home {
  background: radial-gradient(circle at 50% 8%, rgba(0,212,255,0.15), transparent 34%), linear-gradient(180deg, #050b17 0%, #06101c 48%, #02060c 100%);
}

.landing-page {
  width: min(100% - 36px, 1360px);
  max-width: 1360px;
  padding-top: 24px;
}

.landing-page .glass-panel,
.landing-video-frame,
.proof-strip article,
.industry-grid article,
.showcase-gallery article,
.workflow-line article,
.faq-list details {
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(8,19,36,0.82), rgba(6,13,24,0.68));
  box-shadow: 0 20px 70px rgba(0,0,0,0.32), inset 0 1px 0 rgba(255,255,255,0.06);
  backdrop-filter: blur(18px);
}

.landing-nav {
  position: sticky;
  top: 16px;
  z-index: 50;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 14px 20px;
  border-radius: 20px;
}

.landing-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.landing-logo img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.landing-page .nav-links {
  justify-content: center;
  gap: clamp(16px, 3vw, 38px);
}

.landing-page .nav-links a {
  color: #b8c4d3;
  font-size: 14px;
}

.landing-page .nav-links a:hover {
  color: #61f4e7;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.landing-login {
  color: #f4fbff;
  min-height: 42px;
}

.landing-nav-cta {
  min-height: 44px;
  padding-inline: 22px;
  box-shadow: 0 0 28px rgba(0,212,255,0.24);
}

.landing-hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(520px, 1.22fr);
  align-items: center;
  gap: clamp(34px, 5vw, 76px);
  min-height: calc(100vh - 112px);
  padding: clamp(58px, 7vw, 110px) 0 42px;
}

.landing-hero-copy {
  max-width: 620px;
}

.landing-hero-copy .badge {
  border-color: rgba(97,244,231,0.35);
  color: #dffdfa;
  background: rgba(8,19,36,0.62);
}

.landing-hero-copy h1 {
  max-width: 11ch;
  margin: 0;
  font-size: clamp(46px, 5.7vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
}

.landing-hero-copy h1 span {
  color: #00d4ff;
  text-shadow: 0 0 34px rgba(0,212,255,0.28);
}

.landing-hero-copy p {
  max-width: 560px;
  color: #b8c4d3;
  font-size: clamp(16px, 1.55vw, 20px);
  line-height: 1.65;
}

.watch-demo-button {
  gap: 10px;
  min-height: 54px;
  padding-inline: 22px;
}

.watch-demo-button span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.24);
  border-radius: 999px;
  color: transparent;
  font-size: 0;
}

.watch-demo-button span::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 2px;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid #fff;
}

.creator-proof {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #b8c4d3;
  font-size: 14px;
}

.creator-proof p {
  margin: 0;
  font-size: 14px;
}

.creator-proof strong {
  color: #61f4e7;
}

.avatar-stack {
  display: flex;
}

.avatar-stack span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-right: -9px;
  border: 2px solid #07111e;
  border-radius: 999px;
  background: linear-gradient(135deg, #61f4e7, #d8c28a);
  color: #041018;
  font-size: 12px;
  font-weight: 900;
}

.landing-video-frame {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border-radius: 26px;
  background: #081324;
  box-shadow: 0 0 0 1px rgba(97,244,231,0.16), 0 40px 120px rgba(0,212,255,0.22);
}

.landing-video-frame video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: clamp(420px, 48vw, 680px);
  object-fit: cover;
}

.video-topbar {
  position: absolute;
  inset: 14px 14px auto;
  display: flex;
  gap: 8px;
  height: 32px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(3,9,17,0.62);
}

.video-topbar span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.38);
}

.floating-chip {
  position: absolute;
  padding: 10px 13px;
  border: 1px solid rgba(97,244,231,0.22);
  border-radius: 999px;
  background: rgba(5,11,23,0.74);
  color: #eafffc;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 12px 34px rgba(0,0,0,0.28);
}

.chip-export { left: 24px; bottom: 26px; }
.chip-render { right: 28px; top: 72px; }
.chip-hdr { right: 34px; bottom: 34px; }
.chip-alpha { left: 26px; top: 74px; }

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

.proof-strip article {
  display: grid;
  gap: 6px;
  padding: 22px;
  border-radius: 18px;
}

.proof-strip strong {
  color: #61f4e7;
  font-size: 24px;
}

.proof-strip span,
.workflow-line p,
.comparison-grid p,
.faq-list p,
.final-cta p {
  color: #b8c4d3;
}

.landing-page .home-section {
  padding: clamp(54px, 7vw, 92px) 0 0;
}

.landing-page .section-heading {
  max-width: 840px;
  margin: 0 auto 28px;
  color: #fff;
  text-align: center;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.08;
}

.industry-grid,
.showcase-gallery,
.workflow-line,
.landing-pricing,
.landing-features {
  display: grid;
  gap: 16px;
}

.industry-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.landing-features { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.showcase-gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.workflow-line { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.landing-pricing { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.industry-grid article {
  min-height: 96px;
  display: grid;
  place-items: center;
  padding: 18px 12px;
  border-radius: 16px;
  color: #eaf6fb;
  font-weight: 700;
  text-align: center;
}

.landing-page .feature-card,
.workflow-line article,
.pricing-card {
  border-radius: 16px;
}

.landing-page .feature-card {
  min-height: 190px;
  padding: 26px;
}

.landing-page .feature-icon {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(97,244,231,0.28);
  border-radius: 14px;
  background: rgba(0,212,255,0.09);
  color: #61f4e7;
  font-size: 13px;
  font-weight: 900;
}

.industry-grid article,
.landing-page .feature-card,
.showcase-gallery article {
  transition: transform 180ms ease, border-color 180ms ease;
}

.industry-grid article:hover,
.landing-page .feature-card:hover,
.showcase-gallery article:hover {
  transform: translateY(-4px);
  border-color: rgba(97,244,231,0.32);
}

.showcase-gallery article {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 34%, rgba(97,244,231,0.34), transparent 24%), linear-gradient(145deg, rgba(216,194,138,0.18), rgba(0,212,255,0.08) 48%, rgba(8,19,36,0.92));
}

.showcase-gallery article::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 54px;
  width: 72px;
  height: 142px;
  border-radius: 22px 22px 12px 12px;
  background: linear-gradient(180deg, #f7f2dc, #26c8c2 45%, #06202a);
  transform: translateX(-50%);
  box-shadow: 0 36px 80px rgba(0,0,0,0.38);
}

.showcase-gallery article span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.workflow-line article {
  min-height: 180px;
  padding: 24px;
}

.workflow-line strong {
  color: #61f4e7;
  font-size: 28px;
}

.workflow-line h3,
.comparison-card h2,
.comparison-grid h3,
.final-cta h2 {
  color: #fff;
}

.why-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.85fr);
  gap: 22px;
}

.comparison-card,
.software-preview,
.studio-mockup,
.final-cta {
  border-radius: 22px;
  padding: clamp(24px, 3vw, 38px);
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.comparison-grid p {
  margin: 10px 0;
  padding-left: 18px;
  position: relative;
}

.comparison-grid p::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #61f4e7;
}

.software-preview {
  overflow: hidden;
  padding: 10px;
}

.software-preview video {
  width: 100%;
  height: 100%;
  min-height: 330px;
  object-fit: cover;
  border-radius: 16px;
}

.studio-mockup {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) 220px;
  gap: 14px;
  min-height: 420px;
}

.mock-sidebar,
.mock-inspector {
  display: grid;
  align-content: start;
  gap: 12px;
}

.mock-sidebar span,
.mock-inspector span {
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  color: #cbd7e3;
  background: rgba(255,255,255,0.04);
}

.mock-viewport {
  display: grid;
  place-items: center;
  border: 1px solid rgba(97,244,231,0.18);
  border-radius: 18px;
  background: linear-gradient(rgba(97,244,231,0.06) 1px, transparent 1px), linear-gradient(90deg, rgba(97,244,231,0.06) 1px, transparent 1px), radial-gradient(circle at center, rgba(0,212,255,0.18), rgba(4,10,18,0.82) 58%);
  background-size: 42px 42px, 42px 42px, auto;
}

.mock-product {
  width: 110px;
  height: 230px;
  border-radius: 30px 30px 18px 18px;
  background: linear-gradient(180deg, #e9f8f4, #26c8c2 45%, #06202a);
  box-shadow: 0 36px 90px rgba(0,212,255,0.24);
}

.mock-inspector button {
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #61f4e7, #31c9bd);
  color: #02110f;
  font-weight: 900;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
}

.faq-list details {
  border-radius: 14px;
  padding: 18px 20px;
}

.faq-list summary {
  cursor: pointer;
  color: #fff;
  font-weight: 800;
}

.final-cta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 28px;
  align-items: center;
  margin: clamp(58px, 8vw, 96px) 0 0;
}

.final-cta h2 {
  max-width: 680px;
  margin: 0 0 14px;
  font-size: clamp(32px, 4vw, 58px);
  line-height: 1.04;
}

.final-cta img {
  width: min(100%, 180px);
  justify-self: center;
  filter: drop-shadow(0 0 38px rgba(97,244,231,0.34));
}

.landing-footer {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  padding: 48px 0 30px;
  color: #b8c4d3;
}

.landing-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  justify-content: flex-end;
}

.landing-footer a {
  color: #b8c4d3;
  text-decoration: none;
}

.landing-footer small {
  grid-column: 1 / -1;
  color: #6f7d8b;
}

@media (max-width: 1120px) {
  .landing-nav { grid-template-columns: 1fr auto; }
  .landing-page .nav-links { display: none; }
  .landing-hero,
  .why-section { grid-template-columns: 1fr; }
  .proof-strip,
  .landing-features,
  .workflow-line,
  .landing-pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .industry-grid,
  .showcase-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .studio-mockup { grid-template-columns: 150px minmax(0, 1fr); }
  .mock-inspector { grid-column: 1 / -1; grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .landing-page { width: min(100% - 28px, 1360px); padding-top: 12px; }
  .landing-nav { top: 10px; grid-template-columns: 1fr; gap: 12px; }
  .landing-nav-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .landing-hero { min-height: auto; padding-top: 44px; }
  .landing-hero-copy { align-items: stretch; }
  .landing-hero-copy h1 { max-width: 11ch; font-size: clamp(42px, 13vw, 62px); }
  .landing-video-frame,
  .landing-video-frame video { min-height: 320px; }
  .floating-chip { display: none; }
  .proof-strip,
  .industry-grid,
  .landing-features,
  .showcase-gallery,
  .workflow-line,
  .comparison-grid,
  .landing-pricing,
  .studio-mockup,
  .mock-inspector,
  .final-cta,
  .landing-footer { grid-template-columns: 1fr; }
  .showcase-gallery article { min-height: 220px; }
  .mock-viewport { min-height: 300px; }
  .landing-footer nav { justify-content: flex-start; }
}

h1, h2, h3, .logo, .price {
  font-family: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background:
    radial-gradient(circle at 75% 18%, rgba(142, 232, 223, 0.12), transparent 28%),
    radial-gradient(circle at 16% 78%, rgba(214, 181, 109, 0.1), transparent 32%),
    var(--bg);
  color: var(--text);
}

html,
body.route-studio {
  height: 100% !important;
  overflow: hidden !important;
  overscroll-behavior: none;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  backdrop-filter: blur(18px);
}

button {
  min-height: 38px;
  padding: 0 14px;
  cursor: pointer;
  line-height: 1.15;
  overflow-wrap: normal;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  box-shadow: none;
}

button:hover {
  border-color: var(--line-bright);
  background: rgba(255, 255, 255, 0.095);
  box-shadow: 0 0 24px rgba(142, 232, 223, 0.08);
}

button:active {
  transform: translateY(1px);
}

select {
  height: 38px;
  padding: 0 10px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

input[type="color"] {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
}

input[type="file"] {
  width: 100%;
  color: var(--muted);
  font-size: 12px;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(330px, 410px) 1fr;
  gap: 16px;
  height: 100vh;
  padding: 16px;
}

.auth-locked .app-shell {
  pointer-events: none;
  filter: blur(10px) brightness(0.55);
}

.glass-panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(18, 22, 31, 0.74), rgba(7, 9, 13, 0.54));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(130%);
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: auto;
  padding: 18px;
  border-radius: 22px;
}

.brand-block h1 {
  margin: 6px 0 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.brand-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.eyebrow {
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.file-drop {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px dashed var(--line-bright);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.file-drop input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-drop span {
  color: var(--accent);
  font-weight: 800;
}

.file-drop small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.panel-tabs button {
  min-height: 36px;
  padding: 0 9px;
  border-radius: 11px;
  font-size: 12px;
  white-space: nowrap;
}

.panel-tabs button.is-active,
.preset-grid button.is-active,
.environment-card.is-active {
  border-color: rgba(142, 232, 223, 0.72);
  background: rgba(142, 232, 223, 0.13);
  box-shadow: inset 0 0 18px rgba(142, 232, 223, 0.08);
}

.panel-page {
  display: none;
  gap: 14px;
}

.panel-page.is-active {
  display: grid;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title h2 {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  padding: 0;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.material-list,
.editor-block,
.texture-grid,
.environment-list,
.preset-grid {
  display: grid;
  gap: 8px;
}

.empty-state {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
}

.material-button {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 10px;
  text-align: left;
}

.material-button.is-active {
  border-color: rgba(214, 181, 109, 0.74);
  background: rgba(214, 181, 109, 0.11);
}

.material-swatch {
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
}

.material-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-type {
  color: var(--muted);
  font-size: 11px;
}

.control-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--soft);
  font-size: 13px;
}

.toggle-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: center;
  gap: 10px;
  color: var(--soft);
  font-size: 13px;
}

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

.texture-grid label {
  display: grid;
  gap: 5px;
  color: var(--soft);
  font-size: 12px;
}

.primary-button {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  border-color: transparent;
  background: linear-gradient(135deg, #8ee8df, #d6b56d);
  color: #07100f;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.primary-link {
  display: inline-grid;
  place-items: center;
  min-height: 40px;
  width: max-content;
  padding: 0 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #8ee8df, #d6b56d);
  color: #07100f;
  font-weight: 900;
  text-decoration: none;
}

.secondary-button {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
}

.viewport-wrap {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  min-height: 0;
}

.topbar {
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 18px;
}

.topbar strong {
  display: block;
  margin-top: 4px;
  font-size: 15px;
}

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

.top-actions button,
.top-actions select {
  flex: 0 0 auto;
}

.canvas-host {
  position: relative;
  overflow: hidden;
  min-height: 0;
  contain: layout size style;
  touch-action: none;
  border: 1px solid var(--line);
  border-radius: 26px;
  background-color: transparent;
  background-image:
    linear-gradient(45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.035) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.035) 75%);
  background-position: 0 0, 0 14px, 14px -14px, -14px 0;
  background-size: 28px 28px;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.34);
}

.canvas-host::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 34%, rgba(255,255,255,0.12), transparent 22%),
    var(--active-hdri-thumb, linear-gradient(135deg, rgba(142,232,223,0.14), rgba(214,181,109,0.08)));
  opacity: 0.28;
  filter: blur(24px) saturate(130%);
  transform: scale(1.06);
  pointer-events: none;
  transition: background 240ms ease, opacity 240ms ease;
}

#sceneCanvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 100%;
  min-height: 100%;
  touch-action: none;
}

.hotspot-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.free-watermark {
  display: none !important;
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  pointer-events: none;
  transform: translate(-50%, -50%);
  width: clamp(150px, 20vw, 340px);
  opacity: 0.32;
  filter: drop-shadow(0 16px 36px rgba(0,0,0,0.38));
  mix-blend-mode: screen;
}

.free-watermark img {
  display: block;
  width: 100%;
  height: auto;
}

.custom-hdri-upload.is-locked,
.export-panel.is-locked {
  position: relative;
  opacity: 0.72;
}

.custom-hdri-upload.is-locked::before {
  content: "🔒 PRO";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: rgba(4,7,10,0.74);
  color: #f4d985;
  font-size: 11px;
  font-weight: 900;
  pointer-events: none;
}

.export-panel.is-locked::after {
  content: "🔒 Upgrade to Pro";
  position: absolute;
  inset: 34px 0 0;
  z-index: 3;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(4,7,10,0.78);
  color: #f4d985;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid rgba(142, 232, 223, 0.9);
  border-radius: 999px;
  background: rgba(142, 232, 223, 0.22);
  box-shadow: 0 0 0 0 rgba(142, 232, 223, 0.35);
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  animation: pulse 1.8s infinite;
}

.hotspot::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: inherit;
  background: var(--accent);
}

.hotspot-tooltip {
  position: absolute;
  left: 28px;
  top: 50%;
  display: none;
  width: 220px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(8, 10, 15, 0.84);
  color: var(--muted);
  transform: translateY(-50%);
  backdrop-filter: blur(18px);
}

.hotspot:hover .hotspot-tooltip,
.hotspot.is-open .hotspot-tooltip {
  display: grid;
  gap: 5px;
}

.hotspot-tooltip strong {
  color: var(--text);
}

@keyframes pulse {
  70% { box-shadow: 0 0 0 18px rgba(142, 232, 223, 0); }
  100% { box-shadow: 0 0 0 0 rgba(142, 232, 223, 0); }
}

.empty-overlay {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 3;
  display: grid;
  gap: 10px;
  width: min(440px, calc(100% - 44px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(9, 11, 16, 0.72);
  color: var(--muted);
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(24px);
}

.empty-overlay strong {
  color: var(--text);
  font-size: 20px;
}

.empty-overlay.is-hidden {
  display: none;
}

.variant-strip {
  display: flex;
  gap: 8px;
  overflow: auto;
  margin-top: 12px;
  padding: 10px;
  border-radius: 18px;
}

.variant-strip button {
  min-width: max-content;
  white-space: nowrap;
}

.environment-list {
  grid-template-columns: 1fr 1fr;
}

.environment-card {
  display: grid;
  gap: 8px;
  min-height: 82px;
  padding: 10px;
  text-align: left;
}

.environment-card.is-loading,
.custom-hdri-upload.is-loading,
.bottom-asset-tray .variant-strip button.is-loading {
  border-color: rgba(142, 232, 223, 0.82);
  color: var(--accent);
  pointer-events: none;
  box-shadow: 0 0 26px rgba(142, 232, 223, 0.16);
}

.environment-card.is-loading::after,
.custom-hdri-upload.is-loading::after,
.bottom-asset-tray .variant-strip button.is-loading::after {
  content: "";
  justify-self: start;
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: hdriLoading 760ms ease-in-out infinite;
}

@keyframes hdriLoading {
  0% { transform: translateX(0); opacity: 0.35; }
  50% { transform: translateX(18px); opacity: 1; }
  100% { transform: translateX(0); opacity: 0.35; }
}

.environment-thumb {
  height: 32px;
  border-radius: 10px;
}

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

.preset-grid button,
.environment-card {
  min-width: 0;
  white-space: normal;
}

.loader-screen {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  background: #050609;
}

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

.auth-screen {
  position: fixed;
  z-index: 30;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background:
    radial-gradient(circle at 74% 16%, rgba(142, 232, 223, 0.14), transparent 30%),
    radial-gradient(circle at 18% 82%, rgba(214, 181, 109, 0.14), transparent 34%),
    rgba(4, 5, 8, 0.92);
}

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

.auth-card {
  display: grid;
  gap: 24px;
  width: min(980px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 28px;
  border-radius: 26px;
}

.auth-copy h1 {
  max-width: 650px;
  margin: 8px 0 10px;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
}

.auth-copy p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.auth-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(300px, 1.1fr);
  gap: 18px;
}

.auth-form,
.model-library {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.auth-mode {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.auth-mode button.is-active {
  border-color: rgba(142, 232, 223, 0.72);
  background: rgba(142, 232, 223, 0.13);
}

.link-button {
  min-height: auto;
  justify-self: start;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.link-button:hover {
  background: transparent;
  box-shadow: none;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--soft);
  font-size: 13px;
}

.auth-form input {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.auth-message {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-message[data-type="error"] {
  color: #ff9b9b;
}

.auth-message[data-type="success"] {
  color: var(--accent);
}

.offline-lock-notice {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(520px, calc(100vw - 24px));
  padding: 12px 16px;
  border: 1px solid rgba(255, 179, 102, 0.35);
  border-radius: 8px;
  background: rgba(18, 22, 26, 0.96);
  color: #f9fbfc;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  transform: translateX(-50%);
}

.offline-lock-notice strong {
  color: #ffcc8a;
  white-space: nowrap;
}

.offline-lock-notice span {
  color: rgba(249, 251, 252, 0.78);
  font-size: 13px;
}

.offline-lock-notice[hidden] {
  display: none;
}

body.is-offline .configure-model-btn,
body.is-offline .configure-preset-btn,
body.is-offline #dashModelInput,
body.is-offline #dashTextureInput {
  pointer-events: none;
}

.library-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.library-item {
  display: grid;
  gap: 4px;
  min-height: 54px;
  padding: 10px 12px;
  text-align: left;
}

.library-item strong,
.library-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.library-item.is-active {
  border-color: rgba(214, 181, 109, 0.74);
  background: rgba(214, 181, 109, 0.11);
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
}

.account-row button {
  min-height: 28px;
  padding: 0 10px;
  font-size: 12px;
}

.admin-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.admin-body {
  min-height: 100vh;
  overflow: auto;
}

.admin-console {
  display: grid;
  place-items: start center;
  min-height: 100vh;
  padding: 24px;
}

.admin-console .auth-card,
.admin-console .admin-panel {
  width: min(1180px, 100%);
}

.admin-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.admin-heading h1 {
  margin: 6px 0 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1;
}

.admin-heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-login-form {
  max-width: 460px;
}

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

.admin-stats article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-stats strong {
  font-size: 24px;
}

.admin-stats span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-toolbar,
.admin-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.admin-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
}

.admin-toolbar input,
.admin-actions input {
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.admin-actions label {
  display: grid;
  gap: 6px;
  color: var(--soft);
  font-size: 13px;
}

.admin-user-list {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
}

.admin-user-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.admin-user-card strong,
.admin-user-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user-card span {
  color: var(--muted);
  font-size: 12px;
}

.admin-user-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 390px;
}

.admin-user-actions button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 12px;
}

.danger-button {
  border-color: rgba(255, 132, 132, 0.36);
  color: #ffb6b6;
}

.loader-card {
  display: grid;
  gap: 16px;
  width: min(430px, calc(100vw - 40px));
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(14, 17, 24, 0.74);
  box-shadow: var(--shadow);
}

.loader-card h1 {
  margin: 0;
}

.loader-track {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.loader-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.dashboard-plan-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.dashboard-plan-strip article {
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
}

.dashboard-plan-strip span {
  display: block;
  color: #8f9ba2;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-plan-strip strong {
  display: block;
  margin-top: 6px;
  color: #f3f7f8;
  font-size: 18px;
}

.credit-cost-card strong {
  font-size: 13px;
  line-height: 1.35;
}

.credit-cost-card small {
  display: block;
  margin-top: 5px;
  color: #9caab2;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.billing-static-page {
  display: grid;
  gap: 28px;
}

.billing-static-hero {
  display: grid;
  gap: 18px;
  padding: clamp(28px, 5vw, 64px);
  border-radius: 28px;
}

.billing-static-hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(36px, 7vw, 78px);
  line-height: 0.95;
}

.billing-static-hero p {
  max-width: 760px;
  color: #a7b2bd;
  font-size: 18px;
}

.billing-static-hero .owner-contact-card {
  display: grid;
  gap: 12px;
  width: min(100%, 560px);
  margin-top: 8px;
  padding: 24px;
  border: 1px solid rgba(142, 232, 223, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.035);
}

.billing-static-hero .owner-contact-card h2 {
  margin: 0;
  font-size: 24px;
}

.billing-static-hero .owner-contact-card strong {
  display: block;
  color: var(--accent);
  font-size: 18px;
  letter-spacing: 0.04em;
}

.billing-static-hero .hero-actions {
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 960px) {
  html,
  body {
    overflow: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(520px, 58vh) auto;
    height: auto;
    min-height: 100vh;
  }

  .panel {
    order: 2;
    max-height: none;
  }

  .viewport-wrap {
    order: 1;
  }

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

@media (max-width: 560px) {
  .app-shell {
    padding: 8px;
  }

  .panel-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .control-row {
    grid-template-columns: 88px 1fr;
  }

  .environment-list,
  .preset-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-plan-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .auth-grid {
    grid-template-columns: 1fr;
  }

  .admin-stats,
  .admin-toolbar,
  .admin-actions,
  .admin-user-card {
    grid-template-columns: 1fr;
  }

  .admin-user-actions {
    justify-content: stretch;
    max-width: none;
  }
}

/* SaaS PAGE ROUTING & STATE ACTIONS */
body.route-home #homePage {
  display: block !important;
}
body.route-home #dashboardPage,
body.route-home #studioPage {
  display: none !important;
}

body.route-dashboard #dashboardPage {
  display: block !important;
}
body.route-dashboard #homePage,
body.route-dashboard #studioPage {
  display: none !important;
}

body.route-studio #studioPage {
  display: grid !important;
}
body.route-studio #homePage,
body.route-studio #dashboardPage {
  display: none !important;
}

/* NEON GLOW EFFECTS */
.ambient-glow {
  position: fixed;
  z-index: -1;
  width: 50vw;
  height: 50vw;
  border-radius: 999px;
  filter: blur(120px);
  opacity: 0.15;
  pointer-events: none;
  animation: moveGlow 25s infinite alternate ease-in-out;
}

.bg-blob-1 {
  top: -10%;
  left: 60%;
  background: radial-gradient(circle, var(--accent), transparent 60%);
}

.bg-blob-2 {
  bottom: -10%;
  left: -10%;
  background: radial-gradient(circle, var(--accent-2), transparent 60%);
}

@keyframes moveGlow {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-10%, 15%) scale(1.1); }
  100% { transform: translate(5%, -5%) scale(0.95); }
}

/* NAVIGATION HEADER */
.home-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto 32px;
  padding: 16px 28px;
  border-radius: 20px;
}

.logo {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.logo span {
  color: var(--accent);
  margin-left: 2px;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  transition: color 150ms ease;
}

.nav-links a:hover {
  color: var(--text);
}

/* HERO GRID SPLIT */
.page-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 20px;
  overflow-y: auto;
  max-height: 100vh;
}

.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 48px;
  min-height: 75vh;
  margin-bottom: 72px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid rgba(142, 232, 223, 0.35);
  border-radius: 999px;
  background: rgba(142, 232, 223, 0.08);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(38px, 4.5vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, #a7afbd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}

.text-link {
  color: var(--accent-2);
  font-weight: 700;
  text-decoration: none;
  transition: transform 150ms ease;
}

.text-link:hover {
  transform: translateX(3px);
}

/* HERO VIEWPORT & QUICK SWATCHES */
.hero-visual {
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  padding: 16px;
}

.visual-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  padding: 0 8px 12px;
  border-bottom: 1px solid var(--line);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: pulse 1.5s infinite;
}

.hero-canvas-host {
  position: relative;
  height: 380px;
  border-radius: 18px;
  overflow: hidden;
  background: radial-gradient(circle at center, rgba(142, 232, 223, 0.05), transparent 70%);
}

.visual-loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2;
  background: rgba(6, 7, 10, 0.82);
  color: var(--muted);
  backdrop-filter: blur(8px);
}

.visual-loader.is-hidden {
  display: none;
}

.hero-canvas-host canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.hero-swatch-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.hero-swatches {
  display: flex;
  gap: 8px;
}

.hero-swatch {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  cursor: pointer;
  padding: 0;
  transition: transform 180ms ease, border-color 180ms ease;
}

.hero-swatch:hover,
.hero-swatch.is-active {
  transform: scale(1.2);
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(142, 232, 223, 0.4);
}

/* LANDING CARD GRIDS */
.home-section {
  padding: 64px 0;
}

.section-heading {
  font-size: 28px;
  text-align: center;
  margin-bottom: 42px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 32px 24px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 200ms ease, border-color 200ms ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(142, 232, 223, 0.3);
}

.feature-icon {
  font-size: 28px;
}

.feature-card h3 {
  margin: 0;
  font-size: 18px;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

/* PRICING GRID */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 480px));
  justify-content: center;
  gap: 28px;
}

.pricing-card {
  padding: 42px 32px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.pricing-card.featured {
  border-color: rgba(214, 181, 109, 0.5);
  background: linear-gradient(145deg, rgba(26, 22, 17, 0.8), rgba(7, 9, 13, 0.6));
}

.card-badge {
  position: absolute;
  top: 18px;
  right: 24px;
  background: var(--accent-2);
  color: #1a150b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
}

.pricing-card h3 {
  margin: 0;
  font-size: 20px;
}

.price {
  font-size: 44px;
  font-weight: 900;
}

.price span {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--soft);
  font-size: 14px;
}

.pricing-card ul li::before {
  content: "✓";
  color: var(--accent);
  margin-right: 8px;
}

.pricing-cta {
  width: 100%;
}

.home-footer {
  text-align: center;
  padding: 48px 0;
  color: var(--muted);
  font-size: 12px;
  border-top: 1px solid var(--line);
  margin-top: 48px;
}

/* SAAS WORKSPACE DASHBOARD */
.dashboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  min-height: 80vh;
}

.dashboard-sidebar {
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dashboard-sidebar h3 {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.dashboard-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dashboard-tabs button {
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  min-height: 42px;
  padding: 0 16px;
}

.dashboard-tabs button:hover {
  background: rgba(255, 255, 255, 0.04);
}

.dashboard-tabs button.is-active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent);
}

.dashboard-content {
  border-radius: 20px;
  padding: 24px;
}

.dash-tab-page {
  display: none;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.dash-tab-page.is-active {
  display: flex;
}

.tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tab-header h2 {
  margin: 0;
  font-size: 20px;
}

.tab-subtext {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.upload-btn {
  display: inline-block;
  text-align: center;
  min-height: 38px;
  padding: 8px 16px;
  cursor: pointer;
  border-radius: 12px;
  font-weight: 800;
  font-size: 13px;
  line-height: 1.4;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #07100f;
}

/* LIST CARDS */
.asset-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.asset-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color 150ms ease;
}

.asset-card:hover {
  border-color: var(--line-bright);
}

.asset-icon {
  font-size: 32px;
  background: rgba(255, 255, 255, 0.04);
  width: 54px;
  height: 54px;
  border-radius: 12px;
  display: grid;
  place-items: center;
}

.asset-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.asset-meta strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-meta span {
  font-size: 11px;
  color: var(--muted);
}

.asset-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.asset-actions button {
  flex: 1;
  min-height: 30px;
  font-size: 11px;
  padding: 0 8px;
  border-radius: 8px;
}

/* SELECT AND SAVE PANELS */
.dashboard-texture-select {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.dashboard-helper-text {
  max-width: 680px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.dashboard-texture-select span {
  font-size: 12px;
  color: var(--muted);
}

.dashboard-texture-select select {
  height: 38px;
  width: 100%;
}

.stored-texture-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.stored-texture-controls button {
  width: 100%;
}

.preset-saver-block {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.03);
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-saver-block h3 {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted);
}

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

.preset-save-row input {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 0 10px;
  font-size: 12px;
}

.preset-save-row button {
  height: 38px;
  min-height: auto;
  border-radius: 10px;
}

/* Hide scrollbars for a premium clean UI layout while retaining scrolling function */
.page-container::-webkit-scrollbar,
.panel::-webkit-scrollbar,
.library-list::-webkit-scrollbar,
.admin-user-list::-webkit-scrollbar,
.asset-grid-list::-webkit-scrollbar {
  display: none !important;
}

.page-container,
.panel,
.library-list,
.admin-user-list,
.asset-grid-list {
  -ms-overflow-style: none !important;  /* IE and Edge */
  scrollbar-width: none !important;  /* Firefox */
}

/* Premium real-time 3D studio redesign */
html,
body.route-studio {
  overflow: hidden;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
}

body.route-studio {
  background:
    radial-gradient(circle at 50% 18%, rgba(91, 216, 202, 0.11), transparent 30%),
    radial-gradient(circle at 18% 92%, rgba(120, 144, 168, 0.08), transparent 26%),
    linear-gradient(135deg, #05070a 0%, #0a0d11 46%, #050608 100%);
}

body.route-studio::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.014) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(circle at center, rgba(0,0,0,0.55), transparent 72%);
}

body.route-studio #studioPage.pro-studio-shell {
  display: grid;
}

.pro-studio-shell {
  --studio-line: rgba(180, 210, 230, 0.13);
  --studio-line-hot: rgba(125, 245, 224, 0.46);
  --studio-text: #f3f7f8;
  --studio-muted: #8d9aa5;
  --studio-accent: #72f4df;
  --bottom-tray-height: 156px;
  grid-template-columns: 300px minmax(0, 1fr) 360px;
  grid-template-rows: 72px minmax(0, 1fr) var(--bottom-tray-height);
  grid-template-areas:
    "top top top"
    "left viewport right"
    "bottom bottom bottom";
  gap: 6px;
  height: 100vh;
  padding: 0;
  color: var(--studio-text);
  background: transparent;
  overflow: hidden;
  overscroll-behavior: none;
}

.pro-studio-shell .glass-panel,
.studio-topbar,
.left-studio-panel,
.right-inspector,
.bottom-asset-tray,
.floating-viewport-tools,
.viewport-camera-card {
  border: 1px solid var(--studio-line);
  background:
    linear-gradient(180deg, rgba(19, 25, 32, 0.88), rgba(7, 10, 14, 0.82)),
    rgba(7, 10, 14, 0.84);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.045),
    0 18px 46px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(22px) saturate(130%);
}

.studio-topbar {
  grid-area: top;
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: 245px 260px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-width: 0;
  border-radius: 0 0 16px 16px;
  padding: 10px 14px;
}

.studio-brand,
.live-project,
.studio-actions,
.profile-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(114, 244, 223, 0.34);
  border-radius: 12px;
  background: radial-gradient(circle at 30% 22%, rgba(114, 244, 223, 0.34), transparent 45%), rgba(114, 244, 223, 0.08);
  color: var(--studio-accent);
  font-family: Outfit, Inter, sans-serif;
  font-weight: 900;
  box-shadow: 0 0 30px rgba(114, 244, 223, 0.14);
}

.studio-brand strong,
.live-project strong,
.project-card strong,
.performance-card strong {
  display: block;
  overflow: hidden;
  color: #f9fbfb;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-brand span,
.live-project small,
.profile-pill,
.viewport-camera-card span {
  color: var(--studio-muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: #69f5bd;
  box-shadow: 0 0 18px rgba(105, 245, 189, 0.8);
}

.tool-cluster {
  display: flex;
  justify-content: center;
  gap: 6px;
  min-width: 0;
}

.tool-button,
.ghost-tool {
  min-height: 42px;
  border-radius: 12px;
  color: #b9c3cb;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.tool-button.is-active,
.tool-button:hover,
.ghost-tool:hover {
  border-color: rgba(114, 244, 223, 0.35);
  color: #efffff;
  background: rgba(114, 244, 223, 0.11);
  box-shadow: 0 0 24px rgba(114, 244, 223, 0.13);
}

.studio-actions {
  justify-content: end;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.studio-actions::-webkit-scrollbar {
  display: none;
}

.studio-actions select,
.studio-actions button {
  height: 40px;
}

.render-button {
  min-width: 94px;
}

.profile-pill {
  height: 42px;
  padding: 0 4px 0 12px;
  border: 1px solid var(--studio-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.profile-pill button {
  height: 32px;
  min-height: 32px;
  border-radius: 10px;
}

.left-studio-panel {
  grid-area: left;
  min-width: 0;
  border-radius: 0 16px 16px 0;
  padding: 16px;
  overflow: auto;
  overscroll-behavior: none;
}

.right-inspector {
  grid-area: right;
  min-width: 0;
  border-radius: 16px 0 0 16px;
  padding: 18px;
  overflow: auto;
  overscroll-behavior: none;
}

.project-card,
.scene-browser,
.performance-card {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 18px;
}

.project-card .file-drop {
  margin-top: 14px;
}

.pro-studio-shell .file-drop {
  min-height: auto;
  align-items: stretch;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(114, 244, 223, 0.08), rgba(255,255,255,0.025)), rgba(255,255,255,0.025);
}

.pro-studio-shell .file-drop:hover {
  border-color: var(--studio-line-hot);
  transform: translateY(-1px);
}

.tree-list {
  display: grid;
  gap: 8px;
}

.tree-root,
.tree-item {
  min-height: 34px;
  padding: 9px 11px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #c6ced5;
  font-size: 13px;
  background: rgba(255,255,255,0.025);
}

.tree-root {
  color: #e8eeee;
  background: rgba(114, 244, 223, 0.07);
}

.tree-item {
  margin-left: 12px;
}

.tree-item.is-open {
  border-color: rgba(114, 244, 223, 0.18);
}

.pro-studio-shell .material-list {
  display: grid;
  gap: 8px;
  padding: 0;
  margin-left: 22px;
  background: transparent;
}

.pro-studio-shell .material-button {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
  border-color: rgba(255,255,255,0.06);
  border-radius: 11px;
  background: rgba(255,255,255,0.035);
  text-align: left;
}

.pro-studio-shell .material-button.is-active {
  border-color: var(--studio-line-hot);
  background: linear-gradient(90deg, rgba(114, 244, 223, 0.18), rgba(114, 244, 223, 0.04)), rgba(255,255,255,0.04);
  box-shadow: inset 3px 0 0 var(--studio-accent), 0 0 28px rgba(114, 244, 223, 0.1);
}

.pro-studio-shell .material-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.45), 0 8px 16px rgba(0,0,0,0.22);
}

.pro-studio-shell .material-name {
  overflow: hidden;
  color: #eef4f4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pro-studio-shell .material-type {
  color: #71818d;
  font-size: 10px;
  text-transform: uppercase;
}

.scene-tools,
.scene-builder-card {
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 18px;
}

.scene-warning {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 196, 112, 0.28);
  border-radius: 12px;
  color: #ffd69a;
  font-size: 12px;
  background: rgba(255, 196, 112, 0.08);
}

.scene-object-list {
  display: grid;
  gap: 7px;
}

.scene-tree-root {
  min-height: 34px;
  padding: 9px 11px;
  border-radius: 10px;
  color: #e8eeee;
  font-size: 13px;
  background: rgba(114, 244, 223, 0.07);
}

.scene-object-row {
  min-height: 36px;
  justify-content: start;
  padding: 0 12px 0 24px;
  border-color: rgba(255,255,255,0.06);
  border-radius: 10px;
  color: #cbd5da;
  background: rgba(255,255,255,0.035);
  text-align: left;
}

.scene-object-row::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 99px;
  background: rgba(114,244,223,0.34);
}

.scene-object-row.is-active {
  border-color: rgba(114, 244, 223, 0.52);
  color: #edfffc;
  background: rgba(114, 244, 223, 0.12);
  box-shadow: inset 3px 0 0 var(--studio-accent);
}

.scene-empty-state {
  margin: 0;
  color: #7f8d96;
  font-size: 13px;
  line-height: 1.45;
}

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

.mini-tool {
  min-height: 34px;
  padding: 0 10px;
  border-color: rgba(255,255,255,0.09);
  border-radius: 10px;
  color: #cbd5da;
  font-size: 12px;
  font-weight: 800;
  background: rgba(255,255,255,0.045);
}

.mini-tool.is-active,
.mini-tool:hover {
  border-color: rgba(114, 244, 223, 0.48);
  color: #efffff;
  background: rgba(114, 244, 223, 0.12);
}

.object-inspector-panel {
  display: grid;
  gap: 14px;
}

.object-name-row,
.object-transform-group {
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}

.object-name-row span,
.object-transform-group > span {
  color: #b7c1c7;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.object-transform-group {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.object-transform-group > span {
  grid-column: 1 / -1;
}

.object-transform-group label {
  display: grid;
  gap: 5px;
  color: #9aa8b0;
  font-size: 11px;
}

.object-name-row input,
.object-transform-group input {
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.055);
  color: #eef7f7;
  padding: 0 9px;
}

.performance-card {
  position: relative;
  min-height: 126px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(114,244,223,0.08), rgba(255,255,255,0.025));
}

.fps-pill {
  position: absolute;
  right: 14px;
  top: 16px;
  color: var(--studio-accent);
  font-size: 12px;
  font-weight: 700;
}

.perf-line {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  height: 36px;
  border-radius: 8px;
  background:
    linear-gradient(135deg, transparent 0 12%, rgba(114,244,223,0.8) 13% 15%, transparent 16% 24%, rgba(114,244,223,0.65) 25% 27%, transparent 28% 42%, rgba(114,244,223,0.82) 43% 45%, transparent 46% 58%, rgba(114,244,223,0.58) 59% 61%, transparent 62% 100%),
    linear-gradient(to top, rgba(114,244,223,0.12), transparent);
  opacity: 0.75;
}

.pro-viewport {
  grid-area: viewport;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  display: block;
  overscroll-behavior: none;
}

.pro-viewport .canvas-host {
  position: relative;
  height: 100%;
  min-height: 0;
  contain: none;
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 44%, rgba(178, 197, 211, 0.2), transparent 16%),
    radial-gradient(ellipse at 50% 75%, rgba(114, 244, 223, 0.13), transparent 30%),
    linear-gradient(180deg, #121920 0%, #06080c 62%, #030406 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), inset 0 -120px 160px rgba(0,0,0,0.32);
}

.viewport-vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 45%, rgba(0,0,0,0.5) 100%), linear-gradient(to top, rgba(0,0,0,0.35), transparent 36%);
  mix-blend-mode: multiply;
}

.viewport-camera-card {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 4;
  display: grid;
  gap: 2px;
  min-width: 170px;
  border-radius: 14px;
  padding: 12px 14px;
}

.viewport-camera-card strong {
  font-size: 13px;
}

.render-region-overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(0,0,0,0.18);
}

.render-region-overlay[hidden] {
  display: none;
}

.render-region-frame {
  position: relative;
  width: min(78%, 980px);
  max-height: 84%;
  aspect-ratio: 16 / 9;
  border: 2px solid rgba(114,244,223,0.86);
  box-shadow:
    0 0 0 999px rgba(0,0,0,0.18),
    0 0 28px rgba(114,244,223,0.22),
    inset 0 0 0 1px rgba(255,255,255,0.22);
}

.render-region-overlay.ratio-9-16 .render-region-frame {
  width: min(44%, 520px);
  aspect-ratio: 9 / 16;
}

.render-region-overlay.ratio-1-1 .render-region-frame {
  width: min(62%, 720px);
  aspect-ratio: 1 / 1;
}

.render-region-overlay.ratio-4-5 .render-region-frame {
  width: min(50%, 560px);
  aspect-ratio: 4 / 5;
}

.render-region-overlay.ratio-3-4 .render-region-frame {
  width: min(54%, 620px);
  aspect-ratio: 3 / 4;
}

.render-region-frame .rule {
  position: absolute;
  display: block;
  background: rgba(114,244,223,0.38);
}

.render-region-frame .rule-v {
  top: 0;
  bottom: 0;
  width: 1px;
}

.render-region-frame .rule-h {
  left: 0;
  right: 0;
  height: 1px;
}

.rule-v-1 { left: 33.333%; }
.rule-v-2 { left: 66.666%; }
.rule-h-1 { top: 33.333%; }
.rule-h-2 { top: 66.666%; }

.region-label {
  position: absolute;
  left: 12px;
  top: 10px;
  padding: 5px 8px;
  border: 1px solid rgba(114,244,223,0.32);
  border-radius: 999px;
  background: rgba(8,13,18,0.78);
  color: #dffbf7;
  font-size: 11px;
  font-weight: 800;
}

.camera-frame-panel {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  background: rgba(255,255,255,0.035);
}

.frame-mode-control {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  gap: 8px;
}

.frame-mode-control button {
  min-height: 34px;
  border-radius: 9px;
  font-size: 12px;
}

.frame-mode-control button.is-active {
  color: #edfffc;
  border-color: rgba(114,244,223,0.44);
  background: rgba(114,244,223,0.13);
}

.floating-viewport-tools {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 4;
  display: grid;
  gap: 7px;
  width: 50px;
  padding: 8px;
  border-radius: 16px;
}

.floating-viewport-tools button {
  display: grid;
  place-items: center;
  min-height: 36px;
  padding: 0;
  border-radius: 10px;
  font-size: 10px;
}

.axis-widget {
  position: absolute;
  left: 48px;
  bottom: 38px;
  z-index: 4;
  width: 54px;
  height: 54px;
  color: #dce7ea;
  font-size: 11px;
}

.axis-widget span {
  position: absolute;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-weight: 800;
}

.axis-y { left: 17px; top: 0; background: rgba(88, 219, 138, 0.75); }
.axis-x { right: 0; bottom: 4px; background: rgba(245, 78, 78, 0.75); }
.axis-z { left: 0; bottom: 0; background: rgba(72, 139, 245, 0.75); }

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

.inspector-heading h2 {
  margin: 3px 0 0;
  font-size: 18px;
}

.status-chip {
  border: 1px solid rgba(114,244,223,0.28);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--studio-accent);
  font-size: 11px;
  background: rgba(114,244,223,0.08);
}

.inspector-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  overflow-x: auto;
  scrollbar-width: thin;
}

.inspector-tabs button {
  flex: 0 0 auto;
  min-width: 68px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  color: #9aa6ad;
  font-size: 10.5px;
  white-space: nowrap;
  background: transparent;
}

.inspector-tabs button.is-active {
  color: #edfffc;
  background: linear-gradient(180deg, rgba(114,244,223,0.2), rgba(114,244,223,0.08));
  box-shadow: inset 0 0 0 1px rgba(114,244,223,0.28), 0 12px 26px rgba(0,0,0,0.24);
}

.pro-studio-shell .panel-page {
  display: none;
  animation: studioFade 180ms ease both;
}

.pro-studio-shell .panel-page.is-active {
  display: grid;
  gap: 16px;
}

@keyframes studioFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

.pro-studio-shell .editor-block,
.texture-panel,
.pro-studio-shell .environment-list,
.pro-studio-shell .preset-grid {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 16px;
  background: rgba(255,255,255,0.028);
}

.pro-studio-shell .control-row {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0;
  color: #d5dde0;
}

.pro-studio-shell .control-row span,
.pro-studio-shell .toggle-row span,
.dashboard-texture-select span,
.texture-grid label span {
  color: #b7c1c7;
  font-size: 12px;
}

.pro-studio-shell input[type="range"] {
  height: 4px;
  accent-color: var(--studio-accent);
  touch-action: none;
}

.pro-studio-shell input[type="color"] {
  width: 46px;
  height: 32px;
  margin-left: auto;
  border-color: rgba(255,255,255,0.14);
  border-radius: 9px;
}

.pro-studio-shell .toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0;
}

.pro-studio-shell input[type="checkbox"] {
  appearance: none;
  width: 42px;
  height: 23px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 99px;
  background: rgba(255,255,255,0.07);
  transition: background 160ms ease, border-color 160ms ease;
}

.pro-studio-shell input[type="checkbox"]::before {
  content: "";
  display: block;
  width: 17px;
  height: 17px;
  margin: 2px;
  border-radius: 50%;
  background: #88939a;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.pro-studio-shell input[type="checkbox"]:checked {
  border-color: rgba(114,244,223,0.48);
  background: rgba(114,244,223,0.18);
}

.pro-studio-shell input[type="checkbox"]:checked::before {
  transform: translateX(19px);
  background: var(--studio-accent);
  box-shadow: 0 0 18px rgba(114,244,223,0.55);
}

.pro-studio-shell .texture-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0;
  background: transparent;
}

.pro-studio-shell .texture-grid label {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr);
  align-items: center;
  min-height: 50px;
  gap: 10px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.035);
}

.pro-studio-shell input[type="file"] {
  font-size: 11px;
}

.pro-studio-shell select,
.pro-studio-shell input[type="text"] {
  border-color: rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.055);
  color: #eef7f7;
}

.pro-studio-shell select option,
.pro-studio-shell select optgroup {
  background: #0b1117;
  color: #eef7f7;
}

.pro-studio-shell select option:checked {
  background: #12342f;
  color: #ffffff;
}

.pro-studio-shell select:focus {
  border-color: rgba(114, 244, 223, 0.5);
  outline: 2px solid rgba(114, 244, 223, 0.18);
  outline-offset: 2px;
}

.texture-control-panel {
  display: grid;
  gap: 12px;
}

.texture-drop-zone {
  display: grid;
  gap: 4px;
  min-height: 68px;
  padding: 13px;
  border: 1px dashed rgba(114,244,223,0.28);
  border-radius: 12px;
  background: rgba(114,244,223,0.045);
  color: #dffbf7;
}

.texture-drop-zone span {
  color: #8ea0a8;
  font-size: 11px;
}

.texture-drop-zone.is-dragging {
  border-color: rgba(114,244,223,0.78);
  background: rgba(114,244,223,0.12);
}

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

.texture-transform-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.texture-transform-grid label,
.texture-zone-row {
  display: grid;
  gap: 5px;
}

.texture-transform-grid label span,
.texture-toggle-row label {
  color: #b7c1c7;
  font-size: 11px;
}

.texture-transform-grid input,
.texture-zone-row input {
  min-width: 0;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 9px;
  background: rgba(255,255,255,0.055);
  color: #eef7f7;
  padding: 0 9px;
}

.texture-toggle-row,
.texture-zone-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.texture-zone-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.texture-toggle-row label {
  display: flex;
  align-items: center;
  gap: 7px;
}

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

.texture-preview-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.texture-preview-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 6px;
  border-radius: 10px;
  text-align: left;
  color: #dce7e8;
}

.texture-preview-card canvas {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
}

.texture-warning {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid rgba(255, 188, 112, 0.24);
  border-radius: 10px;
  color: #ffd39b;
  background: rgba(255, 188, 112, 0.08);
  font-size: 12px;
}

.quality-inspector {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 8;
  width: min(360px, calc(100% - 36px));
  max-height: min(520px, calc(100% - 120px));
  display: grid;
  gap: 12px;
  padding: 14px;
  overflow: auto;
  border-radius: 14px;
  color: #edf8f8;
}

.quality-inspector[hidden] {
  display: none;
}

.quality-header,
.quality-score-row,
.quality-tabs,
.quality-check,
.quality-metric,
.quality-issue {
  display: flex;
  align-items: center;
}

.quality-header,
.quality-score-row {
  justify-content: space-between;
  gap: 12px;
}

.quality-header strong {
  display: block;
  margin-top: 3px;
}

.quality-score-row {
  justify-content: flex-start;
}

.quality-score-ring {
  --score: 0%;
  width: 68px;
  height: 68px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, #0d1319 56%, transparent 58%),
    conic-gradient(var(--studio-accent) var(--score), rgba(255,255,255,0.1) 0);
  color: #eafffb;
  font-weight: 900;
}

.quality-score-row span {
  display: block;
  font-weight: 800;
}

.quality-score-row small {
  display: block;
  margin-top: 4px;
  color: #8ea0a8;
  font-size: 11px;
}

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

.quality-tabs button {
  min-height: 32px;
  padding: 0 7px;
  border-radius: 9px;
  font-size: 11px;
}

.quality-tabs button.is-active {
  color: #edfffc;
  border-color: rgba(114,244,223,0.38);
  background: rgba(114,244,223,0.12);
}

.quality-page {
  display: none;
  gap: 9px;
}

.quality-page.is-active {
  display: grid;
}

.quality-check-list,
.quality-metrics {
  display: grid;
  gap: 7px;
}

.quality-check-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.quality-check,
.quality-metric,
.quality-issue,
.quality-state {
  min-height: 38px;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid rgba(255,255,255,0.075);
  border-radius: 10px;
  background: rgba(255,255,255,0.045);
  font-size: 12px;
}

.quality-check span {
  flex: 0 0 auto;
  min-width: 30px;
  color: #0b1415;
  border-radius: 999px;
  padding: 3px 6px;
  background: #72f4df;
  text-align: center;
  font-size: 10px;
  font-weight: 900;
}

.quality-check.warn span {
  background: #ffcc8a;
}

.quality-metric {
  justify-content: space-between;
}

.quality-metric span,
.quality-issue span,
.quality-state {
  color: #9cadb3;
}

.quality-issue {
  display: grid;
  align-items: start;
}

.quality-state.good {
  color: #8ff7d1;
}

.pro-studio-shell .environment-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pro-studio-shell .environment-card {
  min-height: 86px;
  border-radius: 14px;
  padding: 10px;
  text-align: left;
}

.pro-studio-shell .environment-thumb {
  height: 42px;
  border-radius: 10px;
}

.pro-studio-shell .preset-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pro-studio-shell .preset-grid button {
  min-height: 48px;
  border-radius: 12px;
}

.bottom-asset-tray {
  grid-area: bottom;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(260px, 0.95fr) minmax(280px, 0.85fr);
  grid-template-rows: 1fr;
  gap: 8px 16px;
  min-width: 0;
  min-height: 0;
  max-height: none;
  border-radius: 16px 16px 0 0;
  padding: 12px 18px 14px;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable both-edges;
}

.tray-section {
  min-width: 0;
  min-height: 0;
  max-height: 100%;
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
}

.tray-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--studio-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.custom-hdri-upload {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid rgba(114,244,223,0.28);
  border-radius: 10px;
  color: #dffcf8;
  background: rgba(114,244,223,0.08);
  cursor: pointer;
}

.hdr-preview-toggle {
  min-height: 30px;
  padding: 0 12px;
  border-color: rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #9daab1;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255,255,255,0.045);
}

.hdr-preview-toggle.is-active {
  border-color: rgba(114,244,223,0.42);
  color: #dffcf8;
  background: rgba(114,244,223,0.11);
  box-shadow: inset 0 0 0 1px rgba(114,244,223,0.08), 0 0 18px rgba(114,244,223,0.08);
}

.custom-hdri-upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.tray-tabs {
  display: flex;
  gap: 18px;
  align-items: center;
  grid-column: 1 / 2;
}

.tray-tabs button {
  min-height: 32px;
  padding: 0;
  border: 0;
  color: #8c99a2;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: transparent;
}

.tray-tabs button.is-active {
  color: var(--studio-accent);
}

.bottom-asset-tray .variant-strip {
  display: flex;
  gap: 10px;
  min-width: 0;
  overflow: auto hidden;
  padding: 0 0 4px;
  background: transparent;
  border: 0;
  scrollbar-gutter: stable;
}

.bottom-asset-tray .variant-strip button {
  display: grid;
  grid-template-rows: 48px auto;
  gap: 6px;
  flex: 0 0 96px;
  min-height: 82px;
  padding: 8px;
  border-radius: 12px;
  color: #d9e1e4;
  font-size: 11px;
  background: rgba(255,255,255,0.04);
}

.bottom-asset-tray .variant-strip button:hover {
  border-color: var(--studio-line-hot);
  transform: translateY(-2px);
}

.bottom-asset-tray .variant-strip button span {
  display: block;
  width: 48px;
  height: 48px;
  margin: auto;
  border-radius: 50%;
  box-shadow:
    inset -14px -14px 24px rgba(0,0,0,0.35),
    inset 10px 10px 18px rgba(255,255,255,0.32),
    0 18px 24px rgba(0,0,0,0.32);
}

.bottom-asset-tray .variant-strip.empty-state {
  align-items: center;
  min-height: 96px;
  padding-left: 4px;
  color: #83919a;
  font-size: 13px;
}

.bottom-asset-tray .variant-strip .hdr-orb,
.bottom-asset-tray .variant-strip .texture-thumb {
  background-size: cover;
  background-position: center;
}

.bottom-asset-tray .variant-strip button.is-active {
  border-color: var(--studio-line-hot);
  box-shadow: inset 0 0 0 1px rgba(114,244,223,0.22), 0 0 26px rgba(114,244,223,0.12);
}

.custom-hdr-orb {
  background:
    radial-gradient(circle at 34% 28%, rgba(255,255,255,0.9), transparent 18%),
    conic-gradient(from 130deg, #72f4df, #365c74, #d3b96d, #72f4df);
}

.export-panel {
  display: grid;
  grid-template-rows: 34px auto auto auto;
  gap: 8px;
  min-width: 0;
  min-height: max-content;
  overflow: auto;
  color: #e9f3f3;
  scrollbar-gutter: stable;
}

.route-home .render-queue-panel,
.route-dashboard .render-queue-panel,
.auth-locked .render-queue-panel {
  display: none;
}

body:not(.route-studio) .export-panel,
.route-home .render-queue-panel,
.route-dashboard .render-queue-panel,
.auth-locked .render-queue-panel {
  display: none;
}

.export-panel-header,
.render-queue-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.export-panel-header span,
.render-queue-title span {
  color: var(--studio-accent, #72f4df);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.16em;
}

.export-panel-header small {
  color: #829098;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.export-options,
.export-settings {
  display: grid;
  gap: 6px;
}

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

.export-options label,
.export-background label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  background: rgba(255,255,255,0.035);
  color: #c9d4d6;
  font-size: 12px;
}

.bottom-asset-tray::-webkit-scrollbar,
.bottom-asset-tray .variant-strip::-webkit-scrollbar,
.export-panel::-webkit-scrollbar {
  height: 8px;
  width: 8px;
}

.bottom-asset-tray::-webkit-scrollbar-thumb,
.bottom-asset-tray .variant-strip::-webkit-scrollbar-thumb,
.export-panel::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(114,244,223,0.28);
}

.bottom-asset-tray::-webkit-scrollbar-track,
.bottom-asset-tray .variant-strip::-webkit-scrollbar-track,
.export-panel::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.035);
}

.export-options input,
.export-background input {
  accent-color: var(--studio-accent, #72f4df);
}

.export-settings > label {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 4px;
  color: #8f9ba2;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.export-settings select {
  height: 30px;
  width: 100%;
  border-radius: 10px;
  color: #e9f3f3;
  background: rgba(255,255,255,0.06);
}

.export-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.export-actions button {
  min-height: 34px;
}

.render-queue-panel {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 80;
  display: grid;
  gap: 12px;
  width: min(460px, calc(100vw - 32px));
  padding: 20px;
  border-radius: 20px;
  color: #e9f3f3;
  transform: translate(-50%, -50%);
  background:
    linear-gradient(180deg, rgba(19, 25, 32, 0.98), rgba(7, 10, 14, 0.96)),
    #080d13 !important;
  box-shadow: 0 24px 80px rgba(0,0,0,0.56), 0 0 0 1px rgba(114,244,223,0.18);
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

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

.render-queue-panel::before {
  content: "";
  position: fixed;
  inset: -100vmax;
  z-index: -1;
  background: rgba(0,0,0,0.46);
}

.render-queue-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}

.render-queue-title strong {
  min-width: 58px;
  padding: 7px 10px;
  border-radius: 999px;
  color: #051512;
  font-size: 13px;
  text-align: center;
  background: linear-gradient(180deg, rgba(114,244,223,0.96), rgba(70,211,193,0.86));
}

.render-queue-copy {
  margin: 0;
  color: #aab8bd;
  font-size: 13px;
  line-height: 1.4;
}

.render-queue-frame,
.render-queue-meta {
  color: #99a7ad;
  font-size: 12px;
}

.render-progress-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.render-progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #72f4df, #d3b96d);
  box-shadow: 0 0 18px rgba(114,244,223,0.28);
  transition: width 120ms linear;
}

body.render-queue-active .pro-studio-shell {
  pointer-events: none;
}

body.render-queue-active .render-queue-panel,
body.render-queue-active .render-queue-panel * {
  pointer-events: auto;
}

.hotspot-layer.annotation-mode .hotspot {
  box-shadow: 0 0 0 7px rgba(114,244,223,0.12), 0 0 28px rgba(114,244,223,0.62);
}

.pro-studio-shell .primary-button {
  border-color: rgba(114,244,223,0.42);
  background: linear-gradient(180deg, rgba(114,244,223,0.92), rgba(70,211,193,0.82));
  color: #02110f;
  font-weight: 800;
  box-shadow: 0 0 28px rgba(114,244,223,0.22);
}

.pro-studio-shell .secondary-button {
  border-color: rgba(255,255,255,0.11);
  background: rgba(255,255,255,0.055);
  color: #dce4e7;
}

.pro-studio-shell .empty-overlay {
  z-index: 5;
  max-width: 380px;
  border: 1px solid rgba(114,244,223,0.24);
  border-radius: 18px;
  background: rgba(5,8,12,0.58);
}

.compact-title {
  margin-bottom: 10px;
}

.compact-title h2 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 1180px) {
  .pro-studio-shell {
    grid-template-columns: 260px minmax(0, 1fr) 320px;
  }

  .studio-topbar {
    grid-template-columns: 220px 210px minmax(220px, 1fr);
  }

  .tool-button {
    padding: 0 9px;
  }
}

@media (max-width: 1320px) {
  .studio-actions .ghost-tool {
    display: none;
  }

  .profile-pill {
    max-width: 144px;
  }
}

@media (max-width: 920px), (max-height: 560px) {
  html,
  body.route-studio,
  html:fullscreen,
  body.route-studio:fullscreen,
  html:-webkit-full-screen,
  body.route-studio:-webkit-full-screen {
    overflow: auto !important;
    height: auto !important;
  }

  .pro-studio-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(min(520px, 64vh), 64vh) auto auto auto;
    grid-template-areas:
      "top"
      "viewport"
      "left"
      "right"
      "bottom";
    height: auto;
    min-height: 100vh;
    padding: 10px;
    overflow: visible;
  }

  .studio-topbar {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 12px;
    border-radius: 18px;
  }

  .tool-cluster,
  .studio-actions,
  .tray-tabs {
    justify-content: start;
    overflow-x: auto;
  }

  .left-studio-panel,
  .right-inspector {
    border-radius: 16px;
    max-height: none;
    overflow: visible;
  }

  .pro-viewport {
    min-height: min(520px, 64vh);
  }

  .pro-viewport .canvas-host {
    min-height: min(520px, 64vh);
  }

  .viewport-camera-card {
    top: 12px;
    right: 12px;
    min-width: 138px;
    padding: 10px 12px;
  }

  .bottom-asset-tray {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    max-height: none;
    border-radius: 16px;
    overflow: visible;
  }

  .bottom-asset-tray .preset-saver-block,
  .bottom-asset-tray .variant-strip,
  .tray-tabs {
    grid-column: auto;
    grid-row: auto;
  }

  .studio-actions .profile-pill {
    flex: 1 0 100%;
    max-width: none;
  }
}

/* Responsive SaaS shell polish */
@media (max-width: 900px) {
  .page-container {
    max-height: none;
    min-height: 100vh;
    padding: 18px;
    overflow-x: hidden;
  }

  .home-nav {
    position: sticky;
    top: 12px;
    z-index: 20;
    gap: 14px;
    margin-bottom: 26px;
    padding: 14px 16px;
  }

  .nav-links {
    gap: 18px;
    margin-left: auto;
  }

  .hero-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    min-height: auto;
    margin-bottom: 46px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-copy h1 {
    max-width: 12ch;
    font-size: clamp(40px, 8vw, 62px);
  }

  .hero-copy p {
    max-width: 620px;
  }

  .hero-visual {
    width: min(100%, 560px);
    justify-self: center;
  }

  .hero-canvas-host {
    height: clamp(300px, 44vh, 430px);
  }

  .pricing-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  .dashboard-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .dashboard-sidebar {
    position: static;
  }

  .dashboard-tabs {
    flex-direction: row;
    overflow-x: auto;
  }

  .dashboard-plan-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .page-container {
    padding: 14px;
  }

  .home-nav {
    flex-wrap: wrap;
    justify-content: center;
    border-radius: 18px;
  }

  .logo {
    flex: 1 1 100%;
    text-align: center;
  }

  .nav-links {
    display: none;
  }

  .home-nav .secondary-button {
    width: 100%;
  }

  .hero-copy {
    align-items: stretch;
    gap: 16px;
  }

  .hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(36px, 12vw, 48px);
    letter-spacing: 0;
  }

  .hero-copy p {
    font-size: 15px;
    line-height: 1.5;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .hero-actions .primary-button,
  .hero-actions .secondary-button,
  .hero-actions .text-link {
    width: 100%;
    min-height: 44px;
  }

  .text-link {
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
  }

  .hero-visual {
    padding: 12px;
    border-radius: 20px;
  }

  .visual-header {
    align-items: flex-start;
    line-height: 1.25;
  }

  .hero-canvas-host {
    height: 300px;
  }

  .hero-swatch-panel {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .hero-swatches {
    width: 100%;
    justify-content: space-between;
  }

  .hero-swatch {
    width: 34px;
    height: 34px;
  }

  .home-section {
    padding: 42px 0;
  }

  .section-heading {
    margin-bottom: 24px;
    font-size: 24px;
    text-align: left;
  }

  .feature-card,
  .pricing-card,
  .owner-contact-card,
  .dashboard-content,
  .dashboard-sidebar {
    border-radius: 16px;
  }

  .pricing-card {
    padding: 28px 20px;
  }

  .price {
    font-size: 38px;
  }

  .owner-contact-card .hero-actions,
  .billing-static-hero .hero-actions {
    align-items: stretch;
  }

  .dashboard-plan-strip {
    grid-template-columns: 1fr;
  }

  .tab-header {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .asset-grid-list {
    grid-template-columns: 1fr;
  }

  .auth-card {
    max-height: calc(100vh - 28px);
    overflow: auto;
  }

  .billing-static-hero {
    padding: 26px 18px;
    border-radius: 20px;
  }

  .billing-static-hero h1 {
    font-size: clamp(34px, 11vw, 46px);
    line-height: 1;
  }

  .billing-static-hero p {
    font-size: 15px;
  }
}

@media (max-width: 430px) {
  .hero-copy h1 {
    max-width: 10ch;
  }

  .hero-canvas-host {
    height: 260px;
  }

  .pricing-card ul,
  .feature-card p {
    font-size: 13px;
  }

  .pro-studio-shell {
    padding: 10px;
  }

  .studio-topbar {
    gap: 10px;
    padding: 12px;
  }

  .live-project {
    display: none;
  }

  .studio-brand {
    width: 100%;
  }

  .tool-cluster {
    width: 100%;
    justify-content: space-between;
  }

  .tool-cluster .tool-button {
    flex: 1 1 0;
    min-width: 0;
  }

  .studio-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(76px, 0.8fr) minmax(92px, 1fr) minmax(96px, 1fr) 40px;
    align-items: center;
    gap: 8px;
    overflow: visible;
  }

  .studio-actions select,
  .studio-actions button {
    min-width: 0;
    padding-inline: 8px;
  }

  .profile-pill {
    grid-column: 1 / -1;
    width: 100%;
    height: auto;
    min-height: 40px;
    max-width: none;
    justify-content: space-between;
    padding: 4px 4px 4px 12px;
    overflow: hidden;
  }

  .profile-pill span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .profile-pill button {
    flex: 0 0 auto;
  }

  .pro-viewport {
    min-height: min(560px, 70vh);
  }

  .pro-viewport .canvas-host {
    min-height: min(560px, 70vh);
    border-radius: 18px;
  }

  .right-inspector,
  .left-studio-panel {
    padding: 14px;
  }

  .pro-studio-shell .control-row,
  .pro-studio-shell .texture-grid label {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .texture-transform-grid,
  .texture-transform-grid.compact,
  .texture-toggle-row,
  .texture-zone-row,
  .texture-preview-list {
    grid-template-columns: 1fr;
  }

  .inspector-header,
  .export-panel-header,
  .render-queue-title,
  .tray-heading {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .export-options {
    grid-template-columns: 1fr;
  }

  .bottom-asset-tray {
    padding: 12px;
  }

  .tray-section {
    max-height: none;
    overflow: visible;
  }

  .bottom-asset-tray .variant-strip {
    min-height: 104px;
    overflow-x: auto;
  }

}

/* Landing final overrides: keep legacy home styles from shrinking the new page. */
body.route-home .landing-page {
  width: min(100% - 36px, 1360px);
  max-width: 1360px;
  padding-top: 24px;
}

body.route-home .landing-hero {
  display: grid;
  grid-template-columns: minmax(360px, 0.78fr) minmax(520px, 1.22fr);
  min-height: calc(100vh - 112px);
}

body.route-home .landing-hero-copy h1 {
  max-width: 11ch;
  font-size: clamp(46px, 5.7vw, 92px);
  line-height: 0.98;
  letter-spacing: 0;
}

body.route-home .landing-hero-copy p {
  max-width: 560px;
  font-size: clamp(16px, 1.55vw, 20px);
}

@media (max-width: 1120px) {
  body.route-home .landing-hero {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  body.route-home .landing-page {
    width: min(100% - 28px, 1360px);
  }

  body.route-home .landing-hero {
    min-height: auto;
  }

  body.route-home .landing-hero-copy h1 {
    max-width: 11ch;
    font-size: clamp(42px, 13vw, 62px);
  }
}

/* Reference landing lock - match supplied UI reference closely. */
body.route-home {
  background:
    radial-gradient(circle at 52% 20%, rgba(0, 212, 255, 0.16), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(97, 244, 231, 0.08), transparent 30%),
    #020912;
}

body.route-home::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,212,255,0.035) 1px, transparent 1px), linear-gradient(rgba(0,212,255,0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 72%);
}

body.route-home .landing-page {
  width: min(100% - 112px, 1280px);
  max-width: 1280px;
  padding-top: 26px;
  color: #fff;
}

body.route-home .landing-nav {
  min-height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  grid-template-columns: 220px 1fr 240px;
}

body.route-home .landing-logo {
  gap: 10px;
  font-size: 16px;
  line-height: 0.92;
  text-transform: uppercase;
}

body.route-home .landing-logo img {
  width: 38px;
  height: 38px;
}

body.route-home .landing-logo span {
  display: block;
  max-width: 118px;
  white-space: normal;
}

body.route-home .landing-page .nav-links {
  display: flex;
  justify-content: center;
  gap: 42px;
}

body.route-home .landing-page .nav-links a,
body.route-home .landing-login {
  color: rgba(255,255,255,0.86);
  font-size: 13px;
  font-weight: 700;
}

body.route-home .landing-nav-actions {
  justify-content: flex-end;
  gap: 18px;
}

body.route-home .landing-nav-cta,
body.route-home .landing-hero .primary-button,
body.route-home .final-cta .primary-button {
  min-height: 48px;
  padding: 0 30px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #6cf7ec, #28d8e8);
  color: #031015;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 0 32px rgba(0,212,255,0.32);
}

body.route-home .landing-hero {
  grid-template-columns: 460px minmax(0, 1fr);
  gap: 48px;
  min-height: auto;
  padding: 66px 0 34px;
  align-items: center;
}

body.route-home .landing-hero-copy {
  gap: 22px;
  max-width: 460px;
}

body.route-home .landing-hero-copy .badge {
  width: max-content;
  padding: 7px 16px;
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: 999px;
  background: rgba(2,9,18,0.74);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

body.route-home .landing-hero-copy h1 {
  max-width: 450px;
  font-size: 54px;
  line-height: 1.04;
  font-weight: 900;
  letter-spacing: 0;
}

body.route-home .landing-hero-copy h1 span {
  color: #00d4ff;
}

body.route-home .landing-hero-copy p {
  max-width: 420px;
  margin: 0;
  color: #d7e3ea;
  font-size: 16px;
  line-height: 1.55;
}

body.route-home .landing-hero .hero-actions {
  gap: 16px;
}

body.route-home .watch-demo-button {
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid rgba(255,255,255,0.42);
  border-radius: 10px;
  background: rgba(2,9,18,0.55);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

body.route-home .creator-proof {
  margin-top: 2px;
  gap: 18px;
}

body.route-home .avatar-stack span {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #f5d7bd, #7dece5);
}

body.route-home .creator-proof p {
  max-width: 230px;
  color: #aebecb;
  line-height: 1.3;
}

body.route-home .landing-video-frame {
  min-height: 482px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(97,244,231,0.18);
  background: rgba(4, 12, 22, 0.86);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 34px 90px rgba(0,212,255,0.16);
}

body.route-home .mock-window-bar {
  height: 34px;
  display: grid;
  grid-template-columns: 1fr repeat(5, 30px);
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: #9bb8c4;
  font-size: 11px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

body.route-home .mock-window-bar span {
  height: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
}

body.route-home .hero-software-grid {
  height: 420px;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) 128px;
  grid-template-rows: minmax(0, 1fr) 58px;
  gap: 10px;
  padding-top: 10px;
}

body.route-home .hero-software-sidebar,
body.route-home .hero-software-inspector,
body.route-home .hero-timeline,
body.route-home .hero-video-stage {
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  background: rgba(0,0,0,0.22);
}

body.route-home .hero-software-sidebar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  align-content: start;
  padding: 12px;
}

body.route-home .hero-software-sidebar strong {
  grid-column: 1 / -1;
  color: #61f4e7;
  font-size: 10px;
}

body.route-home .hero-software-sidebar span {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 28%, #fff, #b88b3e 42%, #15242a 76%);
}

body.route-home .hero-software-sidebar span:nth-child(3n) { background: radial-gradient(circle at 35% 28%, #fff, #77b4bf 42%, #0c252b 76%); }
body.route-home .hero-software-sidebar span:nth-child(4n) { background: radial-gradient(circle at 35% 28%, #fff, #eee2c8 44%, #334 78%); }

body.route-home .hero-video-stage {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at center, rgba(97,244,231,0.24), transparent 36%), #07111c;
}

body.route-home .hero-video-stage::before {
  content: "";
  position: absolute;
  width: 340px;
  height: 340px;
  border: 5px solid rgba(97,244,231,0.82);
  border-radius: 999px;
  box-shadow: 0 0 52px rgba(97,244,231,0.44);
}

body.route-home .hero-video-stage video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

body.route-home .hero-software-inspector {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 12px;
}

body.route-home .hero-software-inspector strong {
  color: #61f4e7;
  font-size: 10px;
}

body.route-home .hero-software-inspector span {
  display: block;
  min-height: 44px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
  color: #d6e4e8;
  font-size: 10px;
}

body.route-home .hero-software-inspector button {
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: #37e5df;
  color: #031015;
  font-weight: 900;
}

body.route-home .hero-timeline {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 34px repeat(8, minmax(0, 1fr));
  gap: 8px;
  padding: 9px;
}

body.route-home .hero-timeline button,
body.route-home .hero-timeline span {
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(216,194,138,0.2), rgba(6,19,27,0.95));
}

body.route-home .floating-chip { display: none; }

body.route-home .proof-strip {
  width: min(100% - 58px, 1140px);
  margin: 0 auto 0;
  padding: 0;
  gap: 0;
  border: 1px solid rgba(97,244,231,0.16);
  border-radius: 18px;
  background: rgba(8,19,36,0.64);
  overflow: hidden;
}

body.route-home .proof-strip article {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  align-items: center;
  min-height: 88px;
  padding: 18px 28px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,0.06);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.route-home .proof-strip i,
body.route-home .industry-grid i,
body.route-home .feature-icon {
  display: grid;
  place-items: center;
  border: 1px solid rgba(97,244,231,0.22);
  background: rgba(0,212,255,0.10);
  box-shadow: inset 0 0 22px rgba(97,244,231,0.08);
}

body.route-home .proof-strip i {
  width: 38px;
  height: 38px;
  border-radius: 999px;
}

body.route-home .proof-strip i::before,
body.route-home .industry-grid i::before,
body.route-home .feature-icon::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid #61f4e7;
  border-radius: 4px;
}

body.route-home .proof-strip strong {
  color: #61f4e7;
  font-size: 24px;
  line-height: 1;
}

body.route-home .proof-strip span {
  display: block;
  margin-top: 4px;
  color: #c5d2dc;
  font-size: 13px;
}

body.route-home .landing-page .home-section {
  padding-top: 36px;
}

body.route-home .landing-page .section-heading {
  margin-bottom: 24px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
}

body.route-home .industry-grid {
  width: min(100% - 54px, 1120px);
  margin: 0 auto;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 18px;
}

body.route-home .industry-grid article {
  min-height: 98px;
  padding: 14px 10px;
  display: grid;
  place-items: center;
  gap: 10px;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}

body.route-home .industry-grid i {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

body.route-home .landing-features {
  width: min(100% - 86px, 1080px);
  margin: 0 auto;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px 42px;
}

body.route-home .landing-page .feature-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  padding: 20px 24px;
  border-radius: 10px;
}

body.route-home .landing-page .feature-card h3,
body.route-home .landing-page .feature-card p {
  grid-column: 2;
  margin: 0;
}

body.route-home .landing-page .feature-card h3 {
  font-size: 16px;
}

body.route-home .landing-page .feature-card p {
  max-width: 230px;
  color: #c5d2dc;
  font-size: 13px;
  line-height: 1.35;
}

body.route-home .landing-page .feature-icon {
  grid-row: 1 / span 2;
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

body.route-home .showcase-gallery {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

body.route-home .showcase-gallery article {
  min-height: 248px;
  border-radius: 10px;
  background: radial-gradient(circle at 50% 34%, rgba(97,244,231,0.18), transparent 28%), #081324;
}

body.route-home .showcase-gallery article:nth-child(1) { background: linear-gradient(145deg, #120c09, #09111b); }
body.route-home .showcase-gallery article:nth-child(2) { background: linear-gradient(145deg, #e9dfcf, #132029); }
body.route-home .showcase-gallery article:nth-child(3) { background: linear-gradient(145deg, #d9dde0, #0a141d); }
body.route-home .showcase-gallery article:nth-child(4) { background: linear-gradient(145deg, #cbd9d0, #07151e); }
body.route-home .showcase-gallery article:nth-child(5) { background: linear-gradient(145deg, #f5f8fa, #0a1620); }

body.route-home .workflow-line {
  width: min(100% - 54px, 1120px);
  margin: 0 auto;
  position: relative;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border: 1px solid rgba(97,244,231,0.16);
  border-radius: 14px;
  background: rgba(8,19,36,0.62);
}

body.route-home .workflow-line article {
  min-height: 130px;
  padding: 42px 24px 20px;
  border: 0;
  border-right: 1px solid rgba(255,255,255,0.06);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.route-home .workflow-line strong {
  position: absolute;
  top: -19px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(97,244,231,0.5);
  border-radius: 999px;
  background: #082032;
  font-size: 16px;
}

body.route-home .workflow-line h3 { font-size: 14px; }
body.route-home .workflow-line p { font-size: 12px; line-height: 1.35; }

body.route-home .why-section {
  grid-template-columns: minmax(0, 610px) minmax(0, 560px);
  gap: 54px;
  align-items: center;
}

body.route-home .comparison-card {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

body.route-home .comparison-card h2 {
  margin: 0 0 14px;
  font-size: 27px;
}

body.route-home .comparison-grid {
  padding: 24px;
  border: 1px solid rgba(97,244,231,0.24);
  border-radius: 15px;
  background: rgba(8,19,36,0.64);
}

body.route-home .software-preview {
  min-height: 260px;
  border: 0;
  background: radial-gradient(circle at 0% 50%, rgba(0,212,255,0.45), transparent 18%), transparent;
  box-shadow: none;
}

body.route-home .software-preview video {
  min-height: 260px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 28px 90px rgba(0,212,255,0.2);
}

body.route-home .live-demo-mockup {
  display: none;
}

body.route-home .pricing-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

body.route-home .pricing-title-row .section-heading {
  margin: 0;
}

body.route-home .pricing-title-row span {
  padding: 6px 16px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 999px;
  color: #dce8ee;
  font-size: 13px;
}

body.route-home .landing-pricing {
  grid-template-columns: 1fr 1.2fr 1fr 0.92fr;
  gap: 22px;
  margin-top: 20px;
}

body.route-home .landing-pricing .pricing-card,
body.route-home .pricing-support {
  min-height: 310px;
  padding: 24px;
  border-radius: 10px;
}

body.route-home .landing-pricing .pricing-card.featured {
  border-color: rgba(216,194,138,0.56);
}

body.route-home .landing-pricing .price {
  font-size: 42px;
}

body.route-home .landing-pricing ul li {
  margin: 8px 0;
  color: #d7e3ea;
  font-size: 13px;
}

body.route-home .pricing-support {
  display: grid;
  align-content: center;
  gap: 18px;
}

body.route-home .pricing-support p {
  margin: 0;
  padding: 14px 14px 14px 48px;
  border-radius: 10px;
  background: rgba(255,255,255,0.035);
  color: #fff;
  font-size: 13px;
  position: relative;
}

body.route-home .pricing-support p::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid #61f4e7;
  border-radius: 6px;
  transform: translateY(-50%);
}

body.route-home .faq-section {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 34px;
  align-items: start;
}

body.route-home .faq-section .section-heading {
  text-align: left;
  margin: 0;
}

body.route-home .faq-list {
  max-width: none;
}

body.route-home .faq-list details {
  padding: 14px 18px;
  border-radius: 8px;
}

body.route-home .final-cta {
  grid-template-columns: 1fr 300px;
  min-height: 250px;
  margin-top: 28px;
  border-radius: 14px;
  background: radial-gradient(circle at 80% 38%, rgba(97,244,231,0.22), transparent 26%), linear-gradient(180deg, rgba(8,19,36,0.82), rgba(6,13,24,0.68));
}

body.route-home .final-cta h2 {
  max-width: 480px;
  font-size: 34px;
}

body.route-home .final-cta img {
  width: 220px;
}

body.route-home .landing-footer {
  grid-template-columns: 260px 1fr;
  padding-top: 32px;
}

@media (max-width: 1120px) {
  body.route-home .landing-page { width: min(100% - 34px, 1280px); }
  body.route-home .landing-nav { grid-template-columns: 1fr auto; }
  body.route-home .landing-page .nav-links { display: none; }
  body.route-home .landing-hero,
  body.route-home .why-section,
  body.route-home .faq-section { grid-template-columns: 1fr; }
  body.route-home .landing-pricing { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body.route-home .industry-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  body.route-home .landing-features { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
}

@media (max-width: 720px) {
  body.route-home .landing-page { width: min(100% - 24px, 1280px); }
  body.route-home .landing-nav { grid-template-columns: 1fr; }
  body.route-home .landing-nav-actions { grid-template-columns: 1fr 1fr; }
  body.route-home .landing-hero { padding-top: 38px; }
  body.route-home .landing-hero-copy h1 { font-size: 43px; }
  body.route-home .landing-video-frame { min-height: auto; padding: 8px; }
  body.route-home .hero-software-grid { grid-template-columns: 1fr; grid-template-rows: 280px 58px; height: auto; }
  body.route-home .hero-software-sidebar,
  body.route-home .hero-software-inspector { display: none; }
  body.route-home .hero-video-stage,
  body.route-home .hero-timeline { grid-column: 1; }
  body.route-home .proof-strip,
  body.route-home .industry-grid,
  body.route-home .showcase-gallery,
  body.route-home .workflow-line,
  body.route-home .landing-pricing,
  body.route-home .final-cta,
  body.route-home .landing-footer { grid-template-columns: 1fr; width: 100%; }
  body.route-home .landing-features { grid-template-columns: 1fr; }
  body.route-home .workflow-line article { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
  body.route-home .workflow-line strong { position: static; margin-bottom: 12px; }
  body.route-home .faq-section { grid-template-columns: 1fr; }
}

/* Exact reference correction: large logo, clean video-only hero, product image cards. */
body.route-home .landing-nav {
  grid-template-columns: 210px 1fr 240px;
}

body.route-home .landing-logo {
  width: 190px;
  min-height: 50px;
  gap: 0;
}

body.route-home .landing-logo img {
  width: 176px;
  height: auto;
  max-height: 54px;
  object-fit: contain;
  filter: drop-shadow(0 0 14px rgba(97,244,231,0.16));
}

body.route-home .landing-logo span {
  display: none;
}

body.route-home .landing-video-frame {
  min-height: 482px;
  padding: 0;
  overflow: hidden;
  border-radius: 13px;
  border: 1px solid rgba(97,244,231,0.22);
  background: #03101b;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 34px 90px rgba(0,212,255,0.18);
}

body.route-home .landing-video-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.08), inset 0 -80px 110px rgba(2,9,18,0.18);
}

body.route-home .landing-video-frame video {
  display: block;
  width: 100%;
  height: 482px;
  min-height: 482px;
  object-fit: cover;
  object-position: center center;
  border-radius: inherit;
}

body.route-home .mock-window-bar,
body.route-home .hero-software-grid,
body.route-home .hero-software-sidebar,
body.route-home .hero-software-inspector,
body.route-home .hero-video-stage,
body.route-home .hero-timeline,
body.route-home .floating-chip {
  display: none !important;
}

body.route-home .showcase-gallery article.product-shot {
  position: relative;
  isolation: isolate;
  min-height: 248px;
  overflow: hidden;
  border-radius: 10px;
  background: #081324;
}

body.route-home .showcase-gallery article.product-shot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background: radial-gradient(circle at 50% 30%, rgba(255,255,255,0.38), transparent 20%), linear-gradient(145deg, #121820, #050a10);
}

body.route-home .showcase-gallery article.product-shot::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 50px;
  z-index: -1;
  width: 86px;
  height: 152px;
  transform: translateX(-50%);
  filter: drop-shadow(0 28px 34px rgba(0,0,0,0.42));
}

body.route-home .showcase-gallery article.product-shot i {
  position: absolute;
  left: 50%;
  bottom: 72px;
  display: block;
  z-index: 1;
  transform: translateX(-50%);
}

body.route-home .product-shot.perfume::before { background: radial-gradient(circle at 50% 35%, rgba(216,194,138,0.42), transparent 24%), linear-gradient(145deg, #170f0c, #04070c); }
body.route-home .product-shot.perfume::after { width: 92px; height: 150px; border-radius: 13px; background: linear-gradient(180deg, #d8b052 0 18px, #101013 18px 100%); }
body.route-home .product-shot.perfume i { width: 56px; height: 78px; border: 1px solid rgba(216,194,138,0.55); background: linear-gradient(180deg, #3b2608, #0a0a0b); }

body.route-home .product-shot.dropper::before { background: linear-gradient(145deg, #ded7ca, #f8f5ed 48%, #d0c4b4); }
body.route-home .product-shot.dropper::after { width: 62px; height: 160px; border-radius: 15px 15px 10px 10px; background: linear-gradient(180deg, #171717 0 34px, #f4ede0 34px 100%); }
body.route-home .product-shot.dropper i { width: 40px; height: 58px; border-radius: 4px; background: linear-gradient(180deg, #fffaf0, #c89a55); }

body.route-home .product-shot.jar::before { background: linear-gradient(145deg, #eef1f2, #b8c0c4 46%, #f4f6f7); }
body.route-home .product-shot.jar::after { width: 112px; height: 92px; border-radius: 10px 10px 22px 22px; background: linear-gradient(180deg, #111 0 20px, #f5f0e7 20px 100%); }
body.route-home .product-shot.jar i { width: 68px; height: 30px; border-radius: 4px; background: #ded6c9; }

body.route-home .product-shot.supplement::before { background: linear-gradient(145deg, #c7d4cc, #7a8c86 48%, #dce7df); }
body.route-home .product-shot.supplement::after { width: 84px; height: 150px; border-radius: 22px 22px 12px 12px; background: linear-gradient(180deg, #121b12 0 30px, #5f8e38 30px 100%); }
body.route-home .product-shot.supplement i { width: 58px; height: 62px; border-radius: 6px; background: linear-gradient(180deg, #17340f, #d8c28a); }

body.route-home .product-shot.blue::before { background: linear-gradient(145deg, #f8fbff, #dfe5ea 50%, #ffffff); }
body.route-home .product-shot.blue::after { width: 66px; height: 160px; border-radius: 16px 16px 9px 9px; background: linear-gradient(180deg, #0b0d10 0 36px, #00a3bb 36px 100%); }
body.route-home .product-shot.blue i { width: 44px; height: 66px; border-radius: 5px; background: linear-gradient(180deg, #dff6f4, #0d7890); }

body.route-home .showcase-gallery article.product-shot span {
  z-index: 3;
  bottom: 18px;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.45);
}

@media (max-width: 1120px) {
  body.route-home .landing-nav {
    grid-template-columns: 1fr auto;
  }

  body.route-home .landing-logo {
    width: 176px;
  }
}

@media (max-width: 720px) {
  body.route-home .landing-logo,
  body.route-home .landing-logo img {
    width: 154px;
  }

  body.route-home .landing-video-frame,
  body.route-home .landing-video-frame video {
    min-height: 300px;
    height: 300px;
  }
}

/* Generated landing image assets wiring. */
body.route-home .showcase-gallery article.product-shot {
  padding: 0;
  background: #081324;
}

body.route-home .showcase-gallery article.product-shot::before,
body.route-home .showcase-gallery article.product-shot::after,
body.route-home .showcase-gallery article.product-shot i {
  display: none !important;
}

body.route-home .showcase-gallery article.product-shot img {
  display: block;
  width: 100%;
  height: 248px;
  object-fit: cover;
  border-radius: inherit;
  transition: transform 260ms ease;
}

body.route-home .showcase-gallery article.product-shot:hover img {
  transform: scale(1.035);
}

body.route-home .showcase-gallery article.product-shot span {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  color: #fff;
  font-weight: 900;
  text-align: center;
  text-shadow: 0 3px 16px rgba(0,0,0,0.55);
}

body.route-home .showcase-gallery article.product-shot::marker {
  display: none;
}

body.route-home .final-cta > img {
  width: min(100%, 330px);
  max-height: 250px;
  object-fit: contain;
  filter: drop-shadow(0 0 42px rgba(97,244,231,0.28));
}

@media (max-width: 720px) {
  body.route-home .showcase-gallery article.product-shot img {
    height: 230px;
  }
}

/* UI kit asset path integration. */
body.route-home .landing-video-frame .dashboard-preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
}

body.route-home .landing-video-frame video {
  position: relative;
  z-index: 1;
  opacity: .98;
  mix-blend-mode: normal;
}

body.route-home .software-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  box-shadow: 0 28px 90px rgba(0,212,255,0.2);
}

body.route-home .landing-footer .landing-logo img {
  width: 168px;
}

/* Home page real icon system. */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

body.route-home .proof-strip i::before,
body.route-home .industry-grid i::before,
body.route-home .feature-icon::before,
body.route-home .pricing-support p::before {
  content: none !important;
  display: none !important;
}

body.route-home .proof-strip i,
body.route-home .industry-grid i,
body.route-home .feature-icon {
  display: grid;
  place-items: center;
  color: #35F7FF;
}

body.route-home .proof-strip svg,
body.route-home .industry-grid svg,
body.route-home .feature-icon svg,
body.route-home .pricing-support svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 8px rgba(53,247,255,0.36));
}

body.route-home .industry-grid svg {
  width: 24px;
  height: 24px;
}

body.route-home .feature-icon svg {
  width: 25px;
  height: 25px;
}

body.route-home .pricing-support p {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-left: 14px;
}

body.route-home .pricing-support p svg {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  padding: 8px;
  box-sizing: content-box;
  border: 1px solid rgba(120,255,255,0.18);
  border-radius: 10px;
  background: rgba(53,247,255,0.08);
  color: #35F7FF;
}

/* Header overlap fix for landing page scrolling. */
html {
  scroll-padding-top: 112px;
}

body.route-home .landing-page {
  --landing-nav-height: 72px;
}

body.route-home .landing-nav {
  position: sticky !important;
  top: 14px !important;
  z-index: 200 !important;
  min-height: var(--landing-nav-height) !important;
  padding: 10px 18px !important;
  border: 1px solid rgba(120,255,255,0.16) !important;
  border-radius: 18px !important;
  background: linear-gradient(180deg, rgba(3, 12, 22, 0.92), rgba(3, 10, 18, 0.84)) !important;
  box-shadow: 0 14px 44px rgba(0,0,0,0.38), 0 0 0 1px rgba(255,255,255,0.035) !important;
  backdrop-filter: blur(22px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(140%) !important;
}

body.route-home .landing-nav::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: -14px;
  height: 14px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(2,8,17,0.44), transparent);
}

body.route-home .landing-hero {
  padding-top: 64px !important;
}

body.route-home #assets,
body.route-home #features,
body.route-home #examples,
body.route-home #pricing,
body.route-home #faq,
body.route-home .home-section,
body.route-home .final-cta {
  scroll-margin-top: 112px;
}

body.route-home .workflow-line strong {
  z-index: 1;
}

@media (max-width: 720px) {
  html {
    scroll-padding-top: 150px;
  }

  body.route-home .landing-page {
    --landing-nav-height: auto;
  }

  body.route-home .landing-nav {
    top: 8px !important;
  }

  body.route-home #assets,
  body.route-home #features,
  body.route-home #examples,
  body.route-home #pricing,
  body.route-home #faq,
  body.route-home .home-section,
  body.route-home .final-cta {
    scroll-margin-top: 150px;
  }
}

/* Hero CTA polish: reference-style horizontal buttons. */
body.route-home .landing-hero .hero-actions {
  display: flex !important;
  align-items: center !important;
  flex-wrap: wrap;
  gap: 16px !important;
  margin-top: 2px;
}

body.route-home .landing-hero .hero-actions .primary-button,
body.route-home .landing-hero .watch-demo-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  height: 52px !important;
  min-height: 52px !important;
  padding: 0 28px !important;
  border-radius: 12px !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}

body.route-home .landing-hero .hero-actions .primary-button span {
  display: inline-block;
  font-size: 17px;
  line-height: 1;
  transform: translateY(-1px);
}

body.route-home .landing-hero .watch-demo-button {
  min-width: 178px;
  border: 1px solid rgba(255,255,255,0.38) !important;
  background: rgba(2, 8, 17, 0.55) !important;
  color: #fff !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

body.route-home .landing-hero .watch-demo-button:hover {
  border-color: rgba(53,247,255,0.78) !important;
  box-shadow: 0 0 28px rgba(53,247,255,0.18), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

body.route-home .landing-hero .watch-demo-button span {
  flex: 0 0 auto !important;
  display: inline-grid !important;
  place-items: center !important;
  width: 30px !important;
  height: 30px !important;
  margin: 0 !important;
  border: 1px solid rgba(255,255,255,0.72) !important;
  border-radius: 999px !important;
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

body.route-home .landing-hero .watch-demo-button span::before {
  content: "" !important;
  width: 0 !important;
  height: 0 !important;
  margin-left: 2px !important;
  border-top: 6px solid transparent !important;
  border-bottom: 6px solid transparent !important;
  border-left: 9px solid #fff !important;
}

@media (max-width: 520px) {
  body.route-home .landing-hero .hero-actions {
    align-items: stretch !important;
    flex-direction: column !important;
  }

  body.route-home .landing-hero .hero-actions .primary-button,
  body.route-home .landing-hero .watch-demo-button {
    width: 100% !important;
  }
}
/* Tabbed bottom studio tray: one focused panel at a time. */
.bottom-asset-tray {
  grid-template-columns: 112px minmax(0, 1fr) !important;
  align-items: stretch !important;
  min-height: 0 !important;
  height: var(--bottom-tray-height) !important;
  max-height: var(--bottom-tray-height) !important;
  padding: 10px 14px !important;
  overflow: visible !important;
}

.tray-toggle-rail {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 0 10px 0 0;
  border-right: 1px solid rgba(255,255,255,0.08);
}

.tray-toggle-rail button {
  min-height: 38px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.045);
  color: #aeb9c2;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.tray-toggle-rail button:hover,
.tray-toggle-rail button.is-active {
  color: #061011;
  border-color: rgba(114,244,223,0.7);
  background: linear-gradient(135deg, #72f4df, #37d4c7);
  box-shadow: 0 10px 28px rgba(55,212,199,0.18);
}

.bottom-asset-tray .tray-section {
  display: none !important;
  min-width: 0;
}

.bottom-asset-tray .tray-section.is-active {
  display: grid !important;
}

.bottom-asset-tray .tray-section.is-active.material-tray-section,
.bottom-asset-tray .tray-section.is-active.hdri-tray-section {
  grid-template-rows: 22px minmax(0, 1fr);
  gap: 8px;
}

.bottom-asset-tray .variant-strip {
  min-height: 0;
  height: 108px;
  overflow-x: auto;
  overflow-y: hidden;
}

.bottom-asset-tray .variant-strip button {
  min-width: 82px;
  max-width: 96px;
  min-height: 104px;
  height: 104px;
}

.bottom-asset-tray .tray-heading {
  min-height: 22px;
}

.bottom-asset-tray .export-panel.is-active {
  grid-template-rows: auto auto auto auto;
  align-content: start;
  gap: 10px;
  overflow: visible;
}

.bottom-asset-tray .export-settings {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.bottom-asset-tray .export-settings label,
.bottom-asset-tray .export-settings select {
  min-height: 0;
}

.bottom-asset-tray .export-actions {
  grid-template-columns: minmax(0, 1fr) 180px;
}

.bottom-asset-tray #exportPanel.is-locked::after {
  pointer-events: none;
  inset: 34px 0 0;
}

.single-export-mode {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid rgba(114,244,223,0.22);
  border-radius: 12px;
  background: rgba(114,244,223,0.08);
  color: #e9fffc;
  font-size: 13px;
  font-weight: 800;
}

.single-export-mode span::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin: 0 10px 0 12px;
  border-radius: 999px;
  background: #72f4df;
  box-shadow: 0 0 12px rgba(114,244,223,0.75);
}

@media (max-width: 900px) {
  .bottom-asset-tray {
    grid-template-columns: 1fr !important;
    height: auto !important;
    max-height: 260px !important;
    overflow: auto !important;
  }

  .tray-toggle-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
}

/* Premium Product Photography Lighting System Styles */
.lighting-ui-container {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.lighting-ui-container.is-active {
  display: flex !important;
}

.lighting-ui-container .editor-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.028);
}

.lighting-ui-container h3 {
  margin: 0 0 6px 0;
  font-size: 13px;
  color: var(--studio-accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  padding-bottom: 4px;
}

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

.preset-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5da;
  font-size: 11px;
  font-weight: 700;
  text-align: left;
  transition: all 0.2s ease;
  cursor: pointer;
  height: 44px;
}

.preset-btn:hover {
  border-color: rgba(114, 244, 223, 0.4);
  background: rgba(114, 244, 223, 0.08);
  color: #efffff;
}

.preset-btn.is-active {
  border-color: var(--studio-accent);
  background: rgba(114, 244, 223, 0.15);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(114, 244, 223, 0.2);
}

.preset-thumb {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.3), 0 2px 4px rgba(0,0,0,0.4);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}

.slider-group label.control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.slider-group label.control-row span {
  font-size: 12px;
  color: #b7c1c7;
}

.slider-val {
  background: rgba(114, 244, 223, 0.1);
  border: 1px solid rgba(114, 244, 223, 0.2);
  color: var(--studio-accent);
  font-family: monospace;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  font-weight: bold;
}

.light-control-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.015);
}

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

.bg-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5da;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.bg-mode-btn:hover {
  border-color: rgba(114, 244, 223, 0.4);
  background: rgba(114, 244, 223, 0.08);
  color: #efffff;
}

.bg-mode-btn.is-active {
  border-color: var(--studio-accent);
  background: rgba(114, 244, 223, 0.15);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(114, 244, 223, 0.2);
}

.action-btn-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.full-width-btn {
  width: 100%;
  height: 42px;
  font-weight: 800;
}

/* Premium Material Library & Advanced Controls Styles */
.bottom-asset-tray .tray-section.is-active.material-library-active {
  display: flex !important;
  flex-direction: column !important;
  grid-template-rows: none !important;
  gap: 12px;
  height: 100%;
}

/* Two Column Material Library Layout */
.library-two-column-layout {
  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  gap: 16px !important;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.library-model-materials-column {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding-right: 14px;
  min-height: 0;
  height: 100%;
  flex-shrink: 0 !important;
}

.column-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--studio-accent);
  text-transform: uppercase;
}

.lib-model-materials-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lib-model-material-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
  color: #cbd5da;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  width: 100%;
  box-sizing: border-box;
}

.lib-model-material-btn:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(114,244,223,0.25);
  color: #ffffff;
}

.lib-model-material-btn.is-active {
  background: rgba(114,244,223,0.1);
  border-color: var(--studio-accent);
  color: #ffffff;
}

.lib-model-material-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(0,0,0,0.5);
  flex-shrink: 0;
}

.lib-model-material-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-grow: 1;
}

.lib-model-material-empty {
  text-align: center;
  padding: 12px 0;
  color: #71818d;
  font-size: 11px;
}

.library-presets-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  height: 100%;
}


.library-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-shrink: 0 !important;
}

.library-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.library-title {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #efffff;
}

.preserve-textures-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.preserve-textures-toggle input[type="checkbox"] {
  appearance: none;
  width: 32px;
  height: 18px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 99px;
  background: rgba(255,255,255,0.07);
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.preserve-textures-toggle input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #88939a;
  transition: all 0.2s ease;
}

.preserve-textures-toggle input[type="checkbox"]:checked {
  background: rgba(114,244,223,0.18);
  border-color: rgba(114,244,223,0.48);
}

.preserve-textures-toggle input[type="checkbox"]:checked::before {
  transform: translateX(14px);
  background: var(--studio-accent);
  box-shadow: 0 0 10px rgba(114,244,223,0.5);
}

.preserve-textures-toggle span {
  font-size: 11px;
  color: #b7c1c7;
}

.library-search-row input {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  background: rgba(0,0,0,0.4);
  color: #eef7f7;
  padding: 0 12px;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s ease;
}

.library-search-row input:focus {
  border-color: var(--studio-accent);
}

.library-tabs-rail {
  display: flex !important;
  gap: 6px !important;
  overflow-x: auto !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
  flex-shrink: 0 !important;
  min-height: 34px !important;
}

.library-tabs-rail::-webkit-scrollbar {
  height: 3px;
}

.library-tabs-rail::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
}

.library-tab-btn {
  flex-shrink: 0;
  height: 28px;
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  color: #9aa6ad;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.library-tab-btn:hover {
  background: rgba(255,255,255,0.06);
  color: #efffff;
}

.library-tab-btn.is-active {
  border-color: rgba(114,244,223,0.34);
  background: rgba(114,244,223,0.1);
  color: var(--studio-accent);
}

.library-grid-container {
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  padding: 2px;
}

.library-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px 0;
  color: #71818d;
  font-size: 12px;
}

.library-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 8px;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.library-card:hover {
  border-color: rgba(114,244,223,0.3);
  transform: translateY(-2px);
  background: rgba(0,0,0,0.55);
}

.library-swatch {
  width: 100%;
  height: 64px;
  border-radius: 8px;
  box-shadow: inset 0 1px 3px rgba(255,255,255,0.15), 0 4px 8px rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.08);
}

.library-card-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.library-card-name {
  font-size: 11px;
  font-weight: 700;
  color: #efffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.library-card-category {
  font-size: 9px;
  color: #71818d;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.library-card-actions {
  display: flex;
  gap: 4px;
  margin-top: 2px;
}

.library-apply-btn {
  flex: 1;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(114,244,223,0.25);
  background: rgba(114,244,223,0.07);
  color: var(--studio-accent);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.library-apply-btn:hover {
  background: var(--studio-accent);
  color: #0c1219;
}

.library-fav-btn, .library-delete-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  cursor: pointer;
  transition: all 0.15s ease;
}

.library-fav-btn svg, .library-delete-btn svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: #8ea0a8;
  stroke-width: 2px;
  transition: stroke 0.15s ease, fill 0.15s ease;
}

.library-fav-btn:hover {
  border-color: rgba(255, 78, 100, 0.4);
  background: rgba(255, 78, 100, 0.08);
}

.library-fav-btn:hover svg {
  stroke: #ff4e64;
}

.library-fav-btn.is-favorite {
  border-color: rgba(255, 78, 100, 0.5);
  background: rgba(255, 78, 100, 0.15);
}

.library-fav-btn.is-favorite svg {
  stroke: #ff4e64;
  fill: #ff4e64;
}

.library-delete-btn:hover {
  border-color: rgba(245, 78, 78, 0.4);
  background: rgba(245, 78, 78, 0.08);
}

.library-delete-btn:hover svg {
  stroke: #f54e4e;
}

.library-footer {
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 8px;
  flex-shrink: 0 !important;
}

.library-footer button {
  height: 32px;
  padding: 0 16px;
  font-size: 11px;
}

/* Advanced physical parameters inspector styles */
.advanced-physical-controls {
  animation: studioFade 220ms ease both;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 14px !important;
  margin-top: 6px;
}

.advanced-physical-controls h2 {
  font-size: 11px;
  color: var(--studio-accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 4px 0 8px 0;
}

/* Fix header text overflow & button overlaps */
.live-project {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
}

.live-project > div {
  min-width: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  overflow: hidden !important;
}

#activeMaterialName {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block !important;
  color: #efffff !important;
  max-width: 100% !important;
}

@media (min-width: 921px) and (min-height: 561px) {
  .right-inspector {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    gap: 12px;
  }

  .pro-studio-shell .panel-page.is-active {
    display: grid;
    gap: 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    padding-right: 4px;
  }
}

/* Responsive studio touch/fullscreen layer */
html {
  -webkit-text-size-adjust: 100%;
}

body.route-studio .pro-studio-shell {
  height: var(--studio-vh, 100dvh);
  min-height: var(--studio-vh, 100dvh);
}

body.route-studio #studioPage.pro-studio-shell:fullscreen,
body.route-studio #studioPage.pro-studio-shell:-webkit-full-screen,
body.route-studio.studio-app-fullscreen #studioPage.pro-studio-shell.is-app-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 9999 !important;
  width: 100vw !important;
  height: var(--studio-vh, 100dvh) !important;
  min-height: var(--studio-vh, 100dvh) !important;
  margin: 0 !important;
  overflow: hidden !important;
  background:
    radial-gradient(circle at 50% 18%, rgba(91, 216, 202, 0.11), transparent 30%),
    linear-gradient(135deg, #05070a 0%, #0a0d11 46%, #050608 100%) !important;
}

body.route-studio.studio-app-fullscreen {
  overflow: hidden !important;
  background: #05070a !important;
}

body.route-studio.studio-app-fullscreen::before {
  display: none;
}

body.studio-touch-ui,
body.studio-touch-ui .pro-studio-shell {
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body.studio-touch-ui button,
body.studio-touch-ui .primary-button,
body.studio-touch-ui .secondary-button,
body.studio-touch-ui .tool-button,
body.studio-touch-ui .ghost-tool,
body.studio-touch-ui .tray-toggle-rail button,
body.studio-touch-ui .bottom-asset-tray .variant-strip button,
body.studio-touch-ui .material-button,
body.studio-touch-ui .environment-card,
body.studio-touch-ui .preset-grid button,
body.studio-touch-ui .lib-model-material-btn,
body.studio-touch-ui .library-card {
  -webkit-appearance: none;
  appearance: none;
  transform: none !important;
  -webkit-transform: none !important;
  opacity: 1;
  visibility: visible;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease !important;
  will-change: auto;
  backface-visibility: visible;
  -webkit-backface-visibility: visible;
}

body.studio-touch-ui button:hover,
body.studio-touch-ui button:active,
body.studio-touch-ui button:focus,
body.studio-touch-ui .primary-button:hover,
body.studio-touch-ui .primary-button:active,
body.studio-touch-ui .secondary-button:hover,
body.studio-touch-ui .secondary-button:active,
body.studio-touch-ui .tool-button:hover,
body.studio-touch-ui .tool-button:active,
body.studio-touch-ui .ghost-tool:hover,
body.studio-touch-ui .ghost-tool:active,
body.studio-touch-ui .tray-toggle-rail button:hover,
body.studio-touch-ui .tray-toggle-rail button:active,
body.studio-touch-ui .bottom-asset-tray .variant-strip button:hover,
body.studio-touch-ui .bottom-asset-tray .variant-strip button:active,
body.studio-touch-ui .material-button:hover,
body.studio-touch-ui .material-button:active,
body.studio-touch-ui .environment-card:hover,
body.studio-touch-ui .environment-card:active,
body.studio-touch-ui .preset-grid button:hover,
body.studio-touch-ui .preset-grid button:active,
body.studio-touch-ui .lib-model-material-btn:hover,
body.studio-touch-ui .lib-model-material-btn:active,
body.studio-touch-ui .library-card:hover,
body.studio-touch-ui .library-card:active {
  transform: none !important;
  -webkit-transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.studio-touch-ui .studio-topbar,
body.studio-touch-ui .left-studio-panel,
body.studio-touch-ui .right-inspector,
body.studio-touch-ui .bottom-asset-tray,
body.studio-touch-ui .floating-viewport-tools,
body.studio-touch-ui .viewport-camera-card,
body.studio-touch-ui .pro-viewport,
body.studio-touch-ui .glass-panel,
body.studio-touch-ui .editor-block,
body.studio-touch-ui .texture-panel,
body.studio-touch-ui .camera-frame-panel,
body.studio-touch-ui .tray-section,
body.studio-touch-ui .library-card,
body.studio-touch-ui .environment-card,
body.studio-touch-ui .material-button,
body.studio-touch-ui .lib-model-material-btn,
body.studio-touch-ui button,
body.studio-touch-ui select,
body.studio-touch-ui input {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  -webkit-transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  will-change: auto !important;
}

body.studio-touch-ui .studio-topbar,
body.studio-touch-ui .left-studio-panel,
body.studio-touch-ui .right-inspector,
body.studio-touch-ui .bottom-asset-tray {
  background: linear-gradient(180deg, rgba(19, 25, 32, 0.98), rgba(7, 10, 14, 0.96)), #080d13 !important;
}

body.studio-touch-ui .panel-page.is-active,
body.studio-touch-ui .tray-section.is-active {
  display: grid !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.studio-touch-ui .panel-page:not(.is-active),
body.studio-touch-ui .tray-section:not(.is-active) {
  display: none !important;
}

body.studio-touch-ui button:focus,
body.studio-touch-ui button:focus-visible,
body.studio-touch-ui select:focus,
body.studio-touch-ui input:focus {
  outline: 2px solid rgba(114, 244, 223, 0.45);
  outline-offset: 2px;
}

.pro-studio-shell.is-touch-ui button,
.pro-studio-shell.is-touch-ui select,
.pro-studio-shell.is-touch-ui input,
.pro-studio-shell.is-touch-ui label,
.pro-studio-shell.is-touch-ui .file-drop,
.pro-studio-shell.is-touch-ui .environment-card,
.pro-studio-shell.is-touch-ui .material-button,
.pro-studio-shell.is-touch-ui .scene-object-row,
.pro-studio-shell.is-touch-ui .lib-model-material-btn,
.pro-studio-shell.is-touch-ui .preset-card {
  touch-action: manipulation;
}

.pro-studio-shell.is-touch-ui button,
.pro-studio-shell.is-touch-ui select,
.pro-studio-shell.is-touch-ui input[type="text"],
.pro-studio-shell.is-touch-ui input[type="number"],
.pro-studio-shell.is-touch-ui .material-button,
.pro-studio-shell.is-touch-ui .scene-object-row,
.pro-studio-shell.is-touch-ui .environment-card,
.pro-studio-shell.is-touch-ui .lib-model-material-btn {
  min-height: 44px;
}

.pro-studio-shell.is-touch-ui input[type="range"] {
  min-height: 34px;
  touch-action: pan-x;
}

.pro-studio-shell.is-touch-ui input[type="range"]::-webkit-slider-thumb {
  width: 24px;
  height: 24px;
}

.pro-studio-shell.is-touch-ui input[type="checkbox"] {
  width: 42px;
  height: 24px;
}

.pro-studio-shell.is-touch-ui input[type="checkbox"]::before {
  width: 18px;
  height: 18px;
}

.pro-studio-shell.is-touch-ui input[type="checkbox"]:checked::before {
  transform: translateX(18px);
}

.pro-studio-shell.is-touch-ui .floating-viewport-tools {
  width: 58px;
}

.pro-studio-shell.is-touch-ui .floating-viewport-tools button {
  min-height: 46px;
  font-size: 11px;
}

body.studio-landscape-compact .pro-studio-shell .glass-panel,
body.studio-landscape-compact .studio-topbar,
body.studio-landscape-compact .left-studio-panel,
body.studio-landscape-compact .right-inspector,
body.studio-landscape-compact .bottom-asset-tray,
body.studio-landscape-compact .floating-viewport-tools,
body.studio-landscape-compact .viewport-camera-card,
body.studio-landscape-compact button,
body.studio-landscape-compact select,
body.studio-landscape-compact input,
body.studio-control-dragging .pro-studio-shell .glass-panel,
body.studio-control-dragging .studio-topbar,
body.studio-control-dragging .left-studio-panel,
body.studio-control-dragging .right-inspector,
body.studio-control-dragging .bottom-asset-tray,
body.studio-control-dragging .floating-viewport-tools,
body.studio-control-dragging .viewport-camera-card,
body.studio-control-dragging button,
body.studio-control-dragging select,
body.studio-control-dragging input {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  filter: none !important;
  transform: none !important;
  -webkit-transform: none !important;
}

body.studio-landscape-compact .studio-topbar,
body.studio-landscape-compact .left-studio-panel,
body.studio-landscape-compact .right-inspector,
body.studio-landscape-compact .bottom-asset-tray,
body.studio-control-dragging .studio-topbar,
body.studio-control-dragging .left-studio-panel,
body.studio-control-dragging .right-inspector,
body.studio-control-dragging .bottom-asset-tray {
  background: linear-gradient(180deg, rgba(19, 25, 32, 0.96), rgba(7, 10, 14, 0.94)), #080d13 !important;
}

body.studio-landscape-compact button,
body.studio-landscape-compact select,
body.studio-landscape-compact input[type="text"],
body.studio-landscape-compact input[type="number"],
body.studio-control-dragging button,
body.studio-control-dragging select,
body.studio-control-dragging input[type="text"],
body.studio-control-dragging input[type="number"] {
  background-color: rgba(19, 24, 33, 0.96) !important;
  color: #f3f7f8 !important;
}

body.studio-landscape-compact input[type="range"],
body.studio-control-dragging input[type="range"] {
  transform: none !important;
  -webkit-transform: none !important;
  touch-action: none;
}

body.studio-landscape-compact .bottom-asset-tray .material-library-active,
body.studio-landscape-compact .library-two-column-layout,
body.studio-landscape-compact .library-model-materials-column,
body.studio-landscape-compact .library-presets-column,
body.studio-landscape-compact .library-header,
body.studio-landscape-compact .library-tabs-rail,
body.studio-landscape-compact .library-grid-container,
body.studio-landscape-compact .library-grid,
body.studio-landscape-compact .library-card,
body.studio-landscape-compact .library-swatch,
body.studio-control-dragging .bottom-asset-tray .material-library-active,
body.studio-control-dragging .library-two-column-layout,
body.studio-control-dragging .library-model-materials-column,
body.studio-control-dragging .library-presets-column,
body.studio-control-dragging .library-header,
body.studio-control-dragging .library-tabs-rail,
body.studio-control-dragging .library-grid-container,
body.studio-control-dragging .library-grid,
body.studio-control-dragging .library-card,
body.studio-control-dragging .library-swatch {
  animation: none !important;
  transition: none !important;
  transform: none !important;
  -webkit-transform: none !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  will-change: auto !important;
}

body.studio-landscape-compact .bottom-asset-tray .material-library-active,
body.studio-control-dragging .bottom-asset-tray .material-library-active {
  min-height: 100%;
  background: rgba(8, 12, 18, 0.96);
}

body.studio-landscape-compact .library-card,
body.studio-control-dragging .library-card {
  background: rgba(7, 11, 17, 0.98) !important;
}

body.studio-landscape-compact .bottom-asset-tray .tray-section.is-active.material-library-active {
  gap: 8px;
}

body.studio-landscape-compact .library-two-column-layout {
  grid-template-columns: minmax(170px, 22vw) minmax(0, 1fr) !important;
  gap: 10px !important;
}

body.studio-landscape-compact .library-model-materials-column {
  gap: 6px;
  padding-right: 8px;
}

body.studio-landscape-compact .lib-model-material-btn {
  min-height: 36px !important;
  height: 36px;
  padding: 0 9px;
  border-radius: 9px;
  font-size: 12px;
}

body.studio-landscape-compact .library-header {
  gap: 5px;
}

body.studio-landscape-compact .library-title {
  font-size: 13px;
}

body.studio-landscape-compact .preserve-textures-toggle span {
  font-size: 10px;
}

body.studio-landscape-compact .library-search-row input {
  height: 28px;
  min-height: 28px;
  border-radius: 8px;
  font-size: 11px;
}

body.studio-landscape-compact .library-tabs-rail {
  min-height: 30px !important;
  gap: 5px !important;
  padding-bottom: 4px !important;
}

body.studio-landscape-compact .library-tab-btn {
  height: 28px;
  min-height: 28px !important;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 10px;
}

body.studio-landscape-compact .library-grid-container {
  min-height: 0;
  overflow: auto;
}

body.studio-landscape-compact .library-grid {
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 6px;
  padding: 1px;
}

body.studio-landscape-compact .library-card {
  min-height: 66px;
  padding: 5px;
  gap: 4px;
  border-radius: 9px;
}

body.studio-landscape-compact .library-swatch {
  height: 30px;
  border-radius: 6px;
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.12);
}

body.studio-landscape-compact .library-card-details {
  gap: 1px;
}

body.studio-landscape-compact .library-card-name {
  font-size: 10px;
  white-space: normal;
  line-height: 1.12;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

body.studio-landscape-compact .library-card-category {
  font-size: 8px;
}

body.studio-landscape-compact .library-card-actions,
body.studio-landscape-compact .library-footer {
  display: none !important;
}

body.studio-landscape-compact .right-inspector,
body.studio-landscape-compact .inspector-tabs,
body.studio-landscape-compact .inspector-tabs button,
body.studio-landscape-compact .panel-page,
body.studio-landscape-compact .panel-page.is-active,
.pro-studio-shell.is-touch-ui .right-inspector,
.pro-studio-shell.is-touch-ui .inspector-tabs,
.pro-studio-shell.is-touch-ui .inspector-tabs button,
.pro-studio-shell.is-touch-ui .panel-page,
.pro-studio-shell.is-touch-ui .panel-page.is-active,
body.studio-landscape-compact .editor-block,
body.studio-landscape-compact .texture-panel,
body.studio-landscape-compact .texture-control-panel,
body.studio-landscape-compact .control-row,
body.studio-control-dragging .right-inspector,
body.studio-control-dragging .inspector-tabs,
body.studio-control-dragging .inspector-tabs button,
body.studio-control-dragging .panel-page,
body.studio-control-dragging .panel-page.is-active,
body.studio-control-dragging .editor-block,
body.studio-control-dragging .texture-panel,
body.studio-control-dragging .texture-control-panel,
body.studio-control-dragging .control-row,
body.studio-inspector-editing .right-inspector,
body.studio-inspector-editing .inspector-tabs,
body.studio-inspector-editing .inspector-tabs button,
body.studio-inspector-editing .panel-page,
body.studio-inspector-editing .panel-page.is-active,
body.studio-inspector-switching .right-inspector,
body.studio-inspector-switching .inspector-tabs,
body.studio-inspector-switching .inspector-tabs button,
body.studio-inspector-switching .panel-page,
body.studio-inspector-switching .panel-page.is-active,
body.studio-inspector-editing .editor-block,
body.studio-inspector-editing .texture-panel,
body.studio-inspector-editing .texture-control-panel,
body.studio-inspector-editing .control-row,
body.studio-inspector-editing .toggle-row,
body.studio-inspector-editing .camera-frame-panel,
body.studio-inspector-editing .frame-mode-control button {
  opacity: 1 !important;
  visibility: visible;
  transform: none !important;
  -webkit-transform: none !important;
  animation: none !important;
  contain: none !important;
  will-change: auto !important;
  filter: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.studio-touch-ui .right-inspector,
.pro-studio-shell.is-touch-ui .right-inspector,
body.studio-landscape-compact .right-inspector,
.pro-studio-shell.is-landscape-compact .right-inspector,
body.studio-landscape-compact .right-inspector .editor-block,
.pro-studio-shell.is-landscape-compact .right-inspector .editor-block,
body.studio-landscape-compact .right-inspector .texture-panel,
.pro-studio-shell.is-landscape-compact .right-inspector .texture-panel,
body.studio-landscape-compact .right-inspector .camera-frame-panel,
.pro-studio-shell.is-landscape-compact .right-inspector .camera-frame-panel,
body.studio-landscape-compact .right-inspector .lighting-ui-container .editor-section,
.pro-studio-shell.is-landscape-compact .right-inspector .lighting-ui-container .editor-section,
body.studio-landscape-compact .right-inspector .object-name-row,
.pro-studio-shell.is-landscape-compact .right-inspector .object-name-row,
body.studio-landscape-compact .right-inspector .object-transform-group,
.pro-studio-shell.is-landscape-compact .right-inspector .object-transform-group {
  background: linear-gradient(180deg, rgba(19, 25, 32, 0.985), rgba(7, 10, 14, 0.965)), #080d13 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.studio-touch-ui .right-inspector input,
body.studio-touch-ui .right-inspector select,
body.studio-touch-ui .right-inspector button,
.pro-studio-shell.is-touch-ui .right-inspector input,
.pro-studio-shell.is-touch-ui .right-inspector select,
.pro-studio-shell.is-touch-ui .right-inspector button,
body.studio-landscape-compact .right-inspector input,
body.studio-landscape-compact .right-inspector select,
body.studio-landscape-compact .right-inspector button,
.pro-studio-shell.is-landscape-compact .right-inspector input,
.pro-studio-shell.is-landscape-compact .right-inspector select,
.pro-studio-shell.is-landscape-compact .right-inspector button {
  transform: none !important;
  -webkit-transform: none !important;
  transition: border-color 120ms ease, background-color 120ms ease !important;
}

body.studio-touch-ui .right-inspector input[type="range"],
.pro-studio-shell.is-touch-ui .right-inspector input[type="range"],
body.studio-control-dragging .right-inspector input[type="range"],
body.studio-inspector-editing .right-inspector input[type="range"] {
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
  touch-action: none;
  transition: none !important;
}

body.studio-touch-ui .right-inspector,
.pro-studio-shell.is-touch-ui .right-inspector,
body.studio-control-dragging .right-inspector,
body.studio-inspector-editing .right-inspector,
body.studio-inspector-dragging .right-inspector {
  isolation: isolate;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout paint style;
  transform: translateZ(0) !important;
  -webkit-transform: translateZ(0) !important;
}

body.studio-landscape-compact .panel-page:not(.is-active),
body.studio-control-dragging .panel-page:not(.is-active),
body.studio-inspector-editing .panel-page:not(.is-active),
body.studio-inspector-switching .panel-page:not(.is-active),
.pro-studio-shell.is-touch-ui .panel-page:not(.is-active) {
  display: none !important;
  visibility: hidden;
}

body.studio-landscape-compact .panel-page.is-active,
body.studio-control-dragging .panel-page.is-active,
body.studio-inspector-editing .panel-page.is-active,
body.studio-inspector-switching .panel-page.is-active,
.pro-studio-shell.is-touch-ui .panel-page.is-active {
  display: grid !important;
  opacity: 1 !important;
  visibility: visible !important;
  animation: none !important;
  transition: none !important;
  transform: none !important;
  -webkit-transform: none !important;
}

.pro-studio-shell.is-touch-ui .right-inspector .panel-page,
.pro-studio-shell.is-landscape-compact .right-inspector .panel-page,
body.studio-inspector-editing .right-inspector .panel-page,
body.studio-control-dragging .right-inspector .panel-page,
body.studio-inspector-switching .right-inspector .panel-page {
  animation: none !important;
  transition: none !important;
  will-change: auto !important;
  opacity: 1;
}

.pro-studio-shell.is-touch-ui .right-inspector *,
.pro-studio-shell.is-landscape-compact .right-inspector *,
body.studio-inspector-editing .right-inspector *,
body.studio-control-dragging .right-inspector *,
body.studio-inspector-switching .right-inspector * {
  animation-duration: 0s !important;
}

body.studio-inspector-editing .right-inspector,
body.studio-inspector-dragging .right-inspector,
body.studio-inspector-editing .editor-block,
body.studio-inspector-dragging .editor-block,
body.studio-inspector-editing .texture-panel,
body.studio-inspector-dragging .texture-panel,
body.studio-inspector-editing .camera-frame-panel,
body.studio-inspector-dragging .camera-frame-panel {
  background: linear-gradient(180deg, rgba(19, 25, 32, 0.98), rgba(7, 10, 14, 0.96)), #080d13 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.studio-inspector-editing .right-inspector input,
body.studio-inspector-editing .right-inspector select,
body.studio-inspector-editing .right-inspector button,
body.studio-inspector-dragging .right-inspector input,
body.studio-inspector-dragging .right-inspector select,
body.studio-inspector-dragging .right-inspector button {
  transform: none !important;
  -webkit-transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
}

body.studio-inspector-dragging .right-inspector input[type="range"] {
  touch-action: none !important;
  accent-color: #72f4df;
}

body.studio-inspector-dragging .studio-topbar,
body.studio-inspector-dragging .left-studio-panel,
body.studio-inspector-dragging .bottom-asset-tray,
body.studio-inspector-dragging .pro-viewport {
  transform: none !important;
  filter: none !important;
  animation: none !important;
  transition: none !important;
}

@media (pointer: coarse) {
  .pro-studio-shell {
    scrollbar-width: thin;
  }

  .pro-studio-shell .panel,
  .bottom-asset-tray,
  .bottom-asset-tray .variant-strip,
  .lib-model-materials-list,
  .library-presets-grid {
    -webkit-overflow-scrolling: touch;
  }
}

@media (orientation: landscape) and (max-height: 950px) and (max-width: 1400px) {
  html,
  body.route-studio,
  html:fullscreen,
  body.route-studio:fullscreen,
  html:-webkit-full-screen,
  body.route-studio:-webkit-full-screen {
    width: 100%;
    height: var(--studio-vh, 100dvh) !important;
    overflow: hidden !important;
  }

  body.route-studio .pro-studio-shell,
  body.route-studio #studioPage.pro-studio-shell.is-landscape-compact {
    --bottom-tray-height: clamp(112px, 25dvh, 148px);
    display: grid !important;
    grid-template-columns: minmax(168px, 23vw) minmax(0, 1fr) minmax(218px, 30vw) !important;
    grid-template-rows: minmax(52px, auto) minmax(0, 1fr) var(--bottom-tray-height) !important;
    grid-template-areas:
      "top top top"
      "left viewport right"
      "bottom bottom bottom" !important;
    gap: 6px !important;
    width: 100%;
    height: var(--studio-vh, 100dvh) !important;
    min-height: 0 !important;
    padding: max(6px, env(safe-area-inset-top)) max(6px, env(safe-area-inset-right)) max(6px, env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)) !important;
    overflow: hidden !important;
  }

  .pro-studio-shell.is-landscape-compact .studio-topbar {
    grid-template-columns: minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(0, 1.3fr) !important;
    gap: 8px;
    min-height: 52px;
    padding: 6px 8px;
    border-radius: 14px;
  }

  .pro-studio-shell.is-landscape-compact .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .pro-studio-shell.is-landscape-compact .studio-brand span,
  .pro-studio-shell.is-landscape-compact .live-project small,
  .pro-studio-shell.is-landscape-compact .profile-pill {
    font-size: 10px;
  }

  .pro-studio-shell.is-landscape-compact .tool-cluster,
  .pro-studio-shell.is-landscape-compact .studio-actions {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .pro-studio-shell.is-landscape-compact .tool-button,
  .pro-studio-shell.is-landscape-compact .ghost-tool,
  .pro-studio-shell.is-landscape-compact .studio-actions select,
  .pro-studio-shell.is-landscape-compact .studio-actions button {
    flex: 0 0 auto;
    height: 44px;
    min-height: 44px;
    padding-inline: 10px;
    font-size: 11px;
  }

  .pro-studio-shell.is-landscape-compact .profile-pill {
    flex: 0 0 auto;
    width: auto;
    max-width: 156px;
    height: 44px;
    min-height: 44px;
  }

  .pro-studio-shell.is-landscape-compact .left-studio-panel,
  .pro-studio-shell.is-landscape-compact .right-inspector {
    display: block;
    max-height: none;
    min-height: 0;
    padding: 10px;
    border-radius: 14px;
    overflow: auto;
  }

  .pro-studio-shell.is-landscape-compact .project-card,
  .pro-studio-shell.is-landscape-compact .scene-tools,
  .pro-studio-shell.is-landscape-compact .scene-builder-card,
  .pro-studio-shell.is-landscape-compact .performance-card {
    padding-bottom: 10px;
    margin-bottom: 10px;
  }

  .pro-studio-shell.is-landscape-compact .pro-viewport,
  .pro-studio-shell.is-landscape-compact .pro-viewport .canvas-host {
    min-height: 0 !important;
    height: 100% !important;
  }

  .pro-studio-shell.is-landscape-compact .pro-viewport .canvas-host {
    border-radius: 14px;
  }

  .pro-studio-shell.is-landscape-compact .viewport-camera-card {
    top: 10px;
    right: 10px;
    min-width: 132px;
    padding: 8px 10px;
  }

  .pro-studio-shell.is-landscape-compact .viewport-camera-card span,
  .pro-studio-shell.is-landscape-compact .axis-widget {
    display: none;
  }

  .pro-studio-shell.is-landscape-compact .floating-viewport-tools {
    top: 10px;
    left: 10px;
    width: auto;
    grid-auto-flow: column;
    grid-auto-columns: 46px;
    padding: 6px;
  }

  .pro-studio-shell.is-landscape-compact .bottom-asset-tray {
    grid-template-columns: auto minmax(0, 1fr) !important;
    height: var(--bottom-tray-height) !important;
    max-height: var(--bottom-tray-height) !important;
    min-height: 0 !important;
    padding: 8px !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  .pro-studio-shell.is-landscape-compact .tray-toggle-rail {
    grid-template-columns: 1fr;
    width: 96px;
    padding: 0 8px 0 0;
    border-right: 1px solid rgba(255,255,255,0.08);
    border-bottom: 0;
    overflow-y: auto;
  }

  .pro-studio-shell.is-landscape-compact .tray-toggle-rail button {
    min-height: 42px;
    font-size: 10px;
  }

  .pro-studio-shell.is-landscape-compact .bottom-asset-tray .tray-section.is-active.material-tray-section,
  .pro-studio-shell.is-landscape-compact .bottom-asset-tray .tray-section.is-active.hdri-tray-section {
    grid-template-rows: 18px minmax(0, 1fr);
    gap: 6px;
  }

  .pro-studio-shell.is-landscape-compact .bottom-asset-tray .tray-heading {
    min-height: 18px;
  }

  .pro-studio-shell.is-landscape-compact .bottom-asset-tray .variant-strip {
    height: auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .pro-studio-shell.is-landscape-compact .bottom-asset-tray .variant-strip button {
    min-width: 76px;
    max-width: 86px;
    min-height: 78px;
    height: 78px;
  }

  .pro-studio-shell.is-landscape-compact .bottom-asset-tray .variant-strip button span {
    width: 38px;
    height: 38px;
  }

  .pro-studio-shell.is-landscape-compact .bottom-asset-tray .export-panel.is-active {
    overflow: auto;
  }

  .pro-studio-shell.is-landscape-compact .bottom-asset-tray .export-settings {
    grid-template-columns: repeat(3, minmax(112px, 1fr));
  }

  .pro-studio-shell.is-landscape-compact .bottom-asset-tray .export-actions {
    grid-template-columns: repeat(2, minmax(132px, 1fr));
  }
}

@media (orientation: landscape) and (max-height: 520px) {
  body.route-studio .pro-studio-shell.is-landscape-compact {
    grid-template-columns: minmax(0, 1fr) minmax(214px, 35vw) !important;
    grid-template-rows: minmax(50px, auto) minmax(0, 1fr) var(--bottom-tray-height) !important;
    grid-template-areas:
      "top top"
      "viewport right"
      "bottom bottom" !important;
  }

  .pro-studio-shell.is-landscape-compact .left-studio-panel {
    display: none;
  }

  .pro-studio-shell.is-landscape-compact .live-project,
  .pro-studio-shell.is-landscape-compact .studio-actions .ghost-tool {
    display: none;
  }

  .pro-studio-shell.is-landscape-compact .studio-topbar {
    grid-template-columns: minmax(132px, 0.75fr) minmax(0, 1.25fr) !important;
  }

  .pro-studio-shell.is-landscape-compact .inspector-heading,
  .pro-studio-shell.is-landscape-compact .viewport-camera-card {
    display: none;
  }

  .pro-studio-shell.is-landscape-compact .inspector-tabs {
    grid-template-columns: repeat(3, minmax(64px, 1fr));
    gap: 4px;
    margin-bottom: 10px;
  }

  .pro-studio-shell.is-landscape-compact .inspector-tabs button {
    min-height: 38px;
    font-size: 10px;
  }
}

@media (max-width: 920px) and (orientation: portrait) {
  html,
  body.route-studio {
    height: auto !important;
    overflow: auto !important;
  }

  body.route-studio .pro-studio-shell:not(.is-landscape-compact) {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto minmax(min(560px, 70vh), auto) auto auto auto !important;
    grid-template-areas:
      "top"
      "viewport"
      "left"
      "right"
      "bottom" !important;
    height: auto !important;
    min-height: var(--studio-vh, 100dvh) !important;
    overflow: visible !important;
  }

  .pro-studio-shell:not(.is-landscape-compact) .left-studio-panel,
  .pro-studio-shell:not(.is-landscape-compact) .right-inspector {
    max-height: none;
    overflow: visible;
  }

  .pro-studio-shell:not(.is-landscape-compact) .bottom-asset-tray {
    grid-template-columns: 1fr !important;
    height: auto !important;
    max-height: 320px !important;
    overflow: auto !important;
  }

  .pro-studio-shell:not(.is-landscape-compact) .tray-toggle-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 0 8px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }
}
