  :root {
      --teal:       #0d6e6e;
      --teal-light: #e6f4f4;
      --teal-mid:   #1a9090;
      --gold:       #c8973a;
      --gold-light: #fdf6e8;
      --text:       #1a2327;
      --sub:        #4a6165;
      --border:     #c5dada;
      --bg:         #f4f9f9;
      --white:      #ffffff;
      --red:        #d94040;

      /* Mobile-first sizing */
      --input-height: 52px;
      --font-input:   1rem;
      --font-label:   .95rem;
      --radius-input: 12px;
      --gap-field:    22px;
    }

    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html { -webkit-text-size-adjust: 100%; }

    body {
      font-family: 'Sarabun', sans-serif;
      background: var(--bg);
      color: var(--text);
      min-height: 100vh;
      padding: 0 0 72px;           /* no side padding – handled per section */
    }

    body::before {
      content: '';
      position: fixed;
      inset: 0;
      background:
        radial-gradient(ellipse 60% 40% at 10% 10%, rgba(13,110,110,.08) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 90% 80%, rgba(200,151,58,.06) 0%, transparent 70%);
      pointer-events: none;
      z-index: 0;
    }

    .container {
      position: relative;
      z-index: 1;
      max-width: 720px;
      margin: 0 auto;
    }

    /* ── Header ── */
    .header-card {
      width: 100%;
      overflow: hidden;
      position: relative;
      background: linear-gradient(135deg, var(--teal) 0%, #0a5252 100%);
    }

    .header-card::after,
    .header-card::before { display: none; }

    .header-card img {
      width: 100%;
      height: auto;
      display: block;
      aspect-ratio: 932 / 233;
      object-fit: fill;
    }

    .header-text {
      padding: 20px 20px 24px;
      line-height: normal;
    }

    .header-text h2 {
      font-family: 'Noto Serif Thai', serif;
      font-size: 1.2rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 10px;
      line-height: 1.4;
    }

    .header-text p {
      font-size: .82rem;
      color: rgba(255,255,255,.82);
      line-height: 1.75;
    }

    .logo-row {
      display: flex;
      align-items: center;
      gap: 12px;
      margin-bottom: 16px;
    }

    .logo-icon {
      width: 48px; height: 48px;
      background: rgba(255,255,255,.15);
      border-radius: 14px;
      display: flex; align-items: center; justify-content: center;
      font-size: 26px;
      flex-shrink: 0;
    }

    .org-name {
      font-family: 'Noto Serif Thai', serif;
      font-size: 1.05rem;
      font-weight: 700;
      color: #fff;
      line-height: 1.4;
    }

    .org-sub {
      font-size: .78rem;
      color: rgba(255,255,255,.75);
      margin-top: 2px;
      line-height: 1.5;
    }

    .form-title {
      font-family: 'Noto Serif Thai', serif;
      font-size: 1.3rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 5px;
      line-height: 1.4;
    }

    .form-subtitle {
      font-size: .85rem;
      color: rgba(255,255,255,.8);
    }

    .gold-bar {
      height: 4px;
      background: linear-gradient(90deg, var(--gold), #e8b55a, var(--gold));
    }

    /* ── Form body ── */
    .form-body {
      background: var(--white);
      padding: 24px 20px 32px;
      box-shadow: 0 8px 40px rgba(13,110,110,.10);
    }

    /* ── Section divider ── */
    .section-label {
      display: flex;
      align-items: center;
      gap: 10px;
      font-size: .75rem;
      font-weight: 700;
      letter-spacing: .09em;
      text-transform: uppercase;
      color: var(--teal-mid);
      margin: 28px 0 16px;
    }

    .section-label::before,
    .section-label::after {
      content: '';
      flex: 1;
      height: 1px;
      background: var(--border);
    }

    /* ── Field ── */
    .field-group { margin-bottom: var(--gap-field); }

    label {
      display: block;
      font-size: var(--font-label);
      font-weight: 600;
      color: var(--text);
      margin-bottom: 8px;
    }

    label .req { color: var(--red); margin-left: 3px; }

    input[type="text"],
    input[type="tel"],
    input[type="number"],select {
      width: 100%;
      height: var(--input-height);
      padding: 0 16px;
      border: 1.5px solid var(--border);
      border-radius: var(--radius-input);
      font-family: 'Sarabun', sans-serif;
      font-size: var(--font-input);
      color: var(--text);
      background: #fff;
      transition: border-color .2s, box-shadow .2s, background .2s;
      -webkit-appearance: none;
      appearance: none;
      outline: none;
      /* prevent iOS zoom on focus (font-size >= 16px) */
    }

    input[type="text"]:focus,
    input[type="tel"]:focus,
    select:focus,
    input[type="number"]:focus {
      border-color: var(--teal-mid);
      box-shadow: 0 0 0 3px rgba(26,144,144,.12);
      background: var(--teal-light);
    }

    /* error state */
    input.error {
      border-color: var(--red) !important;
      box-shadow: 0 0 0 3px rgba(217,64,64,.12) !important;
    }

    .error-msg {
      display: none;
      font-size: .78rem;
      color: var(--red);
      margin-top: 5px;
    }

    .error-msg.show { display: block; }

    /* ── Radio prefix ── */
    .radio-group {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
    }

    .radio-group.error-radio {
      outline: 2px solid var(--red);
      outline-offset: 4px;
      border-radius: 10px;
    }

    .radio-group input[type="radio"] { display: none; }

    .radio-group label {
      margin: 0;
      padding: 11px 18px;
      border: 1.5px solid var(--border);
      border-radius: 999px;
      font-size: .92rem;
      font-weight: 500;
      cursor: pointer;
      transition: all .18s;
      background: #fff;
      color: var(--sub);
      white-space: nowrap;
      /* larger tap target */
      min-height: 44px;
      display: flex;
      align-items: center;
    }

    .radio-group input[type="radio"]:checked + label {
      background: var(--teal);
      border-color: var(--teal);
      color: #fff;
      font-weight: 600;
      box-shadow: 0 2px 8px rgba(13,110,110,.25);
    }

    /* ── 2-col grid → 1-col on small screens ── */
    .grid-2 {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }

    /* ── Submit ── */
    .btn-submit {
      width: 100%;
      margin-top: 28px;
      height: 56px;
      background: linear-gradient(135deg, var(--teal) 0%, var(--teal-mid) 100%);
      color: #fff;
      border: none;
      border-radius: 14px;
      font-family: 'Sarabun', sans-serif;
      font-size: 1.1rem;
      font-weight: 700;
      cursor: pointer;
      letter-spacing: .03em;
      position: relative;
      overflow: hidden;
      transition: transform .15s, box-shadow .15s;
      box-shadow: 0 4px 18px rgba(13,110,110,.30);
      /* comfortable tap target */
      -webkit-tap-highlight-color: transparent;
    }

    .btn-submit:active {
      transform: scale(.98);
      box-shadow: 0 2px 10px rgba(13,110,110,.25);
    }

    .btn-submit::after {
      content: '';
      position: absolute;
      inset: 0;
      background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, transparent 60%);
      pointer-events: none;
    }

    /* ── Hint bar ── */
    .hint {
      font-size: .82rem;
      color: var(--sub);
      margin-bottom: 20px;
      padding: 11px 14px;
      background: var(--gold-light);
      border-left: 3px solid var(--gold);
      border-radius: 0 8px 8px 0;
      line-height: 1.5;
    }

    .hint span { color: var(--red); font-weight: 700; }

    /* ── Success overlay ── */
    #success-overlay {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(13,110,110,.85);
      z-index: 100;
      align-items: center;
      justify-content: center;
      flex-direction: column;
      backdrop-filter: blur(4px);
      padding: 20px;
    }

    #success-overlay.show { display: flex; }

    .success-box {
      background: #fff;
      border-radius: 20px;
      padding: 36px 28px;
      text-align: center;
      width: 100%;
      max-width: 360px;
      box-shadow: 0 20px 60px rgba(0,0,0,.2);
      animation: popIn .35s cubic-bezier(.34,1.56,.64,1);
    }

    @keyframes popIn {
      from { transform: scale(.8); opacity: 0; }
      to   { transform: scale(1);  opacity: 1; }
    }

    .success-icon { font-size: 3rem; margin-bottom: 12px; }

    .success-title {
      font-family: 'Noto Serif Thai', serif;
      font-size: 1.3rem;
      font-weight: 700;
      color: var(--teal);
      margin-bottom: 8px;
    }

    .success-msg {
      font-size: .9rem;
      color: var(--sub);
      line-height: 1.6;
    }

    .btn-close {
      margin-top: 20px;
      padding: 13px 36px;
      background: var(--teal);
      color: #fff;
      border: none;
      border-radius: 999px;
      font-family: 'Sarabun', sans-serif;
      font-size: .95rem;
      font-weight: 600;
      cursor: pointer;
      min-height: 48px;
    }

    /* ════════════════════════════════
       DESKTOP enhancements (≥ 600px)
       ════════════════════════════════ */
    @media (min-width: 600px) {
      body { padding-top: 32px; }

      .header-card { border-radius: 20px 20px 0 0; }
      .header-text { padding: 22px 40px 28px; }
      .header-text h2 { font-size: 1.35rem; }
      .header-text p  { font-size: .85rem; }

      .form-body { padding: 36px 40px 44px; border-radius: 0 0 20px 20px; }

      :root {
        --input-height: 48px;
        --font-input:   .95rem;
        --font-label:   .9rem;
        --radius-input: 10px;
        --gap-field:    20px;
      }

      .form-title { font-size: 1.55rem; }
    }

    /* ── Tiny phones (< 360px) ── */
    @media (max-width: 359px) {
      .grid-2 { grid-template-columns: 1fr; }
      .radio-group label { padding: 10px 14px; font-size: .85rem; }
    }

    /* ── Landscape phone: keep grid single-col ── */
    @media (max-width: 600px) {
      .grid-2 { grid-template-columns: 1fr; gap: 0; }
    }