:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #202333;
  background: #f6f5fa;
  --surface: #fff;
  --text: #202333;
  --muted: #656679;
  --border: #e5e4ed;
  --accent: #6657db;
  --soft: #eeebff;
  --safe-top: calc(
    max(env(safe-area-inset-top, 0px), var(--tg-safe-area-inset-top, 0px)) +
      var(--tg-content-safe-area-inset-top, 0px)
  );
  --safe-right: calc(
    max(env(safe-area-inset-right, 0px), var(--tg-safe-area-inset-right, 0px)) +
      var(--tg-content-safe-area-inset-right, 0px)
  );
  --safe-bottom: calc(
    max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px)) +
      var(--tg-content-safe-area-inset-bottom, 0px)
  );
  --safe-left: calc(
    max(env(safe-area-inset-left, 0px), var(--tg-safe-area-inset-left, 0px)) +
      var(--tg-content-safe-area-inset-left, 0px)
  );
  --visible-height: min(var(--tg-viewport-height, 100dvh), 100dvh);
  --layout-height: max(0px, calc(var(--visible-height) - var(--safe-top) - var(--safe-bottom)));
  --layout-space: clamp(6px, calc(var(--layout-height) * 0.045 - 14px), 24px);
  --jar-height: clamp(72px, calc(var(--layout-height) * 0.21 - 11px), 157px);
  color-scheme: light;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 280px;
  height: var(--visible-height);
  overflow: hidden;
  padding: var(--safe-top) var(--safe-right) var(--safe-bottom) var(--safe-left);
  background:
    radial-gradient(ellipse at 50% 0, #eee9ff 0, transparent 55%),
    var(--tg-theme-bg-color, #f6f5fa);
  color: var(--text);
}
.shell {
  max-width: 560px;
  height: 100%;
  margin: auto;
  padding: 0 24px;
  overflow-y: auto;
}
header {
  padding: var(--layout-space) 0;
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#presentation-links {
  display: flex;
  gap: 20px;
  margin-top: 18px;
  font-size: 13px;
}
#presentation-links[hidden] {
  display: none;
}
#presentation-links a {
  color: var(--muted);
}
.brand {
  color: var(--text);
  font-size: 22px;
  font-weight: 760;
  text-decoration: none;
  letter-spacing: -1px;
}
.quiet {
  font: inherit;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 10px 0;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.quiet:disabled {
  opacity: 0.55;
}
h1 {
  font-size: 36px;
  line-height: 1.14;
  letter-spacing: -1.3px;
  margin: 18px 0;
  white-space: pre-line;
  overflow-wrap: anywhere;
}
h2 {
  font-size: 21px;
  letter-spacing: -0.5px;
  margin: 26px 0 14px;
}
h3 {
  font-size: 17px;
  margin: 0 0 7px;
  overflow-wrap: anywhere;
}
p {
  font-size: 15px;
  line-height: 1.6;
}
small,
.muted {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.hero {
  text-align: center;
  padding: max(4px, calc(var(--layout-space) - 2px)) 0 8px;
}
.hero h1 {
  font-size: clamp(26px, calc(var(--layout-height) * 0.045), 36px);
  margin: var(--layout-space) 0 clamp(10px, var(--layout-space), 18px);
}
.description {
  max-width: 430px;
  margin: 0 auto calc(var(--layout-space) * 1.25);
  white-space: pre-wrap;
}
.jar {
  height: var(--jar-height);
  width: calc(var(--jar-height) * 0.7643);
  margin: max(14px, calc(var(--layout-space) * 1.375)) auto var(--layout-space);
  border: 3px solid #c5bdf3;
  border-radius: 21% 21% 29% 29%;
  position: relative;
  background:
    linear-gradient(100deg, #ffffffa6, #ffffff26 45%, #bcb0ff66),
    linear-gradient(0deg, #9f8dee 0 var(--jar-fill, 0%), #ded7ff66 var(--jar-fill, 0%));
  box-shadow:
    inset 8px 0 18px #ffffffa6,
    8px 14px 30px #7a64c322;
  transform: rotate(-7deg);
}
.jar:before {
  content: "";
  display: block;
  position: absolute;
  top: calc(var(--jar-height) * -0.0764);
  left: 4px;
  right: 4px;
  height: calc(var(--jar-height) * 0.1146);
  border: 3px solid #ada0e4;
  border-radius: 7px;
  background: #d8cff5;
  box-shadow: 0 3px 4px #8673aa24;
}
.jar:after {
  content: "";
  position: absolute;
  top: 11%;
  left: 9%;
  width: 6%;
  height: 27%;
  background: #fff9;
  border-radius: 5px;
}
.jar-heart {
  display: grid;
  place-items: center;
  height: 100%;
  font-size: calc(var(--jar-height) * 0.4076);
  color: #fff;
  text-shadow: 0 2px 7px #7c69c0;
}
.balance-label {
  font-size: 13px;
  margin: calc(var(--layout-space) * 1.0833) 0 3px;
  color: var(--muted);
}
.donate-hero {
  margin: min(20px, var(--layout-space)) 0;
  padding: clamp(16px, calc(var(--layout-space) * 1.3333), 32px) 24px min(20px, var(--layout-space));
  border: 1px solid var(--border);
  border-radius: 28px;
  background: linear-gradient(150deg, var(--soft), var(--surface) 65%);
  box-shadow: 0 16px 40px #7a64c310;
}
.donate-symbol {
  display: grid;
  place-items: center;
  width: clamp(52px, calc(var(--layout-height) * 0.095), 76px);
  height: clamp(52px, calc(var(--layout-height) * 0.095), 76px);
  margin: 0 auto min(16px, var(--layout-space));
  border-radius: 24px;
  color: var(--accent);
  background: var(--surface);
  font-size: clamp(38px, calc(var(--layout-height) * 0.07), 56px);
  line-height: 1;
  box-shadow: 0 8px 20px #7a64c318;
}
.donate-label {
  margin: 0 0 min(18px, var(--layout-space));
  color: var(--muted);
  font-size: 13px;
}
.donate-hero h1 {
  font-size: clamp(26px, calc(var(--layout-height) * 0.04), 30px);
  margin: min(14px, var(--layout-space)) 0 min(20px, var(--layout-space));
}
.donate-hero .description {
  margin-bottom: var(--layout-space);
}
.donate-hero .actions {
  flex-direction: column;
  margin: calc(var(--layout-space) * 1.0833) 0 var(--layout-space);
}
.donate-hero .actions .button:first-child {
  min-height: 60px;
  font-size: 18px;
}
.balance {
  font-size: clamp(36px, calc(var(--layout-height) * 0.06625), 53px);
  line-height: 1.1;
  letter-spacing: -2px;
  font-weight: 760;
  overflow-wrap: anywhere;
}
.balance-summary > .muted {
  margin: clamp(6px, calc(var(--layout-space) * 0.55), 13px) 0;
}
.goal {
  margin: calc(var(--layout-space) * 1.0417) 0;
  font-size: 13px;
  text-align: left;
  color: var(--muted);
}
progress {
  display: block;
  width: 100%;
  height: 8px;
  border: 0;
  border-radius: 20px;
  margin-top: 10px;
  overflow: hidden;
  background: var(--border);
  accent-color: var(--accent);
}
progress::-webkit-progress-bar {
  background: var(--border);
}
progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 20px;
}
.actions {
  display: flex;
  gap: 10px;
  margin: 26px 0 16px;
}
.hero .actions {
  margin-top: calc(var(--layout-space) * 1.0833);
  margin-bottom: min(16px, var(--layout-space));
}
.button {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  text-decoration: none;
  background: var(--accent);
  color: white;
  padding: 16px 18px;
  border-radius: 16px;
  cursor: pointer;
  min-height: 52px;
}
.actions .button {
  flex: 1;
}
.button:hover {
  filter: brightness(0.96);
}
.button:disabled {
  opacity: 0.6;
  cursor: wait;
}
.secondary {
  background: var(--soft);
  color: var(--accent);
}
.button.monobank {
  background: #000;
  color: #fff;
}
:focus-visible {
  outline: 3px solid #aa8cfc;
  outline-offset: 3px;
}
.notice {
  font-size: 12px;
  line-height: 1.65;
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 16px;
  color: var(--muted);
  margin: 24px 0;
}
.error {
  border-color: #d38a8a;
  color: #a73434;
}
.field {
  display: block;
  font-size: 13px;
  margin: 19px 0;
}
.field span {
  display: block;
  margin: 0 0 9px;
  color: var(--muted);
}
input,
textarea,
select {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 14px;
  outline-offset: 2px;
}
textarea {
  resize: vertical;
  min-height: 90px;
}
.field textarea {
  min-height: 100px;
}
form > .button {
  width: 100%;
  margin: 18px 0;
}
.address-row {
  display: grid;
  grid-template-columns: minmax(112px, 0.9fr) minmax(0, 1.4fr) 28px;
  gap: 8px;
  align-items: center;
  margin: 12px 0;
}
.address-row input {
  min-width: 0;
}
.network-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 10px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
}
.network-choice small {
  display: block;
  font-size: 11px;
}
.network-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
.network-options {
  display: grid;
  gap: 8px;
}
.network-choice[aria-pressed="true"] {
  border-color: var(--accent);
}
.network-choice:disabled {
  opacity: 0.45;
  cursor: default;
}
.remove-address {
  font-size: 25px;
}
.owner-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.danger {
  color: #b63c53;
}
.collection {
  margin-top: 40px;
}
.campaign-row {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
}
.campaign-row > div {
  flex: 1;
}
.campaign-row .quiet {
  font-size: 12px;
}
.request-id {
  display: block;
  overflow-wrap: anywhere;
  font-size: 12px;
  color: var(--muted);
  margin: 22px 0;
}
main {
  padding-bottom: clamp(12px, calc(var(--layout-space) * 1.1667), 28px);
}
dialog {
  position: fixed;
  top: calc(var(--safe-top) + 12px);
  right: var(--safe-right);
  bottom: auto;
  left: var(--safe-left);
  margin: 0 auto;
  border: 0;
  border-radius: 28px;
  padding: clamp(16px, calc(var(--layout-space) * 1.0417), 25px);
  width: min(450px, calc(100% - var(--safe-left) - var(--safe-right) - 24px));
  max-width: none;
  max-height: calc(var(--visible-height) - var(--safe-top) - var(--safe-bottom) - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 100px #17142b50;
}
dialog::backdrop {
  background: #17142b77;
  backdrop-filter: blur(5px);
}
.close {
  position: absolute;
  right: 18px;
  top: 10px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 30px;
  cursor: pointer;
  padding: 5px;
}
.payment-detail {
  text-align: center;
}
.payment-detail img {
  max-width: 100%;
  width: clamp(144px, calc(var(--layout-height) * 0.42), 256px);
  height: auto;
  display: block;
  margin: clamp(10px, var(--layout-space), 20px) auto;
  background: white;
  padding: 7px;
  border-radius: 12px;
}
.payment-detail .button,
#payment-body > .button {
  width: 100%;
  margin: 12px 0 0;
}
.payment-picker {
  margin: 14px 0;
}
.channel-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.hero .channel-card {
  margin: min(20px, var(--layout-space)) 0;
}
.channel-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--soft);
  color: var(--accent);
}
.channel-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.channel-field .channel-card {
  justify-content: flex-start;
}
.channel-field > .quiet {
  margin-left: 16px;
}
.channel-field [hidden] {
  display: none;
}
.picker-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 7px;
}
.picker-trigger,
.picker-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 48px;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}
.picker-value {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.picker-value small {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}
.picker-arrow {
  color: var(--accent);
  font-size: 20px;
}
.picker-trigger[aria-expanded="true"] {
  border-color: var(--accent);
}
.picker-options {
  position: fixed;
  z-index: 2;
  padding: 6px;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  max-height: 220px;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: 0 12px 32px #17142b33;
}
.picker-option {
  border-color: transparent;
}
.picker-option:hover,
.picker-option[aria-selected="true"] {
  background: var(--soft);
  color: var(--accent);
}
.wallet-qr {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 14px;
  color: var(--accent);
  text-decoration: none;
  border-radius: 12px;
}
.wallet-label {
  display: block;
  font-size: 13px;
  padding-bottom: 8px;
}
.copy-address {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
}
.copy-address code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
  user-select: text;
}
.copy-address svg {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.copy-status {
  display: block;
  min-height: 20px;
  color: var(--muted);
  font-size: 12px;
}
.network-tag {
  font-size: 12px;
  font-weight: 600;
  background: var(--soft);
  border-radius: 12px;
  padding: 10px;
  color: var(--accent);
}
#payment-body > .quiet {
  display: block;
  margin-top: 12px;
}
html[data-theme="dark"] {
  --surface: #242431;
  --text: #f4f2ff;
  --muted: #acabbc;
  --border: #383749;
  --accent: #b8aaff;
  --soft: #37304e;
  color-scheme: dark;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(ellipse at 50% 0, #302642, transparent 55%), #1b1b25;
}
html[data-theme="dark"] .button:not(.secondary):not(.monobank) {
  color: #211c32;
}
html[data-theme="dark"] .error {
  color: #ffa4a4;
}
@media (max-width: 370px) {
  .shell {
    padding: 0 17px;
  }
  .balance {
    font-size: clamp(36px, calc(var(--layout-height) * 0.06625), 46px);
  }
  .actions {
    gap: 8px;
  }
  .button {
    font-size: 14px;
    padding: 14px 12px;
  }
  .campaign-row {
    flex-wrap: wrap;
  }
  .campaign-row > div {
    flex-basis: 100%;
  }
}
@media (prefers-reduced-motion: no-preference) {
  .button {
    transition: filter 0.15s;
  }
  .jar {
    animation: appear 0.7s ease-out;
  }
  @keyframes appear {
    from {
      opacity: 0;
      transform: translateY(10px) rotate(-10deg);
    }
    to {
      opacity: 1;
      transform: translateY(0) rotate(-7deg);
    }
  }
}

#app > .quiet {
  display: block;
  width: max-content;
  margin-top: 8px;
}
