/* ===== self-hosted editorial serif (Playfair Display, latin + cyrillic) ===== */
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/playfair-400-normal-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:400;font-display:swap;src:url('/fonts/playfair-400-normal-cyrillic.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/playfair-600-normal-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:600;font-display:swap;src:url('/fonts/playfair-600-normal-cyrillic.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/playfair-700-normal-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Playfair Display';font-style:normal;font-weight:700;font-display:swap;src:url('/fonts/playfair-700-normal-cyrillic.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Playfair Display';font-style:italic;font-weight:500;font-display:swap;src:url('/fonts/playfair-500-italic-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Playfair Display';font-style:italic;font-weight:500;font-display:swap;src:url('/fonts/playfair-500-italic-cyrillic.woff2') format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}

:root{
  /* Looksi light editorial — committed brand palette (no dark theme, no Telegram color borrow) */
  color-scheme:light;
  --bg:#F5EFE5; --surface:#ffffff; --ink:#211B14; --muted:#8B7E6D;
  --line:rgba(33,27,20,.10); --wash:#EFE5D6;
  --accent:#E64980; --accent-ink:#ffffff; --gold:#A67C3D;
  --serif:'Playfair Display',Georgia,'Times New Roman',serif;
  --elev-1:0 1px 2px rgba(63,42,24,.05), 0 8px 20px rgba(63,42,24,.07);
  --elev-2:0 6px 16px rgba(63,42,24,.08), 0 22px 44px rgba(63,42,24,.11);
  --elev-accent:0 10px 26px rgba(230,73,128,.30);
  --surface-2:linear-gradient(180deg,#ffffff,#FBF5EB);
  --accent-grad:linear-gradient(135deg,#EC5B90,#E13B77);
  --accent-glow:rgba(230,73,128,.14);
  --radius:18px;
  --safe-top:env(safe-area-inset-top,0px);
  --safe-bottom:env(safe-area-inset-bottom,0px);
}
*{box-sizing:border-box; -webkit-tap-highlight-color:transparent}
html,body{margin:0; height:100%}
body{
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  background:var(--bg); color:var(--ink); overscroll-behavior:none;
}
#app{display:flex; flex-direction:column; height:100vh; height:100dvh; overflow-x:hidden; position:relative; background:transparent}
#app::before{content:""; position:fixed; inset:0; z-index:0; pointer-events:none;
  background:
    radial-gradient(120% 52% at 50% -10%, rgba(230,73,128,.07), transparent 60%),
    radial-gradient(96% 46% at 100% 106%, rgba(176,137,76,.06), transparent 62%);
}
/* loading screen — editorial wallpaper */
:root[data-flow="splash"] #app::before{
  background: url('/img/splash-bg.webp') center/cover no-repeat;
}
/* profile tab — editorial wallpaper */
:root[data-tab="profile"] #app::before{
  background: url('/img/profile-bg.webp') center/cover no-repeat;
}
.topbar, .view, .tabbar{position:relative; z-index:1}

