/* ฟอนต์ IBM Plex Sans Thai (OFL) โหลดเฉพาะชุดไทยและละติน จาก jsdelivr */
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/ibm-plex-sans-thai@5.3.0/files/ibm-plex-sans-thai-thai-400-normal.woff2") format("woff2");
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/ibm-plex-sans-thai@5.3.0/files/ibm-plex-sans-thai-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/ibm-plex-sans-thai@5.3.0/files/ibm-plex-sans-thai-thai-500-normal.woff2") format("woff2");
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/ibm-plex-sans-thai@5.3.0/files/ibm-plex-sans-thai-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/ibm-plex-sans-thai@5.3.0/files/ibm-plex-sans-thai-thai-600-normal.woff2") format("woff2");
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/ibm-plex-sans-thai@5.3.0/files/ibm-plex-sans-thai-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/ibm-plex-sans-thai@5.3.0/files/ibm-plex-sans-thai-thai-700-normal.woff2") format("woff2");
  unicode-range: U+02D7,U+0303,U+0331,U+0E01-0E5B,U+200C-200D,U+25CC; }
@font-face { font-family: "IBM Plex Sans Thai"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("https://cdn.jsdelivr.net/npm/@fontsource/ibm-plex-sans-thai@5.3.0/files/ibm-plex-sans-thai-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
/* หน้าตาใหม่ของระบบสมาชิก มนุษย์ต่างวัย (ตามไฟล์ออกแบบ): แผงน้ำเงินเข้ม + ฟอร์มสะอาด
   ใช้เฉพาะ body.su ไม่กระทบหน้าแอดมินและหน้านโยบาย */

body.su {
  --brand: #1D4FD8; --brand-dark: #173FAE;
  --navy: #1D4FD8; --navy-dark: #173FAE; --orange: #FF8A1F; /* ให้ส่วนเก่า (wizard) ใช้สีเดียวกัน */
  --panel: #0B2559; --panel-2: #173F9E; --accent: #FF8A1F;
  --ink: #0E1A33; --muted: #4A5670; --line: #9AA6BE; --fill: #F2F5FB; --soft: #C9D2E4;
  --radius: 14px;
  margin: 0; background: #FFFFFF; color: var(--ink); font-size: 16px; line-height: 1.6;
  font-family: "IBM Plex Sans Thai", "Noto Sans Thai", "Leelawadee UI", "Thonburi", system-ui, sans-serif;
}
body.su * { box-sizing: border-box; }
body.su a { color: var(--brand); }
body.su a:hover { color: var(--panel); }

/* ---------- โครงหน้า: แผงซ้าย + ฟอร์มขวา ---------- */
.su-layout { min-height: 100vh; display: flex; flex-wrap: wrap; }
.su-panel { flex: 5 1 520px; min-width: 0; position: relative; overflow: hidden; background: var(--panel); color: #FFFFFF; padding: 56px 64px; display: flex; flex-direction: column; gap: 56px; }
.su-logo { position: relative; font-size: 28px; font-weight: 700; letter-spacing: -0.5px; color: #FFFFFF !important; text-decoration: none; width: fit-content; }
.su-logo span { color: var(--accent); }
.su-hero { position: relative; display: flex; flex-direction: column; gap: 20px; }
.su-kicker { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: 0.5px; color: #9DB8FF; }
.su-hero h1 { margin: 0; font-size: 60px; line-height: 1.12; font-weight: 700; letter-spacing: -1px; color: #FFFFFF; }
.su-lead { margin: 0; max-width: 440px; font-size: 20px; line-height: 1.7; color: #D5E1FF; }
.su-benefits { position: relative; list-style: none; margin: 0; padding: 0; display: none; flex-direction: column; gap: 16px; }
body.mode-signup .su-benefits { display: flex; }
.su-benefits li { display: flex; align-items: center; gap: 14px; font-size: 17px; }
.su-check-ico { width: 28px; height: 28px; border-radius: 50%; background: var(--panel-2); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.su-decor { position: absolute; right: -80px; bottom: -80px; width: 440px; height: 440px; pointer-events: none; }
.su-form { flex: 6 1 520px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 56px 40px; background: #FFFFFF; }
body.view-split .su-form .card { width: 100%; max-width: 480px; background: transparent; box-shadow: none; border-radius: 0; padding: 0; }
body.su .card h2 { margin: 0 0 8px; font-size: 32px; line-height: 1.25; font-weight: 700; letter-spacing: -0.5px; color: var(--ink); }
.su-sub { margin: 0 0 4px; color: var(--muted); }
.su-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* ---------- ช่องกรอก ---------- */
body.su label.field { display: block; margin: 20px 0 8px; font-size: 15px; font-weight: 600; color: var(--ink); }
.su-req { color: #D93025; margin-left: 2px; }
.su-opt { color: var(--muted); font-weight: 400; }
body.su input[type="text"], body.su input[type="email"], body.su input[type="password"], body.su input[type="tel"], body.su textarea, body.su select {
  width: 100%; min-height: 52px; padding: 10px 16px; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--fill); border: 1.5px solid var(--line); border-radius: var(--radius);
}
body.su textarea { min-height: 96px; resize: vertical; }
body.su input:focus-visible, body.su textarea:focus-visible, body.su select:focus-visible { outline: 3px solid rgba(29, 79, 216, 0.35); outline-offset: 1px; border-color: var(--brand); }
body.su button:focus-visible, body.su summary:focus-visible, body.su a:focus-visible { outline: 3px solid rgba(29, 79, 216, 0.45); outline-offset: 2px; }
.su-input-ico { position: relative; }
.su-input-ico svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
body.su .su-input-ico input { padding-left: 48px; }
.pw-row { display: flex; gap: 8px; }
.pw-row input { flex: 1; min-width: 0; }
body.su .hint { margin: 6px 0 0; font-size: 14px; color: var(--muted); }

/* ---------- ปุ่ม ---------- */
body.su .btn { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 56px; margin-top: 24px; padding: 0 20px; font: inherit; font-size: 17px; font-weight: 600; color: #FFFFFF; background: var(--brand); border: 0; border-radius: var(--radius); cursor: pointer; text-decoration: none; }
body.su .btn:hover { background: var(--brand-dark); color: #FFFFFF; }
body.su .btn.secondary { color: var(--brand); background: #FFFFFF; border: 1.5px solid var(--brand); }
body.su .btn.secondary:hover { background: #EEF3FF; color: var(--brand); }
body.su .btn.small { width: auto; min-height: 52px; margin-top: 0; padding: 0 20px; font-size: 15px; }
body.su .btn[disabled] { opacity: 0.6; cursor: wait; }
body.su #forgot-password { background: none; border: 0; color: var(--brand); text-decoration: underline; text-underline-offset: 3px; min-height: 44px; padding: 0 6px; font-weight: 600; }
body.su #forgot-password:hover { background: none; color: var(--panel); }
.su-btn-arrow { font-size: 1.2rem; line-height: 1; }
.su-switch { margin: 20px 0 0; text-align: center; font-size: 15px; color: var(--muted); }
.su-switch a { font-weight: 600; }

/* ---------- ข้อความแจ้ง ---------- */
body.su .msg { margin-top: 16px; padding: 12px 14px; border-radius: var(--radius); font-size: 15px; line-height: 1.6; }
body.su .msg.info { background: #E9F0FB; color: #0B2559; border: 1px solid #C3D4EE; }
body.su .msg.error { background: #FDECEA; color: #B3261E; border: 1px solid #F3B9B4; }
body.su .msg.ok { background: #E7F5EC; color: #1B6E3C; border: 1px solid #B6DFC5; }
.mntw-captcha { margin: 18px 0 0; }

/* ---------- ตัวเลือกความสนใจ / ช่องติ๊ก ---------- */
.su-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.su-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font: inherit; font-size: 15px; color: var(--ink); background: #FFFFFF; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; }
.su-chip:hover { border-color: var(--brand); }
.su-chip[aria-checked="true"] { color: #FFFFFF; background: var(--brand); border-color: var(--brand); font-weight: 600; }
.su-check, body.su .consent-head.terms-row { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; font-size: 15px; font-weight: 400; line-height: 1.6; color: #2B3652; cursor: pointer; }
.su-check input, body.su .terms-row input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.su-details { margin: 6px 0 0 34px; font-size: 14px; color: var(--muted); }
.su-details summary { cursor: pointer; color: var(--brand); font-weight: 600; }
body.su .terms { margin-top: 6px; }

/* ---------- หน้าหลังเข้าสู่ระบบ (หน้าสมาชิก / ตั้งค่าโปรไฟล์) ---------- */
.mb-top { display: none; background: #FFFFFF; border-bottom: 1px solid #DDE3EF; }
body.view-member .mb-top { display: block; }
.mb-top-in { max-width: 1100px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.mb-logo { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; color: var(--ink) !important; text-decoration: none; }
.mb-logo span { color: var(--brand); }
body.view-member .su-layout { display: block; min-height: 0; }
body.view-member .su-panel { display: none; }
body.view-member .su-form { display: block; min-height: calc(100vh - 70px); padding: 0; background: #F3F5FA; }
body.view-member .su-form.wrap { max-width: 560px; margin: 0 auto; padding: 24px 16px 48px; background: transparent; }
.mb-wrap { max-width: 1100px; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 24px; }
.mb-hero { position: relative; overflow: hidden; background: var(--panel); color: #FFFFFF; padding: 40px 48px; border-radius: 24px; display: flex; flex-direction: column; gap: 28px; }
.mb-hero svg { position: absolute; right: -120px; top: -150px; width: 400px; height: 400px; pointer-events: none; overflow: visible; }
.mb-hello { position: relative; margin: 0; font-size: 16px; font-weight: 600; color: #9DB8FF; }
.mb-name { position: relative; margin: 0; font-size: 44px; line-height: 1.15; font-weight: 700; letter-spacing: -0.5px; color: #FFFFFF; }
.mb-stats { position: relative; display: flex; flex-wrap: wrap; gap: 16px; }
.mb-stat { flex: 1 1 200px; padding: 18px 20px; background: var(--panel-2); border-radius: var(--radius); }
.mb-stat p { margin: 0; }
.mb-stat .k { margin-bottom: 6px; font-size: 15px; color: #C5D6FF; }
.mb-stat .v { font-size: 20px; font-weight: 700; color: #FFFFFF; }
.mb-stat .v.big { font-size: 32px; line-height: 1.2; color: var(--accent); }
.mb-cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.mb-col { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.mb-col.narrow { flex: 1 1 360px; }
.mb-card { background: #FFFFFF; border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.mb-card h2 { margin: 0; font-size: 24px; font-weight: 700; color: var(--ink); }
.mb-card .consent { margin: 0; padding: 16px; border: 1.5px solid var(--soft); border-radius: var(--radius); }
.mb-card .consent-head { font-size: 16px; font-weight: 600; line-height: 1.5; }
.mb-card .consent details { margin-left: 38px; }
.mb-card .btn { margin-top: 0; }
.prof-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid #E3E8F2; font-size: 15px; }
.prof-row span:last-child { font-weight: 600; text-align: right; }
.ev-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border: 1.5px solid var(--soft); border-radius: var(--radius); }
.ev-item b { display: block; font-size: 16px; }
.ev-item small { color: var(--muted); font-size: 14px; }
.ev-pill { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #E7F5EC; color: #1B6E3C; white-space: nowrap; }
.ev-pill.off { background: #EEF2F9; color: var(--muted); }

/* ---------- หน้างาน /e/<รหัสงาน> ---------- */
body.ev { background: #F3F5FA; }
.ev-wrap { max-width: 760px; margin: 0 auto; padding: 32px 24px 64px; display: flex; flex-direction: column; gap: 24px; }
.ev-hero { position: relative; overflow: hidden; background: var(--panel); color: #FFFFFF; padding: 40px 44px; border-radius: 24px; display: flex; flex-direction: column; gap: 18px; }
.ev-hero svg { position: absolute; right: -110px; top: -140px; width: 380px; height: 380px; pointer-events: none; overflow: visible; }
.ev-kicker { position: relative; margin: 0; font-size: 16px; font-weight: 600; color: #9DB8FF; }
.ev-hero h1 { position: relative; margin: 0; font-size: 40px; line-height: 1.15; font-weight: 700; letter-spacing: -0.5px; color: #FFFFFF; }
.ev-meta { position: relative; display: flex; flex-direction: column; gap: 10px; font-size: 17px; }
.ev-meta div { display: flex; gap: 12px; align-items: flex-start; }
.ev-meta svg { position: static; width: 22px; height: 22px; flex: none; margin-top: 3px; color: #9DB8FF; }
.ev-desc { position: relative; margin: 0; font-size: 17px; line-height: 1.75; color: #D5E1FF; white-space: pre-line; }
.ev-card { background: #FFFFFF; border-radius: 20px; padding: 32px; }
.ev-card h2 { margin: 0 0 8px; font-size: 26px; font-weight: 700; color: var(--ink); }
.ev-card .lead { margin: 0 0 8px; color: var(--muted); }
.ev-group { margin-top: 28px; padding-top: 24px; border-top: 1px solid #E3E8F2; }
.ev-group h3 { margin: 0 0 4px; font-size: 19px; font-weight: 700; color: var(--ink); }
.ev-info { margin: 8px 0 0; padding: 12px 14px; font-size: 15px; background: var(--fill); border-radius: var(--radius); color: #2B3652; }
.ev-account { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 12px 0 0; font-size: 15px; }
.ev-account dt { color: var(--muted); }
.ev-account dd { margin: 0; font-weight: 600; word-break: break-word; }
.ev-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.ev-actions .btn { flex: 1 1 220px; }
.ev-terms { white-space: pre-line; }

/* ---------- มือถือ ---------- */
@media (max-width: 760px) {
  .su-panel { padding: 28px 24px 32px; gap: 20px; }
  .su-hero h1 { font-size: 40px; }
  .su-lead { font-size: 17px; }
  .su-benefits, .su-decor { display: none !important; }
  .su-form { padding: 32px 20px 48px; }
  body.su .card h2 { font-size: 28px; }
  .mb-wrap { padding: 20px 16px 48px; }
  .mb-hero { padding: 28px 22px; }
  .mb-name { font-size: 32px; }
  .mb-card { padding: 22px 18px; }
  .ev-wrap { padding: 20px 16px 48px; }
  .ev-hero { padding: 28px 22px; }
  .ev-hero h1 { font-size: 30px; }
  .ev-card { padding: 24px 18px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }

/* ---------- ตารางหน้าผู้จัด ---------- */
.ev-wrap.wide { max-width: 1000px; }
.ad-table { border-collapse: collapse; width: 100%; font-size: 14px; margin-top: 12px; }
.ad-table th, .ad-table td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid #E3E8F2; }
.ad-table th { white-space: nowrap; background: #F2F5FB; }

/* ลิงก์คอนเทนต์และช่องทางติดต่อในแผงซ้าย */
.su-links { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; margin-top: auto; }
.su-links-h { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0.3px; color: #9DB8FF; }
.su-lchips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
body.su .su-lchip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; font-size: 15px; font-weight: 600; color: #FFFFFF; text-decoration: none; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px; }
body.su .su-lchip:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.2); }
.su-contact { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 15px; color: #D5E1FF; }
body.su .su-contact a { color: #FFFFFF; font-weight: 600; text-underline-offset: 3px; }
body.su .su-contact a:hover { color: #FFD3A8; }
body.su .su-lchip:focus-visible, body.su .su-contact a:focus-visible { outline: 3px solid #FF8A1F; outline-offset: 2px; }

/* บทความล่าสุดจากเว็บไซต์ */
.su-feed { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.su-feed[hidden] { display: none; }
.su-feed-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
body.su .su-feed-item { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: 12px; color: #FFFFFF; text-decoration: none; background: rgba(11, 37, 89, 0.55); border: 1px solid rgba(255, 255, 255, 0.14); }
body.su .su-feed-item:hover { color: #FFFFFF; background: rgba(255, 255, 255, 0.12); }
body.su .su-feed-item:focus-visible { outline: 3px solid #FF8A1F; outline-offset: 2px; }
.su-feed-item img { flex: none; width: 96px; height: 54px; object-fit: cover; border-radius: 8px; background: #173F9E; }
.su-feed-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.su-feed-title { font-size: 14px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.su-feed-date { font-size: 12px; color: #9DB8FF; }
@media (max-width: 760px) { .su-feed { display: none !important; } }
