@import url("https://fonts.googleapis.com/css2?family=Archivo+Black&family=Bebas+Neue&family=Cairo:wght@400;700&family=DM+Sans:wght@400;700&family=Fira+Sans:wght@400;700&family=Lato:wght@400;700&family=Manrope:wght@400;700&family=Merriweather:wght@400;700&family=Montserrat:wght@400;700&family=Noto+Sans:wght@400;700&family=Nunito:wght@400;700&family=Open+Sans:wght@400;700&family=Oswald:wght@400;700&family=Pacifico&family=Playfair+Display:wght@400;700&family=Plus+Jakarta+Sans:wght@400;700&family=Poppins:wght@400;700&family=Quicksand:wght@400;700&family=Raleway:wght@400;700&family=Roboto:wght@400;700&family=Source+Sans+3:wght@400;700&family=Tajawal:wght@400;700&family=Urbanist:wght@400;700&family=Work+Sans:wght@400;700&display=swap");

:root {
  --ink: #0f1115;
  --muted: #6f7683;
  --line: rgba(16, 20, 30, 0.12);
  --paper: #ffffff;
  --soft: #f4f7fb;
  --accent: #0f1115;
  --radius: 28px;
  --radius-soft: 22px;
  --radius-pill: 999px;
  --shadow: 0 22px 70px rgba(9, 19, 38, 0.08);
  --ease-fluid: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Manrope, "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(58rem 38rem at 8% -8%, rgba(15, 17, 21, 0.08), transparent 62%),
    radial-gradient(48rem 36rem at 100% 0%, rgba(15, 17, 21, 0.05), transparent 70%),
    linear-gradient(180deg, #f6f7f9 0%, #ffffff 45%);
  position: relative;
}

body.ui-scroll-lock {
  overflow: hidden;
  overscroll-behavior: none;
}

/* Blur and disable background content when the mobile menu is open. */
body.ui-menu-open .shell > main {
  filter: blur(12px);
  opacity: 0.92;
  pointer-events: none;
}

body.ui-menu-open .shell > footer,
body.ui-studio-tools-open .shell > footer,
body.ui-studio-open .shell > footer {
  display: none;
}

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: 0;
  filter: blur(16px);
  transition: transform 340ms var(--ease-fluid);
}

body::before {
  width: 34rem;
  height: 34rem;
  left: -14rem;
  top: 10vh;
  border-radius: 57% 43% 66% 34% / 46% 31% 69% 54%;
  background: radial-gradient(circle at 35% 35%, rgba(24, 28, 36, 0.14), rgba(24, 28, 36, 0));
  transform: translate3d(0, calc(var(--curve-scroll-shift, 0px) * 0.45), 0);
}

body::after {
  width: 28rem;
  height: 28rem;
  right: -12rem;
  top: 34vh;
  border-radius: 38% 62% 34% 66% / 60% 38% 62% 40%;
  background: radial-gradient(circle at 50% 50%, rgba(15, 17, 21, 0.12), rgba(15, 17, 21, 0));
  transform: translate3d(0, calc(var(--curve-scroll-shift, 0px) * -0.35), 0);
}

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

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

img {
  max-width: 100%;
  display: block;
}

.shell {
  min-height: 100vh;
  position: relative;
}

.shell::before {
  content: "";
  position: fixed;
  width: 24rem;
  height: 24rem;
  right: -8rem;
  top: 16vh;
  border-radius: 44% 56% 63% 37% / 35% 54% 46% 65%;
  background: radial-gradient(circle at 30% 30%, rgba(15, 17, 21, 0.12), rgba(15, 17, 21, 0));
  opacity: 0.75;
  animation: liquidFloat 12s var(--ease-fluid) infinite alternate;
  transform: translate3d(0, calc(var(--curve-scroll-shift, 0px) * 0.25), 0);
  pointer-events: none;
  z-index: 0;
}

.container {
  width: min(1360px, calc(100% - 2rem));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem 0;
}

.brand {
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
}

.brand-center {
  justify-self: center;
  display: inline-flex;
  align-items: center;
}

.brand-logo {
  width: clamp(190px, 22vw, 330px);
  max-height: 62px;
  object-fit: contain;
}

.mobile-header-edge,
.mobile-menu-drawer {
  display: none;
}

.mobile-profile-link {
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15, 17, 21, 0.08);
}

.mobile-menu-toggle {
  width: 2.55rem;
  height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.26rem;
  box-shadow: 0 10px 24px rgba(15, 17, 21, 0.08);
  transition: transform 220ms var(--ease-fluid), box-shadow 220ms var(--ease-fluid), background 220ms var(--ease-fluid);
}

.mobile-menu-toggle span {
  width: 1rem;
  height: 2px;
  border-radius: 999px;
  background: #111;
  transition: transform 240ms var(--ease-fluid), opacity 240ms var(--ease-fluid);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.mobile-menu-toggle:active {
  transform: scale(0.96);
}

.mobile-menu-toggle.active {
  transform: scale(1.02);
  box-shadow: 0 16px 34px rgba(15, 17, 21, 0.18);
  background: rgba(255, 255, 255, 0.98);
}

.mobile-menu-drawer {
  position: fixed;
  inset: 0;
  z-index: 64;
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
  transition: opacity 650ms var(--ease-fluid), visibility 0s linear 650ms;
  will-change: opacity;
}

.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 62;
  opacity: 0;
  visibility: hidden;
  pointer-events: auto;
  /* Premium dim + blur: keep the page visible but de-emphasized. */
  background: rgba(12, 14, 18, 0.38);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  transition: opacity 720ms var(--ease-fluid), visibility 0s linear 720ms;
  will-change: opacity;
}

.mobile-menu-drawer.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 650ms var(--ease-fluid), visibility 0s;
}

.mobile-menu-backdrop.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 720ms var(--ease-fluid), visibility 0s;
}

.mobile-menu-sheet {
  min-height: 100svh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: max(5rem, calc(env(safe-area-inset-top, 0px) + 4.6rem));
  padding-bottom: 1rem;
  position: relative;
  z-index: 63;
  transform: translateY(28px) scale(0.985);
  opacity: 0;
  transition: transform 820ms var(--ease-fluid), opacity 680ms var(--ease-fluid);
  will-change: transform, opacity;
  pointer-events: none;
  /* Keep the mobile menu usable even if more links/actions are added. */
  overflow-y: auto;
}

.mobile-menu-links,
.mobile-menu-meta {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 26px 74px rgba(15, 17, 21, 0.18);
  opacity: 0;
  transform: translateY(10px);
  transition: transform 580ms var(--ease-fluid), opacity 460ms var(--ease-fluid);
  will-change: opacity, transform;
}

.mobile-menu-links {
  display: grid;
  gap: 0.35rem;
  padding: 0.65rem;
  pointer-events: none;
}

.mobile-menu-links a {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  color: var(--ink);
  background: #f5f7fb;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: transform 520ms var(--ease-fluid), opacity 460ms var(--ease-fluid);
  transition-delay: 0s;
}

.mobile-menu-links a.active {
  background: rgba(15, 17, 21, 0.08);
}

.mobile-menu-meta {
  margin-top: 0.7rem;
  padding: 0.7rem;
  pointer-events: none;
  transition-delay: 0s;
}

.mobile-menu-stack {
  width: min(100%, 26rem);
  display: grid;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(14px) scale(0.98);
  transition: transform 680ms var(--ease-fluid), opacity 560ms var(--ease-fluid);
  pointer-events: none;
  max-height: calc(100svh - 6.5rem);
  overflow: auto;
}

.mobile-menu-drawer.open .mobile-menu-stack {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.mobile-menu-drawer.open .mobile-menu-sheet {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu-drawer.open .mobile-menu-links,
.mobile-menu-drawer.open .mobile-menu-meta,
.mobile-menu-drawer.open .mobile-menu-links a {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-menu-drawer.open .mobile-menu-links a:nth-child(1) { transition-delay: 70ms; }
.mobile-menu-drawer.open .mobile-menu-links a:nth-child(2) { transition-delay: 115ms; }
.mobile-menu-drawer.open .mobile-menu-links a:nth-child(3) { transition-delay: 160ms; }
.mobile-menu-drawer.open .mobile-menu-links a:nth-child(4) { transition-delay: 205ms; }
.mobile-menu-drawer.open .mobile-menu-links a:nth-child(5) { transition-delay: 250ms; }
.mobile-menu-drawer.open .mobile-menu-links a:nth-child(6) { transition-delay: 295ms; }
.mobile-menu-drawer.open .mobile-menu-links a:nth-child(7) { transition-delay: 340ms; }
.mobile-menu-drawer.open .mobile-menu-links a:nth-child(8) { transition-delay: 385ms; }
.mobile-menu-drawer.open .mobile-menu-meta { transition-delay: 520ms; }

.mobile-menu-toolbar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.28rem;
  box-shadow: 0 18px 44px rgba(15, 17, 21, 0.14);
}

.studio-mobile-dock,
.studio-mobile-sheet,
.studio-mobile-sheet-backdrop {
  display: none;
}

.nav,
.actions,
.toolbar,
.tabs,
.row {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  flex-wrap: wrap;
}

.nav-left {
  justify-content: flex-start;
  align-items: center;
  gap: 0.72rem;
}

.actions-right {
  justify-content: flex-end;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.22rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(236, 238, 242, 0.9);
}

.lang-switch .tab {
  padding: 0.42rem 0.75rem;
  font-size: 0.78rem;
}

.profile-tabs {
  gap: 0.5rem;
  margin-top: 0.95rem;
}

.profile-tabs .tab {
  text-decoration: none;
}

.profile-design-thumb {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(16, 20, 30, 0.12);
  background: rgba(255, 255, 255, 0.9);
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.profile-mini-preview {
  width: 100%;
  max-width: 420px;
}

.profile-mini-preview-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  object-fit: cover;
  background: linear-gradient(155deg, #f6f8fb, #eceff4);
  border: 1px solid var(--line);
}

.inline-form-2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.lang-ar {
  font-family: Cairo, Tajawal, "Segoe UI", Tahoma, Arial, sans-serif;
}

.lang-option-ar {
  font-family: Cairo, Tajawal, "Segoe UI", Tahoma, Arial, sans-serif;
}

.lang-ar .eyebrow {
  letter-spacing: 0.08em;
}

.nav a {
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.42rem 0.32rem;
  border-radius: 999px;
  transition: color 220ms var(--ease-fluid), transform 220ms var(--ease-fluid), background 220ms var(--ease-fluid);
}

.nav a.active,
.nav a:hover {
  color: var(--ink);
  background: rgba(15, 17, 21, 0.08);
  transform: translateY(-1px);
}

.page {
  display: grid;
  gap: 1.4rem;
  padding: 3.25rem 0 5.8rem;
}

body.allow-entrance .page > .card,
body.allow-entrance .page > .section,
body.allow-entrance .page > .grid-2,
body.allow-entrance .page > .grid-3,
body.allow-entrance .page > .grid-4,
body.allow-entrance .page > .grid-5,
body.allow-entrance .page > .stack,
body.allow-entrance .page > .row {
  animation: riseIn 720ms var(--ease-fluid);
}


body.allow-entrance .card,
body.allow-entrance .section,
body.allow-entrance .grid-2,
body.allow-entrance .grid-3,
body.allow-entrance .grid-4,
body.allow-entrance .grid-5,
body.allow-entrance .stack,
body.allow-entrance .row {
  animation: fadeInSoft 620ms var(--ease-fluid);
}

.is-preloading #app {
  opacity: 0;
}

.is-ready #app {
  opacity: 1;
  transition: opacity 800ms var(--ease-fluid);
}

#boot-loader {
  position: fixed;
  inset: 0;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 1;
  transition: opacity 700ms var(--ease-fluid);
}

