/* «Прайс-лист»: the interface as a well-set salon price list. Warm paper, ink, thin rules, real photos with
   captions, one accent (lipstick) only on the main action. Prata for headings (>= 28 px), Onest for everything else.
   Rules and sources: docs/DESIGN.md. No white cards, no shadows, no pills, no caps kickers. */
:root {
  --bg: #FAF7F2; --ink: #1F1A1C; --text: #1F1A1C; --muted: #655C5F; --rule: #E4DDD5; --field: #857D78;
  --accent: #8A1C3C; --accent-hover: #721730; --accent-text: #FFFFFF; --powder: #F3E7E3; --white: #FFFFFF;
  --ok-bg: #E8F2EC; --ok: #1E4D33; --error-bg: #FBEDEC; --error: #8E2A22; --plus: #1F6B3E; --minus: #8E2A22;
  --serif: Prata, Georgia, "Times New Roman", serif;
  --font: Onest, "Segoe UI", system-ui, -apple-system, sans-serif;
  --r: 8px; --r-photo: 4px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
img, video { display: block; max-width: 100%; }
[hidden] { display: none !important; }
main { max-width: 1168px; margin: 0 auto; padding: 40px 24px 72px; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em; line-height: 1.1; margin: 0 0 .5em; }
h1 { font-size: 3.25rem; }
h2 { font-size: 2.25rem; }
h3 { font-family: var(--font); font-size: 1.375rem; font-weight: 600; line-height: 1.25; margin: 0 0 .4em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num-tab { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
hr, .rule { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }

/* ---------- header, footer, tab bar ---------- */
.mock-banner { background: #FFB020; color: #1A1200; text-align: center; font-weight: 600; padding: 6px 16px; font-size: .875rem; }
.top { border-bottom: 1px solid var(--rule); }
.top-in { max-width: 1168px; margin: 0 auto; padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: inline-flex; align-items: center; min-height: 48px; font-family: var(--serif); font-size: 1.6rem; color: var(--ink); text-decoration: none; }
.logo:hover { color: var(--ink); }
.top-nav { display: flex; align-items: center; gap: 4px; }
.top-nav a:not(.btn) { display: inline-flex; align-items: center; min-height: 48px; padding: 0 12px; color: var(--ink); text-decoration: none;
  font-weight: 500; border-bottom: 2px solid transparent; }
.top-nav a:not(.btn):hover { border-bottom-color: var(--rule); }
.top-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 8px; }
.balance { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; color: var(--muted); text-decoration: none;
  font-variant-numeric: tabular-nums; }
.balance:hover { color: var(--ink); }
footer { max-width: 1168px; margin: 0 auto; padding: 24px 24px 48px; border-top: 1px solid var(--rule); color: var(--muted); font-size: .875rem; }
footer a, footer .link { color: var(--muted); font-size: inherit; }
.tabbar { display: none; }
.show-sm { display: none !important; }

/* ---------- buttons, fields, chips ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 24px;
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: var(--r); font: 600 1rem/1.2 var(--font);
  cursor: pointer; text-decoration: none; transition: background .15s, transform .1s; }
.btn:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: wait; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.ghost:hover { background: var(--powder); color: var(--ink); }
.btn.small { min-height: 44px; padding: 0 16px; font-size: .9375rem; }
.btn.wide { width: 100%; }
.btn.big { min-height: 56px; padding: 0 32px; font-size: 1.0625rem; }
.btn.dark { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.icon { padding: 0; width: 44px; }
button.link { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }
button.link.muted { color: var(--muted); }
.top-right button.link { min-height: 44px; padding: 0 8px; text-decoration: none; }
form.inline { display: inline; }

label { display: block; margin: 0 0 22px; font-weight: 600; font-size: .9375rem; }
input[type=email], input[type=password], input[type=text], input[type=number], textarea, select {
  display: block; width: 100%; margin-top: 6px; min-height: 48px; padding: 12px 14px; font: 400 1rem/1.4 var(--font); color: var(--ink);
  background: var(--white); border: 1px solid var(--field); border-radius: var(--r); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ink); outline-offset: 2px; }
textarea { resize: vertical; }
label.check { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: .9375rem; }
label.check input { margin-top: 3px; flex: none; width: 20px; height: 20px; accent-color: var(--accent); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.error { background: var(--error-bg); color: var(--error); padding: 12px 16px; border-radius: var(--r); margin-bottom: 16px; }
.notice { background: var(--powder); padding: 12px 16px; border-radius: var(--r); margin-bottom: 24px; }
.legend { font-weight: 600; font-size: .9375rem; margin: 0 0 10px; }
/* «Пригласите коллегу» (account): the link field + copy / share; wraps under each other on a phone */
.invite-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.invite-row input { flex: 1 1 240px; min-width: 0; }
.invite .legend { display: block; margin-top: 12px; }
.field { margin: 0 0 24px; }
.hint { font-weight: 400; color: var(--muted); font-size: .875rem; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; border: 0; padding: 0; margin: 0; }
.chip { position: relative; margin: 0; font-weight: 500; font-size: .9375rem; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip > span { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 14px; border-radius: var(--r);
  border: 1px solid var(--field); background: var(--white); cursor: pointer; }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip input:checked + span::before { content: ""; width: 10px; height: 6px; margin-right: 2px; border: 2px solid currentColor;
  border-top: 0; border-right: 0; transform: rotate(-45deg) translateY(-2px); flex: none; }
.chip input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.chips.boxed .chip input:checked + span::before { display: none; }
.dest-text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; }
.dest-text b { font-weight: 600; }
.dest-text small { font-size: .8125rem; color: var(--muted); font-weight: 400; }
.chip input:checked + span .dest-text small { color: #E6DFE1; }
.shape { display: inline-block; border: 1.5px solid currentColor; border-radius: 2px; flex: none; }
.swatch { width: 22px; height: 22px; border-radius: 4px; border: 1px solid rgba(0,0,0,.18); flex: none; }

/* ---------- photos with captions ---------- */
figure { margin: 0; }
figcaption, .caption { margin-top: 8px; font-size: .8125rem; color: var(--muted); }
.pill-label { position: absolute; bottom: 10px; font-size: .8125rem; font-weight: 600; padding: 2px 8px; border-radius: 4px;
  background: rgba(255,255,255,.9); color: var(--ink); }
.pill-label.on { background: var(--ink); color: var(--white); }
/* before/after: the photo "before" lies over the result, clipped at --pos */
.ba { position: relative; display: block; overflow: hidden; --pos: 50%; border-radius: var(--r-photo); }
.ba > img, .ba-before img { width: 100%; height: 100%; object-fit: cover; }
.ba-before { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--white); }
.ba-l { left: 10px; } .ba-r { right: 10px; }
@property --pos { syntax: "<percentage>"; inherits: true; initial-value: 50%; }
.ba-auto { animation: ba-once 2.6s cubic-bezier(.4, 0, .2, 1) .6s both; }
@keyframes ba-once { 0% { --pos: 88%; } 60% { --pos: 22%; } 100% { --pos: 50%; } }
.ba-knob { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 40px; height: 40px; border-radius: 50%;
  background: var(--white); color: var(--ink); display: flex; align-items: center; justify-content: center; }
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba:has(.ba-range:focus-visible) { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- guest page: pinned hero stage (scroll scrubs the video), then sections of different rhythm ---------- */
body { overflow-x: clip; }
.stage { position: relative; height: 165vh; margin: -40px calc(50% - 50vw) 0; }
.stage.is-still { height: auto; }
.stage-sticky { position: sticky; top: 0; height: 100vh; min-height: 560px; overflow: hidden; display: flex; align-items: center; }
.stage.is-still .stage-sticky { position: relative; height: 88vh; }
.stage-media { position: absolute; inset: 0; background: var(--bg); }
.stage-media video, .stage-media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; }
.stage-text { position: relative; width: 100%; max-width: 1168px; margin: 0 auto; padding: 0 24px; }
.stage-text > * { max-width: 520px; }
.stage-text h1 { font-size: 4rem; line-height: 1.04; margin: 0 0 20px; }
.stage-text .lead { margin-bottom: 28px; color: #4F4649; }
/* motion (desktop, not reduced): scroll --p (0→1) zooms the photo and lifts the headline; cursor --mx/--my parallax */
/* zoom stays small (1080p source, no blur); the headline reacts from the first scroll step and is gone by ~70 % */
.stage.moving .stage-media { transform: translate3d(calc(var(--mx, 0) * -14px), calc(var(--my, 0) * -8px), 0) scale(calc(1.025 + var(--p, 0) * .025));
  transition: transform .35s cubic-bezier(.2, .7, .3, 1); will-change: transform; }
.stage.moving .stage-text { transform: translate3d(calc(var(--mx, 0) * 8px), calc(var(--p, 0) * -180px), 0);
  opacity: calc(1 - var(--p, 0) * 1.45); transition: transform .25s cubic-bezier(.2, .7, .3, 1), opacity .25s linear; }
/* «alive» (not reduced motion, phone too): the frame breathes and a soft light slides over the skin;
   both fade out as the scroll story starts (--p) */
.stage.alive .stage-media { overflow: hidden; }
.stage.alive .stage-media video, .stage.alive .stage-media img { animation: stage-breathe 6.5s ease-in-out infinite; }
.stage.alive .stage-media::after { content: ""; position: absolute; inset: -20% -40%; pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 244, 236, .32) 50%, transparent 60%);
  mix-blend-mode: soft-light; opacity: calc(1 - var(--p, 0) * 6); animation: stage-glint 7s ease-in-out infinite; }
@keyframes stage-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.014) translateY(-0.4%); } }
@keyframes stage-glint { 0% { transform: translateX(-35%); } 55%, 100% { transform: translateX(35%); } }
.hero-note { margin: 14px 0 0; font-size: .875rem; color: var(--muted); }
.block { padding: 72px 0 0; }
.steps h2 { margin-bottom: 32px; }
.steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--ink); padding-top: 16px; }
.step-n { font-family: var(--serif); font-size: 3.5rem; line-height: 1; color: var(--accent); margin-bottom: 8px; }
.steps b { font-size: 1.125rem; font-weight: 600; }
.steps li > span:last-child { color: var(--muted); }
.call { margin: 88px calc(50% - 50vw) -72px; padding: 80px 24px; background: var(--powder); text-align: center; }
.call-line { font-family: var(--serif); font-size: 2.5rem; line-height: 1.15; max-width: 760px; margin: 0 auto 28px; }

