:root {
  color-scheme: dark;
  font-family: "Leelawadee UI", "Noto Sans Thai", system-ui, sans-serif;
  --ink: #f9f3e8;
  --muted: #bdb4a8;
  --night: #0f1717;
  --surface: rgba(24, 34, 33, 0.94);
  --line: rgba(225, 205, 166, 0.18);
  --gold: #e8bb69;
  --gold-bright: #ffd894;
  --green: #79d4a5;
  --red: #ff9a91;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(77, 133, 105, .28), transparent 34rem),
    radial-gradient(circle at 85% 85%, rgba(196, 133, 58, .20), transparent 30rem),
    linear-gradient(145deg, #0a1112, #172220 48%, #101717);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .24;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 80%);
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 18px;
}

.registration-card {
  position: relative;
  width: min(100%, 460px);
  padding: 38px 38px 30px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .42), inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(16px);
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 22px;
  border: 1px solid rgba(255,216,148,.54);
  border-radius: 17px;
  color: #1a201d;
  background: linear-gradient(145deg, var(--gold-bright), #b77933);
  font: 700 28px Georgia, serif;
  box-shadow: 0 12px 32px rgba(210, 153, 77, .24);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}

h1 { margin: 0; font-size: clamp(28px, 8vw, 38px); line-height: 1.16; letter-spacing: -.025em; }
.intro { margin: 10px 0 28px; color: var(--muted); line-height: 1.65; }

.field { margin: 0 0 18px; }
label { display: block; margin: 0 0 8px; font-weight: 650; font-size: 14px; }
small { display: block; margin-top: 7px; color: #928b82; font-size: 12px; }

input {
  width: 100%;
  height: 49px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  color: var(--ink);
  background: rgba(5, 11, 11, .62);
  font: inherit;
  transition: border-color .16s, box-shadow .16s, background .16s;
}

input::placeholder { color: #756f69; }
input:focus { border-color: var(--gold); background: rgba(5, 11, 11, .8); box-shadow: 0 0 0 3px rgba(232,187,105,.13); }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 70px; }
.reveal {
  position: absolute;
  top: 50%;
  right: 8px;
  translate: 0 -50%;
  padding: 7px 9px;
  border: 0;
  border-radius: 8px;
  color: var(--gold-bright);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
}

.submit {
  width: 100%;
  min-height: 51px;
  margin-top: 4px;
  border: 0;
  border-radius: 13px;
  color: #211b11;
  background: linear-gradient(135deg, var(--gold-bright), #d59d4e);
  box-shadow: 0 12px 28px rgba(211, 158, 75, .18);
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  font-weight: 750;
  transition: transform .16s, filter .16s;
}
.submit:hover { filter: brightness(1.06); transform: translateY(-1px); }
.submit:active { transform: translateY(0); }
.submit:disabled { cursor: wait; filter: saturate(.4); transform: none; }

.message { min-height: 0; margin: 0; border-radius: 11px; font-size: 13px; line-height: 1.5; }
.message:not(:empty) { margin: 2px 0 14px; padding: 11px 13px; }
.message.success { color: var(--green); background: rgba(67, 165, 114, .11); border: 1px solid rgba(121,212,165,.2); }
.message.error { color: var(--red); background: rgba(205, 76, 67, .1); border: 1px solid rgba(255,154,145,.2); }
.note { margin: 22px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: #938c84; font-size: 12px; line-height: 1.55; text-align: center; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 520px) {
  .page-shell { padding: 0; align-items: stretch; }
  .registration-card { width: 100%; min-height: 100vh; padding: 34px 22px 26px; border: 0; border-radius: 0; }
}

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