.boot-loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 22px;
  text-align: center;
}

.boot-loader-logo {
  width: min(260px, 62vw);
  height: auto;
  opacity: 0.95;
}

.boot-loader-gif {
  width: min(320px, 70vw);
  height: auto;
}

.boot-loader-copy {
  display: grid;
  gap: 6px;
}

.boot-loader-title {
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #111;
  font-size: 16px;
}

.boot-loader-subtitle {
  font-weight: 700;
  color: #111;
  font-size: 15px;
}

.boot-loader-note {
  display: grid;
  gap: 8px;
  max-width: 48ch;
  margin-top: 6px;
}

body.is-ready #boot-loader {
  opacity: 0;
  pointer-events: none;
}

.page {
  opacity: 1;
  transition: opacity 520ms var(--ease-fluid);
}

body.is-navigating .page {
  opacity: 0;
}


.reveal-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1050ms var(--ease-fluid), transform 1050ms var(--ease-fluid);
  will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-on-scroll[data-reveal-delay="1"] { transition-delay: 140ms; }
.reveal-on-scroll[data-reveal-delay="2"] { transition-delay: 280ms; }
.reveal-on-scroll[data-reveal-delay="3"] { transition-delay: 420ms; }

@media (max-width: 520px) {
  /* Phone fades: keep the same feel, but reduce frame cost and duration. */
  .is-ready #app {
    transition: opacity 520ms var(--ease-fluid);
  }

  #boot-loader {
    transition: opacity 520ms var(--ease-fluid);
  }

  .page {
    transition: opacity 420ms var(--ease-fluid);
  }

  .reveal-on-scroll {
    transform: translateY(16px);
    transition: opacity 650ms var(--ease-fluid), transform 650ms var(--ease-fluid);
  }

  .reveal-on-scroll[data-reveal-delay="1"] { transition-delay: 80ms; }
  .reveal-on-scroll[data-reveal-delay="2"] { transition-delay: 160ms; }
  .reveal-on-scroll[data-reveal-delay="3"] { transition-delay: 240ms; }
}


.icon-bubble {
  width: 1.95rem;
  height: 1.95rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", Manrope, "Plus Jakarta Sans", "Segoe UI", Arial, sans-serif;
  background: linear-gradient(145deg, #eff5ff, #dfe9ff);
  border: 1px solid rgba(13, 22, 42, 0.15);
  color: #223;
  flex: 0 0 auto;
}

.icon-bubble.sm {
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 12px;
  font-size: 0.72rem;
}

.icon-bubble.xs {
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 10px;
  font-size: 0.62rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: var(--shadow);
  transition: transform 260ms var(--ease-fluid), box-shadow 300ms var(--ease-fluid), border-color 220ms var(--ease-fluid);
}

.card.soft {
  background: var(--soft);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 75px rgba(9, 19, 38, 0.11);
}

.compact-box {
  border-radius: var(--radius-soft);
  padding: 0.85rem 0.95rem;
}

.stack,
.section,
.hero,
.journey,
.design-grid,
.live-preview-grid,
.grid-2,
.grid-3,
.grid-4,
.grid-5,
.studio-layout,
.checkout-layout {
  display: grid;
  gap: 1.25rem;
}

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

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

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

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

.section,
.hero {
  margin-block: 0.2rem;
}

.row {
  justify-content: space-between;
}

.badge,
.tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.34rem 0.7rem;
}

.badge {
  background: #e8f0ff;
}

.tag {
  background: #edf2f7;
}

.button,
.button-ghost,
.tab {
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  padding: 0.8rem 1.15rem;
  cursor: pointer;
  transition: transform 220ms var(--ease-fluid), box-shadow 220ms var(--ease-fluid), background 220ms var(--ease-fluid), color 220ms var(--ease-fluid), border-color 220ms var(--ease-fluid);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.62rem;
}

.button {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.button-ghost,
.tab {
  background: transparent;
  color: var(--ink);
}

.tab.active,
.selected-chip {
  background: var(--ink);
  color: #fff;
}

.button:hover,
.button-ghost:hover,
.tab:hover {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 10px 28px rgba(7, 15, 32, 0.12);
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid rgba(16, 20, 30, 0.18);
  border-radius: 18px;
  padding: 0.84rem 0.95rem;
  background: #fff;
  transition: border-color 200ms var(--ease-fluid), box-shadow 200ms var(--ease-fluid);
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 17, 21, 0.14);
}

.eyebrow {
  color: var(--muted);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.72rem;
  margin: 0 0 0.3rem;
  line-height: 1.4;
}

.title-xl {
  margin: 0 0 0.52rem;
  line-height: 1.02;
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.title-lg {
  margin: 0 0 0.45rem;
  line-height: 1.1;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.card h1,
.card h2,
.card h3,
.card p {
  margin-top: 0;
}

.muted {
  color: var(--muted);
  line-height: 1.65;
}

.muted.small {
  font-size: 0.85rem;
}

.journey-step {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  transition: transform 220ms var(--ease-fluid), box-shadow 220ms var(--ease-fluid);
}

.journey-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(11, 25, 45, 0.1);
}

.journey-step span {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #10141e;
  color: #fff;
  font-size: 0.78rem;
}

.journey-step p {
  margin: 0;
}

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

.dashboard-data-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
}

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

.home-hero .title-xl {
  max-width: 18ch;
}

/* Keep the hero title in the same fade language as the rest of the hero, but remove any extra slide motion. */
.home-hero-copy .title-xl {
  animation: fadeInSoft 620ms var(--ease-fluid);
  transform: none;
}

.home-landing {
  gap: 1.25rem;
}

.home-hero-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.95rem;
  align-items: stretch;
  overflow: hidden;
  min-height: 78svh;
  isolation: isolate;
  background: linear-gradient(145deg, rgba(15, 17, 21, 0.1), rgba(15, 17, 21, 0.02));
}

.home-hero-copy {
  position: relative;
  z-index: 2;
  text-align: center;
  align-items: center;
  align-self: end;
  justify-content: center;
  padding: 1rem 0.75rem;
  margin-bottom: clamp(1rem, 4svh, 2.75rem);
  border-radius: 26px;
  backdrop-filter: blur(4px);
  background: rgba(255, 255, 255, 0.52);
}

.home-photo-main {
  position: absolute;
  inset: 0;
  margin: 0;
  z-index: 0;
}

.home-photo-main::after {
  content: "";
  position: relative;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(10, 12, 15, 0.35), rgba(10, 12, 15, 0.05));
}

.home-hero-rail {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 1fr;
  align-content: center;
  gap: 0.8rem;
  padding: 0.45rem;
}

.home-hero-rail-left {
  justify-items: end;
}

.home-hero-rail-right {
  justify-items: start;
}

.home-photo-main picture,
.home-photo-main img {
  width: 100%;
  height: 100%;
  display: block;
}

.home-photo-main img {
  object-fit: cover;
  transform: scale(1.01);
}

.home-float-card {
  position: relative;
  margin: 0;
  width: min(100%, 220px);
  justify-self: center;
  aspect-ratio: 3 / 4;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(250, 252, 255, 0.4);
  box-shadow: 0 20px 44px rgba(10, 14, 22, 0.32);
  transition: transform 360ms var(--ease-fluid), box-shadow 360ms var(--ease-fluid);
  transform:
    translate3d(
      calc(var(--x, 0%) + (var(--home-float-progress, 0) * var(--dx, 0%)) + (var(--home-float-wave, 0px) * var(--wx, 0))),
      calc(var(--y, 0%) + (var(--home-float-progress, 0) * var(--dy, 0%)) + (var(--home-float-wave, 0px) * var(--wy, 0))),
      0
    )
    rotate(calc(var(--r, 0deg) + (var(--home-float-progress, 0) * var(--dr, 0deg))));
  will-change: transform;
}

