/* Brand Hero — modern UI (2024+) */
:root {
  --color-bg: #f4f6fb;
  --color-bg-elevated: #ffffff;
  --color-ink: #0f172a;
  --color-ink-soft: #334155;
  --color-muted: #64748b;
  --color-border: rgba(15, 23, 42, 0.08);
  --color-border-strong: rgba(15, 23, 42, 0.12);
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: rgba(79, 70, 229, 0.12);
  --accent-glow: rgba(79, 70, 229, 0.35);
  --success: #059669;
  --success-bg: rgba(5, 150, 105, 0.1);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.1);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 16px 48px rgba(15, 23, 42, 0.1);
  --font-display: "Outfit", system-ui, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(79, 70, 229, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(14, 165, 233, 0.08), transparent),
    radial-gradient(ellipse 50% 30% at 0% 100%, rgba(244, 63, 94, 0.06), transparent),
    var(--color-bg);
}

/* Marketing pages (home, auth, 404) — neutral chrome to match studio shell */
.marketing-body {
  overflow-x: hidden;
  --color-bg: #fafafa;
  --color-bg-elevated: #ffffff;
  --color-ink: #171717;
  --color-ink-soft: #404040;
  --color-muted: #737373;
  --color-border: rgba(0, 0, 0, 0.06);
  --color-border-strong: rgba(0, 0, 0, 0.12);
  --accent: #171717;
  --accent-hover: #262626;
  --accent-soft: rgba(23, 23, 23, 0.08);
  --accent-glow: rgba(0, 0, 0, 0.12);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.08);
  background: var(--color-bg);
  color: var(--color-ink);
}

.marketing-body .bg-mesh {
  background:
    radial-gradient(ellipse 80% 45% at 50% -25%, rgba(0, 0, 0, 0.05), transparent),
    radial-gradient(ellipse 55% 35% at 100% 0%, rgba(0, 0, 0, 0.03), transparent),
    var(--color-bg);
}

.marketing-body .btn-primary {
  background: #171717;
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  filter: none;
}

