/* StarBanana. Акцент меняется вместе с товаром: жёлтый для Stars, лавандовый для Premium */
:root {
  --bg: #0c0b0e; --card: #141317; --field: #0f0e12; --chip: #1d1c21; --line: #2a2830; --line-2: #3a3740;
  --text: #f5f3ef; --muted: #9a96a3; --dim: #6c6874;
  --accent: #ffd333; --accent-2: #f5b800; --accent-ink: #1e1600; --accent-soft: rgba(255, 211, 51, .12); --accent-line: rgba(255, 211, 51, .35);
  --green: #4ecf8a; --red: #ff6b5e;
  --radius: 26px;
  color-scheme: dark;
}
body[data-product="premium"] {
  --accent: #b9a6ff; --accent-2: #9580ff; --accent-ink: #1b1238; --accent-soft: rgba(185, 166, 255, .13); --accent-line: rgba(185, 166, 255, .38);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--text); overflow-x: hidden;
  font: 16px/1.45 "Segoe UI", system-ui, -apple-system, "SF Pro Display", Roboto, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.trap { position: absolute; left: -9999px; top: 0; width: 1px; height: 1px; overflow: hidden; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.ic { width: 18px; height: 18px; flex: none; }
main { flex: 1; position: relative; z-index: 1; }

/* фон: мягкое свечение и тонкая дуга */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.bg::before { content: ""; position: absolute; width: 1400px; height: 760px; left: 50%; top: 52%; transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 255, 255, .06); border-radius: 50%; }
.bg::after { content: ""; position: absolute; width: 900px; height: 600px; left: 8%; top: 18%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent); filter: blur(30px); transition: background .4s; }

/* шапка */
.top { position: relative; z-index: 2; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.logo-mark { width: 44px; height: 44px; border-radius: 13px; object-fit: cover; display: block; flex: none; background: #241a33;
  box-shadow: 0 0 0 1px var(--accent-line), 0 6px 18px -6px var(--accent-soft); transition: box-shadow .3s, transform .2s; }
.logo:hover .logo-mark { transform: rotate(-4deg) scale(1.04); }
.actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); display: grid; place-items: center; cursor: pointer; color: var(--text); transition: border-color .15s, background .15s; }
.icon-btn:hover { border-color: var(--line-2); background: rgba(255, 255, 255, .05); }
.bot-btn { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; transition: border-color .15s; }
.bot-btn:hover { border-color: var(--line-2); }
.bot-btn .ic { width: 16px; height: 16px; color: var(--accent); }
@media (max-width: 560px) { .bot-btn span { display: none; } .bot-btn { width: 40px; padding: 0; justify-content: center; } .logo-text { font-size: 16px; } }

/* главная */
.shop { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 48px; align-items: center; padding: 56px 0 72px; }
.hero h1 { margin: 0; font-size: clamp(56px, 8.4vw, 112px); line-height: .95; font-weight: 900; letter-spacing: -.045em; }
.accent-text { color: var(--accent); transition: color .3s; }
body[data-product="premium"] .accent-text { background: linear-gradient(90deg, #efe8ff, #a995ff 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { margin: 0; color: var(--muted); font-size: 18px; }
@media (max-width: 900px) {
  .shop { grid-template-columns: minmax(0, 1fr); gap: 28px; padding: 32px 0 48px; }
  .card { width: 100%; max-width: 480px; margin-inline: auto; }
  .hero { max-width: 480px; margin-inline: auto; width: 100%; }
}

/* карточка */
.card { position: relative; min-width: 0; background: linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%), var(--card);
  border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 22px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45); transition: border-color .3s; }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 16px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.card-top:has(.last[hidden]) { justify-content: flex-end; }
.tiny { display: block; font-size: 11px; color: var(--dim); margin-bottom: 4px; }
.last-row { display: flex; align-items: center; gap: 6px; }
.ref { font: 600 13px/1 ui-monospace, "SFMono-Regular", Consolas, monospace; color: var(--accent); letter-spacing: .02em; }
.copy { border: 0; background: none; padding: 2px; color: var(--dim); cursor: pointer; display: grid; }
.copy .ic { width: 15px; height: 15px; } .copy:hover { color: var(--text); } .copy.done { color: var(--green); }
.support-link { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); }
.support-link .ic { width: 14px; height: 14px; } .support-link:hover { color: var(--text); }
.card-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card-title h2 { margin: 0; font-size: 28px; font-weight: 900; letter-spacing: -.03em; }
.badge { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }

.switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--chip); margin-bottom: 20px; }
.switch button { display: flex; align-items: center; justify-content: center; gap: 8px; height: 44px; border: 0; border-radius: 11px; background: none; color: var(--muted); font-weight: 600; cursor: pointer; transition: background .2s, color .2s; }
.switch button:hover { color: var(--text); }
.switch button[aria-selected="true"] { background: var(--accent); color: var(--accent-ink); }

.field { margin-bottom: 18px; }
.label { display: block; font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.input-box { position: relative; display: flex; align-items: center; gap: 10px; height: 54px; padding: 0 16px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); transition: border-color .15s; }
.input-box:focus-within { border-color: var(--accent); }
.input-box .prefix { color: var(--dim); font-size: 18px; }
.input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: none; font-size: 17px; }
.input::placeholder { color: var(--dim); }
.input.big { font-size: 22px; font-weight: 800; }
.input::-webkit-outer-spin-button, .input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.accent-ic { color: var(--accent); width: 22px; height: 22px; }
.suffix { font-size: 13px; color: var(--dim); }
.ok-mark { color: var(--green); display: none; }
.input-box.ok .ok-mark { display: block; }
.input-box.err { border-color: rgba(255, 107, 94, .6); }
.hint { margin: 7px 2px 0; font-size: 12.5px; color: var(--dim); min-height: 18px; }
.hint.ok { color: var(--green); } .hint.err { color: var(--red); }

.chips { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; margin-top: 8px; }
.chips button { height: 38px; border: 0; border-radius: 10px; background: var(--chip); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s; }
.chips button:hover { background: #26252b; }
.chips button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
@media (max-width: 380px) { .chips { grid-template-columns: repeat(3, 1fr); } }

.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 10px; }
.plan { position: relative; display: block; cursor: pointer; }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan .box { display: block; text-align: center; padding: 16px 6px 14px; border-radius: 14px; background: var(--chip); border: 1px solid var(--line); transition: background .2s, border-color .2s; }
.plan b { display: block; font-size: 17px; font-weight: 800; }
.plan .p { display: block; font-size: 13px; color: var(--muted); margin-top: 4px; }
.plan input:checked + .box { background: linear-gradient(160deg, #d8ccff, #a993ff); border-color: transparent; color: var(--accent-ink); }
.plan input:checked + .box .p { color: rgba(27, 18, 56, .75); }
.plan input:focus-visible + .box { outline: 2px solid var(--accent); outline-offset: 2px; }
.plan .tag { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #3b3259; color: #e3dbff; border: 1px solid rgba(185, 166, 255, .35); }

/* выпадающий список способов оплаты */
.select { position: relative; }
.select-btn { width: 100%; height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 14px 0 10px; border-radius: 14px; background: var(--field); border: 1px solid var(--line); cursor: pointer; text-align: left; }
.select-btn:hover, .select-btn[aria-expanded="true"] { border-color: var(--line-2); }
.m-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--chip); color: var(--accent); flex: none; }
.m-ic .ic { width: 20px; height: 20px; }
.m-name { flex: 1; font-weight: 600; }
.m-name small { display: block; font-weight: 400; color: var(--dim); font-size: 12px; }
.chev { color: var(--accent); transition: transform .2s; }
.select-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.select-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; border-radius: 14px; background: #1a191e; border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); max-height: 280px; overflow: auto; outline: none; }
.select-list li { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; cursor: pointer; }
.select-list li[aria-selected="true"] { background: var(--accent-soft); }
.select-list li.active, .select-list li:hover { background: rgba(255, 255, 255, .06); }
.select-list li .tick { margin-left: auto; color: var(--accent); visibility: hidden; }
.select-list li[aria-selected="true"] .tick { visibility: visible; }

.total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; margin: 4px 0 14px; border-top: 1px solid var(--line); }
.total span { color: var(--muted); font-size: 14px; }
.total b { font-size: 32px; font-weight: 900; letter-spacing: -.03em; }
.buy { width: 100%; height: 58px; border: 0; border-radius: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: 17px; font-weight: 800; background: var(--accent); color: var(--accent-ink); transition: filter .15s, opacity .15s, background .3s; }
.buy:hover { filter: brightness(1.05); }
.buy[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.buy .mini { width: 26px; height: 26px; border-radius: 8px; object-fit: cover; animation: bob 1s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-2px); } }
.error { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(255, 107, 94, .1); color: #ffb0a8; font-size: 14px; }
.terms { margin: 12px 0 0; text-align: center; font-size: 12px; color: var(--dim); } .terms a { text-decoration: underline; }
.captcha:not(:empty) { margin-top: 12px; display: flex; justify-content: center; }

/* история покупок */
.sheet { width: min(520px, 100% - 24px); max-height: min(80vh, 680px); padding: 0; border: 1px solid var(--line-2); border-radius: 22px; background: #141317; color: var(--text); }
.sheet::backdrop { background: rgba(0, 0, 0, .6); backdrop-filter: blur(3px); }
.sheet-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 18px 0 20px; }
.sheet-head h2 { margin: 0; font-size: 22px; font-weight: 900; letter-spacing: -.02em; }
.sheet-note { margin: 4px 20px 12px; font-size: 13px; color: var(--dim); }
.history-list { padding: 0 12px 14px; overflow: auto; max-height: calc(min(80vh, 680px) - 90px); }
.empty { color: var(--muted); text-align: center; padding: 24px 0; margin: 0; }
.h-item { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 12px 8px; border-radius: 14px; }
.h-item:hover { background: rgba(255, 255, 255, .04); }
.h-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(255, 211, 51, .12); color: #ffd333; }
.h-ic.prem { background: rgba(185, 166, 255, .13); color: #b9a6ff; }
.h-main b { display: block; font-size: 15px; } .h-main small { color: var(--dim); font-size: 12px; }
.h-side { text-align: right; } .h-side b { display: block; font-size: 15px; }
.st { display: inline-block; margin-top: 2px; font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--chip); color: var(--muted); }
.st.wait { color: #ffd333; } .st.ok { color: var(--green); } .st.bad { color: var(--red); }

/* страница заказа */
.order { max-width: 440px; margin: 40px auto 64px; text-align: center; }
.mascot { width: 88px; height: 88px; border-radius: 24px; object-fit: cover; display: block; margin: 6px auto 16px; background: #241a33;
  box-shadow: 0 0 0 1px var(--accent-line), 0 14px 40px -10px var(--accent-soft), 0 0 60px -20px var(--accent); animation: float 3.2s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-4px); } }