/* owner tweak panel (?tweaks=1) */
.tweaks { position: fixed; right: 16px; bottom: 16px; z-index: 50; width: 240px; padding: 14px; background: var(--white);
  border: 1px solid var(--ink); border-radius: var(--r); font-size: .875rem; display: flex; flex-direction: column; gap: 8px; }
.tweaks label { margin: 0; font-size: .8125rem; }
.tweaks select { min-height: 40px; margin-top: 4px; padding: 6px 10px; font-size: .875rem; }
.tweaks a { font-size: .8125rem; }
@media (max-width: 720px) { .tweaks { bottom: 84px; left: 16px; right: 16px; width: auto; } }

.lead { font-size: 1.1875rem; color: var(--muted); max-width: 30em; margin: 0 0 28px; }

/* ---------- price list: the template picker ---------- */
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--rule);
  padding-bottom: 12px; margin-bottom: 28px; }
.section-head h2 { margin: 0; }
.section-head a { display: inline-flex; align-items: center; min-height: 44px; }
.menu { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; }
.menu-item { display: grid; width: 100%; text-align: left; padding: 0; background: none; border: 0; color: var(--ink); font: inherit;
  cursor: pointer; text-decoration: none; grid-template-columns: auto 1fr auto; grid-template-areas: "photo photo photo" "num title price" ". desc desc";
  column-gap: 12px; row-gap: 4px; }
