:root {
  --body-bg: #fff;
  --text-color: #000;
  --muted: #7d7f81;
  --accent: #0088cc;
  --accent-bright: #179cde;
  --accent-btn: #2481cc;
  --border: #e8e8e8;
  --surface: #fff;
  --surface-soft: #ecf3fa;
  --input-bg: #fff;
  --input-border: #dfe6ed;
  --tab-track: #ecf3fa;
  --tab-active: #fff;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --body-bg: #17212b;
  --text-color: #e9edf1;
  --muted: #828d99;
  --accent: #5eb0f3;
  --accent-bright: #5eb0f3;
  --accent-btn: #3390ec;
  --border: rgba(255,255,255,.08);
  --surface: #232e3c;
  --surface-soft: #1a2330;
  --input-bg: #1a2330;
  --input-border: rgba(255,255,255,.18);
  --tab-track: #151e29;
  --tab-active: #2b3848;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html {
  background: var(--body-bg);
  overflow-x: clip;
  overscroll-behavior-x: none;
  max-width: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--body-bg);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  overscroll-behavior-x: none;
  max-width: 100%;
  position: relative;
}
img, svg {
  max-width: 100%;
  height: auto;
  display: block;
}
/* Google reCAPTCHA badge часто вылезает за край экрана на iPhone */
.grecaptcha-badge {
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0 0;
  min-width: 0;
}
.support-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent);
  font-size: 13px; font-weight: 600;
  text-decoration: none !important;
  min-width: 0;
  max-width: calc(100% - 52px);
  overflow: hidden;
}
.support-btn:hover { background: var(--surface-soft); }
.support-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.theme-toggle {
  width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: 0; cursor: pointer; opacity: .7;
  padding: 0; margin-left: auto;
}
.theme-toggle:hover { opacity: 1; }
.theme-toggle img {
  width: 22px; height: 22px; display: block;
  pointer-events: none;
}
.tl_page_wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  min-width: 0;
  padding-top: var(--safe-t);
  padding-bottom: var(--safe-b);
}
.container {
  width: 100%;
  max-width: 970px;
  margin: 0 auto;
  padding-left: max(15px, var(--safe-l));
  padding-right: max(15px, var(--safe-r));
  min-width: 0;
}
@media (min-width: 1200px) { .container { max-width: 1170px; } }
main.container,
.buy_section,
.faq_section,
.footer_wrap,
.tl_main_head {
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
}
.tl_main_head {
  padding: 24px 0 10px;
  text-align: center;
}
.tl_main_logo {
  width: 120px; height: 120px; margin: 0 auto 8px; display: block;
}
.tl_main_logo_title {
  font-size: 34px; font-weight: 700; letter-spacing: -.5px;
  color: var(--text-color); margin: 12px 0 8px;
}
.tl_main_logo_lead {
  font-size: 17px; line-height: 1.45; color: var(--muted);
  max-width: 460px; margin: 0 auto 22px;
  overflow-wrap: anywhere;
}
.buy_section {
  max-width: 520px; width: 100%; margin: 28px auto 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 20px 24px;
}
.buy_tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  background: var(--tab-track); border-radius: 12px; padding: 5px; margin-bottom: 22px;
}
.buy_tab {
  border: 0; background: transparent; border-radius: 9px;
  padding: 10px 12px; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.buy_tab.active {
  background: var(--tab-active);
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
html[data-theme="dark"] .buy_tab.active {
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.step { margin-bottom: 20px; }
.step-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--text-color);
}
.step-label a { font-weight: 500; font-size: 13px; }
.input-wrap { position: relative; }
.input-prefix {
  position: absolute; left: 14px; top: 0; bottom: 0;
  display: flex; align-items: center;
  color: var(--muted); font-weight: 600; font-size: 16px; pointer-events: none;
}
.input-field {
  width: 100%; height: 48px; border-radius: 12px;
  border: 1px solid var(--input-border); background: var(--input-bg);
  color: var(--text-color); font-size: 16px; padding: 0 14px;
  outline: none;
}
.input-field.has-prefix { padding-left: 30px; }
.input-field:focus { border-color: var(--accent-btn); }
.input-hint { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.presets {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px;
}
.preset-btn, .premium-preset-btn {
  border: 1px solid var(--input-border); background: var(--input-bg);
  color: var(--text-color); border-radius: 10px; padding: 10px 6px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
.preset-btn.active, .premium-preset-btn.active {
  border-color: var(--accent-btn); color: var(--accent); background: rgba(36,129,204,.1);
}
.premium-presets { display: grid; gap: 8px; margin-top: 4px; }
.premium-preset-btn {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; text-align: left;
}
.premium-preset-period { font-size: 14px; }
.premium-preset-price { color: var(--accent); font-size: 15px; }
.hidden { display: none !important; }
.recipient-preview {
  display: none; align-items: center; gap: 12px; margin-top: 10px;
  padding: 10px 12px; border-radius: 12px; background: var(--surface-soft);
  border: 1px solid var(--border);
}
.recipient-preview.show { display: flex; }
.recipient-preview.loading { opacity: .75; }
.recipient-preview.error { border-color: rgba(231,76,60,.35); }
.recipient-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: #d7eaf6;
  border: 1px solid rgba(0,136,204,.2);
}
html[data-theme="dark"] .recipient-avatar {
  background: #243447;
  border-color: rgba(94,176,243,.25);
}
.recipient-avatar[hidden],
.recipient-avatar.placeholder[hidden] {
  display: none !important;
}
.recipient-avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #2481cc;
  line-height: 1;
  user-select: none;
}
html[data-theme="dark"] .recipient-avatar.placeholder {
  color: #5eb0f3;
}
.recipient-info {
  min-width: 0;
  flex: 1;
}
.recipient-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recipient-username, .recipient-status { font-size: 12px; color: var(--muted); }
.recipient-status.error-text { color: #e74c3c; }
.summary-card {
  background: var(--surface-soft); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px;
}
.summary-row {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 14px; padding: 6px 0; color: var(--muted);
}
.summary-value { color: var(--text-color); font-weight: 600; }
.summary-total-row {
  border-top: 1px solid var(--border); margin-top: 6px; padding-top: 12px;
  color: var(--text-color); font-weight: 600;
}
.summary-total-value { color: var(--accent); font-size: 18px; }
.error-message {
  display: none; color: #c0392b; background: rgba(231,76,60,.08);
  border: 1px solid rgba(231,76,60,.2); border-radius: 10px;
  padding: 10px 12px; font-size: 13px; margin-bottom: 12px;
}
.error-message.show { display: block; }
.payment-buttons { display: grid; gap: 10px; }
.pay-button {
  width: 100%;
  min-height: 64px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  text-align: left;
}
.pay-button.sbp {
  background: #f4f6f8;
  color: var(--text-color);
  border: 1px solid var(--input-border);
}
.pay-button.sbp:hover {
  background: #eef2f6;
  border-color: #cfd8e3;
}
html[data-theme="dark"] .pay-button.sbp {
  background: #2a3441;
  border-color: rgba(255,255,255,.08);
  color: #fff;
}
html[data-theme="dark"] .pay-button.sbp:hover {
  background: #323e4d;
}
.pay-method-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}
.pay-method-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.pay-method-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: inherit;
}
.pay-method-sub {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.2;
}
.pay-method-chevron {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  color: var(--muted);
  background: rgba(0,0,0,.04);
}
html[data-theme="dark"] .pay-method-chevron {
  background: rgba(255,255,255,.06);
  color: #c2cbd4;
}
.pay-button.crypto {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(0,136,204,.35);
  justify-content: center;
  min-height: 48px;
  font-weight: 600;
}
.pay-button:disabled { opacity: .55; cursor: not-allowed; }
.pay-icon-img { height: 18px; width: auto; }
.payment-warning, .disclaimer {
  font-size: 12px; color: var(--muted); line-height: 1.5; margin-top: 14px; text-align: center;
  overflow-wrap: anywhere;
}
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(127,127,127,.35);
  border-top-color: var(--text-color); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.tl_main_body_header {
  text-align: center; font-size: 24px; font-weight: 600;
  margin: 20px 0 8px; color: var(--text-color);
}
.faq_section {
  max-width: 720px; margin: 10px auto 50px; padding: 0 10px;
}
.seo_section {
  max-width: 720px; margin: 8px auto 36px; padding: 0 10px;
}
.seo_section p {
  font-size: 15px; color: var(--muted); line-height: 1.6; margin: 0 0 12px;
}
.seo_steps {
  list-style: none; padding: 0; margin: 8px 0 0;
  display: grid; gap: 10px;
}
.seo_steps li {
  font-size: 14px; color: var(--muted); line-height: 1.5;
  padding: 12px 14px;
  background: var(--surface-soft);
  border-radius: 12px;
}
.seo_steps strong { color: var(--text-color); font-weight: 600; }
.faq_item {
  border-bottom: 1px solid var(--border); padding: 16px 0;
}
.faq_item h3 { font-size: 16px; margin-bottom: 6px; color: var(--text-color); font-weight: 600; }
.faq_item p { font-size: 14px; color: var(--muted); line-height: 1.55; }
.footer_wrap {
  border-top: 1px solid var(--border);
  padding: 24px 0 calc(24px + var(--safe-b));
  color: var(--muted); font-size: 12px;
  text-align: center;
  overflow-x: clip;
  opacity: .55;
}
.footer_wrap:hover,
.footer_wrap:focus-within {
  opacity: .85;
  transition: opacity .2s ease;
}
.footer_inner { max-width: 560px; margin: 0 auto; min-width: 0; }
.footer_brand {
  font-size: 13px; line-height: 1.5; margin-bottom: 14px; color: var(--muted);
  overflow-wrap: anywhere;
}
.footer_brand b { color: var(--muted); font-weight: 600; }
.footer_links {
  display: flex; flex-wrap: wrap; gap: 10px 14px; justify-content: center;
  margin-bottom: 16px;
}
.footer_links a {
  color: var(--muted); font-size: 13px; font-weight: 500;
  max-width: 100%;
}
.footer_links a:hover { color: var(--accent); }
.footer_legal {
  font-size: 11px; line-height: 1.5; color: var(--muted);
  overflow-wrap: anywhere;
  word-break: break-word;
  opacity: .85;
}
.footer_legal strong {
  display: block; color: var(--muted); font-size: 12px; font-weight: 600; margin-bottom: 4px;
}
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.55); display: none;
  align-items: center; justify-content: center;
  padding: max(20px, var(--safe-t)) max(20px, var(--safe-r)) max(20px, var(--safe-b)) max(20px, var(--safe-l));
}
.modal-overlay.show { display: flex; }
.modal-content {
  background: var(--surface); color: var(--text-color);
  border-radius: 16px; padding: 24px; max-width: 440px; width: 100%;
  position: relative; border: 1px solid var(--border);
}
.modal-close {
  position: absolute; top: 12px; right: 12px; border: 0; background: transparent;
  color: var(--muted); font-size: 18px; cursor: pointer; width: 32px; height: 32px;
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 12px; padding-right: 28px; }
.modal-image { width: 100%; border-radius: 10px; margin: 8px 0 12px; }
.modal-text, .captcha-hint { font-size: 14px; color: var(--muted); line-height: 1.5; }
.captcha-container { display: flex; justify-content: center; margin: 16px 0; min-height: 78px; }
/* keep unused original class hooks harmless */
.product-tabs { display: none; }
@media (max-width: 600px) {
  .tl_main_logo_title { font-size: 24px; line-height: 1.2; }
  .buy_section { margin: 16px 0 28px; padding: 22px 16px; border-radius: 14px; }
  .presets { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .support-btn { font-size: 12px; padding: 0 10px; height: 34px; }
}
