/* Конструктор магазинов: кабинет арендатора и админка платформы.
   Базовые стили (кнопки, шторки, поля) берутся из /ui/style.css и /ui/admin.css. */

#app { position: fixed; inset: 0; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.bld { max-width: 640px; margin: 0 auto; padding: calc(14px + var(--sat)) 16px calc(40px + var(--sab)); }

/* шапка */
.bld-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 0 18px; }
.bld-brand { display: flex; align-items: center; gap: 10px; min-width: 0; font: 800 19px/1 var(--display); letter-spacing: -.01em; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.bld-brand .mark { color: var(--accent-ink); }
.bld-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bld-brand.tap .mark { animation: tapn .28s var(--ease); }
.bld-top .top-actions { display: flex; gap: 2px; }

/* приветствие и шаги */
.hero { padding: 6px 2px 22px; }
.hero h1 { font: 800 clamp(28px, 8.5vw, 40px)/1.05 var(--display); letter-spacing: -.03em; }
.hero h1 em { font-style: normal; color: var(--accent-ink); }
.hero p { margin-top: 12px; color: var(--mute); max-width: 44ch; }
.steps3 { display: grid; gap: 10px; margin: 22px 0; counter-reset: s; }
.steps3 > div { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 14px 56px; border-radius: 18px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); counter-increment: s; }
.steps3 > div::before { content: counter(s); position: absolute; left: 14px; top: 14px; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font: 800 14px/1 var(--display); }
.steps3 b { font-weight: 600; }
.steps3 span { color: var(--mute); font-size: 13.5px; }

.sec-h { display: flex; align-items: center; justify-content: space-between; margin: 8px 2px 10px; }
.sec-h h2 { font: 800 20px/1.1 var(--display); letter-spacing: -.02em; }