.marketing-body .btn-primary:hover {
  background: #262626;
  filter: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.marketing-body .btn-secondary,
.marketing-body .btn-ghost {
  background: #fff;
  border-color: #e5e5e5;
  box-shadow: none;
}

.marketing-body .btn-secondary:hover,
.marketing-body .btn-ghost:hover {
  background: #f5f5f5;
  border-color: #d4d4d4;
}

.marketing-body .hero-title-accent {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: currentColor;
  color: var(--color-ink);
}

.marketing-body .hero-badge {
  color: var(--color-ink-soft);
  background: rgba(0, 0, 0, 0.04);
  border-color: #e5e5e5;
}

.marketing-body .hero-badge-dot {
  background: #171717;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.marketing-body .bento-icon--grid,
.marketing-body .bento-icon--blocks,
.marketing-body .bento-icon--shield {
  background: linear-gradient(145deg, #404040 0%, #171717 100%);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.marketing-body .auth-card {
  border-color: #e5e5e5;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.07);
}

.marketing-body .auth-footer a {
  color: var(--color-ink);
}

.marketing-body .auth-footer a:hover {
  color: var(--color-ink-soft);
}

.marketing-body .field input:focus,
.marketing-body .field textarea:focus,
.marketing-body .form input:focus,
.marketing-body .form textarea:focus,
.marketing-body .form select:focus {
  border-color: #171717;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

.marketing-body .field input::placeholder,
.marketing-body .form input::placeholder {
  color: #a3a3a3;
}

.marketing-body .site-footer {
  border-top-color: #e5e5e5;
}

.marketing-body .inline-code {
  background: #f5f5f5;
  color: var(--color-ink);
}

/* Coming soon (temporary root) */
.coming-soon {
  min-height: min(70vh, 640px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 0 3rem;
}

.coming-soon-inner {
  text-align: center;
  max-width: 38rem;
  margin: 0 auto;
}

.coming-soon-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 1rem;
}

.coming-soon-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin: 0 0 1rem;
  color: var(--color-ink);
}

.coming-soon-lede {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-muted);
  font-weight: 500;
}

.coming-soon-note {
  margin: 1.75rem 0 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.coming-soon-note a {
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
}

.coming-soon-note a:hover {
  text-decoration: underline;
}

.marketing-body .main-inner--marketing {
  width: min(1180px, 94vw);
}

/* —— Marketing homepage (Qraft-style flow + Brandy-style depth) —— */
.mh-hero-wrap {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  margin-bottom: 2rem;
}

@media (min-width: 960px) {
  .mh-hero-wrap {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 3rem;
    margin-bottom: 3rem;
  }
}

.marketing-body .mh-hero {
  max-width: none;
  padding-top: 0.5rem;
}

.mh-hero-title {
  max-width: min(22ch, 100%);
}

.mh-hero-lede {
  max-width: 52ch;
}

.mh-hero-actions {
  margin-top: 1.75rem;
}

.mh-hero-foot {
  margin: 1.25rem 0 0;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.mh-hero-foot a {
  color: var(--color-ink-soft);
  font-weight: 600;
  text-decoration: none;
}

.mh-hero-foot a:hover {
  text-decoration: underline;
}

.mh-hero-panel {
  border-radius: var(--radius-xl);
  border: 1px solid #e5e5e5;
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.mh-hero-panel-inner {
  display: flex;
  flex-direction: column;
  min-height: 220px;
}

.mh-hero-panel-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1rem;
  background: #f5f5f5;
  border-bottom: 1px solid #e5e5e5;
}

.mh-hero-panel-dots {
  display: inline-flex;
  gap: 0.35rem;
  align-items: center;
}

.mh-hero-panel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d4d4d4;
}

.mh-hero-panel-dot--r {
  background: #fca5a5;
}

.mh-hero-panel-dot--y {
  background: #fcd34d;
}

.mh-hero-panel-dot--g {
  background: #86efac;
}

.mh-hero-panel-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  font-family: ui-monospace, monospace;
}

.mh-hero-panel-body {
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.mh-hero-panel-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2rem;
}

.mh-hero-panel-row--accent {
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #e5e5e5;
}

.mh-hero-panel-tag {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  width: 5.5rem;
  flex-shrink: 0;
}

.mh-hero-panel-line {
  flex: 1;
  height: 10px;
  border-radius: 4px;
  background: linear-gradient(90deg, #e5e5e5 0%, #f5f5f5 100%);
}

.mh-hero-panel-line--short {
  max-width: 60%;
}

.mh-hero-panel-row--accent .mh-hero-panel-line {
  height: 36px;
  background: linear-gradient(135deg, #262626 0%, #171717 100%);
  border-radius: var(--radius-sm);
}

.mh-hero-panel-swatches {
  display: flex;
  gap: 0.35rem;
}

.mh-hero-panel-swatches i {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e5e5e5;
}

.mh-hero-panel-swatches i:nth-child(1) {
  background: #171717;
}

.mh-hero-panel-swatches i:nth-child(2) {
  background: #737373;
}

.mh-hero-panel-swatches i:nth-child(3) {
  background: #e5e5e5;
}

.mh-trust {
  margin: 0 0 3rem;
}

.mh-trust-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.mh-trust-list li {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid #e5e5e5;
  background: rgba(255, 255, 255, 0.7);
}

.mh-section {
  margin: 0 0 3.5rem;
}

.mh-section--soft {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 3rem 1.5rem;
  width: 100vw;
  max-width: 100vw;
  background: #f5f5f5;
  border-top: 1px solid #e5e5e5;
  border-bottom: 1px solid #e5e5e5;
}

.mh-section--soft .mh-kicker,
.mh-section--soft .mh-section-title,
.mh-section--soft .mh-section-lede,
.mh-section--soft .mh-steps {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.mh-section--soft .mh-section-lede {
  text-align: center;
}

.mh-section--soft .mh-kicker {
  text-align: center;
}

.mh-section--soft .mh-section-title {
  text-align: center;
}

.mh-kicker {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin: 0 0 0.5rem;
}

.mh-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  color: var(--color-ink);
}

.mh-section-lede {
  margin: 0 0 2rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-muted);
  max-width: 62ch;
}

.mh-reasons {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 720px) {
  .mh-reasons {
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem 2rem;
  }
}

.mh-reason {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid #e5e5e5;
  background: var(--color-bg-elevated);
  box-shadow: var(--shadow-sm);
}

.mh-reason-num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #d4d4d4;
  line-height: 1;
  flex-shrink: 0;
}

.mh-reason-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  color: var(--color-ink);
}

.mh-reason-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-muted);
}

.mh-steps {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 800px) {
  .mh-steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.mh-step {
  text-align: center;
  padding: 0 0.5rem;
}

.mh-step-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: #171717;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.mh-step-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--color-ink);
}

.mh-step-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-muted);
}

.mh-features {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 640px) {
  .mh-features {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .mh-features {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mh-feature {
  padding: 1.35rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid #e5e5e5;
  background: var(--color-bg-elevated);
  transition: box-shadow 0.2s var(--ease);
}

.mh-feature:hover {
  box-shadow: var(--shadow);
}

.mh-feature-title {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--color-ink);
}

.mh-feature-text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-muted);
}

.mh-code {
  font-size: 0.8125em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #f5f5f5;
  font-family: ui-monospace, monospace;
}

.mh-audience {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

@media (min-width: 800px) {
  .mh-audience {
    grid-template-columns: repeat(3, 1fr);
  }
}

.mh-audience-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid #e5e5e5;
  background: linear-gradient(180deg, #fff 0%, #fafafa 100%);
}

.mh-audience-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.mh-audience-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-muted);
}

.mh-cta {
  margin: 2rem calc(50% - 50vw) 0;
  width: 100vw;
  max-width: 100vw;
  padding: 3rem 1.5rem;
  background: #171717;
  color: #fafafa;
}

.mh-cta-inner {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}

.mh-cta-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
  color: #fff;
}

.mh-cta-lede {
  margin: 0 0 1.75rem;
  font-size: 1rem;
  line-height: 1.6;
  color: #a3a3a3;
}

.mh-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.mh-cta .btn-primary {
  background: #fff;
  color: #171717;
  box-shadow: none;
}

.mh-cta .btn-primary:hover {
  background: #f5f5f5;
  color: #171717;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
}

.mh-cta .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.mh-cta .btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
}

