:root {
  --bg: #070708; --bg2: #101012; --card: rgba(255,255,255,.035); --line: rgba(255,255,255,.09); --line2: rgba(255,255,255,.2);
  --text: #f1eee9; --muted: #8b8b90; --accent: #c8e6c0; --glow: rgba(120,170,110,.22);
  --danger: #ef7b73; --ok: #7fd49a; --pink: #e0245e;
  --sans: 'Bricolage Grotesque', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Instrument Serif', 'Playfair Display', Georgia, serif;
  --r: 22px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--text); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  background: var(--bg) radial-gradient(1000px 520px at 50% -140px, rgba(100,150,95,.17), transparent 70%) no-repeat; min-height: 100vh; }
body.grid-bg::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 70px 70px; -webkit-mask-image: radial-gradient(ellipse at 50% 0, #000 10%, transparent 72%); mask-image: radial-gradient(ellipse at 50% 0, #000 10%, transparent 72%); opacity: .55; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.wrap { width: min(1280px, 100% - 40px); margin: 0 auto; }
h1, h2, h3 { font-weight: 500; letter-spacing: -.02em; margin: 0; }
em, .it { font-family: var(--serif); font-style: italic; font-weight: 400; color: #bdbdc2; letter-spacing: 0; }

/* ---------- кнопки (стиль как на референсе: стеклянные «таблетки») ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; white-space: nowrap;
  padding: 10px 20px; border-radius: 12px; font: 600 14px var(--sans); color: var(--text);
  background: linear-gradient(180deg, #3b3b3e 0%, #1c1c1e 100%); border: 1px solid rgba(255,255,255,.38);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), 0 6px 18px rgba(0,0,0,.45); transition: .18s; }
.btn:hover { border-color: rgba(255,255,255,.7); transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--muted); }
.btn.ghost:hover { color: var(--text); border-color: transparent; transform: none; }
.btn.outline { background: rgba(255,255,255,.03); border-color: var(--line2); box-shadow: none; }
.btn.light { background: linear-gradient(180deg, #fff, #d9d9d9); color: #0b0b0c; border-color: #fff; }
.btn.danger { color: var(--danger); }
.btn.small { padding: 7px 14px; font-size: 13px; border-radius: 10px; }
.btn.primary { background: linear-gradient(180deg, #4a5a47 0%, #232b21 100%); border-color: rgba(200,230,190,.55); }
.btn[disabled], .btn.disabled { opacity: .4; pointer-events: none; }

/* ---------- верхняя панель ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(7,7,8,.7); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; flex-wrap: wrap; padding: 8px 0; }
.brand { font-size: 22px; font-weight: 600; letter-spacing: -.03em; }
.brand small { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--muted); font-size: 18px; margin-left: 6px; }
.nav { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.nav a { padding: 9px 18px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: 14px; border: 1px solid transparent; transition: .18s; }
.nav a:hover { color: var(--text); }
.nav a.on { color: var(--text); background: linear-gradient(180deg, #3b3b3e 0%, #1c1c1e 100%); border-color: rgba(255,255,255,.38); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.pillbox { display: flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); }

/* ---------- публичная главная ---------- */
.hero { padding: 130px 0 70px; text-align: center; }
.hero h1 { font-size: clamp(46px, 8vw, 104px); line-height: 1; }
.hero p { color: var(--muted); font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.6vw, 30px); margin-top: 18px; }
.section { padding: 56px 0; }
.section > .wrap > h2 { font-size: clamp(34px, 5vw, 56px); margin-bottom: 30px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.card { position: relative; display: block; aspect-ratio: 4/5; overflow: hidden; background: var(--bg2); border-radius: var(--r); border: 1px solid var(--line); }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s ease; }
.card:hover img { transform: scale(1.05); }
.card .cap { position: absolute; inset: auto 0 0 0; padding: 70px 22px 22px; background: linear-gradient(transparent, rgba(0,0,0,.78)); font-size: 24px; font-weight: 500; }
.about { max-width: 740px; color: #cfcbc4; font-size: 19px; white-space: pre-line; }
.foot { border-top: 1px solid var(--line); margin-top: 60px; padding: 36px 0 50px; color: var(--muted); font-size: 14px; text-align: center; }

/* ---------- клиентская галерея ---------- */
.ghead { text-align: center; padding: 64px 0 28px; }
.ghead h1 { font-size: clamp(36px, 6vw, 72px); line-height: 1.05; }
.ghead p { color: var(--muted); margin: 12px 0 0; font-family: var(--serif); font-style: italic; font-size: 22px; }
.bar { position: sticky; top: 68px; z-index: 15; background: rgba(7,7,8,.82); backdrop-filter: blur(12px); border-block: 1px solid var(--line); }
.bar .wrap { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; padding: 10px 0; }
.bar .count { color: var(--muted); font-size: 14px; margin-right: 6px; }
.full, main.wrap:has(> #grid) { width: 100%; max-width: none; margin: 0; padding: 0 8px; }
.grid { width: 100%; padding: 8px 0 40px; }
.jrow { display: flex; gap: 8px; margin-bottom: 8px; justify-content: center; }
.tile { position: relative; flex: none; cursor: zoom-in; background: var(--bg2); overflow: hidden; border-radius: 6px; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: filter .3s, transform .6s; }
.tile:hover img { filter: brightness(.85); transform: scale(1.015); }
.heart { position: absolute; right: 10px; bottom: 10px; width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.5); backdrop-filter: blur(6px); cursor: pointer; display: grid; place-items: center; transition: .15s; padding: 0; }
.heart svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 2; }
.heart.on { background: #fff; border-color: #fff; }
.heart.on svg { fill: var(--pink); stroke: var(--pink); }
.heart:hover { transform: scale(1.1); }
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(4,4,5,.97); display: none; }
.lb.open { display: block; }
.lb .stage { position: absolute; inset: 64px 76px 56px; display: grid; place-items: center; }
.lb .stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; }
.lb .ctl { position: absolute; display: flex; gap: 10px; align-items: center; }
.lb .tl { top: 12px; right: 14px; }
.lb .tlc { top: 22px; left: 20px; color: var(--muted); font-size: 14px; }
.lb .nv { position: absolute; top: 50%; transform: translateY(-50%); width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--line2); background: rgba(255,255,255,.06); color: #fff; font-size: 26px; cursor: pointer; }
.lb .nv:hover { background: rgba(255,255,255,.16); }
.lb .prev { left: 12px; } .lb .next { right: 12px; }
.empty { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---------- формы ---------- */
.box { width: min(430px, 100% - 32px); margin: 15vh auto; text-align: center; padding: 38px 32px; border: 1px solid var(--line); border-radius: 28px; background: var(--card); box-shadow: 0 0 80px var(--glow); }
.box h1 { font-size: 40px; margin-bottom: 8px; }
.box p { color: var(--muted); }
input[type=text], input[type=password], input[type=email], input[type=date], input[type=search], textarea, select {
  width: 100%; padding: 12px 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--text); border-radius: 12px; font: inherit; }
