:root {
  color-scheme: dark;
  --bg: #030817;
  --bg-2: #071224;
  --panel: rgba(13, 24, 45, 0.78);
  --panel-2: rgba(18, 31, 58, 0.9);
  --line: rgba(127, 154, 205, 0.18);
  --line-strong: rgba(92, 154, 255, 0.45);
  --text: #f7fbff;
  --muted: #9aacc8;
  --blue: #2b84ff;
  --cyan: #1cc8ff;
  --purple: #8d44ff;
  --pink: #cf45ff;
  --green: #31d486;
  --orange: #f8a11c;
  --radius: 22px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  font-family:
    Inter, Manrope, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

/* Product workspace primitives */
.panel-kicker { color: #79a7ff; font-size: 11px; font-weight: 800; letter-spacing: .11em; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.panel-heading h2 { margin: 5px 0 6px; font-size: 25px; }
.panel-heading p { margin: 0; color: var(--muted); }
.status-pill { display: inline-flex; align-items: center; width: max-content; border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 800; }
.status-pill.success { color: #67e7ad; background: rgba(35, 190, 123, .13); border: 1px solid rgba(69, 225, 155, .22); }
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { position: sticky; top: 92px; display: grid; gap: 6px; border: 1px solid var(--line); border-radius: 20px; padding: 9px; background: rgba(7, 18, 37, .82); }
.settings-nav button { border: 0; border-radius: 12px; padding: 12px 14px; color: var(--muted); background: transparent; text-align: left; font: inherit; font-weight: 700; cursor: pointer; }
.settings-nav button:hover, .settings-nav button:focus-visible { color: #fff; background: rgba(90, 124, 255, .10); }
.settings-nav button.active { color: #fff; background: linear-gradient(135deg, rgba(47, 111, 235, .25), rgba(143, 61, 255, .22)); box-shadow: inset 0 0 0 1px rgba(102, 139, 255, .22); }
.settings-panel, .data-panel { display: grid; gap: 24px; border: 1px solid var(--line); border-radius: 24px; padding: 28px; background: linear-gradient(145deg, rgba(15, 30, 57, .95), rgba(5, 14, 29, .96)); box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.settings-panel label { display: grid; gap: 8px; color: #bfcae0; font-weight: 700; }
.brand-preview, .profile-row, .integration-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 17px; padding: 15px; background: rgba(2, 10, 23, .48); }
.brand-preview-logo { display: grid; width: 54px; height: 54px; place-items: center; border-radius: 15px; color: white; font-size: 25px; background: linear-gradient(135deg,#2678ff,#963cff); }
.brand-preview div:nth-child(2), .profile-row div, .integration-card div { display: grid; gap: 3px; }
.brand-preview span, .profile-row span, .integration-card span { color: var(--muted); font-size: 12px; }
.settings-fieldset { display: grid; gap: 12px; margin: 0; border: 1px solid var(--line); border-radius: 17px; padding: 17px; }
.settings-fieldset legend { padding: 0 8px; color: #dce6fb; font-weight: 800; }
.color-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.color-row label { display: flex; align-items: center; gap: 10px; border-radius: 13px; padding: 10px; background: rgba(255,255,255,.035); }
.color-row input { width: 42px; height: 42px; border: 0; padding: 0; background: transparent; }
.color-row span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.color-row b { color: #fff; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 3px; }
.metric-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.metric-grid article { display: grid; gap: 7px; border: 1px solid var(--line); border-radius: 19px; padding: 20px; background: linear-gradient(145deg, rgba(15,31,59,.9), rgba(5,14,29,.94)); }
.metric-grid span { color: var(--muted); font-size: 12px; }
.metric-grid strong { font-size: 28px; }
.metric-grid small { color: #7890b2; }
.member-list, .transaction-list { display: grid; gap: 2px; }
.member-list article { display: grid; grid-template-columns: auto minmax(0,1fr) 150px auto; align-items: center; gap: 13px; border-top: 1px solid rgba(137,162,209,.12); padding: 14px 0; }
.member-list article:first-child, .transaction-list article:first-child { border-top: 0; }
.member-list div, .transaction-list div { display: grid; gap: 3px; }
.member-list small, .transaction-list small { color: var(--muted); }
.avatar { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; color: #dbe8ff; font-size: 12px; font-weight: 900; background: linear-gradient(135deg,#1b63d9,#243768); }
.avatar.violet { background: linear-gradient(135deg,#7733d7,#322063); }
.avatar.blue { background: linear-gradient(135deg,#1979ae,#173c6a); }
.avatar.large { width: 58px; height: 58px; font-size: 16px; }
.billing-summary { display: grid; grid-template-columns: minmax(0,2fr) minmax(240px,1fr); gap: 16px; }
.balance-card, .cost-card { border: 1px solid var(--line); border-radius: 23px; padding: 25px; background: linear-gradient(145deg,rgba(17,35,68,.96),rgba(7,16,34,.97)); }
.balance-card > div:nth-child(2) { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.balance-card h2 { margin: 8px 0; font-size: 29px; }
.balance-card p, .cost-card p { color: var(--muted); }
.usage-bars { display: grid !important; gap: 13px !important; margin-top: 22px; }
.usage-bars label { display: grid; gap: 7px; }
.usage-bars label > span { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.usage-bars i { overflow: hidden; height: 7px; border-radius: 999px; background: rgba(255,255,255,.08); }
.usage-bars i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#2580ff,#a33cff); }
.cost-card { display: grid; align-content: start; gap: 8px; }
.cost-card > span { color: var(--muted); }
.cost-card > strong { margin-top: 8px; font-size: 40px; }
.compact-plans { grid-template-columns: repeat(4,1fr); }
.compact-plans article { position: relative; display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 19px; padding: 20px; background: rgba(7,18,37,.8); }
.compact-plans article.featured { border-color: #427cff; box-shadow: 0 12px 35px rgba(48,100,255,.17); }
.compact-plans em { position: absolute; top: -10px; right: 14px; border-radius: 999px; padding: 4px 8px; color: white; font-size: 9px; font-style: normal; background: #7048ff; }
.compact-plans strong { font-size: 27px; }
.compact-plans small { color: var(--muted); font-size: 11px; }
.compact-plans p { min-height: 37px; color: var(--muted); font-size: 12px; }
.transaction-list article { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid rgba(137,162,209,.12); padding: 14px 0; }
.transaction-list > article > b { white-space: nowrap; color: #ffca73; }
.transaction-list > article > b.positive { color: #61e8a8; }
.switch-row { grid-template-columns: minmax(0,1fr) auto !important; align-items: center; }
.switch-row span { display: grid; gap: 3px; }
.switch-row small { color: var(--muted); font-weight: 500; }
.switch-row input { width: 42px; height: 23px; accent-color: #5a6cff; }
.collection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; border: 1px solid var(--line); border-radius: 18px; padding: 10px; background: rgba(7,18,37,.75); }
.collection-toolbar > label { display: flex; align-items: center; gap: 8px; min-width: 240px; border: 1px solid transparent; border-radius: 12px; padding: 0 10px; background: rgba(2,9,21,.75); }
.collection-toolbar > label:focus-within { border-color: #3979ff; box-shadow: 0 0 0 3px rgba(57,121,255,.13); }
.collection-toolbar input { min-height: 40px; border: 0; padding: 0; background: transparent; box-shadow: none; }
.collection-toolbar .ui-icon { color: #7290bd; }
.filter-bar { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.filter-bar button { flex: 0 0 auto; border: 1px solid transparent; border-radius: 999px; padding: 9px 13px; color: var(--muted); background: transparent; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.filter-bar button:hover, .filter-bar button:focus-visible { color: #fff; background: rgba(67,111,214,.10); }
.filter-bar button.active { color: #fff; border-color: rgba(76,126,255,.32); background: rgba(55,105,226,.18); }
.project-card[hidden], .preset-card[hidden], .asset-card[hidden] { display: none; }
.media-card[hidden] { display: none; }
.project-progress { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px 12px; align-items: end; border-top: 1px solid rgba(137,162,209,.12); padding-top: 14px; }
.project-progress > span { display: flex; justify-content: space-between; gap: 12px; grid-column: 1 / -1; }
.project-progress em { color: var(--muted); font-size: 11px; font-style: normal; }
.project-progress > i { overflow: hidden; height: 7px; border-radius: 999px; background: rgba(255,255,255,.08); }
.project-progress > i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#277cff,#9c45ff); }
.project-progress small { color: #8fb5ff; font-weight: 800; }
.project-status.error { color: #ff9d9d; background: rgba(224,72,80,.14); border: 1px solid rgba(255,102,112,.2); }
.project-card-icon.error { color: #ff8f99; background: rgba(209,60,75,.15); }
.project-card-error { border-color: rgba(226,76,91,.23); }
.project-error-note { display: grid; gap: 4px; border-radius: 12px; padding: 11px 12px; color: #c4cfe3; background: rgba(185,54,70,.09); }
.project-error-note strong { color: #ffb1b7; font-size: 11px; }
.project-error-note span { font-size: 11px; line-height: 1.45; }
.asset-upload-panel { display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,.8fr); gap: 22px; align-items: center; border: 1px solid var(--line); border-radius: 24px; padding: 28px; background: linear-gradient(145deg,rgba(16,33,63,.96),rgba(6,15,31,.96)); }
.asset-upload-panel h2 { margin: 7px 0 9px; font-size: 27px; }
.asset-upload-panel p { max-width: 620px; color: var(--muted); line-height: 1.55; }
.asset-upload-panel > .form-status { grid-column: 1 / -1; margin: -8px 0 0; }
.asset-upload-panel > .form-status.success { color: #69e3a9; }
.asset-upload-panel select { width: 100%; margin-top: 8px; }
.rights-confirmation { display: flex !important; flex-direction: row !important; align-items: flex-start; gap: 10px; margin-top: 14px; color: var(--muted); line-height: 1.4; }
.rights-confirmation input { width: 18px !important; height: 18px; margin: 1px 0 0; flex: 0 0 auto; accent-color: #6c63ff; }
.asset-drop { min-height: 170px; }
.media-library { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.media-card { position: relative; display: grid; gap: 6px; min-width: 0; border: 1px solid var(--line); border-radius: 17px; padding: 10px 10px 13px; background: rgba(7,18,37,.78); transition: border-color .2s ease, transform .2s ease; }
.media-card:hover { border-color: rgba(85,133,255,.38); transform: translateY(-2px); }
.media-card > div { position: relative; display: grid; height: 130px; overflow: hidden; place-items: center; border-radius: 12px; background: #101c33; }
.media-card img { width: 100%; height: 100%; object-fit: cover; }
.media-card > div > span { position: absolute; right: 7px; bottom: 7px; border-radius: 7px; padding: 4px 6px; color: #fff; font-size: 9px; background: rgba(2,7,16,.78); }
.media-card > strong { overflow: hidden; padding-right: 28px; text-overflow: ellipsis; white-space: nowrap; }
.media-card > small { color: var(--muted); }
.media-card > .icon-button { position: absolute; right: 8px; bottom: 9px; min-width: 29px; min-height: 29px; }
.media-card.audio > div { color: #8e8cff; font-size: 42px; background: linear-gradient(135deg,rgba(50,80,168,.28),rgba(128,50,177,.26)); }
.media-card.audio > div .ui-icon { width: 42px; height: 42px; }
.collection-empty { display: grid; justify-items: center; gap: 8px; border: 1px dashed rgba(117,145,197,.28); border-radius: 22px; padding: 44px 20px; color: var(--muted); text-align: center; background: rgba(7,18,37,.42); }
.collection-empty .ui-icon { width: 36px; height: 36px; margin-bottom: 4px; color: #6f91c6; }
.collection-empty strong { color: #edf4ff; font-size: 19px; }
.collection-empty p { margin: 0 0 8px; }
.app-modal-backdrop { position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center; padding: 18px; background: rgba(1,7,17,.78); backdrop-filter: blur(9px); }
.app-modal { width: min(460px,100%); border: 1px solid var(--line); border-radius: 24px; padding: 24px; background: #0a172d; box-shadow: 0 30px 100px rgba(0,0,0,.55); }
.app-modal h2 { margin: 0 0 8px; }
.app-modal p { color: var(--muted); }
.app-modal form { display: grid; gap: 15px; }
.app-modal label { display: grid; gap: 7px; color: #c6d1e7; font-weight: 700; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 4px; }

@media (max-width: 800px) {
  .settings-layout, .billing-summary { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .settings-nav button { flex: 0 0 auto; white-space: nowrap; }
  .metric-grid { grid-template-columns: 1fr; }
  .compact-plans { grid-template-columns: repeat(2,1fr); }
  .collection-toolbar { align-items: stretch; flex-direction: column; }
  .collection-toolbar > label { width: 100%; min-width: 0; }
  .asset-upload-panel { grid-template-columns: 1fr; }
  .media-library { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 560px) {
  .settings-panel, .data-panel { gap: 19px; border-radius: 19px; padding: 18px; }
  .panel-heading { display: grid; }
  .brand-preview, .profile-row, .integration-card { grid-template-columns: auto minmax(0,1fr); }
  .brand-preview .btn, .profile-row .btn, .integration-card .btn { grid-column: 1 / -1; width: 100%; }
  .color-row, .compact-plans { grid-template-columns: 1fr; }
  .member-list article { grid-template-columns: auto minmax(0,1fr) auto; }
  .member-list article > select, .member-list article > .status-pill { grid-column: 2 / -1; width: 100%; }
  .form-actions, .form-actions .btn { width: 100%; }
  .form-actions { display: grid; }
  .transaction-list article { align-items: flex-start; }
  .asset-upload-panel { border-radius: 19px; padding: 18px; }
  .media-library { grid-template-columns: 1fr; }
  .media-card { grid-template-columns: 104px minmax(0,1fr); align-items: center; }
  .media-card > div { grid-row: 1 / span 2; height: 76px; }
  .media-card > strong { align-self: end; }
  .media-card > small { align-self: start; }
  .media-card > .icon-button { top: 8px; bottom: auto; }
  .project-progress > span { display: grid; }
}

.auth-page { min-height: 100vh; background: radial-gradient(circle at 50% 0,rgba(42,89,191,.24),transparent 38rem),radial-gradient(circle at 85% 78%,rgba(141,68,255,.12),transparent 28rem),#030b19; }
.auth-shell { display: grid; width: min(100% - 32px,590px); min-height: 100vh; margin: 0 auto; padding: 32px 0; place-content: center; gap: 20px; }
.auth-shell > .brand { justify-self: center; }
.auth-card { display: grid; border: 1px solid var(--line); border-radius: 28px; padding: 34px; background: linear-gradient(145deg,rgba(16,33,63,.97),rgba(5,14,29,.98)); box-shadow: 0 28px 100px rgba(0,0,0,.42); }
.auth-heading { display: grid; justify-items: center; text-align: center; }
.auth-icon { display: grid; width: 62px; height: 62px; margin-bottom: 18px; place-items: center; border-radius: 20px; color: #fff; font-size: 29px; background: linear-gradient(135deg,#218bff,#794bff); box-shadow: 0 14px 40px rgba(39,113,255,.3); }
.auth-card h1 { margin: 6px 0 10px; font-size: clamp(29px,7vw,38px); letter-spacing: -.04em; }
.auth-heading > p:not(.eyebrow) { max-width: 440px; margin: 0; color: var(--muted); line-height: 1.55; }
.email-auth-form { display: grid; gap: 9px; margin-top: 26px; text-align: left; }
.email-auth-form[hidden] { display: none; }
.email-auth-form label { color: #dce7f9; font-size: 13px; font-weight: 750; }
.email-auth-form small { color: #8193af; font-size: 11px; line-height: 1.45; }
.auth-input-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; }
.auth-input-row input { min-width: 0; min-height: 48px; border: 1px solid rgba(122,151,205,.3); border-radius: 12px; padding: 0 15px; outline: none; background: rgba(3,11,25,.76); color: #fff; font: inherit; }
.auth-input-row input:focus { border-color: rgba(67,139,255,.86); box-shadow: 0 0 0 3px rgba(43,132,255,.14); }
.auth-input-row input::placeholder { color: #697d9d; }
.auth-code-input { letter-spacing: .28em; font-size: 20px !important; font-weight: 800; }
.auth-code-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #aebdd3; font-size: 12px; }
.auth-code-heading button,.auth-resend { border: 0; padding: 0; background: transparent; color: #73a9ff; cursor: pointer; font: inherit; }
.auth-resend { justify-self: start; margin-top: 2px; font-size: 12px; }
.auth-resend:disabled { color: #65758e; cursor: default; }
.auth-status { min-height: 22px; margin: 12px 0 0; color: #9eb3d4; font-size: 12px; text-align: center; }
.auth-status[data-kind="error"] { color: #ff9b9b; }
.auth-status[data-kind="success"] { color: #64dfa5; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin-top: 14px; color: #71829d; font-size: 11px; text-align: center; }
.auth-divider::before,.auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.telegram-login-slot { display: grid; min-height: 50px; margin: 15px 0 0; place-items: center; }
.telegram-login-slot[hidden] { display: none; }
.auth-card ul { display: grid; width: 100%; gap: 9px; margin: 18px 0 0; padding: 18px 0 0; border-top: 1px solid var(--line); color: #b8c7df; text-align: left; list-style: none; }
.auth-card li { display: flex; align-items: center; gap: 9px; font-size: 12px; }
.auth-card li .ui-icon { color: #6fa0ff; }
.auth-back { justify-self: center; color: var(--muted); font-size: 13px; }
@media (max-width: 520px) { .auth-shell { width: min(100% - 20px,590px); padding: 18px 0 28px; } .auth-card { border-radius: 22px; padding: 25px 20px; } .auth-input-row { grid-template-columns: 1fr; } .auth-input-row .btn { width: 100%; } .auth-code-heading { align-items: flex-start; flex-direction: column; } }

.mobile-landing,
.mobile-dashboard {
  display: none;
}

@media (max-width: 640px) {
  body.marketing-page,
  body.studio-page {
    display: block;
    padding-bottom: 88px;
    background:
      radial-gradient(circle at 50% -10%, rgba(26, 78, 170, 0.16), transparent 24rem),
      #020817;
  }

  .marketing-page > .topbar,
  .marketing-page > main:not(.mobile-landing),
  .marketing-page > .footer,
  .studio-page > .studio-sidebar,
  .studio-page > .studio-shell {
    display: none;
  }

  .mobile-landing,
  .mobile-dashboard {
    display: block;
    width: 100%;
    max-width: 430px;
    margin: 0 auto;
    padding: 0 16px 28px;
  }

  .mobile-ref-header,
  .mobile-dash-header {
    position: relative;
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(123, 151, 198, 0.13);
  }

  .mobile-ref-menu-panel {
    position: absolute;
    z-index: 50;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    display: none;
    gap: 4px;
    border: 1px solid rgba(127, 154, 205, 0.24);
    border-radius: 14px;
    padding: 8px;
    background: rgba(5, 14, 31, 0.98);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.52);
  }

  .mobile-ref-menu-panel.is-open { display: grid; }
  .mobile-ref-menu-panel a { border-radius: 9px; padding: 11px 12px; color: #cfdaeb; font-size: 13px; }
  .mobile-ref-menu-panel a:hover { background: rgba(58, 111, 219, 0.18); color: #fff; }

  .mobile-ref-header .brand,
  .mobile-dash-header .brand {
    font-size: 20px;
  }

  .mobile-ref-header-actions,
  .mobile-dash-header > div {
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .mobile-ref-header-actions img,
  .mobile-dash-header img {
    width: 42px;
    height: 42px;
    border: 1px solid rgba(150, 170, 210, 0.26);
    border-radius: 50%;
    object-fit: cover;
  }

  .mobile-ref-menu,
  .mobile-dash-header button {
    position: relative;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(127, 154, 205, 0.24);
    border-radius: 50%;
    background: rgba(11, 22, 43, 0.78);
    color: #fff;
  }

  .mobile-dash-header button i {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #9550ff;
  }

  .mobile-ref-hero {
    padding-top: 22px;
  }

  .mobile-ref-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 15px;
    border: 1px solid rgba(103, 112, 255, 0.42);
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(63, 47, 153, 0.13);
    color: #dce8ff;
    font-size: 10px;
    font-weight: 750;
  }

  .mobile-ref-hero h1 {
    margin: 0;
    font-size: clamp(38px, 11.4vw, 48px);
    line-height: 1.02;
    letter-spacing: -0.055em;
  }

  .mobile-ref-hero h1 span {
    background: linear-gradient(90deg, #367fff, #9f43ff);
    background-clip: text;
    color: transparent;
  }

  .mobile-ref-hero > p:not(.mobile-ref-pill) {
    margin: 15px 0 18px;
    color: #a9b8d1;
    font-size: 15px;
    line-height: 1.48;
  }

  .mobile-ref-hero-actions {
    display: grid;
    gap: 9px;
  }

  .mobile-ref-hero-actions .btn {
    width: 100%;
    gap: 9px;
    justify-content: center;
  }

  .mobile-ref-video {
    position: relative;
    display: block;
    min-height: 185px;
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid rgba(133, 157, 202, 0.29);
    border-radius: 14px;
    background: #071023;
  }

  .mobile-ref-video::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(90deg, rgba(3, 8, 20, 0.82), rgba(3, 8, 20, 0.08) 72%);
  }

  .mobile-ref-video > img,
  .mobile-ref-video > video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-ref-video > video { background: #09152a; }

  .mobile-ref-video-copy {
    position: absolute;
    z-index: 2;
    top: 46px;
    left: 17px;
    font-size: 23px;
    font-weight: 800;
    line-height: 1.03;
  }

  .mobile-ref-video-copy strong {
    color: #32a1ff;
  }

  .real-demo-badge {
    position: absolute;
    right: 12px;
    bottom: 12px;
    border: 1px solid rgba(148, 184, 255, .35);
    border-radius: 999px;
    padding: 6px 9px;
    background: rgba(3, 9, 20, .78);
    color: #d7e5fb;
    font-size: 9px;
    backdrop-filter: blur(8px);
  }

  .mobile-ref-play {
    position: absolute;
    z-index: 3;
    top: 50%;
    left: 50%;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #10182a;
    transform: translate(-50%, -50%);
  }

  .mobile-ref-play .ui-icon {
    fill: currentColor;
  }

  .mobile-ref-progress {
    position: absolute;
    z-index: 3;
    right: 17px;
    bottom: 23px;
    left: 17px;
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
  }

  .mobile-ref-progress i {
    display: block;
    width: 36%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2aa7ff, #9b3dff);
  }

  .mobile-ref-video > small {
    position: absolute;
    z-index: 3;
    right: 17px;
    bottom: 6px;
    left: 17px;
    display: flex;
    justify-content: space-between;
  }

  .mobile-ref-benefits {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px 4px;
    background: rgba(9, 20, 39, 0.82);
  }

  .mobile-ref-benefits article {
    display: grid;
    min-width: 0;
    place-items: center;
    gap: 5px;
    border-right: 1px solid rgba(126, 151, 197, 0.15);
    padding: 0 5px;
    text-align: center;
  }

  .mobile-ref-benefits article:last-child { border-right: 0; }
  .mobile-ref-benefits .ui-icon { color: #6b73ff; font-size: 28px; }
  .mobile-ref-benefits strong { font-size: 11px; }
  .mobile-ref-benefits span { color: #9dacbf; font-size: 9px; line-height: 1.25; }

  .mobile-ref-section {
    margin-top: 18px;
  }

  .mobile-ref-section-head,
  .mobile-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-ref-section h2,
  .mobile-card-head h2 {
    margin: 0;
    font-size: 18px;
  }

  .mobile-ref-section-head a,
  .mobile-card-head a {
    color: #9361ff;
    font-size: 12px;
  }

  .mobile-ref-template-row,
  .mobile-recent-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 24%;
    gap: 9px;
    margin-top: 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .mobile-ref-template-row::-webkit-scrollbar,
  .mobile-recent-row::-webkit-scrollbar { display: none; }

  .mobile-ref-template-row a {
    position: relative;
    display: grid;
    min-height: 130px;
    align-content: end;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 9px;
    background: #091329;
  }

  .mobile-ref-template-row a::after {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(180deg, transparent 35%, rgba(3, 8, 18, 0.94));
  }

  .mobile-ref-template-row img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-ref-template-row strong,
  .mobile-ref-template-row span {
    position: relative;
    z-index: 2;
  }

  .mobile-ref-template-row strong { font-size: 12px; }
  .mobile-ref-template-row span { color: #bdc9db; font-size: 9px; }

  .mobile-ref-how > div {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
    gap: 5px;
    align-items: center;
    margin-top: 10px;
  }

  .mobile-ref-how article {
    position: relative;
    display: grid;
    min-width: 0;
    min-height: 112px;
    place-items: center;
    gap: 3px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 4px;
    background: rgba(12, 24, 46, 0.83);
    text-align: center;
  }

  .mobile-ref-how article b {
    position: absolute;
    top: 7px;
    left: 7px;
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 8px;
    background: #724bff;
    font-size: 10px;
  }

  .mobile-ref-how article .ui-icon { margin-top: 12px; color: #6a91ff; font-size: 25px; }
  .mobile-ref-how article strong { font-size: 10px; }
  .mobile-ref-how article span { color: #aab7ca; font-size: 8px; }
  .mobile-ref-how > div > i { color: #7d86ff; font-size: 24px; font-style: normal; }

  .mobile-ref-plan {
    position: relative;
    display: grid;
    gap: 10px;
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid rgba(108, 102, 255, 0.32);
    border-radius: 14px;
    padding: 17px;
    background: radial-gradient(circle at 95% 45%, rgba(111, 49, 255, 0.3), transparent 12rem), #0b1430;
  }

  .mobile-ref-plan > span { width: max-content; border-radius: 5px; padding: 3px 7px; background: #43238b; color: #c49cff; font-size: 8px; }
  .mobile-ref-plan > div { display: flex; align-items: center; justify-content: space-between; }
  .mobile-ref-plan h2 { margin: 0; font-size: 20px; }
  .mobile-ref-plan > div > strong { font-size: 21px; }
  .mobile-ref-plan small { font-size: 10px; font-weight: 500; }
  .mobile-ref-plan ul { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 16px; margin: 0; padding: 0; list-style: none; color: #c4d0e2; font-size: 10px; }
  .mobile-ref-plan li::before { margin-right: 6px; color: #3c8bff; content: "✓"; }
  .mobile-ref-plan .btn { min-height: 38px; }

  .mobile-ref-trust {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: rgba(8, 18, 35, 0.86);
  }

  .mobile-ref-trust > div { display: flex; align-items: center; gap: 8px; border-right: 1px solid var(--line); padding: 0 9px; }
  .mobile-ref-trust > div:last-child { border-right: 0; }
  .mobile-ref-trust b { color: #ffba24; letter-spacing: 0.05em; }
  .mobile-ref-trust span { color: #c5d0df; font-size: 9px; line-height: 1.3; }

  /* Mobile dashboard */
  .mobile-dashboard {
    padding-top: 8px;
  }

  .mobile-dash-greeting {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 128px;
    gap: 14px;
    align-items: end;
    padding: 18px 0 12px;
  }

  .mobile-dash-greeting h1 { margin: 0; font-size: 22px; letter-spacing: -0.035em; }
  .mobile-dash-greeting h1 span { font-size: 18px; }
  .mobile-dash-greeting p { margin: 6px 0 0; color: #9eacc2; font-size: 13px; }

  .mobile-credit-card {
    display: grid;
    grid-template-columns: 30px 1fr;
    gap: 8px;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 13px;
    padding: 10px;
    background: rgba(12, 24, 46, 0.88);
  }

  .mobile-credit-card > .ui-icon { color: #3e8cff; font-size: 28px; }
  .mobile-credit-card > span { display: grid; gap: 1px; font-size: 10px; }
  .mobile-credit-card strong { font-size: 20px; }
  .mobile-credit-card small { color: #44d68d; font-size: 8px; }

  .mobile-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-top: 4px;
  }

  .mobile-quick-actions a {
    display: grid;
    min-height: 104px;
    place-items: center;
    align-content: center;
    gap: 11px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 9px 5px;
    background: rgba(11, 23, 46, 0.88);
    text-align: center;
  }

  .mobile-quick-actions a.primary { border-color: rgba(132, 84, 255, 0.72); background: linear-gradient(135deg, #2374ff, #a53cff); box-shadow: 0 14px 36px rgba(64, 75, 255, 0.24); }
  .mobile-quick-actions .ui-icon { color: #756bff; font-size: 35px; }
  .mobile-quick-actions .primary .ui-icon { color: #fff; }
  .mobile-quick-actions span { font-size: 11px; font-weight: 750; line-height: 1.15; }

  .mobile-dash-card {
    margin-top: 13px;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(13, 27, 52, 0.9), rgba(7, 16, 33, 0.9));
  }

  .mobile-project-row {
    display: grid;
    grid-template-columns: 37% minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-top: 11px;
  }

  .mobile-project-row img { width: 100%; height: 75px; border-radius: 10px; object-fit: cover; }
  .mobile-project-row h3 { margin: 0; font-size: 14px; }
  .mobile-project-row p { margin: 7px 0; color: #8c61ff; font-size: 11px; }

  .mobile-progress-line { display: block; height: 6px; overflow: hidden; border-radius: 999px; background: rgba(154, 176, 213, 0.2); }
  .mobile-progress-line i { display: block; width: 78%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2a83ff, #9a4dff); }

  .mobile-project-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    margin: 15px 0 0;
    padding: 0;
    list-style: none;
  }

  .mobile-project-steps::before { position: absolute; top: 15px; right: 7%; left: 7%; height: 2px; background: #26334a; content: ""; }
  .mobile-project-steps li { position: relative; z-index: 1; display: grid; place-items: center; gap: 6px; color: #a9b6ca; font-size: 8px; text-align: center; }
  .mobile-project-steps b { display: grid; width: 31px; height: 31px; place-items: center; border: 2px solid #7149ba; border-radius: 50%; background: #0a1428; color: #ddd2ff; }
  .mobile-project-steps .done b { border-color: #3cce87; color: #3cce87; }
  .mobile-project-steps .active b { border-color: #8c59ff; background: rgba(106, 67, 210, 0.2); }

  .mobile-recent-row { grid-auto-columns: 31%; }
  .mobile-recent-row a { display: grid; gap: 4px; min-width: 0; }
  .mobile-recent-row a > span { position: relative; display: block; overflow: hidden; border-radius: 10px; }
  .mobile-recent-row img { width: 100%; height: 78px; object-fit: cover; }
  .mobile-recent-row i { position: absolute; right: 5px; bottom: 5px; border-radius: 5px; padding: 3px 5px; background: rgba(0,0,0,.72); color: #fff; font-size: 9px; font-style: normal; }
  .mobile-recent-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-recent-row small { color: #98a8be; font-size: 9px; }
  .mobile-recent-row em { color: #36d88a; font-size: 9px; font-style: normal; }
  .mobile-recent-row em.rendering { color: #8d63ff; }

  .mobile-dash-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .mobile-dash-two-col .mobile-dash-card { min-width: 0; }
  .mobile-dash-two-col h2 { font-size: 14px; }

  .mobile-usage > div:nth-child(2) { display: flex; gap: 9px; align-items: center; margin-top: 12px; }
  .mobile-usage-ring { display: grid; width: 82px; height: 82px; flex: 0 0 82px; place-items: center; align-content: center; border: 10px solid #365dff; border-radius: 50%; box-shadow: inset 0 0 0 1px #8a43ff; }
  .mobile-usage-ring b { font-size: 22px; }
  .mobile-usage-ring small { font-size: 8px; }
  .mobile-usage p { display: grid; grid-template-columns: 7px 1fr; gap: 2px 6px; margin: 0; color: #a9b5c8; font-size: 8px; }
  .mobile-usage p i { width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: #8354ff; }
  .mobile-usage p i:nth-of-type(2) { background: #3389ff; }
  .mobile-usage p strong { grid-column: 2; font-size: 10px; }
  .mobile-usage > small, .mobile-model > small { display: block; margin-top: 8px; color: #8290a8; font-size: 8px; }

  .mobile-model-name { display: grid; grid-template-columns: 30px 1fr auto; gap: 7px; align-items: center; margin-top: 12px; border: 1px solid var(--line); border-radius: 9px; padding: 8px; background: rgba(22, 37, 66, 0.72); }
  .mobile-model-name > .ui-icon { color: #696cff; font-size: 25px; }
  .mobile-model-name span { display: grid; min-width: 0; }
  .mobile-model-name span strong { font-size: 10px; }
  .mobile-model-name span small { color: #8d9ab0; font-size: 7px; }
  .mobile-model-name > b { border-radius: 5px; padding: 4px; background: rgba(34, 182, 105, 0.13); color: #43d58b; font-size: 7px; }
  .mobile-model > p { display: flex; justify-content: space-between; margin: 10px 0 5px; color: #a4b1c6; font-size: 8px; }

  .mobile-magic-banner { display: grid; grid-template-columns: 42px 1fr auto; gap: 10px; align-items: center; margin-top: 13px; border: 1px solid rgba(105, 93, 255, 0.4); border-radius: 13px; padding: 14px; background: linear-gradient(90deg, rgba(42, 48, 135, .75), rgba(80, 28, 133, .75)); }
  .mobile-magic-banner > .ui-icon { color: #a866ff; font-size: 38px; }
  .mobile-magic-banner > span { display: grid; gap: 3px; }
  .mobile-magic-banner strong { font-size: 13px; }
  .mobile-magic-banner small { color: #abb7ca; font-size: 9px; }
  .mobile-magic-banner > b { border: 1px solid rgba(131, 128, 255, 0.47); border-radius: 8px; padding: 9px; font-size: 9px; }

  .marketing-page > .mobile-bottom-nav,
  .studio-page > .mobile-bottom-nav {
    max-width: 430px;
    margin: 0 auto;
  }
}

* {
  box-sizing: border-box;
}

.ui-icon {
  display: block;
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(27, 111, 255, 0.2), transparent 32rem),
    radial-gradient(circle at 92% 16%, rgba(143, 54, 255, 0.18), transparent 34rem),
    linear-gradient(180deg, #020714 0%, #06101f 48%, #020611 100%);
  overflow-x: clip;
}

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

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

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

.glass {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16, 30, 56, 0.84), rgba(7, 14, 27, 0.82));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 56px;
  border-width: 0 0 1px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 21px;
}

.brand strong {
  color: #8c62ff;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: white;
  font-size: 16px;
  box-shadow: 0 12px 30px rgba(61, 104, 255, 0.38);
}

.brand-mark .ui-icon {
  width: 17px;
  height: 17px;
  fill: currentColor;
  stroke-width: 1.5;
}

.desktop-nav {
  display: flex;
  gap: 42px;
  color: #d8e3f7;
  font-size: 14px;
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  background: rgba(8, 16, 31, 0.72);
  color: var(--text);
}

.studio-menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 11px;
  background: rgba(8, 16, 31, 0.72);
  color: var(--text);
}

.workspace-menu-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 11px;
  background: rgba(8, 16, 31, 0.78);
  color: var(--text);
}

.mobile-bottom-nav {
  position: fixed;
  z-index: 30;
  right: 0;
  bottom: 0;
  left: 0;
  display: none;
  align-items: end;
  justify-content: space-between;
  min-height: 72px;
  border-top: 1px solid rgba(139, 166, 214, 0.16);
  padding: 7px max(7px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom));
  background: rgba(5, 12, 26, 0.97);
  box-shadow: 0 -16px 48px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(20px);
}

.mobile-bottom-nav a {
  display: grid;
  flex: 1 1 0;
  min-width: 0;
  place-items: center;
  gap: 5px;
  border-radius: 13px;
  padding: 6px 2px 4px;
  color: #8494b2;
  font-size: 9px;
  font-weight: 650;
  line-height: 1.1;
  text-align: center;
}

.mobile-bottom-nav a > span {
  display: grid;
  width: 28px;
  height: 25px;
  place-items: center;
  color: #aebbd1;
  font-size: 20px;
}

.mobile-bottom-nav a.active {
  color: #eef5ff;
  background: linear-gradient(180deg, rgba(49, 112, 255, 0.22), rgba(49, 112, 255, 0.08));
  box-shadow: inset 0 0 0 1px rgba(93, 150, 255, 0.18);
}

.mobile-bottom-nav a.active > span {
  color: #6ca9ff;
  filter: drop-shadow(0 0 8px rgba(66, 137, 255, 0.55));
}

.mobile-bottom-nav .mobile-create {
  transform: translateY(-17px);
  color: #fff;
  font-weight: 800;
}

.mobile-bottom-nav .mobile-create > span {
  display: grid;
  width: 47px;
  height: 47px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 17px;
  background: linear-gradient(135deg, var(--blue), var(--purple) 72%, var(--pink));
  box-shadow: 0 12px 30px rgba(54, 107, 255, 0.36);
  color: #fff;
  font-size: 24px;
}

.workspace-page {
  min-height: 100vh;
  padding: 22px;
}

.workspace-topbar,
.workspace-shell {
  width: min(1280px, 100%);
  margin-inline: auto;
}

.workspace-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-radius: 18px;
  padding: 13px 18px;
}

.workspace-nav,
.workspace-actions,
.workspace-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-nav a {
  border-radius: 9px;
  padding: 9px 11px;
  color: #c3d1e7;
  font-size: 14px;
}

.workspace-nav a:hover {
  background: rgba(48, 97, 182, 0.25);
  color: #fff;
}

.workspace-nav a.active,
.studio-nav a.active {
  background: linear-gradient(90deg, rgba(42, 118, 255, 0.3), rgba(139, 66, 255, 0.36));
  color: #fff;
}

.workspace-shell {
  padding: 34px 0 70px;
}

.workspace-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  overflow: hidden;
  border-radius: var(--radius);
  padding: 32px;
  background:
    radial-gradient(circle at 88% 10%, rgba(140, 68, 255, 0.28), transparent 16rem),
    linear-gradient(135deg, rgba(13, 38, 79, 0.95), rgba(9, 15, 32, 0.86));
}

.workspace-hero h1 {
  max-width: 720px;
  margin: 13px 0 0;
  font-size: clamp(32px, 4vw, 54px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.workspace-lead {
  max-width: 710px;
  margin: 16px 0 0;
  color: #bfd0e8;
  font-size: 17px;
  line-height: 1.55;
}

.workspace-content {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.creative-mode-grid,
.preset-grid,
.project-list,
.asset-grid {
  display: grid;
  gap: 16px;
}

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

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

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

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

.mode-card,
.preset-card,
.project-card,
.asset-card,
.creation-form,
.workspace-empty {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 31, 57, 0.82), rgba(7, 14, 29, 0.82));
}

.mode-card,
.preset-card,
.project-card,
.asset-card {
  min-width: 0;
  padding: 21px;
}

.mode-card {
  display: grid;
  gap: 9px;
  min-height: 170px;
}

.mode-card strong,
.preset-card strong,
.project-card strong,
.asset-card strong {
  font-size: 18px;
}

.mode-card p,
.preset-card p,
.project-card p,
.asset-card p,
.workspace-empty p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.mode-card span,
.preset-card span,
.asset-card span {
  color: #9bc8ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.mode-card .text-link {
  margin-top: auto;
}

.preset-card {
  display: grid;
  gap: 13px;
  min-height: 210px;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 6%, var(--preset-glow, rgba(91, 93, 255, 0.25)), transparent 10rem),
    linear-gradient(180deg, rgba(18, 35, 68, 0.96), rgba(7, 15, 31, 0.96));
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.preset-card:nth-child(2n) { --preset-glow: rgba(213, 67, 191, 0.25); }
.preset-card:nth-child(3n) { --preset-glow: rgba(38, 190, 151, 0.22); }
.preset-card:nth-child(4n) { --preset-glow: rgba(239, 162, 58, 0.23); }

.preset-card:hover {
  transform: translateY(-3px);
  border-color: rgba(103, 159, 255, 0.42);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.preset-card-head,
.preset-card-footer,
.project-card-head,
.project-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preset-card-head .ui-icon {
  color: #72a8ff;
  font-size: 22px;
}

.preset-card > strong {
  font-size: 21px;
  line-height: 1.2;
}

.preset-card-footer {
  align-self: end;
  margin-top: auto;
  border-top: 1px solid rgba(132, 161, 210, 0.14);
  padding-top: 13px;
}

.preset-card-footer span {
  color: #d8e7ff;
  font-size: 12px;
  letter-spacing: 0;
}

.preset-card-footer .ui-icon {
  color: #70a8ff;
}

.project-card {
  display: grid;
  gap: 18px;
  min-height: 228px;
  padding: 22px;
}

.project-status {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border: 1px solid rgba(101, 158, 255, 0.3);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(45, 113, 255, 0.13);
  color: #91bdff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-status.ready {
  border-color: rgba(69, 211, 144, 0.32);
  background: rgba(41, 177, 112, 0.12);
  color: #7be0ae;
}

.project-status.draft {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: #b9c7dc;
}

.project-meta {
  color: var(--muted);
  font-size: 12px;
}

.project-card-body {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.project-card-body > div {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.project-card-body strong {
  font-size: 21px;
  line-height: 1.25;
}

.project-card-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: rgba(44, 116, 255, 0.16);
  color: #6faaff;
  font-size: 23px;
}

.project-card-icon.ready {
  background: rgba(44, 199, 127, 0.13);
  color: #67d8a1;
}

.project-card-actions {
  align-self: end;
  justify-content: flex-start;
  margin-top: auto;
  border-top: 1px solid rgba(132, 161, 210, 0.14);
  padding-top: 14px;
}

.project-card-actions .icon-button {
  display: grid;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  place-items: center;
}

.creation-form {
  display: grid;
  gap: 18px;
  max-width: 900px;
  padding: 26px;
}

.creation-form h2 { margin: 0; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.creation-form label {
  display: grid;
  gap: 8px;
  color: #c9d6ea;
  font-size: 14px;
}

.creation-form input,
.creation-form textarea,
.creation-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 13px;
  outline: none;
  background: rgba(4, 11, 25, 0.84);
  color: #fff;
}

.creation-form textarea { min-height: 132px; resize: vertical; }

.creation-form-rich {
  max-width: 1120px;
  gap: 16px;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

.creation-form-head,
.creation-section,
.creation-submit {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17, 31, 57, 0.9), rgba(7, 14, 29, 0.88));
}

.creation-form-head {
  padding: 25px;
}

.creation-form-head h2 {
  margin: 10px 0 7px;
  font-size: 28px;
}

.creation-form-head > div > span,
.creation-section-title p,
.creation-submit p {
  color: var(--muted);
  line-height: 1.45;
}

.creation-stage-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

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

.creation-stage-grid article {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 128px;
  align-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 16px;
  background: rgba(10, 22, 43, 0.82);
}

.creation-stage-grid article > b {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 8px;
  background: rgba(86, 85, 255, 0.2);
  color: #a9a3ff;
  font-size: 11px;
}

.creation-stage-grid .ui-icon {
  margin-bottom: 5px;
  color: #6d94ff;
  font-size: 27px;
}

.creation-stage-grid strong { font-size: 14px; }
.creation-stage-grid span { color: var(--muted); font-size: 11px; line-height: 1.35; }

.creation-section {
  display: grid;
  gap: 18px;
  padding: 24px;
}

.creation-section-title {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.creation-section-title > b {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, #2b78ff, #9148ff);
}

.creation-section-title h3,
.creation-section-title p {
  margin: 0;
}

.creation-section-title h3 { font-size: 19px; }
.creation-section-title p { margin-top: 4px; font-size: 13px; }

.source-choice {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.source-choice label {
  position: relative;
  display: grid;
  min-height: 126px;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 17px;
  background: rgba(6, 15, 31, 0.8);
  cursor: pointer;
}

.source-choice label:has(input:checked) {
  border-color: rgba(82, 135, 255, 0.68);
  background: linear-gradient(160deg, rgba(37, 95, 204, 0.2), rgba(86, 42, 172, 0.16));
  box-shadow: inset 0 0 0 1px rgba(80, 135, 255, 0.17);
}

.source-choice input {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 17px;
  height: 17px;
}

.source-choice .ui-icon { color: #6e9eff; font-size: 27px; }
.source-choice strong { font-size: 14px; }
.source-choice span { color: var(--muted); font-size: 11px; line-height: 1.4; }

.upload-drop {
  position: relative;
  display: grid !important;
  min-height: 118px;
  place-items: center;
  align-content: center;
  gap: 7px !important;
  border: 1px dashed rgba(101, 150, 235, 0.45);
  border-radius: 15px;
  padding: 18px;
  background: rgba(8, 20, 40, 0.52);
  text-align: center;
  cursor: pointer;
}

.upload-drop .ui-icon { color: #6c9cff; font-size: 30px; }
.upload-drop span { color: var(--muted); font-size: 12px; }
.upload-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

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

.production-options label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px;
  background: rgba(7, 16, 32, 0.65);
}

.production-options input { width: 17px; height: 17px; }

.creation-submit {
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr);
  gap: 10px;
  align-items: center;
  padding: 18px;
}

.creation-submit .btn { gap: 8px; }
.creation-submit p { margin: 0 0 0 8px; font-size: 11px; }
.creation-submit button:disabled { cursor: wait; opacity: 0.72; }

.creation-form-rich > .form-status {
  border-radius: 12px;
  padding: 0 4px;
}

.form-status {
  min-height: 22px;
  margin: 0;
  color: #9bc8ff;
  font-size: 14px;
}

.form-status.budget-confirmation {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid rgba(91, 132, 255, 0.38);
  border-radius: 16px;
  background: rgba(29, 54, 105, 0.3);
}

.form-status.budget-confirmation strong,
.form-status.budget-confirmation span {
  display: block;
}

.form-status.budget-confirmation .btn {
  justify-self: start;
}

.image-result-panel {
  margin-top: 22px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(7, 18, 38, 0.78);
}

.image-result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.image-result-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(13, 29, 57, 0.82);
}

.image-result-card.selected { border-color: #6d75ff; box-shadow: 0 0 0 2px rgba(109, 117, 255, 0.18); }
.image-result-card img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.image-result-card > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; }

.image-attach-panel {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 0.8fr) auto;
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(91, 132, 255, 0.28);
  border-radius: 16px;
  background: rgba(29, 54, 105, 0.22);
}

.image-attach-panel span { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

@media (max-width: 720px) {
  .image-attach-panel { grid-template-columns: 1fr; }
  .image-attach-panel .btn { width: 100%; }
}

.workspace-empty { padding: 34px; text-align: center; }

.app-toast {
  position: fixed;
  z-index: 80;
  right: 22px;
  bottom: 22px;
  max-width: min(390px, calc(100% - 28px));
  border: 1px solid rgba(102, 158, 255, 0.34);
  border-radius: 14px;
  padding: 13px 15px;
  background: rgba(8, 20, 42, 0.97);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.48);
  color: #dce9ff;
  font-size: 13px;
  line-height: 1.45;
}

.choice-link {
  color: inherit;
  text-align: left;
}

.desktop-nav a:hover,
.section-heading a {
  color: #73a9ff;
}

.topbar-actions,
.hero-actions,
.editor-actions,
.studio-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  min-width: 0;
}

.studio-header-actions .btn-primary {
  white-space: nowrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 0;
  border-radius: 12px;
  padding: 0 22px;
  color: var(--text);
  cursor: pointer;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.btn:hover,
.choice:hover,
.stack-scene:hover {
  transform: translateY(-1px);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(77, 155, 255, .82);
  outline-offset: 3px;
}

.btn-primary,
.btn-telegram {
  background: linear-gradient(135deg, var(--blue), var(--purple) 72%, var(--pink));
  box-shadow: 0 14px 32px rgba(54, 107, 255, 0.28);
}

.btn-ghost,
.btn-soft,
.btn-outline,
.icon-button,
.choice,
.credit-pill,
.user-pill {
  border: 1px solid var(--line);
  background: rgba(8, 16, 31, 0.72);
}

.btn-outline {
  border-color: rgba(142, 74, 255, 0.8);
}

.compact {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
}

.section-grid,
.content-section,
.feature-grid,
.localization,
.cta,
.footer {
  width: min(1440px, calc(100% - 64px));
  margin-inline: auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(330px, 0.82fr) minmax(520px, 1.18fr);
  gap: 48px;
  align-items: center;
  padding: 68px 0 36px;
}

.eyebrow,
.pill,
.badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border: 1px solid rgba(53, 134, 255, 0.46);
  border-radius: 999px;
  padding: 7px 13px;
  background: rgba(11, 41, 82, 0.42);
  color: #c5dcff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hero h1 {
  max-width: 650px;
  margin: 24px 0 20px;
  font-size: clamp(46px, 5.35vw, 68px);
  line-height: 0.97;
  letter-spacing: -0.06em;
}

.hero h1 span {
  display: block;
  background: linear-gradient(90deg, var(--cyan), #6e62ff 42%, #b94cff);
  background-clip: text;
  color: transparent;
}

.hero-visual {
  position: relative;
  isolation: isolate;
  min-height: 520px;
  overflow: hidden;
  border-radius: 24px;
}

.hero-visual::after {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(3, 8, 23, 0.18), rgba(3, 8, 23, 0.7));
}

.hero-visual > img,
.hero-visual > video {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual > video { background: #071326; }

.hero-visual-card {
  position: absolute;
  z-index: 1;
  display: grid;
  gap: 5px;
  max-width: min(86%, 390px);
  border: 1px solid rgba(163, 191, 255, 0.32);
  border-radius: 15px;
  padding: 15px 17px;
  background: rgba(5, 14, 33, 0.78);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(13px);
}

.hero-visual-card strong {
  font-size: 14px;
}

.hero-visual-card span {
  color: #bdcae3;
  font-size: 13px;
  line-height: 1.45;
}

.hero-visual-top {
  top: 24px;
  right: 24px;
}

.hero-visual-bottom {
  right: 24px;
  bottom: 24px;
  grid-template-columns: auto 1fr;
  align-items: center;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(49, 212, 134, 0.13);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 26px;
}

.trust-row span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  color: #cbd8ec;
  font-size: 12px;
}

.lead {
  max-width: 570px;
  color: #bccae0;
  font-size: 20px;
  line-height: 1.55;
}

.rating-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 34px;
}

.avatars {
  display: flex;
}

.avatars span,
.team-faces span,
.user-pill span {
  width: 38px;
  height: 38px;
  margin-left: -8px;
  border: 2px solid #0d1831;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 32%, #ffd0a4 0 20%, transparent 21%),
    linear-gradient(135deg, #4c6283, #d9e5f4);
}

.avatars span:first-child,
.team-faces span:first-child {
  margin-left: 0;
}

.stars {
  color: #ffc845;
  letter-spacing: 0.12em;
}

.rating-row p,
.section-heading p,
.footer p,
.local-grid p,
.template-card p,
.price-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.product-preview {
  overflow: hidden;
  min-height: 535px;
  border-radius: 24px;
}

.preview-top,
.editor-title-row,
.section-heading,
.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.preview-top {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.brand.mini {
  font-size: 13px;
}

.brand.mini .brand-mark {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 10px;
}

.preview-tools {
  margin-left: auto;
  color: var(--muted);
  letter-spacing: 0.75em;
}

.pill.blue {
  background: linear-gradient(135deg, #266dff, #8b44ff);
  color: white;
  text-transform: none;
}

.preview-layout {
  display: grid;
  grid-template-columns: 104px 150px minmax(280px, 1fr) 210px;
  min-height: 380px;
}

.preview-sidebar,
.scene-list,
.ai-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-right: 1px solid var(--line);
  color: #a9b6cf;
  font-size: 13px;
}

.preview-sidebar .active,
.studio-nav .active {
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(42, 115, 255, 0.35), rgba(142, 58, 255, 0.42));
  color: white;
}

.preview-sidebar span,
.studio-nav a {
  padding: 11px 12px;
}

.scene-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 12, 25, 0.64);
}

.scene-card.selected,
.stack-scene.active,
.choice.active {
  border-color: var(--line-strong);
  box-shadow: inset 0 0 0 1px rgba(52, 131, 255, 0.18);
}

.scene-card small {
  grid-column: 2;
  color: var(--muted);
}

.thumb {
  min-width: 54px;
  height: 46px;
  border-radius: 10px;
  background: linear-gradient(135deg, #233c63, #c39564);
}

.video-canvas,
.video-stage,
.use-case,
.template-card {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(255, 205, 129, 0.22), transparent 38%),
    linear-gradient(135deg, #152a46, #071427 58%, #080d18);
}

.villa,
.realty,
.house {
  background:
    linear-gradient(180deg, rgba(255, 220, 142, 0.42), transparent 45%),
    linear-gradient(135deg, #162137, #0f2b47 48%, #c69255);
}

.room {
  background: linear-gradient(135deg, #584432, #d2b28b 52%, #273955);
}

.cafe,
.food,
.burger {
  background: linear-gradient(135deg, #2a130c, #f39f2a 55%, #4b170e);
}

.shorts,
.purple,
.sale {
  background: linear-gradient(135deg, #27195a, #7c3eff 54%, #e84ca7);
}

.product,
.minimal {
  background: linear-gradient(135deg, #0e1626, #6f849e 60%, #dce7f2);
}

.reels {
  background: linear-gradient(135deg, #30115d, #ff5d71 52%, #ffc45a);
}

.service {
  background: linear-gradient(135deg, #0c182c, #375b8d 48%, #d7e0ec);
}

.park,
.pool,
.playground {
  background: linear-gradient(135deg, #1d4c42, #9bd47f 50%, #5f85bc);
}

.logo {
  background: linear-gradient(135deg, #0d1627, #253b65);
}

.video-canvas {
  display: flex;
  align-items: end;
  min-height: 328px;
  margin: 28px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 28px;
}

.video-title,
.logo-overlay {
  font-size: 34px;
  font-weight: 900;
  line-height: 1.08;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.video-title span {
  color: #4b98ff;
}

.player-bar {
  position: absolute;
  right: 28px;
  bottom: 18px;
  left: 28px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.player-bar span {
  display: block;
  width: 46%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--purple));
}

.ai-panel {
  border-right: 0;
}

.ai-panel p {
  color: #cbd6e9;
  line-height: 1.5;
}

.waveform {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  padding: 8px;
  border-radius: 12px;
  background: rgba(28, 56, 98, 0.6);
}

.waveform i {
  display: block;
  width: 5px;
  height: calc(12px + var(--h, 18px));
  border-radius: 999px;
  background: #4ba0ff;
}

.waveform i:nth-child(2n) {
  --h: 28px;
}

.waveform i:nth-child(3n) {
  --h: 8px;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  padding: 0 20px 22px 252px;
}

.timeline span {
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(53, 130, 255, 0.44), rgba(142, 68, 255, 0.32));
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.section-heading-wide {
  align-items: end;
}

.section-heading-wide > p {
  max-width: 460px;
  font-size: 15px;
  line-height: 1.5;
}

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

.feature-grid-product article {
  min-height: 190px;
  text-align: left;
}

.feature-grid-product span {
  min-width: 42px;
  color: #b0d4ff;
  font-size: 12px;
  font-weight: 800;
}

.feature-grid article,
.price-card,
.template-card,
.localization,
.cta,
.footer,
.stat-card,
.create-panel,
.recent-panel,
.editor-panel,
.right-rail > section,
.bottom-panels article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(18, 32, 59, 0.78), rgba(8, 16, 30, 0.76));
}

.feature-grid article {
  min-height: 150px;
  padding: 18px;
  text-align: center;
}

.feature-grid span {
  display: inline-grid;
  min-width: 38px;
  min-height: 38px;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 12px;
  color: #73b8ff;
  background: rgba(31, 83, 160, 0.34);
}

.feature-grid h3,
.price-card h3,
.template-card h3 {
  margin: 0 0 8px;
}

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

.content-section {
  margin-top: 34px;
}

.banner-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
}

.story-banner {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  border-radius: var(--radius);
}

.story-banner::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, rgba(3, 8, 22, 0.94) 5%, rgba(3, 8, 22, 0.66) 50%, rgba(3, 8, 22, 0.14));
}

.story-banner > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-banner-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: end;
  min-height: 430px;
  max-width: 590px;
  padding: 34px;
}

.story-banner-copy h2 {
  margin: 14px 0 12px;
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.story-banner-copy p:not(.eyebrow) {
  margin: 0;
  color: #d2dced;
  line-height: 1.55;
}

.text-link {
  margin-top: 22px;
  color: #91c4ff;
  font-weight: 800;
}

.education-banner::after {
  background: linear-gradient(90deg, rgba(3, 8, 22, 0.93) 5%, rgba(3, 8, 22, 0.58) 57%, rgba(3, 8, 22, 0.08));
}

.education-banner .story-banner-copy {
  min-height: 430px;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.workflow-card {
  min-height: 228px;
  padding: 26px;
}

.workflow-card b {
  color: #84b5ff;
  font-size: 13px;
  letter-spacing: 0.1em;
}

.workflow-card h3 {
  margin: 42px 0 10px;
  font-size: 22px;
}

.workflow-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.section-heading {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  letter-spacing: -0.03em;
}

.use-case-row,
.template-grid,
.pricing-grid,
.local-grid,
.bottom-panels,
.stat-grid,
.create-type-row {
  display: grid;
  gap: 16px;
}

.use-case-row {
  grid-template-columns: repeat(7, 1fr);
}

.use-case {
  display: flex;
  align-items: end;
  min-height: 110px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  font-weight: 800;
}

.use-case::before,
.template-card::before,
.video-stage::before,
.video-canvas::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(180deg, transparent 40%, rgba(2, 6, 15, 0.82)),
    radial-gradient(circle at 74% 28%, rgba(255, 255, 255, 0.24), transparent 3rem);
  pointer-events: none;
}

.template-grid {
  grid-template-columns: repeat(6, 1fr);
}

.template-card {
  min-height: 150px;
  padding: 16px;
}

.template-card span {
  position: relative;
  z-index: 1;
  display: inline-block;
  margin-bottom: 48px;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(0, 0, 0, 0.38);
  color: #dfe9ff;
}

.template-card h3,
.template-card p,
.use-case {
  position: relative;
  z-index: 1;
}

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

.price-card {
  position: relative;
  padding: 28px;
}

.price-card.featured {
  border-color: #327eff;
  box-shadow:
    0 24px 80px rgba(34, 110, 255, 0.22),
    inset 0 0 0 1px rgba(89, 146, 255, 0.42);
}

.price-card strong {
  display: block;
  margin: 18px 0;
  font-size: 34px;
}

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

.price-card ul {
  display: grid;
  gap: 10px;
  min-height: 118px;
  margin: 0 0 24px;
  padding: 0;
  color: #d7e4f9;
  list-style: none;
}

.price-card li::before {
  content: "✓";
  margin-right: 8px;
  color: #ffd25f;
}

.badge {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(72, 104, 255, 0.4);
  text-transform: none;
}

.localization,
.cta {
  margin-top: 34px;
  padding: 28px;
}

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

.local-grid article {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px;
}

.local-grid span,
.telegram-orb {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #2fc6ff, #7465ff);
  color: white;
  font-weight: 900;
}

.local-grid h3 {
  margin: 0;
}

.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
}

.footer {
  display: grid;
  grid-template-columns: 1.2fr 2fr 1.5fr 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 28px;
  padding: 28px;
  color: var(--muted);
}

.footer nav {
  display: grid;
  gap: 8px;
}

.studio-page {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  min-height: 100vh;
  overflow-x: hidden;
}

.studio-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 24px 18px;
  border-width: 0 1px 0 0;
  border-radius: 0;
}

.workspace-switcher,
.subscription-card,
.telegram-card {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18, 32, 60, 0.72);
  color: var(--text);
}

.workspace-switcher {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  margin: 28px 0 14px;
  padding: 14px;
  text-align: left;
}

.workspace-switcher small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.studio-nav {
  display: grid;
  gap: 7px;
}

.studio-nav a {
  color: #c9d4e8;
}

.subscription-card,
.telegram-card {
  margin-top: auto;
  padding: 18px;
}

.telegram-card {
  margin-top: 18px;
  text-align: center;
}

.telegram-orb {
  margin: 0 auto 14px;
}

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

.meter span,
.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--purple));
}

.meter.orange span {
  background: linear-gradient(90deg, var(--blue), var(--orange));
}

.studio-shell {
  min-width: 0;
  padding: 20px 24px 36px;
}

.studio-header {
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(640px, 45vw);
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(16, 30, 57, 0.8);
  color: var(--muted);
}

.search-box input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

kbd {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.06);
  color: #b2c1da;
}

.credit-pill,
.user-pill,
.icon-button {
  min-height: 42px;
  border-radius: 12px;
  color: var(--text);
}

.credit-pill,
.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
}

.user-pill span {
  margin: 0;
}

.user-pill small {
  display: block;
  color: var(--muted);
}

.icon-button {
  min-width: 42px;
}

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

.stat-card {
  position: relative;
  min-height: 104px;
  padding: 20px 22px 18px 84px;
}

.stat-card span {
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 16px;
  background: rgba(40, 114, 255, 0.28);
  color: #4fa4ff;
}

.stat-card.green span {
  background: rgba(49, 212, 134, 0.18);
  color: var(--green);
}

.stat-card.orange span {
  background: rgba(248, 161, 28, 0.18);
  color: var(--orange);
}

.stat-card p,
.stat-card small,
.editor-title-row p {
  margin: 0;
  color: var(--muted);
}

.editor-project-summary {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.editor-kicker {
  color: #79adff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.editor-title-row h2 {
  margin: 0;
}

.editor-save-status {
  display: flex;
  align-items: center;
  gap: 7px;
}

.status-dot-small {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(49, 212, 134, 0.1);
}

.editor-actions .btn {
  gap: 8px;
}

.editor-action-status {
  margin: 14px 0 0;
  border: 1px solid rgba(91, 145, 236, 0.18);
  border-radius: 11px;
  padding: 10px 12px;
  background: rgba(39, 89, 171, 0.08);
  color: #aebfda;
  font-size: 12px;
  line-height: 1.45;
}

.render-action:disabled {
  cursor: wait;
  opacity: 0.72;
}

.stat-card strong {
  display: block;
  margin: 4px 0;
  font-size: 28px;
}

.stat-card i {
  position: absolute;
  right: 20px;
  bottom: 28px;
  width: 82px;
  height: 26px;
  border-radius: 50%;
  border-top: 4px solid currentColor;
  color: #189cff;
  transform: rotate(-12deg);
}

.create-panel,
.studio-workspace,
.bottom-panels {
  margin-top: 20px;
}

.create-panel {
  padding: 22px;
}

.create-type-row {
  grid-template-columns: repeat(6, 1fr);
}

.choice {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 3px 10px;
  min-height: 72px;
  border-radius: 14px;
  padding: 14px;
  color: var(--text);
  text-align: left;
}

.choice span {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
}

.choice b {
  align-self: end;
}

.choice-icon {
  grid-row: 1 / span 2;
  align-self: center;
  width: 24px;
  height: 24px;
  color: #75aaff;
}

.studio-workspace {
  display: grid;
  grid-template-columns: 330px minmax(560px, 1fr) 290px;
  gap: 16px;
  align-items: start;
}

.studio-workspace > *,
.editor-body > *,
.scene-settings-row > *,
.right-rail,
.main-editor,
.scene-stack {
  min-width: 0;
}

.recent-panel,
.editor-panel,
.right-rail > section,
.bottom-panels article {
  padding: 20px;
}

.recent-item {
  position: relative;
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(7, 15, 30, 0.5);
}

.recent-item.active {
  border-color: var(--line);
}

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

.recent-item em {
  position: absolute;
  top: 12px;
  right: 10px;
  border-radius: 6px;
  padding: 3px 7px;
  background: rgba(39, 113, 255, 0.25);
  color: #83b8ff;
  font-size: 11px;
  font-style: normal;
}

.recent-item em.done {
  background: rgba(49, 212, 134, 0.16);
  color: #8ff2bd;
}

.recent-item em.render {
  background: rgba(248, 161, 28, 0.18);
  color: #ffd188;
}

.recent-item em.draft {
  background: rgba(255, 255, 255, 0.08);
  color: #bdc7d7;
}

.editor-tabs {
  display: flex;
  gap: 22px;
  margin: 18px -20px 0;
  padding: 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.editor-tabs::-webkit-scrollbar {
  display: none;
}

.editor-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 16px 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.editor-tabs button.active {
  border-color: var(--blue);
  color: white;
}

.editor-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 16px 0 0;
  border: 1px solid rgba(76, 126, 255, .18);
  border-radius: 15px;
  padding: 14px 15px;
  background: linear-gradient(135deg, rgba(39, 89, 171, .12), rgba(111, 53, 188, .08));
}

.editor-context > div:first-child { display: grid; gap: 4px; }
.editor-context strong { font-size: 14px; }
.editor-context p { max-width: 650px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.45; }
.editor-context-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.editor-context-actions .btn { gap: 7px; white-space: nowrap; }
.editor-panel.is-preparing { position: relative; overflow: hidden; }
.editor-panel.is-preparing::after { position: absolute; z-index: 8; top: 0; right: 0; left: 0; height: 3px; content: ""; background: linear-gradient(90deg,transparent,#2e82ff,#a345ff,transparent); background-size: 220% 100%; animation: render-scan 1.15s linear infinite; }
.editor-panel.is-preparing .video-stage::after { position: absolute; z-index: 4; inset: 0; content: "Подготавливаем предпросмотр…"; display: grid; place-items: center; color: #eaf2ff; font-size: 13px; font-weight: 800; background: rgba(3,10,23,.66); backdrop-filter: blur(5px); }
@keyframes render-scan { to { background-position: -220% 0; } }

.editor-body {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  gap: 18px;
  padding-top: 18px;
}

.scene-stack-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.scene-stack-title button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 18, 34, 0.7);
  color: var(--text);
}

.stack-scene {
  position: relative;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  width: 100%;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: rgba(8, 18, 35, 0.56);
  color: var(--text);
  text-align: left;
}

.stack-scene small {
  color: var(--muted);
}

.stack-scene em {
  position: absolute;
  top: 8px;
  right: 10px;
  color: #b9c8dc;
  font-size: 11px;
  font-style: normal;
}

.video-stage {
  min-height: 348px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.logo-overlay {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 94px;
  left: 0;
  text-align: center;
  font-size: 42px;
  letter-spacing: 0.18em;
}

.logo-overlay small {
  display: block;
  margin-top: 8px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.08em;
}

.player-controls {
  position: absolute;
  z-index: 1;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 13px 16px;
  background: rgba(2, 8, 17, 0.72);
}

.player-controls button {
  display: inline-grid;
  min-width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  padding: 0 8px;
  color: #eaf1ff;
  background: rgba(3,9,20,.56);
  cursor: pointer;
}

.player-controls button:hover,
.player-controls button:focus-visible,
.player-controls button.active {
  border-color: rgba(93,139,255,.55);
  color: #fff;
  background: rgba(50,102,224,.34);
}

.player-controls .ui-icon { width: 15px; height: 15px; }

.player-controls button {
  border: 0;
  background: transparent;
  color: white;
}

.player-controls span {
  margin-left: auto;
  color: var(--muted);
}

.scene-settings-row {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 16px;
  margin-top: 16px;
}

.script-box,
.settings-box,
.brand-kit label {
  display: grid;
  gap: 10px;
}

.script-box,
.settings-box {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: rgba(8, 16, 31, 0.6);
}

textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: rgba(6, 13, 25, 0.72);
  color: var(--text);
}

textarea {
  min-height: 92px;
  resize: vertical;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.right-rail {
  display: grid;
  gap: 16px;
}

.brand-box {
  display: grid;
  min-height: 92px;
  place-items: center;
  border: 1px dashed rgba(139, 162, 203, 0.42);
  border-radius: 16px;
  color: #f5f7ff;
  font-size: 28px;
  letter-spacing: 0.18em;
}

.brand-box small {
  font-size: 11px;
  letter-spacing: 0.08em;
}

.swatches {
  display: flex;
  gap: 10px;
  margin: 8px 0 16px;
}

.swatches span {
  width: 38px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #5266ff;
}

.swatches span:nth-child(2) {
  background: #0d1628;
}

.swatches span:nth-child(3) {
  background: #23304a;
}

.swatches span:nth-child(4) {
  background: #f5dfc0;
}

.swatches span:nth-child(5) {
  background: #1d3827;
}

.render-queue ol {
  display: grid;
  gap: 0;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.render-queue li {
  border-left: 2px solid rgba(255, 255, 255, 0.16);
  padding: 0 0 18px 18px;
  color: var(--muted);
}

.render-queue li.done,
.render-queue li.active {
  border-color: var(--green);
  color: white;
}

.render-queue li.active {
  border-color: var(--blue);
}

.render-queue span {
  display: block;
  color: var(--muted);
}

.render-queue p {
  color: var(--muted);
}

.render-queue button {
  float: right;
  border: 0;
  background: transparent;
  color: #7aaeff;
}

.analytics-card p {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  color: var(--muted);
}

.analytics-card strong {
  grid-column: 1;
  color: white;
  font-size: 22px;
}

.analytics-card span {
  grid-column: 2;
  grid-row: 2;
  color: var(--green);
}

.bottom-panels {
  grid-template-columns: 330px 1fr 1fr;
}

.team-faces {
  display: flex;
}

.donut-row {
  display: flex;
  align-items: center;
  gap: 18px;
}

.donut {
  display: inline-block;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: conic-gradient(var(--blue) 0 53%, rgba(255, 255, 255, 0.1) 53% 100%);
}

.donut.orange {
  background: conic-gradient(var(--orange) 0 62%, rgba(255, 255, 255, 0.1) 62% 100%);
}

.quick-panel div {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick-panel button {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: rgba(8, 17, 33, 0.72);
  color: #dce8fb;
}

@media (max-width: 1600px) {
  .feature-grid,
  .use-case-row,
  .template-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .studio-workspace {
    grid-template-columns: 300px minmax(520px, 1fr);
  }

  .right-rail {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }

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

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

@media (max-width: 1180px) {
  .stat-grid,
  .create-type-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .studio-workspace {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 981px) and (max-width: 1180px) {
  .marketing-page .desktop-nav { display: none; }
  .marketing-page .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .marketing-page .desktop-nav.is-open {
    position: absolute;
    top: calc(100% + 8px);
    right: 24px;
    left: 24px;
    display: grid;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    background: #071225;
    box-shadow: var(--shadow);
  }
  .marketing-page .desktop-nav.is-open a { padding: 12px; }
}

@media (max-width: 980px) {
  .studio-header,
  .cta,
  .footer {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar {
    flex-direction: row;
    align-items: center;
    padding: 14px 24px;
  }

  .topbar .brand {
    white-space: nowrap;
  }

  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .desktop-nav.is-open {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    display: grid;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 10px;
    background: #071225;
    box-shadow: var(--shadow);
  }

  .desktop-nav.is-open a {
    padding: 12px;
  }

  .section-grid,
  .content-section,
  .feature-grid,
  .localization,
  .cta,
  .footer {
    width: min(100% - 32px, 760px);
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 50px;
  }

  .hero-visual {
    min-height: 440px;
  }

  .feature-grid-product,
  .workflow-grid {
    grid-template-columns: 1fr 1fr;
  }

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

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

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

  .preview-sidebar,
  .scene-list,
  .ai-panel,
  .timeline {
    display: none;
  }

  .feature-grid,
  .use-case-row,
  .template-grid,
  .pricing-grid,
  .local-grid,
  .stat-grid,
  .create-type-row,
  .bottom-panels {
    grid-template-columns: 1fr 1fr;
  }

  .studio-page {
    grid-template-columns: 1fr;
  }

  .studio-sidebar {
    position: static;
    height: auto;
    padding: 14px 16px;
  }

  .studio-sidebar .workspace-switcher,
  .studio-sidebar .subscription-card,
  .studio-sidebar .telegram-card {
    display: none;
  }

  .studio-nav {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-top: 12px;
    scrollbar-width: thin;
  }

  .studio-nav a {
    flex: 0 0 auto;
    padding: 9px 11px;
    font-size: 13px;
    white-space: nowrap;
  }

  .studio-workspace,
  .editor-body,
  .scene-settings-row {
    grid-template-columns: 1fr;
  }

  .right-rail {
    grid-template-columns: 1fr;
  }

  .search-box {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .topbar,
  .studio-shell {
    padding-inline: 16px;
  }

  .topbar {
    gap: 12px;
    padding-block: 12px;
  }

  .topbar .brand {
    gap: 9px;
    font-size: 18px;
  }

  .topbar .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .hero h1 {
    font-size: clamp(39px, 12vw, 52px);
  }

  .topbar-actions,
  .hero-actions,
  .studio-header-actions {
    flex-wrap: wrap;
  }

  .feature-grid,
  .use-case-row,
  .template-grid,
  .pricing-grid,
  .local-grid,
  .stat-grid,
  .create-type-row,
  .bottom-panels {
    grid-template-columns: 1fr;
  }

  .feature-grid-product,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

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

  .topbar-actions {
    display: none;
  }

  .section-grid,
  .content-section,
  .feature-grid,
  .localization,
  .cta,
  .footer {
    width: min(100% - 24px, 760px);
  }

  .hero {
    gap: 28px;
    padding-top: 36px;
  }

  .lead {
    font-size: 17px;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .hero-visual,
  .story-banner,
  .story-banner-copy,
  .education-banner .story-banner-copy {
    min-height: 370px;
  }

  .hero-visual-card {
    max-width: calc(100% - 28px);
  }

  .hero-visual-top {
    top: 14px;
    right: 14px;
  }

  .hero-visual-bottom {
    right: 14px;
    bottom: 14px;
  }

  .story-banner-copy {
    padding: 22px;
  }

  .section-heading,
  .section-heading-wide {
    align-items: start;
  }

  .local-grid article {
    grid-template-columns: 48px 1fr;
  }

  .local-grid span {
    width: 46px;
    height: 46px;
    font-size: 12px;
  }

  .studio-shell {
    padding: 14px 12px 28px;
  }

  .studio-header-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .studio-header-actions .user-pill,
  .studio-header-actions .compact {
    display: none;
  }

  .credit-pill,
  .icon-button,
  .studio-header-actions .btn-primary {
    min-width: 0;
  }

  .stat-card {
    min-height: 92px;
  }

  .create-panel,
  .recent-panel,
  .editor-panel,
  .right-rail > section,
  .bottom-panels article {
    padding: 16px;
  }

  .editor-tabs {
    gap: 16px;
    overflow-x: auto;
  }

  .editor-tabs button {
    flex: 0 0 auto;
  }

  .video-stage {
    min-height: 260px;
  }

  .logo-overlay {
    bottom: 78px;
    font-size: 30px;
  }
}

/* Final guardrail for the Studio shell: no desktop grid track may leak into a phone viewport. */
@media (max-width: 980px) {
  .studio-page {
    display: block;
    width: 100%;
    max-width: 100%;
  }

  .studio-page > *,
  .studio-sidebar,
  .studio-shell,
  .studio-header,
  .studio-header-actions,
  .search-box {
    min-width: 0;
    max-width: 100%;
  }

  .studio-sidebar,
  .studio-shell {
    width: 100%;
  }

  .workspace-page {
    padding: 14px;
  }

  .workspace-topbar {
    flex-wrap: wrap;
  }

  .workspace-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

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

@media (max-width: 640px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
  }

  body {
    padding-bottom: 82px;
  }

  .mobile-bottom-nav {
    display: flex;
  }

  .section-grid,
  .content-section,
  .feature-grid,
  .localization,
  .cta,
  .footer {
    width: auto;
    max-width: none;
    margin-right: 16px;
    margin-left: 12px;
  }

  .section-heading-wide {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
  }

  .section-heading-wide > p {
    width: 100%;
    max-width: none;
  }

  .hero > *,
  .hero-copy,
  .hero-actions,
  .trust-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .eyebrow {
    max-width: 100%;
    white-space: normal;
  }

  .studio-sidebar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 11px 14px;
    overflow: visible;
  }

  .studio-sidebar .brand {
    min-width: 0;
  }

  .studio-sidebar .brand {
    font-size: 18px;
  }

  .studio-sidebar .brand-mark {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }

  .studio-menu-toggle {
    display: inline-flex;
    width: 43px;
    height: 40px;
    justify-content: center;
    padding: 0;
    border-color: rgba(116, 156, 225, 0.28);
    background: rgba(15, 28, 52, 0.96);
  }

  .studio-menu-toggle span,
  .workspace-menu-toggle span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  .studio-nav {
    position: absolute;
    top: calc(100% + 7px);
    right: 12px;
    left: 12px;
    display: none;
    max-height: min(72vh, 560px);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 9px;
    background: #071225;
    box-shadow: var(--shadow);
  }

  .studio-nav.is-open {
    display: grid;
  }

  .studio-nav a {
    width: 100%;
    white-space: normal;
  }

  .studio-shell {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding-bottom: 102px;
  }

  .studio-shell > *,
  .studio-workspace,
  .studio-workspace > *,
  .editor-panel,
  .editor-body,
  .editor-body > *,
  .main-editor,
  .scene-stack,
  .right-rail,
  .bottom-panels,
  .bottom-panels > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .studio-header {
    display: grid;
    gap: 10px;
  }

  .studio-header-actions {
    width: 100%;
  }

  .studio-header-actions .credit-pill,
  .studio-header-actions .icon-button {
    display: none;
  }

  .stat-card {
    padding: 17px 18px 16px 74px;
  }

  .stat-card span {
    top: 17px;
    left: 16px;
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .create-panel .section-heading,
  .recent-panel .section-heading,
  .editor-title-row,
  .scene-stack-title {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
  }

  .create-panel .section-heading > div,
  .editor-title-row > div:first-child {
    min-width: 0;
    flex: 1 1 220px;
  }

  .create-panel .section-heading a,
  .recent-panel .section-heading a {
    margin-left: 0;
    white-space: normal;
  }

  .recent-item {
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .recent-item b {
    min-width: 0;
    padding-right: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .recent-item em {
    position: static;
    grid-column: 2;
    justify-self: start;
  }

  .editor-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    gap: 8px;
  }

  .editor-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .editor-actions .history-action {
    display: none;
  }

  .editor-project-summary {
    width: 100%;
  }

  .editor-project-summary h2 {
    font-size: 27px;
    line-height: 1.12;
    letter-spacing: -0.035em;
  }

  .editor-kicker {
    display: inline-flex;
    width: max-content;
    border-radius: 999px;
    padding: 6px 9px;
    background: rgba(46, 111, 235, 0.13);
  }

  .editor-action-status {
    margin-top: 12px;
  }

  .editor-tabs {
    width: calc(100% + 32px);
    max-width: calc(100% + 32px);
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .editor-context {
    display: grid;
    align-items: stretch;
    margin-inline: -2px;
  }

  .editor-context-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .editor-context-actions .btn {
    justify-content: center;
    min-width: 0;
    white-space: normal;
  }

  .scene-stack-title a {
    margin-left: auto;
    font-size: 12px;
  }

  .stack-scene {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .stack-scene span {
    min-width: 0;
    padding-right: 30px;
  }

  .stack-scene small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .player-controls {
    gap: 10px;
    padding: 11px 12px;
  }

  .player-controls button:nth-of-type(2),
  .player-controls button:nth-of-type(3) {
    display: none;
  }

  .player-controls span {
    font-size: 11px;
  }

  .workspace-topbar {
    position: sticky;
    z-index: 20;
    top: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    overflow: visible;
  }

  .workspace-menu-toggle {
    display: inline-flex;
    width: 43px;
    height: 40px;
    justify-content: center;
    padding: 0;
  }

  .workspace-page {
    padding: 10px 10px 90px;
  }

  .workspace-topbar {
    min-height: 56px;
    padding: 10px 12px;
  }

  .workspace-topbar .brand {
    font-size: 18px;
  }

  .workspace-topbar .brand-mark {
    width: 31px;
    height: 31px;
    border-radius: 10px;
  }

  .workspace-nav,
  .workspace-actions {
    display: none;
  }

  .workspace-nav.is-open {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    display: grid;
    gap: 4px;
    width: 100%;
    overflow: visible;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 9px;
    background: #071225;
    box-shadow: var(--shadow);
  }

  .workspace-nav.is-open a {
    padding: 11px 12px;
    border-radius: 10px;
  }

  .workspace-shell {
    padding: 14px 0 18px;
  }

  .workspace-hero {
    display: grid;
    gap: 18px;
    padding: 23px;
  }

  .workspace-hero h1 {
    font-size: 35px;
  }

  .workspace-lead {
    font-size: 15px;
  }

  .workspace-hero-actions .btn {
    width: 100%;
  }

  .creative-mode-grid,
  .preset-grid,
  .project-list,
  .asset-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .mode-card,
  .preset-card,
  .project-card,
  .asset-card,
  .creation-form {
    padding: 18px;
  }

  .mode-card { min-height: 142px; }

  .preset-card {
    min-height: 210px;
    gap: 12px;
  }

  .project-card {
    min-height: 0;
    gap: 16px;
    padding: 19px;
  }

  .project-card-head {
    align-items: flex-start;
  }

  .project-card-body {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
  }

  .project-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 20px;
  }

  .project-card-body strong {
    font-size: 19px;
  }

  .project-card-actions .btn {
    flex: 1;
    justify-content: center;
  }

  .creation-form-rich {
    padding: 0;
  }

  .creation-form-head,
  .creation-section {
    padding: 18px;
  }

  .creation-form-head h2 {
    font-size: 25px;
  }

  .creation-stage-grid,
  .creation-stage-grid.image-stages {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 138px;
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }

  .creation-stage-grid::-webkit-scrollbar {
    display: none;
  }

  .source-choice,
  .production-options,
  .creation-submit {
    grid-template-columns: 1fr;
  }

  .creation-submit .btn {
    width: 100%;
    justify-content: center;
  }

  .creation-submit p {
    margin: 4px 0 0;
  }
}
