/* HolyShape VIP portal — the Rose-Gold Vault (DESIGN.md). Dark plum ground,
   surfaces lifted by tone, one metal accent that carries meaning. */
:root {
  --bg: #100C0F;
  --card: #1A1417;
  --card-2: #241C20;
  --line: #2E2529;
  --line-strong: #4A3E43;
  --ink: #F4ECEE;
  --ink-soft: #D9CDD0;
  --ink-muted: #A8989C;
  --accent: #C9A192;
  --accent-deep: #B08878;
  --accent-ink: #1A1417;
  --ok: #7FB08D;
  --warn: #D2A275;
  --err: #D98B7F;
  --radius: 22px;
  --radius-sm: 12px;
  --font: 'Assistant', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink-soft); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
::selection { background: var(--card-2); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input, select, button { font: inherit; color: inherit; caret-color: var(--accent); }
img { display: block; max-width: 100%; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-deep); }
a:hover { text-decoration-color: var(--ink); }
h1, h2, h3, p, ul, ol { margin: 0; }
strong, b { font-weight: 600; color: var(--ink); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ic { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

/* ── Shell ─────────────────────────────────────────────────────────────── */
.vp { max-width: 600px; margin: 0 auto; padding: 16px 14px calc(96px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 640px) { .vp { padding: 28px 16px calc(104px + env(safe-area-inset-bottom, 0px)); } }
.vp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.vp-brand { display: inline-flex; align-items: center; min-height: 44px; font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); text-decoration: none; }
.vp-out { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; background: none; border: 0; color: var(--ink-muted); font-size: 14px; cursor: pointer; border-radius: 999px; }
.vp-out:hover { color: var(--ink); background: var(--card); }
main { display: block; }
.vp-title { font-size: 26px; line-height: 1.2; font-weight: 400; letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.vp-lead { margin-top: 6px; color: var(--ink-muted); font-size: 15px; text-wrap: pretty; }
.vp-section { margin-top: 24px; }
.vp-section > .vp-h2 { margin-bottom: 10px; }
.vp-h2 { font-size: 18px; line-height: 1.3; font-weight: 500; color: var(--ink); text-wrap: balance; }
.vp-h2 a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; font-weight: 400; font-size: 14px; color: var(--ink-muted); margin-left: 6px; }
.vp-label { display: block; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-muted); }
.vp-hint { font-size: 14px; color: var(--ink-muted); line-height: 1.45; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 16px; } .mt-4 { margin-top: 24px; }
.stack > * + * { margin-top: 10px; }

/* ── Cards ─────────────────────────────────────────────────────────────── */
.vp-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 16px; }
@media (min-width: 640px) { .vp-card { padding: 22px 22px; } }
.vp-card--accent { border-color: var(--accent-deep); }
.vp-card--quiet { background: transparent; border-style: dashed; }
.vp-row { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vp-row__body { flex: 1 1 auto; min-width: 0; }
.vp-row__title { font-size: 16px; font-weight: 600; color: var(--ink); line-height: 1.3; overflow-wrap: anywhere; }
.vp-row__meta { margin-top: 2px; font-size: 14px; color: var(--ink-muted); line-height: 1.4; }
.vp-row__arrow { flex: 0 0 auto; color: var(--ink-muted); }
a.vp-card, a.vp-row { text-decoration: none; color: inherit; }
a.vp-card:hover, a.vp-row:hover { border-color: var(--line-strong); }
.vp-thumb { flex: 0 0 52px; width: 52px; height: 66px; object-fit: cover; border-radius: 10px; background: var(--card-2); }
.vp-thumb--sm { flex: 0 0 44px; width: 44px; height: 56px; }
.vp-list { display: grid; gap: 10px; }
.vp-divider { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ── Status ────────────────────────────────────────────────────────────── */
.vp-status { font-size: 17px; font-weight: 600; color: var(--ink); line-height: 1.35; }
.vp-status--ok { color: var(--ok); }
.vp-status--warn { color: var(--warn); }
.vp-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.vp-pill--ok { border-color: rgba(127,176,141,.5); color: var(--ok); }
.vp-pill--warn { border-color: rgba(210,162,117,.5); color: var(--warn); }
.vp-pill--err { border-color: rgba(217,139,127,.5); color: var(--err); }
.vp-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.vp-flash { padding: 13px 15px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: var(--card); font-size: 15px; color: var(--ink); margin-bottom: 14px; }
.vp-flash--success { border-color: rgba(127,176,141,.5); }
.vp-flash--error { border-color: rgba(217,139,127,.6); }
.vp-flash:focus { outline: 2px solid var(--line-strong); }
.vp-flash a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.vp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent; font-size: 16px; font-weight: 600; text-decoration: none; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.vp-btn--primary { background: var(--accent); color: var(--accent-ink); }
.vp-btn--primary:hover { background: var(--accent-deep); }
.vp-btn--secondary { background: transparent; border-color: var(--line-strong); color: var(--ink); }
.vp-btn--secondary:hover { border-color: var(--accent-deep); }
.vp-btn--quiet { background: transparent; color: var(--ink-soft); min-height: 44px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--accent-deep); }
.vp-btn--small { width: auto; min-height: 44px; padding: 8px 16px; font-size: 15px; }
.vp-btn[aria-busy="true"] { opacity: .6; cursor: progress; }
.vp-btn:disabled { opacity: .45; cursor: default; }
.vp-actions { margin-top: 16px; }
.vp-actions > * + * { margin-top: 10px; }
.vp-actions--row { display: flex; gap: 10px; flex-wrap: wrap; }
.vp-actions--row > * { flex: 1 1 160px; margin: 0; }

/* ── Fields ────────────────────────────────────────────────────────────── */
.vp-field { display: block; }
.vp-field + .vp-field { margin-top: 14px; }
.vp-field__label { display: block; font-size: 15px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.vp-field__label small { font-weight: 400; color: var(--ink-muted); }
.vp-field__hint { margin-top: 6px; font-size: 14px; color: var(--ink-muted); }
.vp-input, .vp-select { display: block; width: 100%; min-height: 48px; padding: 10px 14px; font-size: 16px; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); appearance: none; -webkit-appearance: none; transition: border-color .15s, box-shadow .15s; }
.vp-input::placeholder { color: #7E7074; }
.vp-input:focus, .vp-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,161,146,.2); }
.vp-input[aria-invalid="true"] { border-color: var(--err); }
.vp-select { padding-right: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%23A8989C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
.vp-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.vp-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.vp-grid-2 .vp-field + .vp-field, .vp-grid-3 .vp-field + .vp-field { margin-top: 0; }
.vp-err { color: var(--err); font-size: 14px; margin-top: 6px; }

/* ── Chips (choice) ────────────────────────────────────────────────────── */
.vp-chips { display: grid; gap: 8px; }
.vp-chip { position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--bg); color: var(--ink); cursor: pointer; transition: border-color .15s, background-color .15s; }
.vp-chip > input[type=radio] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vp-chip:has(> input:checked) { border-color: var(--accent); background: var(--card-2); }
.vp-chip:has(> input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.vp-chip__dot { flex: 0 0 18px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; }
.vp-chip:has(> input:checked) .vp-chip__dot { border-color: var(--accent); background: var(--accent); }
.vp-chip:has(input:checked) .vp-chip__dot::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-ink); }
.vp-chip__body { flex: 1 1 auto; min-width: 0; }
.vp-chip__body .vp-field { display: block; margin-top: 8px; }
.vp-chip__title { font-size: 15px; font-weight: 600; }
.vp-chip__meta { font-size: 13px; color: var(--ink-muted); }
.vp-size { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 14px; color: var(--ink-soft); }
.vp-size b { font-size: 15px; color: var(--accent); }
.vp-sizes { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Money ─────────────────────────────────────────────────────────────── */
.vp-balance { font-size: 34px; line-height: 1.1; font-weight: 400; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.vp-balance small { font-size: 18px; color: var(--ink-muted); margin-left: 4px; }
.vp-code { display: inline-block; font-family: ui-monospace, 'JetBrains Mono', monospace; font-size: 20px; letter-spacing: .1em; color: var(--ink); background: var(--bg); border: 1px dashed var(--line-strong); border-radius: 10px; padding: 8px 14px; user-select: all; }
.vp-progress { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 8px; }
.vp-progress i { display: block; height: 100%; border-radius: 4px; background: var(--accent); }
.vp-ledger { display: grid; gap: 12px; }
.vp-ledger__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.vp-ledger__k { font-size: 15px; color: var(--ink); }
.vp-ledger__m { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.vp-ledger__v { font-size: 15px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-soft); }
.vp-ledger__v--plus { color: var(--ok); }

/* ── Orders ────────────────────────────────────────────────────────────── */
.vp-order { scroll-margin-top: 16px; }
.vp-order__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.vp-order__name { font-size: 18px; font-weight: 600; color: var(--ink); }
.vp-order__total { font-size: 16px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vp-order--cancelled .vp-order__name, .vp-order--cancelled .vp-order__total { color: var(--ink-muted); }
.vp-items { display: grid; gap: 10px; margin-top: 14px; }
.vp-strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 4px 8px; margin: 0 -4px; scroll-snap-type: x mandatory; scroll-padding: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.vp-strip > * { flex: 0 0 150px; scroll-snap-align: start; }
.vp-product { display: block; text-decoration: none; color: inherit; }
.vp-product__img { width: 150px; aspect-ratio: 4 / 5; object-fit: cover; object-position: top; border-radius: 12px; background: var(--card-2); border: 1px solid var(--line); }
.vp-product__img--off { opacity: .5; }
.vp-product__title { margin-top: 8px; font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.vp-product__meta { font-size: 13px; color: var(--accent); margin-top: 2px; }
.vp-product .vp-btn { margin-top: 8px; }

/* ── Tiers ─────────────────────────────────────────────────────────────── */
.vp-tier { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.vp-tier__name { font-size: 20px; font-weight: 500; color: var(--ink); }
.vp-tier__req { font-size: 14px; color: var(--ink-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vp-perks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 8px; }
.vp-perks li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--ink-soft); }
.vp-perks .ic { color: var(--accent); margin-top: 3px; }
.vp-perks--locked li { color: var(--ink-muted); }
.vp-perks--locked .ic { color: var(--ink-muted); }

/* ── Help ──────────────────────────────────────────────────────────────── */
.vp-contact { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: inherit; }
.vp-contact:hover { border-color: var(--line-strong); }
.vp-contact .ic { color: var(--accent); }
.vp-faq { border-top: 1px solid var(--line); }
.vp-faq details { border-bottom: 1px solid var(--line); }
.vp-faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 10px 0; font-size: 15px; font-weight: 600; color: var(--ink); cursor: pointer; }
.vp-faq summary::-webkit-details-marker { display: none; }
.vp-faq summary .ic { color: var(--ink-muted); transition: transform .2s; }
.vp-faq details[open] summary .ic { transform: rotate(45deg); }
.vp-faq details p { padding: 0 0 14px; font-size: 15px; color: var(--ink-soft); line-height: 1.55; }

/* ── Preferences & reviews ─────────────────────────────────────────────── */
.vp-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.vp-facts li { position: relative; padding-left: 18px; font-size: 15px; line-height: 1.45; color: var(--ink); }
.vp-facts li::before { content: ''; position: absolute; left: 2px; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.vp-review > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 44px; font-size: 15px; font-weight: 600; color: var(--accent); cursor: pointer; }
.vp-review > summary::-webkit-details-marker { display: none; }
.vp-review > summary::after { content: '+'; margin-left: auto; font-size: 20px; line-height: 1; color: var(--ink-muted); }
.vp-review[open] > summary::after { content: '−'; }
.vp-textarea { display: block; width: 100%; min-height: 112px; padding: 10px 14px; font: inherit; font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); resize: vertical; transition: border-color .15s, box-shadow .15s; }
.vp-textarea::placeholder { color: #7E7074; }
.vp-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201,161,146,.2); }
.vp-stars { position: relative; display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.vp-stars input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.vp-stars label { display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; font-size: 30px; line-height: 1; color: var(--line-strong); cursor: pointer; transition: color .15s; }
.vp-stars input:checked ~ label, .vp-stars label:hover, .vp-stars label:hover ~ label { color: var(--accent); }
.vp-stars input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.vp-file { display: block; width: 100%; min-height: 48px; font-size: 15px; color: var(--ink-soft); }
.vp-file::file-selector-button { margin-right: 12px; min-height: 44px; padding: 0 16px; font: inherit; font-weight: 600; color: var(--ink); background: var(--card-2); border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; }

/* ── Bottom nav ────────────────────────────────────────────────────────── */
.vp-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; gap: 4px; padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px)); background: rgba(16,12,15,.96); border-top: 1px solid var(--line); }
.vp-nav a { flex: 1; max-width: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--ink-muted); border-radius: 12px; }
.vp-nav a .ic { width: 20px; height: 20px; flex-basis: 20px; }
.vp-nav a[aria-current="page"] { color: var(--accent); background: var(--card); }
.vp-nav a:hover { color: var(--ink); }
@media (min-width: 640px) { .vp-nav { position: sticky; bottom: 0; margin-top: 24px; border-radius: 16px; border: 1px solid var(--line); } }