input[type=date] { color-scheme: dark; }
select { color-scheme: dark; }
input:focus, textarea:focus, select:focus { outline: none; border-color: rgba(200,230,190,.6); }
label { display: block; font-size: 13px; color: var(--muted); margin: 14px 0 6px; text-align: left; }
label.chk { display: flex; gap: 10px; align-items: center; color: var(--text); font-size: 15px; margin: 10px 0; cursor: pointer; }
label.chk input { width: 18px; height: 18px; accent-color: #9fcf95; }
.err { color: var(--danger); margin: 12px 0 0; }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; text-align: left; }

/* ---------- админка ---------- */
.page { padding: 38px 0 80px; }
.ptitle { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.ptitle h1 { font-size: clamp(34px, 5vw, 54px); line-height: 1.05; }
.sub { color: var(--muted); margin-top: 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 26px; }
.stat { padding: 18px 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); }
.stat b { display: block; font-size: 32px; font-weight: 500; letter-spacing: -.03em; }
.stat span { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.toolbar input[type=search] { max-width: 320px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); font-size: 13px; cursor: pointer; background: transparent; font-family: var(--sans); }
.chip.on { color: var(--text); border-color: var(--line2); background: rgba(255,255,255,.07); }
.gcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gcard { display: block; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); overflow: hidden; transition: .25s; }
.gcard:hover { border-color: rgba(200,230,190,.4); box-shadow: 0 10px 50px var(--glow); transform: translateY(-3px); }
.gcard .cv { position: relative; aspect-ratio: 4/3; background: linear-gradient(135deg, #18181b, #0c0c0d); }
.gcard .cv img { width: 100%; height: 100%; object-fit: cover; }
.gcard .cv .badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; }
.gcard .in { padding: 16px 18px 18px; }
.gcard h3 { font-size: 20px; margin-bottom: 4px; }
.gcard .mt { color: var(--muted); font-size: 13px; }
.gcard .mx { display: flex; gap: 14px; margin-top: 12px; font-size: 13px; color: #c9c9ce; }
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.62); backdrop-filter: blur(6px); border: 1px solid var(--line2); }
.badge.ok { color: var(--ok); } .badge.off { color: var(--muted); }
.newcard { display: grid; place-items: center; min-height: 250px; border: 1px dashed var(--line2); border-radius: var(--r); color: var(--muted); cursor: pointer; background: transparent; font: 600 15px var(--sans); transition: .2s; }
.newcard:hover { color: var(--text); border-color: rgba(200,230,190,.5); }
.newcard span { display: block; font-size: 38px; line-height: 1; margin-bottom: 8px; font-family: var(--serif); }
.tabs { display: flex; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.025); margin-bottom: 26px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 9px 18px; border-radius: 12px; color: var(--muted); font-weight: 600; font-size: 14px; border: 1px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); background: linear-gradient(180deg, #3b3b3e, #1c1c1e); border-color: rgba(255,255,255,.38); box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }
.panel { border: 1px solid var(--line); border-radius: var(--r); background: var(--card); padding: 24px; margin-bottom: 20px; }
.panel h2 { font-size: 26px; margin-bottom: 16px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.drop { border: 1.5px dashed var(--line2); border-radius: 18px; padding: 44px 20px; text-align: center; color: var(--muted); cursor: pointer; transition: .2s; }
.drop b { display: block; color: var(--text); font-size: 18px; margin-bottom: 4px; font-weight: 500; }
.drop.over, .drop:hover { border-color: rgba(200,230,190,.6); background: rgba(120,170,110,.06); }
.prog { height: 6px; background: var(--line); border-radius: 9px; overflow: hidden; margin-top: 14px; display: none; }
.prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7fb674, #c8e6c0); transition: width .2s; }
.agrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.acard { position: relative; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.acard img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.acard .n { padding: 7px 10px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acard .lk { position: absolute; top: 8px; left: 8px; background: var(--pink); color: #fff; font-size: 12px; padding: 2px 9px; border-radius: 99px; font-weight: 600; }
.acard .cvr { position: absolute; bottom: 34px; left: 8px; background: #fff; color: #000; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 99px; }
.acard .acts { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: .15s; }
.acard:hover .acts { opacity: 1; }
.acard .acts button { border: 0; background: rgba(0,0,0,.78); color: #fff; border-radius: 8px; padding: 5px 9px; cursor: pointer; font: 600 12px var(--sans); }
.log { font-size: 14px; display: grid; }
.log div { display: flex; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.log div:last-child { border: 0; }
.log time { color: var(--muted); min-width: 130px; }
.linkbox { display: flex; gap: 10px; flex-wrap: wrap; }
.linkbox input { flex: 1; min-width: 230px; }
.visitor { margin-bottom: 26px; }
.visitor h3 { font-size: 20px; margin-bottom: 12px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #fff; color: #0b0b0c; padding: 11px 20px; border-radius: 12px; font-weight: 600; z-index: 200; }
dialog { border: 1px solid var(--line2); border-radius: 26px; background: #0d0d0f; color: var(--text); padding: 30px; width: min(560px, 100% - 24px); box-shadow: 0 0 120px var(--glow); }
dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
dialog h2 { font-size: 32px; margin-bottom: 4px; }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ---------- публичная главная («Моя страница») ---------- */
body.homepage { background: #070708; }
.htop { position: fixed; top: 0; left: 0; right: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: 18px 4vw; transition: .3s; }
.htop.solid { background: rgba(7,7,8,.82); backdrop-filter: blur(14px); padding-block: 12px; border-bottom: 1px solid var(--line); }
.hnav { display: flex; gap: 6px; padding: 5px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.05); backdrop-filter: blur(10px); }
.hnav a { padding: 8px 16px; border-radius: 11px; color: #cfcfd4; font-weight: 600; font-size: 14px; }
.hnav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.hhero { position: relative; min-height: 100svh; display: grid; place-items: center; text-align: center; overflow: hidden; }
.hhero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hhero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,.25) 45%, #070708 100%); }
.hhero-in { position: relative; z-index: 2; padding: 90px 24px 60px; }
.hhero h1 { font-size: clamp(54px, 11vw, 150px); line-height: .95; letter-spacing: -.04em; }
.hhero .it { font-size: clamp(22px, 3vw, 34px); margin: 18px 0 30px; color: #e3e0da; }
/* светлый главный экран: огромное слово за портретом, на лице полупрозрачное */
.whero { position: relative; height: 100svh; min-height: 560px; background: #e9e7e1; color: #1a1a1a; overflow: hidden; }
.wm-stage { position: absolute; inset: 0; }
.wm { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); white-space: nowrap; font-family: 'Inter Tight', var(--sans); font-weight: 800; letter-spacing: -.055em; line-height: .8; color: #1a1a1a; z-index: 1; user-select: none; }
.wm-fig { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 92%; z-index: 2; }
.wm-fig img { height: 100%; width: 100%; object-fit: cover; display: block; }
.whero.bw .wm-fig img { -webkit-filter: grayscale(1) contrast(1.08) brightness(1.02); filter: grayscale(1) contrast(1.08) brightness(1.02); }
/* вырезанный портрет крупно: лицо близко, плечи обрезаны, как на референсе */
.wm-fig.cut { height: 132%; bottom: -40%; }
.wm-fig.card { bottom: 0; height: 100%; border-radius: 0; overflow: hidden; }
.wm-layer { position: absolute; inset: 0; z-index: 3; pointer-events: none; mix-blend-mode: multiply; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; }
.wm-layer .wm { opacity: .5; z-index: auto; }
.wm-intro { position: absolute; left: 4vw; bottom: 7vh; z-index: 4; max-width: 280px; font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1.15; color: #1a1a1a; margin: 0; }
.wm-services { position: absolute; right: 4vw; top: 112px; z-index: 4; margin: 0; padding: 0; list-style: none; text-align: right; font-family: var(--serif); font-size: 19px; line-height: 1.25; color: #1a1a1a; }
.wm-scroll { position: absolute; right: 4vw; bottom: 7vh; z-index: 4; font-weight: 600; font-size: 14px; color: #1a1a1a; border-bottom: 1px solid #1a1a1a; padding-bottom: 2px; }
.htop.hlight .brand, .htop.hlight .hnav a { color: #1a1a1a; }
.htop.hlight .hnav { background: rgba(255,255,255,.45); border-color: rgba(0,0,0,.08); }
.htop.hlight .hnav a:hover { background: rgba(0,0,0,.06); color: #000; }
.htop.hlight.solid { background: rgba(233,231,225,.85); border-bottom-color: rgba(0,0,0,.08); }
.hcta { display: inline-flex; gap: 8px; align-items: center; padding: 10px 18px; border-radius: 99px; background: #fff; color: #111; font-weight: 600; font-size: 14px; box-shadow: 0 4px 20px rgba(0,0,0,.08); }
.htop:not(.hlight) .hcta { background: rgba(255,255,255,.1); color: #fff; box-shadow: none; border: 1px solid var(--line2); }
@media (max-width: 800px) {
  .wm-services { display: none; }
  .wm-intro { font-size: 18px; bottom: 5vh; max-width: 200px; }
  .wm-fig { height: 74%; } .wm-fig.cut { height: 100%; bottom: -24%; } .wm-fig.card { height: auto; width: 100%; bottom: 0; max-height: 78%; }
  .wm, .wm-layer .wm { top: 36%; }
  .wm-scroll { display: none; }
  .wm-intro { left: 50%; transform: translateX(-50%); text-align: center; top: 84px; bottom: auto; }
  .hcta { padding: 8px 14px; font-size: 13px; } .hnav { display: none; }
  .htop { gap: 8px; }
}
.hsec { padding: 90px 0 30px; }
.hwrap { width: min(1180px, 100% - 40px); margin: 0 auto; }
.hsec h2 { font-size: clamp(36px, 5.5vw, 68px); margin-bottom: 34px; }
.carousel { position: relative; width: 100%; padding: 10px 0 30px; overflow: hidden; }
.car-stage { position: relative; width: 100%; max-width: 1700px; margin: 0 auto; }
.citem { position: absolute; border-radius: 14px; overflow: hidden; background: var(--bg2); cursor: pointer; transition: left .6s cubic-bezier(.2,.7,.2,1), top .6s cubic-bezier(.2,.7,.2,1), width .6s cubic-bezier(.2,.7,.2,1), height .6s cubic-bezier(.2,.7,.2,1), opacity .5s; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.citem.center { cursor: zoom-in; }
.citem img { width: 100%; height: 100%; object-fit: cover; display: block; user-select: none; }
.car-stage.nomove .citem { transition: none; }
.car-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 30; width: 54px; height: 54px; border-radius: 50%; border: 1px solid rgba(255,255,255,.3); background: rgba(10,10,11,.6); backdrop-filter: blur(8px); color: #fff; font-size: 30px; line-height: 1; cursor: pointer; transition: .2s; }
.car-btn:hover { background: rgba(255,255,255,.18); transform: translateY(-50%) scale(1.06); }
.car-btn.prev { left: 2.5vw; } .car-btn.next { right: 2.5vw; }
@media (max-width: 700px) { .car-btn { width: 42px; height: 42px; font-size: 24px; } .car-btn.prev { left: 6px; } .car-btn.next { right: 6px; } }
.hgridwrap { width: min(1500px, 100% - 24px); margin: 0 auto; }
.hrow { display: flex; justify-content: center; }
.htile { flex: none; overflow: hidden; border-radius: 8px; background: var(--bg2); cursor: zoom-in; }
.htile img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s, filter .3s; }
.htile:hover img { transform: scale(1.04); filter: brightness(.85); }
.habout-in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; }
.habout-in:not(:has(.habout-img)) { grid-template-columns: 1fr; max-width: 760px; }
.habout-img img { width: 100%; border-radius: 22px; aspect-ratio: 4 / 5; object-fit: cover; }
.habout .about { font-size: 19px; }
.hcontact { text-align: center; padding: 120px 0 90px; }
.hcontact h2 { font-size: clamp(48px, 9vw, 120px); line-height: .95; }
.hcontact .it { font-size: 24px; margin-bottom: 10px; }
.hlinks { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; color: var(--muted); }
.hlinks i { font-style: normal; opacity: .5; }
.hlinks a:hover { color: #fff; }
.hfoot { text-align: center; color: var(--muted); font-size: 13px; padding: 30px 0 50px; border-top: 1px solid var(--line); margin-top: 40px; }
.gfoot { text-align: center; padding: 40px 0 60px; color: var(--muted); font-size: 14px; }
.gfoot a:hover { color: var(--text); }
a.cv-brand { text-decoration: none; }
a.cv-brand:hover { opacity: 1; text-decoration: underline; text-underline-offset: 5px; }
@media (max-width: 800px) {
  .hnav a { padding: 7px 11px; font-size: 13px; }
  .htop .brand { font-size: 18px; }
  .habout-in { grid-template-columns: 1fr; gap: 28px; }
  .hsec { padding-top: 60px; }
}
@media (max-width: 520px) { .hnav { display: none; } .htop { justify-content: center; } }

/* ---------- админка «Моя страница» ---------- */
.slot { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.slot-img { width: 240px; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); }
.empty-slot { display: grid; place-items: center; color: var(--muted); font-size: 14px; }
.slot-act { display: flex; gap: 8px; flex-wrap: wrap; }
.pitem .pacts { position: absolute; left: 6px; right: 6px; bottom: 6px; display: flex; gap: 4px; justify-content: center; }
.pitem .pacts button { border: 0; background: rgba(0,0,0,.78); color: #fff; border-radius: 8px; padding: 5px 10px; cursor: pointer; font: 600 13px var(--sans); }
.pitem .pacts button[disabled] { opacity: .3; cursor: default; }
.pitem img { aspect-ratio: 4 / 3; }

/* ---------- сцены ---------- */
.scene-title { font-size: clamp(26px, 3.4vw, 44px); margin: 40px 4px 18px; scroll-margin-top: 120px; display: flex; align-items: baseline; justify-content: center; text-align: center; gap: 12px; }
.scene-title span { font-family: var(--sans); font-size: 14px; color: var(--muted); font-weight: 400; }
.scene-title:first-child { margin-top: 18px; }
.scenes-nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 0 0 10px; }
.scenes-nav:empty { display: none; }
.scenes-nav .chip { text-decoration: none; }
.scene { margin-bottom: 26px; }
.scenehead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.scenehead .scenetitle { font-size: 22px; font-weight: 500; letter-spacing: -.02em; }
.sceneacts { margin-left: auto; display: flex; gap: 2px; flex-wrap: wrap; }
.acard { cursor: pointer; }
.acard .chk { position: absolute; top: 8px; left: 8px; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #0b0b0c; font-weight: 700; display: none; place-items: center; z-index: 2; }
.acard.sel { outline: 2px solid #9fcf95; outline-offset: -2px; }
.acard.sel .chk { display: grid; }
.acard.sel .lk { left: 40px; }
.movebar { position: sticky; top: 76px; z-index: 12; display: none; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; border: 1px solid rgba(200,230,190,.5); border-radius: 16px; background: rgba(16,22,15,.92); backdrop-filter: blur(10px); }
.movebar.on { display: flex; }
.movebar select { width: auto; min-width: 200px; }

/* ---------- светлая тема клиентской галереи ---------- */
body.theme-light { --bg: #f5f3ef; --bg2: #eae7e1; --card: rgba(0,0,0,.03); --line: rgba(0,0,0,.1); --line2: rgba(0,0,0,.28); --text: #151515; --muted: #6b6a68;
  background: var(--bg); }
body.theme-light em, body.theme-light .it { color: #77746f; }
body.theme-light .bar { background: rgba(245,243,239,.85); }
body.theme-light .btn.outline { background: rgba(0,0,0,.03); color: var(--text); }
body.theme-light .tile { background: var(--bg2); }

/* ---------- обложки галереи (5 вариантов) ---------- */
.bar { top: 0; background: color-mix(in srgb, var(--bg) 82%, transparent); }
.cover { position: relative; overflow: hidden; }
.cover .cvimg { object-fit: cover; }
.cv-brand { position: absolute; top: 26px; left: 0; right: 0; text-align: center; font-size: 12px; letter-spacing: .28em; text-transform: uppercase; z-index: 3; opacity: .9; }
.cv-title { margin: 0; font-weight: 500; line-height: 1.02; }
.cv-date { margin-top: 14px; font-size: 15px; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.cv-sub { margin-top: 4px; opacity: .75; font-size: 15px; }
.cv-btn { margin-top: 28px; }
.f-serif .cv-title { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; }
.f-sans .cv-title { font-family: var(--sans); font-weight: 500; letter-spacing: -.035em; }
.f-caps .cv-title { font-family: var(--sans); font-weight: 500; text-transform: uppercase; letter-spacing: .14em; line-height: 1.15; }
.cv-ph { background: linear-gradient(135deg, #2a2a2e, #101012); }

/* 1. Во весь экран */
.cv-full { height: 100svh; min-height: 520px; color: #fff; display: grid; place-items: center; text-align: center; }
.cv-full .cvimg, .cv-full .cv-ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.cv-full::after { content: ''; position: absolute; inset: 0; background: linear-gradient(rgba(0,0,0,.28), rgba(0,0,0,.18) 40%, rgba(0,0,0,.55)); }
.cv-full .cv-in { position: relative; z-index: 2; padding: 0 24px; }
.cv-full .cv-title { font-size: clamp(42px, 8.5vw, 124px); }

/* 2. Сплит: текст слева, фото справа */
.cv-split { min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; color: var(--text); background: var(--bg); }
.cv-split .cv-in { display: flex; flex-direction: column; justify-content: center; padding: 90px 6vw; }
.cv-split .cv-title { font-size: clamp(40px, 6.2vw, 96px); }
.cv-split .cv-brand { text-align: left; left: 6vw; right: auto; }
.cv-split .cvwrap { position: relative; min-height: 100%; }
.cv-split .cvimg, .cv-split .cv-ph { position: absolute; inset: 0; width: 100%; height: 100%; }

/* 3. Рамка: фото по центру, подпись под ним */
.cv-frame { padding: 90px 20px 60px; text-align: center; color: var(--text); background: var(--bg); }
.cv-frame .cvwrap { width: min(420px, 78vw); aspect-ratio: 3 / 4; margin: 0 auto 34px; position: relative; overflow: hidden; border-radius: 4px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.cv-frame .cvimg, .cv-frame .cv-ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.cv-frame .cv-title { font-size: clamp(30px, 4.6vw, 62px); }

/* 4. Журнал: огромный заголовок внизу фото */
.cv-edit { height: 92svh; min-height: 520px; color: #fff; display: flex; align-items: flex-end; }
.cv-edit .cvimg, .cv-edit .cv-ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.cv-edit::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 35%, rgba(0,0,0,.72)); }
.cv-edit .cv-in { position: relative; z-index: 2; width: 100%; padding: 0 4vw 5vh; display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.cv-edit .cv-title { font-size: clamp(46px, 11vw, 170px); line-height: .92; max-width: 100%; overflow-wrap: anywhere; }
.cv-edit .cv-meta { text-align: right; }
.cv-edit .cv-date { margin: 0; }

/* 5. Арка: фото в арке по центру */
.cv-arch { padding: 100px 20px 70px; text-align: center; color: var(--text); background: var(--bg); }
.cv-arch .cvwrap { width: min(360px, 74vw); aspect-ratio: 3 / 4.3; margin: 0 auto 36px; position: relative; overflow: hidden; border-radius: 999px 999px 8px 8px; }
.cv-arch .cvimg, .cv-arch .cv-ph { position: absolute; inset: 0; width: 100%; height: 100%; }
.cv-arch .cv-title { font-size: clamp(38px, 6vw, 84px); }

@media (max-width: 700px) {
  .cv-split { grid-template-columns: 1fr; }
  .cv-split .cvwrap { order: -1; min-height: 62svh; }
  .cv-split .cv-in { padding: 36px 24px 50px; }
  .cv-split .cv-brand { display: none; }
  .cv-edit .cv-meta { text-align: left; }
}

/* ---------- вкладка «Дизайн» в админке ---------- */
.dz { display: grid; grid-template-columns: 380px 1fr; gap: 22px; align-items: start; }
.dzside .panel { margin-bottom: 14px; padding: 20px; }
.dzside h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; letter-spacing: 0; }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sty { border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.03); padding: 6px; cursor: pointer; color: var(--muted); font: 500 11px var(--sans); text-align: center; }
.sty.on { border-color: rgba(200,230,190,.7); color: var(--text); background: rgba(120,170,110,.08); }
.sty svg { width: 100%; height: auto; display: block; margin-bottom: 5px; border-radius: 6px; }
.focal { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; cursor: crosshair; background: #111; }
.focal img { width: 100%; height: 100%; object-fit: cover; }
.focal i { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.5); pointer-events: none; }
.pv { position: sticky; top: 90px; }
.pvbar { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.pvwin { border: 1px solid var(--line); border-radius: 18px; background: #0a0a0a; padding: 12px; display: grid; place-items: start center; overflow: hidden; }
.pvwin #pvscale { overflow: hidden; border-radius: 10px; background: #000; }
.pvwin #pvscale { width: 100%; }
.pvwin iframe { border: 0; background: #000; display: block; width: 100%; height: 640px; }
input[type=range] { width: 100%; accent-color: #9fcf95; margin: 2px 0 6px; }
.pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; max-height: 60vh; overflow: auto; margin: 16px 0; }
.pick img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: pointer; border: 2px solid transparent; }
.pick img:hover { border-color: #fff; }
@media (max-width: 1000px) { .dz { grid-template-columns: 1fr; } .pv { position: static; } }

@media (max-width: 700px) {
  .lb .stage { inset: 64px 6px 56px; } .lb .nv { width: 42px; height: 42px; }
  .full { padding: 0 4px; }
  .g2 { grid-template-columns: 1fr; }
  .top .wrap { justify-content: center; gap: 6px; min-height: 0; padding: 8px 0; }
  .public-nav { display: none; }
  .lb { background: #040405; }
  /* Клиентская панель на телефоне: компактная, прилипает к верху, листается вбок */
  .bar { position: sticky; top: 0; }
  .bar .wrap { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; gap: 8px; padding: 8px 0; scrollbar-width: none; width: calc(100% - 16px); }
  .bar .wrap::-webkit-scrollbar { display: none; }
  .bar .count { display: none; }
  .bar .btn { flex: none; }
  .bar .btn.small { font-size: 12px; padding: 7px 9px; border-radius: 9px; }
  .bar .wrap { gap: 6px; }
  .scenes-nav { padding: 0 0 8px; }
  .scenes-nav .chip { flex: none; }
  .scene-title { margin: 28px 4px 12px; scroll-margin-top: 110px; }
  /* Панель фотографа на телефоне: меню в один ряд, вкладки листаются */
  .pillbox { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .pillbox::-webkit-scrollbar { display: none; }
  .pillbox a { flex: none; padding: 8px 14px; }
  .tabs { width: 100%; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .page { padding: 24px 0 60px; }
  .ptitle { align-items: flex-start; }
  .movebar { top: 8px; }
  .scenehead { gap: 8px; }
  .sceneacts { margin-left: 0; }
}
