.public-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(10px);
}

.public-header-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
}

.public-header-main {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.public-header-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  flex: 0 0 auto;
}

.public-header-brand:hover {
  text-decoration: none;
}

.public-header-mark {
  width: 54px;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 54px;
}

.public-header-mark img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.public-header-copy {
  display: grid;
  gap: 2px;
}

.public-header-name {
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  font-weight: 850;
}

.public-header-subtitle {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.public-header-menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.public-header-button,
.public-header-state,
.public-header-donation-button {
  min-height: 38px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1;
}

.public-header-button,
.public-header-donation-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  padding: 9px 12px;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.public-header-button:hover {
  text-decoration: none;
  border-color: #cbd5e1;
  background: var(--surface-2);
}

.public-header-button.is-active {
  background: var(--surface-2);
  border-color: #cbd5e1;
  color: var(--ink);
}

.public-header-state {
  border: 1px solid #bbdfc7;
  background: #f0f8f3;
  color: var(--green);
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 750;
}

.public-header-donation-row {
  border-top: 1px solid var(--line);
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0 12px;
  flex-wrap: wrap;
}

.public-header-donation-copy {
  display: grid;
  gap: 2px;
  min-width: 240px;
}

.public-header-donation-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.public-header-donation-note {
  color: var(--muted);
  font-size: 12px;
}

.public-header-donation-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.public-header-donation-address {
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: 8px;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  padding: 9px 10px;
  overflow-wrap: anywhere;
}

.public-header-donation-button {
  border-color: #bbdfc7;
  background: #f0f8f3;
  color: var(--green);
}

.public-header-donation-button:hover {
  background: #e7f5ec;
}

.public-header-donation-status {
  min-width: 48px;
  color: var(--green);
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 760px) {
  .public-header-shell {
    width: min(100% - 24px, 1240px);
  }

  .public-header-main {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    padding: 10px 0;
  }

  .public-header-donation-row {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    gap: 8px;
    padding: 8px 0 10px;
  }

  .public-header-menu {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .public-header-donation-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .public-header-button,
  .public-header-donation-button {
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
  }

  .public-header-state {
    width: 100%;
    min-height: 34px;
    grid-column: 1 / -1;
  }

  .public-header-donation-address {
    width: 100%;
  }
}

@media (max-width: 430px) {
  .public-header-mark {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .public-header-mark img {
    width: 36px;
    height: 36px;
  }

  .public-header-name {
    font-size: 19px;
  }

  .public-header-donation-copy {
    min-width: 0;
  }
}
