/*
 * Сторінки клієнта /i/* — редизайн 2026-10-10: вигляд живої сторінки сайту (темна, заголовки Georgia, «дихання» ока),
 * кольори — iris-brandbook/DESIGN.md v2: фон #000, текст #F6F5F2/#BDBAB3/#98958D, лаванда #7A67E6 лише на кнопках,
 * текст на кнопці — чорнило #0B0B0C (вибір сторінки клієнта). Шрифти — системні + Georgia (DESIGN.md §2).
 * Жодних скриптів (CSP): анімації й галерея — лише CSS; повага до prefers-reduced-motion.
 */
:root {
  color-scheme: dark;
  --black: #000000; --ink: #0B0B0C; --paper: #F6F5F2; --white: #FFFFFF;
  --bg: #000000; --surface: #0A0A0B; --surface-2: #141416; --surface-3: #1C1C1F;
  --line: rgba(255,255,255,.08); --line-strong: rgba(255,255,255,.16);
  --text: #F6F5F2; --text-2: #BDBAB3; --text-3: #98958D;
  --cta: #7A67E6; --cta-hover: #8A78EE; --cta-active: #6857D6; --on-cta: #0B0B0C;
  --cta-gradient: linear-gradient(180deg, #8A78EE 0%, #7A67E6 55%, #6857D6 100%);
  --cta-soft: #BCAEF9; --cta-tint: rgba(138,120,238,.12); --cta-ring: rgba(138,120,238,.55);
  --danger: #B23A2E; --danger-text: #E8A39A;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22,.61,.36,1);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body.client { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.55;
              -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; }
a { color: inherit; }
::selection { background: var(--cta-tint); }

/* ---------- Шапка й підвал ---------- */
.client-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; }
.client-brand { display: block; line-height: 0; }
.client-brand img { display: block; width: 84px; height: auto; }
.client-locales { display: flex; gap: 2px; }
.client-locales a { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-decoration: none; color: var(--text-3);
                    padding: 6px 8px; border-radius: 999px; transition: color .2s var(--ease); }
.client-locales a:hover { color: var(--text); }
.client-locales a.on { color: var(--text); border: 1px solid var(--line-strong); }
.client-main { flex: 1; display: flex; align-items: flex-start; justify-content: center; padding: 8px 16px 48px; }

.client-foot { border-top: 1px solid var(--line); padding: 32px 20px 44px; color: var(--text-3); font-size: 13px; }
.client-foot-inner { max-width: 720px; margin: 0 auto; display: grid; gap: 22px; }
.client-foot-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.foot-logo { display: block; width: 84px; aspect-ratio: 650 / 361; margin-bottom: 18px; }
.foot-contacts { display: grid; gap: 4px; }
.foot-label { font-family: var(--mono); font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--text-3); }
.foot-contacts a { display: inline-flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; padding: 8px 0; }
.foot-contacts svg { width: 18px; height: 18px; flex: none; }
.client-foot-links { display: flex; flex-wrap: wrap; gap: 4px 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.client-foot-links a { color: var(--text-2); text-decoration: none; padding: 6px 0; }
.client-foot-links a:hover { color: var(--text); }

/* Кремовий логотип з переливом — маска з прозорого PNG власника */
.logo-shimmer { background-color: #C9C6BF;
  background-image: linear-gradient(110deg, rgba(255,255,255,0) 35%, rgba(255,255,255,.92) 50%, rgba(255,255,255,0) 65%);
  background-size: 250% 100%; background-repeat: no-repeat;
  -webkit-mask: url("/assets/brand/logo-master-white-abbd7f17.png") center / contain no-repeat; mask: url("/assets/brand/logo-master-white-abbd7f17.png") center / contain no-repeat;
  animation: logo-shine 7s ease-in-out infinite; }

/* ---------- Картки кроків (PIN, email, стани, стирання) ---------- */
.card { width: 100%; max-width: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
        padding: 32px 26px; animation: rise .7s var(--ease) both; }
.card-center { text-align: center; }
.card h1 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 10px; }
.card p { margin: 0 0 14px; color: var(--text-2); }
.card p.small, .small { font-size: 13.5px; color: var(--text-3); }
.card .step, .eyebrow { font-family: var(--mono); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.card-icon { display: block; width: 40px; height: 40px; margin: 0 auto 16px; color: var(--cta-soft); }

.field { margin: 18px 0; text-align: left; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--text-2); }
.input { width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--black);
         color: var(--text); font: inherit; font-size: 16px; caret-color: var(--cta-soft); transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.input::placeholder { color: #55524C; }
.input:focus { outline: none; border-color: var(--cta); box-shadow: 0 0 0 4px var(--cta-tint); }
.input.pin { font-family: var(--mono); font-size: 32px; letter-spacing: .5em; text-indent: .5em; text-align: center; height: 68px; font-variant-numeric: tabular-nums; }
.input.is-error { border-color: var(--danger); }
.error { color: var(--danger-text); font-size: 13.5px; margin: 8px 0 0; }

.checkrow { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; font-size: 14px; color: var(--text-2); cursor: pointer; text-align: left; }
.checkrow input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--cta); }
.checkrow b { color: var(--text); font-weight: 600; }
.consent-text { max-height: 220px; overflow: auto; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--black);
                font-size: 13.5px; color: var(--text-2); margin: 6px 0 14px; white-space: pre-wrap; text-align: left; }