.home-float-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-float-card-1 { --x: -4%; --y: -3%; --dx: 17%; --dy: 22%; --r: -8deg; --dr: 12deg; --wx: 0.16; --wy: 0.09; }
.home-float-card-2 { --x: 0%; --y: 0%; --dx: 13%; --dy: -16%; --r: 7deg; --dr: -10deg; --wx: 0.1; --wy: -0.06; }
.home-float-card-3 { --x: 4%; --y: 5%; --dx: 9%; --dy: -24%; --r: -9deg; --dr: 14deg; --wx: 0.12; --wy: -0.1; }
.home-float-card-4 { --x: 4%; --y: -2%; --dx: -15%; --dy: 24%; --r: 8deg; --dr: -13deg; --wx: -0.14; --wy: 0.08; }
.home-float-card-5 { --x: 0%; --y: 0%; --dx: -14%; --dy: -14%; --r: -7deg; --dr: 11deg; --wx: -0.1; --wy: -0.08; }
.home-float-card-6 { --x: -4%; --y: 4%; --dx: -10%; --dy: -22%; --r: 9deg; --dr: -14deg; --wx: -0.12; --wy: -0.1; }

.home-gallery-strip {
  background: linear-gradient(180deg, #ffffff, #f5f6f9);
}

.home-trending-strip {
  background: linear-gradient(180deg, #ffffff, #f5f6f9);
}

.home-trending-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.top-creator-card {
  min-height: 132px;
}

.creator-avatar {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.92);
  background: radial-gradient(circle at 30% 30%, rgba(15, 17, 21, 0.88), rgba(15, 17, 21, 0.6));
  box-shadow: 0 16px 34px rgba(9, 19, 38, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.22);
}

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

.creator-avatar-sm {
  width: 26px;
  height: 26px;
  font-size: 0.78rem;
  box-shadow: 0 10px 22px rgba(9, 19, 38, 0.14);
}

.product-brand-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.design-byline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.creator-byline-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: inherit;
}

.creator-byline-link:hover {
  text-decoration: underline;
}

.creator-public-hero {
  background: linear-gradient(155deg, #f8f9fb, #edf0f5);
}

.creator-public-avatar {
  width: 74px;
  height: 74px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(16, 26, 44, 0.12);
  background: rgba(255, 255, 255, 0.8);
  flex: 0 0 auto;
}

.creator-public-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.creator-public-avatar.fallback {
  font-weight: 800;
  color: rgba(16, 26, 44, 0.8);
}

.inline-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.oauth-divider {
  position: relative;
  display: grid;
  place-items: center;
  margin: 0.85rem 0 0.55rem;
}

.oauth-divider::before {
  content: '';
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1px;
  background: rgba(16, 26, 44, 0.12);
}

.oauth-divider span {
  position: relative;
  padding: 0 0.7rem;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #fff;
  color: rgba(16, 26, 44, 0.6);
}

.oauth-stack {
  display: grid;
  place-items: center;
}

.google-auth-slot {
  display: grid;
  place-items: center;
  width: 100%;
}

.oauth-disabled {
  width: min(360px, 100%);
  justify-content: center;
  opacity: 0.9;
}

.oauth-hint {
  margin-top: 0.45rem;
  text-align: center;
  max-width: 360px;
}

.oauth-google-svg {
  width: 18px;
  height: 18px;
  display: block;
}

.studio-mobile-note {
  display: none;
  padding: 0.55rem 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(16, 26, 44, 0.12);
  background: rgba(255, 255, 255, 0.72);
  color: rgba(16, 26, 44, 0.72);
  font-size: 12px;
  line-height: 1.35;
}

@media (pointer: coarse) {
  .studio-mobile-note[data-mobile-only] {
    display: block;
  }
}

.verified-badge {
  border-color: rgba(24, 176, 96, 0.55);
  background: rgba(24, 176, 96, 0.12);
  color: rgba(14, 110, 58, 0.98);
  text-align: center;
  line-height: 1;
}

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

.home-spotlight-item {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(16, 26, 44, 0.1);
  background: #fff;
}

.home-spotlight-item img {
  width: 100%;
  display: block;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}

.creator-hub-banner {
  background: linear-gradient(155deg, #f8f9fb, #edf0f5);
}

.design-card {
  display: grid;
  gap: 0.62rem;
  padding: 0.78rem;
}

.discover-live-link,
.discover-static-link {
  display: grid;
  place-items: center;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, #f6f8fb, #eceff4);
  min-height: 190px;
  transition: transform 220ms var(--ease-fluid), box-shadow 240ms var(--ease-fluid), border-color 220ms var(--ease-fluid);
  padding: 0.55rem;
}

.discover-live-link:hover,
.discover-static-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(9, 19, 38, 0.12);
  border-color: rgba(15, 17, 21, 0.28);
}

.discover-live-link .three-preview-host {
  width: 100%;
  min-height: 160px;
  pointer-events: none;
}

.discover-static-link .three-preview-host {
  width: 100%;
  min-height: 160px;
  pointer-events: none;
}

.discover-live-link .three-preview-canvas {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
}

.discover-static-link .three-preview-canvas {
  aspect-ratio: 1 / 1;
  border-radius: 16px;
}

.recommend-preview .three-preview-host {
  width: 100%;
  min-height: 160px;
  pointer-events: none;
}

.recommend-preview-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.profile-mini-preview .three-preview-host,
.order-item-preview .three-preview-host,
.admin-order-preview .three-preview-host {
  width: 100%;
  min-height: 160px;
  pointer-events: none;
}

.profile-mini-preview .three-preview-canvas,
.order-item-preview .three-preview-canvas,
.admin-order-preview .three-preview-canvas {
  border-radius: 16px;
}

.discover-static-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  image-rendering: auto;
  display: block;
  border-radius: 16px;
}

.recommend-static-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  border-radius: 16px;
}

.static-preview-fallback {
  width: 100%;
  min-height: 190px;
  border-radius: 16px;
  border: 1px dashed rgba(111, 130, 162, 0.4);
  background: rgba(237, 242, 247, 0.55);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 0.85rem;
  color: rgba(23, 32, 49, 0.72);
}

.static-preview-fallback.small {
  min-height: 160px;
}

.discover-preview-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 240px;
}

.discover-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.5rem;
}

.discover-preview-cell {
  position: relative;
  border: 1px solid rgba(15, 24, 38, 0.12);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(180deg, #f6f7fa, #eceff4);
  min-height: 120px;
}

.discover-surface-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: auto;
}

.discover-surface-empty {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
  font-size: 0.72rem;
}

.discover-preview-cell em {
  position: absolute;
  right: 0.35rem;
  bottom: 0.32rem;
  font-style: normal;
  font-size: 0.56rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #33435d;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 0.12rem 0.34rem;
}

.comment-stack {
  gap: 0.4rem;
}

.comment {
  font-size: 0.92rem;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.9rem;
}

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

.discover-controls {
  align-items: end;
}

.discover-page-indicator {
  align-self: center;
  text-align: right;
}

.request-form {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.compact-btn {
  padding: 0.56rem 0.94rem;
}

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

.live-preview-grid.compact {
  gap: 0.6rem;
}

.pose-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  min-height: 180px;
  transition: transform 220ms var(--ease-fluid), box-shadow 260ms var(--ease-fluid);
}

.pose-card > img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  transition: transform 420ms var(--ease-fluid);
}

.pose-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(9, 19, 38, 0.14);
}

.pose-card:hover > img {
  transform: scale(1.035);
}

.pose-map {
  position: absolute;
  transform-origin: center;
}

.pose-map-content {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.pose-map-outline {
  outline: 2px dashed #ff7a00;
  outline-offset: -2px;
}

.pose-label {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-pill);
  background: rgba(14, 18, 29, 0.85);
  color: #fff;
  font-size: 0.7rem;
}

.preview-layer {
  position: absolute;
}

.preview-layer.stroke-svg {
  inset: 0;
  width: 100%;
  height: 100%;
}

.liquid-card {
  position: relative;
  overflow: hidden;
}

.liquid-card > * {
  position: relative;
  z-index: 1;
}

.liquid-card::after {
  content: "";
  position: absolute;
  inset: -38% 35% auto -22%;
  height: 240px;
  border-radius: 58% 42% 61% 39% / 48% 38% 62% 52%;
  background: radial-gradient(circle at 30% 35%, rgba(15, 17, 21, 0.2), rgba(15, 17, 21, 0));
  transform: translate3d(0, calc(var(--curve-scroll-shift, 0px) * 0.55), 0);
  animation: liquidDrift 11s var(--ease-fluid) infinite alternate;
  pointer-events: none;
  z-index: 0;
}

.studio-workbench {
  display: grid;
  gap: 1.15rem;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(300px, 365px);
  align-items: start;
}

.studio-panel h2,
.studio-stage h2 {
  margin: 0.2rem 0 0;
  font-size: 1.08rem;
}

.studio-panel-header {
  align-items: flex-start;
}

.studio-module {
  gap: 0.9rem;
}

.studio-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.studio-tool-grid .button,
.studio-tool-grid .button-ghost,
.studio-module .button-ghost {
  justify-content: flex-start;
}

.studio-stage {
  padding: 1rem;
}

.studio-stage-bar {
  gap: 0.85rem;
}

.surface-tabs {
  gap: 0.72rem;
}

.studio-canvas-stage {
  display: grid;
  place-items: center;
  padding: 0.35rem;
}

