/* Studio is an opt-in skin. Every selector is scoped: switching back restores
   the original themes without lingering layout or component overrides. */
html[data-theme="studio"] {
  --background: #f3f5f6; --foreground: #182333; --muted: #586575;
  --muted-strong: #475363; --line: #dce2e7; --line-strong: #b9c6cf;
  --panel: #fff; --panel-soft: #f7f9fa; --panel-softer: #eaf0f1;
  --brand: #182333; --accent: #365e24; --accent-strong: #294e18;
  --accent-soft: #e8f3d9; --gold: #936015; --gold-soft: #fff1d6;
  --danger: #b52d35; --studio-lime: #d4f77d; --studio-ink: #101a27;
  --r-xs: 6px; --r-sm: 8px; --r-md: 10px; --r-lg: 14px;
  --r-xl: 18px; --r-2xl: 24px; --radius: 18px; --radius-lg: 24px;
  --shadow-sm: 0 1px 2px #101a2705; --shadow-card: 0 4px 18px #101a2706;
  --shadow-pop: 0 14px 40px #101a2718; --shadow-glow: none;
  --gap-section: clamp(2.5rem, 5vw, 4.5rem);
}
html[data-theme="studio"][data-mode="dark"] {
  --background: #0c1420; --foreground: #f0f4f8; --muted: #a3afbe;
  --muted-strong: #bbc5d1; --line: #293647; --line-strong: #46576c;
  --panel: #141f2d; --panel-soft: #172434; --panel-softer: #1e2d3e;
  --brand: #f0f4f8; --accent: #d4f77d; --accent-strong: #def99d;
  --accent-soft: #283923; --gold: #edc483; --gold-soft: #3d3020; --danger: #ff9098;
  --shadow-sm: 0 1px 2px #0001; --shadow-card: 0 4px 18px #0001;
  --shadow-pop: 0 14px 40px #0004;
}
html[data-theme="studio"][data-skin="galaxy"] { --background: #0b1325; --panel: #142036; --panel-soft: #19283e; }
html[data-theme="studio"] body { letter-spacing: 0; }
html[data-theme="studio"] :is(h1,h2,h3,h4) { letter-spacing: -.025em; }
html[data-theme="studio"] :is(.page-mesh,.minimal-ambient) { display: none; }
html[data-theme="studio"] :is(.aurora,.grid-bg,.grain) { background-image: none; }
html[data-theme="studio"] :is(.aurora,.grain)::before,
html[data-theme="studio"] :is(.aurora,.grain)::after,
html[data-theme="studio"] .btn-accent::after { display: none; }
html[data-theme="studio"] :is(.glow,.glow:hover) { box-shadow: none; }
html[data-theme="studio"] :is(.text-gradient,.heading-gradient) { background: none; color: var(--accent); -webkit-text-fill-color: currentColor; }
html[data-theme="studio"] .btn { border-radius: 10px; font-size: .875rem; min-height: 42px; transition: background .18s, transform .18s, border-color .18s; }
html[data-theme="studio"] :is(.btn-accent,.btn-primary) { background: var(--studio-lime); color: var(--studio-ink); border-color: transparent; box-shadow: none; }
html[data-theme="studio"] :is(.btn-accent,.btn-primary):hover { background: #e2ffa5; transform: translateY(-1px); }
html[data-theme="studio"] :is(a,button,input,select,textarea):focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
html[data-theme="studio"] .input { min-height: 44px; background: var(--panel); border-color: var(--line-strong); font-size: .9375rem; }
html[data-theme="studio"] .platform-header { background: var(--background); backdrop-filter: none; }
html[data-theme="studio"] .platform-header > div { max-width: 1280px; min-height: 68px; }
html[data-theme="studio"] .platform-header nav a { border-radius: 8px; }
html[data-theme="studio"] .platform-header nav a[aria-current="page"] { box-shadow: inset 0 -2px var(--accent); background: transparent; color: var(--foreground); }
html[data-theme="studio"] .app-main { max-width: 1280px; padding-top: 28px; }
html[data-theme="studio"] .studio-kicker { display: block; color: var(--muted-strong); font-size: .8125rem; font-weight: 600; }
html[data-theme="studio"] .studio-hero { display: grid; grid-template-columns: 1fr 1.05fr; min-height: 450px; overflow: hidden; border-radius: 24px; background: #101a27; color: #f5f7fa; border: 1px solid #293647; }
html[data-theme="studio"] .studio-hero-copy { padding: 44px 40px 36px 16px; align-self: center; position: relative; z-index: 1; }
html[data-theme="studio"] .studio-hero .studio-kicker { color: #d4f77d; margin-bottom: 24px; }
html[data-theme="studio"] .studio-hero h1 { font-size: clamp(2rem,3.6vw,3.25rem); line-height: 1.5; font-weight: 800; max-width: 15ch; margin: 0; }
html[data-theme="studio"] .studio-hero em { color: #d4f77d; font-style: normal; }
html[data-theme="studio"] .studio-hero p { margin-top: 20px; font-size: 1rem; line-height: 2; color: #bac6d3; max-width: 42ch; }
html[data-theme="studio"] .studio-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-top: 28px; }
html[data-theme="studio"] .studio-hero .btn { min-height: 48px; padding-inline: 20px; gap: 18px; }
html[data-theme="studio"] .studio-hero-secondary { color: #eef3f9; display: inline-flex; align-items: center; gap: 12px; font-size: .875rem; }
html[data-theme="studio"] .studio-hero-secondary:hover { color: #d4f77d; }
html[data-theme="studio"] .studio-hero-note { margin-top: 28px; font-size: .8125rem; color: #a9b8c7; display: flex; align-items: center; gap: 10px; }
html[data-theme="studio"] .studio-hero-note > span { color: #d4f77d; font-size: 24px; }
html[data-theme="studio"] .studio-art { position: relative; min-width: 0; display: flex; align-items: center; }
html[data-theme="studio"] .studio-art img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
html[data-theme="studio"] .studio-art-caption { position: absolute; bottom: 26px; inset-inline: 24px; display: flex; justify-content: space-between; color: #d5dfeb; font-size: .8125rem; padding-top: 14px; border-top: 1px solid #617185; }
html[data-theme="studio"] .studio-hero--member { min-height: 290px; grid-template-columns: 1.4fr 1fr; }
html[data-theme="studio"] .studio-hero--member h1 { max-width: none; font-size: clamp(1.8rem,3vw,2.8rem); }
html[data-theme="studio"] .studio-hero--member .studio-art { max-height: 350px; }
html[data-theme="studio"] .studio-section-title { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 24px; }
html[data-theme="studio"] .studio-section-title h2 { font-size: clamp(1.5rem,2.3vw,2rem); font-weight: 800; margin-top: 8px; }
html[data-theme="studio"] .studio-count { white-space: nowrap; font-size: .8125rem; color: var(--muted); padding-bottom: 4px; }
html[data-theme="studio"] .studio-community-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
html[data-theme="studio"] .studio-community { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 24px; transition: border-color .2s, transform .2s; }
html[data-theme="studio"] .studio-community:hover { border-color: var(--accent); transform: translateY(-3px); }
html[data-theme="studio"] .studio-community-top { display: flex; justify-content: space-between; align-items: center; }
html[data-theme="studio"] .studio-community-number { font-family: ui-monospace,monospace; font-size: 1.5rem; color: var(--muted); }
html[data-theme="studio"] .studio-community-tag { font-size: .75rem; color: var(--muted-strong); border: 1px solid var(--line); padding: 3px 10px; border-radius: 6px; }
html[data-theme="studio"] .studio-community-main { display: flex; gap: 18px; align-items: flex-start; margin: 26px 0; flex: 1; }
html[data-theme="studio"] .studio-community-icon { display: grid; place-items: center; width: 64px; height: 64px; flex-shrink: 0; background: var(--panel-softer); border-radius: 16px; font-size: 28px; overflow: hidden; }
html[data-theme="studio"] .studio-community-icon img { width: 100%; height: 100%; object-fit: cover; }
html[data-theme="studio"] .studio-community h3 { font-weight: 800; font-size: 1.375rem; }
html[data-theme="studio"] .studio-community p { color: var(--muted); font-size: .9375rem; line-height: 1.9; margin-top: 5px; }
html[data-theme="studio"] .studio-community-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--muted-strong); }
html[data-theme="studio"] .studio-community-enter { color: var(--accent); display: inline-flex; gap: 24px; font-size: .875rem; font-weight: 700; }
/* Internal product surfaces: compact header, quiet reading canvas, useful density. */
html[data-theme="studio"] .community-layout { --studio-header-height: 68px; }
html[data-theme="studio"] .community-header { display: grid; grid-template-columns: minmax(0,1fr) 250px; align-items: center; gap: 20px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
html[data-theme="studio"] .community-header > .card { padding: 0; border: 0; background: transparent; box-shadow: none; overflow: visible; }
html[data-theme="studio"] .community-header > .mt-4 { margin-top: 0; }
html[data-theme="studio"] .community-header h1 { color: var(--foreground); font-size: 1.375rem; }
html[data-theme="studio"] .community-header .size-16 { width: 48px; height: 48px; box-shadow: none; }
html[data-theme="studio"] .community-tabs { top: 68px; }
html[data-theme="studio"] .community-tabs > div { border-radius: 10px; box-shadow: none; background: var(--panel); backdrop-filter: none; }
html[data-theme="studio"] .seg-rail { padding: 4px; gap: 4px; }
html[data-theme="studio"] .seg-tab { font-size: .875rem; border-radius: 7px; padding: 10px 16px; }
html[data-theme="studio"] .seg-tab[data-active="true"] { background: var(--accent-soft); color: var(--accent-strong); box-shadow: inset 0 -2px var(--accent); }
html[data-theme="studio"] .community-body { gap: 24px; grid-template-columns: minmax(0,1fr) 280px; }
html[data-theme="studio"] .community-feed { max-width: none; }
html[data-theme="studio"] .community-feed > .sticky { top: 132px; box-shadow: none; border-radius: 10px; }
html[data-theme="studio"] .tweet-card { padding: 22px; }
html[data-theme="studio"] .tweet-composer { box-shadow: none; }
html[data-theme="studio"] :is(.resource-card,.course-card) { border-radius: 16px; box-shadow: none; }
html[data-theme="studio"] :is(.resource-card,.course-card):hover { transform: translateY(-3px); }
html[data-theme="studio"] :is(.resource-card,.course-card) > div:first-child { height: 160px; }
html[data-theme="studio"] :is(.resource-card,.course-card) h3 { -webkit-line-clamp: 2; }
html[data-theme="studio"] :is(.resource-card,.course-card) p { font-size: .875rem; }
html[data-theme="studio"] .mobile-tabbar { background: var(--panel); backdrop-filter: none; }
@media (max-width: 1023px) {
  html[data-theme="studio"] .community-header { grid-template-columns: 1fr; gap: 12px; }
  html[data-theme="studio"] .community-body { grid-template-columns: minmax(0,1fr); }
  html[data-theme="studio"] .studio-hero-copy { padding: 32px 24px; }
  html[data-theme="studio"] .studio-hero h1 { font-size: 2rem; }
}
@media (max-width: 639px) {
  html[data-theme="studio"] .platform-header > div { min-height: 60px; }
  html[data-theme="studio"] .app-main { padding-top: 16px; }
  html[data-theme="studio"] .studio-hero { grid-template-columns: 1fr; border-radius: 18px; }
  html[data-theme="studio"] .studio-hero h1 { max-width: 19ch; }
  html[data-theme="studio"] .studio-art { height: 260px; }
  html[data-theme="studio"] .studio-art img { object-fit: cover; }
  html[data-theme="studio"] .studio-hero--member .studio-art { display: none; }
  html[data-theme="studio"] .studio-hero-note { margin-top: 20px; }
  html[data-theme="studio"] .studio-community-grid { grid-template-columns: 1fr; gap: 14px; }
  html[data-theme="studio"] .studio-community { padding: 20px; }
  html[data-theme="studio"] .studio-section-title { align-items: start; }
  html[data-theme="studio"] .studio-count { padding-top: 4px; }
  html[data-theme="studio"] .community-header > .card > div { gap: 12px; }
  html[data-theme="studio"] .community-header .size-16 { width: 40px; height: 40px; }
  html[data-theme="studio"] .community-tabs { top: 60px; }
  html[data-theme="studio"] .community-feed > .sticky { top: 124px; }
  html[data-theme="studio"] .tweet-card { padding: 16px; }
  html[data-theme="studio"] .mobile-tabbar { gap: 0; padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="studio"] *, html[data-theme="studio"] *::before, html[data-theme="studio"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Accent fills need ink labels in the dark palette too. The existing product
   uses white-on-accent utilities in badges and card actions. */
html[data-theme="studio"][data-mode="dark"] .btn-primary:hover { background: #e2ffa5; color: #101a27; }
html[data-theme="studio"][data-mode="dark"] [class~="bg-[var(--accent)]"][class~="text-white"] { color: #101a27; }
html[data-theme="studio"][data-mode="dark"] .group:hover [class~="group-hover:bg-[var(--accent)]"] { color: #101a27; }
html[data-theme="studio"] #course-curriculum h2 { font-size: 1.3rem; border-inline-start: 3px solid var(--accent); padding-inline-start: 14px; }
html[data-theme="studio"] #course-curriculum h3 { font-size: 1rem; }
html[data-theme="studio"] .classroom-grid:has(> :only-child) { grid-template-columns: minmax(0,1fr); }
@media (min-width: 640px) {
  html[data-theme="studio"] .classroom-grid > .course-card:only-child { flex-direction: row; }
  html[data-theme="studio"] .classroom-grid > .course-card:only-child > div:first-child { width: 38%; height: auto; min-height: 220px; flex-shrink: 0; }
}

/* Immersive Studio: a single continuous stage rather than a hero card.
   The three-dimensional elements are an interactive workflow diagram. */
html[data-theme="studio"][data-mode="dark"] {
  --background: #06151c; --panel: #0b2028; --panel-soft: #0e2831;
  --panel-softer: #13333b; --line: #1b3942; --line-strong: #38616a;
  --foreground: #eef9f6; --muted: #98b5bd; --muted-strong: #b8ced3;
  --accent: #9af0ce; --accent-strong: #b0f8dc; --accent-soft: #123d36;
}
html[data-theme="studio"] .platform-header { background: #06151cf2; border-color: #25414a; color: #edf7f7; }
html[data-theme="studio"] .platform-header > div { min-height: 72px; }
html[data-theme="studio"] .platform-header nav a { color: #b8ced3; }
html[data-theme="studio"] .platform-header nav a[aria-current="page"] { color: #a4f3d8; box-shadow: inset 0 -2px #a4f3d8; }
html[data-theme="studio"] .platform-header .btn { min-height: 38px; }
html[data-theme="studio"] .platform-header :is(.btn-ghost,.btn-icon) { color: #c8e0e1; }
html[data-theme="studio"] .studio-hero {
  position: relative; display: block; min-height: 780px; margin: -28px calc(-1 * clamp(16px,3vw,32px)) 0;
  border: 0; border-radius: 0 0 40px 40px; overflow: hidden; isolation: isolate;
  background: radial-gradient(ellipse at 50% 83%, #164741 0%, #08252c 36%, #06151c 70%);
}
html[data-theme="studio"] .studio-hero::before {
  content: ""; position: absolute; width: 900px; height: 900px; max-width: none;
  top: 210px; left: calc(50% - 450px); border: 1px solid #73bfb020;
  border-radius: 50%; transform: rotateX(65deg); pointer-events: none;
  box-shadow: 0 0 0 75px #73bfb006,0 0 0 150px #73bfb004;
}
html[data-theme="studio"] .studio-hero-copy { padding: 58px 24px 0; max-width: 880px; margin-inline: auto; text-align: center; }
html[data-theme="studio"] .studio-hero .studio-kicker { color: #8edac7; font-size: .875rem; font-weight: 500; margin-bottom: 18px; }
html[data-theme="studio"] .studio-hero h1 { max-width: 22ch; margin-inline: auto; font-size: clamp(2.25rem,4.5vw,4rem); line-height: 1.48; font-weight: 850; letter-spacing: -.035em; }
html[data-theme="studio"] .studio-hero em { color: #a0f0d0; }
html[data-theme="studio"] .studio-hero p { max-width: 58ch; margin: 16px auto 0; color: #a9c2c9; }
html[data-theme="studio"] .studio-hero-actions { justify-content: center; margin-top: 24px; }
html[data-theme="studio"] .studio-hero .btn { background: #92e7c5; color: #062520; border: 1px solid #c9ffe7; box-shadow: 0 4px 0 #1b6d58,0 12px 30px #50bc9b15; border-radius: 10px; }
html[data-theme="studio"] .studio-hero .btn:hover { background: #baffdf; transform: translateY(-2px); }
html[data-theme="studio"] .studio-hero-note { position: absolute; bottom: 20px; inset-inline: 20px; justify-content: center; margin: 0; font-size: .75rem; color: #8db1ba; }
html[data-theme="studio"] .studio-hero-note > span { font-size: 18px; }
html[data-theme="studio"] .studio-workflow { position: relative; margin-top: -38px; padding-bottom: 70px; }
html[data-theme="studio"] .studio-workflow-canvas { position: relative; height: 390px; max-width: 1000px; margin-inline: auto; touch-action: pan-y; }
html[data-theme="studio"] .studio-workflow-canvas canvas { display: block; position: relative; width: 100%; height: 100%; }
html[data-theme="studio"] .studio-scene-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; border-radius: 18px; }
html[data-theme="studio"] .studio-workflow-controls { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); max-width: 850px; margin: -28px auto 0; position: relative; gap: 24px; padding: 0 24px; }
html[data-theme="studio"] .studio-workflow-controls button { display: flex; justify-content: center; align-items: center; gap: 14px; min-height: 56px; border: 1px solid #38606a; border-radius: 12px; background: #0a242bd9; color: #d5e9e8; font-size: 1rem; box-shadow: 0 5px 0 #04171d; cursor: pointer; transition: transform .2s,background .2s,border-color .2s; }
html[data-theme="studio"] .studio-workflow-controls button > span { font-size: .75rem; color: #88b6b9; }
html[data-theme="studio"] .studio-workflow-controls button > i { font-style: normal; color: #83d8bd; }
html[data-theme="studio"] .studio-workflow-controls button[aria-pressed="true"] { border-color: #89d5bd; color: #c7ffe5; background: #134337; transform: translateY(-4px); box-shadow: 0 6px 0 #05291f; }
html[data-theme="studio"] .studio-hero .studio-workflow-description { text-align: center; margin: 22px auto 0; font-size: .875rem; padding-inline: 24px; min-height: 28px; color: #afd0cf; }
html[data-theme="studio"] .studio-hero--member { min-height: 690px; }
html[data-theme="studio"] .studio-hero--member .studio-hero-copy { padding-top: 36px; }
html[data-theme="studio"] .studio-hero--member h1 { font-size: clamp(2rem,4vw,3.5rem); }
html[data-theme="studio"] .studio-community { position: relative; border-radius: 22px; padding: 28px; border-color: var(--line-strong); box-shadow: 0 7px 0 var(--panel-softer); }
html[data-theme="studio"] .studio-community:nth-child(2n) { border-top-color: #659eae; }
html[data-theme="studio"] .studio-community:nth-child(2n+1) { border-top-color: #72bba0; }
html[data-theme="studio"] .studio-community-top { flex-direction: row-reverse; }
html[data-theme="studio"] .studio-community-number { font-size: 2.8rem; line-height: 1; color: var(--line-strong); }
html[data-theme="studio"] .studio-community-icon { box-shadow: 4px 5px 0 var(--line); transform: rotate(-5deg); border: 1px solid var(--line-strong); width: 72px; height: 72px; }
html[data-theme="studio"] .studio-community:hover .studio-community-icon { transform: rotate(0deg) translateY(-3px); transition: transform .25s; }
html[data-theme="studio"] .studio-community-enter > span { display: grid; place-items: center; height: 34px; width: 34px; border: 1px solid var(--line-strong); border-radius: 50%; }
html[data-theme="studio"] .community-header { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 4px 0 var(--panel-softer); }
html[data-theme="studio"] .community-tabs { top: 72px; }
html[data-theme="studio"] .community-feed > .sticky { top: 136px; }
html[data-theme="studio"] :is(.resource-card,.course-card) { box-shadow: 0 5px 0 var(--panel-softer); border-color: var(--line-strong); }
html[data-theme="studio"] :is(.resource-card,.course-card) > div:first-child { border-bottom: 1px solid var(--line); }
@media (max-width: 1023px) {
  html[data-theme="studio"] .studio-hero { min-height: 730px; }
  html[data-theme="studio"] .studio-hero-copy { padding-top: 42px; }
  html[data-theme="studio"] .studio-workflow-canvas { height: 360px; }
}
@media (max-width: 639px) {
  html[data-theme="studio"] .platform-header > div { min-height: 60px; }
  html[data-theme="studio"] .studio-hero { margin-top: -16px; min-height: 0; border-radius: 0 0 26px 26px; }
  html[data-theme="studio"] .studio-hero-copy { padding: 36px 24px 0; }
  html[data-theme="studio"] .studio-hero h1 { font-size: clamp(1.8rem,7.7vw,2.6rem); max-width: 20ch; }
  html[data-theme="studio"] .studio-hero .studio-kicker { font-size: .75rem; }
  html[data-theme="studio"] .studio-hero p { font-size: .9375rem; }
  html[data-theme="studio"] .studio-workflow { margin-top: 0; padding-bottom: 66px; }
  html[data-theme="studio"] .studio-workflow-canvas { height: 255px; }
  html[data-theme="studio"] .studio-workflow-controls { gap: 8px; padding-inline: 16px; margin-top: -16px; }
  html[data-theme="studio"] .studio-workflow-controls button { font-size: .8125rem; gap: 6px; min-height: 48px; }
  html[data-theme="studio"] .studio-workflow-controls button > span { display: none; }
  html[data-theme="studio"] .studio-community { padding: 22px; }
  html[data-theme="studio"] .studio-community-number { font-size: 2rem; }
  html[data-theme="studio"] .community-header { padding: 14px; }
  html[data-theme="studio"] .community-tabs { top: 60px; }
  html[data-theme="studio"] .community-feed > .sticky { top: 124px; }
}
html[data-theme="studio"] .platform-header .brand-logo-light { display: none; }
html[data-theme="studio"] .platform-header .brand-logo-dark { display: block; }
html[data-theme="studio"] .platform-header [aria-label^="حالت نمایش"] { color: #c8e0e1; }
html[data-theme="studio"] .platform-header .brand-mark { color: #09251f; background: #92e7c5; }
html[data-theme="studio"] .classroom-grid:has(> :only-child) { grid-template-columns: minmax(0,1fr); }
@media (min-width: 640px) {
  html[data-theme="studio"] .classroom-grid > .course-card:only-child { flex-direction: row; }
  html[data-theme="studio"] .classroom-grid > .course-card:only-child > div:first-child { width: 38%; height: auto; min-height: 220px; flex-shrink: 0; }
}
/* A product workspace on wide displays; horizontal tabs remain on touch sizes. */
html[data-theme="studio"] .platform-header > div { flex-direction: row-reverse; }
@media (min-width: 1280px) {
  html[data-theme="studio"] .app-main:has(.community-layout) { max-width: 1440px; }
  html[data-theme="studio"] .community-layout { display: grid; grid-template-columns: 174px minmax(0,1fr); align-items: start; gap: 24px; }
  html[data-theme="studio"] .community-layout > * { margin-block: 0; }
  html[data-theme="studio"] .community-header { grid-column: 1 / -1; }
  html[data-theme="studio"] .community-tabs { grid-column: 1; grid-row: 2; top: 92px; }
  html[data-theme="studio"] .community-tabs > div { border-radius: 16px; padding: 8px; background: var(--panel); }
  html[data-theme="studio"] .community-tabs .seg-rail { flex-direction: column; width: 100%; gap: 6px; }
  html[data-theme="studio"] .community-tabs .seg-tab { width: 100%; justify-content: flex-start; padding: 12px; white-space: normal; text-align: start; }
  html[data-theme="studio"] .community-tabs .seg-tab[data-active="true"] { box-shadow: inset -3px 0 var(--accent); }
  html[data-theme="studio"] .community-tabs .no-scrollbar { overflow: visible; }
  html[data-theme="studio"] .community-body { grid-column: 2; grid-row: 2; grid-template-columns: minmax(0,1fr) 260px; }
  html[data-theme="studio"] .community-feed > .sticky { top: 88px; }
}
html[data-theme="studio"] .studio-hero-note { position: relative; bottom: auto; inset-inline: auto; padding: 0 24px 24px; }
html[data-theme="studio"] .studio-workflow { padding-bottom: 20px; }

/* The home page continues the hero's material language: sculptural showcases,
   an open editorial list, and a paper-like journal instead of repeated boxes. */
html[data-theme="studio"] .studio-discover { padding-block: 12px; }
html[data-theme="studio"] .studio-section-title { margin-bottom: 32px; }
html[data-theme="studio"] .studio-section-title h2 { font-size: clamp(1.7rem,3vw,2.6rem); line-height: 1.6; }
html[data-theme="studio"] .studio-community-grid { gap: 32px; }
html[data-theme="studio"] .studio-community {
  padding: 0 28px 26px; overflow: hidden; border: 1px solid var(--line);
  border-radius: 24px; background: var(--panel); box-shadow: none;
  transition: transform .35s, border-color .35s, box-shadow .35s;
}
html[data-theme="studio"] .studio-community:nth-child(n) { border-top-color: var(--line); }
html[data-theme="studio"] .studio-community:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: 0 24px 50px #0002; }
html[data-theme="studio"] .studio-room-stage {
  height: 270px; margin: 0 -28px 24px; position: relative; isolation: isolate; overflow: hidden;
  background: radial-gradient(ellipse at 50% 95%,color-mix(in srgb,var(--room-accent) 25%,#0a2128),#081a23 72%);
  border-bottom: 1px solid #ffffff12;
}
html[data-theme="studio"] .studio-room-stage::after { content: ""; position: absolute; width: 200px; height: 22px; bottom: 34px; left: calc(50% - 100px); border-radius: 50%; background: #0009; filter: blur(12px); z-index: -1; }
html[data-theme="studio"] .studio-room-cover { object-fit: cover; transition: transform .6s; }
html[data-theme="studio"] .studio-community:hover .studio-room-cover { transform: scale(1.04); }
html[data-theme="studio"] .studio-room-label { position: absolute; left: 22px; bottom: 17px; font: 10px ui-monospace,monospace; letter-spacing: .18em; text-transform: uppercase; color: #a9c7ce; }
html[data-theme="studio"] .studio-room-orbit { position: absolute; width: 340px; height: 100px; border: 1px solid #a0ecdc25; border-radius: 50%; left: calc(50% - 170px); top: 150px; transform: rotate(-12deg); z-index: -1; }
html[data-theme="studio"] .studio-room-object { position: absolute; width: 142px; height: 142px; left: calc(50% - 71px); top: 45px; transform: rotate(-13deg); transition: transform .5s; }
html[data-theme="studio"] .studio-room-object i { position: absolute; inset: 0; border-radius: 26px; border: 1px solid #c3ffed80; background: linear-gradient(140deg,#91e1ce,#2c6c6a 46%,#102e3a); box-shadow: 9px 12px 0 #05212b,10px 13px 0 #60a79e70,20px 25px 25px #0004; }
html[data-theme="studio"] .studio-room-object i:nth-child(1) { transform: translate(20px,30px) rotate(17deg); opacity: .4; }
html[data-theme="studio"] .studio-room-object i:nth-child(2) { transform: translate(10px,15px) rotate(8deg); opacity: .7; }
html[data-theme="studio"] .studio-room-object > span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 54px; color: #d4ffee; text-shadow: 3px 4px #163b46; }
html[data-theme="studio"] .studio-room-object img { border-radius: 18px; width: 76px; height: 76px; object-fit: cover; }
html[data-theme="studio"] .studio-room-object--1 { transform: rotate(13deg); }
html[data-theme="studio"] .studio-room-object--1 i { border-radius: 50%; background: linear-gradient(140deg,#c2d5fd,#617d9e 46%,#163146); border-color: #d5eeffaa; box-shadow: 8px 10px 0 #173047,9px 11px 0 #95b7d275,22px 24px 30px #0004; }
html[data-theme="studio"] .studio-room-object--1 i:nth-child(1) { transform: translate(22px,12px); }
html[data-theme="studio"] .studio-room-object--1 i:nth-child(2) { transform: translate(11px,6px); }
html[data-theme="studio"] .studio-room-object--2 i { border-radius: 30px 55px; background: linear-gradient(140deg,#ece7ac,#a2975d 46%,#454627); border-color: #f4f1b8aa; }
html[data-theme="studio"] .studio-community:hover .studio-room-object { transform: translateY(-8px) rotate(0); }
html[data-theme="studio"] .studio-community-top { flex-direction: row; }
html[data-theme="studio"] .studio-community-number { font-size: .85rem; letter-spacing: .12em; color: var(--muted); }
html[data-theme="studio"] .studio-community-tag { border: 0; padding: 0; font-size: .75rem; }
html[data-theme="studio"] .studio-community-main { margin: 12px 0 26px; }
html[data-theme="studio"] .studio-community h3 { font-size: clamp(1.35rem,2.1vw,1.8rem); }
html[data-theme="studio"] .studio-community-bottom { font-size: .8rem; }
html[data-theme="studio"] .studio-community-enter { align-items: center; gap: 14px; }
html[data-theme="studio"] .studio-community-enter > span { background: var(--accent-soft); border: 0; width: 40px; height: 40px; }
html[data-theme="studio"] .studio-tools { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(32px,6vw,90px); padding: 60px 0; border-block: 1px solid var(--line); }
html[data-theme="studio"] .studio-tools-intro h2 { font-size: clamp(2rem,3.4vw,3rem); font-weight: 800; line-height: 1.55; max-width: 12ch; margin-top: 14px; }
html[data-theme="studio"] .studio-tool-sculpture { position: relative; width: 210px; height: 190px; margin: 48px auto 0; perspective: 700px; }
html[data-theme="studio"] .studio-tool-sculpture i { position: absolute; inset: 25px; border: 1px solid #8ae9c7; border-radius: 30px; background: linear-gradient(135deg,#4c9c90,#0f3b43); transform: rotateX(54deg) rotateZ(-33deg); box-shadow: 0 10px 0 #102d37,0 11px 0 #498477; }
html[data-theme="studio"] .studio-tool-sculpture i:nth-child(1) { top: 75px; bottom: -25px; opacity: .3; }
html[data-theme="studio"] .studio-tool-sculpture i:nth-child(2) { top: 50px; bottom: 0; opacity: .6; }
html[data-theme="studio"] .studio-tool-sculpture > span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 110px; color: #bcf6dc; transform: translateY(-22px) rotate(-12deg); text-shadow: 1px 2px #356658,3px 5px #234940,6px 9px #102a2d; }
html[data-theme="studio"] .studio-tools-list article { display: flex; gap: 22px; padding: 26px 0; align-items: start; border-bottom: 1px solid var(--line); }
html[data-theme="studio"] .studio-tools-list article:first-child { padding-top: 0; }
html[data-theme="studio"] .studio-tools-list article:last-child { border: 0; padding-bottom: 0; }
html[data-theme="studio"] .studio-tool-number { color: var(--muted); font-size: .8rem; margin-top: 6px; }
html[data-theme="studio"] .studio-tools-list h3 { font-size: 1.3rem; font-weight: 750; }
html[data-theme="studio"] .studio-tools-list p { color: var(--muted); font-size: .9rem; line-height: 2; margin-top: 8px; }
html[data-theme="studio"] .studio-tool-icon { margin-inline-start: auto; padding: 10px; color: var(--accent); border: 1px solid var(--line-strong); border-radius: 14px; flex-shrink: 0; }
html[data-theme="studio"] .studio-text-link { display: inline-flex; align-items: center; gap: 20px; font-size: .875rem; font-weight: 700; color: var(--accent); }
html[data-theme="studio"] .studio-journal-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 0 40px; }
html[data-theme="studio"] .studio-story { display: flex; align-items: center; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
html[data-theme="studio"] .studio-story-image { width: 120px; height: 100px; flex-shrink: 0; position: relative; overflow: hidden; border-radius: 12px; background: var(--panel-softer); }
html[data-theme="studio"] .studio-story-image img { object-fit: cover; transition: transform .5s; }
html[data-theme="studio"] .studio-story:hover img { transform: scale(1.05); }
html[data-theme="studio"] .studio-story--lead { grid-row: span 5; display: block; border: 0; padding: 0; }
html[data-theme="studio"] .studio-story--lead .studio-story-image { width: 100%; height: auto; aspect-ratio: 1.4; margin-bottom: 24px; }
html[data-theme="studio"] .studio-story-copy { flex: 1; }
html[data-theme="studio"] .studio-story h3 { font-size: 1rem; line-height: 1.9; font-weight: 750; margin-top: 8px; }
html[data-theme="studio"] .studio-story--lead h3 { font-size: 1.65rem; }
html[data-theme="studio"] .studio-story p { font-size: .9rem; line-height: 2; color: var(--muted); margin-top: 12px; }
html[data-theme="studio"] .studio-story-meta { color: var(--muted); font-size: .72rem; }
html[data-theme="studio"] .studio-story-arrow { color: var(--accent); display: block; margin-top: 10px; }
html[data-theme="studio"] .studio-story-glyph { display: grid; place-items: center; width: 100%; height: 100%; font-size: 80px; color: var(--accent); background: repeating-linear-gradient(-40deg,transparent,transparent 28px,#73bfb012 29px,#73bfb012 30px); }
html[data-theme="studio"] .studio-journal-empty { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; padding: 48px; border-radius: 24px; background: var(--panel-soft); }
html[data-theme="studio"] .studio-journal-empty h3 { font-size: clamp(1.5rem,2.8vw,2rem); font-weight: 750; line-height: 1.7; margin-top: 12px; }
html[data-theme="studio"] .studio-journal-empty p { line-height: 2.1; font-size: .95rem; color: var(--muted); margin: 16px 0 24px; }
html[data-theme="studio"] .studio-paper-stack { height: 290px; width: 230px; position: relative; margin-inline: auto; transform: rotate(-9deg); }
html[data-theme="studio"] .studio-paper-stack > :is(i,div) { position: absolute; inset: 0; border-radius: 4px 18px 18px 4px; background: #c6d6c8; box-shadow: 10px 16px 25px #0002; border: 1px solid #9eaea2; }
html[data-theme="studio"] .studio-paper-stack i:first-child { transform: rotate(15deg); background: #2d6561; border-color: #5d8d84; }
html[data-theme="studio"] .studio-paper-stack i:nth-child(2) { transform: rotate(7deg); background: #a2bfb1; }
html[data-theme="studio"] .studio-paper-stack > div { background: #e5eddb; color: #163b37; padding: 24px; overflow: hidden; }
html[data-theme="studio"] .studio-paper-stack span { font: 10px ui-monospace,monospace; letter-spacing: .14em; display: block; border-bottom: 1px solid #163b3740; padding-bottom: 16px; }
html[data-theme="studio"] .studio-paper-stack b { display: block; font-size: 38px; line-height: 1.7; margin-top: 20px; }
html[data-theme="studio"] .studio-paper-stack em { position: absolute; bottom: -30px; left: 10px; font-size: 120px; line-height: 1.2; font-style: normal; color: #4e8c74; }
html[data-theme="studio"] .studio-join { display: flex; align-items: center; gap: 36px; position: relative; overflow: hidden; padding: 46px; border: 1px solid #3e6c65; border-radius: 24px; color: #e7fff2; background: #0d302e; }
html[data-theme="studio"] .studio-join .studio-kicker { color: #95c3b8; }
html[data-theme="studio"] .studio-join h2 { font-size: clamp(1.8rem,3vw,2.5rem); font-weight: 800; margin-top: 10px; }
html[data-theme="studio"] .studio-join p { color: #aacdc3; margin-top: 8px; line-height: 1.9; }
html[data-theme="studio"] .studio-join .btn { margin-inline-start: auto; flex-shrink: 0; }
html[data-theme="studio"] .studio-join-orbit { font-size: 120px; color: #9de2c4; line-height: 1; text-shadow: 4px 5px #366e60,8px 10px #062720; transform: rotate(-20deg); }
@media (max-width: 700px) {
  html[data-theme="studio"] .studio-community-grid { grid-template-columns: 1fr; gap: 24px; }
  html[data-theme="studio"] .studio-tools { grid-template-columns: 1fr; gap: 32px; padding-block: 36px; }
  html[data-theme="studio"] .studio-tools-intro { display: grid; grid-template-columns: 1fr 120px; }
  html[data-theme="studio"] .studio-tools-intro h2 { grid-column: 1; font-size: 1.9rem; }
  html[data-theme="studio"] .studio-tool-sculpture { grid-column: 2; grid-row: 1 / 3; width: 120px; height: 120px; margin: 0; align-self: center; }
  html[data-theme="studio"] .studio-tool-sculpture > span { font-size: 72px; }
  html[data-theme="studio"] .studio-tools-list article { gap: 14px; }
  html[data-theme="studio"] .studio-journal-grid { grid-template-columns: 1fr; }
  html[data-theme="studio"] .studio-story--lead { grid-row: auto; padding-bottom: 20px; }
  html[data-theme="studio"] .studio-journal-empty { grid-template-columns: 1fr; padding: 36px 24px; gap: 40px; }
  html[data-theme="studio"] .studio-paper-stack { width: 190px; height: 240px; }
  html[data-theme="studio"] .studio-paper-stack b { font-size: 30px; }
  html[data-theme="studio"] .studio-section-title { gap: 10px; flex-wrap: wrap; }
  html[data-theme="studio"] .studio-join { flex-wrap: wrap; gap: 24px; padding: 28px; }
  html[data-theme="studio"] .studio-join-orbit { font-size: 60px; }
  html[data-theme="studio"] .studio-join .btn { margin-inline-start: 0; }
}
@media (min-width: 1100px) {
  html[data-theme="studio"] .studio-community-grid:has(> :nth-child(3)):not(:has(> :nth-child(4))) { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
  html[data-theme="studio"] .studio-community-grid:has(> :nth-child(3)):not(:has(> :nth-child(4))) .studio-community { padding-inline: 22px; }
  html[data-theme="studio"] .studio-community-grid:has(> :nth-child(3)):not(:has(> :nth-child(4))) .studio-room-stage { margin-inline: -22px; }
}

/* Day mode keeps the same forms and depth with porcelain and mint surfaces. */
html[data-theme="studio"][data-mode="light"] {
  --background: #f4f8f6; --foreground: #153c38; --panel: #ffffff;
  --panel-soft: #eaf3ee; --panel-softer: #deece5; --line: #d1e2d9;
  --line-strong: #9dbdb0; --muted: #57736a; --muted-strong: #405f55;
  --accent: #246c53; --accent-strong: #17543f; --accent-soft: #dcefe3;
}
html[data-theme="studio"][data-mode="light"] .platform-header { background: #f4f8f6f5; border-color: #d1e2d9; color: #153c38; }
html[data-theme="studio"][data-mode="light"] .platform-header nav a { color: #405f55; }
html[data-theme="studio"][data-mode="light"] .platform-header nav a[aria-current="page"] { color: #17543f; box-shadow: inset 0 -2px #246c53; }
html[data-theme="studio"][data-mode="light"] .platform-header :is(.btn-ghost,.btn-icon,[aria-label^="حالت"]) { color: #405f55; }
html[data-theme="studio"][data-mode="light"] .platform-header .brand-logo-light { display: block; }
html[data-theme="studio"][data-mode="light"] .platform-header .brand-logo-dark { display: none; }
html[data-theme="studio"][data-mode="light"] .studio-hero { color: #153c38; background: radial-gradient(ellipse at 50% 83%,#c2e5d5 0%,#e3f1e9 40%,#f4f8f6 75%); }
html[data-theme="studio"][data-mode="light"] .studio-hero::before { border-color: #478a6d30; box-shadow: 0 0 0 75px #478a6d05,0 0 0 150px #478a6d03; }
html[data-theme="studio"][data-mode="light"] .studio-hero :is(.studio-kicker,em) { color: #246c53; }
html[data-theme="studio"][data-mode="light"] .studio-hero :is(p,.studio-hero-note,.studio-workflow-description) { color: #405f55; }
html[data-theme="studio"][data-mode="light"] .studio-hero-secondary { color: #214d41; }
html[data-theme="studio"][data-mode="light"] .studio-hero-note > span { color: #246c53; }
html[data-theme="studio"][data-mode="light"] .studio-workflow-controls button { color: #214d41; border-color: #98bead; background: #f6fcf9ed; box-shadow: 0 5px 0 #bbd5c8; }
html[data-theme="studio"][data-mode="light"] .studio-workflow-controls button > :is(span,i) { color: #3f6e5b; }
html[data-theme="studio"][data-mode="light"] .studio-workflow-controls button[aria-pressed="true"] { color: #143f2c; border-color: #5b9e7c; background: #c7edd6; box-shadow: 0 6px 0 #84b69a; }
html[data-theme="studio"][data-mode="light"] .studio-room-stage { background: radial-gradient(ellipse at 50% 95%,color-mix(in srgb,var(--room-accent) 18%,#dbeae2),#edf5f0 75%); border-bottom-color: #d1e2d9; }
html[data-theme="studio"][data-mode="light"] .studio-room-label { color: #47665a; }
html[data-theme="studio"][data-mode="light"] .studio-room-orbit { border-color: #467d6350; }
html[data-theme="studio"][data-mode="light"] .studio-room-stage::after { background: #24523b40; }
html[data-theme="studio"][data-mode="light"] .studio-community:hover { box-shadow: 0 24px 50px #24523b12; }
html[data-theme="studio"][data-mode="light"] .studio-join { color: #153c38; background: #dfefe4; border-color: #aacdb7; }
html[data-theme="studio"][data-mode="light"] .studio-join :is(.studio-kicker,p) { color: #405f55; }
html[data-theme="studio"][data-mode="light"] .studio-join-orbit { color: #438e6b; text-shadow: 3px 4px #a3cbb2,6px 8px #bedbc8; }

/* Live covers are a backdrop, not a replacement for the community identity. */
html[data-theme="studio"] #communities { scroll-margin-top: 96px; }
html[data-theme="studio"] .studio-room-cover { opacity: .22; filter: saturate(.55); z-index: -1; }
html[data-theme="studio"] .studio-room-object { transform-style: preserve-3d; transform: perspective(650px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) rotate(-12deg); }
html[data-theme="studio"] .studio-community:hover .studio-room-object { transform: perspective(650px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) translateY(-10px) rotate(-5deg); }
html[data-theme="studio"] .studio-room-object > span { transform: translateZ(30px); }
html[data-theme="studio"] .studio-community-main { min-height: 100px; }
html[data-theme="studio"] .studio-community-main p { max-width: 45ch; }
html[data-theme="studio"] .studio-room-label { z-index: 1; }
html[data-theme="studio"] .studio-room-orbit { animation: studio-orbit 12s ease-in-out infinite alternate; animation-play-state: paused; }
html[data-theme="studio"] [data-in-view="true"] .studio-room-orbit { animation-play-state: running; }
html[data-theme="studio"] .studio-tools { overflow: clip; }
html[data-theme="studio"] .studio-tools-intro { position: relative; }
html[data-theme="studio"] .studio-tool-sculpture { isolation: isolate; }
html[data-theme="studio"] .studio-tool-sculpture::before,
html[data-theme="studio"] .studio-tool-sculpture::after { content: ""; position: absolute; inset: -25px -45px; border: 1px solid var(--line-strong); border-radius: 50%; transform: rotateX(55deg) rotate(-25deg); z-index: -1; }
html[data-theme="studio"] .studio-tool-sculpture::after { inset: -55px -20px; transform: rotateX(65deg) rotate(35deg); border-style: dashed; opacity: .5; }
html[data-theme="studio"] .studio-tools[data-in-view="true"] .studio-tool-sculpture > span { animation: studio-lift 5s ease-in-out infinite alternate; }
html[data-theme="studio"] .studio-tools-list article { transition: padding .25s, background .25s; }
html[data-theme="studio"] .studio-tools-list article:hover { padding-inline: 14px; background: var(--panel-soft); }
html[data-theme="studio"] .studio-tool-icon { transform: perspective(400px) rotateY(-15deg); box-shadow: 4px 4px 0 var(--panel-softer); transition: transform .25s; }
html[data-theme="studio"] .studio-tools-list article:hover .studio-tool-icon { transform: perspective(400px) rotateY(10deg) translateY(-4px); }
html[data-theme="studio"] .studio-paper-stack { transform: perspective(800px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)) rotate(-9deg); transition: transform .2s; }
html[data-theme="studio"] .studio-story--lead .studio-story-image { transform: perspective(1000px) rotateX(var(--tilt-x,0deg)) rotateY(var(--tilt-y,0deg)); transition: transform .2s; box-shadow: 0 14px 30px #0002; }
html[data-theme="studio"] .studio-join[data-in-view="true"] .studio-join-orbit { animation: studio-turn 22s linear infinite; }
@keyframes studio-orbit { to { transform: rotate(12deg) scale(1.12); } }
@keyframes studio-lift { to { transform: translateY(-36px) rotate(-5deg); } }
@keyframes studio-turn { to { transform: rotate(340deg); } }
/* Galaxy is a full Studio palette, rather than a blue body behind green panels. */
html[data-theme="studio"][data-mode="dark"][data-skin="galaxy"] {
  --background: #0c1026; --panel: #161c38; --panel-soft: #1c2545; --panel-softer: #253151;
  --foreground: #f0f3ff; --muted: #a6b3d5; --muted-strong: #c0cceb;
  --line: #303c60; --line-strong: #53638e; --accent: #b5c8ff; --accent-strong: #d1dcff;
  --accent-soft: #293b60; --studio-lime: #b5c8ff; --studio-ink: #121a35;
}
html[data-theme="studio"][data-skin="galaxy"] .platform-header { background: #0c1026f5; border-color: #303c60; }
html[data-theme="studio"][data-skin="galaxy"] .platform-header nav a[aria-current="page"] { color: #c7d6ff; box-shadow: inset 0 -2px #b5c8ff; }
html[data-theme="studio"][data-skin="galaxy"] .studio-hero { background: radial-gradient(ellipse at 50% 83%,#303561,#161d3c 40%,#0c1026 75%); }
html[data-theme="studio"][data-skin="galaxy"] .studio-hero :is(em,.studio-kicker) { color: #c6d1ff; }
html[data-theme="studio"][data-skin="galaxy"] .studio-hero .btn { background: #b5c8ff; border-color: #dce5ff; color: #121a35; box-shadow: 0 4px 0 #516193; }
html[data-theme="studio"][data-skin="galaxy"] .studio-workflow-controls button { background: #192342e8; border-color: #53638e; color: #dde6ff; box-shadow: 0 5px 0 #090f24; }
html[data-theme="studio"][data-skin="galaxy"] .studio-workflow-controls button[aria-pressed="true"] { background: #34486d; border-color: #b5c8ff; color: #fff; }
html[data-theme="studio"][data-skin="galaxy"] .studio-room-stage { background: radial-gradient(ellipse at 50% 90%,#343e6a,#111830 75%); }
html[data-theme="studio"][data-skin="galaxy"] .studio-join { background: #1b2747; border-color: #53638e; }
html[data-theme="studio"] .theme-mode-menu { color: var(--foreground); }
/* Webinar owns a light canvas. Keep theme-wide lime buttons out of its flow. */
html[data-theme="studio"] .webinar-funnel { color-scheme: light; --studio-lime: #217855; --studio-ink: #fff; }
html[data-theme="studio"] .webinar-funnel :is(.btn-primary,.btn-accent) { background: #217855; color: #fff; border: 1px solid #176447; box-shadow: 0 3px 0 #154c37; }
html[data-theme="studio"] .webinar-funnel :is(.btn-primary,.btn-accent):hover:not(:disabled) { background: #176447; color: #fff; }
html[data-theme="studio"] .webinar-funnel :is(.btn-primary,.btn-accent):disabled { background: #e1e9e4; color: #52675b; border-color: #c6d3cb; box-shadow: none; opacity: 1; transform: none; cursor: not-allowed; }
@media (max-width: 700px) {
  html[data-theme="studio"] .studio-tool-sculpture::before { inset: 0 -8px; }
  html[data-theme="studio"] .studio-tool-sculpture::after { inset: -10px 0; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="studio"] :is(.studio-room-orbit,.studio-join-orbit,.studio-tool-sculpture > span) { animation: none !important; }
}

/* A continuous stage: no rectangular gradient edges between chapters. */
html[data-theme="studio"] .sections:has(.studio-hero) { isolation: isolate; position: relative; overflow-x: clip; }
html[data-theme="studio"] .studio-atmosphere { position: fixed; inset: 72px 0 0; z-index: -1; pointer-events: none; overflow: hidden; background: var(--background); }
html[data-theme="studio"] .studio-atmosphere-grid { position: absolute; inset: -50%; opacity: .13; background-image: radial-gradient(circle,var(--accent) 1px,transparent 1px); background-size: 75px 75px; transform: perspective(700px) rotateX(55deg); mask-image: radial-gradient(ellipse,#000,transparent 65%); }
html[data-theme="studio"] .studio-atmosphere i { position: absolute; left: var(--x); top: var(--y); width: var(--size); height: var(--size); border-radius: 50%; background: var(--accent); opacity: .25; animation: studio-dust 16s ease-in-out var(--delay) infinite alternate; }
html[data-theme="studio"][data-mode] .studio-hero { background: transparent; border-radius: 0; overflow: clip; }
html[data-theme="studio"] .studio-hero::before { mask-image: linear-gradient(#000 30%,transparent 90%); }
html[data-theme="studio"] .studio-discover { position: relative; padding-block: 70px 90px; }
html[data-theme="studio"] .studio-community-grid { gap: 48px; }
html[data-theme="studio"] .studio-community { background: transparent; border: 0; border-radius: 0; padding: 0 0 24px; overflow: visible; }
html[data-theme="studio"] .studio-community:nth-child(n) { border-top: 0; }
html[data-theme="studio"] .studio-community:hover { box-shadow: none; }
html[data-theme="studio"][data-mode] .studio-room-stage { height: 320px; margin: 0 0 28px; border: 0; border-radius: 50% 50% 16px 16px; background: radial-gradient(ellipse at 50% 75%,var(--accent-soft),transparent 68%); }
html[data-theme="studio"] .studio-room-cover { mask-image: radial-gradient(ellipse at center,#000,transparent 68%); opacity: .12; }
html[data-theme="studio"] .studio-room-object { top: 72px; width: 170px; height: 170px; left: calc(50% - 85px); translate: 0 var(--scene-y,0px); rotate: var(--scene-turn,0deg); }
html[data-theme="studio"] .studio-community[data-in-view="true"] .studio-room-object i { animation: studio-material-breathe 7s ease-in-out infinite alternate; }
html[data-theme="studio"] .studio-community:nth-child(even) .studio-room-object i { animation-delay: -3s; }
html[data-theme="studio"] .studio-room-orbit { top: 210px; width: 90%; left: 5%; height: 80px; border-color: var(--line-strong); }
html[data-theme="studio"] .studio-room-label { bottom: 20px; left: 0; }
html[data-theme="studio"] .studio-community-main { min-height: 80px; }
html[data-theme="studio"] .studio-community-bottom { padding-top: 20px; border-top: 1px solid var(--line-strong); }
html[data-theme="studio"] .studio-tools { overflow: clip; padding-block: 90px; gap: 70px; border: 0; }
html[data-theme="studio"] .studio-tools-intro h2 { max-width: 14ch; }
html[data-theme="studio"] .studio-workbench { position: relative; height: 330px; margin-top: 65px; perspective: 1000px; transform: translateY(var(--scene-y,0px)); }
html[data-theme="studio"] .studio-workbench-screen { position: absolute; inset: 25px 30px 45px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel); box-shadow: -8px 10px 0 var(--panel-softer),-9px 11px 0 var(--line-strong),0 40px 50px #0003; transform: rotateY(-18deg) rotateX(12deg) rotateZ(-6deg); }
html[data-theme="studio"] .studio-tools[data-in-view="true"] .studio-workbench-screen { animation: studio-screen 9s ease-in-out infinite alternate; }
html[data-theme="studio"] .studio-workbench-bar { display: flex; align-items: center; gap: 5px; padding: 16px; border-bottom: 1px solid var(--line); direction: ltr; }
html[data-theme="studio"] .studio-workbench-bar span { margin-right: auto; font: 10px monospace; color: var(--muted); }
html[data-theme="studio"] .studio-workbench-bar i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
html[data-theme="studio"] .studio-workbench-nodes { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 25px 10px; font-size: 12px; }
html[data-theme="studio"] .studio-workbench-nodes span { padding: 12px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--accent-soft); }
html[data-theme="studio"] .studio-workbench-nodes b { color: var(--accent); }
html[data-theme="studio"] .studio-workbench-code { display: grid; gap: 8px; padding-inline: 24px; font-size: 11px; color: var(--muted); }
html[data-theme="studio"] .studio-workbench-chip { position: absolute; display: flex; align-items: center; gap: 10px; padding: 16px 20px; border: 1px solid var(--line-strong); border-radius: 13px; background: var(--panel); box-shadow: 0 14px 25px #0003; font-size: 12px; }
html[data-theme="studio"] .studio-workbench-chip--one { top: -5px; right: 0; transform: rotate(5deg); }
html[data-theme="studio"] .studio-workbench-chip--two { bottom: 15px; left: 0; color: var(--accent); transform: rotate(-4deg); }
html[data-theme="studio"] .studio-tools[data-in-view="true"] .studio-workbench-chip { animation: studio-chip 5s ease-in-out infinite alternate; }
html[data-theme="studio"] .studio-tools[data-in-view="true"] .studio-workbench-chip--two { animation-delay: -2.5s; }
html[data-theme="studio"] .studio-workbench-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
html[data-theme="studio"] .studio-workbench-ring { position: absolute; inset: -10px 0; border: 1px solid var(--line-strong); border-radius: 50%; transform: rotateX(65deg) rotateZ(-20deg); }
html[data-theme="studio"] .studio-workbench-ring--two { inset: -40px 40px; transform: rotateX(55deg) rotateZ(40deg); opacity: .4; }
html[data-theme="studio"] .studio-tools-list { align-self: center; }
html[data-theme="studio"] .studio-tools-list article { padding-block: 32px; }
html[data-theme="studio"] .studio-tools-list article:first-child { padding-top: 0; }
html[data-theme="studio"] .studio-journal { padding-block: 65px; }
html[data-theme="studio"] .studio-paper-stack { translate: 0 var(--scene-y,0px); rotate: var(--scene-turn,0deg); }
html[data-theme="studio"] .studio-journal[data-in-view="true"] .studio-paper-stack i:first-child { animation: studio-page 8s ease-in-out infinite alternate; }
html[data-theme="studio"] .studio-story--lead { translate: 0 calc(var(--scene-y,0px) * .35); }
html[data-theme="studio"] .studio-join { min-height: 280px; border-inline: 0; border-radius: 0; background: transparent; }
html[data-theme="studio"][data-mode] .studio-join { background: transparent; }
html[data-theme="studio"] .studio-join-orbit { font-size: 160px; translate: 0 var(--scene-y,0px); }
@keyframes studio-dust { to { translate: 20px -45px; opacity: .65; } }
@keyframes studio-material-breathe { to { translate: 0 -14px; } }
@keyframes studio-screen { to { transform: rotateY(10deg) rotateX(5deg) rotateZ(2deg) translateY(-12px); } }
@keyframes studio-chip { to { translate: 0 -18px; } }
@keyframes studio-page { to { transform: rotate(23deg) translate(8px,-8px); } }
@media (max-width: 700px) {
  html[data-theme="studio"] .studio-discover { padding-block: 35px; }
  html[data-theme="studio"] .studio-tools { padding-block: 40px; gap: 30px; }
  html[data-theme="studio"] .studio-tools-intro { display: block; }
  html[data-theme="studio"] .studio-workbench { max-width: 430px; margin: 45px auto 0; height: 300px; }
  html[data-theme="studio"] .studio-workbench-screen { inset-inline: 20px; }
  html[data-theme="studio"] .studio-community-grid { gap: 30px; }
  html[data-theme="studio"] .studio-join-orbit { font-size: 90px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="studio"] :is(.studio-room-object,.studio-workbench,.studio-paper-stack,.studio-story--lead,.studio-join-orbit) { translate: none; rotate: none; }
}

/* Webinar and body portals share the same theme tokens in every display mode. */
html[data-theme="studio"] .webinar-funnel {
  --background: inherit; --foreground: inherit; --panel: inherit; --panel-soft: inherit; --panel-softer: inherit;
  --muted: inherit; --muted-strong: inherit; --line: inherit; --line-strong: inherit;
  --accent: inherit; --accent-soft: inherit; --accent-strong: inherit;
  --studio-lime: inherit; --studio-ink: inherit; color-scheme: inherit;
}
html[data-theme="studio"] :is(.webinar-landing,.webinar-watch) { background: var(--background); }
html[data-theme="studio"] :is(.wb-stage-card,.wb-roadmap-card,.wb-intro-showcase,.wb-copy-card,.wb-platform-shell,.wb-entry-dialog,.wb-invite-dialog) {
  background: var(--panel); color: var(--foreground); border: 1px solid var(--line-strong); border-radius: 20px;
  box-shadow: 0 20px 55px -35px #0008; backdrop-filter: none;
}
html[data-theme="studio"] .wb-platform-shell { overflow: visible; }
html[data-theme="studio"] .wb-platform-context { border-radius: 0 0 20px 20px; background: var(--panel-soft); }
html[data-theme="studio"] :is(.wb-safe-badge,.wb-kicker,.wb-meta-pill,.wb-invite-trigger,.wb-invite-banner__action,.wb-dialog-close,.wb-dialog-emblem,.wb-platform-orbit,.wb-invite-banner__emblem,.wb-advance-icon) {
  color: var(--accent-strong); background: var(--panel-softer); border-color: var(--line-strong); box-shadow: none;
}
html[data-theme="studio"] :is(.wb-invite-banner,.wb-referral-credit,.wb-advance-card) { color: var(--foreground); background: var(--panel-soft); border-color: var(--line-strong); box-shadow: none; }
html[data-theme="studio"] .wb-invite-rewards > div { background: var(--panel-softer); color: var(--foreground); border-color: var(--line); }
html[data-theme="studio"] .wb-path-card { background: var(--panel-soft); }
html[data-theme="studio"] .wb-path-stop--active .wb-path-card { background: var(--accent-soft); border-color: var(--accent); }
html[data-theme="studio"] .wb-path-stop--active .wb-path-node { color: var(--background); background: var(--accent); }
html[data-theme="studio"] .wb-dialog-backdrop { background: #020b14b3; }
html[data-theme="studio"] .wb-invite-dialog { border-top: 3px solid var(--accent); }
html[data-theme="studio"] .wb-invite-dialog h2 { font-size: 26px; }
html[data-theme="studio"] .wb-referral-credit p { color: var(--muted-strong); }
html[data-theme="studio"] .wb-expired-action__title { color: var(--accent-strong); }
html[data-theme="studio"] :is(.webinar-funnel,.wb-invite-dialog,.wb-entry-dialog) :is(.btn-primary,.btn-accent) { color: var(--background); background: var(--accent); border-color: var(--accent); box-shadow: 0 3px 0 var(--line-strong); }
html[data-theme="studio"] :is(.webinar-funnel,.wb-invite-dialog,.wb-entry-dialog) :is(.btn-primary,.btn-accent):hover:not(:disabled) { background: var(--accent-strong); color: var(--background); }
html[data-theme="studio"] .webinar-funnel :is(.btn-primary,.btn-accent):disabled { background: var(--panel-softer); color: var(--muted-strong); border-color: var(--line-strong); opacity: 1; box-shadow: none; }
html[data-theme="studio"] .wb-platform-actions { position: relative; }
html[data-theme="studio"] .wb-invite-banner__action:hover { background: var(--accent-soft); }
html[data-theme="studio"] .wb-offer-card { background: var(--panel-soft); border-color: var(--line-strong); }
html[data-theme="studio"] :is(.wb-offer-badge,.wb-offer-sparkle) { color: var(--accent-strong); background: var(--panel-softer); border-color: var(--line); }
html[data-theme="studio"] .wb-watch-topbar { background: var(--panel); border-color: var(--line); }
html[data-theme="studio"] :is(.wb-register-card,.wb-portrait-hero,.wb-intro-note,.wb-intro-lead__kicker,.wb-deadline__units strong) { background: var(--panel); color: var(--foreground); border-color: var(--line-strong); }
html[data-theme="studio"] .wb-deadline { border-color: var(--line-strong); }
html[data-theme="studio"] .wb-portrait-frame { border-color: var(--line); }
html[data-theme="studio"] .wb-platform-toolbar { flex-wrap: wrap; }
html[data-theme="studio"] .wb-platform-actions .theme-mode-menu { z-index: 60; }
/* Offer / inline checkout use the same surfaces, preserving semantic statuses. */
html[data-theme="studio"] :is(.wb-commerce-card,.wb-commerce-availability,.wb-commerce-details a,.wb-invoice-wrap,.wb-invoice-delivery,.wb-invoice-tools > .wb-invoice-disclosure,.wb-invoice-input-row input,.wb-invoice-wallet label) { background: var(--panel); border-color: var(--line-strong); color: var(--foreground); }
html[data-theme="studio"] :is(.wb-commerce-capacity,.wb-commerce-owned,.wb-invoice-wallet,.wb-invoice-secondary,.wb-invoice-tool-icon,.wb-invoice-heading > span) { background: var(--panel-soft); border-color: var(--line); color: var(--muted-strong); }
html[data-theme="studio"] :is(.wb-invoice,.wb-commerce-card h3,.wb-commerce-capacity strong,.wb-invoice-tools > .wb-invoice-disclosure > summary) { color: var(--foreground); }
html[data-theme="studio"] :is(.wb-invoice-heading p,.wb-invoice-items p,.wb-invoice-footnote,.wb-invoice-after,.wb-invoice-loading,.wb-invoice-tool-body > p,.wb-invoice-wallet small,.wb-commerce-deadline,.wb-commerce-clock small) { color: var(--muted); }
html[data-theme="studio"] :is(.wb-invoice-wallet > div > span,.wb-invoice-tools > .wb-invoice-disclosure > summary > span:nth-child(2),.wb-invoice-deduction,.wb-invoice-code-applied) { color: var(--accent-strong); background: var(--accent-soft); }
html[data-theme="studio"] .wb-commerce-buy { background: var(--accent); border-color: var(--accent); color: var(--background); }
html[data-theme="studio"] .wb-commerce-buy:not(:disabled):hover { background: var(--accent-strong); border-color: var(--accent-strong); }
html[data-theme="studio"] .wb-commerce-card--owned .wb-commerce-buy:disabled { background: var(--panel-softer); border-color: var(--line); color: var(--muted); }

/* Whole chapters travel through perspective as the reader scrolls. The shell
   stays in normal flow; content and controls never intercept native scrolling. */
html[data-theme="studio"] .sections:has(.studio-chapter-shell) { isolation: isolate; position: relative; overflow-x: clip; }
html[data-theme="studio"] .studio-chapter-shell { perspective: 1200px; perspective-origin: 50% 45%; }
html[data-theme="studio"] .studio-chapter-panel { transform: translateZ(var(--chapter-depth,0px)) rotateX(var(--chapter-turn,0deg)); transform-origin: 50% 50%; backface-visibility: hidden; }
html[data-theme="studio"] .studio-chapter-panel:focus-within { transform: none; }
html[data-theme="studio"] .studio-discover { padding-block: 32px 40px; }
html[data-theme="studio"] .studio-community-grid { gap: 22px; }
html[data-theme="studio"] .studio-room { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 340px; padding: 28px; border: 1px solid var(--line-strong); border-radius: 22px; background: var(--panel); color: var(--foreground); box-shadow: 0 3px 0 var(--panel-softer); overflow: hidden; text-decoration: none; transition: border-color .2s, box-shadow .2s; }
html[data-theme="studio"] .studio-room::before { content: ""; position: absolute; inset: 0 28px auto; height: 2px; background: var(--room-accent); opacity: .8; }
html[data-theme="studio"] .studio-room:hover { border-color: var(--accent); box-shadow: 0 8px 0 var(--panel-softer),0 20px 40px #0001; }
html[data-theme="studio"] .studio-room:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
html[data-theme="studio"] .studio-room-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
html[data-theme="studio"] .studio-room-avatar { display: grid; place-items: center; width: 64px; height: 64px; flex-shrink: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-soft); overflow: hidden; font-size: 30px; }
html[data-theme="studio"] .studio-room-avatar img { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; }
html[data-theme="studio"] .studio-room-members { display: grid; justify-items: end; gap: 10px; color: var(--muted); font-size: 12px; }
html[data-theme="studio"] .studio-room-presence { display: flex; direction: ltr; padding-left: 5px; }
html[data-theme="studio"] .studio-room-presence i { width: 17px; height: 17px; margin-left: -5px; border: 2px solid var(--panel); border-radius: 50%; background: var(--line-strong); }
html[data-theme="studio"] .studio-room-presence i:nth-child(2) { background: var(--muted); }
html[data-theme="studio"] .studio-room-presence i:nth-child(3) { background: var(--accent); }
html[data-theme="studio"] .studio-room-copy { flex: 1; padding-block: 28px 30px; }
html[data-theme="studio"] .studio-room-copy .studio-kicker { font-size: 10px; color: var(--muted); }
html[data-theme="studio"] .studio-room-copy h3 { font-size: clamp(25px,3vw,36px); line-height: 1.5; font-weight: 800; letter-spacing: -.03em; margin-top: 5px; }
html[data-theme="studio"] .studio-room-copy p { font-size: 13px; line-height: 2; color: var(--muted-strong); margin-top: 9px; max-width: 44ch; }
html[data-theme="studio"] .studio-room-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 20px; font-size: 12px; color: var(--muted); }
html[data-theme="studio"] .studio-room-cta { display: flex; align-items: center; gap: 14px; color: var(--foreground); font-weight: 700; }
html[data-theme="studio"] .studio-room-cta > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); font-size: 19px; transition: transform .2s; }
html[data-theme="studio"] .studio-room:hover .studio-room-cta > span { transform: translate(-3px,-3px); }
@media (max-width: 700px) {
  html[data-theme="studio"] .studio-room { padding: 22px; min-height: 310px; }
  html[data-theme="studio"] .studio-chapter-shell { perspective: 1000px; }
}
@media (prefers-reduced-motion: reduce) {
  html[data-theme="studio"] .studio-chapter-panel { transform: none; }
}
html[data-theme="studio"] .sections:has(.studio-chapter-shell) > * + * { margin-top: 32px; }
html[data-theme="studio"] .studio-chapter-panel .studio-tools { padding-block: 45px; }
