/* «Pro в подарок» (08.10.2026, макет B): блок «Подари Pro» на /pro, сценарий
 * покупки в 4 шага, экран «Подарок отправлен» и открытка (она же на /gift/<код>).
 * Все классы с приставкой pg-: на сайте уже есть .card, .btn, .steps и т.п. */

:root { --pg-s3: #2a2a2e; --pg-red: #ff6b5e; }
.pg-osw { font-family: "Oswald", "Inter", sans-serif; }
.pg-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); }
.pg-gift-ic { vertical-align: -.2em; flex: none; }
.pg-hidden { display: none !important; }

/* Кнопки */
.pg-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 6px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; transition: transform .15s, filter .15s; box-sizing: border-box; }
.pg-btn:hover { transform: translateY(-1px); color: var(--text); }
.pg-btn-gold { border: 0; background: var(--accent-grad); color: var(--accent-ink); font-weight: 800; box-shadow: 0 10px 34px rgba(255,201,77,.25); }
.pg-btn-gold:hover { filter: brightness(1.05); color: var(--accent-ink); }
.pg-btn-ghost { background: transparent; border: 1px solid var(--border); }
.pg-btn-ghost:hover { border-color: rgba(255,201,77,.45); }
.pg-btn[disabled] { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.pg-btn-lg { height: 52px; font-size: 16px; padding: 0 24px; }
.pg-faint { color: var(--text-faint); }
.pg-tag { color: var(--text-faint); font-style: normal; font-weight: 500; }
.pg-pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 4px; background: var(--pg-s3); color: var(--text-dim); }
.pg-pill-gold { background: rgba(255,201,77,.14); color: var(--accent); }

/* ── Блок «Подари Pro» ── */
.pg-wrap { margin-top: 56px; scroll-margin-top: 120px; }
.pg-sec { position: relative; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface);
  padding: 44px 44px 40px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; }