.consent-more { margin: -6px 0 14px; text-align: left; }
.consent-more a { color: var(--text-2); }
.draft { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--danger-text);
         border: 1px solid var(--danger); border-radius: 999px; padding: 2px 8px; margin-left: 6px; vertical-align: middle; }
.warn { padding: 14px 16px; border: 1px solid var(--danger); border-radius: 12px; color: var(--text); background: rgba(178,58,46,.12); font-size: 14px; margin: 14px 0; text-align: left; }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 12px;
       border: 1px solid transparent; font: inherit; font-weight: 700; font-size: 15px; letter-spacing: .01em; cursor: pointer;
       text-decoration: none; width: 100%; transition: transform .15s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease); }
.btn-primary { background-color: var(--cta); background-image: var(--cta-gradient); color: var(--on-cta); border-color: var(--cta-hover);
               box-shadow: 0 8px 22px -8px rgba(138,120,238,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.btn-primary:hover { box-shadow: 0 12px 30px -8px rgba(138,120,238,.75), inset 0 1px 0 rgba(255,255,255,.35); transform: translateY(-1px); }
.btn-primary:active { background-color: var(--cta-active); background-image: none; transform: translateY(0); }
.btn-outline { background: transparent; color: var(--cta-soft); border-color: var(--cta); width: auto; }
.btn-outline:hover { background: var(--cta-tint); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); width: auto; }
.btn-ghost:hover { border-color: var(--text-3); }
.btn:focus-visible { outline: 2px solid var(--cta-soft); outline-offset: 3px; }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-danger { background: var(--danger); color: #fff; }
.btn + .btn { margin-top: 10px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* ---------- Сторінка з фото ---------- */
.photo-page { width: 100%; max-width: 720px; text-align: center; }
.hero { padding: 28px 0 8px; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(38px, 10vw, 60px); line-height: 1.04; letter-spacing: -.015em; margin: 0 0 10px; }
.shimmer { display: inline-block; color: var(--paper);
  background: linear-gradient(110deg, #C9C6BF 0%, #C9C6BF 38%, #FFFFFF 50%, #C9C6BF 62%, #C9C6BF 100%);
  background-size: 220% auto; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: text-shine 6s ease-in-out infinite; }
.hero-sub { color: var(--text-2); max-width: 380px; margin: 0 auto; font-size: 15px; }
.iris-stage { position: relative; margin: 6px auto 0; max-width: 560px; }
.iris-stage::before { content: ""; position: absolute; inset: 12% 12%; border-radius: 50%;
  background: radial-gradient(circle, rgba(138,120,238,.14) 0%, rgba(138,120,238,0) 70%); filter: blur(30px); animation: glow 9s ease-in-out infinite; }
.iris-stage img { position: relative; display: block; width: 100%; height: auto;
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 52%, transparent 100%);
          mask-image: radial-gradient(ellipse 60% 60% at 50% 50%, #000 52%, transparent 100%);
  animation: breathe 9s ease-in-out infinite, fade-in 1.4s var(--ease) both; }

.section { border-top: 1px solid var(--line); padding: 44px 4px; }
.section h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.15; margin: 0 0 10px; }
.section p.lead { color: var(--text-2); font-size: 15px; max-width: 420px; margin: 0 auto 24px; }
.download { padding: 26px 4px 34px; }
.download .small { margin: 10px 0 0; }

/* Галерея стилів: гортання пальцем (scroll-snap), без скриптів */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 320px); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory;
           padding: 6px max(16px, calc(50% - 160px)) 18px; margin: 0 -20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.gallery::-webkit-scrollbar { display: none; }
.art-card { scroll-snap-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-align: left;
            transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease); animation: rise .8s var(--ease) both; }
.art-card:hover { transform: translateY(-4px); border-color: rgba(138,120,238,.45); box-shadow: 0 24px 60px -24px rgba(138,120,238,.45); }
.art-card figure { margin: 0; aspect-ratio: 1 / 1; background: var(--black); overflow: hidden; }
.art-card img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.art-card:hover img { transform: scale(1.04); }
.art-card-body { padding: 14px 16px 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.art-card-name { font-family: var(--serif); font-size: 19px; }
.art-card-tag { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); white-space: nowrap; }
.art-card:nth-child(2) { animation-delay: .08s; } .art-card:nth-child(3) { animation-delay: .16s; } .art-card:nth-child(4) { animation-delay: .24s; }
.gallery-hint { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--text-3); margin: 0; }
.powered { font-size: 12px; color: var(--text-3); margin: 18px 0 0; }

.insta-btn, .btn-inline { width: auto; }
.photo-actions { max-width: 440px; margin: 0 auto; }

