:root {
  --ink: #13212b;
  --muted: #5a6b76;
  --line: rgba(19, 33, 43, 0.12);
  --paper: #f3f6f4;
  --surface: rgba(255, 255, 255, 0.82);
  --teal: #0f6b5c;
  --teal-deep: #0a4a40;
  --copper: #c46b2b;
  --danger: #b42318;
  --ok: #0f6b5c;
  --shadow: 0 24px 60px rgba(19, 33, 43, 0.1);
  --radius: 18px;
  --font-display: "Outfit", "Noto Sans SC", sans-serif;
  --font-body: "Noto Sans SC", "Outfit", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(15, 107, 92, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(196, 107, 43, 0.14), transparent 50%),
    linear-gradient(180deg, #e8efec 0%, #f3f6f4 40%, #eef3f1 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%2313212b' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.7;
  pointer-events: none;
}

.site-header {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 8px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  animation: rise 0.7s ease both;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  background: linear-gradient(145deg, var(--teal) 0%, var(--teal-deep) 100%);
  box-shadow: 0 10px 24px rgba(15, 107, 92, 0.28);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-text strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.01em;
}

.brand-text span {
  color: var(--muted);
  font-size: 0.82rem;
}

.brand-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.shell {
  max-width: 920px;
  margin: 0 auto 64px;
  padding: 12px 20px 40px;
}

.intro {
  margin: 18px 0 22px;
  animation: rise 0.75s ease 0.05s both;
}

.intro h1 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.lede {
  margin: 0;
  color: var(--muted);
  max-width: 62ch;
}

.req {
  color: var(--copper);
  font-weight: 700;
}

.type-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
  animation: rise 0.8s ease 0.1s both;
}

.type-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--surface);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.type-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 107, 92, 0.35);
}

.type-btn.is-active {
  border-color: transparent;
  background: linear-gradient(145deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: #fff;
  box-shadow: 0 14px 30px rgba(15, 107, 92, 0.28);
}

.type-zh {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 650;
}

.type-en {
  display: block;
  opacity: 0.78;
  font-size: 0.88rem;
  margin-top: 2px;
}

.form-note {
  margin: 0 0 18px;
  padding: 14px 16px;
  border-left: 3px solid var(--copper);
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
  font-size: 0.92rem;
  animation: rise 0.85s ease 0.12s both;
}

#registration-form {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 22px;
  animation: rise 0.9s ease 0.16s both;
}

fieldset {
  border: 0;
  margin: 0 0 22px;
  padding: 0;
}

legend {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.05rem;
  margin-bottom: 14px;
  padding: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 0.88rem;
  color: var(--muted);
}

.field.full,
.hint.full {
  grid-column: 1 / -1;
}

.hint {
  margin: -4px 0 0;
  font-size: 0.82rem;
  color: var(--copper);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 13px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  resize: vertical;
  min-height: 84px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: rgba(15, 107, 92, 0.55);
  box-shadow: 0 0 0 3px rgba(15, 107, 92, 0.12);
}

.field input.invalid,
.field select.invalid,
.field textarea.invalid {
  border-color: rgba(180, 35, 24, 0.55);
}

.file-hint {
  font-size: 0.78rem;
  color: var(--muted);
}

.consent-box {
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.consent-text {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.92rem;
  cursor: pointer;
}

.check input {
  margin-top: 4px;
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  margin-top: 8px;
}

.submit {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 15px 22px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 650;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--copper) 0%, #a8551f 100%);
  box-shadow: 0 14px 28px rgba(196, 107, 43, 0.28);
  transition: transform 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
}

.submit:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.status {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.status.is-error {
  color: var(--danger);
}

.status.is-ok {
  color: var(--ok);
}

.site-footer {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 20px 40px;
  color: var(--muted);
  font-size: 0.85rem;
}

.panel[hidden] {
  display: none !important;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  #registration-form {
    padding: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
