:root {
  color-scheme: dark;
  --bg:var(--bg-main); --panel:var(--bg-card-light); --input:var(--bg-main); --line:var(--border-color);
  --ink:var(--text-main); --muted:var(--text-muted); --accent:var(--price-text); --action:var(--primary-red);
  --accent-surface:color-mix(in srgb,var(--primary-red) 12%,var(--panel));
  --gold:#f6d16f; --gold-surface:color-mix(in srgb,var(--gold) 9%,var(--panel));
  --green:#9be0ba; --error:#ffc1c8;
}
* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; background:var(--bg); color:var(--ink); font:1rem/1.6 var(--font-family); }
h1,h2,p,fieldset { margin:0; }
h1 { font-size:clamp(1.45rem,3vw,2rem); line-height:1.25; font-weight:800; }
h2,legend { font-size:1.125rem; line-height:1.5; font-weight:800; }
a { color:var(--accent); text-underline-offset:.2em; }
button,input { font:inherit; }
button {
  display:inline-flex; align-items:center; justify-content:center; gap:.5rem; min-height:44px;
  padding:.55rem .9rem; border:1px solid transparent; border-radius:12px;
  background:var(--action); color:var(--text-white); font-weight:800; cursor:pointer;
  transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease,color .2s ease,transform .2s ease;
}
button:hover:not(:disabled) { filter:brightness(1.12); }
#verify:hover:not(:disabled),#checkout:hover:not(:disabled) {
  background:var(--primary-dark-red); filter:none;
}
button:disabled { cursor:not-allowed; }
:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.icon { display:block; width:20px; height:20px; flex:none; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.star { fill:currentColor; stroke:none; }
.svg-definitions { position:absolute; width:0; height:0; overflow:hidden; }
.site-header { display:flex; align-items:center; justify-content:space-between; height:64px; padding-inline:max(18px,calc((100% - 1016px)/2)); border-bottom:1px solid var(--line); background:var(--bg-nav); }
.site-header img { display:block; width:110px; height:38px; object-fit:contain; }
.header-support { display:inline-flex; align-items:center; gap:.4rem; color:var(--muted); font-size:.875rem; text-decoration:none; }
.header-support:hover { color:var(--accent); }
main { max-width:680px; margin:auto; padding:clamp(18px,4vw,36px) clamp(12px,3vw,22px) max(28px,env(safe-area-inset-bottom)); }
.page-heading { display:flex; align-items:center; gap:14px; margin-bottom:20px; }
.back { display:grid; place-items:center; width:44px; height:44px; flex:none; border:1px solid var(--line); border-radius:14px; background:var(--panel); color:var(--ink); }
.back:hover { color:var(--accent); }
.status { color:var(--muted); font-size:.875rem; margin-bottom:10px; }
.status:empty,.field-message:empty,.hint:empty { display:none; }
.secondary { margin-bottom:16px; background:var(--panel); border-color:var(--line); color:var(--ink); }
.service-layout,.service-options,#services { display:grid; gap:14px; align-items:start; min-width:0; }
.panel { min-width:0; padding:clamp(14px,3.3vw,24px); border:1px solid var(--line); border-radius:var(--radius-lg); background:var(--panel); }
.section-heading { display:flex; align-items:center; gap:12px; margin-bottom:16px; }
.section-heading p,.hint { color:var(--muted); font-size:.875rem; }
.section-icon { width:44px; height:44px; display:grid; place-items:center; flex:none; border-radius:13px; }
.identity-symbol { color:var(--accent); background:var(--accent-surface); }
.star-symbol { color:var(--gold); background:var(--gold-surface); }
.premium-symbol { color:var(--accent); background:var(--accent-surface); }
.username-row { display:flex; align-items:stretch; gap:8px; }
.username-wrap { display:flex; direction:ltr; align-items:center; flex:1; min-width:0; padding-inline:12px; gap:6px; background:var(--input); border:1px solid var(--line); border-radius:10px; color:var(--muted); transition:border-color .2s ease; }
.username-wrap:focus-within { border-color:var(--accent); }
.username-wrap>span { transition:color .2s ease,transform .2s ease; }
.username-wrap:focus-within>span,.username-wrap:has(input:not(:placeholder-shown))>span { color:var(--accent); transform:scale(1.08); }
.username-wrap input,#quantity { width:100%; min-width:0; min-height:50px; background:none; border:0; color:var(--ink); caret-color:var(--accent); }
.username-wrap input:focus-visible,#quantity:focus-visible { outline:0; }
input::placeholder { color:var(--muted); opacity:1; }
#verify { min-width:87px; border-radius:9px; }
#verify:disabled { opacity:.74; }
.verify-spinner { display:none; width:14px; height:14px; border:2px solid currentColor; border-left-color:transparent; border-radius:50%; animation:spin .75s linear infinite; }
#verify[aria-busy=true] .verify-spinner { display:block; }
@keyframes spin { to { transform:rotate(360deg); } }
.field-message:not(:empty) { margin-top:10px; padding:9px 12px; border-inline-start:2px solid var(--action); border-radius:9px; background:var(--accent-surface); color:var(--error); font-size:.875rem; overflow-wrap:anywhere; }
.recipient { display:flex; align-items:center; gap:10px; min-height:70px; padding:10px; border:1px solid var(--line); border-radius:15px; background:var(--input); }
.avatar { display:grid; place-items:center; flex:0 0 44px; height:44px; border-radius:50%; background:var(--bg-card); overflow:hidden; color:var(--accent); }
.avatar img { width:100%; height:100%; object-fit:cover; }
.recipient-info { flex:1; min-width:0; overflow-wrap:anywhere; }
.recipient-name-line { display:flex; align-items:center; gap:6px; font-weight:800; line-height:1.4; }
.verified { color:var(--green); width:17px; height:17px; }
#recipient-username { display:block; text-align:right; color:var(--muted); font-size:.875rem; }
.text-button { flex:none; padding-inline:7px; background:transparent; color:var(--accent); font-size:.875rem; }
.tabs {
  --tab-gap:5px;
  position:relative; isolation:isolate; display:grid; grid-template-columns:repeat(2,minmax(0,1fr));
  gap:var(--tab-gap); padding:var(--tab-gap); border:1px solid var(--line); border-radius:15px; background:var(--panel);
}
.tabs::before {
  content:""; position:absolute; z-index:-1; inset:var(--tab-gap) var(--tab-gap) var(--tab-gap) auto;
  width:calc((100% - 3 * var(--tab-gap))/2); border-radius:10px; background:var(--action);
  box-shadow:0 3px 12px #0003; pointer-events:none; transition:transform .34s cubic-bezier(.22,1,.36,1);
}
.tabs:has(#premium-tab[aria-selected=true])::before { transform:translateX(calc(-100% - var(--tab-gap))); }
.tabs button { padding-inline:5px; background:transparent; color:var(--muted); border-radius:10px; }
.tabs button:hover:not([aria-selected=true]) { color:var(--ink); }
.tabs button[aria-selected=true] { color:var(--text-white); }
.quantity-field { display:flex; align-items:center; gap:12px; min-width:0; padding-inline:13px; border:1px solid var(--line); border-radius:13px; background:var(--input); color:var(--gold); }
.quantity-field:focus-within { border-color:var(--accent); }
#quantity { text-align:right; font-weight:750; padding:0; }
.quick-quantities { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0; }
.quick-quantities button { min-width:60px; padding:3px 10px; border-radius:999px; border-color:var(--line); background:var(--input); color:var(--ink); font-size:.875rem; }
.quick-quantities .icon { width:15px; height:15px; color:var(--gold); }
.quick-quantities button:active:not(:disabled) { transform:scale(.96); }
.quick-quantities button[aria-pressed=true] { border-color:var(--action); background:var(--accent-surface); }
.quote-line { margin-top:14px; padding:9px 12px; border-radius:12px; background:var(--bg-card); color:var(--muted); }
.quote-line .icon { color:var(--accent); }
.quote-line,.quote-line>span { display:flex; align-items:center; gap:8px; }
.quote-line { justify-content:space-between; flex-wrap:wrap; font-size:.875rem; }
.quote-line strong { color:var(--ink); }
.plans { display:grid; gap:10px; }
.plan { justify-content:initial; gap:10px; min-width:0; width:100%; min-height:76px; padding:12px; border:1px solid var(--line); background:var(--input); color:var(--ink); text-align:start; border-radius:14px; }
.plan:hover { border-color:color-mix(in srgb,var(--action) 40%,var(--line)); }
.plan[aria-checked=true] { border-color:var(--action); background:var(--accent-surface); box-shadow:0 4px 14px #0002; }
.plan-info { display:flex; align-items:center; flex:1; min-width:0; gap:9px; }
.plan-icon { display:grid; place-items:center; width:42px; height:42px; flex:none; border-radius:12px; color:var(--accent); background:var(--bg-card); }
.plan-title,.plan small { display:block; }
.plan small { color:var(--muted); font-size:.8125rem; font-weight:600; }
.plan-price { text-align:end; font-variant-numeric:tabular-nums; }
.plan-price strong { display:block; color:var(--accent); font-weight:800; }
.plan::after { content:""; width:15px; height:15px; flex:none; box-sizing:border-box; border:1px solid var(--muted); border-radius:50%; transition:border-color .18s ease,border-width .18s ease; }
.plan[aria-checked=true]::after { border:4px solid var(--action); }
#payment-wallets { min-width:0; padding:0; border:0; }
#payment-title { padding:0; margin-bottom:10px; }
.wallet-option {
  display:grid; grid-template-columns:16px 32px minmax(0,1fr) auto; align-items:center; gap:8px;
  min-width:0; min-height:62px; padding:9px; margin-bottom:8px; border:1px solid var(--line);
  background:var(--input); border-radius:13px; cursor:pointer;
  transition:background-color .2s ease,border-color .2s ease,box-shadow .2s ease;
}
.wallet-option:not(:has(:disabled)):hover { border-color:color-mix(in srgb,var(--action) 40%,var(--line)); }
.wallet-option:has(:checked) { border-color:var(--action); background:var(--accent-surface); box-shadow:0 3px 12px #0002; }
.wallet-option:has(:focus-visible) { outline:2px solid var(--accent); outline-offset:2px; }
.wallet-option:has(:disabled) { cursor:not-allowed; }
.wallet-option[data-paused=true] { opacity:.65; }
.wallet-option input { margin:0; width:16px; height:16px; accent-color:var(--action); }
.wallet-option img { width:32px; height:32px; border-radius:50%; object-fit:contain; background:#ffffff; }
.wallet-name,.wallet-balance { min-width:0; }
.wallet-name strong { display:block; font-size:.875rem; }
.wallet-name small,.wallet-balance small { display:block; color:var(--muted); font-size:.75rem; }
.wallet-balance { text-align:end; font-size:.875rem; font-weight:800; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.wallet-option:has(:checked) .wallet-balance { color:var(--accent); }
.checkout-total { display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; margin-top:13px; padding:12px 0; border-top:1px solid var(--line); color:var(--muted); font-size:.875rem; }
.checkout-total strong { color:var(--ink); font-size:1.125rem; }
#checkout { width:100%; min-height:50px; }
#checkout:disabled { background:var(--bg-card); color:var(--muted); }
#checkout-hint { margin-top:9px; }
.toast { position:fixed; z-index:50; top:max(12px,env(safe-area-inset-top)); left:50%; transform:translateX(-50%); display:flex; align-items:center; gap:10px; width:min(360px,calc(100% - 24px)); padding:10px 14px; border:1px solid var(--line); border-radius:14px; background:var(--panel); box-shadow:var(--shadow-md); color:var(--green); font-size:.875rem; overflow-wrap:anywhere; }
@media (min-width:850px) {
  main:has(#payment:not([hidden])) { max-width:1060px; }
  .service-layout:has(#payment:not([hidden])) { grid-template-columns:minmax(0,1.35fr) minmax(320px,1fr); gap:20px; }
  .service-options,#services { gap:16px; }
  .payment-panel { position:sticky; top:18px; }
}
@media (max-width:365px) {
  .wallet-option { grid-template-columns:15px 25px minmax(0,1fr) auto; gap:6px; padding-inline:7px; }
  .wallet-option img { width:25px; height:25px; }
  .plan { gap:7px; padding-inline:9px; }
  .plan-icon { width:34px; height:34px; }
}

/* The introduction and guide belong to the recipient verification screen. */
main:has(#verify-form:not([hidden])) { max-width:880px; }
main:has(#verify-form[hidden]) .verification-only { display:none; }
main:has(#verify-form:not([hidden])) .page-heading {
  display:grid; grid-template-columns:44px minmax(0,1fr) 44px; text-align:center;
}
.entry-subtitle,.telegram-intro p,.entry-support { color:var(--muted); font-size:.875rem; }
.entry-subtitle { margin-top:4px; }
.telegram-intro {
  display:flex; justify-content:space-between; align-items:center; gap:14px;
  min-height:200px; margin-bottom:16px; padding:clamp(16px,4vw,32px);
  background:radial-gradient(ellipse at 8% 100%,var(--accent-surface),transparent 58%),var(--panel);
}
main:has(#verify-form:not([hidden])) :is(.telegram-intro,.identity-section,.telegram-guide) {
  animation:tg-entry-in .42s cubic-bezier(.22,1,.36,1) both;
}
main:has(#verify-form:not([hidden])) .identity-section { animation-delay:.055s; }
main:has(#verify-form:not([hidden])) .telegram-guide { animation-delay:.11s; }
@keyframes tg-entry-in { from { opacity:0; transform:translateY(9px); } to { opacity:1; transform:translateY(0); } }
.telegram-intro h2 { margin:.22em 0 .12em; font-size:clamp(1.6rem,4vw,2.25rem); }
.intro-gift { display:inline-flex; align-items:center; gap:6px; color:var(--accent); font-size:.8125rem; }
.intro-gift .icon { width:14px; height:14px; }
.intro-services { display:flex; flex-wrap:wrap; gap:6px 10px; list-style:none; padding:0; margin:12px 0 0; }
.intro-services li { border:1px solid var(--line); border-radius:7px; padding:2px 8px; color:var(--muted); font-size:.75rem; }
.intro-art { position:relative; flex:0 0 clamp(80px,21vw,175px); aspect-ratio:1; }
.intro-star { position:absolute; width:82%; height:82%; inset:2% 2% auto auto; filter:drop-shadow(0 7px 10px #0006); animation:tg-intro-float 5s ease-in-out infinite; }
.intro-star-small { width:35%; height:35%; inset:auto auto 0 0; animation-delay:-2s; }
.intro-spark { position:absolute; inset:3% 0 auto auto; color:#fff1bd; line-height:1; animation:tg-intro-twinkle 3s ease-in-out infinite; }
.intro-spark-small { inset:12% auto auto 5%; font-size:.7rem; animation-delay:-1.4s; }
@keyframes tg-intro-float { 0%,100% { transform:translateY(0) rotate(-7deg); } 50% { transform:translateY(-6px) rotate(3deg); } }
@keyframes tg-intro-twinkle { 0%,100% { opacity:.4; transform:scale(.75); } 50% { opacity:1; transform:scale(1); } }
#username-help { margin-top:9px; }
.verify-shield { width:18px; height:18px; }
#verify[aria-busy=true] .verify-shield { display:none; }
.telegram-guide { margin-top:16px; background:transparent; }
.telegram-guide h2 { display:flex; align-items:center; gap:8px; }
.telegram-guide h2 .icon { color:var(--accent); }
.telegram-guide ol {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px;
  list-style:none; padding:0; margin:15px 0 0;
}
.telegram-guide li { display:flex; align-items:flex-start; gap:8px; }
.telegram-guide li>span {
  display:grid; place-items:center; flex:0 0 30px; height:30px;
  border:1px solid var(--line); border-radius:9px; background:var(--accent-surface); color:var(--accent);
}
.telegram-guide li strong { font-size:.875rem; }
.telegram-guide li p { color:var(--muted); font-size:.8125rem; }
.entry-support { margin-top:15px; text-align:center; }
@media (min-width:601px) {
  .username-row { gap:6px; padding:4px; border:1px solid var(--line); border-radius:12px; background:var(--input); transition:border-color .2s ease; }
  .username-row:has(.username-wrap:focus-within) { border-color:var(--accent); }
  .username-wrap { border:0; background:none; }
  #verify { min-width:136px; }
}
@media (max-width:600px) {
  .telegram-intro { min-height:158px; }
  .telegram-guide ol { grid-template-columns:1fr; gap:11px; }
}