@media (max-width: 640px) {
  .mh-hero-wrap {
    gap: 1.75rem;
  }

  .mh-section--soft {
    padding: 2.25rem 1rem;
  }
}

.wrap {
  width: min(1120px, 92vw);
  margin: 0 auto;
}

/* Header — light bar for dark logo mark */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px) saturate(1.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.logo-img {
  display: block;
  height: clamp(28px, 4.5vw, 36px);
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: 999px;
  color: var(--color-ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.site-header .nav-link:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

.nav-link--btn {
  border: none;
  cursor: pointer;
  font: inherit;
  background: transparent;
}

.nav-form {
  margin: 0;
  display: inline;
}

.btn-nav {
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
}

/* Sign up in header (public pages — not marketing shell) */
.site-header .btn.btn-nav {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow), var(--shadow-sm);
  border: none;
}

.site-header .btn.btn-nav:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.marketing-body .site-header .btn-nav {
  background: #171717 !important;
  color: #fff !important;
  border: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
  filter: none !important;
}

.marketing-body .site-header .btn-nav:hover {
  background: #262626 !important;
  color: #fff !important;
  border: none !important;
  filter: none !important;
}

/* Main */
.main {
  padding: 2.5rem 0 4rem;
  min-height: 60vh;
}

.main-inner {
  padding-bottom: 0.5rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.75rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.footer-dot {
  opacity: 0.5;
}

/* Typography */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

.page-title {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.page-desc {
  margin: 0;
  color: var(--color-muted);
  font-size: 1rem;
}

.page-count {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-muted);
  letter-spacing: 0.02em;
}

.btn-plus {
  margin-right: 0.15rem;
  font-weight: 700;
  opacity: 0.9;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.share-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  word-break: break-all;
}

.share-link:hover {
  text-decoration: underline;
}

/* Hero home */
.hero {
  padding: 1rem 0 3.5rem;
  max-width: 720px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.2);
  margin-bottom: 1.25rem;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.1;
  margin: 0 0 1.25rem;
  letter-spacing: -0.04em;
  color: var(--color-ink);
  isolation: isolate;
}

.hero-title-accent {
  background: linear-gradient(120deg, var(--accent) 0%, #7c3aed 50%, #a855f7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.hero-lede {
  font-size: 1.125rem;
  color: var(--color-muted);
  font-weight: 500;
  max-width: 42ch;
  line-height: 1.65;
  margin: 0 0 0.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* Transform-only: keeps text readable if paint/screenshot happens mid-animation */
@keyframes hero-in {
  from {
    transform: translateY(14px);
  }
  to {
    transform: translateY(0);
  }
}

.hero-animate {
  animation: hero-in 0.55s var(--ease) forwards;
}

@keyframes auth-in {
  from {
    transform: translateY(10px) scale(0.99);
  }
  to {
    transform: translateY(0) scale(1);
  }
}

.auth-animate {
  animation: auth-in 0.45s var(--ease) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .hero-animate,
  .auth-animate,
  .public-hero-animate {
    animation: none;
    opacity: 1;
    transform: none;
  }
}

/* Bento */
.bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 0 0 3rem;
}

@media (min-width: 800px) {
  .bento {
    grid-template-columns: 1fr 1fr;
  }
  .bento-card--wide {
    grid-column: 1 / -1;
  }
}

.bento-card {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.bento-card:hover {
  box-shadow: var(--shadow-lg);
}

.bento-card h2 {
  font-size: 1.125rem;
  margin: 0 0 0.5rem;
}

.bento-card p {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.bento-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.bento-icon--grid {
  background: linear-gradient(135deg, var(--accent) 0%, #7c3aed 100%);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.bento-icon--blocks {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.35);
}

.bento-icon--shield {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  box-shadow: 0 8px 24px rgba(5, 150, 105, 0.3);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-sm);
  border: none;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow), var(--shadow-sm);
}

.btn-primary:hover {
  filter: brightness(1.05);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-secondary {
  background: var(--color-bg-elevated);
  color: var(--color-ink);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: #f8fafc;
  border-color: var(--color-muted);
}

.btn-ghost-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid transparent;
}

.btn-ghost-danger:hover {
  background: var(--danger-soft);
  border-color: rgba(220, 38, 38, 0.25);
}

.btn-small {
  padding: 0.45rem 0.9rem;
  font-size: 0.8125rem;
}

.btn-block {
  width: 100%;
}

.text-btn {
  border: none;
  background: none;
  color: var(--color-muted);
  font: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.text-btn:hover {
  color: var(--danger);
}

/* Alias for older templates */
.btn-ghost {
  background: var(--color-bg-elevated);
  color: var(--color-ink);
  border: 1px solid var(--color-border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover {
  background: #f8fafc;
  border-color: var(--color-muted);
}

/* Forms */
.form {
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-narrow {
  max-width: 480px;
}

.form-modern .field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink-soft);
}

.field-hint {
  font-weight: 400;
  color: var(--color-muted);
}

.field input,
.field textarea,
.form input[type="text"],
.form input[type="email"],
.form input[type="password"],
.form textarea,
.form select {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  font: inherit;
  font-size: 0.9375rem;
  background: var(--color-bg-elevated);
  color: var(--color-ink);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #94a3b8;
}

.field input:hover,
.field textarea:hover,
.form input:hover,
.form textarea:hover {
  border-color: #cbd5e1;
}

.field input:focus,
.field textarea:focus,
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field-checkbox {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-ink-soft);
}

.field-checkbox input {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.15rem;
  accent-color: var(--accent);
}

.inline-code {
  font-size: 0.8em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: #f1f5f9;
  color: var(--accent);
}

/* Auth */
.auth-page {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 0;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem 2.25rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.auth-title {
  font-size: 1.75rem;
  margin: 0 0 0.35rem;
}

.auth-sub {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
  font-size: 0.9375rem;
}

.auth-footer {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.auth-footer a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Dashboard (workspace grid) */
.dash-page {
  max-width: 1100px;
  margin: 0 auto;
}

.dash-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-border);
}

.dash-kicker {
  margin: 0 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #a3a3a3;
}

.dash-title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-ink);
}

.dash-sub {
  margin: 0;
  max-width: 46ch;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--color-muted);
}

.dash-stat {
  margin: 0.75rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.dash-stat-num {
  font-weight: 700;
  color: var(--color-ink);
}

.dash-new-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1.15rem;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.dash-new-icon {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0.9;
}

.dash-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 1.25rem;
}

.dash-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1.35rem 1.4rem;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dash-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.dash-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.dash-card-heading {
  margin: 0;
  min-width: 0;
  flex: 1;
}

.dash-card-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-ink);
  text-decoration: none;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-card-title:hover {
  color: #171717;
}

.dash-pill {
  flex-shrink: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dash-pill--live {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.dash-pill--private {
  background: #f4f4f5;
  color: #71717a;
  border: 1px solid #e4e4e7;
}

.dash-card-slug {
  margin: 0 0 1rem;
  font-size: 0.75rem;
}

.dash-card-slug code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--color-muted);
  background: #f4f4f5;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.dash-card-meta {
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.dash-time {
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.dash-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.dash-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.15s, color 0.15s;
}

.dash-action--primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
  box-shadow: 0 1px 4px rgba(79, 70, 229, 0.3);
}

.dash-action--primary:hover {
  filter: brightness(1.05);
  color: #fff;
}

.dash-action--ghost {
  background: #fff;
  color: var(--color-ink-soft);
  border: 1px solid var(--color-border-strong);
}

.dash-action--ghost:hover {
  background: #fafafa;
  border-color: #d4d4d8;
  color: var(--color-ink);
}

.dash-action--disabled {
  color: var(--color-muted);
  background: #fafafa;
  border: 1px dashed var(--color-border);
  cursor: default;
  font-size: 0.75rem;
}

.btn-copy {
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(79, 70, 229, 0.25);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.btn-copy:hover {
  background: rgba(79, 70, 229, 0.18);
}

.btn-copy:active {
  transform: scale(0.98);
}

/* Dashboard empty */
.dash-empty {
  text-align: center;
  padding: 2.5rem 1.5rem 3rem;
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  max-width: 560px;
  margin: 0 auto;
}

.dash-empty-visual {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  border-radius: 20px;
  background: linear-gradient(145deg, #f5f5f5, #e5e5e5);
  border: 1px solid #e5e5e5;
}

.dash-empty-title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-ink);
}

.dash-empty-text {
  margin: 0 0 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--color-muted);
}