.pg-sec::before { content: ""; position: absolute; inset: -40% -10% auto auto; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255,201,77,.13), transparent); pointer-events: none; }
.pg-sec h2 { font-family: "Oswald", sans-serif; font-weight: 600; font-size: 44px; line-height: 1.05; margin: 10px 0 14px; letter-spacing: -.01em; color: #fff; }
.pg-rot { color: var(--accent); display: inline-block; min-width: 5.6ch; transition: opacity .45s ease, transform .45s cubic-bezier(.2,.8,.2,1), filter .45s ease; will-change: opacity, transform; }
.pg-rot.is-out { opacity: 0; transform: translateY(-.35em); filter: blur(6px); }
.pg-rot.is-pre { opacity: 0; transform: translateY(.35em); filter: blur(6px); transition: none; }
@media (prefers-reduced-motion: reduce) { .pg-rot, .pg-rot.is-out, .pg-rot.is-pre { transition: none; transform: none; filter: none; } }
.pg-lead { color: var(--text-dim); max-width: 52ch; margin: 0 0 22px; }
.pg-who { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 22px; }
.pg-who-i { text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 13px; }
.pg-who-i img { width: 32px; height: 32px; display: block; }
.pg-who-i b { display: block; margin-top: 7px; font-size: 14px; }
.pg-terms { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.pg-term-chip { border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; font-size: 13.5px; background: rgba(255,255,255,.02); }
.pg-term-chip b { font-family: "Oswald", sans-serif; font-weight: 600; font-size: 16px; margin-left: 4px; }
.pg-term-chip .pg-save { color: var(--green); font-weight: 700; font-size: 12px; margin-left: 4px; }
.pg-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.pg-cta small { color: var(--text-faint); font-size: 12.5px; max-width: 32ch; line-height: 1.4; }

/* ── Открытка ── */
.pg-card { position: relative; aspect-ratio: 1.58; border-radius: 12px; overflow: hidden; padding: 20px 22px; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.08); isolation: isolate; color: #fff; box-sizing: border-box; }
.pg-card::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='40'><path d='M0 20H40M20 0V40' stroke='%23ffffff' stroke-opacity='0.05'/></svg>"); }
.pg-card.is-gold { background: radial-gradient(120% 90% at 85% 0%, #ffcf5a 0%, #c98a1d 38%, #3b2606 100%); }
.pg-card.is-camo { background:
  linear-gradient(200deg, rgba(0,0,0,0) 35%, rgba(10,12,6,.72) 100%),
  url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 316 200' preserveAspectRatio='none'><rect width='316' height='200' fill='%233b4628'/><g fill='%23556136'><path d='M0 0h92l-18 34 30 18-22 40-52-6L0 104z'/><path d='M168 0h80l-14 28 38 10-6 46-56-8-24 26-34-22 20-36z'/><path d='M120 120l46-14 30 30-10 40 38 24H112l-20-40z'/></g><g fill='%23262d18'><path d='M70 40l40 10 14 36-30 22-38-18z'/><path d='M250 60l54-10 12 40v40l-40-6-30-28z'/><path d='M10 130l52-8 22 34-14 44H0v-60z'/><path d='M190 150l40-8 16 28-22 30h-40z'/></g><g fill='%237a7444'><path d='M210 30l30 6-6 22-28-4z'/><path d='M40 96l26 4-4 20-28-6z'/><path d='M268 140l30 10-10 26-26-12z'/><path d='M140 70l22 6-4 18-22-6z'/></g><g fill='%231a1f10'><path d='M100 92l20 4-6 16-18-6z'/><path d='M230 100l18 6-6 14-16-6z'/></g></svg>") center / cover no-repeat; }
.pg-card.is-camo .pg-c-bow { display: none; }
.pg-card.is-camo .pg-c-brand i { color: #d9e08a; }
.pg-card.is-night { background: radial-gradient(90% 80% at 80% 10%, #2c3a5c 0%, #141a2b 55%, #090b12 100%); }
.pg-c-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.pg-c-brand { font-family: "Oswald", sans-serif; font-weight: 700; letter-spacing: .04em; font-size: 15px; text-transform: uppercase; opacity: .95; }
.pg-c-brand i { font-style: normal; color: var(--accent); }
.pg-card.is-gold .pg-c-brand i { color: #1a1200; }
.pg-c-term { font-family: "Oswald", sans-serif; font-weight: 700; font-size: 13px; padding: 3px 9px; border-radius: 4px; background: rgba(0,0,0,.35); white-space: nowrap; }
.pg-c-big { margin-top: auto; font-family: "Oswald", sans-serif; font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: -.01em; text-shadow: 0 2px 14px rgba(0,0,0,.35); }
.pg-c-to { font-size: 13px; opacity: .85; margin-top: 6px; }
.pg-c-msg { font-size: 13.5px; line-height: 1.35; margin-top: 10px; padding-left: 10px; border-left: 2px solid rgba(255,255,255,.55); max-height: 3.9em; overflow: hidden; word-break: break-word; }
.pg-c-from { font-size: 12px; opacity: .8; margin-top: 6px; }
.pg-c-bow { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.pg-side .pg-card { padding: 16px 18px; }
.pg-side .pg-c-big { font-size: 22px; }
.pg-side .pg-c-msg { font-size: 12.5px; max-height: 2.7em; margin-top: 7px; }
.pg-visual { position: relative; }
.pg-visual .pg-card { transform: rotate(-3deg); }
.pg-visual .pg-card.is-back { position: absolute; inset: 0; transform: rotate(5deg) translate(18px, 10px); opacity: .55; filter: saturate(.7); }

/* ── Окно / лист покупки ── */
.pg-scrim { position: fixed; inset: 0; z-index: 5000; background: rgba(4,6,8,.72); display: none; align-items: center; justify-content: center; padding: 24px; }
.pg-scrim.is-open { display: flex; animation: pgFade .18s ease; }
@keyframes pgFade { from { opacity: 0; } }
@keyframes pgUp { from { transform: translateY(24px); opacity: 0; } }
.pg-sheet { width: min(860px, 100%); max-height: min(760px, calc(100vh - 48px)); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: 12px; box-shadow: var(--shadow-2); display: grid; grid-template-columns: 1fr 300px; overflow: hidden; animation: pgUp .22s ease; color: var(--text); font-size: 15px; line-height: 1.5; }
/* Ожидание кассы и итог – без превью сбоку: открытка уже в самом экране. */
.pg-sheet.is-final { width: min(580px, 100%); grid-template-columns: 1fr; }
.pg-sheet.is-final .pg-side { display: none; }
.pg-sheet-main { display: flex; flex-direction: column; min-height: 0; position: relative; }
.pg-sheet-head { padding: 18px 22px 0; display: flex; align-items: center; gap: 12px; }
.pg-grab { display: none; }
.pg-x { margin-left: auto; width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line); background: none; cursor: pointer; font-size: 18px; color: var(--text-dim); }
.pg-steps { display: flex; gap: 6px; padding: 14px 22px 0; }
.pg-steps button { flex: 1; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--text-faint); font: inherit; font-size: 12px; font-weight: 600; }
.pg-steps button::before { content: ""; display: block; height: 3px; border-radius: 2px; background: var(--pg-s3); margin-bottom: 6px; }
.pg-steps button.is-done { color: var(--text-dim); } .pg-steps button.is-done::before { background: rgba(255,201,77,.5); }
.pg-steps button.is-cur { color: var(--text); } .pg-steps button.is-cur::before { background: var(--accent); }
.pg-steps button[disabled] { cursor: default; }
.pg-body { padding: 18px 22px; overflow: auto; flex: 1; min-height: 0; }
.pg-body h3 { font-family: "Oswald", sans-serif; font-weight: 600; font-size: 26px; line-height: 1.1; margin: 0 0 6px; color: #fff; }
.pg-sub { color: var(--text-dim); margin: 0 0 16px; font-size: 14px; }
.pg-foot { padding: 14px 22px 18px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: center; background: var(--surface); }
.pg-sum { font-size: 13px; color: var(--text-faint); line-height: 1.3; min-width: 0; }
.pg-sum b { display: block; color: var(--text); font-family: "Oswald", sans-serif; font-size: 20px; font-weight: 600; }
.pg-foot .pg-btn-gold { margin-left: auto; min-width: 200px; }
.pg-side { background: #121214; border-left: 1px solid var(--border); padding: 22px 20px; display: flex; flex-direction: column; gap: 14px; overflow: auto; }
.pg-lbl { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--text-faint); }
.pg-rows { font-size: 13px; display: grid; gap: 6px; }
.pg-rows div { display: flex; justify-content: space-between; gap: 10px; }
.pg-rows span { color: var(--text-faint); }
.pg-rows b { text-align: right; font-weight: 600; }

/* поля */
.pg-field { display: block; margin-bottom: 14px; }
.pg-field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-dim); margin-bottom: 6px; }
.pg-input { width: 100%; height: 46px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line); background: #0f0f11; color: var(--text); font: inherit; outline: none; transition: border-color .15s; box-sizing: border-box; }
.pg-input:focus { border-color: rgba(255,201,77,.6); }
textarea.pg-input { height: auto; min-height: 84px; padding: 11px 14px; resize: vertical; line-height: 1.4; }
.pg-search { position: relative; }
.pg-search .pg-input { padding-left: 40px; }
.pg-mag { position: absolute; left: 13px; top: 14px; width: 18px; height: 18px; color: var(--text-faint); }
.pg-results { display: grid; gap: 6px; }
.pg-res { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; color: var(--text); font: inherit; }
.pg-res:hover { border-color: var(--border-strong); }
.pg-res.is-sel { border-color: var(--accent); background: rgba(255,201,77,.06); }
.pg-ava { width: 38px; height: 38px; border-radius: 7px; display: grid; place-items: center; font-family: "Oswald", sans-serif; font-weight: 700; font-size: 16px; flex: none; background: var(--pg-s3); color: var(--text-dim); text-transform: uppercase; }
.pg-nm { font-weight: 700; } .pg-meta { font-size: 12.5px; color: var(--text-faint); }
.pg-res-r { margin-left: auto; text-align: right; display: grid; gap: 3px; justify-items: end; }
.pg-empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--text-dim); font-size: 14px; }
.pg-empty b { color: var(--text); display: block; margin-bottom: 4px; }
.pg-hint { font-size: 13px; padding: 10px 12px; border-radius: 6px; margin-top: 12px; line-height: 1.4; color: var(--text); }
.pg-hint-gold { background: rgba(255,201,77,.08); border: 1px solid rgba(255,201,77,.25); }
.pg-hint-red { background: rgba(255,107,94,.08); border: 1px solid rgba(255,107,94,.3); }
.pg-hint-neutral { background: var(--surface-2); border: 1px solid var(--border); color: var(--text-dim); }
.pg-hint a { color: var(--accent); }

/* сроки */
.pg-plans { display: grid; gap: 8px; }
.pg-plan { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; position: relative; }
.pg-plan input { accent-color: var(--accent); width: 18px; height: 18px; margin: 0; }
.pg-plan:has(input:checked) { border-color: var(--accent); background: rgba(255,201,77,.06); }
.pg-pt { font-weight: 700; font-size: 16px; } .pg-pd { font-size: 12.5px; color: var(--text-faint); }
.pg-pp { text-align: right; } .pg-pp b { font-family: "Oswald", sans-serif; font-weight: 600; font-size: 22px; }
.pg-pp s { display: block; font-size: 12px; color: var(--text-faint); }
.pg-flag { position: absolute; top: -9px; right: 14px; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 4px; background: var(--accent); color: var(--accent-ink); }

/* открытка в сценарии */
.pg-themes { display: flex; gap: 8px; margin-bottom: 14px; }
.pg-themes button { width: 58px; height: 38px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; padding: 0; }
.pg-themes button.is-on { border-color: var(--accent); }
.pg-themes .is-gold { background: linear-gradient(135deg,#ffcf5a,#7a520f); }
.pg-themes .is-camo { background: linear-gradient(135deg,#6b6a3a,#2f3a1d); }
.pg-presets { display: flex; gap: 6px; flex-wrap: wrap; margin: -6px 0 14px; }
.pg-presets button { font: inherit; font-size: 12.5px; border: 1px solid var(--line); background: none; border-radius: 5px; padding: 4px 9px; cursor: pointer; color: var(--text-dim); }
.pg-presets button:hover { color: var(--text); border-color: var(--border-strong); }
.pg-count { float: right; font-weight: 500; color: var(--text-faint); }
.pg-from { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pg-from label { display: flex; gap: 10px; align-items: center; padding: 11px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; font-size: 14px; }
.pg-from label:has(input:checked) { border-color: var(--accent); }
.pg-from input { accent-color: var(--accent); margin: 0; }
.pg-from small { display: block; color: var(--text-faint); font-size: 12px; }

/* оплата */
.pg-methods { display: flex; gap: 8px; flex-wrap: wrap; }
.pg-methods label { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--accent); border-radius: 6px; background: var(--surface-2); font-size: 14px; }
.pg-methods input { accent-color: var(--accent); margin: 0; }
.pg-methods svg { color: var(--accent); }
.pg-check { display: flex; gap: 10px; font-size: 13px; color: var(--text-dim); margin-top: 14px; align-items: flex-start; }
.pg-check input { accent-color: var(--accent); margin-top: 3px; }
.pg-check a { color: var(--accent); }
.pg-recap { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); padding: 4px 14px; margin-bottom: 16px; }
.pg-recap div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.pg-recap div:last-child { border-bottom: 0; }
.pg-recap span { color: var(--text-faint); } .pg-recap b { text-align: right; }
.pg-recap a { color: var(--accent); font-size: 12.5px; margin-left: 8px; cursor: pointer; text-decoration: none; font-weight: 600; }
.pg-err { margin-top: 12px; }

/* ожидание и успех */
.pg-done-hero { text-align: center; padding: 6px 0 4px; }
.pg-seal { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 12px; display: grid; place-items: center; background: rgba(143,209,63,.14); color: var(--green); font-size: 30px; }
.pg-seal.is-wait { background: rgba(255,201,77,.12); color: var(--accent); animation: pgSpin 1.2s linear infinite; font-size: 24px; }
.pg-seal.is-bad { background: rgba(255,107,94,.12); color: var(--pg-red); }
@keyframes pgSpin { to { transform: rotate(360deg); } }
.pg-channels { display: grid; gap: 8px; margin: 16px 0; }
.pg-channel { display: flex; gap: 12px; align-items: center; padding: 11px 13px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-2); font-size: 14px; }
.pg-ci { width: 32px; height: 32px; border-radius: 7px; display: grid; place-items: center; background: var(--pg-s3); flex: none; color: var(--accent); }
.pg-channel small { display: block; color: var(--text-faint); font-size: 12.5px; }
.pg-st { margin-left: auto; font-size: 12px; font-weight: 700; white-space: nowrap; }
.pg-st.is-ok { color: var(--green); } .pg-st.is-no { color: var(--text-faint); }
.pg-share { display: flex; gap: 8px; }
.pg-share .pg-input { font-size: 13px; color: var(--text-dim); }
.pg-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.pg-confetti i { position: absolute; top: -12px; width: 7px; height: 12px; border-radius: 2px; animation: pgDrop 1.8s ease-in forwards; }
@keyframes pgDrop { to { transform: translateY(560px) rotate(540deg); opacity: 0; } }
.pg-label { font-size: 12px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .1em; font-weight: 700; margin: 20px 0 0; }

/* ── Страница открытки /gift/<код> ── */
.pg-page { max-width: 720px; margin: 28px auto 60px; padding-inline: 24px; }
.pg-unwrap { background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; padding: 26px; position: relative; overflow: hidden; }
.pg-unwrap h1 { font-family: "Oswald", sans-serif; font-weight: 600; font-size: 34px; line-height: 1.05; margin: 8px 0 6px; color: #fff; }
.pg-until { color: var(--text-dim); margin: 0 0 18px; }
.pg-unwrap .pg-card { max-width: 520px; }
.pg-until b { color: var(--text); }
.pg-opened { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; margin: 18px 0; font-size: 13.5px; }
.pg-opened div::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: 7px; }
.pg-acts { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pg-thanks-sent { color: var(--green); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.pg-note { font-size: 12.5px; margin: 14px 0 0; color: var(--text-faint); }

/* ── Адаптив ── */
@media (max-width: 960px) {
  .pg-sec { grid-template-columns: 1fr; padding: 30px 24px; gap: 28px; }
  .pg-visual { max-width: 420px; }
  .pg-sheet { grid-template-columns: 1fr; }
  .pg-side { display: none; }
}
@media (max-width: 640px) {
  .pg-wrap { margin-top: 40px; }
  .pg-sec { padding: 24px 16px; border-radius: 10px; }
  .pg-sec h2 { font-size: 32px; }
  .pg-who { grid-template-columns: 1fr; }
  .pg-who-i { display: flex; align-items: center; gap: 10px; }
  .pg-who-i b { margin: 0; }
  .pg-cta .pg-btn { width: 100%; }
  .pg-scrim { padding: 0; align-items: flex-end; }
  .pg-sheet { border-radius: 16px 16px 0 0; max-height: 92vh; max-height: 92dvh; border-bottom: 0; animation: pgSheetUp .25s ease; }
  @keyframes pgSheetUp { from { transform: translateY(100%); } }
  .pg-grab { display: block; position: absolute; left: 50%; top: 7px; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--border-strong); }
  .pg-sheet-head { padding: 18px 16px 0; }
  .pg-steps { padding: 12px 16px 0; }
  .pg-steps button { font-size: 0; } .pg-steps button.is-cur { font-size: 11.5px; }
  .pg-body { padding: 16px; }
  .pg-body h3 { font-size: 22px; }
  .pg-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .pg-foot .pg-btn-gold { min-width: 0; flex: 1; }
  .pg-sum { display: none; }
  .pg-from { grid-template-columns: 1fr; }
  .pg-card { padding: 16px; } .pg-c-big { font-size: 24px; }
  .pg-share { flex-direction: column; }
  .pg-page { padding-inline: 16px; margin-top: 16px; }
  .pg-opened { grid-template-columns: 1fr; }
  .pg-unwrap { padding: 20px 16px; } .pg-unwrap h1 { font-size: 28px; }
}