.studio-canvas-wrap {
  width: 100%;
  padding: 1rem;
  background: linear-gradient(145deg, #f6f8fb, #eef1f6);
  border-radius: var(--radius-soft);
}

.studio-canvas {
  position: relative;
  width: min(100%, 760px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 26px;
  border: 2px solid rgba(16, 20, 30, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
  overflow: hidden;
}

.studio-canvas.black {
  background: #111;
}

.studio-canvas.white {
  background: #fff;
}

.studio-layer {
  position: absolute;
  cursor: move;
  user-select: none;
}

.studio-layer.selected {
  outline: 1px solid rgba(15, 17, 21, 0.75);
  border-radius: 8px;
}

.studio-layer.image {
  border-radius: 12px;
}

.studio-stroke {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.studio-stroke.selected {
  filter: drop-shadow(0 0 3px rgba(15, 17, 21, 0.72));
}

.studio-live-grid {
  gap: 0.7rem;
}

.studio-order-card {
  gap: 0.95rem;
  border-radius: var(--radius-soft);
}

.recommend-row {
  display: flex;
  gap: 0.58rem;
  align-items: center;
  flex-wrap: wrap;
}

.color-wheel {
  height: 50px;
  border-radius: 14px;
  border: 1px solid var(--line);
  padding: 0.24rem;
}

.checkout-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.checkout-title {
  margin: 0;
}

.checkout-cart-items {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.cart-item-row {
  align-items: center;
  gap: 0.8rem;
}

.cart-item-main {
  display: grid;
  gap: 0.15rem;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

.cart-item-main strong {
  font-size: 1rem;
}

.cart-item-total {
  font-weight: 700;
}

.cart-item-meta {
  margin-top: 0.35rem;
}

.cart-item-controls {
  margin-top: 0.9rem;
  display: flex;
  gap: 0.85rem;
  align-items: end;
  flex-wrap: wrap;
}

.cart-field {
  display: grid;
  gap: 0.3rem;
  min-width: 120px;
}

.checkout-summary {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}

.checkout-summary.boxed {
  border: 1px solid rgba(111, 130, 162, 0.28);
  background: rgba(237, 242, 247, 0.7);
  border-radius: 18px;
  padding: 0.85rem 1rem;
}

.summary-pill {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.35rem 0.45rem;
  border-radius: 14px;
}

.button-ghost.danger {
  border-color: rgba(205, 68, 80, 0.4);
  color: rgba(205, 68, 80, 0.95);
}

.button-ghost.danger:hover {
  box-shadow: 0 12px 32px rgba(205, 68, 80, 0.14);
}

.button.danger {
  background: rgba(205, 68, 80, 0.96);
  border-color: rgba(205, 68, 80, 0.96);
  color: #fff;
}

.button.danger:hover {
  box-shadow: 0 12px 34px rgba(205, 68, 80, 0.22);
}

.studio-guide-help {
  border-color: rgba(111, 78, 255, 0.55);
  background: rgba(111, 78, 255, 0.08);
  font-weight: 700;
}

.studio-guide-help:hover {
  box-shadow: 0 14px 36px rgba(111, 78, 255, 0.18);
}

.studio-top-actions {
  justify-content: space-between;
  align-items: center;
}

.studio-size-chart-row {
  gap: 0.6rem;
  align-items: center;
}

.studio-size-chart-btn {
  white-space: nowrap;
}

.studio-size-chart-modal .app-popup-card {
  width: min(92vw, 720px);
  max-height: min(86vh, 720px);
  overflow: auto;
}

/* Size chart: keep the selected size label readable on light cards. */
.studio-size-chart-modal .selected-chip strong,
.size-chart-overlay-modal .selected-chip strong {
  color: #111;
}

/* Mobile fit: size chart must stay below the sticky header and scroll internally. */
@media (max-width: 980px) {
  .studio-size-chart-modal.app-popup-backdrop,
  .size-chart-overlay-modal.app-popup-backdrop {
    place-items: start center;
    padding-top: calc(var(--header-height, 64px) + env(safe-area-inset-top) + 12px);
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }

  .studio-size-chart-modal .app-popup-card,
  .size-chart-overlay-modal .app-popup-card {
    max-height: calc(100svh - var(--header-height, 64px) - env(safe-area-inset-top) - 24px);
    overflow: auto;
  }
}

.studio-help-mobile {
  border-color: rgba(111, 78, 255, 0.55);
  background: rgba(111, 78, 255, 0.08);
  font-weight: 700;
  white-space: nowrap;
}

.studio-help-mobile:hover {
  box-shadow: 0 14px 36px rgba(111, 78, 255, 0.18);
}

@media (max-width: 980px) {
  .studio-react-top .tabs .studio-guide-help {
    display: none;
  }
}

.order-item-preview,
.admin-order-preview {
  border-radius: 18px;
  border: 1px solid rgba(111, 130, 162, 0.22);
  background: rgba(237, 242, 247, 0.55);
  overflow: hidden;
}

.order-item-preview .static-preview-img,
.admin-order-preview .static-preview-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.order-item-preview .static-preview-fallback,
.admin-order-preview .static-preview-fallback {
  min-height: 180px;
}

.creator-analytics-card strong {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.creator-analytics-card {
  min-width: 0;
}

.creator-analytics-card .inline-label,
.creator-analytics-card .muted {
  overflow-wrap: anywhere;
}

.creator-analytics-preview {
  width: 100%;
}

.creator-analytics-preview-link {
  display: block;
  width: 100%;
}

.creator-analytics-thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(155deg, #f6f8fb, #eceff4);
}

.creator-analytics-card .row {
  flex-wrap: wrap;
}

.creator-analytics-card .inline-form-2 {
  justify-content: flex-start;
}

.row.align-start {
  justify-content: flex-start;
  gap: 0.75rem;
}

.checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}

.logo-preview,
.qr-upload-preview {
  width: min(220px, 100%);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.4rem;
}

.payment-qr-link {
  display: grid;
  justify-items: center;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  cursor: pointer;
  text-decoration: none;
}

.payment-qr-preview {
  width: min(160px, 70vw);
  border-radius: 14px;
}

.about-quote p {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.7;
  font-weight: 600;
}

.center-wrap {
  display: grid;
  justify-items: center;
}

.auth-card {
  width: min(520px, 100%);
}

.footer {
  border-top: 1px solid var(--line);
  margin-top: 2rem;
}

.footer-inner {
  justify-content: center;
}

.footer-layout {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  justify-items: start;
  gap: 2.1rem;
  padding: 2.6rem 0;
}

.footer-social-links {
  display: grid;
  gap: 0.65rem;
}

.footer-col {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.footer-col-title {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(15, 17, 21, 0.62);
  margin-bottom: 0.35rem;
}

.footer-link {
  color: rgba(15, 17, 21, 0.72);
  font-size: 0.88rem;
  line-height: 1.6;
}

.footer-link:hover {
  color: rgba(15, 17, 21, 0.95);
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.footer-social-link span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.social-icon-img {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  object-fit: contain;
  border: 1px solid rgba(16, 20, 30, 0.12);
  background: rgba(255, 255, 255, 0.75);
}

.home-layout-image {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
}

.tech-map-canvas {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.tech-map-canvas img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.tech-map-outline {
  position: absolute;
  border: 2px dashed #ff7a00;
  background: rgba(255, 122, 0, 0.08);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 12, 22, 0.52);
  display: grid;
  place-items: center;
  z-index: 60;
}

.modal {
  width: min(760px, calc(100% - 2rem));
}

.studio-exit-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 65;
  background: rgba(8, 12, 18, 0.5);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.studio-exit-modal {
  width: min(520px, 100%);
}

.three-preview-host {
  width: min(100%, 66vw);
  min-height: 250px;
  border-radius: var(--radius-soft);
  overflow: hidden;
  margin-inline: auto;
}

.three-lazy-wrap {
  display: grid;
  gap: 0.5rem;
}

.three-preview-stage {
  position: relative;
}

.studio-live-preview-wrap {
  position: relative;
}

.three-preview-capture-btn {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 6;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 20, 30, 0.18);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 26px rgba(10, 12, 16, 0.12);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  color: #111;
  backdrop-filter: blur(10px);
}

.three-preview-capture-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.three-preview-frame {
  opacity: 0.001;
  transform: translateZ(0);
  transition: opacity 420ms ease;
}

.three-preview-frame.is-ready {
  opacity: 1;
}

.three-preview-gate {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.92);
  pointer-events: none;
}

.three-preview-gate-card {
  width: min(520px, 92%);
  border-radius: 18px;
  border: 1px solid rgba(16, 20, 30, 0.1);
  background: rgba(255, 255, 255, 0.92);
  padding: 1rem 1.1rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(10, 12, 16, 0.08);
}

.three-preview-canvas {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(16, 20, 30, 0.12);
  background: linear-gradient(150deg, #f8f9fb, #edf0f5);
  touch-action: none;
  cursor: grab;
}

.three-preview-canvas canvas {
  display: block;
}

.preview-skeleton {
  min-height: 220px;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  color: var(--muted);
  border-radius: 18px;
  border: 1px dashed rgba(16, 20, 30, 0.2);
  background: rgba(255, 255, 255, 0.78);
}

.pose-card.pose-card-3d {
  min-height: 220px;
}

.studio-react-page {
  display: grid;
  gap: 1rem;
}

/* Light Studio: fullscreen-ish mobile layout (keep site header, give studio the rest). */
.studio-react-page.is-light-studio {
  gap: 0.75rem;
}

.light-reco-title {
  margin: 0;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.studio-light-top {
  position: sticky;
  top: calc(var(--header-height, 0px) + env(safe-area-inset-top, 0px));
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.6rem;
  align-items: center;
  padding: 0.6rem 0.75rem;
  border-radius: 16px;
  border: 1px solid rgba(16, 20, 30, 0.1);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.studio-light-top > :first-child {
  justify-self: start;
}
.studio-light-top > :nth-child(2) {
  justify-self: center;
}
.studio-light-top > :last-child {
  justify-self: end;
}

.light-studio-dock {
  position: sticky;
  bottom: calc(max(0.85rem, env(safe-area-inset-bottom, 0px) + 0.7rem));
  z-index: 30;
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.55rem 0.65rem;
  margin: 0 auto;
  width: min(520px, calc(100% - 1.4rem));
  border-radius: 18px;
  border: 1px solid rgba(16, 20, 30, 0.1);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.ui-light-studio .page {
  padding-bottom: 1rem;
}

.studio-guide-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.studio-guide-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle var(--guide-r, 170px) at var(--guide-x, 50%) var(--guide-y, 40%),
    rgba(12, 14, 18, 0) 0%,
    rgba(12, 14, 18, 0) 58%,
    rgba(12, 14, 18, 0.72) 66%,
    rgba(12, 14, 18, 0.78) 100%
  );
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.studio-guide-card {
  position: relative;
  width: min(32rem, calc(100vw - 2rem));
  box-shadow: 0 30px 90px rgba(15, 17, 21, 0.26);
}

.studio-draw-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  top: calc(var(--header-height, 0px) + env(safe-area-inset-top, 0px));
  height: calc(100svh - var(--header-height, 0px) - env(safe-area-inset-top, 0px));
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.studio-crop-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.studio-crop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 18, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.studio-crop-card {
  position: relative;
  width: min(46rem, calc(100vw - 2rem));
  max-height: calc(100svh - var(--header-height, 0px) - 2rem);
  padding: 1rem;
  overflow: auto;
  box-shadow: 0 40px 110px rgba(15, 17, 21, 0.32);
}

.studio-crop-frame {
  position: relative;
  width: min(92vw, 520px);
  margin: 0 auto;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(150deg, #fbfcfe, #eef2f7);
  border: 1px solid rgba(16, 20, 30, 0.12);
  touch-action: none;
  user-select: none;
}

.studio-crop-image {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.studio-crop-frame-outline {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(255, 255, 255, 0.75);
  box-shadow: inset 0 0 0 1px rgba(15, 17, 21, 0.08);
  pointer-events: none;
}

.studio-draw-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 14, 18, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.studio-draw-card {
  position: relative;
  width: min(64rem, calc(100vw - 2rem));
  /* Keep the full panel visible inside the overlay viewport (below the sticky header). */
  max-height: calc(100% - 0.5rem);
  height: min(44rem, calc(100% - 0.5rem));
  padding: 1rem;
  overflow: hidden;
  box-shadow: 0 40px 110px rgba(15, 17, 21, 0.32);
  /* Ensure the body area can take the remaining space without pushing under the header. */
  grid-template-rows: auto 1fr;
}

.studio-draw-toolbar {
  display: grid;
  gap: 0.55rem;
}

.studio-draw-body.mobile {
  display: grid;
  gap: 0.75rem;
  min-height: 0;
}

.studio-draw-body.desktop {
  display: flex;
  align-items: stretch;
  gap: 0.9rem;
  flex: 1;
  min-height: 0;
}

/* Desktop: keep tools slim (~20%) so the canvas is the priority. */
.studio-draw-body.desktop .studio-draw-toolbar {
  flex: 0 0 min(20%, 16rem);
  max-width: 20%;
  min-width: 14rem;
  max-height: 100%;
  overflow: auto;
  padding: 0.8rem;
}

.studio-draw-body.desktop .studio-draw-canvas-wrap {
  flex: 1 1 auto;
  min-width: 0;
}

@media (max-width: 980px) {
  .studio-draw-body.desktop {
    display: grid;
  }

  .studio-draw-body.desktop .studio-draw-toolbar {
    max-width: none;
    min-width: 0;
  }
}

.studio-draw-mobile-dock {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(16, 20, 30, 0.12);
  box-shadow: 0 16px 40px rgba(15, 17, 21, 0.14);
}

.studio-draw-tools-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.7rem;
}

.studio-draw-tools-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 14, 20, 0.24);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.studio-draw-tools-panel {
  position: relative;
  width: min(100%, 32rem);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(16, 20, 30, 0.12);
  box-shadow: 0 26px 60px rgba(15, 17, 21, 0.2);
  max-height: min(70svh, 34rem);
  overflow: auto;
}

.button.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

.button-ghost.is-loading .button-spinner {
  border-color: rgba(16, 20, 30, 0.22);
  border-top-color: rgba(16, 20, 30, 0.68);
}

.button-spinner {
  display: inline-block;
  width: 0.95rem;
  height: 0.95rem;
  margin-left: 0.6rem;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-top-color: rgba(255, 255, 255, 1);
  animation: buttonSpin 800ms linear infinite;
  vertical-align: -0.15rem;
}

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

.studio-draw-canvas-wrap {
  position: relative;
  flex: 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(16, 20, 30, 0.12);
  background: linear-gradient(150deg, #fbfcfe, #eef2f7);
  min-height: 18rem;
}

.studio-draw-bounds {
  position: absolute;
  border: 2px dotted rgba(16, 20, 30, 0.38);
  border-radius: 14px;
  pointer-events: none;
  z-index: 3;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.studio-draw-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.studio-draw-canvas.committed {
  pointer-events: none;
}

.studio-draw-canvas.active {
  pointer-events: auto;
}

.studio-draw-hint {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(16, 20, 30, 0.1);
  border-radius: 999px;
  padding: 0.35rem 0.6rem;
}

.studio-react-top h2 {
  margin: 0.35rem 0 0;
}

.studio-react-page [data-guide-target="studio-step2"] .eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.18em;
}

@media (min-width: 981px) {
  .studio-react-top.is-collapsed {
    padding: 0.45rem 0.65rem;
  }

  .studio-react-top.is-collapsed > .row > div:first-child {
    display: none;
  }

  .studio-react-top.is-collapsed > .row + .row {
    display: none;
  }

  .studio-react-top .tab.studio-header-toggle {
    font-size: 1.05rem;
    line-height: 1;
    padding: 0.35rem 0.7rem;
  }
}

.studio-react-layout {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1.15fr) minmax(0, 0.95fr);
  align-items: start;
}

.studio-react-panel,
.studio-react-center,
.studio-react-preview,
.studio-react-order {
  min-height: 100%;
}

.studio-react-panel {
  gap: 0.55rem;
  max-height: calc(100vh - 9.5rem);
  overflow: auto;
  padding: 0.82rem;
}

.studio-react-panel .card.soft {
  padding: 0.72rem;
}

.studio-react-panel .button-ghost,
.studio-react-panel .button {
  padding: 0.56rem 0.72rem;
}

.studio-react-panel .tabs {
  flex-wrap: wrap;
  gap: 0.45rem;
}

.studio-react-order {
  grid-column: 1 / -1;
}

.product-layout {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  align-items: start;
}

.product-preview-panel {
  min-width: 0;
}

.product-details-panel {
  position: sticky;
  top: 5.9rem;
}

.studio-zone-board {
  position: relative;
  width: 100%;
  aspect-ratio: var(--board-ratio, 1 / 1);
  border-radius: 28px;
  border: 1px solid rgba(111, 130, 162, 0.22);
  margin: 0 auto;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(134, 157, 197, 0.18), transparent 56%),
    linear-gradient(180deg, #0f141b 0%, #161d28 48%, #0d1118 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 22px 52px rgba(8, 12, 18, 0.28);
  touch-action: none;
  overscroll-behavior: contain;
  user-select: none;
  -webkit-user-select: none;
}

.studio-zone-board.full-front {
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.06) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.06) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.06) 75%),
    #121317;
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
}

.studio-zone-board.overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  margin: 0;
  border: 0;
  background: transparent;
}

.studio-zone-board.white {
  background: #fafafa;
}

.studio-zone-board.draw-mode {
  cursor: crosshair;
  touch-action: none;
}

.studio-canvas-rig {
  position: relative;
  width: min(100%, var(--board-width, 520px));
  margin: 0 auto;
  --ruler-size: 2.05rem;
  /* Reserve space for rulers so they don't overlap the shirt/canvas. */
  padding-top: var(--ruler-size);
  padding-left: var(--ruler-size);
  isolation: isolate;
}

.studio-cm-ruler {
  position: absolute;
  pointer-events: none;
  z-index: 6;
  font-variant-numeric: tabular-nums;
}

.studio-cm-ruler.ruler-x {
  left: var(--ruler-size);
  top: 0;
  width: calc(100% - var(--ruler-size));
  height: var(--ruler-size);
}

.studio-cm-ruler.ruler-y {
  left: 0;
  top: var(--ruler-size);
  height: calc(100% - var(--ruler-size));
  width: var(--ruler-size);
}

/* Light Studio: always-visible switch button (mobile-only). */
.tab.light-switch-pro {
  background: #6d4cff;
  color: #fff;
  border: 1px solid rgba(109, 76, 255, 0.25);
  box-shadow: 0 10px 26px rgba(109, 76, 255, 0.28), 0 0 0 1px rgba(109, 76, 255, 0.18);
}
.tab.light-switch-pro:hover {
  filter: brightness(1.03);
  box-shadow: 0 12px 30px rgba(109, 76, 255, 0.34), 0 0 0 1px rgba(109, 76, 255, 0.22);
}
.tab.light-switch-pro:active {
  filter: brightness(0.98);
}

.button.light-switch-pro {
  background: #6d4cff;
  color: #fff;
  border: 1px solid rgba(109, 76, 255, 0.25);
  box-shadow: 0 12px 30px rgba(109, 76, 255, 0.32), 0 0 0 1px rgba(109, 76, 255, 0.18);
}

.tab.light-switch-light {
  border: 1px solid rgba(109, 76, 255, 0.22);
  color: #6d4cff;
  background: rgba(109, 76, 255, 0.08);
}
.tab.light-switch-light:hover {
  background: rgba(109, 76, 255, 0.12);
}

.studio-cm-ruler .cm-tick {
  position: absolute;
  color: #5f708a;
}

.studio-cm-ruler.ruler-x .cm-tick {
  bottom: 0;
  transform: translateX(-0.5px);
}

.studio-cm-ruler.ruler-y .cm-tick {
  left: 0;
  transform: translateY(-0.5px);
}

.studio-cm-ruler .cm-tick i {
  display: block;
  background: rgba(109, 142, 198, 0.28);
}

.studio-cm-ruler.ruler-x .cm-tick i {
  width: 1px;
  height: 12px;
}

.studio-cm-ruler.ruler-y .cm-tick i {
  width: 12px;
  height: 1px;
}

.studio-cm-ruler .cm-tick.major i {
  background: rgba(166, 196, 244, 0.55);
}

.studio-cm-ruler .cm-tick em {
  position: absolute;
  font-style: normal;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
}

.studio-cm-ruler.ruler-x .cm-tick em {
  top: 0.62rem;
  left: 0.18rem;
}

.studio-cm-ruler.ruler-y .cm-tick em {
  top: 0.12rem;
  left: 0.78rem;
}

.studio-shirt-template {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.56;
  background-size: cover;
  background-position: center;
  border-radius: inherit;
  filter: saturate(0.95) contrast(1.05);
}

.studio-zone-board.full-front .studio-shirt-template {
  opacity: 0.88;
  filter: saturate(1) contrast(1.08);
}

.studio-snap-line {
  position: absolute;
  pointer-events: none;
  z-index: 4;
  background: rgba(255, 196, 138, 0.95);
  box-shadow: 0 0 0 4px rgba(255, 196, 138, 0.12);
}

.studio-snap-line.vertical {
  width: 2px;
  transform: translateX(-1px);
}

.studio-snap-line.horizontal {
  height: 2px;
  transform: translateY(-1px);
}

.zone-layer {
  position: absolute;
  border: 0;
  background: transparent;
  padding: 0;
  transform: translateZ(0);
  cursor: move;
  z-index: 5;
  touch-action: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.zone-layer.text {
  display: inline-block;
  max-width: min(280px, calc(100% - 24px));
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.3;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.studio-layer-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.layer-drag-handle {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(16, 20, 30, 0.1);
  background: rgba(255, 255, 255, 0.55);
  color: rgba(15, 17, 21, 0.8);
  cursor: grab;
  touch-action: none;
  user-select: none;
  padding: 0;
}

.layer-drag-handle:active {
  cursor: grabbing;
}

.layer-drag-handle svg {
  width: 18px;
  height: 18px;
  display: block;
}

.studio-layer-row.reorder-dragging {
  position: relative;
  z-index: 50;
  box-shadow: 0 22px 60px rgba(15, 17, 21, 0.16);
}

.studio-layer-row.reorder-anim {
  transition: transform 180ms var(--ease-fluid);
  will-change: transform;
}

.layer-insert-indicator {
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  height: 2px;
  background: rgba(255, 196, 138, 0.95);
  box-shadow: 0 0 0 4px rgba(255, 196, 138, 0.12);
  border-radius: 999px;
  pointer-events: none;
  z-index: 60;
}

.zone-layer.gizmo {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed rgba(44, 82, 138, 0.45);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  transition: border-color 180ms var(--ease-fluid), background 180ms var(--ease-fluid);
}

.zone-layer.gizmo:hover {
  border-color: rgba(15, 17, 21, 0.65);
  background: rgba(15, 17, 21, 0.08);
}

.layer-gizmo-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: calc(100% - 1rem);
  padding: 0.2rem 0.46rem;
  border-radius: 999px;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.92);
  color: #1f324f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.zone-layer.image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 14px;
  pointer-events: none;
}

.zone-layer.stroke-svg {
  inset: 0;
  width: 100%;
  height: 100%;
  background: transparent;
}

.zone-layer.stroke-svg path {
  pointer-events: stroke;
}

.zone-layer.stroke-svg.selected path {
  filter: drop-shadow(0 0 3px rgba(15, 17, 21, 0.78));
}

.zone-layer.selected {
  outline: 2px solid rgba(255, 205, 154, 0.96);
  border-radius: 14px;
  box-shadow: 0 0 0 4px rgba(255, 196, 138, 0.18);
}

.zone-layer.gizmo.selected {
  border: 2px solid rgba(15, 17, 21, 0.8);
  background: rgba(15, 17, 21, 0.11);
}

.tech-map-board {
  width: min(100%, 320px);
  margin: 0 auto;
}

.layer-scale-handle {
  position: absolute;
  right: -12px;
  bottom: -12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffe0ba, #ffae67);
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
  cursor: nwse-resize;
  touch-action: none;
}

.layer-rotate-handle {
  position: absolute;
  left: 50%;
  top: -22px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.96);
  color: rgba(15, 17, 21, 0.9);
  border: 1px solid rgba(16, 26, 44, 0.18);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
  cursor: grab;
  touch-action: none;
}

.layer-rotate-handle svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.layer-delete-handle {
  position: absolute;
  right: -12px;
  top: -12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(220, 38, 38, 0.95);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
  cursor: pointer;
  touch-action: none;
}

.layer-delete-handle svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Mobile interaction: reduce expensive effects while dragging/scaling/rotating. */
body.mobile-gesturing .zone-layer.selected {
  box-shadow: none;
}

body.mobile-gesturing .layer-scale-handle,
body.mobile-gesturing .layer-rotate-handle {
  box-shadow: none;
}

.printable-guide {
  position: absolute;
  inset: auto;
  border: 2px dashed rgba(15, 17, 21, 0.65);
  border-radius: 14px;
  pointer-events: none;
  z-index: 1;
}

.printable-guide span {
  position: absolute;
  top: -0.85rem;
  left: 0.8rem;
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
  color: #355;
}

.studio-uv-guide-shell {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    inset 0 22px 48px rgba(183, 201, 236, 0.08);
}

.studio-uv-guide-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(75% 50% at 50% 18%, rgba(156, 176, 214, 0.26), transparent 65%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
}

.studio-uv-guide-shape,
.studio-uv-guide-loading {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.studio-uv-guide-shape {
  object-fit: fill;
  opacity: 0.88;
  filter:
    drop-shadow(0 18px 34px rgba(88, 106, 146, 0.24))
    drop-shadow(0 0 0 rgba(255,255,255,0.3))
    contrast(1.05)
    saturate(0.82);
}

.studio-uv-guide-loading {
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(204, 217, 244, 0.24));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.studio-uv-guide-label {
  position: absolute;
  left: 0.9rem;
  top: 0.9rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  background: rgba(11, 14, 20, 0.66);
  color: rgba(255, 245, 234, 0.96);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: 0 10px 20px rgba(5, 7, 12, 0.24);
}

.studio-uv-guide-shell.errored .studio-uv-guide-backdrop {
  background: linear-gradient(180deg, rgba(185, 92, 92, 0.18), rgba(255, 255, 255, 0.02));
}

.tech-map-board .tech-map-rect {
  pointer-events: auto;
  cursor: move;
}

.tech-map-resize-handle {
  position: absolute;
  top: auto;
  left: auto;
  right: -10px;
  bottom: -10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #0f1115;
  border: 2px solid #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
  cursor: nwse-resize;
}

.is-hidden {
  display: none !important;
}

.chart-track {
  position: relative;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 17, 21, 0.14);
  overflow: hidden;
}

.chart-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f1115, #525866);
}

.scroll-word {
  transform: translate3d(calc(var(--scroll-word-shift, 0px) * var(--scroll-word-factor, 0.24)), 0, 0);
  transition: transform 520ms var(--ease-fluid);
  will-change: transform;
}

.studio-3d-editor-shell {
  position: relative;
  width: min(100%, 760px);
  margin: 0 auto;
}

.layout-builder-shell {
  padding: 1rem;
}

.layout-builder-new-page {
  display: grid;
  gap: 0.35rem;
  min-width: 220px;
  flex: 1 1 240px;
}

.layout-builder-main {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  align-items: start;
}

.layout-builder-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  align-items: start;
}

.layout-builder-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  padding: 0.85rem;
  display: grid;
  gap: 0.75rem;
}

