/* Хвоя — winter catalogue: deep pine, gold hairlines, ruby accents, dense UI. */
:root {
  color-scheme: light;
  --pine-950:#0B1A14; --pine-900:#10241C; --pine-800:#173328; --pine-700:#21463A;
  --cream:#F6EEDC; --cream-dim:#CFC4AC;
  --ivory:#F3ECDD; --ivory-2:#EAE1CD; --paper:#FBF7EE;
  --ink:#14211B; --ink-mute:#5B6559;
  --gold:#D9B26F; --gold-hi:#F1D9A4; --gold-lo:#9C7638;
  --ruby:#8E1F2B; --ruby-hi:#A8323A;
  --line-dark:rgba(217,178,111,.22); --line-light:rgba(20,33,27,.14);
  --glass:rgba(16,36,28,.62);
  --display:'Noto Serif Display', Georgia, serif;
  --ui:'Onest', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --ease:cubic-bezier(.2,.7,.1,1);
  --r-sm:6px; --r:10px; --r-lg:14px;
  --section:clamp(48px, 6vw, 88px);
  --float:inset 0 1px 0 rgba(241,217,164,.08), 0 24px 48px -24px rgba(5,12,9,.7);
  font: 400 clamp(.95rem, 1vw, 1.02rem)/1.55 var(--ui);
  color: var(--ink);
  background: var(--ivory);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--ivory); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .5; }
h1, h2, h3, p { margin: 0; }
code { font: .88em ui-monospace, 'SF Mono', Menlo, monospace; background: rgba(20,33,27,.07); padding: .1em .35em; border-radius: 4px; }
.dark code { background: rgba(246,238,220,.1); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--gold); color: var(--ink); border-radius: var(--r-sm); }
.skip:focus { top: 12px; }
.wrap { width: min(1200px, 100% - 48px); margin-inline: auto; }

/* Surfaces */
.dark { background: var(--pine-900); color: var(--cream); }
.ivory { background: var(--ivory); }
.grain, .grain-light { position: relative; isolation: isolate; }
.grain::after, .grain-light::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.grain-light::after { opacity: .04; }
.glass {
  background: var(--glass); border: 1px solid var(--line-dark); border-radius: var(--r-lg);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); box-shadow: var(--float);
}