.dash-empty-cta {
  margin-bottom: 2rem;
}

.dash-steps {
  list-style: none;
  margin: 0;
  padding: 1.25rem 1.5rem;
  text-align: left;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
}

.dash-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  color: var(--color-muted);
  line-height: 1.5;
}

.dash-steps li:last-child {
  margin-bottom: 0;
}

.dash-step-num {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e5e5e5;
  font-size: 0.75rem;
  font-weight: 700;
  color: #525252;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-steps strong {
  color: var(--color-ink-soft);
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.pill--live {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

.pill--live:hover {
  background: rgba(5, 150, 105, 0.18);
}

.pill--muted {
  background: #f1f5f9;
  color: var(--color-muted);
}

/* Empty */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--color-bg-elevated);
  border: 1px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  max-width: 480px;
}

.empty-state--compact {
  max-width: none;
  text-align: left;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent-soft), rgba(124, 58, 237, 0.2));
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.empty-state-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 0.5rem;
}

.empty-state-text {
  color: var(--color-muted);
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
}

/* Panels */
.panel {
  background: var(--color-bg-elevated);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.panel-title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
}

.form-upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.input-file {
  font-size: 0.875rem;
}

.form-add-block {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.field-inline {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink-soft);
}

.select-modern {
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  font: inherit;
  min-width: 160px;
}

.form-new-collection {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.input-grow {
  flex: 1;
  min-width: 200px;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  font: inherit;
}

.collection-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.block-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin: 1rem 0;
  background: #fafbfc;
}

.block-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.block-card label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-ink-soft);
  margin-bottom: 0.75rem;
}

.block-card input,
.block-card textarea,
.block-card select {
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border-strong);
  font: inherit;
  font-weight: 400;
}

.media-grid {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--color-muted);
}

.muted {
  color: var(--color-muted);
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  max-width: 520px;
  font-size: 0.9375rem;
  font-weight: 500;
}

