* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background: #f9fafb;
  color: #111827;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; }

body > header {
  border-bottom: 1px solid #f3f4f6;
  background: #fff;
  padding: 1rem;
}

body > header > div {
  display: flex;
  max-width: 32rem;
  margin: 0 auto;
  align-items: center;
  gap: .5rem;
}

body > header a {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #1f2937;
  font-weight: 700;
  text-decoration: none;
}

body > header div > span:last-child {
  margin-left: auto;
  border-radius: 9999px;
  background: #fef3c7;
  color: #78350f;
  padding: .25rem .75rem;
  font-size: .75rem;
  font-weight: 600;
}

main {
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  padding: 2.5rem 1rem;
}

main > section:first-child {
  margin-bottom: 1.5rem;
  border-radius: 1rem;
  background: #115e59;
  color: #fff;
  padding: 1.5rem;
}

main > section:first-child p:first-child {
  margin: 0 0 .5rem;
  color: #99f6e4;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

h1 { margin: 0 0 .5rem; font-size: 1.5rem; }
h2 { margin: 0 0 .25rem; font-size: 1.125rem; }
main > section:first-child > p { color: #ccfbf1; font-size: .875rem; line-height: 1.5rem; }
main > section:first-child ul { padding: 0; list-style: none; color: #f0fdfa; font-size: .875rem; line-height: 1.8; }
main > section:first-child div { margin-top: 1.25rem; border-top: 1px solid #0f766e; padding-top: 1rem; font-size: .875rem; font-weight: 600; }

main > section:nth-child(2) {
  border: 1px solid #f3f4f6;
  border-radius: 1rem;
  background: #fff;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgb(0 0 0 / .05);
}

main > section:nth-child(2) > p { margin: 0 0 1.25rem; color: #6b7280; font-size: .875rem; }
form > * + * { margin-top: 1rem; }
.grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.grid > div { min-width: 0; }

label:not(.flex) {
  display: block;
  margin-bottom: .25rem;
  color: #374151;
  font-size: .75rem;
  font-weight: 600;
}

input:not([type="checkbox"]) {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: .5rem;
  padding: .625rem .75rem;
  font: inherit;
  font-size: .875rem;
}

input:not([type="checkbox"]):focus {
  border-color: #0d9488;
  outline: 2px solid #99f6e4;
  outline-offset: 1px;
}

#invite-code { text-transform: uppercase; letter-spacing: .05em; }
form > label.flex {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  border-radius: .5rem;
  background: #f9fafb;
  padding: .75rem;
  color: #374151;
  font-size: .875rem;
}

input[type="checkbox"] { width: 1rem; height: 1rem; margin-top: .25rem; accent-color: #0f766e; flex: none; }
form > label a { color: #0f766e; font-weight: 600; }
form > p { color: #6b7280; font-size: .75rem; line-height: 1.25rem; }

#submit-error {
  border-radius: .5rem;
  background: #fef2f2;
  padding: .75rem;
  color: #b91c1c;
  font-size: .875rem;
}

#submit-btn, #success-state a {
  display: inline-block;
  width: 100%;
  border: 0;
  border-radius: .75rem;
  background: #0f766e;
  color: #fff;
  padding: .875rem 1.5rem;
  font: inherit;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease;
}

#submit-btn:hover, #success-state a:hover { background: #115e59; }
#submit-btn:disabled { cursor: not-allowed; opacity: .6; }
#success-state { padding: 2rem 0; text-align: center; }
#success-state > div { margin-bottom: .75rem; font-size: 3rem; }
#success-state h2 { font-size: 1.5rem; }
#success-state p { margin-bottom: 1.5rem; color: #4b5563; font-size: .875rem; }
main > p { margin-top: 1.25rem; color: #6b7280; font-size: .75rem; text-align: center; }
main > p a { color: #0f766e; font-weight: 600; }

.hidden { display: none !important; }
#invite-status { margin: .25rem 0 0; font-size: .75rem; }
.text-green-700 { color: #15803d; }
.text-red-600 { color: #dc2626; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
