:root {
  --ink: #f7fbff;
  --muted: #a7b7c8;
  --panel: #09172a;
  --panel-soft: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.11);
  --cyan: #25d9e8;
  --green: #2ee6a6;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: #06111f; scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: radial-gradient(circle at 48% -10%, rgba(43, 140, 255, 0.2), transparent 36rem), linear-gradient(145deg, #071422 0%, #06101c 50%, #040b14 100%);
  font-family: "Aptos", "Segoe UI Variable", ui-sans-serif, system-ui, sans-serif;
}

::selection { color: #06111f; background: #8ff4fc; }
* { scrollbar-color: #2a526d #06111f; scrollbar-width: thin; }
*::-webkit-scrollbar { width: 11px; height: 11px; }
*::-webkit-scrollbar-track { background: #06111f; }
*::-webkit-scrollbar-thumb { border: 3px solid #06111f; border-radius: 999px; background: #2a526d; }

button, a, summary { -webkit-tap-highlight-color: transparent; }

.skip-link {
  position: fixed;
  z-index: 20;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  color: #06111f;
  background: #8ff4fc;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}
.skip-link:focus { transform: translateY(0); }

.page-shell { min-height: 100vh; padding: 54px 24px 30px; }

.payment-card {
  width: min(100%, 980px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42);
}

.card-header { display: flex; align-items: center; gap: 18px; padding: 34px 40px 28px; border-bottom: 1px solid var(--line); }
.network-mark { position: relative; flex: 0 0 70px; width: 70px; height: 70px; }
.usdt-mark, .ton-mark { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 3px solid #06111f; border-radius: 50%; color: #fff; font-weight: 800; }
.usdt-mark { top: 0; left: 0; background: #26a17b; font-size: 29px; }
.ton-mark { right: 0; bottom: 0; background: #158bd2; font-size: 10px; }

h1 { max-width: 18ch; margin: 0; font-size: clamp(30px, 4vw, 44px); line-height: 1; letter-spacing: -0.035em; text-wrap: balance; }
.subtitle { margin: 8px 0 0; color: #c5d1dc; font-size: 16px; }

.goal-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(190px, 0.65fr); align-items: end; gap: 30px; padding: 24px 40px; border-bottom: 1px solid var(--line); background: rgba(43, 140, 255, 0.055); }
.goal-panel h2, .share-section h2, .safety-note h2 { margin: 0 0 6px; font-size: 17px; letter-spacing: -0.015em; }
.goal-panel p, .share-section p, .safety-note p { max-width: 65ch; margin: 0; color: #aebfce; font-size: 14px; line-height: 1.6; }
.balance-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; color: #8197aa; font-size: 12px; }
.text-button { padding: 0; border: 0; color: #80eaf4; background: transparent; font: inherit; font-weight: 750; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.text-button:hover { color: #c1f9ff; }
.progress-wrap { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 12px; }
.progress-wrap progress { width: 100%; height: 9px; border: 0; border-radius: 999px; overflow: hidden; background: #172c40; }
.progress-wrap progress::-webkit-progress-bar { border-radius: 999px; background: #172c40; }
.progress-wrap progress::-webkit-progress-value { border-radius: 999px; background: var(--green); }
.progress-wrap progress::-moz-progress-bar { border-radius: 999px; background: var(--green); }
.progress-wrap span { min-width: 38px; color: #c7f9e9; font-size: 12px; font-variant-numeric: tabular-nums; text-align: right; }

.payment-grid { display: grid; grid-template-columns: minmax(270px, 0.85fr) minmax(360px, 1.15fr); gap: 38px; padding: 42px 40px; }
.qr-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 25px; border-radius: 16px; background: var(--panel-soft); }
.qr-frame { width: min(100%, 285px); padding: 13px; border-radius: 16px; background: #fff; box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28); }
.qr-frame img { display: block; width: 100%; height: auto; border-radius: 8px; }
.qr-caption, .field-label { margin: 0; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: 0.07em; }
.qr-caption { margin-top: 18px; text-align: center; }
.details-panel { min-width: 0; }
.asset-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.asset-row strong { display: block; margin-top: 5px; font-size: 22px; }
.asset-pill { padding: 8px 12px; border: 1px solid rgba(37, 217, 232, 0.35); border-radius: 999px; color: #8ff4fc; background: rgba(37, 217, 232, 0.09); font-size: 12px; font-weight: 700; }
.address-block { padding: 22px 0 24px; }
code { display: block; margin: 9px 0 13px; color: #dffaff; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }

.copy-button, .share-button, .wallet-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 16px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 12px; color: #edf8ff; background: rgba(255, 255, 255, 0.065); font: inherit; font-size: 13px; font-weight: 700; text-decoration: none; cursor: pointer; transition: transform 160ms ease, background 160ms ease, border-color 160ms ease; }
.copy-button:hover, .share-button:hover, .wallet-button:hover { transform: translateY(-1px); border-color: rgba(37, 217, 232, 0.55); background: rgba(37, 217, 232, 0.12); }
.copy-button:disabled, .share-button:disabled { transform: none; opacity: 0.68; cursor: wait; }
.copy-button:focus-visible, .share-button:focus-visible, .wallet-button:focus-visible, .work-link:focus-visible, .viewer-link:focus-visible, .guide-links a:focus-visible, .source-link:focus-visible, .text-button:focus-visible, summary:focus-visible { outline: 3px solid rgba(37, 217, 232, 0.62); outline-offset: 3px; }

.wallet-action { display: grid; gap: 9px; margin: 0 0 25px; }
.wallet-button { width: 100%; border-color: rgba(37, 217, 232, 0.45); color: #06111f; background: var(--cyan); font-size: 14px; }
.wallet-button:hover { color: #06111f; background: #8ff4fc; }
.wallet-action p { margin: 0; color: #91a6b8; font-size: 12px; line-height: 1.55; }

.steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 28px 1fr; align-items: start; gap: 11px; }
.steps li > span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #bdddff; background: rgba(43, 140, 255, 0.15); font-size: 12px; font-weight: 800; }
.steps p { margin: 3px 0 0; color: #bac8d5; font-size: 15px; line-height: 1.55; }
.steps strong { color: #f6fbff; }
.viewer-link { display: inline-flex; margin-top: 25px; color: #80eaf4; font-size: 13px; font-weight: 700; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.viewer-link:hover { color: #c1f9ff; }

.share-section { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; margin: 0 40px 26px; padding: 22px 0 26px; border-bottom: 1px solid var(--line); }
.share-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.share-button-primary { border-color: rgba(37, 217, 232, 0.42); color: #06111f; background: var(--cyan); }
.share-button-primary:hover { color: #06111f; background: #8ff4fc; }

.work-section { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; margin: 0 40px 26px; padding: 24px; border: 1px solid rgba(43, 140, 255, 0.25); border-radius: 16px; background: rgba(43, 140, 255, 0.07); }
.work-section h2 { margin: 0 0 7px; font-size: 17px; letter-spacing: -0.015em; }
.work-section p { max-width: 65ch; margin: 0; color: #aebfce; font-size: 14px; line-height: 1.6; }
.work-tags { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 14px 0 0; padding: 0; color: #c8d8e8; font-size: 12px; font-weight: 700; list-style-position: inside; }
.work-link { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 11px 16px; border: 1px solid rgba(37, 217, 232, 0.42); border-radius: 12px; color: #06111f; background: var(--cyan); font-size: 13px; font-weight: 700; line-height: 1.2; text-decoration: none; transition: transform 160ms ease, background 160ms ease; }
.work-link:hover { transform: translateY(-1px); background: #8ff4fc; }
.work-actions { display: grid; gap: 9px; min-width: 225px; }
.work-link-secondary { color: #dffaff; background: rgba(255, 255, 255, 0.065); }
.work-link-secondary:hover { color: #dffaff; background: rgba(37, 217, 232, 0.12); }

.safety-note { margin: 0 40px 40px; padding: 21px 23px; border-radius: 16px; background: rgba(46, 230, 166, 0.055); }
.safety-note details { margin-top: 13px; }
.safety-note summary { width: fit-content; color: #d7f7eb; font-size: 13px; font-weight: 700; cursor: pointer; }
.safety-note details p { margin-top: 10px; }
.master-address { margin-bottom: 10px; }
.guide-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 13px; }
.guide-links a { color: #80eaf4; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.guide-links a:hover { color: #c1f9ff; }
.source-link { display: inline-flex; margin-top: 12px; color: #80eaf4; font-size: 12px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }
.source-link:hover { color: #c1f9ff; }

footer { display: flex; align-items: center; justify-content: center; gap: 9px; margin: 22px auto 0; color: #7f94a7; font-size: 12px; text-align: center; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 4px 14px rgba(46, 230, 166, 0.52); }
noscript { display: block; margin: 12px auto 0; color: #a7b7c8; font-size: 12px; text-align: center; }

@media (max-width: 760px) {
  .page-shell { padding: 20px 14px 28px; }
  .payment-card { border-radius: 18px; }
  .card-header { padding: 26px 22px 23px; }
  .network-mark { flex-basis: 62px; width: 62px; height: 62px; }
  .usdt-mark, .ton-mark { width: 43px; height: 43px; }
  .goal-panel, .payment-grid, .share-section, .work-section { grid-template-columns: 1fr; }
  .goal-panel { padding: 22px; }
  .payment-grid { gap: 24px; padding: 26px 22px; }
  .qr-panel { padding: 20px; }
  .qr-frame { width: min(100%, 260px); }
  .share-section { align-items: start; margin: 0 22px 24px; }
  .work-section { align-items: start; margin: 0 22px 24px; }
  .share-actions { justify-content: flex-start; }
  .safety-note { margin: 0 22px 24px; }
}

@media (max-width: 460px) {
  .asset-row { align-items: flex-start; flex-direction: column; }
  .share-actions, .share-button, .work-actions, .work-link { width: 100%; }
  .guide-links { display: grid; gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