.flash-error {
  background: var(--danger-soft);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.flash-ok {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(5, 150, 105, 0.25);
}

/* Public */
.public-shell {
  max-width: 680px;
  margin: 0 auto;
}

.public-shell--portfolio {
  max-width: 1100px;
}

.public-shell--portfolio .public-collection {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  align-items: start;
}

.public-shell--portfolio .public-section-title {
  grid-column: 1 / -1;
  margin-bottom: 0.25rem;
}

.public-shell--portfolio .public-block {
  margin-bottom: 0;
}

.public-shell--portfolio .public-hero {
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.public-hero {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.public-hero-animate {
  animation: hero-in 0.55s var(--ease) forwards;
}

.public-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.public-title {
  font-size: clamp(2rem, 5vw, 2.75rem);
  font-weight: 700;
  margin: 0 0 0.75rem;
  letter-spacing: -0.03em;
}

.public-lede {
  font-size: 1.125rem;
  color: var(--color-muted);
  font-weight: 500;
  margin: 0;
  line-height: 1.65;
}

.public-section-title {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-ink);
  display: inline-block;
}

.public-collection {
  margin-bottom: 2.5rem;
}

.card-float {
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-elevated);
  margin-bottom: 1rem;
}

.color-swatch {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.color-chip {
  width: 80px;
  height: 80px;
  border-radius: var(--radius);
  background: var(--c, #ccc);
  border: 1px solid var(--color-border);
  flex-shrink: 0;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
}

.type-spec {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.35rem 1.25rem;
  margin: 0;
  font-size: 0.9375rem;
}

.type-spec dt {
  margin: 0;
  color: var(--color-muted);
  font-weight: 600;
}

.type-spec dd {
  margin: 0;
}

.prose {
  max-width: 65ch;
  color: var(--color-ink-soft);
}

.media-figure img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}

.file-link {
  font-weight: 600;
  color: var(--accent);
}

/* Motion */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}

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

.reveal-delay-1 {
  transition-delay: 0.08s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-badge-dot {
    animation: none;
  }
}

/* Brandy-style studio (space editor) */
.studio-body-root {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  background: #fafafa;
  color: #171717;
  --studio-btn-solid: #171717;
  --studio-btn-solid-hover: #262626;
  --studio-btn-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  --studio-border: #e5e5e5;
}

/* Studio shell — buttons align with neutral chrome (no marketing gradients) */
.studio-body-root .btn-primary {
  background: var(--studio-btn-solid);
  color: #fff;
  box-shadow: var(--studio-btn-shadow);
  filter: none;
}

.studio-body-root .btn-primary:hover {
  background: var(--studio-btn-solid-hover);
  filter: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.studio-body-root .btn-primary:focus-visible {
  outline: 2px solid var(--studio-btn-solid);
  outline-offset: 2px;
}

.studio-body-root .btn-secondary,
.studio-body-root .btn-ghost {
  background: #fff;
  color: #171717;
  border: 1px solid var(--studio-border);
  box-shadow: none;
}

.studio-body-root .btn-secondary:hover,
.studio-body-root .btn-ghost:hover {
  background: #f5f5f5;
  border-color: #d4d4d4;
  filter: none;
}

.studio-body-root .btn-secondary:focus-visible,
.studio-body-root .btn-ghost:focus-visible {
  outline: 2px solid #a3a3a3;
  outline-offset: 2px;
}

.studio-body-root .dash-action--primary {
  background: var(--studio-btn-solid);
  color: #fff;
  box-shadow: var(--studio-btn-shadow);
  border: none;
  filter: none;
}

.studio-body-root .dash-action--primary:hover {
  background: var(--studio-btn-solid-hover);
  filter: none;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.studio-body-root .dash-action--primary:focus-visible {
  outline: 2px solid var(--studio-btn-solid);
  outline-offset: 2px;
}

.studio-body-root .dash-action--ghost {
  background: #fff;
  color: #404040;
  border: 1px solid var(--studio-border);
  box-shadow: none;
}

.studio-body-root .dash-action--ghost:hover {
  background: #f5f5f5;
  border-color: #d4d4d4;
  color: #171717;
}

.studio-body-root .btn-copy {
  color: #404040;
  background: #fff;
  border: 1px solid var(--studio-border);
}

.studio-body-root .btn-copy:hover {
  background: #f5f5f5;
  color: #171717;
}

.studio-body-root .text-btn {
  color: #737373;
}

.studio-body-root .text-btn:hover {
  color: #171717;
}

.studio-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.studio-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  flex-shrink: 0;
}

.studio-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.studio-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
}

.studio-logo:hover {
  opacity: 0.82;
}

.studio-logo:focus-visible {
  outline: 2px solid #171717;
  outline-offset: 3px;
}

.studio-logo-img {
  display: block;
  height: 28px;
  width: auto;
}

.studio-topbar-sep {
  width: 1px;
  height: 1.25rem;
  background: #e5e5e5;
}

.studio-space-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #171717;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 40vw;
}

.studio-space-title--context {
  font-weight: 500;
  color: #737373;
}

/* Space switcher — lives in the left sidebar */
.studio-space-picker-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: #171717;
  line-height: 1.3;
}

.studio-switcher {
  position: relative;
  width: 100%;
  min-width: 0;
}