/* Type */
h1, h2 { font-family: var(--display); font-weight: 500; }
h1 { font-size: clamp(2.6rem, 5.6vw, 5.2rem); line-height: .92; font-stretch: 78%; letter-spacing: -.02em; }
h2 { font-size: clamp(2rem, 3.6vw, 3.2rem); line-height: 1; font-stretch: 82%; letter-spacing: -.015em; }
h1 em, h2 em { font-style: italic; font-weight: 400; color: var(--gold); }
.ivory h2 em { color: var(--gold-lo); }
h3 { font: 600 clamp(1.02rem, 1.3vw, 1.15rem)/1.25 var(--ui); letter-spacing: -.01em; }
.label { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font: 600 .7rem/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.ivory .label { color: var(--gold-lo); }
.rule { width: 40px; height: 1px; background: currentColor; opacity: .8; }
.lead, .section-lead { color: var(--cream-dim); font-size: clamp(1rem, 1.15vw, 1.1rem); max-width: 34em; }
.ivory .section-lead { color: var(--ink-mute); }
.hint { color: var(--ink-mute); font-size: .8rem; line-height: 1.4; }
.dark .hint { color: var(--cream-dim); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--r-sm); font: 600 .92rem/1.2 var(--ui); text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s;
}
.btn-sm { min-height: 36px; padding: 6px 13px; font-size: .84rem; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 1rem; }
.btn-ruby { color: #fff6ea; background: linear-gradient(180deg, var(--ruby-hi), var(--ruby)); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); border-color: var(--ruby); border-bottom-color: var(--gold-lo); }
.btn-ruby:hover { transform: translateY(-1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 22px -10px rgba(142,31,43,.8); }
.btn-gold { color: var(--ink); background: linear-gradient(180deg, var(--gold-hi), var(--gold)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); border-color: var(--gold-lo); }
.btn-gold:hover { transform: translateY(-1px); }
.btn-ghost, .btn-line { border-color: var(--line-dark); background: linear-gradient(90deg, rgba(217,178,111,.18) 50%, transparent 50%) right / 201% 100% no-repeat; color: var(--cream); }
.btn-ghost:hover, .btn-line:hover { background-position: left; }
.ivory .btn-line, .dialog .btn-line, .studio-panel .btn-line { color: var(--ink); border-color: var(--line-light); }
.dark .studio-panel .btn-line { color: var(--cream); border-color: var(--line-dark); }
.link { border: 0; background: none; padding: 2px 0; font-weight: 600; font-size: .86rem; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .25em; }
.link-arrow { border: 0; background: none; padding: 0; font: 600 .86rem var(--ui); color: inherit; text-decoration: none; white-space: nowrap; }
.link-arrow::after { content: ' →'; color: var(--ruby-hi); transition: margin .2s var(--ease); }
.dark .link-arrow::after { color: var(--gold); }
.link-arrow:hover::after { margin-left: 4px; }

/* Header and hero */
.top { overflow: clip; background: radial-gradient(60% 46% at 50% 0, rgba(241,217,164,.12), transparent 70%), radial-gradient(80% 70% at 85% 60%, #1c3d30 0, transparent 60%), var(--pine-900); }
.hero-garland { position: relative; z-index: 5; min-height: 100px; }
.nav { position: relative; z-index: 4; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; padding: 10px 0 14px; border-bottom: 1px solid var(--line-dark); }
.brand { display: inline-flex; align-items: center; gap: 8px; font: italic 500 1.75rem/1 var(--display); font-stretch: 80%; text-decoration: none; letter-spacing: -.02em; }
.brand img { width: 22px; height: 26px; object-fit: contain; }
.nav-links { display: flex; gap: 26px; justify-self: center; }
.nav-links a { text-decoration: none; font-size: .88rem; color: var(--cream-dim); }
.nav-links a:hover { color: var(--cream); }
.nav-actions { display: flex; gap: 8px; justify-self: end; }
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(340px, 5fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding: clamp(28px, 4vw, 48px) 0 clamp(40px, 5vw, 64px); }
.hero h1 { margin-bottom: 20px; }
.try { display: flex; gap: 6px; max-width: 540px; margin-top: 26px; padding: 5px; border: 1px solid var(--line-dark); border-radius: var(--r); background: rgba(246,238,220,.06); }
.try input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 12px; color: var(--cream); outline: none; }
.try input::placeholder { color: rgba(246,238,220,.45); }
.try:focus-within { border-color: var(--gold); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0; margin: 22px 0 8px; list-style: none; font-size: .86rem; color: var(--cream-dim); }
.facts b { font: 500 1.35rem/1 var(--display); font-stretch: 80%; color: var(--gold-hi); font-variant-numeric: tabular-nums; margin-right: 3px; }
.trust { font-size: .8rem; color: var(--cream-dim); opacity: .85; }

/* Remote */
.remote { padding: 14px 16px 12px; display: grid; gap: 12px; }
.remote-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line-dark); }
.remote-head h2 { font: italic 500 1.35rem/1 var(--display); font-stretch: 82%; }
.demo-toggle { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-dark); background: transparent; color: var(--cream-dim); border-radius: 999px; padding: 4px 10px; font-size: .74rem; font-weight: 600; }
.demo-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.demo-toggle[aria-pressed=false] .demo-dot { background: transparent; box-shadow: inset 0 0 0 1px var(--cream-dim); }
.demo-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; overflow: hidden; }
.demo-progress i { display: block; height: 100%; width: 0; background: var(--gold); }
.remote-label { display: block; margin-bottom: 6px; font: 600 .66rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-dim); }
.remote-label small { text-transform: none; letter-spacing: 0; font-weight: 500; opacity: .75; }
.remote-looks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.remote-looks button { display: grid; gap: 0; padding: 0; overflow: hidden; border: 1px solid var(--line-dark); border-radius: var(--r-sm); background: rgba(11,26,20,.4); color: var(--cream-dim); font-size: .74rem; font-weight: 600; line-height: 1.1; text-align: left; }
.remote-looks .look-mini { border-radius: 0; }
.look-name { padding: 6px 8px 7px; }
.remote-label-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.remote-label-row .remote-label { margin-bottom: 0; }
.snow-switch { display: inline-flex; padding: 2px; border: 1px solid var(--line-dark); border-radius: 999px; background: rgba(11,26,20,.5); }
.snow-switch button { border: 0; background: transparent; color: var(--cream-dim); padding: 4px 11px; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.snow-switch button[aria-pressed=true] { background: var(--cream); color: var(--ink); }
.remote-firs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
.remote-firs button { position: relative; height: 38px; border: 1px solid var(--line-dark); border-radius: var(--r-sm); background: rgba(11,26,20,.4) center 20% / 180% auto no-repeat; color: var(--cream); font-size: .6rem; font-weight: 600; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 2px; text-shadow: 0 1px 3px #000; overflow: hidden; }
.remote-split { display: grid; grid-template-columns: auto 1fr; gap: 16px; }
.remote-lights, .remote-colors { display: flex; flex-wrap: wrap; gap: 4px; }
.remote-lights button { width: 32px; height: 28px; border: 1px solid var(--line-dark); border-radius: var(--r-sm); background: rgba(11,26,20,.5); display: grid; place-items: center; padding: 0; }
.remote-colors button { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-dark); padding: 0; background: conic-gradient(var(--c1) 0 25%, var(--c2) 0 50%, var(--c3) 0 75%, var(--c4) 0); }
:is(.remote-looks, .remote-firs, .remote-lights, .remote-colors) button[aria-pressed=true] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px -4px var(--gold); color: var(--cream); }
:is(.remote-looks, .remote-firs, .remote-lights, .remote-colors) button:hover { border-color: rgba(217,178,111,.6); }
.playlist { list-style: none; margin: 0; padding: 0; max-height: 196px; overflow: auto; scrollbar-width: thin; scrollbar-color: var(--line-dark) transparent; border-top: 1px solid var(--line-dark); }
.playlist button { display: grid; grid-template-columns: 26px 1fr auto 26px; align-items: center; gap: 8px; width: 100%; padding: 7px 4px; border: 0; border-bottom: 1px solid rgba(217,178,111,.1); background: transparent; color: var(--cream); text-align: left; font-size: .86rem; }
.playlist button:hover { background: rgba(246,238,220,.04); }
.pl-n { font: .72rem ui-monospace, Menlo, monospace; color: var(--gold); opacity: .8; }
.pl-time { font: .72rem ui-monospace, Menlo, monospace; color: var(--cream-dim); font-variant-numeric: tabular-nums; }
.pl-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-dark); font-size: .6rem; color: var(--gold); }
.playlist button[aria-pressed=true] { color: var(--gold-hi); }
.playlist button[aria-pressed=true] .pl-icon { background: var(--ruby); border-color: var(--ruby-hi); color: #fff; }
.eq-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.eq-bars i { width: 3px; height: 4px; background: var(--gold); border-radius: 1px; animation: eq .8s ease-in-out infinite alternate; }
.eq-bars i:nth-child(2) { animation-delay: -.27s; } .eq-bars i:nth-child(3) { animation-delay: -.53s; }
@keyframes eq { to { height: 12px; } }
.remote-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line-dark); }