.vp-empty { text-align: center; padding: 20px 0 8px; }
.vp-empty .ic { width: 40px; height: 40px; flex-basis: 40px; margin: 0 auto 12px; color: var(--accent); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Staff looking through a client's cabinet (read-only preview) */
.vp-preview { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--warn); border-radius: var(--radius-sm); background: #2A2018; color: var(--ink); font-size: 15px; line-height: 1.4; }
.vp-preview__close { min-height: 44px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.vp-preview__close:hover { border-color: var(--accent); }

/* Login: the way in for someone who ordered without an email; the one-tap entry page */
.vp-help { padding: 14px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.vp-help__links { display: flex; flex-wrap: wrap; gap: 0 16px; margin-top: 4px; }
.vp-link-row a { display: inline-flex; align-items: center; min-height: 44px; }
.vp-help__links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; }
.vp-enter { padding-top: 12vh; text-align: center; }
.vp-enter .vp-actions { max-width: 320px; margin-left: auto; margin-right: auto; }

/* Home: «Твій наступний крок» — one card chosen by her state; a reorder row; one-code note */
.vp-next { margin-top: 12px; }
.vp-next__title { font-size: 22px; font-weight: 400; line-height: 1.25; color: var(--ink); text-wrap: balance; }
.vp-one-code { color: var(--ink-muted); }
.vp-nowrap { white-space: nowrap; }
.vp-reorder { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