.studio-switcher--sidebar {
  max-width: none;
}

.studio-switcher::-webkit-details-marker {
  display: none;
}

.studio-switcher-btn {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  cursor: pointer;
  padding: 0.45rem 0.5rem;
  margin: 0;
  border-radius: 8px;
  border: 1px solid #e5e5e5;
  background: #fafafa;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  color: #171717;
  width: 100%;
  box-sizing: border-box;
}

.studio-switcher-btn:hover {
  background: #f5f5f5;
  border-color: #d4d4d4;
}

.studio-switcher[open] .studio-switcher-btn {
  border-color: #d4d4d4;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.studio-switcher-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  text-align: left;
}

.studio-switcher-caret {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid #737373;
  border-bottom: 1.5px solid #737373;
  transform: rotate(45deg);
  margin-top: -0.15rem;
  flex-shrink: 0;
  opacity: 0.6;
}

.studio-switcher[open] .studio-switcher-caret {
  transform: rotate(-135deg);
  margin-top: 0.1rem;
}

.studio-switcher-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: auto;
  min-width: 100%;
  max-height: min(60vh, 320px);
  overflow-y: auto;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  z-index: 400;
}

.studio-switcher-menu li {
  margin: 0;
}

.studio-switcher-item {
  display: block;
  padding: 0.45rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #404040;
  text-decoration: none;
}

.studio-switcher-item:hover {
  background: #f5f5f5;
  color: #171717;
}

.studio-switcher-item.is-active {
  background: #f5f5f5;
  font-weight: 600;
  color: #171717;
}

.studio-switcher-item--action {
  color: #737373;
}

.studio-switcher-divider {
  height: 1px;
  margin: 0.35rem 0;
  background: #f0f0f0;
  padding: 0;
  list-style: none;
}

.studio-sidebar--shell {
  flex: 1;
  min-height: 0;
  justify-content: flex-start;
}

.studio-sidebar--shell .studio-powered {
  margin-top: auto;
}

.studio-canvas--solo {
  margin: 0 auto;
  width: 100%;
}

.studio-topbar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.studio-topbar-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: #525252;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
}

.studio-topbar-link:hover {
  background: #f5f5f5;
  color: #171717;
}

.studio-topbar-link--btn {
  color: #737373;
}

.studio-topbar-muted {
  font-size: 0.8125rem;
  color: #a3a3a3;
}

.studio-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: #171717;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.02em;
}

.studio-logout {
  margin: 0;
  display: inline;
}

.studio-workspace {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #fafafa;
}

.studio-sidebar {
  width: 240px;
  flex: 0 0 auto;
  background: #fff;
  border-right: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  align-self: stretch;
  padding: 1rem 0.75rem 1rem 1rem;
}

.studio-sidebar-workspace {
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.studio-sidebar-inline-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  flex-shrink: 0;
}

.studio-inline-link {
  color: #737373;
  text-decoration: none;
}

.studio-inline-link:hover {
  color: #171717;
}

.studio-inline-link.is-active {
  color: #171717;
}

.studio-inline-link--btn {
  border: none;
  background: none;
  font: inherit;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
}

.studio-sidebar-inline-sep {
  color: #d4d4d4;
  user-select: none;
  font-size: 0.65rem;
  line-height: 1;
}

.studio-checklist {
  margin: 0;
  padding: 0 0 0 1.15rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: #404040;
}

.studio-checklist li {
  margin-bottom: 0.5rem;
}

.studio-sidebar-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #a3a3a3;
  margin-bottom: 0.25rem;
}

.studio-workspace-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #171717;
  line-height: 1.3;
}

.studio-sidebar-quick {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #f0f0f0;
}

.studio-quick-link {
  font-size: 0.75rem;
  font-weight: 600;
  color: #737373;
  text-decoration: none;
}

.studio-quick-link:hover,
.studio-quick-link.is-active {
  color: #171717;
}

.studio-quick-link.is-active {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.studio-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* Scroll only the collections list; Trash, Insight, and + Collection stay pinned below */
.studio-nav--collections {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-right: 0.15rem;
  margin-right: -0.15rem;
}

.studio-nav-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #404040;
  text-decoration: none;
}

.studio-nav-item:hover {
  background: #f5f5f5;
}

.studio-nav-item.is-active {
  background: #f5f5f5;
  color: #171717;
  font-weight: 600;
}

.studio-folder-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.6;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='1.5'%3E%3Cpath d='M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2l-2-2H5a2 2 0 0 0-2 2z'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.studio-nav-item.is-active .studio-folder-icon {
  opacity: 1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='1.5'%3E%3Cpath d='M3 7v10a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2l-2-2H5a2 2 0 0 0-2 2z'/%3E%3C/svg%3E");
}

.studio-nav--tools {
  flex: 0 0 auto;
  overflow: visible;
  margin-top: 0.25rem;
  padding-top: 0.65rem;
  border-top: 1px solid #f0f0f0;
}

.studio-folder-icon--trash {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='1.5'%3E%3Cpath d='M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14zM10 11v6M14 11v6'/%3E%3C/svg%3E");
}

.studio-nav-item.is-active .studio-folder-icon--trash {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='1.5'%3E%3Cpath d='M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2m3 0v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6h14zM10 11v6M14 11v6'/%3E%3C/svg%3E");
}

