:root {
  color-scheme: light;
  --background: #f5f3ef;
  --panel: #fffefa;
  --panel-soft: #f9f7f2;
  --ink: #1f2523;
  --muted: #68716c;
  --line: #ded8cd;
  --green: #0d7058;
  --green-dark: #095744;
  --rose: #b43850;
  --focus: #247bff;
  --shadow: 0 22px 54px rgba(31, 37, 35, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--background);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 18% 12%, rgba(110, 231, 202, 0.18), transparent 32rem),
    var(--background);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

[hidden] {
  display: none !important;
}

.registration-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 100vh;
  place-items: center;
  padding: 32px 20px;
}

.registration-card {
  width: 100%;
  max-width: 560px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 254, 250, 0.96);
  box-shadow: var(--shadow);
  padding: clamp(26px, 5vw, 46px);
}

.registration-header {
  display: grid;
  gap: 8px;
}

.brand-mark {
  width: 14px;
  height: 14px;
  margin-bottom: 4px;
  border-radius: 999px;
  background: #6ee7ca;
  box-shadow: 0 0 24px rgba(13, 112, 88, 0.28);
}

.eyebrow {
  margin: 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.08em;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 6vw, 42px);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.description,
.privacy-disclosure,
.field-hint,
.registration-status,
.registration-error,
.noscript-message {
  line-height: 1.55;
}

.description {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
}

.registration-status {
  margin: 26px 0 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-soft);
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.registration-status.success {
  border-color: rgba(13, 112, 88, 0.28);
  background: #eefaf5;
  color: var(--green-dark);
}

.nickname-form {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.nickname-form label {
  font-size: 15px;
  font-weight: 850;
}

.nickname-form input {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
}

.nickname-form input:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(36, 123, 255, 0.18);
}

.nickname-form input[aria-invalid="true"] {
  border-color: var(--rose);
}

.field-hint,
.registration-error {
  margin: -2px 0 0;
  font-size: 13px;
  font-weight: 650;
}

.field-hint {
  color: var(--muted);
}

.registration-error {
  color: var(--rose);
}

.nickname-form button {
  width: 100%;
  min-height: 52px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  padding: 12px 16px;
  font-size: 16px;
  font-weight: 900;
}

.nickname-form button:hover:not(:disabled) {
  background: var(--green-dark);
}

.nickname-form button:focus-visible {
  outline: 3px solid rgba(36, 123, 255, 0.38);
  outline-offset: 3px;
}

.nickname-form button:disabled,
.nickname-form input:disabled {
  cursor: wait;
  opacity: 0.62;
}

.privacy-disclosure,
.noscript-message {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.privacy-disclosure summary {
  min-height: 32px;
  color: var(--muted);
  cursor: pointer;
  font-weight: 800;
}

.privacy-disclosure summary:focus-visible {
  border-radius: 5px;
  outline: 3px solid rgba(36, 123, 255, 0.28);
  outline-offset: 2px;
}

.privacy-disclosure p {
  margin: 6px 0 0;
}

.noscript-message {
  color: var(--rose);
}

@media (max-width: 560px) {
  .registration-shell {
    align-items: start;
    padding: 14px 10px;
  }

  .registration-card {
    margin-top: 5vh;
    border-radius: 18px;
    padding: 24px 18px;
  }

  .registration-status {
    margin-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