/* ---------- Повідомлення про конфіденційність ---------- */
.card-doc { max-width: 720px; }
.privacy-doc h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; line-height: 1.2; margin: 0 0 18px; }
.privacy-doc h3 { font-size: 15px; margin: 22px 0 8px; font-weight: 650; }
.privacy-doc h4 { font-size: 14px; margin: 16px 0 6px; font-weight: 600; }
.privacy-doc p, .privacy-doc li { font-size: 14px; color: var(--text-2); }
.privacy-doc ul { margin: 0 0 14px; padding-left: 20px; }
.privacy-doc li { margin: 0 0 6px; }

/* ---------- Анімації ---------- */
@keyframes text-shine { 0% { background-position: 220% center; } 100% { background-position: -120% center; } }
@keyframes logo-shine { 0% { background-position: 130% center; } 100% { background-position: -30% center; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes glow { 0%, 100% { opacity: .55; transform: scale(.96); } 50% { opacity: 1; transform: scale(1.04); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .shimmer { -webkit-text-fill-color: var(--paper); background: none; }
}

/* Повідомлення про помилку замовлення (flash[:alert]) */
.client-flash { border: 1px solid var(--danger); background: rgba(178, 58, 46, .12); color: var(--text); border-radius: 12px; padding: 12px 16px; max-width: 440px; margin: 0 auto 16px; font-size: 14px; }

/* ---------- Продаж артів (PHOTO_FLOW §15): вибір галочками, лічильник CSS, без скриптів ---------- */
.buy-form { counter-reset: picked; }
.art-card-blank { display: block; width: 100%; height: 100%; background: radial-gradient(circle at 50% 45%, rgba(138,120,238,.18), transparent 60%), var(--black); }
.pick-btn { position: relative; display: block; margin: 0 16px 16px; cursor: pointer; }
.pick { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pick-off, .pick-on { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 12px; font-weight: 700; font-size: 15px;
                      transition: background-color .2s var(--ease), box-shadow .2s var(--ease); }
.pick-off { background-color: var(--cta); background-image: var(--cta-gradient); color: var(--on-cta); box-shadow: 0 8px 22px -10px rgba(138,120,238,.6), inset 0 1px 0 rgba(255,255,255,.3); }
.pick-on { display: none; background: var(--cta-tint); color: var(--cta-soft); border: 1px solid var(--cta); }
.pick:checked { counter-increment: picked; }
.pick:checked ~ .pick-off { display: none; }
.pick:checked ~ .pick-on { display: flex; }
.pick:focus-visible ~ span { outline: 2px solid var(--cta-soft); outline-offset: 3px; }
.art-card:has(.pick:checked) { border-color: var(--cta); box-shadow: 0 0 0 1px var(--cta), 0 24px 60px -24px rgba(138,120,238,.5); }
.buy-bar { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; margin-top: 18px; }
.picked { color: var(--text-2); font-size: 14px; }
.picked-count::after { content: counter(picked); color: var(--text); font-variant-numeric: tabular-nums; }

/* Пропозиція «весь пак» — єдине місце із золотом (DESIGN.md §1.6) */
.bundle { margin: 22px auto 0; max-width: 440px; }
.bundle-btn { width: 100%; display: grid; gap: 4px; padding: 16px 18px; border-radius: 14px; cursor: pointer; font: inherit; text-align: center;
              color: #D8BC7C; background: rgba(216,188,124,.08); border: 1px solid rgba(216,188,124,.55); transition: background-color .2s var(--ease), transform .15s var(--ease); }
.bundle-btn:hover { background: rgba(216,188,124,.14); transform: translateY(-1px); }
.bundle-btn:focus-visible { outline: 2px solid #D8BC7C; outline-offset: 3px; }
.bundle-title { font-weight: 700; font-size: 17px; }
.bundle-save { font-size: 13.5px; color: var(--text-2); }
.bundle-save s { color: var(--text-3); margin-right: 6px; }

/* Замовлення клієнта і сторінка статусу */
.order-list { list-style: none; margin: 0 auto; padding: 0; max-width: 440px; display: grid; gap: 8px; }
.order-list a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
                text-decoration: none; color: var(--text); font-size: 14px; }
.order-list a:hover { border-color: var(--line-strong); }
.order-status { color: var(--text-3); white-space: nowrap; }
.order-ready, .order-paid, .order-generating { color: var(--cta-soft); }
.order-failed { color: var(--danger-text); }
.order-items { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; text-align: left; }
.order-items li { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; }
.order-items .st { color: var(--text-3); }
.order-items .st-ready { color: var(--cta-soft); }
.order-items .st-failed { color: var(--danger-text); }
.spinner { width: 34px; height: 34px; margin: 4px auto 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--cta-soft); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Куплені арти клієнта */
.mine-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 14px; text-align: left; }
.mine-grid-tight { margin: 4px 0 18px; }
.mine-card { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; animation: rise .8s var(--ease) both; }
.mine-card img { display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: contain; background: var(--black); }
.mine-card figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.btn-small { min-height: 40px; padding: 0 14px; font-size: 13.5px; }