.studio-folder-icon--insight {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='1.5'%3E%3Cpath d='M3 3v18h18M7 16l4-4 4 4 5-7'/%3E%3C/svg%3E");
}

.studio-nav-item.is-active .studio-folder-icon--insight {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='1.5'%3E%3Cpath d='M3 3v18h18M7 16l4-4 4 4 5-7'/%3E%3C/svg%3E");
}

.studio-nav-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-add-collection {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
  flex-shrink: 0;
}

.studio-add-row {
  display: flex;
  gap: 0.35rem;
}

.studio-add-row input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.5rem;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 0.8125rem;
  background: #fafafa;
}

.studio-add-submit {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  border: 1px solid #e5e5e5;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.studio-add-submit:hover {
  background: #f5f5f5;
}

.studio-powered {
  margin: 1rem 0 0;
  font-size: 0.65rem;
  color: #d4d4d4;
  flex-shrink: 0;
}

.studio-canvas {
  display: flex;
  flex-direction: column;
  flex: 1 1 0%;
  align-self: stretch;
  width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 0;
  max-width: none;
  overflow: hidden;
}

.studio-canvas-inner {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.studio-canvas-stack {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.studio-canvas-main {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
  padding: 1.5rem 2rem 3rem;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Checklist / Settings / Trash / Insight — slide in from the right */
.studio-slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  pointer-events: none;
}

.studio-slide-overlay.is-closed {
  display: none !important;
}

.studio-slide-backdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(15, 23, 42, 0.32);
  pointer-events: auto;
}

.studio-slide-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  width: min(420px, 100%);
  max-width: 100%;
  box-sizing: border-box;
  padding: 1.25rem 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  border-left: 1px solid #e5e5e5;
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.12);
  pointer-events: auto;
  animation: studio-slide-panel-in 0.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes studio-slide-panel-in {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.studio-slide-panel-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0 1rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid #f0f0f0;
}

.studio-slide-panel-title {
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #171717;
}

.studio-slide-panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #737373;
  font-size: 1.35rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.studio-slide-panel-close:hover {
  background: #f5f5f5;
  color: #171717;
}

.studio-slide-panel-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0.25rem 0 0.5rem;
  -webkit-overflow-scrolling: touch;
}

.studio-slide-panel-lede {
  margin-top: 0;
}

@media (max-width: 767px) {
  .studio-slide-panel {
    width: 100%;
    max-width: none;
  }
}

.studio-canvas--app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 2rem 3rem;
  box-sizing: border-box;
}

.studio-canvas--app.studio-canvas--solo {
  max-width: 720px;
}

