:root {
  color-scheme: dark;
  --bg: #100e16;
  --sidebar: #14111b;
  --surface: #191621;
  --raised: #211d2b;
  --border: #302b3c;
  --text: #f8f6fc;
  --muted: #b5afc1;
  --faint: #908a9d;
  --accent: #c2fa41;
  --accent-text: #182104;
  --display: "Unbounded", "Golos Text", sans-serif;
  --body: "Golos Text", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--body); }
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
button:disabled { opacity: .48; cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 650; line-height: 1.24; letter-spacing: -.045em; }
h1 { font-size: clamp(29px, 4vw, 50px); }
h2 { font-size: clamp(18px, 2.1vw, 26px); }
h3 { font-size: 17px; line-height: 1.35; }
p { color: var(--muted); }
small { font-size: 12px; }
.sidebar { width: 224px; position: fixed; inset: 0 auto 0 0; background: var(--sidebar); border-right: 1px solid var(--border); display: flex; flex-direction: column; padding: 27px 16px 19px; z-index: 3; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--display); font-size: 14px; width: max-content; letter-spacing: -.06em; }
.sidebar .brand { margin: 0 0 37px 9px; }
.brand-mark { display: inline-grid; place-items: center; width: 31px; height: 31px; border-radius: 10px; background: var(--accent); color: var(--accent-text); font: 25px/1 sans-serif; }
.sidebar-label { color: var(--faint); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; margin: 0 0 10px 11px; }
.sidebar nav { display: grid; gap: 4px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 11px; padding: 10px 11px; min-height: 43px; text-align: left; color: var(--muted); border: 1px solid transparent; background: transparent; border-radius: 10px; }
.nav-item:hover { background: #231e2b; color: var(--text); }
.nav-item[aria-current="page"] { color: var(--accent); background: #24281c; border-color: #384126; }
.icon { flex: 0 0 20px; font: 20px/1.05 "Segoe UI Symbol", sans-serif; text-align: center; }
.side-support { margin-top: auto; }
.workspace { margin-left: 224px; }
.topbar { height: 71px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 0 clamp(19px, 3.1vw, 48px); border-bottom: 1px solid var(--border); }
.top-name { font-size: 14px; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 17px; }
.stand-label { display: inline-flex; gap: 7px; align-items: center; color: var(--faint); white-space: nowrap; font-size: 12px; }
.stand-label span { width: 6px; height: 6px; border-radius: 100%; background: #ad95fc; }
.balance { border: 1px solid var(--border); border-radius: 11px; background: var(--surface); color: var(--text); padding: 7px 11px; min-height: 38px; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.balance span { color: var(--accent); }
.mobile-brand, #mobile-navigation { display: none; }
main { max-width: 1510px; margin: auto; padding: 29px clamp(19px, 3.1vw, 48px) 55px; outline: none; }
.page-heading { margin-bottom: 23px; }
.page-heading p { margin-top: 9px; max-width: 670px; }
.dashboard { display: grid; grid-template-columns: minmax(0,1fr); gap: 24px; }
.hero { position: relative; isolation: isolate; display: flex; align-items: end; min-height: 304px; padding: 25px 27px; overflow: hidden; border-radius: 19px; border: 1px solid #47354e; background: #261b2b; }
.hero::before { content: ""; position: absolute; z-index: -2; inset: 0 0 0 22%; background: url("/assets/stepa.jpg") center 38% / cover no-repeat; mask-image: linear-gradient(90deg, transparent, black 25%); }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg,#211629 4%,rgba(34,23,43,.95) 23%,rgba(28,22,33,.44) 64%,rgba(18,15,25,.08)),linear-gradient(0deg,rgba(18,14,23,.72),transparent 54%); }
.hero-content { max-width: 395px; }
.hero h2 { margin: 13px 0 9px; max-width: 340px; font-size: clamp(23px, 3.2vw, 37px); }
.hero p { color: #e4dce9; max-width: 300px; }
.hero .btn { margin-top: 20px; }
.tag { display: inline-flex; align-items: center; gap: 6px; width: max-content; border-radius: 6px; padding: 4px 8px; font-size: 11px; font-weight: 600; background: #292638; color: #e4d8fa; }
.hero .tag { background: #322640; color: #f0e2ff; border: 1px solid #624c72; }
.hero .tag span { color: #d0a7ff; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 9px; background: var(--raised); color: var(--text); font-weight: 600; text-align: center; }
.btn:hover { border-color: #7b718f; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: #d1ff6b; border-color: #d1ff6b; }
.btn.quiet { background: transparent; }
.btn.danger { color: #ffacac; }
.btn.compact { min-height: 35px; padding: 6px 10px; font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.panel { min-width: 0; border: 1px solid var(--border); background: var(--surface); border-radius: 16px; padding: 18px; }
.level-chip { background: #2c351b; color: var(--accent); }
.level-overview .progress { margin-top: 8px; }
.progress { width: 100%; height: 6px; border-radius: 99px; overflow: hidden; background: #383244; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.progress-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px; font-size: 11px; color: var(--muted); margin-top: 6px; }
.quick-links { display: grid; gap: 2px; }
.quick-links button { min-height: 44px; padding: 9px 4px; border: 0; color: var(--muted); background: transparent; display: flex; justify-content: space-between; text-align: left; }
.quick-links button:hover { color: var(--accent); }
.library { min-width: 0; }
.library-heading { display: flex; align-items: end; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 13px; }
.filter { padding: 5px 10px; min-height: 35px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 13px; }
.filter[aria-pressed="true"] { color: var(--text); background: #32293d; border-color: #554561; }
.cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.library-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
.library-grid .card { display: flex; flex-direction: column; }
.library-grid .card-body { flex: 1; grid-template-rows: auto 1fr auto; }
.cover-link { position: absolute; inset: 0; z-index: 1; }
.cover-link:focus-visible { outline-offset: -4px; }
.cover-preview { width: 100%; height: 100%; border: 0; padding: 0; background: transparent; }
.cover-play { position: absolute; top: 50%; left: 50%; translate: -50% -50%; display: grid; place-items: center; width: 40px; height: 40px; padding-left: 2px; border-radius: 50%; color: #fff; background: #14111bd9; }
.cover-label { pointer-events: none; }
.card { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: var(--surface); min-width: 0; }
.cover { position: relative; aspect-ratio: 1.21; background: #30263a; }
.cover img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: var(--position,center); }
.cover::after { pointer-events: none; content: ""; position: absolute; inset: 0; background: linear-gradient(0deg,#100e16aa,transparent 30%); }
.cover-label { position: absolute; left: 8px; bottom: 8px; z-index: 1; background: #14111bde; color: #fff; border-radius: 5px; padding: 2px 5px; font-size: 11px; }
.save { position: absolute; z-index: 1; top: 7px; right: 7px; width: 34px; height: 34px; border: 1px solid #ffffff38; border-radius: 8px; color: white; background: #15121bd9; font-size: 18px; }
.save[aria-pressed="true"] { color: var(--accent); }
.card-body { padding: 10px; display: grid; gap: 6px; }
.card-body h3 { font-size: 14px; }
.card-body p { font-size: 12px; }
.card-body .btn { width: 100%; justify-content: space-between; margin-top: 3px; }
.card-body .btn span:last-child { color: var(--accent); white-space: nowrap; }
.card-body .client-view, .template-sharing .btn { justify-content: center; }
.template-sharing { display: grid; gap: 6px; min-width: 0; }
.template-address { display: block; overflow: hidden; padding: 3px 4px; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12px; }
.template-address:hover { color: var(--accent); }
.template-sharing .btn span { color: inherit; }
.share-mobile { display: none; }
.stack { display: grid; gap: 13px; }
.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.narrow { max-width: 770px; }
.panel p + p { margin-top: 7px; }
.panel h2, .panel h3 { margin-bottom: 7px; }
.demo-note { color: var(--faint); font-size: 12px; }
.tools { display: grid; gap: 12px; }
.tools .tabs { margin: 0; }
form { display: grid; gap: 13px; }
label { display: grid; gap: 5px; color: var(--text); }
textarea, select, input[type="text"], input[type="number"] { color: var(--text); width: 100%; min-width: 0; background: #120f18; border: 1px solid #453b51; border-radius: 9px; padding: 10px; }
textarea { resize: vertical; min-height: 83px; }
.upload { position: relative; padding: 12px; min-height: 84px; display: flex; flex-wrap: wrap; align-items: center; gap: 11px; border: 1px dashed #655478; border-radius: 10px; background: #201a2a; cursor: pointer; }
.upload:focus-within { outline: 2px solid var(--accent); }
.upload img { width: 54px; height: 54px; border-radius: 7px; object-fit: cover; }
.upload input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.upload-icon { color: var(--accent); background: #2d3620; border-radius: 9px; padding: 7px 11px; font-size: 19px; }
.upload-text { min-width: 0; flex: 1; }
.upload-text span { display: block; color: var(--muted); overflow-wrap: anywhere; font-size: 12px; }
.form-price { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details { border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; }
summary { cursor: pointer; color: var(--muted); }
details p { margin-top: 7px; }
.work-cards { max-width: 1000px; }
.work-cards .cover { aspect-ratio: 1.45; }
.work-cards .card-body .btn { justify-content: center; }
.steps { margin: 8px 0 0; padding-left: 19px; color: var(--muted); }
.steps li { margin: 6px 0; }
.level-card { display: flex; flex-direction: column; gap: 8px; }
.level-card[aria-current="true"] { border-color: #596633; }
.level-card .btn { margin-top: auto; }
.level-card b { color: var(--accent); font-size: 26px; }
.level-prices { display: grid; gap: 10px; margin: 8px 0; padding: 14px 0; border-block: 1px solid var(--border); }
.level-prices div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.level-prices dt { color: var(--muted); }
.level-prices dd { margin: 0; font-weight: 650; }
.workspace-filters { margin-bottom: 18px; flex-wrap: wrap; }
.own-template-cover { width: 100%; height: 190px; object-fit: cover; border-radius: 9px; }
.template-status.draft { background: #302b3c; color: #ddd2ef; }
dialog { color: var(--text); width: min(510px,calc(100% - 26px)); max-height: calc(100dvh - 34px); padding: 0; background: var(--surface); border: 1px solid #514561; border-radius: 17px; }
dialog::backdrop { background: #0a0811b8; backdrop-filter: blur(3px); }
.dialog-inner { padding: 20px; }
.dialog-title { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 12px; }
.dialog-title p { margin-top: 4px; }
.dialog-close { flex: 0 0 37px; height: 37px; border-radius: 8px; border: 1px solid var(--border); background: var(--raised); color: var(--text); font-size: 21px; }
.result-media { display: block; width: 100%; max-height: 330px; object-fit: contain; background: #120f18; border-radius: 10px; }
.back-link { display: inline-block; margin-bottom: 10px; color: var(--muted); }
.back-link:hover { color: var(--accent); }
.client-template { max-width: 900px; min-width: 0; overflow-wrap: anywhere; }
.template-detail { display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr); gap: 14px; align-items: start; }
.template-example { display: grid; gap: 13px; }
.template-example-cover { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 9px; background: #120f18; }
.template-example-cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--position,center); }
.template-example-label, .template-repeat form { min-width: 0; }
.template-example-label h2, .template-repeat h2 { font-size: clamp(16px,2vw,21px); }
.template-repeat h2 { margin-bottom: 14px; }
.sample-photo { justify-self: start; }
.repeat-checkout { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; align-items: center; padding-top: 10px; border-top: 1px solid var(--border); }
.repeat-price { display: grid; color: var(--muted); font-size: 12px; }
.repeat-price strong { color: var(--text); font: 650 21px/1.3 var(--display); white-space: nowrap; }
.reference-player { display: block; width: 100%; max-height: 360px; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 9px; background: #120f18; }
.reference { gap: 6px; }
.reference h3 { margin-bottom: 0; }
.reference-fields { margin: 0; min-width: 0; border: 1px solid var(--border); border-radius: 9px; padding: 9px; }
.reference-fields input { max-width: 100%; }
.editor-video-settings { margin-bottom: 12px; }
.editor-references { padding: 11px; }
.editor-references legend { padding: 0 5px; font-weight: 600; }
.editor-references > p { font-size: 13px; }
.editor-reference-sources { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.editor-reference-sources > label { flex: 1 1 190px; }
.reference-upload { position: relative; padding-bottom: 3px; }
.upload-video { cursor: pointer; }
.upload-video:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.upload-video:has(input:disabled) { opacity: .48; cursor: not-allowed; }
.upload-video input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.editor-ref-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.editor-ref { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; padding: 7px; background: #211a2b; border-radius: 9px; }
.editor-ref video { width: 104px; height: 78px; background: #110e18; border-radius: 6px; object-fit: contain; }
.editor-ref-name { flex: 1 1 100px; min-width: 0; }
.editor-ref-name small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.video-problem { color: #ffb3b3; }
.prompt-copy { white-space: pre-wrap; overflow-wrap: anywhere; }
.author-toolbar, .author-card-head, .author-metrics { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.author-toolbar { margin-bottom: 14px; }
.own-submissions { margin-top: 24px; }
.author-card-head h3 { margin-bottom: 0; overflow-wrap: anywhere; min-width: 0; }
.author-metrics { color: var(--muted); font-size: 13px; }
.author-metrics strong, .author-toolbar strong { color: var(--accent); }
.template-status.published { color: var(--accent); background: #2c351b; }
.template-status.changes { color: #ffd3a2; background: #422c20; }
.moderator-note { overflow-wrap: anywhere; }
.toast { position: fixed; z-index: 10; bottom: 21px; right: 20px; max-width: min(390px,calc(100% - 36px)); border: 1px solid #514561; border-radius: 10px; padding: 10px 14px; background: #292333; color: var(--text); box-shadow: 0 9px 40px #0007; }
.empty { border-style: dashed; }
.preview-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 10px; color: var(--muted); font-size: 12px; }
.lifecycle-panel { display: grid; gap: 17px; min-width: 0; }
.lifecycle-panel h2, .lifecycle-panel p { margin: 0; }
.state-symbol { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: #30243c; color: var(--accent); font-size: 28px; }
.is-busy { animation: state-pulse 1.6s ease-in-out infinite alternate; }
@keyframes state-pulse { from { opacity: .45; } to { opacity: 1; } }
.checkout-summary { margin: 0; display: grid; gap: 10px; padding: 16px 0; border-block: 1px solid var(--border); }
.checkout-summary > div { display: flex; justify-content: space-between; gap: 18px; min-width: 0; }
.checkout-summary dt { color: var(--muted); }
.checkout-summary dd { text-align: right; margin: 0; overflow-wrap: anywhere; }
.task-steps { display: grid; gap: 10px; padding-left: 22px; color: var(--muted); font-size: 14px; }
.task-steps .done, .task-steps [aria-current] { color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .is-busy { animation: none; } }
@media (max-width: 1200px) {
  .sidebar { width: 189px; }
  .workspace { margin-left: 189px; }
  .dashboard { gap: 15px; }
  .hero { padding: 20px; }
}
@media (max-width: 980px) {
  .library-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .template-detail { grid-template-columns: minmax(0,1fr); }
  .template-example { grid-template-columns: minmax(0,130px) minmax(0,1fr); align-items: center; }
}
@media (max-width: 690px) {
  .sidebar { display: none; }
  .workspace { margin-left: 0; }
  .topbar { height: 59px; padding: 0 13px; }
  .top-name { display: none; }
  .mobile-brand { display: inline-flex; gap: 6px; font-size: 12px; }
  .brand-mark { width: 27px; height: 27px; border-radius: 8px; font-size: 21px; }
  .top-actions { gap: 8px; }
  .stand-label { font-size: 10px; gap: 4px; }
  .balance { font-size: 12px; min-height: 34px; gap: 4px; padding: 5px 6px; }
  main { padding: 17px 13px calc(75px + env(safe-area-inset-bottom)); }
  h1 { font-size: 28px; }
  .page-heading { margin-bottom: 17px; }
  .page-heading p { font-size: 13px; }
  .hero { min-height: 257px; padding: 15px; }
  .hero h2 { max-width: 220px; }
  .hero p { max-width: 210px; font-size: 13px; }
  .hero::before { inset: 0 0 0 16%; background-position: center 39%; }
  .hero::after { background: linear-gradient(90deg,#211629 0%,rgba(30,19,36,.81) 33%,rgba(28,22,33,.22) 100%),linear-gradient(0deg,rgba(18,14,23,.63),transparent 54%); }
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .library-heading .btn { white-space: nowrap; }
  .split { grid-template-columns: minmax(0,1fr); }
  .panel { padding: 13px; }
  .reference-player { max-height: 280px; }
  .template-address, .share-desktop { display: none; }
  .share-mobile { display: inline; }
  .template-example { grid-template-columns: minmax(0,100px) minmax(0,1fr); gap: 10px; }
  #mobile-navigation { position: fixed; z-index: 3; inset: auto 0 0; display: flex; justify-content: space-around; padding: 4px 2px calc(4px + env(safe-area-inset-bottom)); background: #17131fee; backdrop-filter: blur(12px); border-top: 1px solid var(--border); }
  #mobile-navigation .nav-item { flex: 1 1 auto; width: auto; flex-direction: column; align-items: center; gap: 4px; min-height: 46px; justify-content: center; padding: 4px 2px; white-space: nowrap; font-size: clamp(9px,2.55vw,10px); }
  #mobile-navigation .icon { flex: 0 0 auto; font-size: 16px; }
  .toast { bottom: calc(62px + env(safe-area-inset-bottom)); }
}
@media (min-width: 520px) and (max-width: 690px) {
  .library-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 400px) {
  .repeat-checkout { grid-template-columns: minmax(0,1fr); }
  .repeat-price { grid-template-columns: minmax(0,1fr) auto; gap: 6px; align-items: center; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