.topbar{
  flex:none; display:flex; align-items:center; justify-content:space-between;
  padding:calc(10px + var(--safe-top)) 16px 10px;
}
.brand{font-family:var(--serif); font-weight:700; letter-spacing:.01em; font-size:20px}
.pill{
  font:600 11px/1 ui-monospace,Menlo,monospace; letter-spacing:.04em;
  padding:5px 9px; border-radius:100px; border:1px solid var(--line);
  color:var(--muted); background:transparent;
}
.pill.ok{color:var(--accent); border-color:var(--accent)}
.pill.warn{color:#c07a33; border-color:#c07a33}

.view{flex:1; overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch; padding:calc(10px + var(--safe-top)) 16px 18px}

.tabbar{
  flex:none; display:flex; gap:4px; padding:6px 8px calc(6px + var(--safe-bottom));
  background:var(--surface-2); border-top:1px solid var(--line);
  box-shadow:0 -8px 24px rgba(63,42,24,.07);
}
.tab{
  flex:1; display:flex; flex-direction:column; align-items:center; gap:2px;
  border:0; background:transparent; color:var(--muted); font-size:11px; padding:8px 2px;
  border-radius:12px; cursor:pointer; font-family:inherit; transition:color .2s ease;
}
.tab .ic{display:flex; align-items:center; justify-content:center; height:23px; font-size:17px; line-height:1; transition:transform .22s cubic-bezier(.34,1.5,.5,1)}
.tab.active .ic{transform:scale(1.1)}
.tab:active .ic{transform:scale(.86)}
.tab .ic svg{width:23px; height:23px; display:block}
.tab.active{color:var(--accent)}
.tab--mid{color:var(--accent)}
.tab--mid.active{color:var(--accent-ink); background:var(--accent-grad); box-shadow:var(--elev-accent)}

h2.title{font-family:var(--serif); font-size:27px; font-weight:700; margin:8px 0 5px; letter-spacing:-.01em; line-height:1.12}
p.sub{color:var(--muted); margin:0 0 16px; font-size:14px}

/* cards / grids */
.grid{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.card{
  background:var(--surface-2); border:1px solid var(--line); border-radius:var(--radius);
  overflow:hidden; cursor:pointer; box-shadow:var(--elev-1);
  transition:transform .14s ease, box-shadow .14s ease;
}
.card:active{transform:scale(.985)}
.card .thumb{aspect-ratio:3/4; background:var(--wash); display:flex; align-items:center; justify-content:center; font-size:30px; color:var(--accent)}
.card .cap{padding:10px 12px}
.card .cap b{display:block; font-size:14px}
.card .cap span{font-size:12px; color:var(--muted)}

.chips{display:flex; gap:8px; overflow-x:auto; padding-bottom:8px; margin-bottom:8px}
.chip{flex:none; padding:8px 15px; border-radius:100px; background:var(--surface-2); border:1px solid var(--line); font-size:13px; font-weight:600; color:var(--muted); box-shadow:var(--elev-1)}
.chip.on{background:var(--accent-grad); color:var(--accent-ink); border-color:transparent; box-shadow:0 4px 14px var(--accent-glow)}

/* swipe — fanned card deck */
.swipe-stage{position:relative; height:100%; margin:0 -16px; display:flex; flex-direction:column; align-items:center}
.swipe-deck{position:relative; flex:1; width:100%; min-height:0}
.scard{
  position:absolute; left:8%; right:8%; top:3%; bottom:0;
  border-radius:28px; overflow:hidden; background:var(--wash);
  box-shadow:0 22px 50px rgba(63,42,24,.20); border:1px solid var(--line);
  will-change:transform;
}
.scard.back-l{transform:translateX(-22%) rotate(-8deg) scale(.95); z-index:1}
.scard.back-r{transform:translateX(22%) rotate(8deg) scale(.95); z-index:2}
.scard.front{z-index:3; touch-action:none; cursor:grab}
.scard.front::before{
  content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(180deg, rgba(255,255,255,.06), transparent 26%);
}
.scard-scrim{position:absolute; inset:0;
  background:linear-gradient(to top, rgba(0,0,0,.6) 0%, rgba(0,0,0,.15) 34%, transparent 55%)}
.scard-meta{position:absolute; left:20px; right:20px; bottom:24px}
.scard-meta b{display:block; color:#fff; font-size:21px; font-weight:700; letter-spacing:-.01em}
.scard-meta span{display:block; margin-top:4px; color:rgba(255,255,255,.72); font-size:14px}
.swipe-controls{display:flex; gap:20px; margin-top:-33px; margin-bottom:8px; z-index:5}
.round-btn{
  width:66px; height:66px; border-radius:50%; border:1px solid var(--line); cursor:pointer;
  background:var(--surface); box-shadow:0 10px 24px rgba(63,42,24,.16);
  display:flex; align-items:center; justify-content:center; transition:transform .2s cubic-bezier(.34,1.5,.5,1), box-shadow .2s ease;
}
.round-btn:active{transform:scale(.88); box-shadow:0 5px 14px rgba(63,42,24,.12)}
.round-btn.like{color:var(--accent)}
.round-btn.nope{color:var(--muted)}
.round-btn svg{display:block}

/* detail */
.detail-hero{aspect-ratio:1/1; background:var(--wash); border-radius:var(--radius); display:flex; align-items:center; justify-content:center; font-size:56px; color:var(--accent); margin-bottom:14px}
.price-row{display:flex; align-items:center; justify-content:space-between; margin:14px 0}
.price{font-size:20px; font-weight:700}
.btn{
  width:100%; padding:16px; border:0; border-radius:14px; background:var(--accent-grad);
  color:var(--accent-ink); font-size:17px; font-weight:800; cursor:pointer; font-family:inherit;
  box-shadow:var(--elev-accent); transition:transform .2s cubic-bezier(.34,1.45,.5,1), box-shadow .2s ease, filter .2s ease;
}
.btn:active{transform:scale(.955); box-shadow:0 4px 14px var(--accent-glow); filter:brightness(.98)}
.btn.ghost{background:transparent; border:2px solid var(--accent); color:var(--accent); box-shadow:none; font-weight:800}
.list-row{display:flex; align-items:center; justify-content:space-between; padding:14px 2px; border-bottom:1px solid var(--line); font-size:15px}
.list-row .k{color:var(--muted)}
.kv{font:600 12px/1.5 ui-monospace,Menlo,monospace; color:var(--muted); word-break:break-all; background:var(--surface); border:1px solid var(--line); border-radius:12px; padding:12px}
.avatar{width:56px; height:56px; border-radius:50%; background:var(--wash); display:flex; align-items:center; justify-content:center; font-size:24px; color:var(--accent)}
.profile-head{display:flex; align-items:center; gap:14px; margin:8px 0 18px}
.profile-head b{font-size:18px}
.profile-head span{color:var(--muted); font-size:13px}
.muted{color:var(--muted); font-size:13px}
.stack{display:flex; flex-direction:column; gap:12px}

/* ===================== skeleton component kit ===================== */
.lbl-sm{font-size:11.5px; font-weight:700; color:var(--gold); text-transform:uppercase; letter-spacing:.14em; margin:16px 0 8px}
.tile{border-radius:12px; background:var(--wash)}
.card .thumb{position:relative}
.card .thumb .tag{position:absolute; top:8px; right:8px; background:rgba(0,0,0,.5); color:#fff; font-size:11px; font-weight:600; padding:3px 8px; border-radius:100px}
.pill-btn{border:1px solid var(--line); background:var(--surface-2); color:var(--muted); font:700 13px/1 inherit; padding:9px 15px; border-radius:100px; cursor:pointer; box-shadow:var(--elev-1)}
.pill-btn.solid{background:var(--accent-grad); color:var(--accent-ink); border-color:transparent; box-shadow:var(--elev-accent)}
.row-between{display:flex; align-items:center; justify-content:space-between; gap:10px}
.row-between .title{margin-top:8px}

/* segmented control */
.seg{display:flex; gap:4px; background:var(--surface-2); border:1px solid var(--line); border-radius:12px; padding:4px; margin:2px 0 4px; box-shadow:var(--elev-1)}
.seg button{flex:1; border:0; background:transparent; color:var(--muted); font:700 14px/1 inherit; padding:11px; border-radius:9px; cursor:pointer; transition:background .15s}
.seg button.on{background:var(--accent-grad); color:var(--accent-ink); box-shadow:0 3px 10px var(--accent-glow)}
.seg-mini .seg{max-width:70%; margin:0 auto 12px}

/* list with thumbnails */
.list{display:flex; flex-direction:column; background:var(--surface-2); border:1px solid var(--line); border-radius:16px; box-shadow:var(--elev-1); overflow:hidden; padding:0 14px}
.list .list-row:last-child, .list .row-item:last-child{border-bottom:0}
.row-item{display:flex; align-items:center; gap:12px; padding:11px 2px; border-bottom:1px solid var(--line); font-size:15px}
.row-item .chev{margin-left:auto; color:var(--muted)}
.ri-thumb{width:38px; height:38px; border-radius:9px; background:var(--wash); flex:none; display:flex; align-items:center; justify-content:center; color:var(--accent)}
.ri-thumb.lg{width:56px; height:70px; border-radius:12px; font-size:22px}
.chev{color:var(--muted); font-size:18px}

/* empty state */
.empty{display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:8px; padding:56px 24px; margin:auto}
.empty .ic{font-size:40px}
.empty h3{margin:6px 0 0; font-size:18px}
.empty p{margin:0; color:var(--muted); font-size:14px; max-width:32ch}
.empty .btn{margin-top:10px}

/* skeleton shimmer */
.sk{background:var(--wash); border-radius:12px; position:relative; overflow:hidden}
.sk-card{aspect-ratio:3/4}
.sk::after{content:""; position:absolute; inset:0; transform:translateX(-100%);
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent); animation:shimmer 1.3s infinite}
@keyframes shimmer{100%{transform:translateX(100%)}}
@media (prefers-reduced-motion:reduce){.sk::after,.spinner{animation:none}}

/* bottom sheet */
.sheet{margin-top:16px; background:var(--surface-2); border:1px solid var(--line); border-radius:18px; padding:16px; box-shadow:var(--elev-2)}
.sheet .grab{width:34px; height:4px; border-radius:4px; background:var(--line); margin:0 auto 12px}

/* progress */
.progress{height:7px; border-radius:6px; background:var(--wash); overflow:hidden}
.progress > i{display:block; height:100%; width:8%; background:var(--accent); border-radius:6px; transition:width .5s ease}

/* centered screens (match / referral / progress) */
.center-screen{display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:12px; min-height:70%; padding:24px}
.match-heart{font-size:64px; color:var(--accent); line-height:1}
.gift-ic{color:var(--accent); line-height:0}
.gift-ic svg{width:64px; height:64px}

/* swipe top bar + entry points */
.swipe-top{display:flex; justify-content:flex-end; padding:2px 16px 8px; flex:none}
.card-info{position:absolute; top:12px; right:12px; width:30px; height:30px; border-radius:50%; border:0; background:rgba(0,0,0,.4); color:#fff; font-style:italic; font-weight:700; cursor:pointer; z-index:4}

/* onboarding */
.onb{display:flex; flex-direction:column; height:100%; gap:0}
.onb-body{padding:16px}
.onb-top{flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch}
.onb-splash{align-items:center; justify-content:center; gap:20px}
.splash-brand{font-family:var(--serif); font-size:40px; font-weight:700; letter-spacing:.01em}
.spinner{width:26px; height:26px; border-radius:50%; border:3px solid var(--line); border-top-color:var(--accent); animation:spin .8s linear infinite}
@keyframes spin{100%{transform:rotate(360deg)}}
.dots{display:flex; gap:7px; justify-content:center; margin:14px 0}
.dots i{width:7px; height:7px; border-radius:50%; background:var(--line)}
.dots i.on{background:var(--accent); width:20px; border-radius:4px}
.photo-frame{display:flex; align-items:center; justify-content:center; margin:24px 0 18px; min-height:210px;
  border:1.5px dashed var(--accent); border-radius:18px; color:var(--accent); cursor:pointer; background:var(--wash)}
.photo-hint{font-size:15px; font-weight:600}
.consent{display:flex; align-items:center; gap:10px; font-size:14px; color:var(--muted); margin-bottom:12px}
.consent input{width:18px; height:18px; accent-color:var(--accent)}
.link-btn{color:var(--accent); font-weight:600; font-size:14px; cursor:pointer}

/* onboarding shares ONE calm background, distinct from the app's dark texture */
:root[data-flow="onb"] #app::before,
:root[data-flow="funnel"] #app::before{
  background: url('/img/onb-bg.webp') center/cover no-repeat !important;
  opacity:1 !important;
}
:root[data-flow="onb"] .onb .title{color:var(--ink)}
:root[data-flow="onb"] .onb .sub{color:var(--muted)}
:root[data-flow="onb"] .onb .lbl-sm{color:var(--gold)}

/* onboarding pagination dots — inline above the CTA, same footer height on every step */
/* persistent fixed overlay — IDENTICAL height on every step; the active dot slides on switch */
.onb-dots-fixed{position:fixed; left:0; right:0; bottom:calc(var(--safe-bottom) + 92px); display:none; gap:8px; justify-content:center; z-index:60; pointer-events:none}
.onb-dots-fixed i{width:7px; height:7px; border-radius:100px; background:rgba(33,27,20,.18); transition:width .4s cubic-bezier(.22,.61,.36,1), background .4s}
.onb-dots-fixed i.on{width:24px; background:var(--accent)}
/* reserve a gap above each onboarding CTA so content never overlaps the dots overlay */
:root[data-flow="onb"] .onb-body .btn{margin-top:42px}
:root[data-flow="onb"] .tphoto-continue{margin-top:34px}
:root[data-flow="onb"] .pready-row{margin-top:16px}

/* A4 quiz — image tiles + budget select */
.q-grid{display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:4px}
.q-tile{position:relative; aspect-ratio:16/11; border-radius:16px; overflow:hidden; cursor:pointer; border:2px solid transparent;
  background-size:cover; background-position:center 20%; box-shadow:var(--elev-1); padding:0; font-family:inherit;
  transition:transform .14s ease, border-color .15s}
.q-tile::after{content:""; position:absolute; inset:0; background:linear-gradient(180deg, rgba(0,0,0,.02) 38%, rgba(0,0,0,.62))}
.q-tile .q-lbl{position:absolute; left:12px; bottom:9px; z-index:2; color:#fff; font-weight:800; font-size:15px; text-shadow:0 1px 6px rgba(0,0,0,.55)}
.q-tile .q-check{position:absolute; top:8px; right:8px; z-index:3; width:24px; height:24px; border-radius:50%; background:var(--accent); color:#fff; display:none; align-items:center; justify-content:center; font-size:14px; font-weight:800}
.q-tile:active{transform:scale(.97)}
.q-tile.on{border-color:var(--accent)}
.q-tile.on .q-check{display:flex}
.q-budget{display:flex; gap:10px}
.q-bud{flex:1; padding:15px 8px; border-radius:14px; border:2px solid var(--line); background:var(--surface-2); color:var(--ink); font:700 15px inherit; cursor:pointer; box-shadow:var(--elev-1); transition:transform .14s ease, border-color .15s}
.q-bud:active{transform:scale(.96)}
.q-bud.on{border-color:var(--accent); color:var(--accent); background:var(--wash)}

/* A3 — "Добавь фото" (full-bleed wallpaper) */
.tphoto{
  --pink:var(--accent);
  min-height:calc(100% + 10px + var(--safe-top) + 18px);
  margin:calc(-10px - var(--safe-top)) -16px -18px;
  padding:calc(30px + var(--safe-top)) 20px calc(18px + var(--safe-bottom));
  background:transparent;
  display:flex; flex-direction:column; color:var(--ink); position:relative;
}
.tphoto-float{position:absolute; color:var(--pink); opacity:.9; pointer-events:none; filter:drop-shadow(0 0 8px rgba(242,143,177,.5))}
.tphoto-hero{text-align:center; margin-top:22%}
.tphoto-hero h1{font-family:var(--serif); font-size:40px; font-weight:700; letter-spacing:-.01em; margin:0}
.tphoto-hero .ul{width:120px; height:5px; border-radius:100px; background:var(--pink); margin:12px auto 0}
.tphoto-hero .sub{margin:14px auto 0; max-width:30ch; font-size:15px; line-height:1.45; color:var(--muted)}
.tphoto-panel{margin-top:auto; display:flex; flex-direction:column; gap:12px}
.tphoto-cards{display:grid; grid-template-columns:1fr 1fr; gap:12px}
.tphoto-card{
  position:relative; aspect-ratio:1; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; gap:12px;
  background:var(--surface);
  border:1px solid var(--line); border-radius:22px; padding:14px; cursor:pointer; color:var(--ink); font-family:inherit;
  box-shadow:var(--elev-1); transition:transform .14s ease;
}
.tphoto-card:active{transform:scale(.94)}
.tphoto-card .ictile{width:78px; height:78px; border-radius:20px; background:var(--wash); display:flex; align-items:center; justify-content:center; color:var(--pink)}
.tphoto-card .ictile svg{width:36px; height:36px}
.tphoto-card b{font-size:16px; font-weight:800; white-space:nowrap}
.tphoto-card .accent{position:absolute; top:14px; color:var(--pink); line-height:0}
.tphoto-card .accent.l{left:15px}
.tphoto-card .accent.r{right:15px}
.tphoto-tip{
  display:flex; align-items:center; gap:12px; padding:14px 16px; border-radius:18px;
  background:var(--surface); border:1px solid var(--line); box-shadow:var(--elev-1);
}
.tphoto-tip .bulb{color:var(--pink); flex:none; line-height:0}
.tphoto-tip .bulb svg{width:26px; height:26px}
.tphoto-tip b{display:block; color:var(--pink); font-size:14px}
.tphoto-tip p{margin:2px 0 0; font-size:13px; color:var(--muted); line-height:1.35}
.tphoto-consent{display:flex; align-items:center; gap:11px; font-size:14px; color:var(--muted); padding:2px 4px; cursor:pointer}
.tphoto-consent input{position:absolute; opacity:0; width:0; height:0}
.tphoto-consent .cbox{width:24px; height:24px; border-radius:7px; border:2px solid var(--line); flex:none; display:flex; align-items:center; justify-content:center; transition:background .15s, border-color .15s}
.tphoto-consent input:checked + .cbox{background:var(--pink); border-color:var(--pink)}
.tphoto-consent input:checked + .cbox::after{content:"✓"; color:#fff; font-size:15px; font-weight:800}
.tphoto-continue{width:100%; border:0; border-radius:16px; padding:18px; background:var(--accent-grad); color:#fff; font:800 20px/1 inherit; cursor:pointer; box-shadow:var(--elev-accent); transition:transform .2s cubic-bezier(.34,1.45,.5,1), filter .2s ease}
.tphoto-continue:active{transform:scale(.955); filter:brightness(.98)}

/* D1 — "Мой гардероб" (full-bleed wallpaper) */
.wardrobe{
  --pink:var(--accent);
  min-height:calc(100% + 10px + var(--safe-top) + 18px);
  margin:calc(-10px - var(--safe-top)) -16px -18px;
  padding:calc(12px + var(--safe-top)) 16px calc(16px + var(--safe-bottom));
  background:url('/img/wardrobe-bg.webp') center/cover no-repeat;
  display:flex; flex-direction:column; color:var(--ink);
}
.wd-seg{display:flex; gap:4px; padding:5px; border-radius:16px;
  background:var(--surface-2); border:1px solid var(--line); box-shadow:var(--elev-1)}
.wd-seg button{flex:1; border:0; background:transparent; color:var(--muted); font:700 16.5px inherit; padding:12px; border-radius:12px; cursor:pointer}
.wd-seg button.on{background:var(--accent-grad); color:#fff}
.wd-head{display:flex; align-items:center; justify-content:space-between; gap:10px; margin:16px 0 12px}
.wd-head h2{font-family:var(--serif); font-size:28px; font-weight:700; letter-spacing:-.01em; margin:0}
.wd-add{flex:none; background:var(--surface); border:1px solid var(--line); box-shadow:var(--elev-1);
  color:var(--accent); font:600 14px inherit; padding:10px 16px; border-radius:100px; cursor:pointer}
.wd-chips{display:flex; gap:8px; overflow-x:auto; padding-bottom:2px; scrollbar-width:none}
.wd-chips::-webkit-scrollbar{display:none}
.wd-chips span{flex:none; padding:9px 17px; border-radius:100px; font-size:14px; color:var(--muted);
  background:var(--surface-2); border:1px solid var(--line); box-shadow:var(--elev-1)}
.wd-chips span.on{background:var(--accent-grad); color:#fff; border-color:transparent}
.wd-empty{margin-top:auto; text-align:center; padding:0 8px}
.wd-empty .h{font-family:var(--serif); font-size:25px; font-weight:700; margin:0}
.wd-empty p{margin:9px auto 0; max-width:30ch; font-size:14.5px; line-height:1.45; color:var(--muted)}
.wd-outline{margin-top:20px; background:transparent; border:1.5px solid var(--accent); color:var(--accent);
  font:800 17.5px inherit; padding:15px 36px; border-radius:14px; cursor:pointer}
.wd-outline:active{transform:scale(.98)}
.wd-build{margin-top:auto; width:100%; border:0; border-radius:16px; padding:18px; background:var(--accent-grad); color:#fff;
  font:800 19.5px/1 inherit; cursor:pointer; box-shadow:var(--elev-accent)}
.wd-build:active{transform:scale(.99)}
.wd-grid{display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:14px}

/* A5 — "Профиль готов" (full-bleed wallpaper) */
.pready{
  --pink:var(--accent);
  min-height:calc(100% + 10px + var(--safe-top) + 18px);
  margin:calc(-10px - var(--safe-top)) -16px -18px;
  padding:calc(20px + var(--safe-top)) 22px calc(18px + var(--safe-bottom));
  background:transparent;
  display:flex; flex-direction:column; color:var(--ink);
}
.pready-hero{margin-top:auto; display:flex; flex-direction:column; align-items:center; text-align:center}
.pready-badge{position:relative; width:128px; height:128px; border-radius:50%; color:var(--pink);
  border:1.5px solid rgba(230,73,128,.35); background:var(--surface);
  display:flex; align-items:center; justify-content:center; box-shadow:0 0 44px rgba(230,73,128,.16), var(--elev-1)}
.pready-badge .check{width:58px; height:58px}
.pready-badge .spark{position:absolute; top:-4px; right:6px; color:var(--pink); line-height:0}
.pready-badge .spark svg{width:26px; height:26px}
.pready-title{font-family:var(--serif); font-size:34px; font-weight:700; letter-spacing:-.01em; margin:22px 0 0}
.pready-tile{position:relative; text-align:center; width:100%; max-width:326px; margin-top:24px;
  background:var(--surface); border:1px solid var(--line); box-shadow:var(--elev-1); border-radius:20px; padding:18px 22px}
.pready-tile b{display:block; color:var(--accent); font-size:16px; font-weight:800}
.pready-tile p{margin:6px 0 0; font-size:14px; line-height:1.45; color:var(--muted)}
.pready-tile .tspark{position:absolute; top:12px; right:14px; color:var(--pink); line-height:0}
.pready-tile .tspark svg{width:16px; height:16px}
.pready-actions{margin-top:auto; display:flex; flex-direction:column; gap:12px; padding-top:24px}
.pready-row{display:flex; gap:10px}
.pready-wow{flex:1.7; border:0; border-radius:16px; padding:17px 12px; background:var(--accent-grad); color:#fff; font:800 18px/1 inherit; cursor:pointer; box-shadow:var(--elev-accent); transition:transform .2s cubic-bezier(.34,1.45,.5,1), filter .2s ease}
.pready-wow:active{transform:scale(.955); filter:brightness(.98)}
.pready-skip{flex:1; border:2px solid var(--accent); background:transparent; color:var(--accent); font:800 16px/1 inherit; padding:15px 10px; border-radius:16px; cursor:pointer; transition:transform .2s cubic-bezier(.34,1.45,.5,1)}
.pready-skip:active{transform:scale(.955)}

/* create / result */
.photo-row{display:flex; align-items:center; gap:14px; margin:6px 0 6px}
.result-actions{display:flex; gap:10px; margin-top:6px}
.ico-btn{flex:1; display:flex; flex-direction:column; align-items:center; gap:4px; padding:13px 6px;
  border:1px solid var(--line); border-radius:14px; background:var(--surface-2); color:var(--ink); font-size:18px; cursor:pointer; box-shadow:var(--elev-1); transition:transform .14s ease}
.ico-btn:active{transform:scale(.96)}
.ico-btn span{font-size:12px; color:var(--muted)}
.lock-tile{position:relative}
.lock-tile .lock{position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:30px; background:rgba(0,0,0,.35); border-radius:16px; backdrop-filter:blur(3px)}
.tariff-row{display:flex; gap:10px}
.tariff{flex:1; background:var(--surface-2); border:1px solid var(--line); border-radius:14px; padding:14px 12px; text-align:center; cursor:pointer; box-shadow:var(--elev-1)}
.tariff b{display:block; font-size:14px}
.tariff span{font-size:13px; color:var(--muted)}
.tariff.best{border-color:var(--accent)}
.tariff.sel{border-color:var(--accent); background:var(--wash)}

/* wardrobe builder */
.slots{display:grid; grid-template-columns:1fr 1fr; gap:10px}
.slot{display:flex; align-items:center; justify-content:space-between; padding:16px; border:1px dashed var(--line); border-radius:12px; color:var(--muted); font-size:14px}
.slot b{color:var(--accent); font-size:18px}

/* trends / shop */
.card.feat{cursor:pointer}
.card.row-card{display:flex; align-items:center; gap:12px; padding:10px; cursor:pointer}
.rc-thumb{width:64px; height:64px; border-radius:10px; flex:none; background:var(--wash)}
.card.row-card .cap{padding:0; flex:1}
.shop-top{display:flex; align-items:center; gap:10px; margin-bottom:14px}
.searchbar{flex:1; display:flex; align-items:center; gap:8px; padding:13px 15px; border:1px solid var(--line); border-radius:14px; color:var(--muted); font-size:14px; background:var(--surface-2); cursor:pointer; box-shadow:var(--elev-1)}
.searchbar .mag{width:19px; height:19px; flex:none}
.icon-circle{width:46px; height:46px; border-radius:50%; border:1px solid var(--line); background:var(--surface-2); color:var(--ink); display:flex; align-items:center; justify-content:center; flex:none; cursor:pointer; box-shadow:var(--elev-1)}
.icon-circle svg{display:block; width:22px; height:22px}
.searchbar.big{margin-bottom:4px}
.searchbar.big input{width:100%; border:0; background:transparent; color:var(--ink); font-size:15px; outline:none}
.g3-strip{display:flex; gap:8px}
.g3-strip .rc-thumb{width:auto; flex:1; aspect-ratio:1}

/* profile / payment */
.credit-card{display:flex; align-items:center; gap:12px; background:var(--surface-2); border:1px solid var(--line); border-radius:16px; padding:16px; margin:6px 0 16px; box-shadow:var(--elev-1)}
.credit-card b{font-size:18px}
.credit-card .pill-btn{margin-left:auto}
.tariff-card{display:flex; align-items:center; gap:12px; background:var(--surface-2); border:1px solid var(--line); border-radius:16px; padding:18px 16px; cursor:pointer; position:relative; box-shadow:var(--elev-1); transition:transform .14s ease}
.tariff-card:active{transform:scale(.99)}
.tariff-card b{font-size:16px}
.tariff-card span{display:block; font-size:13px; color:var(--muted)}
.tariff-card .tariff-price{margin-left:auto; font-size:17px; font-weight:700}
.tariff-card.sel{border-color:var(--accent); background:var(--wash); box-shadow:0 8px 22px var(--accent-glow)}
.tariff-card.best{border-color:var(--accent); box-shadow:0 8px 22px var(--accent-glow)}
.badge-best{position:absolute; top:-9px; left:16px; background:var(--accent); color:var(--accent-ink); font-size:10px; font-weight:700; padding:2px 8px; border-radius:100px; text-transform:uppercase; letter-spacing:.04em}
.order{background:var(--surface-2); border:1px solid var(--line); border-radius:16px; padding:6px 16px; margin-bottom:14px; box-shadow:var(--elev-1)}
.order-row{display:flex; justify-content:space-between; padding:12px 0; border-bottom:1px solid var(--line); font-size:15px}
.order-row:last-child{border-bottom:0}
.order-row.muted span{color:var(--muted)}
.toggle{width:42px; height:25px; border-radius:100px; background:var(--line); position:relative; cursor:pointer; flex:none}
.toggle::after{content:""; position:absolute; top:3px; left:3px; width:19px; height:19px; border-radius:50%; background:#fff; transition:left .18s ease}
.toggle.on{background:var(--accent)}
.toggle.on::after{left:20px}
.list-row.danger .k{color:#e0678a}
.promo{font:700 20px/1 ui-monospace,Menlo,monospace; letter-spacing:.12em; color:var(--accent); border:1px dashed var(--accent); border-radius:12px; padding:14px 20px; margin-top:6px}

/* ===================== W · WOW-воронка (Этап 2) ===================== */
.funnel{
  min-height:calc(100% + 10px + var(--safe-top) + 18px);
  margin:calc(-10px - var(--safe-top)) -16px -18px;
  padding:calc(16px + var(--safe-top)) 20px calc(18px + var(--safe-bottom));
  display:flex; flex-direction:column;
}
.fnl-eyebrow{font-size:11.5px; font-weight:700; color:var(--gold); text-transform:uppercase; letter-spacing:.16em; margin:0 0 8px; text-align:center}

/* W1 hero */
.fhero-media{position:relative; flex:1; min-height:0; border-radius:26px; overflow:hidden; box-shadow:var(--elev-2)}
.fhero-media img{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center 16%; display:block}
.fhero-tags{position:absolute; top:14px; left:14px; right:14px; display:flex; justify-content:space-between}
.fhero-tag{background:rgba(255,255,255,.82); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); color:var(--ink); font:700 11px/1 inherit; letter-spacing:.1em; text-transform:uppercase; padding:6px 11px; border-radius:100px}
.fhero-body{flex:none; padding-top:20px; text-align:center}
.fhero-body h1{font-family:var(--serif); font-size:31px; line-height:1.1; font-weight:700; letter-spacing:-.01em; margin:0; text-wrap:balance}
.fhero-body h1 em{font-style:normal; color:var(--accent)}
.fhero-body .sub{color:var(--muted); font-size:15px; margin:12px auto 0; max-width:30ch; line-height:1.42}
.fhero-cta{margin-top:20px}
.fhero-note{color:var(--muted); font-size:12.5px; text-align:center; margin-top:11px}

/* W2 what you get */
.fget-head{text-align:center; margin-top:6px}
.fget-head .title{margin-top:2px}
.fget{display:flex; flex-direction:column; gap:11px; margin:auto 0}
.fget-row{display:flex; align-items:center; gap:14px; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:13px 15px; box-shadow:var(--elev-1)}
.fget-ic{flex:none; width:54px; height:54px; border-radius:14px; overflow:hidden; background:var(--wash)}
.fget-ic img{width:100%; height:100%; object-fit:cover; display:block}
.fget-txt b{display:block; font-size:15.5px; font-weight:800}
.fget-txt span{font-size:13px; color:var(--muted)}
.fget-screen .btn{margin-top:6px}

/* W5 analysis */
.fan-top{text-align:center; margin-top:6%}
.fan-top .title{margin-bottom:22px}
.fan-ring{width:150px; height:150px; border-radius:50%; margin:0 auto;
  background:conic-gradient(var(--accent) calc(var(--p) * 1%), var(--wash) 0);
  display:flex; align-items:center; justify-content:center; transition:background .12s linear}
.fan-ring-in{width:120px; height:120px; border-radius:50%; background:var(--bg); display:flex; align-items:center; justify-content:center; box-shadow:var(--elev-1)}
.fan-pct{font-family:var(--serif); font-size:32px; font-weight:700; color:var(--ink)}
.fan-status{margin-top:18px}
.fan-steps{list-style:none; margin:26px 0 0; padding:0; display:flex; flex-direction:column}
.fan-steps li{display:flex; align-items:center; gap:12px; padding:11px 4px; font-size:15px; color:var(--muted); border-bottom:1px solid var(--line); transition:color .25s}
.fan-steps li:last-child{border-bottom:0}
.fan-dot{width:24px; height:24px; border-radius:50%; border:1.5px solid var(--line); color:transparent; display:flex; align-items:center; justify-content:center; flex:none; transition:all .25s}
.fan-dot svg{width:15px; height:15px}
.fan-steps li.active, .fan-steps li.done{color:var(--ink)}
.fan-steps li.done .fan-dot{background:var(--accent); border-color:var(--accent); color:#fff}
.fanalyze .fhero-note{margin-top:auto}

/* W6 free teaser */
.ft-head{text-align:center; margin-top:2px}
.ft-head .title{margin-top:2px}
.ft-arch{display:flex; align-items:center; gap:14px; background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:14px; box-shadow:var(--elev-1); margin-top:14px}
.ft-arch-face{flex:none; width:78px; height:78px; border-radius:50%; background:url('/img/wow-1.webp') 76% 20%/170% no-repeat; box-shadow:var(--elev-1)}
.ft-arch-lbl{font-size:11.5px; font-weight:700; color:var(--gold); text-transform:uppercase; letter-spacing:.12em}
.ft-traits{list-style:none; margin:9px 0 0; padding:0; display:flex; flex-direction:column}
.ft-traits li{display:flex; align-items:center; gap:10px; padding:7px 0; font-size:15px; font-weight:700; color:var(--ink); border-bottom:1px dotted var(--line)}
.ft-traits li:last-child{border-bottom:0}
.ft-traits li::before{content:""; width:7px; height:7px; border-radius:50%; background:var(--ink); flex:none}
.fteaser .lbl-sm{margin-top:18px}
.ft-secrets{display:flex; flex-direction:column; gap:8px}
.ft-secret{position:relative; display:flex; gap:12px; align-items:flex-start; background:var(--surface); border:1px solid var(--line); border-radius:14px; padding:13px 40px 13px 14px; box-shadow:var(--elev-1)}
.ft-num{flex:none; width:24px; height:24px; border-radius:50%; background:var(--accent-grad); color:#fff; font:800 13px/1 inherit; display:flex; align-items:center; justify-content:center; margin-top:1px}
.ft-secret p{margin:0; font-size:14px; line-height:1.4; color:var(--ink)}
.ft-secret.locked p{filter:blur(4.5px); user-select:none; color:var(--muted)}
.ft-secret.locked .ft-num{background:var(--wash); color:var(--muted)}
.ft-lock{position:absolute; right:13px; top:50%; transform:translateY(-50%); color:var(--muted); line-height:0}
.fteaser .btn{margin-top:16px}

/* ===================== W · Этап 3 (пейвол + успех + отчёт) ===================== */
/* W7 paywall (1:1 к референсу) */
.fpay-head{text-align:center; margin-top:2px}
.fpay-head .title{margin-top:2px}
.fpay-preview{display:flex; gap:8px; margin-top:20px; align-items:center; justify-content:center}
.fpay-thumb{position:relative; flex:1; aspect-ratio:3/4; border-radius:16px; background-size:cover; background-position:center 16%; box-shadow:var(--elev-2); overflow:hidden}
.fpay-thumb:first-child, .fpay-thumb:last-child{transform:scale(.9)}
.fpay-thumb:nth-child(2){transform:scale(1.1); z-index:2}
.fpay-thumb::after{content:""; position:absolute; inset:0; background:rgba(245,239,229,.3); backdrop-filter:blur(7px); -webkit-backdrop-filter:blur(7px)}
.fpay-lock{position:absolute; inset:0; z-index:2; display:flex; align-items:center; justify-content:center; color:var(--ink)}
.fpay-lock svg{width:22px; height:22px}
.fpay-incl{list-style:none; margin:24px 0 0; padding:0 4px; display:flex; flex-direction:column; gap:18px}
.fpay-incl li{display:flex; align-items:center; gap:13px; font-size:16px; font-weight:600; color:var(--ink)}
.fpay-ck{flex:none; width:26px; height:26px; border-radius:50%; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center}
.fpay-ck svg{width:14px; height:14px}
.fpay-cta{margin-top:auto; padding-top:20px}
.fpay-price{text-align:center; margin-bottom:14px}
.fpay-new{font-family:var(--serif); font-size:40px; font-weight:700; color:var(--ink); white-space:nowrap}
.fpay-btn{border-radius:100px}

/* W8 success */
.fdone{align-items:center; justify-content:center}
.fdone-hero{text-align:center; display:flex; flex-direction:column; align-items:center}
.fdone-badge{width:96px; height:96px; border-radius:50%; background:var(--accent-grad); color:#fff; display:flex; align-items:center; justify-content:center; box-shadow:var(--elev-accent); margin-bottom:20px}
.fdone-badge svg{width:46px; height:46px}
.fdone .title{margin:0}
.fdone .spinner{margin-top:22px}

/* W9 report */
.frep-top{text-align:center; margin-top:2px}
.frep-top .title{margin-top:2px}
.frep-wow{position:relative; margin-top:14px; border-radius:22px; overflow:hidden; box-shadow:var(--elev-2)}
.frep-wow img{width:100%; display:block}
.frep-sec{margin-top:8px}
.frep-ctype{display:flex; align-items:baseline; gap:10px; flex-wrap:wrap}
.frep-ctype b{font-family:var(--serif); font-size:22px; font-weight:700}
.frep-ctype span{color:var(--muted); font-size:13px}
.frep-palette{display:flex; flex-wrap:wrap; gap:8px; margin-top:12px}
.frep-palette span{width:38px; height:38px; border-radius:10px; box-shadow:inset 0 0 0 1px rgba(0,0,0,.07)}
.frep-img{width:100%; border-radius:16px; display:block; box-shadow:var(--elev-1); margin-top:2px}
.frep-desc{margin:11px 0 0; font-size:14.5px; line-height:1.5; color:var(--ink)}
.frep .ft-secret{padding-right:14px}
.frep .btn{margin-top:22px}
.frep-wow .fhero-tags{top:12px; left:12px; right:12px}

/* ===================== G · Этап 4 (Visual Identity профиль + партнёрка) ===================== */
.vid-hero{display:flex; align-items:center; gap:14px; background:var(--surface); border:1px solid var(--line); border-radius:18px; padding:14px; box-shadow:var(--elev-1); margin:4px 0 2px}
.vid-hero-img{flex:none; width:88px; height:118px; border-radius:14px; background-position:center 14%; background-size:170%; background-repeat:no-repeat; box-shadow:var(--elev-1)}
.vid-hero-body{display:flex; flex-direction:column; justify-content:center; min-width:0}
.vid-ctype{font-family:var(--serif); font-size:23px; font-weight:700; line-height:1.05}
.vid-hero .ft-traits{margin-top:8px}
.ct-swatches{display:grid; grid-template-columns:repeat(4,1fr); gap:12px 8px; margin-top:2px}
.ct-sw{display:flex; flex-direction:column; gap:6px}
.ct-sw i{display:block; aspect-ratio:1; border-radius:11px; box-shadow:inset 0 0 0 1px rgba(0,0,0,.07)}
.ct-sw span{font-size:10.5px; line-height:1.15; color:var(--muted); text-align:center}
.ct-emph{list-style:none; margin:0; padding:0; display:flex; flex-direction:column}
.ct-emph li{display:flex; align-items:center; gap:10px; padding:7px 0; font-size:15px; font-weight:700; color:var(--ink); text-transform:capitalize; border-bottom:1px dotted var(--line)}
.ct-emph li:last-child{border-bottom:0}
.ct-emph li::before{content:""; width:8px; height:8px; border-radius:50%; background:var(--ink); flex:none}

/* shop partner badge */
.p-thumb{position:relative; aspect-ratio:3/4; border-radius:16px 16px 0 0; background-size:cover; background-position:center}
.shop-partner{position:absolute; top:8px; left:8px; background:var(--accent); color:#fff; font:800 10px/1 inherit; text-transform:uppercase; letter-spacing:.05em; padding:5px 8px; border-radius:100px; box-shadow:0 3px 10px rgba(230,73,128,.28)}

/* ===================== page transitions (онбординг / воронка) ===================== */
@keyframes pageInFwd{from{opacity:0; transform:translateX(42px)} to{opacity:1; transform:translateX(0)}}
@keyframes pageInBack{from{opacity:0; transform:translateX(-42px)} to{opacity:1; transform:translateX(0)}}
.enter-fwd{animation:pageInFwd .38s cubic-bezier(.22,.61,.36,1) both}
.enter-back{animation:pageInBack .38s cubic-bezier(.22,.61,.36,1) both}
@media (prefers-reduced-motion:reduce){.enter-fwd,.enter-back{animation:none}}

/* main button fallback (browser only) + toast + errors */
.main-fallback{display:none; margin:0 16px 12px; padding:15px; border:0; border-radius:14px; background:var(--accent); color:var(--accent-ink); font:600 16px inherit; cursor:pointer}
.toast{position:fixed; left:50%; bottom:84px; transform:translateX(-50%) translateY(10px); background:var(--ink); color:var(--bg); font-size:13px; padding:10px 16px; border-radius:100px; opacity:0; pointer-events:none; transition:opacity .2s, transform .2s; z-index:99; max-width:80vw; text-align:center}
.toast.show{opacity:1; transform:translateX(-50%) translateY(0)}
.screen-error{padding:24px; color:var(--accent); font:13px/1.5 ui-monospace,Menlo,monospace}