/* Toasts — fixed; do not shift layout */
.toast-container {
  position: fixed;
  z-index: 10050;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.toast-container--marketing {
  bottom: max(1.25rem, env(safe-area-inset-bottom));
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.65rem 0.5rem 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.875rem;
  line-height: 1.45;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  pointer-events: auto;
  animation: toast-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .toast {
    animation: none;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast--out {
  animation: toast-out 0.2s ease forwards;
}

@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

.toast__text {
  flex: 1;
  min-width: 0;
}

.toast__close {
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.75rem;
  margin: -0.15rem -0.1rem 0 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  opacity: 0.55;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.toast__close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.06);
}

.toast--ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.toast--err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.toast--info {
  background: #f5f5f5;
  border: 1px solid #e5e5e5;
  color: #404040;
}

.studio-flash {
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.studio-flash--ok {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.studio-flash--err {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.studio-canvas-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  color: #171717;
}

.studio-canvas-lede {
  font-size: 0.875rem;
  color: #737373;
  margin: 0 0 1.25rem;
}

.studio-panel {
  margin-bottom: 2rem;
}

.studio-panel-heading {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.studio-field-hint {
  margin: -0.25rem 0 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
}

.studio-dns-box {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #e5e5e5;
  background: #fafafa;
}

.studio-dns-box-title {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #525252;
}

.studio-dns-steps {
  margin: 0;
  padding-left: 1.15rem;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #404040;
}

.studio-dns-steps li {
  margin-bottom: 0.65rem;
}

.studio-dns-steps li:last-child {
  margin-bottom: 0;
}

.studio-dns-steps strong {
  font-weight: 600;
}

.studio-dns-steps em {
  font-style: italic;
  font-weight: 500;
}

.studio-dns-troubleshoot {
  margin: 0.85rem 0 0;
  padding-top: 0.85rem;
  border-top: 1px solid #e5e5e5;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: #525252;
}

.studio-dns-troubleshoot strong {
  color: #171717;
}

.studio-muted {
  margin-top: 0.75rem;
}

.studio-media {
  margin-top: 0.75rem;
}

.studio-canvas-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.studio-canvas-tools {
  flex-shrink: 0;
}

.studio-link-danger {
  font-size: 0.8125rem;
  color: #dc2626;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  padding: 0.35rem 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.studio-add-bar {
  margin-bottom: 1.5rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
}

.studio-block {
  background: #fff;
  border: 1px solid #e5e5e5;
}

.canvas-empty {
  padding: 3rem 1rem;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.canvas-empty-inner {
  text-align: center;
  padding: 3rem 1rem;
}

.canvas-empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #171717;
  margin: 0 0 0.35rem;
}

.canvas-empty-text {
  font-size: 0.9375rem;
  color: #737373;
  margin: 0 0 1rem;
  line-height: 1.55;
}

.canvas-empty-sub {
  font-size: 0.875rem;
  color: #a3a3a3;
  margin: 0 0 1.5rem;
}

.quick-add-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  max-width: 720px;
  margin: 0 auto;
}

.quick-add-card {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 88px;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #404040;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.quick-add-card:hover {
  border-color: #d4d4d4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 767px) {
  .studio-workspace {
    flex-direction: column;
  }

  .studio-sidebar {
    width: 100%;
    max-height: min(50vh, 22rem);
    overflow: hidden;
    border-right: none;
    border-bottom: 1px solid #e5e5e5;
  }

  .studio-nav--collections {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-content: flex-start;
  }

  .studio-nav--collections .studio-nav-item {
    flex: 1 1 auto;
    min-width: 120px;
  }

  .studio-canvas-main {
    padding: 1rem 1rem 2rem;
  }
}

@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Share modal — compact single column */
.share-modal-dialog {
  border: none;
  padding: 0;
  border-radius: 12px;
  max-width: 520px;
  width: min(96vw, 520px);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
}

.share-modal-dialog::backdrop {
  background: rgba(15, 23, 42, 0.45);
}

.share-modal-inner {
  background: #fff;
}

.share-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 1rem;
  background: #171717;
  color: #fff;
}

.share-modal-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.share-modal-close {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: none;
  background: transparent;
  color: #a3a3a3;
  font-size: 0.75rem;
  cursor: pointer;
  font-family: inherit;
  padding: 0.25rem 0.35rem;
  border-radius: 6px;
}

.share-modal-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.share-modal-close-esc {
  text-transform: lowercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
}

.share-modal-close-x {
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 400;
}

.share-modal-body {
  padding: 1rem 1rem 1.1rem;
}

.share-modal-block {
  margin-bottom: 1.1rem;
}

.share-modal-block:last-of-type {
  margin-bottom: 0.65rem;
}

.share-field-label {
  margin: 0 0 0.4rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a3a3a3;
}

.share-link-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.share-link-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.share-field-input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 0.75rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #404040;
  background: #fafafa;
}

.share-qr-compact {
  flex-shrink: 0;
  padding: 0.35rem;
  align-self: center;
  border: 1px solid #eee;
  border-radius: 8px;
  background: #fff;
}

.share-qr-compact .share-qr-img {
  display: block;
}

.share-modal-muted {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: #525252;
}

.share-modal-btn {
  font-size: 0.8125rem;
  padding: 0.45rem 0.95rem;
  align-self: flex-start;
}

.share-modal-btn--quiet {
  background: #fff;
  color: #404040;
  border: 1px solid #e5e5e5;
}

.share-modal-btn--quiet:hover {
  background: #fafafa;
  border-color: #d4d4d4;
}

.share-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.share-modal-block--team {
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
  margin-top: 0.25rem;
}

.share-team-form {
  margin-bottom: 0.75rem;
}

.share-team-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.share-team-email {
  flex: 1 1 160px;
  min-width: 0;
  padding: 0.45rem 0.6rem;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-family: inherit;
}

.share-team-role-select {
  padding: 0.4rem 0.5rem;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  font-size: 0.75rem;
  font-family: inherit;
  background: #fff;
}

.share-team-list,
.share-team-pending {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.8125rem;
}

.share-team-list-item,
.share-team-pending-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid #f4f4f5;
}

.share-team-list-item:last-child,
.share-team-pending-item:last-child {
  border-bottom: none;
}

.share-team-list-email {
  flex: 1 1 140px;
  min-width: 0;
  word-break: break-all;
  color: #262626;
}

.share-team-list-role,
.share-team-pending-role {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #a3a3a3;
}

.share-team-remove-form {
  margin: 0;
  margin-left: auto;
}

.share-team-remove {
  border: none;
  background: transparent;
  color: #c2410c;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0.15rem 0;
  font-family: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.share-team-remove:hover {
  color: #9a3412;
}

.share-team-pending-label {
  margin: 0.65rem 0 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #a3a3a3;
}

.share-modal-muted--tight {
  margin: 0;
  font-size: 0.8125rem;
}

.share-modal-note--tight {
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid #f0f0f0;
}

.share-embed-panels--simple {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #f4f4f5;
  padding: 0.75rem;
  max-height: 140px;
  overflow: auto;
}

.share-embed-panels--simple .share-embed-pre {
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: #404040;
}

.share-embed-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.share-portfolio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #525252;
  cursor: pointer;
  user-select: none;
}

.share-portfolio-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: #171717;
}

.share-modal-note {
  margin: 0;
  padding-top: 0.75rem;
  border-top: 1px solid #f0f0f0;
  font-size: 0.75rem;
  line-height: 1.45;
  color: #a3a3a3;
}

.share-modal-note-sep {
  margin: 0 0.25rem;
}

.share-modal-note-you {
  color: #737373;
  word-break: break-all;
}

@media (max-width: 420px) {
  .share-link-row {
    flex-direction: column;
  }

  .share-qr-compact {
    align-self: flex-start;
  }
}