.order h1 { font-size: 26px; font-weight: 900; letter-spacing: -.02em; margin: 6px 0; }
.order .sub { color: var(--muted); margin: 0 0 18px; }
.facts { text-align: left; margin: 18px 0 0; padding: 4px 0 0; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 15px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; text-align: right; word-break: break-all; }
.order .buy { text-decoration: none; }
.timer { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.order .link { display: inline-block; margin-top: 14px; color: var(--muted); font-size: 14px; text-decoration: underline; }

/* подвал */
.foot { position: relative; z-index: 1; padding: 22px 0 28px; font-size: 13px; color: var(--dim); border-top: 1px solid rgba(255, 255, 255, .06); }
.foot .wrap { display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
.foot nav { display: flex; gap: 18px; flex-wrap: wrap; }
.foot a:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* получатель: аватар на месте «@», имя правее username */
.u-wrap { position: relative; flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; }
.u-wrap .input { width: 100%; }
.u-measure { position: absolute; left: 0; top: 0; visibility: hidden; white-space: pre; font-size: 17px; pointer-events: none; }
.u-name { position: absolute; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.ava { width: 30px; height: 30px; border-radius: 50%; flex: none; overflow: hidden; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 14px; margin-left: -4px; }
.ava img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* недавние получатели */
.recip { position: relative; }
.recips { position: absolute; z-index: 25; left: 0; right: 0; top: 88px; margin: 0; padding: 6px; list-style: none; border-radius: 14px;
  background: #1a191e; border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }
.recips .r-head { padding: 4px 8px 6px; font-size: 12px; color: var(--dim); }
.recips li.r-item { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 10px; cursor: pointer; }
.recips li.r-item.active, .recips li.r-item:hover { background: rgba(255, 255, 255, .06); }
.r-item .ava { margin-left: 0; width: 34px; height: 34px; }
.r-text { flex: 1; min-width: 0; }
.r-text b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-text small { display: block; color: var(--dim); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-del { border: 0; background: none; color: var(--dim); width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; flex: none; }
.r-del:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.r-del .ic { width: 14px; height: 14px; }
