/* Страницы магазина. Кирпичи (.tile, .btn, .field, .chip, .sheet, .price) и токены держит каркас. */

.shop, .shop-sheet {
  --s-gap: var(--gap, 14px);
  --s-ok: var(--accent);
  --s-warn: #ffc857;
  --s-bad: var(--danger, #ff5a5f);
  --s-ink: var(--accent-ink, #03170a);
  --s-top: calc(var(--nav-h, 60px) + env(safe-area-inset-top) + 16px);
}
.shop-ic { flex: none; display: block; }

/* ---------- заголовки и текст ---------- */
.shop-head { margin: 0 2px clamp(18px, 3vw, 30px); }
.shop-h1 { margin: 0; font-size: clamp(36px, 6.4vw, 76px); line-height: .96; letter-spacing: -.045em; font-weight: 900; font-stretch: 116%; text-wrap: balance; }
.shop-h2 { margin: 0 0 10px; font-size: 18px; line-height: 1.2; letter-spacing: -.02em; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.shop-lead { margin: 10px 0 0; max-width: 52ch; color: var(--muted); font-size: 16px; line-height: 1.5; text-wrap: pretty; }
.shop-kicker { margin: 0 0 8px; color: var(--muted); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; }
.shop-note { margin: 0 0 12px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.shop-fine { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.shop-fine a, .shop-note a, .shop-text a, .shop-check a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline); }
.shop-fine a:hover, .shop-check a:hover, .shop-text a:hover { text-decoration-color: currentColor; }
.shop-text { color: var(--text); font-size: 16px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.shop-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 4px; margin-bottom: 4px; color: var(--muted); font-size: 15px; text-decoration: none; }
.shop-back::before { content: ""; width: 8px; height: 8px; border-left: 1.7px solid currentColor; border-bottom: 1.7px solid currentColor; transform: rotate(45deg); }
.shop-back:hover { color: var(--text); }
.shop-link { appearance: none; background: none; border: 0; padding: 0; min-height: 44px; font: inherit; color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline); cursor: pointer; }
.shop-link:hover { text-decoration-color: currentColor; }
.shop-err { margin: 10px 0 0; padding: 10px 12px; border-radius: 12px; background: color-mix(in srgb, var(--s-bad) 12%, transparent); color: color-mix(in srgb, var(--s-bad) 60%, #fff); font-size: 15px; line-height: 1.45; }
.shop-ok { margin: 10px 0 0; display: flex; gap: 8px; align-items: flex-start; color: var(--s-ok); font-size: 15px; line-height: 1.45; }
.shop-loading { padding: 28px 4px; color: var(--muted); font-size: 15px; }

/* ---------- сетка каталога ---------- */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--s-gap); }
.shop-tile { display: flex; flex-direction: column; padding: 10px; min-width: 0; }
.shop-cover { position: relative; display: block; aspect-ratio: 1; border-radius: calc(var(--radius) - 8px); overflow: hidden; background: var(--surface-2); }
.shop-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.shop-tile .shop-cover img { transition: transform .5s var(--ease-out); }
.shop-tile:hover .shop-cover img { transform: scale(1.04); }
.shop-cover-blank { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(40px, 9vw, 84px); font-weight: 800; letter-spacing: -.06em; color: color-mix(in srgb, var(--text) 16%, transparent);
  background: radial-gradient(120% 90% at 20% 10%, color-mix(in srgb, var(--accent) 34%, var(--surface-2)), var(--surface-2) 62%); }
.shop .tile .shop-play { position: absolute; right: 20px; top: 20px; width: 48px; height: 48px; background: rgb(5 7 6 / .62); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.shop .tile .shop-play:hover, .shop .tile .shop-play.is-playing { background: var(--accent); }
.shop-tile-meta { padding: 12px 6px 6px; min-width: 0; }
.shop-tile-title { display: block; font-size: 17px; font-weight: 750; letter-spacing: -.02em; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-tile-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; min-height: 24px; }
.shop-tile-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-tile.is-sold .shop-cover img { filter: grayscale(1) brightness(.6); }
.shop-chip-sold { color: var(--s-warn); background: color-mix(in srgb, var(--s-warn) 10%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--s-warn) 30%, transparent); }
.shop-sold-big { height: 40px; font-size: 15px; padding: 0 18px; }

.shop-empty { padding: clamp(28px, 6vw, 56px) var(--pad, 20px); text-align: center; display: flex; flex-direction: column; align-items: center; }
.shop-empty-title { margin: 0 0 8px; font-size: 22px; font-weight: 650; letter-spacing: -.02em; }
.shop-empty .shop-note { max-width: 40ch; margin-bottom: 18px; }
.shop-empty-btns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- карточка товара ---------- */
.shop-pgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: var(--s-gap); align-items: start; }
.shop-art { padding: 12px; position: sticky; top: var(--s-top); }
.shop-art .shop-cover { border-radius: calc(var(--radius) - 8px); }
.shop-info { display: grid; gap: var(--s-gap); min-width: 0; }
.shop-buy, .shop-facts, .shop-desc { padding: clamp(18px, 2.6vw, 28px); }
.shop-buy .shop-h1 { font-size: clamp(32px, 4.4vw, 58px); overflow-wrap: anywhere; }
.shop-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.shop-chip-tag { color: var(--muted); }
.shop-preview { appearance: none; width: 100%; margin-top: 18px; padding: 10px 14px 10px 10px; display: flex; align-items: center; gap: 12px; min-height: 68px; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  border: 1px solid var(--hairline); border-radius: 18px; background: var(--surface-2); transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.shop-preview:hover { border-color: color-mix(in srgb, var(--accent) 60%, var(--hairline)); }
.shop-preview:active { transform: scale(.99); }
.shop-preview .play { width: 48px; height: 48px; background: var(--accent); color: var(--s-ink); }
.shop-preview.is-playing .shop-bars { opacity: 1; color: var(--accent); }
.shop-preview-text { flex: none; display: grid; gap: 2px; }
.shop-preview-text b { font-size: 16px; font-weight: 600; }
.shop-preview-text i { font-style: normal; font-size: 13px; color: var(--muted); }
.shop-bars { flex: 1; min-width: 0; height: 34px; display: flex; align-items: center; justify-content: flex-end; gap: 3px; overflow: hidden; opacity: .5; }
.shop-bars i { flex: none; width: 3px; height: var(--h); border-radius: 2px; background: currentColor; }
.shop-buyrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.shop-price-big { font-size: clamp(26px, 3.4vw, 36px); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.shop-cta { min-height: 54px; padding-inline: 34px; font-size: 17px; }
.shop-owned { display: inline-flex; align-items: center; gap: 8px; color: var(--s-ok); }
.shop-mark { margin: 16px 0 0; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; border-radius: 14px; font-size: 14px; line-height: 1.45;
  background: color-mix(in srgb, var(--s-warn) 9%, transparent); color: color-mix(in srgb, var(--s-warn) 78%, var(--text)); }
.shop-mark .shop-ic { margin-top: 1px; width: 18px; height: 18px; }
.shop-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.shop-rows li { display: flex; align-items: center; gap: 10px; font-size: 15px; line-height: 1.35; min-width: 0; }
.shop-rows .shop-ic { color: var(--muted); width: 18px; height: 18px; }
.shop-rows li.is-off { color: var(--muted); }
.shop-rows li.is-off span { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 50%, transparent); }
.shop-rows-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin: 14px 0; }

/* ---------- шторка лицензий ---------- */
.shop-sheet { width: min(620px, 100%); }
.shop-sheet-in { width: 100%; }
.shop-sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px; }
.shop-sheet-head .shop-h2 { font-size: 22px; margin-bottom: 4px; }
.shop-sheet-head .shop-note { margin: 0; }
.shop-x { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.07); color: var(--text); }
.shop-tiers { display: grid; gap: 10px; margin-top: 16px; }
.shop-tier { display: flex; flex-direction: column; padding: 16px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); min-width: 0; }
.shop-tier.is-excl { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent-2) 55%, transparent); background: color-mix(in srgb, var(--accent-2) 9%, var(--surface)); }
.shop-tier-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.shop-tier-name { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.01em; }
.shop-tier-files { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.shop-tier-price { font-size: 22px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.shop-tier.is-excl .shop-tier-price { font-size: 16px; color: var(--muted); font-weight: 600; }
.shop-tier-btn { margin-top: auto; width: 100%; min-height: 48px; }
.shop-offer { margin-top: 4px; }
.shop-tier-btn + .shop-offer { margin-top: 0; }
.shop-sheet-foot { text-align: center; margin-top: 14px; }

/* ---------- формы ---------- */
.shop-form { display: grid; gap: 8px; }
.shop-form textarea.field { min-height: 88px; }
.shop-label { display: block; margin: 6px 0 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
.shop-label i { font-style: normal; opacity: .7; }
.shop-inline { display: flex; gap: 8px; }
.shop-inline .field { flex: 1; min-width: 0; }
.shop-inline .btn { flex: none; min-height: 50px; }
.shop-code { letter-spacing: .32em; font-variant-numeric: tabular-nums; font-weight: 600; }
.shop-f2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.shop-billing { gap: 6px; }
input.field.is-bad, select.field.is-bad, textarea.field.is-bad { box-shadow: inset 0 0 0 1.5px var(--s-bad); }
.shop-check.is-bad .shop-box { border-color: var(--s-bad); }
.shop select.field { padding-right: 40px; background-color: var(--surface-2); background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
.shop select.field option { background: #141917; color: #f2f6f3; }

/* ---------- оплата ---------- */
.shop-cogrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: var(--s-gap); align-items: start; }
.shop-steps { display: grid; gap: var(--s-gap); min-width: 0; grid-column: 1; grid-row: 1; }
.shop-summary { grid-column: 2; grid-row: 1; position: sticky; top: var(--s-top); padding: clamp(18px, 2.4vw, 24px); }
.shop-step { padding: clamp(18px, 2.4vw, 26px); }
.shop-stepn { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hairline); color: var(--muted); }
.shop-step.is-done .shop-stepn { background: color-mix(in srgb, var(--s-ok) 18%, transparent); color: var(--s-ok); box-shadow: none; }
.shop-step.is-locked > :not(.shop-h2) { opacity: .4; pointer-events: none; }
.shop-signed { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 15px; }
.shop-signed p { margin: 0; display: flex; gap: 8px; align-items: center; min-width: 0; color: var(--s-ok); }
.shop-signed p span { color: var(--text); overflow-wrap: anywhere; }
.shop-items { list-style: none; margin: 0 0 6px; padding: 0; display: grid; }
.shop-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.shop-item-cover { width: 56px; height: 56px; border-radius: 12px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); font-weight: 800; }
.shop-item-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shop-item-title { display: block; font-size: 15px; font-weight: 700; line-height: 1.3; padding-block: 12px; margin-block: -12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shop-item-sub { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.shop-item-side { display: grid; justify-items: end; gap: 0; }
.shop-item-price { font-weight: 650; font-size: 15px; }
.shop-item-rm { appearance: none; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; min-height: 32px; padding: 6px 0 6px 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline); position: relative; }
.shop-item-rm::after { content: ""; position: absolute; inset: -6px -6px -6px -4px; }
.shop-item-rm:hover { color: var(--text); }
.shop-coupon { margin-top: 8px; }
.shop-totals { margin: 16px 0 0; display: grid; gap: 8px; }
.shop-totals > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; color: var(--muted); }
.shop-totals dt, .shop-totals dd { margin: 0; }
.shop-totals .shop-total { color: var(--text); font-size: 17px; font-weight: 600; padding-top: 10px; border-top: 1px solid var(--hairline); }
.shop-totals .shop-total dd { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.shop-checks { display: grid; gap: 4px; }
.shop-check { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; min-height: 44px; font-size: 15px; line-height: 1.5; cursor: pointer; position: relative; }
.shop .tile .shop-check input { position: absolute; opacity: 0; width: 44px; height: 44px; left: -9px; top: 0; margin: 0; cursor: pointer; }
.shop-box { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid color-mix(in srgb, var(--text) 34%, transparent); display: grid; place-items: center; color: transparent; transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out); }
.shop-box .shop-ic { width: 16px; height: 16px; stroke-width: 2.6; }
.shop-check input:checked + .shop-box { background: var(--accent); border-color: var(--accent); color: var(--s-ink); }
.shop-check input:focus-visible + .shop-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.shop-payhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.shop-payhead .shop-h2 { margin: 0; font-size: 22px; }
.shop-paybtns { display: grid; gap: 10px; margin-top: 12px; }
.shop-paybtn { width: 100%; min-height: 54px; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.shop-paypal span { font-weight: 800; font-style: italic; letter-spacing: -.02em; }
.shop-paytest { color: var(--s-warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--s-warn) 45%, transparent); background: color-mix(in srgb, var(--s-warn) 7%, transparent); }
.btn.is-busy > * { visibility: hidden; }
.shop-item.is-bad .shop-item-title { color: var(--s-bad); }
.shop-item-bad { display: block; margin-top: 4px; color: color-mix(in srgb, var(--s-bad) 60%, #fff); font-size: 13px; line-height: 1.4; }
.shop-item-was { color: var(--muted); font-weight: 500; font-size: 13px; }
.shop-item-main { min-width: 0; }

/* ---------- кабинет ---------- */
.shop-acc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.shop-acc-head .shop-signed { color: var(--muted); }
.shop-acc-signin { max-width: 560px; }
.shop-frozen { padding: clamp(18px, 2.4vw, 26px); margin-bottom: var(--s-gap); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--s-bad) 50%, transparent); background: color-mix(in srgb, var(--s-bad) 8%, var(--surface)); }
.shop-frozen p { margin: 0 0 8px; font-size: 15px; line-height: 1.5; }
.shop-frozen a { text-decoration: underline; text-underline-offset: 3px; }
.shop-orders { display: grid; gap: var(--s-gap); }
.shop-order { padding: clamp(16px, 2.4vw, 24px); }
.shop-order-head { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--hairline); }
.shop-order-id { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.shop-order-code { font-size: 18px; font-weight: 650; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.shop-order-date { color: var(--muted); font-size: 14px; }
.shop-order-side { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.shop-order-total { font-weight: 650; }
.shop-doclink { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--hairline); }
.shop-doclink:hover { color: var(--text); }
.shop-doclink .shop-ic { width: 16px; height: 16px; }
.shop-oitem { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--hairline); }
.shop-oitem:last-child { border-bottom: 0; padding-bottom: 0; }
.shop-oitem .shop-item-cover { width: 64px; height: 64px; border-radius: 14px; }
.shop-oitem-title { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.shop-oitem-sub { color: var(--muted); font-size: 13px; margin-top: 3px; line-height: 1.45; }
.shop-oitem-acts { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; justify-content: flex-end; }
.shop-dl { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; }
.shop-dl.is-off { opacity: .5; pointer-events: none; }
.shop-status { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .02em; background: var(--surface-2); color: var(--muted); }
.shop-status.is-paid { color: var(--s-ok); background: color-mix(in srgb, var(--s-ok) 12%, transparent); }
.shop-status.is-pending { color: var(--s-warn); background: color-mix(in srgb, var(--s-warn) 12%, transparent); }
.shop-status.is-bad { color: var(--s-bad); background: color-mix(in srgb, var(--s-bad) 12%, transparent); }

/* ---------- документы ---------- */
.shop-legal { max-width: calc(880px + var(--gutter, 16px) * 2); }
.shop-legal-nav { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 14px; scrollbar-width: none; }
.shop-legal-nav::-webkit-scrollbar { display: none; }
.shop-legal-nav .chip { flex: none; min-height: 44px; display: inline-flex; align-items: center; padding-inline: 16px; text-decoration: none; color: var(--muted); }
.shop-legal-nav .chip.is-on { color: var(--accent); background: rgb(var(--accent-rgb) / .1); box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / .25); }
.shop-doc { padding: clamp(20px, 4vw, 44px); }
.shop-doc .shop-h1 { font-size: clamp(28px, 4.4vw, 44px); }
.shop-doc-body { white-space: normal; margin-top: 18px; color: color-mix(in srgb, var(--text) 86%, transparent); }
.shop-doc-body h2 { margin: 34px 0 10px; font-size: 22px; letter-spacing: -.02em; color: var(--text); }
.shop-doc-body h3 { margin: 24px 0 6px; font-size: 17px; color: var(--text); }
.shop-doc-body p { margin: 0 0 12px; max-width: 70ch; }
.shop-doc-body ul { margin: 0 0 12px; padding-left: 20px; max-width: 70ch; }
.shop-doc-body li { margin: 4px 0; }
.shop-doc-body .legal-warn { padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--s-warn) 9%, transparent); color: color-mix(in srgb, var(--s-warn) 78%, var(--text)); }