/* карточка магазина */
.shops { display: flex; flex-direction: column; gap: 12px; }
.shop { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 16px; border-radius: 22px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); text-align: left; animation: cardIn .5s var(--ease) both; }
.shop-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.shop-h h3 { font: 800 18px/1.15 var(--display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.shop-sub { color: var(--mute); font-size: 13px; margin-top: 3px; }
.st-chip { flex: none; height: 24px; padding: 0 10px; border-radius: 12px; font: 600 12px/24px var(--font); background: var(--s3); color: var(--text); white-space: nowrap; }
.st-chip.trial { background: var(--accent-soft); color: var(--accent-ink); }
.st-chip.active { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.st-chip.expired { background: color-mix(in srgb, var(--warn) 18%, transparent); color: var(--warn); }
.st-chip.banned { background: color-mix(in srgb, var(--danger) 15%, transparent); color: var(--danger); }
.shop-m { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.shop-m div { display: flex; flex-direction: column; gap: 1px; padding: 9px 10px; border-radius: 13px; background: var(--s2); min-width: 0; }
.shop-m span { color: var(--mute); font-size: 11.5px; }
.shop-m b { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-b { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.shop-b .btn { justify-content: center; padding: 0 12px; }
.warn-line { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 13px; background: color-mix(in srgb, var(--warn) 13%, transparent); color: var(--text); font-size: 13px; }

/* мастер */
.dots { display: flex; gap: 6px; margin: 2px 4px 14px; }
.dots i { flex: 1; height: 4px; border-radius: 2px; background: var(--s3); transition: background-color .3s; }
.dots i.on { background: var(--accent); }
.wz-h { font: 800 22px/1.1 var(--display); letter-spacing: -.02em; margin: 4px 0 6px; }
.wz-p { color: var(--mute); margin-bottom: 14px; }
.tpl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tpl { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 20px; background: var(--s1); text-align: left; box-shadow: inset 0 0 0 1.5px var(--line); transition: box-shadow .2s, transform .15s; }
.tpl:active { transform: scale(.98); }
.tpl.on { box-shadow: inset 0 0 0 2px var(--accent-ink); }
.tpl b { font-weight: 600; font-size: 14px; padding: 0 4px; line-height: 1.2; }
.tpl span { color: var(--mute); font-size: 12px; padding: 0 4px 4px; line-height: 1.3; }

/* превью магазина (рисуется из выбранных настроек) */
.pv { position: relative; overflow: hidden; border-radius: 16px; background: var(--pv-bg); color: var(--pv-text); padding: 10px; font-family: var(--pv-font); box-shadow: inset 0 0 0 1px var(--pv-line); transition: background-color .3s, color .3s; }
.pv-top { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; font: 800 11px/1 var(--pv-display); letter-spacing: .01em; }
.pv-top.caps { text-transform: uppercase; }
.pv-top .mk { display: grid; place-items: center; width: 18px; height: 18px; font-size: 13px; color: var(--pv-accent-ink); }
.pv-top .mk svg { width: 18px; height: 18px; }
.pv-chips { display: flex; gap: 4px; margin-bottom: 8px; overflow: hidden; }
.pv-chips i { font-style: normal; height: 16px; padding: 0 8px; border-radius: var(--pv-pill); background: var(--pv-s2); color: var(--pv-mute); font: 600 8px/16px var(--pv-font); white-space: nowrap; }
.pv-chips i:first-child { background: var(--pv-accent); color: var(--pv-on); }
.pv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pv-grid.list { grid-template-columns: 1fr; }
.pv-grid.big { grid-template-columns: 1fr; }
.pv-c { display: flex; flex-direction: column; background: var(--pv-s1); border-radius: var(--pv-r); overflow: hidden; box-shadow: inset 0 0 0 1px var(--pv-line); }
.pv-grid.list .pv-c { flex-direction: row; }
.pv-c .im { aspect-ratio: 1; background: var(--pv-s2); }
.pv-grid.list .pv-c .im { width: 34%; aspect-ratio: 1; flex: none; }
.pv-grid.big .pv-c .im { aspect-ratio: 16 / 9; }
.pv-c .tx { display: flex; flex-direction: column; gap: 2px; padding: 6px 7px 7px; flex: 1; font: 600 8.5px/1.2 var(--pv-font); }
.pv-c .tx small { color: var(--pv-mute); font-weight: 400; font-size: 7.5px; }
.pv-c .tx .pr { display: flex; align-items: center; justify-content: space-between; margin-top: 3px; font: 800 9.5px/1 var(--pv-display); }
.pv-c .tx .pr u { display: grid; place-items: center; width: 14px; height: 14px; border-radius: var(--pv-rb); background: var(--pv-accent); color: var(--pv-on); text-decoration: none; font: 700 10px/1 var(--pv-font); }
.pv-bar { margin-top: 8px; height: 22px; border-radius: var(--pv-rb); background: var(--pv-accent); color: var(--pv-on); font: 700 8.5px/22px var(--pv-font); text-align: center; }
.pv-sm .pv-grid .pv-c:nth-child(n+3) { display: none; }
.pv-sm.pv-big .pv-grid .pv-c:nth-child(n+2) { display: none; }

/* конструктор дизайна */
.pv-wrap { position: sticky; top: 0; z-index: 3; padding: 2px 0 10px; background: linear-gradient(to bottom, var(--sheet) 80%, transparent); }
.pv-wrap .pv { max-height: 188px; }
.opt-h { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--mute); margin: 16px 0 8px 2px; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.sw-c { position: relative; width: 38px; height: 38px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--line2); transition: transform .15s; }
.sw-c:active { transform: scale(.9); }
.sw-c.on { box-shadow: 0 0 0 2px var(--sheet), 0 0 0 4px var(--text); }
.sw-c.custom { background: conic-gradient(#ff5c5c, #ffb020, #a3e635, #2ee6cf, #4da3ff, #9b7bff, #ff5c8a, #ff5c5c); }
.sw-c input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.bg-c { width: 44px; height: 44px; border-radius: 14px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { height: 40px; padding: 0 16px; border-radius: 14px; background: var(--s2); font-weight: 600; font-size: 14px; box-shadow: inset 0 0 0 1.5px transparent; transition: box-shadow .2s, background-color .2s; }
.opt.on { box-shadow: inset 0 0 0 1.5px var(--accent-ink); background: var(--accent-soft); color: var(--accent-ink); }

.rules { max-height: 150px; overflow: auto; padding: 12px 14px; border-radius: 14px; background: var(--s2); color: var(--mute); font-size: 13px; white-space: pre-line; }
.chk { display: flex; gap: 12px; align-items: flex-start; padding: 12px 2px; text-align: left; }
.chk i { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; box-shadow: inset 0 0 0 2px var(--line2); color: transparent; transition: background-color .2s, box-shadow .2s; }
.chk.on i { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.chk span { flex: 1; }

.how { margin: 0; padding: 0; list-style: none; counter-reset: h; display: flex; flex-direction: column; gap: 8px; color: var(--mute); font-size: 13.5px; }
.how li { counter-increment: h; padding-left: 28px; position: relative; }
.how li::before { content: counter(h); position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--s3); color: var(--text); font: 700 11px/20px var(--font); text-align: center; }
.how b { color: var(--text); font-weight: 600; }
.ok-line { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 12px; border-radius: 13px; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); font-weight: 600; font-size: 14px; }

/* тарифы */
.plans { display: flex; flex-direction: column; gap: 10px; }
.plan { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; background: var(--s1); text-align: left; box-shadow: inset 0 0 0 1px var(--line); transition: transform .15s, box-shadow .2s; }
.plan:active { transform: scale(.985); }
.plan:hover { box-shadow: inset 0 0 0 1px var(--line2); }
.plan > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.plan b { font: 700 16px/1.2 var(--display); }
.plan span { color: var(--mute); font-size: 13px; }
.plan em { flex: none; font-style: normal; font: 800 18px/1 var(--display); color: var(--accent-ink); white-space: nowrap; }

/* админка платформы */
.adm-seg { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--s2); overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; }
.adm-seg::-webkit-scrollbar { display: none; }
.adm-seg button { flex: 1 0 auto; height: 38px; padding: 0 14px; border-radius: 12px; font-weight: 600; font-size: 13.5px; color: var(--mute); white-space: nowrap; transition: background-color .25s, color .25s; }
.adm-seg button.on { background: var(--accent); color: var(--on-accent); }
.kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.kpis.two { grid-template-columns: 1fr 1fr; }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin-top: 8px; }
.mini-bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.mini-bars u { display: block; min-height: 2px; height: calc(var(--h) * 100%); border-radius: 4px 4px 2px 2px; background: var(--accent); opacity: .85; text-decoration: none; }
.row-i { display: flex; flex-direction: column; gap: 3px; width: 100%; padding: 13px 14px; border-radius: 16px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); text-align: left; margin-bottom: 8px; }
.row-i > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.row-i b { font-weight: 600; overflow-wrap: anywhere; }
.row-i span { color: var(--mute); font-size: 12.5px; }
.plan-ed { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 18px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 10px; }
.plan-ed .fld { margin: 0; }
.kv-l { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.kv-l:first-child { border-top: 0; }
.kv-l span { color: var(--mute); }
.kv-l b { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.center-note { text-align: center; color: var(--mute); font-size: 13px; padding: 18px 8px; }
.legal-f { margin-top: 26px; color: var(--mute); font-size: 12px; text-align: center; }
.legal-f a { color: var(--mute); }

.tpl-shot { display: block; width: 100%; height: 170px; object-fit: cover; object-position: top; border-radius: 12px; background: var(--card, #eee); }
.card-prev { margin: 12px 0; min-height: 120px; transition: opacity .2s; }
.card-prev.busy { opacity: .5; }
.adm-seg.wrap { display: grid; grid-template-columns: 1fr 1fr; overflow: visible; margin-bottom: 8px; }
.adm-seg.wrap button { white-space: nowrap; }
.demo { margin: 6px 0 26px; }
.phone { width: min(100%, 300px); height: 560px; margin: 14px auto 16px; padding: 9px; border-radius: 40px; background: #0b0c10; box-shadow: 0 14px 40px rgba(0,0,0,.35), inset 0 0 0 2px rgba(255,255,255,.12); }
.phone-in { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 32px; background: var(--s1); }
.phone-in iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.tpl-strip { display: flex; gap: 12px; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tpl-strip::-webkit-scrollbar { display: none; }
.tpl-item { flex: none; width: 150px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 8px; text-align: left; color: var(--text); }
.tpl-item img { width: 150px; height: 200px; object-fit: cover; object-position: top; border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); background: var(--s1); }
.tpl-item b { font-size: 13px; font-weight: 600; line-height: 1.25; }
.feat { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.feat span { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 14px; background: var(--s1); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; font-weight: 600; line-height: 1.2; }
.feat i { font-style: normal; font-size: 18px; }
.plat-logo { border-radius: 24%; flex: none; display: block; }

.sheet-body.split { display: flex; flex-direction: column; overflow: hidden; padding-bottom: 0; }
.sheet-body.split > * { flex: none; }
.sheet-body.split .pv-wrap { position: relative; z-index: 2; background: var(--sheet); padding: 2px 0 10px; box-shadow: 0 10px 12px -10px rgba(0,0,0,.55); }
.sheet-body.split .pv-wrap .pv { max-height: 128px; transition: max-height .32s cubic-bezier(.2,.8,.2,1), padding .32s; }
.sheet-body.split .pv-wrap.min .pv { max-height: 34px; padding-bottom: 0; }
.sheet-body.split .pv-wrap.min .pv .pv-chips { opacity: 0; }
.sheet-body.split > .pv-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 2px 0 18px; }

/* главная кнопка: отступ, блик и отклик на нажатие */
.hero .btn { margin-top: 24px; }
.btn.cta { position: relative; overflow: hidden; isolation: isolate; transition: transform .18s cubic-bezier(.3,1.4,.5,1), box-shadow .25s; box-shadow: 0 8px 24px -8px var(--accent); }
.btn.cta::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.38) 50%, transparent 65%); transform: translateX(-120%); animation: ctaSheen 4s ease-in-out 1.2s infinite; }
.btn.cta:active:not(:disabled) { transform: scale(.955); box-shadow: 0 2px 10px -4px var(--accent); }
.btn.cta .rip { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: rgba(255,255,255,.55); pointer-events: none; animation: ctaRip .6s ease-out forwards; }
.btn.cta svg { transition: transform .25s; }
.btn.cta:hover svg, .btn.cta:active svg { transform: rotate(90deg) scale(1.15); }
@keyframes ctaSheen { 0%, 55% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes ctaRip { to { transform: scale(40); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .btn.cta::after, .btn.cta .rip { animation: none; } }

.funnel { display: grid; gap: 12px; margin: 4px 0 8px; }
.fn-t { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 5px; }
.fn-bar { height: 10px; border-radius: 99px; background: var(--chip, rgba(127,127,127,.15)); overflow: hidden; }
.fn-bar u { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent, #4f6cf5), #7c3aed); transition: width .5s; }
.fn-row small { display: block; margin-top: 3px; font-size: 12px; opacity: .6; }

.pbadge { font-style: normal; font-size: 11px; font-weight: 700; margin-left: 8px; padding: 2px 8px; border-radius: 99px; background: #16a34a; color: #fff; vertical-align: 2px; }
.incl { font-style: normal; font-size: 12px; font-weight: 600; color: #16a34a; white-space: nowrap; }