.layout-builder-properties {
  max-height: calc(100vh - 10rem);
  overflow: auto;
}

.layout-builder-palette {
  display: grid;
  gap: 0.55rem;
}

.layout-builder-palette-item {
  border: 1px solid rgba(16, 20, 30, 0.2);
  border-radius: 14px;
  background: #fff;
  padding: 0.65rem 0.75rem;
  text-align: left;
  font-size: 0.86rem;
  cursor: grab;
}

.layout-builder-canvas-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, #f7f8fa, #edf0f4);
  padding: 0.85rem;
}

.layout-builder-canvas {
  position: relative;
  border: 1px dashed rgba(16, 20, 30, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(28, 44, 73, 0.05) 1px, transparent 1px),
    linear-gradient(180deg, rgba(28, 44, 73, 0.05) 1px, transparent 1px),
    #fff;
  background-size: 24px 24px, 24px 24px, auto;
}

.layout-builder-canvas.over {
  border-color: rgba(15, 17, 21, 0.72);
}

.layout-builder-node {
  border: 1px solid transparent;
  border-radius: 12px;
  overflow: hidden;
}

.layout-builder-node.selected {
  border-color: rgba(15, 17, 21, 0.7);
  box-shadow: 0 0 0 3px rgba(15, 17, 21, 0.18);
}

