* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f7fb;
  color: #1f2937;
}

.site-header {
  padding: 24px 16px;
  text-align: center;
  background: #111827;
  color: white;
}

.site-header h1 {
  margin: 0 0 6px;
  font-size: 24px;
}

.site-header p {
  margin: 0;
  color: #d1d5db;
}

main {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 20px 16px 48px;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.hidden {
  display: none !important;
}

label {
  display: block;
  margin-bottom: 14px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  font: inherit;
}

textarea {
  min-height: 96px;
}

button {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  font-weight: 700;
  cursor: pointer;
}

button.secondary {
  width: auto;
  background: #6b7280;
}

.member-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.error {
  color: #b91c1c;
  background: #fee2e2;
  padding: 10px 12px;
  border-radius: 10px;
}

.help-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e5e7eb;
}

ul {
  padding-left: 20px;
}

pre {
  white-space: pre-wrap;
  background: #f3f4f6;
  border-radius: 12px;
  padding: 12px;
  overflow-x: auto;
}

@media (max-width: 640px) {
  .member-header {
    display: block;
  }

  button.secondary {
    width: 100%;
    margin-top: 8px;
  }
}

.site-header,
header {
  text-align: center;
}

.card h2,
.card h3 {
  margin-top: 0;
}

#guestView,
#loginSection {
  max-width: 420px;
  margin: 0 auto 16px;
}

#memberView .card,
main > .card {
  border: 1px solid #e5e7eb;
}

#healthChart {
  font-family: inherit;
  line-height: 1.7;
}

#loginError,
.error {
  margin-top: 12px;
}
