:root {
  --bg-white: #fff;
  --bg-subtle: #f5f5f7;
  --text-main: #1d1d1f;
  --text-muted: #6e6e73;
  --accent: #0071e3;
  --border-color: #d2d2d7;
  --font-sans: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text-main);
  background: var(--bg-subtle);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: grid; place-items: center; padding: 56px 24px; line-height: 1.6; }
.card { width: 100%; max-width: 600px; padding: 44px 48px 48px; background: var(--bg-white); border: 1px solid var(--border-color); border-radius: 32px; box-shadow: 0 4px 24px rgba(0,0,0,.06); }
.brand { display: flex; align-items: center; gap: 7px; margin-bottom: 36px; padding-bottom: 24px; border-bottom: 1px solid #e8e8ed; font-weight: 700; font-size: 1.1rem; letter-spacing: -.015em; }
.brand span { color: var(--accent); }
.eyebrow { display: inline-block; margin: 0 0 14px; padding: 5px 13px; border-radius: 999px; background: rgba(0,113,227,.08); color: var(--accent); font-size: .8rem; font-weight: 600; }
h1 { margin: 0 0 12px; font-size: clamp(1.9rem,6vw,2.6rem); line-height: 1.3; font-weight: 800; letter-spacing: -.015em; }
.intro { margin: 0 0 32px; color: var(--text-muted); font-size: 1rem; }
fieldset { padding: 0; margin: 0 0 28px; border: 0; min-width: 0; }
legend { margin-bottom: 12px; padding: 0; font-size: .9rem; font-weight: 600; }
.methods { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 16px; background: var(--bg-subtle); }
.methods label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 8px; margin: 0; border: 1px solid transparent; border-radius: 12px; color: var(--text-muted); font-size: .87rem; font-weight: 500; cursor: pointer; transition: background .2s,color .2s,box-shadow .2s; }
.methods label:has(input:checked) { color: var(--accent); background: var(--bg-white); border-color: rgba(0,113,227,.12); box-shadow: 0 2px 8px rgba(0,0,0,.04); }
input[type="radio"] { margin: 0; width: 15px; height: 15px; flex-shrink: 0; accent-color: var(--accent); }
label { display: block; margin-bottom: 10px; font-size: .9rem; font-weight: 600; }
input[type="text"], input[type="tel"] { display: block; width: 100%; min-width: 0; min-height: 56px; padding: 14px 18px; border: 1px solid var(--border-color); border-radius: 16px; background: var(--bg-white); color: var(--text-main); font: inherit; transition: border-color .2s,box-shadow .2s; }
input::placeholder { color: #86868b; font-size: .9rem; }
input[type="text"]:focus, input[type="tel"]:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px rgba(0,113,227,.12); }
input[type="radio"]:focus-visible, button:focus-visible { outline: 3px solid #80b8ee; outline-offset: 4px; }
.help { margin: 12px 0 28px; color: var(--text-muted); font-size: .8rem; line-height: 1.9; }
button { display: block; width: 100%; min-height: 54px; padding: 14px 24px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: linear-gradient(135deg,#147ec9,#0a5c96); color: white; font: inherit; font-weight: 600; cursor: pointer; box-shadow: 0 6px 18px rgba(20,126,201,.2); transition: transform .25s,box-shadow .25s,background .25s; }
@media (hover: hover) {
  button:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 9px 24px rgba(10,92,150,.28); background: linear-gradient(135deg,#1a8cd9,#147ec9); }
  .methods label:hover { color: var(--accent); }
}
button:disabled { opacity: .65; cursor: wait; }
#results { margin-top: 28px; padding: 20px 24px; border: 1px solid rgba(0,113,227,.17); border-radius: 20px; background: #f2f8ff; overflow-wrap: anywhere; }
#results.error { background: #fff5f5; border-color: #f0d1d3; color: #a32937; }
#results p { margin: 0; font-size: .92rem; line-height: 1.8; }
.result + .result { margin-top: 18px; padding-top: 18px; border-top: 1px solid rgba(0,113,227,.15); }
.username { display: block; margin-top: 6px; color: var(--accent); font-size: 1.1rem; font-weight: 700; }
[hidden] { display: none !important; }
@media (max-width: 480px) {
  body { padding: 24px 16px; }
  .card { padding: 28px 24px 32px; border-radius: 24px; }
  .brand { margin-bottom: 28px; padding-bottom: 20px; }
  .intro { font-size: .92rem; margin-bottom: 28px; }
  .methods label { gap: 6px; padding-inline: 4px; font-size: .8rem; }
  #results { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