.layout-builder-render {
  width: 100%;
  height: 100%;
}

.layout-builder-render-heading {
  display: flex;
  align-items: center;
}

.layout-builder-render-text {
  line-height: 1.5;
}

.layout-builder-render-image {
  background: #f3f4f6;
}

.layout-builder-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.layout-builder-image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: #7a8191;
  font-size: 0.8rem;
}

.layout-builder-render-hero {
  position: relative;
  overflow: hidden;
}

.layout-builder-hero-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.layout-builder-hero-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  gap: 0.45rem;
  padding: 1rem;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.56));
}

.layout-builder-hero-overlay h3,
.layout-builder-hero-overlay p {
  margin: 0;
}

.layout-builder-hero-overlay button {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  padding: 0.36rem 0.7rem;
  font-weight: 700;
}

.builder-runtime-inline {
  margin-top: 0.75rem;
}

.footer-runtime-inline {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.builder-runtime-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.builder-runtime-card {
  min-height: 110px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 20, 30, 0.1);
}

.builder-runtime-card h3,
.builder-runtime-card p {
  margin: 0;
}

.builder-runtime-image,
.builder-runtime-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.builder-runtime-hero {
  min-height: 220px;
}

.builder-runtime-overlay {
  position: absolute;
  inset: 0;
  padding: 1rem;
  display: grid;
  align-content: end;
  gap: 0.4rem;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
}