.menu-item:hover { color: var(--ink); }
.mi-photo { grid-area: photo; aspect-ratio: 4 / 5; margin-bottom: 14px; overflow: hidden; border-radius: var(--r-photo); background: var(--powder); position: relative; }
.mi-photo img, .mi-photo video { width: 100%; height: 100%; object-fit: cover; transition: filter .2s; }
.menu-item:hover .mi-photo img, .menu-item:hover .mi-photo video { filter: brightness(.92); }
.mi-num { grid-area: num; font-size: .75rem; font-weight: 600; letter-spacing: .06em; color: var(--muted); padding-top: 5px; font-variant-numeric: tabular-nums; }
.mi-title { grid-area: title; font-size: 1.125rem; font-weight: 600; display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.mi-title::after { content: ""; flex: 1; border-bottom: 1.5px dotted var(--field); transform: translateY(-4px); min-width: 16px; }
.mi-price { grid-area: price; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mi-desc { grid-area: desc; color: var(--muted); font-size: .9375rem; }
.menu-item:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; }
.menu-own { grid-column: 1 / -1; border-top: 1px solid var(--rule); padding-top: 20px; }
/* section heads of the price list: «Подарки и акции», «Цены и запись»… */
.menu-group { grid-column: 1 / -1; font-family: var(--serif); font-size: 1.375rem; padding: 8px 0 0;
  border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: -16px; }
.menu-group:first-child { padding-top: 0; }
.menu-own .menu-item { grid-template-areas: "num title price" ". desc desc"; }
.mi-ba { position: absolute; inset: 0; }
.mi-ba .ba { height: 100%; border-radius: 0; }

/* ---------- studio form ---------- */
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin-bottom: 8px; color: var(--ink); text-decoration: none; font-weight: 500; }
.back:hover { color: var(--accent); }
.studio { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; }
.studio-main { margin: 0; min-width: 0; }
#form-title { margin: 0 0 8px; font-size: 2.75rem; }
#form-desc { margin: 0 0 32px; color: var(--muted); font-size: 1.0625rem; }
.form-kicker { display: none; }
.studio-side { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.side-preview { aspect-ratio: 4 / 5; border-radius: var(--r-photo); overflow: hidden; background: var(--powder); }
.side-preview img, .side-preview video { width: 100%; height: 100%; object-fit: cover; }
.side-tip { color: var(--muted); font-size: .9375rem; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 168px;
  border: 1.5px solid var(--field); border-radius: var(--r); background: var(--white); text-align: center; padding: 20px; cursor: pointer; font-weight: 400; }
.drop:hover, .drop.has-file { border-color: var(--ink); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.drop-icon { color: var(--ink); }
.drop b { font-weight: 600; }
.drop img { max-height: 160px; border-radius: var(--r-photo); }
.natural { display: flex; gap: 10px; color: var(--ok); font-size: .9375rem; margin: -8px 0 24px; }
.summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px;
  border-top: 1px solid var(--rule); margin-top: 8px; }
.cost { display: flex; flex-direction: column; line-height: 1.25; }
.cost-label { font-size: .875rem; color: var(--muted); }
.cost-value { font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.tab { min-height: 44px; padding: 0 18px; border: 1px solid var(--field); background: var(--white); color: var(--ink); border-radius: var(--r);
  font: 500 1rem var(--font); cursor: pointer; }
.tab.active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.models { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 24px; border: 0; padding: 0; margin: 0 0 24px; }
.model { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 0 14px 30px; margin: 0; border-bottom: 1px solid var(--rule);
  cursor: pointer; font-weight: 400; }
.model[hidden], label[hidden], div[hidden], p[hidden], section[hidden] { display: none; }
.model input { position: absolute; left: 0; top: 17px; width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.m-title { font-weight: 600; }
.model .muted { font-size: .875rem; }
.tag { font-size: .8125rem; font-weight: 500; color: var(--muted); }
.price { font-weight: 600; font-variant-numeric: tabular-nums; margin: 4px 0 0; }
.animate-src { display: flex; gap: 16px; align-items: center; margin: 0 0 24px; padding-bottom: 24px; border-bottom: 1px solid var(--rule); }
.animate-src img { width: 80px; height: 100px; object-fit: cover; border-radius: var(--r-photo); flex: none; }
.animate-src p { margin: 4px 0 8px; }
.reuse-note { color: var(--muted); margin: 0 0 16px; font-size: .9375rem; }

/* ---------- result ---------- */
.result-grid { display: grid; grid-template-columns: 7fr 5fr; gap: 56px; align-items: start; }
.result-media { min-width: 0; }
.result-head { margin-bottom: 20px; }
.result-head h2 { font-size: 2.75rem; margin: 0 0 4px; }
.ok-mark { display: none; }
#output img, #output video { max-width: 100%; max-height: 74vh; border-radius: var(--r-photo); }
#output .ba-result > img { display: block; max-height: 74vh; max-width: 100%; margin: 0; border-radius: 0; }
#output .ba-before img { max-height: none; border-radius: 0; }
.ba-result { width: fit-content; max-width: 100%; touch-action: pan-y; }
.result-side { display: flex; flex-direction: column; gap: 12px; }
.peak { font-size: 1.0625rem; margin: 0 0 8px; }
.next { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.next a { display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 0; border-bottom: 1px solid var(--rule);
  color: var(--ink); text-decoration: none; }
.next a:hover b { text-decoration: underline; }
.next svg { flex: none; color: var(--accent); }
.next b { font-weight: 600; }
.next span { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
.formats { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.formats a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border: 1px solid var(--field); border-radius: var(--r);
  color: var(--ink); text-decoration: none; font-size: .9375rem; }
.formats a:hover { border-color: var(--ink); }
.waiting { padding: 24px 0; color: var(--muted); max-width: 32em; }
.progress { height: 4px; margin: 0 0 16px; background: var(--rule); overflow: hidden; }
.progress i { display: block; height: 100%; width: 3%; background: var(--accent); transition-property: width; transition-timing-function: cubic-bezier(.2, .6, .3, 1); }
.spinner { width: 32px; height: 32px; margin: 16px auto; border: 3px solid var(--rule); border-top-color: var(--ink); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fade-in .2s ease-out both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- recent + gallery ---------- */
.recent { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.recent a { position: relative; display: block; color: var(--ink); text-decoration: none; }
.recent img { aspect-ratio: 4 / 5; width: 100%; object-fit: cover; border-radius: var(--r-photo); background: var(--powder); }
.play-badge { position: absolute; left: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,.92);
  color: var(--ink); display: flex; align-items: center; justify-content: center; }
.gallery-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--rule);
  padding-bottom: 16px; margin-bottom: 28px; }
.gallery-head h1 { margin: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button { min-height: 44px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--field); background: var(--white); color: var(--ink);
  font: 500 .9375rem var(--font); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 36px 24px; }
.item { display: flex; flex-direction: column; min-width: 0; }
.item[hidden] { display: none; }
.preview { aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; background: var(--powder); overflow: hidden; border-radius: var(--r-photo); }
.preview img, .preview video { width: 100%; height: 100%; object-fit: cover; }
.item-body { padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.item-line { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.item-actions { margin-left: -8px; }
.item-title { font-weight: 600; }
.ph { text-align: center; color: var(--muted); padding: 12px; font-size: .9375rem; }
.ph.fail { color: var(--error); }
.prompt { margin: 0; font-size: .875rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-actions { display: flex; align-items: center; gap: 4px; }
.dl { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 8px; color: var(--accent); font-weight: 600; text-decoration: none; }
.more { position: relative; }
.more summary { list-style: none; display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: var(--r);
  cursor: pointer; color: var(--ink); }
.more summary::-webkit-details-marker { display: none; }
.more summary:hover, .more[open] summary { background: var(--powder); }
.more-menu { position: absolute; right: 0; bottom: 48px; z-index: 5; min-width: 200px; background: var(--white); border: 1px solid var(--rule);
  border-radius: var(--r); padding: 4px; display: flex; flex-direction: column; }
.more-menu a, .more-menu button { display: flex; align-items: center; min-height: 44px; padding: 0 12px; border: 0; background: none; color: var(--ink);
  font: inherit; text-align: left; text-decoration: none; border-radius: 6px; cursor: pointer; width: 100%; }
.more-menu a:hover, .more-menu button:hover { background: var(--powder); }
.more-menu .danger { color: var(--error); }
.empty { padding: 48px 0; max-width: 32em; }

/* ---------- pricing, account, admin, docs (kept) ---------- */
.panel { background: var(--white); border: 1px solid var(--rule); border-radius: var(--r); padding: 28px; margin-bottom: 24px; }
.panel.narrow { max-width: 460px; margin: 24px auto; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 24px; }
.card { padding: 20px 0; border-bottom: 1px solid var(--rule); }
.card h3 { margin: 4px 0; }
.offer .btn { margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .875rem; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.plus { color: var(--plus); } .minus { color: var(--minus); }
tr.blocked td { background: var(--error-bg); }
.scroll { overflow-x: auto; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat { padding: 16px 0; border-top: 2px solid var(--ink); display: flex; flex-direction: column; }
.stat b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.demo-tag { display: inline-block; margin-left: 10px; font-size: .875rem; font-weight: 600; color: #8A5300; }
.placeholder { background: #FFB020; color: #1A1200; font-weight: 600; padding: 10px 14px; border-radius: var(--r); margin-bottom: 16px; }
.doc { max-width: 760px; margin: 0 auto 16px; }

@media (prefers-reduced-motion: reduce) {
  .ba-auto { animation: none; }
  .fade-in { animation: none; }
  .progress i { transition: none; width: 60% !important; }
  .btn, .mi-photo img { transition: none; }
}

/* ---------- tablet ---------- */
@media (max-width: 1000px) {
  .stage-text h1 { font-size: 3rem; }
  .stage-text > * { max-width: 440px; }
  .steps ol { grid-template-columns: 1fr; gap: 20px; }
  .menu { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .studio, .result-grid { grid-template-columns: 1fr; gap: 32px; }
  .studio-side { position: static; }
  .recent { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- phone ---------- */
@media (max-width: 720px) {
  main { padding: 20px 16px 40px; }
  .top-in { padding: 4px 16px; }
  .logo { font-size: 1.4rem; }
  .top-nav:not(.guest), .hide-sm { display: none !important; }
  .show-sm { display: inline !important; }
  h1 { font-size: 2.125rem; }
  h2 { font-size: 1.75rem; }
  .lead { font-size: 1rem; margin-bottom: 20px; }
  /* phone: the photo/video is its own block above the text (the headline must not cover the flower) */
  .stage, .stage.is-still { height: auto; margin: -20px -16px 0; }
  .stage-sticky, .stage.is-still .stage-sticky { position: relative; height: auto; min-height: 0; display: block; }
  .stage-media { position: relative; aspect-ratio: 4 / 5; }
  .stage-media video { object-position: 57% 40%; }
  .stage.cut45 .stage-media video { object-position: 50% 50%; }
  .stage-media img { object-position: 80% 40%; }
  .stage-text { padding: 24px 16px 0; }
  .stage-text h1 { font-size: 2.25rem; }
  .stage-text .btn.big { width: 100%; min-height: 52px; }
  /* phone «reveal» (owner's choice 2026-10-18): one screen pinned; first only her face (photo melts into the paper,
     a «Листайте» hint), scrolling opens her eyes, and near the end the headline and the button rise over the bottom
     of the photo (--reveal 0→1, set by stage.js); then the page moves on */
  .stage.scrub { height: 140vh; height: 140svh; }  /* short pin: the clip ends 160 px after release (stage.js) */
  .stage.scrub .stage-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: block; }
  /* everything absolutely placed: «height: 100%» inside a flex item collapsed the clip to 0 on a real phone; the first
     frame sits under the clip as a background, so the photo shows even if the browser never paints the video */
  .stage.scrub .stage-media { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: min(100%, 150vw);
    aspect-ratio: auto; background: var(--bg) center / cover no-repeat;
    -webkit-mask-image: linear-gradient(#000 72%, transparent); mask-image: linear-gradient(#000 72%, transparent); }
  .stage.scrub .stage-media video, .stage.scrub .stage-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
  .stage.scrub .stage-text .lead { margin-bottom: 18px; }
  .stage.scrub .hero-note { margin-top: 10px; }
  .stage.scrub .stage-text { position: absolute; left: 0; right: 0; bottom: 0; padding: 72px 16px 20px;
    background: linear-gradient(rgba(250, 247, 242, 0), var(--bg) 64px); opacity: var(--reveal, 0);
    transform: translateY(calc((1 - var(--reveal, 0)) * 48px)); pointer-events: none; }
  .stage.scrub.revealed .stage-text { pointer-events: auto; }
  .stage-hint { display: none; }
  .stage.scrub .stage-hint { display: flex; align-items: center; gap: 4px; justify-content: center; position: absolute;
    left: 0; right: 0; top: calc(min(100vh, 150vw) - 64px); margin: 0;  /* on the photo's fade, visible under the header */ font-size: .875rem; color: var(--muted); opacity: calc(1 - var(--p, 0) * 8); }
  .stage.scrub .stage-hint svg { animation: hint-bob 1.6s ease-in-out infinite; }
  @keyframes hint-bob { 50% { transform: translateY(4px); } }
  .block { padding-top: 48px; }
  .step-n { font-size: 2.75rem; }
  .call { margin: 56px -16px -40px; padding: 48px 16px; }
  .call-line { font-size: 1.75rem; }
  /* phone: two columns of cards — a big 4:5 example, a short name, the price under it (owner 2026-10-18: «примеры
     маленькие, для названий много места»). Numbers and descriptions only on desktop: the form repeats the description
     (Hick: less at a time); the whole card is the tap target */
  .menu { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .menu-item { grid-template-columns: 1fr; grid-template-areas: "photo" "title" "price"; row-gap: 2px; }
  .mi-photo { margin-bottom: 8px; }
  .mi-num, .mi-desc { display: none; }
  .mi-title { font-size: .9375rem; line-height: 1.25; }
  .mi-title::after { display: none; }
  .mi-price { font-size: .84375rem; font-weight: 400; color: var(--muted); }
  .menu-group { font-size: 1.25rem; margin-bottom: -8px; }
  .menu-own { border-top: 1px solid var(--rule); padding-top: 4px; }
  .menu-own .menu-item { grid-template-columns: 1fr auto; grid-template-areas: "title price" "desc desc"; min-height: 64px;
    align-content: center; }
  .menu-own .mi-desc { display: block; font-size: .84375rem; }
  .menu-own .mi-price { color: var(--ink); font-weight: 600; }
  .mi-ba .pill-label { display: none; }
  .section-head { margin-bottom: 0; }
  #form-title { font-size: 2.125rem; }
  .studio-side { display: none; }
  .summary { position: sticky; bottom: calc(64px + env(safe-area-inset-bottom)); z-index: 5; margin: 0 -16px; padding: 12px 16px;
    background: var(--bg); box-shadow: 0 -1px 0 var(--rule); flex-wrap: nowrap; }
  .summary .btn { flex: 1; min-height: 52px; }
  .cost-value { font-size: 1.25rem; }
  .cost-label { font-size: .8125rem; }
  .result-head h2 { font-size: 2.125rem; }
  .recent { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 24px 12px; }
  .prompt { display: none; }
  .item-line { flex-wrap: wrap; }
  .dl span { display: none; }
  .panel { padding: 20px 16px; }
  body.has-tabbar { padding-bottom: 76px; }
  .tabbar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
    background: var(--bg); border-top: 1px solid var(--rule); padding: 4px 0 calc(4px + env(safe-area-inset-bottom)); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 56px; justify-content: center;
    color: var(--muted); text-decoration: none; font-size: .75rem; font-weight: 500; }
  .tabbar a[aria-current="page"] { color: var(--ink); font-weight: 700; }
  .tabbar a[aria-current="page"] svg { color: var(--accent); }
}

/* «Рилс из ваших видео»: the storyboard the master edits before the montage, and her corrections after it.
   Same price-list language: thin rules between rows, a real frame on the left, no cards or shadows. */
.plan { max-width: 760px; }
.plan h1 { font-size: 2.5rem; }
.shots { list-style: none; padding: 0; margin: 24px 0; counter-reset: shot; }
.shot { display: grid; grid-template-columns: 112px 1fr; gap: 20px; padding: 20px 0; border-top: 1px solid var(--rule); }
.shot:last-child { border-bottom: 1px solid var(--rule); }
.shot img { width: 112px; height: 199px; object-fit: cover; border-radius: var(--r-photo); background: var(--powder); }
.shot-meta { margin: 0 0 10px; color: var(--muted); font-size: .9375rem; }
.shot-meta b { color: var(--ink); }
.shot label { margin-bottom: 12px; }
.shot .row { display: flex; gap: 12px; flex-wrap: wrap; }
.shot .row label { flex: 1 1 160px; }
.shot-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.replan { margin: 24px 0 8px; }
.replan textarea { margin-bottom: 12px; }
.revise { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--rule); max-width: 560px; }
.revise textarea { margin: 8px 0 12px; }
.revise-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .plan h1 { font-size: 2rem; }
  .shot { grid-template-columns: 84px 1fr; gap: 14px; }
  .shot img { width: 84px; height: 149px; }
}
.shot-pic { position: relative; align-self: start; }
.shot-pic.pick { cursor: crosshair; }
.shot-pic.pick img { height: auto; } /* the whole frame, so a tap maps to the real spot on it */
.shot-pic .dot { position: absolute; transform: translate(-50%, -50%); width: 26px; height: 26px; border-radius: 50%;
  background: var(--white); color: var(--ink); border: 2px solid var(--ink); font: 600 .8125rem/22px var(--font); text-align: center;
  pointer-events: none; }
.shot-pic .dot.on { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.shot-tools .btn { min-width: 48px; }

/* e-mail code, promo, «Сообщить о проблеме» */
.link-btn { background: none; border: 0; padding: 0; min-height: 44px; color: var(--accent); text-decoration: underline;
  text-underline-offset: 3px; font: inherit; cursor: pointer; }
.resend { margin-top: 16px; }
.feedback { margin-top: 16px; }
.feedback summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--accent);
  text-decoration: underline; text-underline-offset: 3px; }
.feedback form { max-width: 520px; margin-top: 8px; }
.feedback textarea { margin: 6px 0 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }

/* admin: sections nav, forms in a row, result thumbs */
.admin-nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 16px; }
.admin-nav a { display: inline-flex; align-items: center; min-height: 44px; }
.admin-form { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-end; margin-bottom: 16px; }
.admin-form label { flex: 1 1 180px; margin: 0; }
.admin-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: var(--r-photo); }
.resend .btn:disabled { opacity: .6; cursor: default; }
.other-mail { display: inline-flex; align-items: center; min-height: 44px; margin-left: 16px; }

/* photo picker (static/picker.js): drafts as tiles with a spinner and a remove button; drag-and-drop highlight */
.drop.drag { border-color: var(--accent); background: var(--powder); }
.picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 12px; }
.pick { position: relative; aspect-ratio: 1 / 1; border: 1px solid var(--rule); border-radius: var(--r-photo); overflow: hidden;
  background: var(--powder); }
.pick img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pick.uploading img { opacity: .55; }
.pick-spin { position: absolute; inset: 0; margin: auto; width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .7); border-top-color: var(--accent); animation: pick-spin .8s linear infinite; }
@keyframes pick-spin { to { transform: rotate(360deg); } }
.pick-err { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; background: var(--error-bg); color: var(--error);
  font-size: .75rem; text-align: center; }
.pick-remove { position: absolute; top: 2px; right: 2px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(31, 26, 28, .72); color: #fff; font-size: 1.125rem; line-height: 1; cursor: pointer; }
.pick-remove:hover { background: rgba(31, 26, 28, .92); }

/* quick template dialog: example on the left, photo + price + «Создать» on the right; a full-screen sheet on a phone */
body.qm-open { overflow: hidden; }
.qm { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(31, 26, 28, .55); }
.qm-card { position: relative; display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: 28px; width: min(820px, 100%);
  max-height: calc(100dvh - 48px); overflow-y: auto; padding: 24px; background: var(--bg); border-radius: 16px; }
.qm-preview { border-radius: var(--r-photo); overflow: hidden; background: var(--powder); align-self: start; }
.qm-preview img, .qm-preview video { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; }
.qm-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.qm-body h2 { font-size: 2rem; margin: 0; }
.qm-body .muted { margin: 0; }
.qm-drop { min-height: 132px; }
.qm-meta { display: flex; gap: 32px; margin: 4px 0 0; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.qm-meta dt { font-size: .8125rem; color: var(--muted); }
.qm-meta dd { margin: 0; font-weight: 600; font-size: 1.125rem; }
.qm-go { width: 100%; }
.qm-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); font-size: 1.5rem; cursor: pointer; }
.qm-close:hover { background: var(--powder); }
@media (max-width: 640px) {
  .qm { padding: 0; align-items: stretch; }
  .qm-card { display: flex; flex-direction: column; gap: 16px; width: 100%; max-height: 100dvh; height: 100dvh; border-radius: 0;
    padding: 16px; }
  .qm-preview, .qm-body { flex: none; }
  .qm-preview img, .qm-preview video { aspect-ratio: 16 / 10; }
  .qm-body h2 { font-size: 1.625rem; padding-right: 0; }
  .qm-close { position: fixed; background: rgba(250, 247, 242, .9); }
}

/* cookie notice (only when METRIKA_ID is set); above the phone tab bar */
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 40; display: flex; align-items: center; gap: 8px 16px;
  width: fit-content; max-width: calc(100% - 32px); margin: 0 auto; padding: 10px 12px 10px 18px; background: var(--bg);
  border: 1px solid var(--rule); border-radius: 12px; box-shadow: 0 6px 24px rgba(31, 26, 28, .14); }
.cookie-bar p { margin: 0; font-size: .9375rem; }
.cookie-bar .link-btn { color: var(--muted); }
@media (max-width: 640px) {
  .cookie-bar { flex-wrap: wrap; width: auto; bottom: calc(72px + env(safe-area-inset-bottom)); }
  .cookie-bar p { flex: 1 1 100%; }
}
.logout-all { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 14px; }
