:root {
  --pulse-blue: #4aa3ff;
  --pulse-blue-soft: rgba(74, 163, 255, .14);
  --pulse-border: #303a47;
  --pulse-panel: #11161d;
  --pulse-panel-2: #0b1016;
}

.pulse-page {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 80px;
  color: #f5f7fb;
}

.pulse-hero,
.pulse-history-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 24px;
  border: 1px solid var(--pulse-border);
  border-radius: 18px;
  background:
    radial-gradient(circle at 12% 0, rgba(74, 163, 255, .24), transparent 42%),
    linear-gradient(145deg, #151c25, #0b0f15 72%);
  box-shadow: 0 18px 55px rgba(0, 0, 0, .24);
}

.pulse-heart {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .05);
}

.pulse-heart > span:first-child {
  font-size: 44px;
}

.pulse-heart-bolt {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-48%, -50%);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 23px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 4px #06447f;
}

.pulse-heart-bolt[hidden] { display: none; }

.pulse-hero h1,
.pulse-history-header h1 {
  margin: 2px 0 7px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.pulse-hero p,
.pulse-history-header p {
  margin: 0;
  color: #b7c0cd;
  line-height: 1.55;
}

.pulse-eyebrow {
  color: #79baff !important;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.pulse-count-card {
  min-width: 112px;
  padding: 16px;
  border: 1px solid rgba(74, 163, 255, .42);
  border-radius: 14px;
  background: var(--pulse-blue-soft);
  text-align: center;
}

.pulse-count-card strong {
  display: block;
  color: #fff;
  font-size: 34px;
  line-height: 1;
}

.pulse-count-card span {
  display: block;
  margin-top: 6px;
  color: #bcdcff;
  font-size: 12px;
  font-weight: 700;
}

.pulse-status,
.pulse-action-status {
  min-height: 24px;
  margin: 16px 0;
  color: #b8c1cd;
  text-align: center;
}

.pulse-status.is-error,
.pulse-action-status.is-error { color: #ff9696; }
.pulse-status.is-ok,
.pulse-action-status.is-ok { color: #7ee2a8; }

.pulse-layout {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(360px, 1.1fr);
  gap: 18px;
}

.pulse-join-card,
.pulse-supporters-card,
.pulse-history-summary,
.pulse-history-list {
  border: 1px solid var(--pulse-border);
  border-radius: 16px;
  background: var(--pulse-panel);
}

.pulse-join-card,
.pulse-supporters-card { padding: 20px; }

.pulse-membership {
  display: flex;
  width: 100%;
  box-sizing: border-box;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  padding: 15px 16px;
  border-left: 4px solid var(--pulse-blue);
  border-radius: 10px;
  background: var(--pulse-blue-soft);
  color: inherit;
  text-align: left;
}

.pulse-membership-toggle {
  border-top: 0;
  border-right: 0;
  border-bottom: 0;
  font: inherit;
  cursor: default;
}

.pulse-membership strong,
.pulse-supporters-card h2 {
  display: block;
  margin: 0 0 5px;
  font-size: 22px;
}

.pulse-membership small { display: block; color: #c0cad6; font-size: 14px; }
.pulse-membership-chevron { display: none; color: #a9d4ff; font-size: 20px; transition: transform .16s ease; }
.pulse-join-details[hidden] { display: none !important; }

.pulse-form-grid {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
}

.pulse-form-grid label > span,
.pulse-identity legend {
  display: block;
  margin-bottom: 6px;
  color: #c8d0da;
  font-size: 13px;
  font-weight: 700;
}

.pulse-form-grid input {
  width: 100%;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid #384554;
  border-radius: 9px;
  background: #080c11;
  color: #fff;
  box-sizing: border-box;
}

.pulse-identity {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  border: 0;
}

.pulse-identity label {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #303b49;
  border-radius: 10px;
  background: var(--pulse-panel-2);
  cursor: pointer;
}

.pulse-identity input { margin-top: 3px; }
.pulse-identity span { display: grid; gap: 3px; }
.pulse-identity small { color: #9ba7b5; line-height: 1.35; }

.pulse-primary {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid #74b8ff;
  border-radius: 11px;
  background: linear-gradient(180deg, #258ff8, #1165bd);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
}

button.pulse-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pulse-button-heart {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 7px rgba(0, 31, 68, .28);
}

.pulse-button-heart-emoji {
  font-size: 23px;
  line-height: 1;
}

.pulse-button-heart-bolt {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-48%, -50%);
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 3px #06447f;
}

.pulse-primary:disabled { opacity: .55; cursor: not-allowed; }
.pulse-primary--link { width: auto; min-height: 0; text-decoration: none; }

.pulse-invoice {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #33465a;
  border-radius: 12px;
  background: #fff;
  color: #111;
  text-align: center;
}

.pulse-qr { display: inline-block; min-height: 220px; }
.pulse-invoice-actions { display: flex; justify-content: center; gap: 10px; margin: 10px 0; }
.pulse-invoice-actions a,
.pulse-invoice-actions button {
  padding: 8px 12px;
  border: 1px solid #777;
  border-radius: 8px;
  background: #f3f3f3;
  color: #111;
  font-weight: 700;
  text-decoration: none;
}

.pulse-bolt11 {
  max-height: 54px;
  overflow: auto;
  color: #555;
  font-family: monospace;
  font-size: 11px;
  word-break: break-all;
}

.pulse-fineprint { margin: 16px 0 0; color: #929eac; font-size: 12px; line-height: 1.5; }

.pulse-section-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.pulse-section-heading p { margin: 0 0 4px; }
.pulse-section-heading button,
.pulse-history-card a {
  padding: 8px 11px;
  border: 1px solid #3a4858;
  border-radius: 8px;
  background: #0b1118;
  color: #dce7f5;
  text-decoration: none;
}

.pulse-supporters { display: grid; gap: 9px; }

.pulse-supporter {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  padding: 11px;
  border: 1px solid #293442;
  border-radius: 11px;
  background: var(--pulse-panel-2);
}

.pulse-rank { color: #78baff; font-weight: 900; }
.pulse-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: #202b38;
}
.pulse-avatar-link { display: block; width: 42px; height: 42px; border-radius: 50%; }
.pulse-avatar-link:focus-visible { outline: 2px solid #78baff; outline-offset: 3px; }
.pulse-avatar--ghost { display: grid; place-items: center; font-size: 25px; }
.pulse-supporter-main { min-width: 0; }
.pulse-supporter-main strong,
.pulse-supporter-main a,
.pulse-supporter-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pulse-supporter-profile { color: #f4f8ff; font-weight: 800; text-decoration: none; }
.pulse-supporter-profile:hover { color: #8fc7ff; text-decoration: underline; }
.pulse-supporter-main small { margin-top: 3px; color: #919dac; }
.pulse-supporter-message {
  margin: 7px 0 0;
  color: #d8e2ee;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.pulse-supporter-sats { color: #ffd969; font-weight: 800; white-space: nowrap; }
.pulse-empty { padding: 35px 15px; color: #9aa6b4; text-align: center; }

.pulse-history-header { grid-template-columns: minmax(0, 1fr) auto; }
.pulse-history-summary { margin-top: 18px; padding: 18px; }
.pulse-history-summary.is-active { border-color: rgba(74, 163, 255, .65); background: var(--pulse-blue-soft); }
.pulse-history-summary h2 { margin: 0 0 5px; }
.pulse-history-summary p { margin: 0; color: #b9c5d3; }
.pulse-history-list { display: grid; gap: 10px; margin-top: 18px; padding: 18px; }
.pulse-history-list > h2 { margin: 0 0 4px; }
.pulse-history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid #2d3947;
  border-radius: 11px;
  background: var(--pulse-panel-2);
}
.pulse-history-card h3 { margin: 0 0 5px; font-size: 17px; }
.pulse-history-card p { margin: 0; color: #96a3b2; font-size: 13px; line-height: 1.5; }
.pulse-history-state { padding: 7px 10px; border-radius: 999px; font-weight: 800; }
.pulse-history-state--paid { background: rgba(50, 190, 113, .16); color: #84e7ac; }
.pulse-history-state--pending { background: rgba(255, 202, 73, .13); color: #ffda77; }

@media (max-width: 780px) {
  .pulse-page { width: min(100% - 20px, 1180px); margin-top: 14px; }
  .pulse-hero { grid-template-columns: auto minmax(0, 1fr); padding: 18px; }
  .pulse-count-card { grid-column: 1 / -1; }
  .pulse-heart { width: 62px; height: 62px; border-radius: 18px; }
  .pulse-heart > span:first-child { font-size: 34px; }
  .pulse-heart-bolt { font-size: 18px; }
  .pulse-layout { grid-template-columns: 1fr; }
  .pulse-membership-toggle { cursor: pointer; }
  .pulse-membership-chevron { display: inline-block; }
  .pulse-membership-toggle[aria-expanded="true"] .pulse-membership-chevron { transform: rotate(180deg); }
  .pulse-form-grid { grid-template-columns: 1fr; }
  .pulse-history-header { grid-template-columns: 1fr; }
  .pulse-primary--link { text-align: center; }
}

@media (max-width: 470px) {
  .pulse-hero { grid-template-columns: 1fr; text-align: center; }
  .pulse-heart { margin: auto; }
  .pulse-supporter { grid-template-columns: auto auto minmax(0, 1fr); }
  .pulse-supporter-sats { grid-column: 3; }
  .pulse-history-card { grid-template-columns: 1fr; }
  .pulse-history-state { justify-self: start; }
}