.builder-runtime-overlay button {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  padding: 0.3rem 0.7rem;
  font-weight: 700;
}

.builder-super-page {
  padding: 0.9rem;
}

.builder-footer-surface {
  padding-top: 0.8rem;
}

.builder-footer-surface .builder-super-page {
  border: 0;
  box-shadow: none;
  background: transparent;
  padding: 0;
}

.builder-super-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: var(--builder-canvas-ratio, 16 / 10);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(16, 20, 30, 0.12);
  background:
    linear-gradient(90deg, rgba(28, 44, 73, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(28, 44, 73, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, #f8f9fb, #edf0f4);
  background-size: 24px 24px, 24px 24px, auto;
}

.builder-super-node {
  position: absolute;
  overflow: hidden;
  border: 1px solid rgba(16, 20, 30, 0.1);
  border-radius: 12px;
  display: grid;
  align-content: start;
  gap: 0.35rem;
}

.builder-super-node h3,
.builder-super-node p {
  margin: 0;
}

.builder-super-image,
.builder-super-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.builder-super-hero {
  padding: 0 !important;
}

.builder-super-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: end;
  gap: 0.3rem;
  padding: 0.9rem;
  color: #fff;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.62));
}

.builder-super-overlay button {
  width: fit-content;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #111;
  font-weight: 700;
  padding: 0.28rem 0.62rem;
}

.studio-tool-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.38rem;
}

.studio-tool-icon {
  min-height: 2.1rem;
  justify-content: center !important;
  position: relative;
  padding: 0.36rem;
}

.studio-tool-icon .icon-bubble {
  margin: 0;
}

.studio-tool-icon::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 0.35rem);
  transform: translate(-50%, 6px);
  opacity: 0;
  pointer-events: none;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
  color: #fff;
  background: rgba(15, 20, 34, 0.92);
  transition: opacity 170ms var(--ease-fluid), transform 170ms var(--ease-fluid);
}

.studio-tool-icon.selected-chip::after {
  display: none;
}

.studio-tool-icon:not([data-tip])::after,
.studio-tool-icon[data-tip='']::after {
  display: none;
}

.studio-tool-icon:hover::after,
.studio-tool-icon:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (pointer: coarse) {
  .studio-tool-icon::after {
    display: none;
  }
}

.studio-entry-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1300;
  background: rgba(10, 14, 25, 0.45);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.studio-entry-card {
  width: min(92vw, 520px);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 30px 80px rgba(7, 12, 22, 0.25);
  animation: popup-in 240ms cubic-bezier(0.18, 0.89, 0.32, 1.2);
}

.studio-entry-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes liquidFloat {
  from {
    transform: translate3d(0, -12px, 0) rotate(-6deg);
  }
  to {
    transform: translate3d(-16px, 18px, 0) rotate(8deg);
  }
}

@keyframes liquidDrift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(20px, -10px, 0) scale(1.08);
  }
}

.app-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(10, 14, 25, 0.42);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: 1rem;
}