/* ---------- телефон ---------- */
@media (max-width: 899px) {
  .shop-pgrid { grid-template-columns: minmax(0, 1fr); }
  .shop-art { position: static; }
  .shop-cogrid { grid-template-columns: minmax(0, 1fr); }
  .shop-steps, .shop-summary { grid-column: 1; grid-row: auto; }
  .shop-summary { position: static; order: -1; }
}
@media (max-width: 599px) {
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-tile { padding: 7px; }
  .shop .tile .shop-play { right: 13px; top: 13px; width: 44px; height: 44px; }
  .shop-tile-meta { padding: 9px 4px 4px; }
  .shop-tile-title { font-size: 15px; }
  .shop-tile-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .shop-buyrow .shop-cta, .shop-buyrow .shop-owned { flex: 1 1 100%; justify-content: center; }
  .shop-bars { display: none; }
  .shop-oitem { grid-template-columns: 56px minmax(0, 1fr); }
  .shop-oitem .shop-item-cover { width: 56px; height: 56px; }
  .shop-oitem-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .shop-oitem-acts .shop-dl { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 419px) {
  .shop-f2 { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .shop-inline { flex-wrap: wrap; }
  .shop-inline .btn { flex: 1 1 100%; }
  .shop-inline .field { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .shop-tile .shop-cover img, .shop-preview, .shop-box { transition: none; }
}

/* ---------- корзина в шапке (ссылку ставит shop.js, пока в корзине что-то есть) ---------- */
.nav-links .shop-cartlink { gap: 7px; color: var(--text); }
.shop-cartlink b { min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 999px; background: var(--accent); color: var(--accent-ink, #03170a); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.shop-order.is-new { box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / .4), 0 26px 80px -34px var(--glow); }

/* ---------- ожидание подтверждения оплаты ---------- */
.shop-wait { display: flex; gap: 16px; align-items: center; padding: clamp(18px, 2.4vw, 24px); margin-bottom: var(--s-gap); }
.shop-wait[hidden] { display: none; }
.shop-wait p { margin: 0; }
.shop-wait-title { font-size: 17px; font-weight: 650; margin-bottom: 4px !important; }
.shop-spin { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid color-mix(in srgb, var(--accent) 25%, transparent); border-top-color: var(--accent); animation: shop-spin .8s linear infinite; }
.is-waited .shop-spin { display: none; }
@keyframes shop-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .shop-spin { animation-duration: 2.4s; } }
.shop-oitem-main .shop-err { margin-top: 8px; font-size: 14px; }

/* ---------- шторка: одна яркая кнопка на экране не нужна четыре раза ---------- */
.shop-tier-buy { color: var(--accent); background: rgb(var(--accent-rgb) / .1); box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / .28); }
.shop-tier-buy:hover { color: var(--s-ink); background: var(--accent); box-shadow: 0 12px 36px -12px var(--glow); }
.shop-tier.is-na { background: transparent; }
.shop-tier.is-na .shop-tier-name, .shop-tier.is-na .shop-tier-price, .shop-tier.is-na .shop-rows { opacity: .5; }
.shop-tier.is-na .shop-tier-btn { min-height: 44px; font-size: 14px; }
.shop-order-id { align-items: center; }
.shop-coupon[hidden] { display: none; }
.shop-coupon-open { margin-top: 6px; font-size: 14px; color: var(--muted); }
.nav-links .shop-cartlink { display: inline-flex; align-items: center; gap: 6px; }
.nav-links .shop-cartlink[hidden] { display: none; }
.shop-cartlink .shop-ic { width: 19px; height: 19px; }
@media (max-width: 599px) {
  .shop-cartlink-t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 419px) {
  .shop-coupon .shop-inline { flex-wrap: nowrap; }
  .shop-coupon .shop-inline .field { flex: 1 1 auto; }
  .shop-coupon .shop-inline .btn { flex: none; }
}
@media (max-width: 599px) {
  /* корзина пятой ссылкой не влезает в 360px: ссылки шапки ужимаются, пока она видна */
  .nav-links:has(.shop-cartlink:not([hidden])) a { padding-inline: clamp(5px, 3vw - 4px, 8px); }
  .nav-links:has(.shop-cartlink:not([hidden])) a[aria-current="page"]::after { left: 6px; right: 6px; }
  .nav-links .shop-cartlink { gap: 4px; }
  .shop-cartlink b { min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; }
}

/* ---------- кабинет: плагин (ключ, активации, установщики по системам) ---------- */
.shop-plug { grid-column: 2 / -1; display: grid; gap: 12px; margin-top: 2px; }
.shop-key { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 12px; padding: 6px 6px 14px 14px; border-radius: 14px; background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px var(--hairline); }
.shop-key-lab { flex: 1 1 auto; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.shop-key-code { order: 3; flex: 1 0 100%; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; letter-spacing: .04em; overflow-wrap: anywhere; user-select: all; -webkit-user-select: all; }
.shop-key-copy { flex: none; min-height: 44px; padding-inline: 18px; }
.shop-key-meta, .shop-plug-note, .shop-key-off { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
.shop-key-off { font-size: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .03); box-shadow: inset 0 0 0 1px var(--hairline); }
.shop-plug-dl { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-plug-dl .shop-dl small { margin-left: 2px; font-size: 13px; font-weight: 500; opacity: .75; font-variant-numeric: tabular-nums; }
.shop-older summary { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; color: var(--muted); font-size: 14px; }
.shop-older summary:hover { color: var(--text); }
.shop-older ul { margin: 0; padding: 0; list-style: none; display: grid; }
.shop-older li { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-top: 1px solid var(--hairline); font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 599px) {
  .shop-plug { grid-column: 1 / -1; }
  .shop-plug-dl .shop-dl { flex: 1 1 100%; justify-content: center; }
}
.shop-oitem-acts:empty { display: none; }
@media (max-width: 599px) {
  /* five things in the phone header: the cart count sits on the bag icon instead of beside it */
  .nav-links .shop-cartlink { position: relative; justify-content: center; min-width: 44px; padding: 0 8px !important; }
  .nav-links .shop-cartlink .shop-ic { width: 22px; height: 22px; }
  .nav-links .shop-cartlink b { position: absolute; top: 4px; right: 1px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10.5px; box-shadow: 0 0 0 2px rgb(5 7 6); }
  .nav-links:has(.shop-cartlink:not([hidden])) a { padding-inline: 6px; }
  .nav-links:has(.shop-cartlink:not([hidden])) a[aria-current="page"]::after { left: 6px; right: 6px; }
}
@media (max-width: 374px) {
  .nav-in:has(.shop-cartlink:not([hidden])) .wordmark { font-size: 17px; }
  .nav-links:has(.shop-cartlink:not([hidden])) a { padding-inline: 5px; }
}

/* ---------- free version of a paid kit (block on the kit page, chip on the tile) ---------- */
.shop-tile-free { position: absolute; left: 10px; top: 10px; height: 26px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); box-shadow: 0 6px 18px -6px var(--glow); }
.shop-price-free { color: var(--accent); }
.shop-free { padding: clamp(18px, 2.6vw, 28px); display: grid; gap: 12px; background: radial-gradient(120% 90% at 100% 0%, rgb(var(--accent-rgb) / 0.12), rgb(var(--accent-rgb) / 0) 60%), var(--surface); }
.shop-free-top { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.shop-free-ic { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; background: var(--accent); color: var(--accent-ink); box-shadow: 0 8px 22px -8px var(--glow); }
.shop-free-ic .shop-ic { width: 22px; height: 22px; }
.shop-free-tx { display: grid; gap: 2px; min-width: 0; }
.shop-free-tx .shop-h2 { margin: 0; }
.shop-free-meta { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; }
.shop-free .shop-price-free { font-size: 22px; }
.shop-free-how { margin: 0; }
.shop-free-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.shop-free-pls { display: flex; }
.shop-free-pl { width: 28px; height: 28px; margin-left: -8px; display: grid; place-items: center; border-radius: 50%; background: var(--surface-2); box-shadow: 0 0 0 2px var(--surface); color: var(--muted); }
.shop-free-pl:first-child { margin-left: 0; }
.shop-free-pl .ic { width: 15px; height: 15px; }
.shop-free-cta { flex: 1 1 auto; }

/* plugins & licenses in the account (30.10) */
.shop-lics { display: grid; gap: 12px; margin-bottom: 18px; scroll-margin-top: 80px; }
.shop-lics-h { margin: 6px 0 0; }
.shop-lic { display: grid; gap: 10px; }
.shop-lic-sub { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.shop-lic-devs { display: grid; gap: 6px; }
.shop-lic-dev { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px;
  padding: 6px 12px; border: 1px solid var(--hairline); border-radius: 12px; font-size: 14px; min-width: 0; }
.shop-lic-dev span { min-width: 0; overflow-wrap: anywhere; color: var(--muted); }
.shop-lic-dev b { color: var(--text); font-weight: 600; margin-right: 4px; }
.shop-lic .shop-link { min-height: 44px; }
.shop-lic-link { max-width: 520px; margin: 0 auto; display: grid; gap: 12px; }
.shop-lic-code { font: 600 28px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }

/* ---------- окно аккаунта (шторка над любой страницей) ---------- */
.shop-acc-sheet { width: min(760px, 100%); }
.shop-acc-sheet .shop-sheet-head { align-items: center; margin-bottom: 14px; }
.shop-acc-sheet .shop-sheet-head .shop-h2 { margin-bottom: 0; }
.shop-acc-sheet .shop-signed { color: var(--muted); font-size: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 4px; }
.shop-acc-sheet .shop-acc-signin { padding: 0; }
.shop-acc-sheet .shop-orders, .shop-acc-sheet .shop-lics { display: grid; gap: 12px; }
.shop-acc-sheet .shop-lics { margin-bottom: 12px; }
.shop-acc-sheet .shop-lics-h { font-size: 16px; margin-bottom: 0; }
.shop-acc-sheet .tile { background: var(--surface); box-shadow: inset 0 0 0 1px var(--hairline); }
.shop-acc-sheet .shop-order, .shop-acc-sheet .shop-lic { padding: 16px; }
.shop-acc-sheet .shop-loading { color: var(--muted); padding: 8px 0; }

/* ---------- /pay/<code>: payment check (templates/shop_pay.html, initPay in shop.js) ----------
   Motion is transform and opacity only, on small layers; the stage is the data-stage attribute of the section. */
.shop-payp { --pay-c: var(--accent-rgb); }
.shop-payp[data-stage="bank_details"], .shop-payp[data-stage="waiting_bank"] { --pay-c: var(--accent-2-rgb); }
.shop-payp[data-stage="failed"], .shop-payp[data-stage="rejected"], .shop-payp[data-stage="closed"] { --pay-c: 255 90 95; }
.shop-payp [hidden] { display: none !important; }
.pay-grid { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.pay-side { display: grid; gap: var(--gap); min-width: 0; }
.pay-stage { display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(26px, 5vw, 48px) var(--pad); min-width: 0; }
.pay-title { margin: 0 0 8px; font-size: clamp(22px, 3.4vw, 30px); font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.pay-title.is-in, .pay-title.is-in + .pay-sub { animation: pay-text .42s var(--ease-out) both; }
.pay-sub { max-width: 46ch; margin: 0 0 4px; text-wrap: pretty; }
.pay-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 16px; }
.pay-actions:empty { display: none; }
.pay-actions .btn { min-height: 48px; }

.pay-orb { position: relative; width: 168px; height: 168px; display: grid; place-items: center; margin-bottom: 24px; }
.pay-orb::after { content: ""; position: absolute; inset: -18px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, rgb(var(--pay-c) / .22), rgb(var(--pay-c) / 0)); opacity: 0; transition: opacity .6s var(--ease-out); }
.pay-ring { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid rgb(var(--pay-c) / .75); opacity: 0; transform: scale(.42); will-change: transform, opacity; }
.pay-sweep { position: absolute; inset: 16px; border-radius: 50%; opacity: 0; transition: opacity .35s linear; will-change: transform;
  background: conic-gradient(from 0deg, rgb(var(--pay-c) / 0) 0 58%, rgb(var(--pay-c) / .9));
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2.4px));
  mask: radial-gradient(closest-side, transparent calc(100% - 3px), #000 calc(100% - 2.4px)); }
.pay-core { position: relative; width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--hairline-2); color: rgb(var(--pay-c)); }
.pay-core::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgb(var(--pay-c)); opacity: 0; transform: scale(.55);
  transition: opacity .45s var(--ease-out), transform .55s var(--ease-out); }
.pay-core::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: 0; }
.pay-ic { position: absolute; width: 34px; height: 34px; opacity: 0; transform: scale(.7); transition: opacity .3s linear, transform .5s var(--ease-out); }
.pay-pack { position: absolute; inset: 30px; opacity: 0; transition: opacity .35s linear; will-change: transform; }
.pay-pack i { position: absolute; inset: 0; }
.pay-pack i::before { content: ""; position: absolute; left: 50%; top: -3px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: rgb(var(--pay-c)); }
.pay-pack i:nth-child(2) { transform: rotate(120deg); }
.pay-pack i:nth-child(3) { transform: rotate(240deg); }

/* waiting: rings travel outwards, the arc sweeps; PayPal is quick, a bank transfer is slow and blue */
[data-stage="load"] .pay-ring, [data-stage="waiting_paypal"] .pay-ring, [data-stage="slow_paypal"] .pay-ring { animation: pay-pulse 2.4s cubic-bezier(.2, .6, .3, 1) infinite; }
[data-stage="waiting_bank"] .pay-ring { animation: pay-pulse 4.2s cubic-bezier(.2, .6, .3, 1) infinite; }
[data-stage] .pay-ring:nth-child(2) { animation-delay: .8s; }
[data-stage] .pay-ring:nth-child(3) { animation-delay: 1.6s; }
[data-stage="waiting_bank"] .pay-ring:nth-child(2) { animation-delay: 1.4s; }
[data-stage="waiting_bank"] .pay-ring:nth-child(3) { animation-delay: 2.8s; }
[data-stage="load"] .pay-sweep, [data-stage="waiting_paypal"] .pay-sweep { opacity: 1; animation: pay-rot 1.15s linear infinite; }
[data-stage="waiting_bank"] .pay-sweep { opacity: .8; animation: pay-rot 3.4s linear infinite; }
[data-stage="load"] .pay-core::after, [data-stage="waiting_paypal"] .pay-core::after, [data-stage="slow_paypal"] .pay-core::after, [data-stage="auth"] .pay-core::after { animation: pay-dot 1.2s var(--ease-in-out) infinite; }
[data-stage="bank_details"] .pay-ic-bank, [data-stage="waiting_bank"] .pay-ic-bank { opacity: 1; transform: none; }
[data-stage="bank_details"] .pay-ring { opacity: .22; transform: scale(.72); }
[data-stage="bank_details"] .pay-ring:nth-child(2) { transform: scale(.86); opacity: .14; }
[data-stage="bank_details"] .pay-ring:nth-child(3) { transform: scale(1); opacity: .08; }
/* received: the rings close in once, the core fills, the tick settles */
[data-stage="received"] .pay-ring { animation: pay-close .9s var(--ease-out) both; }
[data-stage="received"] .pay-ring:nth-child(2) { animation-delay: .12s; }
[data-stage="received"] .pay-ring:nth-child(3) { animation-delay: .24s; }
[data-stage="received"] .pay-core, [data-stage="releasing"] .pay-core, [data-stage="done"] .pay-core { color: var(--accent-ink); }
[data-stage="received"] .pay-core::before, [data-stage="releasing"] .pay-core::before, [data-stage="done"] .pay-core::before { opacity: 1; transform: none; }
[data-stage="received"] .pay-ic-ok, [data-stage="releasing"] .pay-ic-ok, [data-stage="done"] .pay-ic-ok { opacity: 1; transform: none; }
[data-stage="received"] .pay-orb::after, [data-stage="done"] .pay-orb::after { opacity: 1; }
/* releasing: three packets circle the core while the copy is prepared */
[data-stage="releasing"] .pay-pack { opacity: 1; animation: pay-rot 2.2s linear infinite; }
[data-stage="releasing"] .pay-sweep { opacity: .55; animation: pay-rot 1.6s linear infinite reverse; }
[data-stage="failed"] .pay-core::before, [data-stage="rejected"] .pay-core::before, [data-stage="closed"] .pay-core::before { opacity: .16; transform: none; }
[data-stage="failed"] .pay-ic-no, [data-stage="rejected"] .pay-ic-no, [data-stage="closed"] .pay-ic-no { opacity: 1; transform: none; }

.pay-steps { position: relative; list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: min(440px, 100%); }
.pay-steps li { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.pay-steps li b { position: relative; width: 14px; height: 14px; border-radius: 50%; background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--hairline-2); }
.pay-steps li b::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgb(var(--pay-c)); transform: scale(0); opacity: 0; transition: transform .45s var(--ease-out), opacity .3s linear; }
.pay-steps li.is-done b::after { transform: none; opacity: 1; }
.pay-steps li.is-now b::after { transform: scale(.5); opacity: 1; }
.pay-steps li.is-done, .pay-steps li.is-now { color: var(--text); }
.pay-rail { position: absolute; left: 12.5%; right: 12.5%; top: 6px; height: 2px; border-radius: 2px; background: var(--hairline-2); }
.pay-rail-fill { position: absolute; inset: 0; border-radius: 2px; background: rgb(var(--pay-c)); transform-origin: left center; transform: scaleX(0); transition: transform .7s var(--ease-out); }
.pay-comet { position: absolute; top: -2px; height: 6px; width: 33.333%; overflow: hidden; }
.pay-comet b { position: absolute; inset: 0; animation: pay-run 1.5s var(--ease-in-out) infinite; will-change: transform, opacity; }
.pay-comet b::before { content: ""; position: absolute; left: -22px; top: 1px; width: 22px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, rgb(var(--pay-c) / 0), rgb(var(--pay-c))); }
[data-stage="waiting_bank"] .pay-comet b { animation-duration: 3s; }

.pay-rows { margin: 0 0 12px; }
.pay-rows div { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; border-bottom: 1px solid var(--hairline); }
.pay-rows dt { flex: none; color: var(--muted); font-size: 14px; }
.pay-rows dd { margin: 0; display: flex; align-items: center; gap: 10px; min-width: 0; text-align: right; font-weight: 600; }
.pay-rows dd span { overflow-wrap: anywhere; }
.pay-copy { flex: none; min-height: 44px; min-width: 44px; padding: 0 2px; }
.pay-sent { width: 100%; min-height: 52px; margin-top: 14px; }
.pay-items { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.pay-bank, .pay-summary { padding: var(--pad); }

@keyframes pay-pulse { 0% { transform: scale(.42); opacity: 0; } 14% { opacity: .62; } 100% { transform: scale(1); opacity: 0; } }
@keyframes pay-close { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(.46); opacity: 0; } }
@keyframes pay-rot { to { transform: rotate(360deg); } }
@keyframes pay-dot { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: none; } }
@keyframes pay-run { 0% { transform: translateX(0); opacity: 0; } 18% { opacity: 1; } 82% { opacity: 1; } 100% { transform: translateX(100%); opacity: 0; } }
@keyframes pay-text { from { opacity: 0; transform: translateY(8px); } }
@media (max-width: 860px) { .pay-grid { grid-template-columns: minmax(0, 1fr); } .pay-orb { width: 144px; height: 144px; } }
@media (prefers-reduced-motion: reduce) {
  .shop-payp .pay-ring, .shop-payp .pay-sweep, .shop-payp .pay-pack, .shop-payp .pay-comet b, .shop-payp .pay-core::after, .pay-title.is-in, .pay-title.is-in + .pay-sub { animation: none !important; }
  .shop-payp .pay-ring { opacity: .2; transform: scale(.72); }
  .shop-payp .pay-ring:nth-child(2) { transform: scale(.86); }
  .shop-payp .pay-ring:nth-child(3) { transform: scale(1); }
  .shop-payp .pay-sweep, .shop-payp .pay-pack, .shop-payp .pay-comet { opacity: 0; }
  .shop-payp .pay-core::after { opacity: 0; }
  .shop-payp .pay-rail-fill, .shop-payp .pay-core::before, .shop-payp .pay-ic, .shop-payp .pay-steps li b::after { transition: none; }
}

/* USDC on /pay (14.11): network pills, address, hash form */
.pay-rows dd.pay-nets { flex-wrap: wrap; justify-content: flex-end; gap: 6px; padding: 6px 0; }
.pay-net { min-height: 40px; padding: 0 12px; font-size: 13px; }
.pay-net.is-on { border-color: var(--accent, currentColor); }
.pay-addr { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.pay-claim { display: flex; gap: 8px; width: 100%; }
.pay-claim input { flex: 1; min-width: 0; min-height: 44px; font-size: 16px; padding: 0 12px; border-radius: 10px;
  border: 1px solid var(--hairline); background: transparent; color: inherit; }
@media (max-width: 560px) { .pay-rows div { flex-wrap: wrap; } .pay-rows dd { width: 100%; justify-content: flex-start; text-align: left; } }
