@font-face { font-family: "Unbounded"; src: url("../fonts/Unbounded.ttf") format("truetype"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("../fonts/Manrope.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "Russo One"; src: url("../fonts/RussoOne.ttf") format("truetype"); font-weight: 400; font-display: swap; }

:root {
  --ink: #16121f;
  --ink-2: #5b5568;
  --line: #ece6f0;
  --bg: #fffaf6;
  --card: #ffffff;
  --accent: #ff2e74;
  --accent-2: #ff8a3d;
  --grad: linear-gradient(120deg, #ff2e74 0%, #ff8a3d 100%);
  --violet: #6b3cff;
  --ok: #00a175;
  --err: #e5294b;
  --radius: 22px;
  --shadow: 0 18px 50px -20px rgba(40, 10, 60, 0.25);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: "Manrope", system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img, canvas, video { max-width: 100%; display: block; }
h1, h2, h3, .display { font-family: "Unbounded", sans-serif; letter-spacing: -0.02em; line-height: 1.08; margin: 0 0 .5em; }
h1 { font-size: clamp(34px, 5.4vw, 66px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.6vw, 44px); font-weight: 800; }
h3 { font-size: 21px; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.small { font-size: 14px; }
.wrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none;
  font: 800 16px "Manrope", sans-serif; padding: 15px 26px; border-radius: 999px; transition: transform .15s, box-shadow .15s, background .15s; white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-main { background: var(--grad); color: #fff; box-shadow: 0 14px 30px -12px rgba(255, 46, 116, .7); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px var(--ink); }
.btn-sm { padding: 10px 18px; font-size: 14px; }
.btn-lg { padding: 19px 34px; font-size: 18px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn-danger { background: #fff0f3; color: var(--err); }

/* шапка */
.top { position: sticky; top: 0; z-index: 30; background: rgba(255, 250, 246, .85); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(0,0,0,.04); }
.top .wrap { display: flex; align-items: center; gap: 24px; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font: 800 20px "Unbounded", sans-serif; text-decoration: none; }
.logo i { width: 30px; height: 38px; border-radius: 8px; background: var(--grad); position: relative; display: inline-block; transform: rotate(-8deg); }
.logo i::after { content: ""; position: absolute; left: 10px; top: 12px; border-left: 12px solid #fff; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; font-weight: 700; font-size: 15px; color: var(--ink-2); }
.nav a:hover { color: var(--ink); }
.nav form { margin: 0; }
.linkbtn { background: none; border: 0; font: 700 15px "Manrope"; color: var(--ink-2); cursor: pointer; padding: 0; }
.nav a, .linkbtn { white-space: nowrap; }
@media (max-width: 760px) { .nav .hide-m { display: none; } .nav { gap: 14px; } .top .wrap { gap: 12px; } }
@media (max-width: 480px) { .logo { font-size: 0; gap: 0; } .nav a, .linkbtn { font-size: 14px; } .nav .btn-sm { padding: 9px 14px; } }

/* сообщения */
.flash { padding: 14px 18px; border-radius: 14px; margin: 18px 0; font-weight: 700; }
.flash.ok { background: #e6fbf3; color: #05674b; }
.flash.error { background: #fff0f3; color: #b4153a; }

/* лендинг */
.hero { padding: 60px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 50px; align-items: center; }
.hero p.lead { font-size: 21px; color: var(--ink-2); max-width: 560px; }
.hero .cta { display: flex; gap: 14px; flex-wrap: wrap; margin: 28px 0 18px; }
.hero .proof { display: flex; gap: 22px; flex-wrap: wrap; font-weight: 700; font-size: 15px; color: var(--ink-2); }
.hero .proof b { color: var(--ink); }
.phone { position: relative; justify-self: center; width: min(400px, 100%); }
.phone .screen { border-radius: 34px; overflow: hidden; box-shadow: 0 40px 80px -30px rgba(60, 10, 60, .45), 0 0 0 10px #fff; background: #fff; aspect-ratio: 3/4; }
.phone canvas { width: 100%; height: 100%; }
.phone .tag { position: absolute; left: -40px; top: 44%; background: #fff; border-radius: 18px; padding: 12px 16px; box-shadow: var(--shadow); font-weight: 800; font-size: 14px; display: flex; gap: 10px; align-items: center; }
.phone .tag b { font: 800 22px "Unbounded"; color: var(--accent); }
.phone .tabs { display: flex; gap: 6px; justify-content: center; margin-top: 22px; flex-wrap: wrap; }
.phone .tabs button { border: 0; background: #fff; border-radius: 999px; padding: 7px 13px; font: 700 13px "Manrope"; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.phone .tabs button.on { background: var(--ink); color: #fff; }
@media (max-width: 900px) { .hero .wrap { grid-template-columns: 1fr; } .phone .tag { left: 0; } }

section.block { padding: 80px 0; }
.kicker { display: inline-block; font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 860px) { .grid3, .grid2 { grid-template-columns: 1fr; } }
.card { background: var(--card); border-radius: var(--radius); padding: 28px; box-shadow: 0 1px 0 rgba(0,0,0,.03), 0 10px 30px -18px rgba(40,10,60,.18); }
.step-n { font: 800 44px "Unbounded"; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1; margin-bottom: 14px; }
.pain { background: var(--ink); color: #fff; border-radius: 36px; padding: 60px; }
.pain .muted { color: #b9b1c8; }
.pain .row { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 30px; }
.pain .col { background: rgba(255,255,255,.06); border-radius: 22px; padding: 26px; }
.pain .col.good { background: var(--grad); }
.pain ul { margin: 0; padding-left: 20px; }
.pain li { margin: 8px 0; }
@media (max-width: 760px) { .pain { padding: 32px 22px; } .pain .row { grid-template-columns: 1fr; } }

.tpl-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.tpl-card { background: #fff; border-radius: 26px; padding: 12px; box-shadow: 0 10px 30px -18px rgba(40,10,60,.25); }
.tpl-card canvas { width: 100%; aspect-ratio: 3/4; border-radius: 18px; background: #f3eef4; }
.tpl-card .meta { padding: 14px 8px 6px; }
.tpl-card .meta b { font: 700 18px "Unbounded"; }
.tpl-card .lock { font-size: 12px; font-weight: 800; color: var(--violet); background: #f0eaff; border-radius: 999px; padding: 3px 9px; margin-left: 6px; vertical-align: 3px; }
@media (max-width: 860px) { .tpl-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tpl-grid { grid-template-columns: 1fr; } }

.prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 22px; align-items: stretch; }
.price-card { background: #fff; border-radius: 28px; padding: 32px 28px; box-shadow: 0 10px 30px -18px rgba(40,10,60,.25); display: flex; flex-direction: column; position: relative; }
.price-card.hot { background: var(--ink); color: #fff; transform: translateY(-10px); }
.price-card.hot .muted { color: #b9b1c8; }
.price-card .hot-tag { position: absolute; top: -14px; left: 28px; background: var(--grad); color: #fff; font-weight: 800; font-size: 13px; padding: 6px 14px; border-radius: 999px; }
.price-card .amount { font: 800 44px "Unbounded"; margin: 10px 0 0; }
.price-card .amount { white-space: nowrap; font-size: clamp(32px, 3.4vw, 44px); }
.price-card .amount small { font: 700 16px "Manrope"; opacity: .7; }
.price-card ul { list-style: none; padding: 0; margin: 22px 0 28px; flex: 1; }
.price-card li { padding: 7px 0 7px 30px; position: relative; }
.price-card li::before { content: ""; position: absolute; left: 0; top: 11px; width: 18px; height: 18px; border-radius: 50%; background: var(--grad); }
.price-card li::after { content: ""; position: absolute; left: 6px; top: 15px; width: 6px; height: 3px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); }
.price-card .current { text-align: center; font-weight: 800; padding: 14px; border-radius: 999px; background: #f1fbf7; color: var(--ok); }
@media (max-width: 900px) { .prices { grid-template-columns: 1fr; } .price-card.hot { transform: none; } }

.faq details { background: #fff; border-radius: 20px; padding: 20px 24px; margin-bottom: 12px; box-shadow: 0 6px 20px -16px rgba(40,10,60,.3); }
.faq summary { font-weight: 800; font-size: 18px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 20px; }
.faq summary::after { content: "+"; font: 700 24px "Unbounded"; color: var(--accent); line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 14px 0 0; color: var(--ink-2); }

.final { text-align: center; background: var(--grad); color: #fff; border-radius: 36px; padding: 70px 30px; }
.final .btn { background: #fff; color: var(--ink); }

footer.foot { padding: 50px 0 60px; color: var(--ink-2); font-size: 14px; }
footer.foot .wrap { display: flex; gap: 30px; justify-content: space-between; flex-wrap: wrap; }
footer.foot a { color: var(--ink-2); }

/* формы */
.auth { min-height: calc(100vh - 70px); display: grid; place-items: center; padding: 40px 20px; }
.auth .card { width: min(440px, 100%); padding: 38px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; border: 2px solid var(--line); border-radius: 14px; padding: 13px 15px; font: 600 16px "Manrope"; background: #fff; color: var(--ink); outline: none; transition: border-color .15s; }
.input:focus { border-color: var(--accent); }
textarea.input { resize: vertical; min-height: 70px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.check input { margin-top: 4px; accent-color: var(--accent); width: 18px; height: 18px; }

/* кабинет */
.page { padding: 40px 0 80px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.usage { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; margin-bottom: 36px; }
@media (max-width: 760px) { .usage { grid-template-columns: 1fr; } }
.bar { height: 12px; border-radius: 99px; background: #f1ebf3; overflow: hidden; margin: 12px 0 8px; }
.bar i { display: block; height: 100%; background: var(--grad); border-radius: 99px; }
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 20px; }
.proj { background: #fff; border-radius: 22px; padding: 10px; box-shadow: 0 10px 30px -20px rgba(40,10,60,.3); text-decoration: none; display: block; transition: transform .15s; }
.proj:hover { transform: translateY(-3px); }
.proj .thumb { aspect-ratio: 3/4; border-radius: 16px; background: #f3eef4 center/cover no-repeat; }
.proj .meta { padding: 12px 6px 4px; }
.proj .meta b { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { text-align: center; padding: 60px 20px; background: #fff; border-radius: 26px; border: 2px dashed var(--line); }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.pick button { border: 2px solid var(--line); background: #fff; border-radius: 18px; padding: 16px 14px; text-align: left; cursor: pointer; font: inherit; transition: border-color .15s; }
.pick button:hover { border-color: var(--accent); }
.pick button b { font: 700 16px "Unbounded"; display: block; margin-bottom: 4px; }
.pick button span { font-size: 13px; color: var(--ink-2); }
.badge-plan { display: inline-block; padding: 5px 12px; border-radius: 99px; font-weight: 800; font-size: 13px; background: #f0eaff; color: var(--violet); }

/* редактор */
.editor { display: grid; grid-template-columns: 400px 1fr; gap: 0; min-height: calc(100vh - 70px); }
.panel { background: #fff; border-right: 1px solid var(--line); padding: 22px; overflow-y: auto; max-height: calc(100vh - 70px); }
.panel h3 { font-size: 15px; margin: 22px 0 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-family: "Manrope"; font-weight: 800; }
.panel h3:first-child { margin-top: 0; }
.stage { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px; gap: 18px; background: radial-gradient(circle at 50% 30%, #fff 0, #f6eff3 70%); }
.stage .canvas-wrap { height: min(calc(100vh - 250px), 720px); max-width: 100%; display: flex; align-items: center; justify-content: center; }
.stage canvas { height: 100%; width: auto; max-width: 100%; object-fit: contain; border-radius: 22px; box-shadow: 0 30px 60px -30px rgba(40,10,60,.5); background: #fff; }
.controls { display: flex; align-items: center; gap: 12px; width: min(620px, 100%); }
.controls input[type=range] { flex: 1; accent-color: var(--accent); }
.round { width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; cursor: pointer; font-size: 16px; flex: none; }
.tpl-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tpl-pick button { border: 2px solid var(--line); background: #fff; border-radius: 14px; padding: 10px 6px; font: 800 13px "Manrope"; cursor: pointer; position: relative; }
.tpl-pick button.on { border-color: var(--accent); background: #fff2f6; }
.tpl-pick button .lk { position: absolute; top: -7px; right: -5px; font-size: 11px; background: var(--violet); color: #fff; border-radius: 99px; padding: 1px 6px; }
.seg { display: flex; background: #f4eff5; border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; padding: 9px 6px; border-radius: 9px; font: 800 13px "Manrope"; cursor: pointer; color: var(--ink-2); }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatches button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px var(--line); cursor: pointer; }
.swatches button.on { box-shadow: 0 0 0 3px var(--ink); }
.swatches input[type=color] { width: 38px; height: 38px; border: 0; padding: 0; background: none; cursor: pointer; }
.photos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.photos .ph { aspect-ratio: 1; border-radius: 12px; background: #f4eff5 center/contain no-repeat; position: relative; border: 2px solid var(--line); }
.photos .ph button { position: absolute; top: -8px; right: -8px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; cursor: pointer; font-size: 12px; }
.photos label.add { aspect-ratio: 1; border-radius: 12px; border: 2px dashed #d9cfe0; display: grid; place-items: center; cursor: pointer; font: 800 26px "Unbounded"; color: #b9adc4; }
.photos label.add:hover { border-color: var(--accent); color: var(--accent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.export-box { position: sticky; bottom: -22px; background: #fff; padding: 16px 0 6px; border-top: 1px solid var(--line); margin-top: 20px; }
.progress { height: 8px; border-radius: 99px; background: #f1ebf3; overflow: hidden; margin-top: 10px; display: none; }
.progress i { display: block; height: 100%; width: 0; background: var(--grad); }
.hint { font-size: 13px; color: var(--ink-2); margin-top: 6px; }
@media (max-width: 960px) { .editor { grid-template-columns: 1fr; } .panel { max-height: none; order: 2; border-right: 0; } .stage .canvas-wrap { height: 60vh; } }

/* модальное окно */
.modal { position: fixed; inset: 0; background: rgba(22, 18, 31, .55); display: none; place-items: center; z-index: 50; padding: 20px; }
.modal.on { display: grid; }
.modal .card { width: min(480px, 100%); text-align: center; }

/* админка и таблицы */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 16px; margin-bottom: 30px; }
.stat { background: #fff; border-radius: 20px; padding: 20px; box-shadow: 0 8px 24px -18px rgba(40,10,60,.3); }
.stat b { display: block; font: 800 30px "Unbounded"; margin-top: 4px; }
table.tbl { width: 100%; border-collapse: collapse; background: #fff; border-radius: 20px; overflow: hidden; font-size: 14px; box-shadow: 0 8px 24px -18px rgba(40,10,60,.3); }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl th { background: #faf6fb; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.tbl form { display: flex; gap: 6px; margin: 0; }
.tbl select, .tbl input { border: 1px solid var(--line); border-radius: 8px; padding: 5px 6px; font: 600 13px "Manrope"; }
.st { font-weight: 800; font-size: 12px; padding: 3px 9px; border-radius: 99px; }
.st.succeeded { background: #e6fbf3; color: #05674b; }
.st.pending { background: #fff6e0; color: #8a5a00; }
.st.canceled, .st.error { background: #fff0f3; color: #b4153a; }
.scroll-x { overflow-x: auto; }

.legal { max-width: 820px; }
.legal h2 { font-size: 22px; margin-top: 30px; }
.demo-pay { max-width: 460px; margin: 60px auto; }
.demo-pay .bank { background: linear-gradient(135deg, #1f1b2e, #3b2d63); color: #fff; border-radius: 22px; padding: 26px; margin: 20px 0; }
.demo-pay .bank .num { font: 700 22px "Unbounded"; letter-spacing: .08em; margin: 20px 0 8px; }

/* премиум-коллекция */
.premium-block { background: #1b1612; color: #f6eadb; }
.premium-block .muted { color: #c9b8a3; }
.premium-block .tpl-card { background: #2a221b; }
.premium-block .tpl-card .meta b { color: #f6eadb; }
.tpl-pick button.prem { background: #fbf4e8; border-color: #e6d3b8; }
.tpl-pick button.prem.on { border-color: #b07a2a; background: #f6e7cf; }
.tpl-pick button .lk.pr { background: #3a2c1c; color: #e8b86a; }

.photos .ph button.cut { top: auto; bottom: -8px; right: -8px; background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(0,0,0,.25); font-size: 13px; }
.photos .ph.busy { opacity: .5; background-image: none !important; }
.photos .ph.busy::after { content: ""; position: absolute; inset: 30%; border: 3px solid var(--accent); border-top-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* мини-приложение Telegram: компактнее шапка, без подвала */
html.tg .top .wrap { height: 56px; }
html.tg footer.foot { display: none; }
html.tg .nav a[href="/app/account"] { display: none; }