.app-popup-card {
  width: min(92vw, 440px);
  border-radius: var(--radius);
  box-shadow: 0 24px 52px rgba(12, 17, 32, 0.24);
  animation: popup-in 220ms cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.app-toast-wrap {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(16px + env(safe-area-inset-bottom));
  z-index: 1150;
  display: grid;
  place-items: center;
  padding: 0 1rem;
  pointer-events: none;
}

.app-toast {
  width: min(92vw, 520px);
  border-radius: var(--radius);
  box-shadow: 0 20px 46px rgba(12, 17, 32, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.85rem 0.9rem;
  pointer-events: auto;
}

.app-toast-message {
  font-weight: 600;
}

.app-toast-info {
  border: 1px solid rgba(111, 130, 162, 0.24);
  background: rgba(255, 255, 255, 0.92);
}

.app-toast-success {
  border: 1px solid rgba(40, 160, 92, 0.28);
  background: rgba(235, 252, 242, 0.92);
}

.app-toast-error {
  border: 1px solid rgba(205, 68, 80, 0.28);
  background: rgba(255, 244, 245, 0.92);
}

.list-controls {
  gap: 0.55rem;
  flex-wrap: wrap;
}

@keyframes popup-in {
  from {
    transform: translateY(10px) scale(0.98);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@media (max-width: 1200px) {
  .home-hero-shell {
    grid-template-columns: minmax(0, 1fr);
    min-height: 66svh;
  }

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

  .home-trending-grid {
    grid-template-columns: 1fr;
  }

  .studio-workbench {
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
  }

  .studio-react-layout {
    grid-template-columns: minmax(250px, 320px) minmax(0, 1fr) minmax(0, 1fr);
  }

  .studio-panel-right {
    grid-column: 1 / -1;
  }

  .studio-react-order {
    grid-column: 1 / -1;
  }

  .layout-builder-main {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 980px) {
  .header {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .shell::before {
    animation: none;
    transform: none;
    opacity: 0.35;
  }

  .home-hero-shell {
    grid-template-columns: 1fr;
    padding: 1rem 0.85rem;
    border-radius: 20px;
    min-height: 76svh;
  }

  .home-hero-copy {
    order: 1;
    background: rgba(255, 255, 255, 0.64);
    gap: 0.85rem;
  }

  .home-photo-main img {
    object-position: center 18%;
  }

  .home-hero-copy .toolbar {
    flex-wrap: nowrap;
    justify-content: center;
    gap: 0.55rem;
  }

  .home-hero-copy .button,
  .home-hero-copy .button-ghost {
    padding: 0.6rem 0.8rem;
    font-size: 0.9rem;
  }

  .home-hero-rail {
    order: 2;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    gap: 0.55rem;
    padding: 0.15rem;
  }

  .home-float-card {
    width: min(100%, 120px);
    border-radius: 14px;
  }

  .home-spotlight-grid {
    grid-template-columns: 1fr;
  }

  .home-trending-grid {
    grid-template-columns: 1fr;
  }

  .scroll-word {
    transform: none;
    will-change: auto;
  }

  .studio-workbench,
  .studio-react-layout,
  .checkout-layout,
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5 {
    grid-template-columns: 1fr;
  }

  .page {
    padding: 1.15rem 0 4rem;
    gap: 1rem;
  }

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

  .studio-tool-grid {
    grid-template-columns: none;
  }

  .studio-panel-right {
    grid-column: auto;
  }

  .studio-canvas {
    width: min(100%, 520px);
  }

  .three-preview-canvas {
    aspect-ratio: 1 / 1;
  }

  .studio-zone-board {
    width: 100%;
  }

  .studio-canvas-rig {
    width: min(100%, var(--board-width, 520px));
    /* Keep rulers out of the canvas area even on mobile. */
    --ruler-size: 1.65rem;
    padding-top: var(--ruler-size);
    padding-left: var(--ruler-size);
  }

  .header-inner {
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    gap: 0.5rem;
    align-items: center;
    padding: 0.7rem 0;
    direction: ltr;
  }

  .brand-center {
    justify-self: center;
    order: 0;
  }

  .brand-logo {
    width: min(210px, 58vw);
    max-height: 54px;
  }

  .nav-left,
  .actions-right {
    display: none;
  }

  .mobile-header-edge,
  .mobile-menu-drawer {
    display: block;
  }

  .mobile-header-profile {
    justify-self: start;
  }

  .mobile-header-menu {
    justify-self: end;
  }

  .mobile-menu-sheet .row {
    flex-wrap: nowrap;
  }

  :root {
    /* Keep header crisp on iOS: overlay starts below sticky header height. */
    --mobile-menu-top: calc(env(safe-area-inset-top, 0px) + 70px);
  }

  .mobile-menu-backdrop,
  .mobile-menu-drawer {
    inset: auto;
    left: 0;
    right: 0;
    bottom: 0;
    top: var(--mobile-menu-top);
    height: calc(100svh - var(--mobile-menu-top));
  }

  .mobile-menu-sheet {
    min-height: calc(100svh - var(--mobile-menu-top));
    padding-top: 1rem;
  }

  .mobile-menu-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(12, 14, 18, 0.58);
  }

  .mobile-menu-links,
  .mobile-menu-meta {
    box-shadow: 0 22px 60px rgba(15, 17, 21, 0.16);
  }

  .studio-mobile-dock {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.96);
  }

  .studio-mobile-sheet-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .studio-guide-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
  }

  .studio-draw-overlay {
    align-items: flex-end;
    padding: 0.85rem;
    top: var(--mobile-menu-top);
    height: calc(100svh - var(--mobile-menu-top));
  }

  .studio-draw-card {
    width: min(calc(100vw - 1rem), 42rem);
    height: min(calc(100% - 0.4rem), 44rem);
    padding: 0.85rem;
  }

  .studio-draw-hint {
    left: 0.6rem;
    bottom: 0.6rem;
    max-width: calc(100% - 1.2rem);
  }

  .studio-guide-backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(
      circle var(--guide-r, 170px) at var(--guide-x, 50%) var(--guide-y, 40%),
      rgba(12, 14, 18, 0) 0%,
      rgba(12, 14, 18, 0) 58%,
      rgba(12, 14, 18, 0.72) 66%,
      rgba(12, 14, 18, 0.78) 100%
    );
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }

  .studio-guide-card {
    position: relative;
    width: min(32rem, calc(100vw - 2rem));
    box-shadow: 0 30px 90px rgba(15, 17, 21, 0.26);
  }

  .studio-guide-copy {
    display: grid;
    gap: 0.35rem;
  }

  .studio-guide-action {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
  }

  .studio-guide-actions {
    justify-content: space-between;
    align-items: center;
  }

  .studio-react-top .tab.studio-guide-help {
    width: 2.2rem;
    min-width: 2.2rem;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: 900;
  }

  .studio-draw-toast {
    position: fixed;
    left: 50%;
    bottom: calc(max(1rem, env(safe-area-inset-bottom, 0px) + 0.85rem) + 4.1rem + var(--footer-avoid-offset, 0px));
    transform: translateX(-50%);
    z-index: 70;
    width: min(calc(100vw - 1rem), 34rem);
    padding: 0 0.5rem;
  }

  .studio-draw-toast-card {
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-radius: 18px;
    box-shadow: 0 22px 70px rgba(15, 17, 21, 0.22);
    background: rgba(255, 255, 255, 0.98);
  }

  .studio-react-top .row {
    gap: 0.7rem;
    justify-content: space-between;
  }

  .studio-react-top .tabs {
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scroll-snap-type: x proximity;
  }

  .studio-react-top .tab {
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .studio-react-layout {
    gap: 0.7rem;
  }

  .studio-react-center {
    order: 1;
  }

  .studio-react-panel {
    display: none;
  }

  .studio-react-preview {
    order: 2;
  }

  .studio-react-order {
    order: 3;
  }

  .studio-zone-board {
    border-radius: 20px;
  }

  .printable-guide {
    border-width: 2.5px;
  }

  .printable-guide span {
    font-size: 0.58rem;
  }

  .zone-layer.selected {
    outline-width: 2.5px;
    box-shadow: 0 0 0 5px rgba(15, 17, 21, 0.16);
  }

  .layer-scale-handle {
    right: -16px;
    bottom: -16px;
    width: 34px;
    height: 34px;
  }

  .layer-rotate-handle {
    top: -28px;
    width: 28px;
    height: 28px;
  }

  .zone-layer.text,
  .zone-layer.image {
    min-height: 24px;
  }

  .mobile-menu-sheet {
    width: min(100%, calc(100vw - 1.4rem));
  }

  .mobile-menu-stack {
    width: 100%;
  }

  .mobile-menu-links a,
  .mobile-menu-meta .button,
  .mobile-menu-meta .button-ghost {
    min-height: 3.4rem;
  }

  .studio-mobile-dock,
  .studio-mobile-sheet,
  .studio-mobile-sheet-backdrop {
    display: block;
  }

  .studio-mobile-dock {
    position: fixed;
    left: 50%;
    bottom: calc(max(0.85rem, env(safe-area-inset-bottom, 0px) + 0.7rem) + var(--footer-avoid-offset, 0px));
    transform: translateX(-50%) translateY(18px);
    width: min(calc(100vw - 1rem), 30rem);
    padding: 0.42rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.93);
    border: 1px solid rgba(16, 20, 30, 0.1);
    box-shadow: 0 24px 70px rgba(15, 17, 21, 0.18);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.4rem;
    z-index: 28;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms var(--ease-fluid), transform 260ms var(--ease-fluid);
  }

  .studio-mobile-dock.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
  }

  .studio-mobile-dock .button-ghost {
    min-width: 0;
    min-height: 3.1rem;
    padding: 0.6rem 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.36);
    border-color: rgba(16, 20, 30, 0.08);
    font-size: 0.74rem;
  }

  .studio-mobile-dock .button-ghost.active {
    background: var(--ink);
    color: #fff;
  }

  .studio-mobile-dock .icon-bubble {
    flex-shrink: 0;
  }

  .studio-mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    z-index: 27;
    background: rgba(10, 14, 20, 0.3);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 240ms var(--ease-fluid);
  }

  .studio-mobile-sheet-backdrop.open {
    opacity: 1;
    pointer-events: auto;
  }

  .studio-mobile-sheet {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 29;
    padding: 0 0.7rem max(1rem, calc(env(safe-area-inset-bottom, 0px) + 0.8rem));
    opacity: 0;
    pointer-events: none;
    transform: translateY(28px);
    transition: opacity 240ms var(--ease-fluid), transform 280ms var(--ease-fluid);
  }

  .studio-mobile-sheet.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .studio-mobile-sheet-panel {
    width: min(100%, 32rem);
    margin: 0 auto;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(16, 20, 30, 0.1);
    box-shadow: 0 30px 70px rgba(15, 17, 21, 0.2);
    backdrop-filter: blur(20px);
    max-height: min(70svh, 38rem);
    overflow: hidden;
  }

  .studio-mobile-sheet-panel .row {
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
  }

  .studio-mobile-sheet-body {
    overflow: auto;
    max-height: calc(min(70svh, 38rem) - 4.6rem);
    padding-right: 0.15rem;
  }

  .mobile-sheet-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.15rem;
  }

  .mobile-sheet-tabs .tab {
    flex: 0 0 auto;
  }

  .studio-mobile-tools {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
  }

  .studio-mobile-tools .studio-tool-icon {
    min-height: 4rem;
    border-radius: 22px;
    justify-content: flex-start;
    padding-inline: 0.95rem;
  }

  .studio-mobile-tools .studio-tool-icon span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .studio-react-center,
  .studio-react-preview,
  .studio-react-order {
    scroll-margin-top: 5.75rem;
  }

  .studio-react-page {
    padding-bottom: 8rem;
  }

  .studio-zone-board,
  .zone-layer,
  .layer-scale-handle,
  .layer-rotate-handle {
    touch-action: none;
  }

  .product-layout {
    grid-template-columns: 1fr;
  }

  .product-details-panel {
    position: static;
  }

  .three-preview-host {
    width: 100%;
  }

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

  .layout-builder-grid {
    grid-template-columns: 1fr;
  }

  .layout-builder-canvas-wrap {
    overflow: auto;
  }

  .layout-builder-properties {
    max-height: none;
  }
}

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

@media (max-width: 520px) {
  :root {
    --radius: 20px;
    --radius-soft: 16px;
    --shadow: 0 14px 34px rgba(9, 19, 38, 0.07);
  }

  .container {
    width: min(1360px, calc(100% - 2.6rem));
  }

  .card {
    padding: 1.1rem;
  }

  .compact-box {
    padding: 0.85rem 0.9rem;
  }

  .stack,
  .section,
  .hero,
  .journey,
  .design-grid,
  .live-preview-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5,
  .studio-layout,
  .checkout-layout {
    gap: 1rem;
  }

  .eyebrow {
    font-size: 0.66rem;
  }

  .title-xl {
    font-size: clamp(1.85rem, 8.4vw, 2.4rem);
  }

  .title-lg {
    font-size: clamp(1.3rem, 6.4vw, 1.85rem);
  }

  .home-hero-copy .button .icon-bubble,
  .home-hero-copy .button-ghost .icon-bubble {
    display: none;
  }

  .button,
  .button-ghost,
  .tab {
    padding: 0.68rem 0.95rem;
    font-size: 0.92rem;
  }

  .compact-btn {
    padding: 0.52rem 0.82rem;
  }

  .input,
  .select,
  .textarea {
    border-radius: 16px;
    padding: 0.74rem 0.84rem;
  }

  .footer-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1rem;
    padding: 1.2rem 0;
  }

  .footer {
    margin-top: 1rem;
  }

  .footer-social-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 0.65rem;
  }

  .footer-col {
    gap: 0.22rem;
  }

  .footer-col-title {
    font-size: 0.64rem;
    margin-bottom: 0.16rem;
  }

  .footer-link {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .footer-social-links {
    gap: 0.42rem;
  }

  .social-icon-img {
    width: 18px;
    height: 18px;
    border-radius: 6px;
  }
}

.guide-search-row {
  display: flex;
  gap: 0.7rem;
  align-items: center;
  flex-wrap: wrap;
  max-width: 760px;
}

.guide-search {
  flex: 1;
  min-width: 240px;
}

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

.guide-card {
  overflow: hidden;
}

.guide-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.guide-card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 70px rgba(10, 12, 16, 0.08);
}

.guide-card-title {
  margin: 0;
  font-size: 1.05rem;
}

.guide-tags {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  flex: 1;
}

.guide-breadcrumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.guide-article {
  max-width: 980px;
  margin-inline: auto;
}

.guide-list {
  margin: 0;
  padding-left: 1.2rem;
}

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

.guide-shot {
  margin: 0;
}

.guide-shot img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(0, 0, 0, 0.03);
}

@media (max-width: 720px) {
  .guide-search-row {
    flex-direction: column;
    align-items: stretch;
  }

  .guide-tags {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .shell::before,
  .liquid-card::after,
  .page > * {
    animation: none;
  }

  .card,
  .button,
  .button-ghost,
  .tab,
  .nav a,
  .journey-step,
  .pose-card,
  .pose-card > img,
  .scroll-word,
  .home-float-card {
    transition: none;
  }

  .mobile-menu-backdrop,
  .mobile-menu-drawer,
  .mobile-menu-sheet,
  .mobile-menu-stack,
  .mobile-menu-links a,
  .mobile-menu-meta {
    transition: none;
  }

  .home-float-card {
    transform: none;
  }

  .scroll-word {
    transform: none;
  }
}