/* Light icons (remote and studio) */
.light-icon { display: inline-flex; align-items: center; gap: 3px; }
.light-icon i { width: 4px; height: 4px; border-radius: 50%; background: #fff2b8; box-shadow: 0 0 5px #f4c778; }
.light-icon i:nth-child(2) { background: #ff8f98; box-shadow: 0 0 5px #ff6d7a; }
.light-icon i:nth-child(3) { background: #9fe8c4; box-shadow: 0 0 5px #6fdcaa; }
.light-icon-retro i { width: 5px; height: 7px; border-radius: 45% 45% 55% 55%; }
.light-icon-frost i { width: 3px; height: 3px; background: #fff; }
.light-icon-capsule i { width: 3px; height: 8px; border-radius: 2px; rotate: 25deg; }
.light-icon-rain i { width: 1.5px; height: 14px; border-radius: 0; background: linear-gradient(transparent, #ffe9b0); box-shadow: none; }
.light-icon-lantern i { width: 6px; height: 8px; border-radius: 1px; border: 1px solid #b78a54; }
.light-icon-none i { background: transparent; box-shadow: inset 0 0 0 1px var(--cream-dim); }

/* Sections */
section[id] { scroll-margin-top: 16px; }
.section-head { margin-bottom: 28px; }
.section-head h2 { margin-bottom: 10px; }
.steps { padding: 36px 0; border-bottom: 1px solid var(--line-light); }
.step-row { display: grid; grid-template-columns: repeat(3, 1fr); margin: 0; padding: 0; list-style: none; }
.step-row li { padding: 4px 28px; border-left: 1px solid var(--line-light); }
.step-row li:first-child { padding-left: 0; border-left: 0; }
.step-n { display: block; font: italic 400 2.6rem/1 var(--display); font-stretch: 80%; color: var(--gold-lo); margin-bottom: 8px; }
.step-row b { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.step-row p { color: var(--ink-mute); font-size: .92rem; }
.features { padding: var(--section) 0; }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line-light); }
.feature-grid li { padding: 20px 20px 22px 0; border-bottom: 1px solid var(--line-light); }
.feature-grid li:not(:nth-child(4n+1)) { padding-left: 20px; border-left: 1px solid var(--line-light); }
.f-n { display: block; font: .72rem ui-monospace, Menlo, monospace; color: var(--gold-lo); margin-bottom: 10px; }
.feature-grid b { display: block; font-size: 1rem; margin-bottom: 6px; }
.feature-grid p { color: var(--ink-mute); font-size: .9rem; }

/* Studio */
.studio-section { padding: var(--section) 0; background: radial-gradient(70% 50% at 20% 0, #1a3a2d, transparent 70%), var(--pine-900); }
.studio { display: grid; grid-template-columns: minmax(0, 8fr) minmax(330px, 4.2fr); border: 1px solid var(--line-dark); border-radius: var(--r-lg); overflow: hidden; background: var(--pine-950); box-shadow: var(--float); }
.studio-stage { min-width: 0; padding: 18px; }
.stage-form { display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line-dark); border-radius: var(--r); background: rgba(246,238,220,.05); }
.stage-form input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 10px; color: var(--cream); outline: none; }
.stage-form input::placeholder { color: rgba(246,238,220,.45); }
.stage-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 10px; }
.stage-actions { display: flex; gap: 14px; margin-left: auto; }
.upload { position: relative; cursor: pointer; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.stage-status { color: var(--gold-hi); font-size: .86rem; margin-bottom: 8px; }
.stage-status:empty { display: none; }
.frame { border: 1px solid rgba(246,238,220,.16); border-radius: var(--r); overflow: hidden; background: #f4f4f0; margin-inline: auto; transition: max-width .3s var(--ease); max-width: 100%; }
.frame.is-mobile { max-width: 330px; }
.frame-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 8px 12px; background: #e9e6dc; color: #56604f; font: .74rem ui-monospace, Menlo, monospace; }
.frame-dots { display: flex; gap: 5px; }
.frame-dots i { width: 9px; height: 9px; border-radius: 50%; background: #cfc8b6; }
.frame-site { position: relative; isolation: isolate; overflow: hidden; background: var(--site-top, #f6f6f2); min-height: 220px; }
.frame-garland { position: relative; z-index: 3; }
.frame-site:not([data-placement=push]) .frame-garland { position: absolute; left: 0; right: 0; top: var(--offset, 0); }
.frame-site[data-placement=below] .frame-garland { top: calc(13% + var(--offset, 0px)); }
.frame-site[data-placement=push] .frame-garland { margin-top: var(--offset, 0); }
.frame-shot { width: 100%; height: auto; max-height: 440px; object-fit: cover; object-position: top; }
.frame.is-mobile .frame-shot { max-height: 520px; }
.frame-schema { min-height: 260px; background: #f4f4f0; }
.schema-head { display: flex; justify-content: space-between; padding: 22px 5%; background: #fff; color: #1d2a22; font-size: .78rem; }
.schema-body { padding: 44px 7%; }
.schema-body i { display: block; height: 14px; width: min(80%, 240px); margin-bottom: 12px; border-radius: 4px; background: #e2e3db; }
.schema-body i:nth-child(2) { width: 58%; } .schema-body i:nth-child(3) { width: 36%; }
.studio-panel { min-width: 0; border-left: 1px solid var(--line-dark); background: var(--pine-900); display: flex; flex-direction: column; max-height: 760px; }
.buy-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 14px 18px; }
.buy-bar b { display: block; font: 500 1.35rem/1.1 var(--display); font-stretch: 82%; }
.buy-bar small { color: var(--cream-dim); font-size: .84rem; }

/* Studio controls (shared with the cabinet) */
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; padding: 0 10px; border-bottom: 1px solid var(--line-dark); flex: none; }
.tabs button { flex: none; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--cream-dim); padding: 13px 9px 11px; font-size: .84rem; font-weight: 600; }
.tabs button[aria-selected=true] { color: var(--cream); border-bottom-color: var(--gold); }
.tab-panels { overflow-y: auto; padding: 14px 16px 18px; scrollbar-width: thin; scrollbar-color: var(--line-dark) transparent; }
.tab-panel { display: grid; gap: 14px; }
.field { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: 8px; }
.field.muted { opacity: .4; pointer-events: none; }
.field legend { padding: 0; margin-bottom: 8px; font: 600 .68rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--cream-dim); }
.chip { border: 1px solid var(--line-dark); background: rgba(246,238,220,.03); color: var(--cream-dim); border-radius: var(--r-sm); padding: 7px 10px; font-size: .8rem; font-weight: 600; line-height: 1.15; }
.chip:hover { border-color: rgba(217,178,111,.55); color: var(--cream); }
.chip[aria-pressed=true] { border-color: var(--gold); color: var(--cream); background: rgba(217,178,111,.1); box-shadow: inset 0 0 0 1px var(--gold); }
.segmented, .chips { display: flex; flex-wrap: wrap; gap: 5px; }
.look-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.look-grid .chip { display: grid; gap: 2px; text-align: left; padding: 8px; }
.look-grid small { color: var(--cream-dim); font-weight: 500; font-size: .72rem; }
/* Mini garland for a look: drift under the fir, lights over it, toys hanging below */
.look-mini { position: relative; display: block; height: 54px; overflow: hidden; border-radius: 5px; background: radial-gradient(90% 120% at 50% 0, #1d3a2e, #0b1a14); }
.look-grid .look-mini { margin-bottom: 6px; }
.lm-drift { position: absolute; inset: 0 0 auto; height: 34px; background: url('/assets/snowdrift.webp') left -9px / auto 50px repeat-x; }
.drift-powder .lm-drift { background: url('/assets/snow-powder.webp') left -12px / auto 52px repeat-x; }
.drift-none .lm-drift { display: none; }
.lm-fir { position: absolute; inset: -4px 0 auto; height: 30px; background: var(--fir) left top / auto 34px repeat-x; }
.fir-snowy .lm-fir { inset: -3px 0 auto; height: 34px; background-size: auto 36px; }
.fir-sprig .lm-fir { inset: 2px 0 auto; height: 12px; background-size: auto 12px; }
.fir-feather .lm-fir { background-size: auto 30px; }
.lm-lights i { position: absolute; z-index: 1; width: 3px; height: 3px; border-radius: 50%; background: #fff8e6; box-shadow: 0 0 3px 1px var(--c), 0 0 6px 2px var(--c); }
.lm-toys { position: absolute; z-index: 2; inset: 12px 4% 0; display: flex; justify-content: space-between; }
.lm-toy { position: relative; display: block; padding-top: var(--drop); }
.lm-toy::before { content: ''; position: absolute; left: 50%; top: 0; width: 1px; height: var(--drop); background: #a98760; }
.lm-toy img { width: 15px; height: 18px; object-fit: contain; object-position: top; filter: drop-shadow(0 2px 2px rgba(0,0,0,.4)); }
.is-snowing::after { content: ''; position: absolute; inset: 0; z-index: 3; background: radial-gradient(circle, #fff 0 1.1px, transparent 1.6px) 3px 9px / 23px 19px, radial-gradient(circle, rgba(255,255,255,.8) 0 .8px, transparent 1.2px) 11px 2px / 31px 27px, radial-gradient(circle, rgba(255,255,255,.6) 0 .6px, transparent 1px) 17px 14px / 13px 29px; opacity: .45; }
.set-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.set-grid .chip { display: grid; justify-items: center; gap: 4px; padding: 7px 3px; font-size: .68rem; text-align: center; }
.set-grid img { width: 34px; height: 40px; object-fit: contain; }
.recipe { padding: 10px; border: 1px solid var(--line-dark); border-radius: var(--r); background: rgba(246,238,220,.03); display: grid; gap: 8px; }
.recipe-head { display: flex; justify-content: space-between; font-size: .8rem; color: var(--cream-dim); }
.recipe-head b { color: var(--cream); }
.minis { display: flex; gap: 4px; min-height: 34px; }
.minis img { flex: 1; min-width: 0; height: 34px; object-fit: contain; }
.fir-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.fir-grid .chip { display: grid; gap: 1px; padding: 0 0 7px; overflow: hidden; text-align: center; }
.fir-grid small { color: var(--cream-dim); font-weight: 500; font-size: .66rem; }
.fir-art { height: 42px; margin-bottom: 5px; background: #0d1f17 center 15% / 190% auto no-repeat; }
.light-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.light-grid .chip { display: flex; align-items: center; gap: 9px; text-align: left; }
.light-grid .light-icon { width: 30px; height: 22px; justify-content: center; border-radius: 4px; background: #0d1f17; flex: none; }
.palette-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.palette-grid .chip { display: flex; align-items: center; gap: 8px; text-align: left; }
.dots { display: inline-flex; gap: 3px; flex: none; }
.dots i { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(0,0,0,.2); }
.color-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
input[type=color] { width: 100%; height: 32px; padding: 2px; border: 1px solid var(--line-dark); border-radius: var(--r-sm); background: transparent; }
.range { display: grid; gap: 4px; font-size: .84rem; font-weight: 600; }
.range-head { display: flex; justify-content: space-between; }
.range output { color: var(--gold-hi); font-variant-numeric: tabular-nums; font-weight: 500; }
input[type=range] { width: 100%; accent-color: var(--gold); }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .86rem; }
.toggle small { display: block; color: var(--cream-dim); font-size: .74rem; font-weight: 400; margin-top: 1px; }
[role=switch] { appearance: none; position: relative; flex: none; width: 38px; height: 22px; margin: 0; border-radius: 999px; background: rgba(246,238,220,.18); cursor: pointer; transition: background .2s; }
[role=switch]::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
[role=switch]:checked { background: var(--gold-lo); }
[role=switch]:checked::after { transform: translateX(16px); }
.track-list { display: grid; border-top: 1px solid var(--line-dark); }
.track-row { display: grid; grid-template-columns: auto 1fr auto 28px; align-items: center; gap: 9px; padding: 7px 2px; border-bottom: 1px solid rgba(217,178,111,.1); font-size: .84rem; }
.track-row input { accent-color: var(--gold); width: 16px; height: 16px; }
.track-row small { color: var(--cream-dim); font: .72rem ui-monospace, Menlo, monospace; }
.track-play { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line-dark); background: transparent; color: var(--gold); font-size: .6rem; padding: 0; }
.track-play.on { background: var(--ruby); border-color: var(--ruby-hi); color: #fff; }
.inline { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: .84rem; }
.inline input[type=date] { width: auto; }
.color-pick { display: inline-flex; align-items: center; gap: 8px; }
.color-pick input { width: 40px; }
.placement-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.placement-grid .chip { display: grid; gap: 6px; text-align: left; font-size: .74rem; }
.placement-art { position: relative; display: block; height: 46px; border-radius: 4px; background: #e8e6dd; overflow: hidden; }
.placement-art b { position: absolute; left: 0; right: 0; height: 12px; background: #1d3b52; }
.placement-art i { position: absolute; left: 0; right: 0; height: 10px; background: repeating-linear-gradient(90deg, #2c6b47 0 6px, #3f8a5b 6px 12px); }
.placement-art i::after { content: ''; position: absolute; left: 6%; right: 6%; top: 9px; height: 6px; background: radial-gradient(circle, #c43b3b 2px, transparent 2.5px) 0 0 / 14px 6px repeat-x; }
.placement-art em { position: absolute; left: 10%; right: 30%; bottom: 8px; height: 4px; background: #c9c6ba; box-shadow: 0 -8px 0 #c9c6ba; }
.placement-push i { top: 0; } .placement-push b { top: 10px; }
.placement-overlay b { top: 0; } .placement-overlay i { top: 1px; }
.placement-below b { top: 0; } .placement-below i { top: 12px; }
.placement-fixed b { top: 0; } .placement-fixed i { top: 0; outline: 1px dashed #c43b3b; }
input[type=text], input[type=email], input[type=password], input:not([type]), textarea, select, input[type=date] {
  width: 100%; min-width: 0; min-height: 40px; padding: 8px 11px; border: 1px solid var(--line-light); border-radius: var(--r-sm); background: #fffdf8; color: var(--ink);
}
.dark :is(input[type=text], input[type=date], textarea, select) { background: rgba(246,238,220,.05); border-color: var(--line-dark); color: var(--cream); color-scheme: dark; }
.advanced { border-top: 1px solid var(--line-dark); padding-top: 10px; }
.advanced summary { cursor: pointer; font-size: .82rem; font-weight: 600; color: var(--cream-dim); margin-bottom: 10px; }
.advanced[open] { display: grid; gap: 12px; }

/* Examples */
.examples { padding: var(--section) 0; }
.case-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.case { display: grid; text-decoration: none; border: 1px solid var(--line-light); border-radius: var(--r); overflow: hidden; background: var(--paper); transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.case:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -22px rgba(20,33,27,.5); }
.case-shot { display: block; height: 120px; overflow: hidden; background: #dfe3da; }
.case-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.case-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line-light); }
.case-meta small { color: var(--ink-mute); font-size: .78rem; text-align: right; }

/* Soon */
.soon { padding: var(--section) 0; }
.soon-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.soon-grid .section-head .btn { margin-top: 18px; }
.soon-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line-dark); }
.soon-list li { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--line-dark); display: grid; gap: 4px; }
.soon-list li:nth-child(even) { padding-left: 16px; border-left: 1px solid var(--line-dark); }
.soon-list b::after { content: 'скоро'; margin-left: 8px; padding: 2px 6px; border: 1px solid var(--line-dark); border-radius: 999px; font: 600 .6rem/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold); vertical-align: 2px; }
.soon-list span { color: var(--cream-dim); font-size: .88rem; }

/* Custom */
.custom { padding: var(--section) 0; }
.custom-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-light); }
.custom-list li { display: grid; grid-template-columns: 52px minmax(180px, 3fr) 6fr auto; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line-light); transition: background .2s; }
.custom-list li:hover { background: rgba(217,178,111,.08); }
.c-n { font: .74rem ui-monospace, Menlo, monospace; color: var(--gold-lo); padding-left: 4px; }
.custom-list b { font-size: 1.02rem; }
.custom-list span:not(.c-n) { color: var(--ink-mute); font-size: .92rem; }
.custom-list .link-arrow { padding-right: 6px; }

/* FAQ */
.faq { padding: var(--section) 0; border-top: 1px solid var(--line-light); }
.faq-grid { display: grid; grid-template-columns: 4fr 7fr; gap: clamp(24px, 4vw, 64px); }
.sticky { position: sticky; top: 24px; align-self: start; }
.sticky .btn { margin-top: 18px; }
.faq-list details { border-top: 1px solid var(--line-light); }
.faq-list details:last-child { border-bottom: 1px solid var(--line-light); }
.faq-list summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; font-weight: 600; cursor: pointer; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font: 400 1.3rem/1 var(--display); color: var(--gold-lo); transition: transform .2s var(--ease); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p { padding: 0 0 16px; color: var(--ink-mute); max-width: 44em; }

/* Final CTA and footer */
.final { padding: clamp(56px, 7vw, 96px) 0; text-align: left; background: radial-gradient(60% 80% at 80% 50%, #1f4335, transparent 70%), var(--pine-900); }
.final-inner { display: grid; justify-items: start; gap: 14px; }
.final p { color: var(--cream-dim); max-width: 36em; }
.footer { padding: 28px 0; background: var(--pine-950); border-top: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: auto 1fr 1fr auto; gap: 18px 40px; align-items: center; font-size: .86rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer nav a { color: var(--cream-dim); text-decoration: none; }
.footer nav a:hover { color: var(--cream); }
.footer .link { color: var(--cream-dim); text-decoration: none; font-weight: 400; font-size: inherit; }
.footer small { color: var(--cream-dim); opacity: .7; }

/* Dialogs */
.dialog { width: min(560px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; padding: 26px; border: 1px solid var(--line-light); border-radius: var(--r-lg); background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(5,12,9,.6); }
.dialog::backdrop { background: rgba(8,18,14,.72); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dialog-wide { width: min(1040px, calc(100% - 24px)); }
.dialog h2 { font-size: clamp(1.8rem, 4vw, 2.4rem); padding-right: 36px; margin-bottom: 8px; }
.dialog .lead { color: var(--ink-mute); margin-bottom: 16px; }
.dialog-close { position: absolute; right: 14px; top: 14px; width: 36px; height: 36px; border: 1px solid var(--line-light); border-radius: 50%; background: transparent; font-size: 1.3rem; line-height: 1; }
.dialog-actions { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; padding-top: 14px; margin-top: 14px; border-top: 1px solid var(--line-light); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 5px; font-size: .86rem; font-weight: 600; }
.form .hint a { color: inherit; }
.form-switch { font-size: .86rem; color: var(--ink-mute); }
.code-box { position: relative; display: block; margin: 12px 0; padding: 14px 16px; border-radius: var(--r); background: var(--pine-950); color: var(--gold-hi); font: .84rem/1.55 ui-monospace, Menlo, monospace; overflow-wrap: anywhere; }
.summary-box { display: grid; gap: 2px; padding: 12px 14px; margin: 12px 0; border-radius: var(--r); background: var(--ivory-2); }
.summary-box small { color: var(--ink-mute); }
.cms-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0 10px; }
.dialog .chip, .cab-card .chip { color: var(--ink-mute); border-color: var(--line-light); background: transparent; }
.dialog .chip[aria-pressed=true], .cab-card .chip[aria-pressed=true] { color: var(--ink); border-color: var(--gold-lo); box-shadow: inset 0 0 0 1px var(--gold-lo); background: rgba(217,178,111,.14); }
.cms-steps { margin: 0; padding-left: 1.2em; display: grid; gap: 5px; font-size: .9rem; }
.pay-box { display: grid; gap: 8px; padding: 14px; margin: 12px 0; border: 1px dashed var(--gold-lo); border-radius: var(--r); }

/* Toy editor */
.toy-preview { border-radius: var(--r); overflow: hidden; background: radial-gradient(ellipse at 50% 0, #21463a, #10241c); margin-bottom: 16px; min-height: 120px; }
.toy-editor { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.toy-editor h3 { margin-bottom: 8px; }
.toy-editor .segmented { margin-bottom: 8px; }
.toy-catalogue { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.toy-card { display: grid; justify-items: center; gap: 3px; padding: 7px 3px; border: 1px solid var(--line-light); border-radius: var(--r-sm); background: #fff; font-size: .7rem; font-weight: 600; text-align: center; }
.toy-card:hover { border-color: var(--gold-lo); }
.toy-card img { width: 44px; height: 48px; object-fit: contain; }
.toy-head { display: flex; justify-content: space-between; align-items: baseline; }
.count { color: var(--ink-mute); font-size: .82rem; font-variant-numeric: tabular-nums; }
.toy-recipe { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 5px; max-height: 330px; overflow: auto; }
.toy-slot { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 6px; padding: 4px; border: 1px solid var(--line-light); border-radius: var(--r-sm); background: #fff; font-size: .72rem; line-height: 1.15; }
.toy-slot img { width: 34px; height: 34px; object-fit: contain; }
.toy-slot small { display: block; color: var(--ink-mute); }
.toy-slot-actions { display: flex; gap: 2px; }
.toy-slot-actions button { width: 22px; height: 24px; border: 0; border-radius: 4px; background: var(--ivory-2); padding: 0; }

/* Responsive */
@media (max-width: 1080px) {
  .hero { grid-template-columns: 1fr; }
  .remote { max-width: 620px; }
  .studio { grid-template-columns: 1fr; }
  .studio-panel { border-left: 0; border-top: 1px solid var(--line-dark); max-height: none; }
  .tab-panels { max-height: 560px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid li:not(:nth-child(4n+1)) { padding-left: 0; border-left: 0; }
  .feature-grid li:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line-light); }
  .nav { grid-template-columns: 1fr auto; }
  .nav-links { display: none; }
}
@media (max-width: 760px) {
  .remote-firs { grid-template-columns: repeat(3, 1fr); }
  .wrap { width: calc(100% - 32px); }
  .step-row, .case-row, .soon-grid, .faq-grid, .soon-list { grid-template-columns: 1fr; }
  .step-row li { padding: 12px 0; border-left: 0; border-top: 1px solid var(--line-light); }
  .step-row li:first-child { border-top: 0; }
  .soon-list li:nth-child(even) { padding-left: 0; border-left: 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .feature-grid li:nth-child(even) { padding-left: 0; border-left: 0; }
  .custom-list li { grid-template-columns: 36px 1fr; gap: 4px 10px; }
  .custom-list span:not(.c-n), .custom-list .link-arrow { grid-column: 2; }
  .custom-list .link-arrow { justify-self: start; margin-top: 4px; }
  .sticky { position: static; }
  .try { flex-direction: column; }
  .try input { min-height: 42px; }
  .remote-split { grid-template-columns: 1fr; }
  .buy-bar { flex-direction: column; align-items: stretch; }
  .footer-grid { grid-template-columns: 1fr; }
  .toy-editor { grid-template-columns: 1fr; }
  .stage-actions { margin-left: 0; }
  .set-grid { grid-template-columns: repeat(3, 1fr); }
  .dialog { padding: 20px 16px; }
}
@media (max-width: 400px) {
  .nav-actions .btn-ghost { display: none; }
  .facts { gap: 4px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; scroll-behavior: auto !important; }
  .eq-bars i { animation: none; }
}
.form .toggle-check { display: flex; grid-template-columns: none; align-items: flex-start; gap: 9px; font-weight: 400 !important; }
.toggle-check input { margin-top: 3px; accent-color: var(--ruby); width: 16px; height: 16px; flex: none; }
.install { margin: 14px 0 4px; }
.install h3 { margin-bottom: 4px; }
.try input:not([type]), .stage-form input:not([type]) { min-height: 42px; border: 0; background: transparent; color: var(--cream); padding: 0 12px; }

/* Cabinet */
.cabinet-page { background: var(--ivory); min-height: 100vh; }
.cab-top { border-bottom: 1px solid var(--line-dark); }
.cab-bar { display: flex; align-items: center; gap: 16px; padding: 14px 0; }
.cab-title { font: 600 .7rem/1 var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.cab-user { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: .86rem; color: var(--cream-dim); }
.cab-user .link { color: var(--cream); }
.auth-wrap { display: grid; place-items: center; padding: clamp(40px, 8vw, 96px) 0; }
.auth-card { width: min(440px, 100%); padding: 28px; border: 1px solid var(--line-light); border-radius: var(--r-lg); background: var(--paper); box-shadow: 0 30px 60px -40px rgba(20,33,27,.5); }
.auth-card h1, .cab-head h1 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1; }
.cab-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 28px; padding: 28px 0 64px; align-items: start; }
.cab-side { position: sticky; top: 20px; display: grid; gap: 12px; }
.cab-side .remote-label { color: var(--ink-mute); }
.cab-sites { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.cab-sites button { width: 100%; display: grid; gap: 3px; justify-items: start; padding: 10px 12px; border: 1px solid var(--line-light); border-radius: var(--r-sm); background: var(--paper); text-align: left; }
.cab-sites button[aria-current=true] { border-color: var(--gold-lo); box-shadow: inset 0 0 0 1px var(--gold-lo); }
.cab-side .btn-line { color: var(--ink); border-color: var(--line-light); }
.cab-requests { display: grid; gap: 8px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line-light); }
.cab-request { display: grid; font-size: .84rem; }
.cab-request small { color: var(--ink-mute); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font: 600 .68rem/1.4 var(--ui); letter-spacing: .02em; }
.badge-trial { background: #f6e7c4; color: #7a5512; }
.badge-paid { background: #d9ecd9; color: #1f5a33; }
.badge-expired { background: #f3d6d4; color: #8e1f2b; }
.cab-main { min-width: 0; display: grid; gap: 16px; }
.cab-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; }
.cab-status { margin-top: 8px; color: var(--ink-mute); font-size: .9rem; }
.cab-head-side { display: grid; justify-items: end; gap: 4px; font-size: .86rem; }
.ok { color: #1f5a33; font-weight: 600; }
.warn { color: #8a5a0a; font-weight: 600; }
.cab-studio .studio-stage { background: var(--pine-950); }
.cab-publish { margin-top: 0; position: sticky; bottom: 12px; z-index: 5; color: var(--cream); background: var(--pine-900); }
.cab-publish .hint { display: block; color: var(--cream-dim); }
.cab-publish .link { color: var(--gold-hi); }
.cab-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; align-items: start; }
.cab-stack { display: grid; gap: 16px; }
.cab-card { padding: 18px; border: 1px solid var(--line-light); border-radius: var(--r-lg); background: var(--paper); display: grid; gap: 8px; justify-items: start; }
.cab-card .code-box { width: 100%; margin: 4px 0; }
.cab-card.danger summary { cursor: pointer; font-weight: 600; color: var(--ruby); }
@media (max-width: 900px) {
  .cab-layout, .cab-grid { grid-template-columns: 1fr; }
  .cab-side { position: static; }
  .cab-head-side { justify-items: start; }
}

/* Simple pages */
.doc { padding: clamp(32px, 6vw, 72px) 0; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 18px; }
.doc h2 { font-size: 1.5rem; margin: 28px 0 8px; }
.doc p, .doc li { color: var(--ink-mute); margin-bottom: 8px; }
