* { box-sizing: border-box; }

/* [2026-08-11] ฟอนต์ไทยไม่มีหัว — เดิมหน้านี้ไม่ประกาศ @font-face เลย font-family ของ body
   และ jd-login-alert-content ก็ไม่มี 'NotoSansThai' อยู่ในลิสต์ด้วย จึงตกไปใช้ฟอนต์ระบบ
   ("Segoe UI"/system-ui) ซึ่งบน iOS/Android จะได้ฟอนต์ไทยมีหัวของระบบ
   path ใช้ /Create%20Room/FONTS/ (absolute) เพราะไฟล์ครบ 4 น้ำหนักมีอยู่จริงเฉพาะในโฟลเดอร์นั้น */
@font-face { font-family:'NotoSansThai'; src:url('/Create%20Room/FONTS/NotoSansThai-Medium.ttf') format('truetype');
  font-weight:500; font-style:normal; font-display:swap; }
@font-face { font-family:'NotoSansThai'; src:url('/Create%20Room/FONTS/NotoSansThai-SemiBold.ttf') format('truetype');
  font-weight:600; font-style:normal; font-display:swap; }
@font-face { font-family:'NotoSansThai'; src:url('/Create%20Room/FONTS/NotoSansThai-Bold.ttf') format('truetype');
  font-weight:700; font-style:normal; font-display:swap; }
@font-face { font-family:'NotoSansThai'; src:url('/Create%20Room/FONTS/NotoSansThai-Black.ttf') format('truetype');
  font-weight:800 900; font-style:normal; font-display:swap; }

/* โทนสีตาม reference – ฟ้าไฟฟ้า / navy */
:root {
  --jd-cyan: #00d4ff;
  --jd-cyan-soft: rgba(0, 212, 255, 0.35);
  --jd-panel-bg: rgba(6, 12, 26, 0.6);
  --jd-panel-border: rgba(43, 210, 255, 0.85);
}

html {
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'NotoSansThai', 'Kanit', sans-serif;
  color: #fff;
  overflow-x: hidden;
  /* padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); */
  /* background: var(--jd-navy); */
}

/* ชั้นที่ 1: พื้นหลัง (รักษา ratio ไม่ยืด) */
/* พื้นหลังหลังสุด ใช้ <img> แทน background-image */
.login-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  overflow: hidden;
}

.login-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 44%, rgba(0, 180, 255, 0.2), transparent 52%),
    linear-gradient(to bottom, rgba(2, 6, 18, 0.1), rgba(2, 6, 18, 0.35));
  pointer-events: none;
}

.login-bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* ชั้นที่ 2: ตัวละคร – ใช้ screen ให้พื้นดำของรูปโปร่ง ไม่เป็นกล่องดำ */
.login-char-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-char-img {
  width: 100%;
  height: 100%;
  max-height: 72vh;
  object-fit: contain;
  object-position: center;
}

/* โลโก้ – ใส่แค่ screen ให้ดำโปร่ง ไม่ใส่ filter เพื่อไม่ให้สีจาง */
.login-logo-layer {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(1.5rem, 5vw, 2.5rem) 1rem 0;
  pointer-events: none;
  box-sizing: border-box;
}

/* ชั้นที่ 3: ข้อความ + พาเนล (อยู่บนโลโก้) */
.login-page {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(8.5rem, 12vh, 11rem) 1rem clamp(3.2rem, 7.5vh, 6.5rem);
  background: transparent;
}

/* จองพื้นที่ header (ชั่วคราวไม่มีโลโก้ – ลดความสูง) */
.login-brand {
  position: relative;
  z-index: 1;
  text-align: center;
  margin-bottom: 1.5rem;
  background: none !important;
  padding: 0;
  min-height: 2rem;
}

.brand-jd {
  margin: 0;
  padding: 0;
  line-height: 0;
  background: none !important;
  border: none;
  box-shadow: none;
}

.brand-jd-blend {
  display: inline-block;
  line-height: 0;
  background: none !important;
}

/* โลโก้ – ไม่มี filter สีเต็ม มีแค่ screen ที่ layer แม่ให้ดำโปร่ง */
.brand-jd-img {
  display: block;
  width: min(56vw, 680px);
  max-width: 100%;
  height: auto;
}

/* ซ่อนเพราะโลโก้รูปมี JUSTICE DIVERS อยู่แล้ว */
.brand-tagline {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ตาม reference: พาเนล navy โปร่ง ขอบ + เรืองฟ้าไฟฟ้า */
.login-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: clamp(440px, 40vw, 620px);
  min-height: clamp(290px, 30vh, 340px);
  background: var(--jd-panel-bg);
  border: 1px solid var(--jd-panel-border);
  border-radius: clamp(15px, 1.5vw, 20px);
  padding: clamp(1.15rem, 1.4vw, 1.55rem) clamp(1.5rem, 2.2vw, 2.2rem) clamp(1.1rem, 1.3vw, 1.45rem);
  box-sizing: border-box;
  box-shadow:
    0 0 0 1px rgba(170, 243, 255, 0.12),
    0 18px 45px rgba(0, 0, 0, 0.38),
    0 0 30px var(--jd-cyan-soft),
    0 0 62px rgba(0, 212, 255, 0.12),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ตาม mock: หัวข้อกลาง พอดี */
.panel-title {
  margin: 0 0 0.6rem 0;
  text-align: center;
  line-height: 0;
}

.panel-title-img {
  display: block;
  width: 56%;
  max-width: 56%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

/* ปุ่ม FB / Google: แถวเดียวเต็มความกว้างพาเนล (100%) แบ่งซ้าย–ขวาเท่ากัน */
.login-actions {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  justify-content: center;
  gap: clamp(0.45rem, 1.3vw, 0.7rem);
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* ปุ่มโซเชียลใช้รูป – ครึ่งแถวต่อปุ่ม รวมแถว = 100% */
.btn-social {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  min-height: clamp(50px, 5.6vw, 60px);
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-social:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.btn-social:active { transform: translateY(0); }

.btn-social-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

/* ตาม mock: เส้นคั่น + "หรือ" กลาง */
.login-or {
  text-align: center;
  margin: clamp(0.4rem, 0.8vw, 0.6rem) 0;
  line-height: 0;
}

.login-or-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

/* ปุ่ม Guest: เต็มแนวคิดแบบ 100% แต่เว้นซ้าย–ขวาอย่างละ 20% (= กว้างปุ่ม 60% กลาง) */
.btn-guest {
  width: 58%;
  max-width: 58%;
  min-height: clamp(44px, 5vh, 52px);
  margin-left: 21%;
  margin-right: 21%;
  padding: clamp(0.4rem, 0.8vw, 0.55rem) 0.5rem;
  border: none;
  border-radius: clamp(10px, 1vw, 12px);
  background-color: transparent;
  background-image: url('btn-guest.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.15s;
  display: block;
  box-sizing: border-box;
}

.btn-guest:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* นโยบายความเป็นส่วนตัว – ตัวอักษร/รูปเล็กลง */
.login-legal {
  margin: clamp(0.5rem, 0.75vw, 0.65rem) 0 0 0;
  text-align: center;
  line-height: 1.35;
  font-size: clamp(0.6rem, 2.4vw, 0.72rem);
  color: rgba(255, 255, 255, 0.85);
}

.login-legal a {
  display: inline-block;
  /* ขยายพื้นที่กด (hit area) ให้ ≥44px แนวตั้ง โดยไม่ขยับตำแหน่งภาพที่มองเห็น */
  padding: 0.65rem 0.4rem;
  margin: -0.65rem -0.4rem;
  color: var(--jd-cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
  vertical-align: middle;
}

.login-legal a:hover {
  opacity: 0.9;
}

.btn-social:focus-visible,
.btn-guest:focus-visible,
.login-legal a:focus-visible {
  outline: 2px solid #7ce9ff;
  outline-offset: 2px;
  border-radius: 10px;
}

.login-legal-img {
  display: block;
  width: auto;
  max-width: min(72%, 240px);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  object-position: center;
}

/* ========== Responsive: มือถือ / แท็บเล็ต / แนวตั้ง–แนวนอน ========== */

/* มือถือ / แท็บเล็ก (≤768px): แถวเดียวเต็มความกว้าง ปรับ gap / ความสูง */
@media (max-width: 768px) {
  .login-actions {
    flex-direction: row;
    gap: clamp(0.3rem, 2vw, 0.55rem);
  }

  .btn-social {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: clamp(44px, 11vw, 52px);
  }

  .btn-social-img {
    max-height: 100%;
  }
}

/* มือถือ แนวตั้ง (portrait) */
@media (max-width: 480px) {
  .login-page {
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) 0.75rem max(1rem, env(safe-area-inset-bottom));
  }

  .login-brand {
    min-height: clamp(80px, 20vw, 120px);
    margin-bottom: 1rem;
  }

  .login-logo-layer {
    padding: clamp(0.75rem, 3vw, 1rem) 0.5rem 0;
  }

  .login-panel {
    max-width: 100%;
    padding: 1rem 1rem 1.15rem;
    border-radius: 12px;
  }

  .panel-title { margin-bottom: 0.5rem; }

  .login-actions {
    gap: 0.4rem;
  }

  .btn-social {
    min-height: 48px;
  }

  .btn-social-img {
    max-height: 90%;
  }

  .login-or { margin: 0.4rem 0; }

  .btn-guest {
    width: 62%;
    max-width: 62%;
    margin-left: 19%;
    margin-right: 19%;
    min-height: 48px;
  }

  .login-legal { margin-top: 0.45rem; }

  .panel-title-img,
  .login-or-img {
    max-width: 100%;
  }

  .login-legal-img {
    max-width: min(68%, 200px);
  }

  .login-char-img {
    max-height: 85vh;
  }
}

/* มือถือ แนวนอน (landscape) – พาเนลกะทัดรัด ปุ่ม FB+Google แถวเดียวเต็มความกว้าง */
@media (max-width: 932px) and (orientation: landscape) {
  html,
  body {
    background: #020612;
    width: 100%;
    max-width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body {
    position: fixed;
    inset: 0;
    overflow: hidden;
  }

  /* บังคับพื้นหลังเต็มจอ — กันขอบขาวซ้าย/ขวาจาก safe-area / visual viewport */
  .login-bg {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100vw;
    width: 100dvw;
    min-width: 100%;
    height: 100vh;
    height: 100dvh;
    height: 100svh;
  }

  .login-bg-img {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center center;
    /* ขยายเล็กน้อยกันช่องว่างขอบจอ / safe-area */
    transform: scale(1.06);
    transform-origin: center center;
  }

  .login-page {
    padding: max(0.35rem, env(safe-area-inset-top)) 0.75rem max(0.35rem, env(safe-area-inset-bottom));
    height: 100vh;
    height: 100dvh;
    height: 100svh;
    min-height: 0;
    justify-content: center;
    align-items: center;
    /* หน้า Login แนวนอนต้องอยู่ในหนึ่ง viewport: ไม่ให้ปัดเลื่อนเนื้อหาขึ้น-ลง */
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
  }

  /* ป้องกันนิ้วปัดบนกล่อง Login แล้วทำให้ viewport ขยับ แต่ยังแตะปุ่มได้ตามปกติ */
  .login-panel {
    touch-action: none;
  }

  .login-brand {
    min-height: clamp(40px, 12vh, 72px);
    margin-bottom: 0.35rem;
  }

  .login-logo-layer {
    overflow: hidden;
    /* ดึงโลโก้ห่างจากขอบบน: safe-area + ระยะ breath */
    padding: max(0.75rem, calc(env(safe-area-inset-top, 0px) + 0.45rem)) max(0.5rem, env(safe-area-inset-right)) 0 max(0.5rem, env(safe-area-inset-left));
    align-items: flex-start;
  }

  .login-logo-layer .brand-jd-img {
    /* +20% จากค่าเดิม (68vw / 10dvh / 48px) */
    max-width: min(81.6vw, calc(100vw - 1rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    max-height: min(12dvh, 12svh, 57.6px);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center top;
    margin: 0 auto;
  }

  .login-panel {
    max-width: min(360px, 88vw);
    width: 100%;
    min-height: 0;
    padding: 0.65rem 1rem 0.75rem;
    margin: 0 auto;
  }

  .panel-title { margin-bottom: 0.35rem; }

  .panel-title-img {
    max-width: 55%;
  }

  .login-actions {
    flex-direction: row;
    align-items: stretch;
    gap: 0.35rem;
  }

  .btn-social {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    min-height: 44px;
  }

  .btn-social-img {
    max-height: 90%;
  }

  .login-or { margin: 0.25rem 0; }

  .btn-guest {
    width: 62%;
    max-width: 62%;
    min-height: 44px;
    margin-left: 19%;
    margin-right: 19%;
  }

  .login-legal {
    margin-top: 0.3rem;
    font-size: clamp(0.52rem, 1.8vh, 0.62rem);
  }

  .login-legal-img {
    max-width: min(65%, 180px);
  }

  .login-char-img {
    max-height: min(58vh, 100dvh - 120px);
    object-position: center bottom;
  }
}

/* แนวนอนจอเตี้ย (มือถือ/แท็บกว้าง): จำกัดโลโก้ไม่ล้นซ้าย–ขวา */
@media (orientation: landscape) and (max-height: 520px) {
  html,
  body {
    background: #020612;
  }

  .login-bg {
    width: 100vw;
    width: 100dvw;
    min-width: 100%;
    height: 100vh;
    height: 100dvh;
    height: 100svh;
  }

  .login-bg-img {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center center;
    transform: scale(1.06);
    transform-origin: center center;
  }

  .login-logo-layer {
    overflow: hidden;
    padding: max(0.75rem, calc(env(safe-area-inset-top, 0px) + 0.45rem)) max(0.5rem, env(safe-area-inset-right)) 0 max(0.5rem, env(safe-area-inset-left));
  }

  .login-logo-layer .brand-jd-img {
    /* +20% จากค่าเดิม (65vw / 10dvh / 50px) */
    max-width: min(78vw, calc(100vw - 1rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px)));
    max-height: min(12dvh, 12svh, 60px);
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center top;
    margin: 0 auto;
  }
}

/* แท็บเล็ต แนวตั้ง */
@media (min-width: 481px) and (max-width: 768px) {
  .login-page {
    padding: 1.5rem 1rem;
  }

  .login-panel {
    max-width: 400px;
  }

  .login-actions {
    width: 100%;
  }

  .panel-title-img,
  .login-or-img {
    max-width: 340px;
  }

  .login-legal-img {
    max-width: min(70%, 210px);
  }

  .btn-guest {
    width: 62%;
    max-width: 62%;
    margin-left: 19%;
    margin-right: 19%;
  }

  .login-char-img {
    max-height: 78vh;
  }
}

/* แท็บเล็ต แนวนอน */
@media (min-width: 769px) and (max-width: 1024px) {
  .login-panel {
    max-width: 460px;
  }

  .login-actions {
    width: 100%;
  }

  .panel-title-img,
  .login-or-img {
    max-width: 360px;
  }

  .login-legal-img {
    max-width: min(72%, 220px);
  }

  .btn-guest {
    width: 62%;
    max-width: 62%;
    margin-left: 19%;
    margin-right: 19%;
  }
}

/* จอเล็กมาก – แถวเดียวคงไว้ ลดช่องว่างระหว่างปุ่ม */
@media (max-width: 360px) {
  .login-panel {
    padding: 1rem 0.75rem;
  }

  .login-actions {
    flex-direction: row;
    gap: 0.28rem;
  }

  .btn-social {
    flex: 1 1 0;
    min-width: 0;
  }

  .btn-social-img {
    max-height: 44px;
  }
}

/* อุปกรณ์จอสัมผัสแนวนอน (มือถือและแท็บเล็ต): ล็อกหน้า Login ไม่ให้ปัดเลื่อนหรือ bounce */
@media (orientation: landscape) and (hover: none) and (pointer: coarse) {
  html,
  body {
    width: 100%;
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body {
    position: fixed;
    inset: 0;
  }

  .login-page {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: none;
  }

  .login-panel {
    touch-action: none;
  }
}

/* ==========================================================================
   [2026-08-04] แนวนอนจอเตี้ย — ครอบคลุมย่านจอกว้างเกิน 932px ด้วย
   --------------------------------------------------------------------------
   บล็อก @media (max-width: 932px) and (orientation: landscape) จัดหน้านี้ไว้ดีแล้ว
   (ลด padding บนของ .login-page จาก clamp(8.5rem,12vh,11rem) เหลือ 0.35rem
   แล้วให้สูงเท่า 100svh) แต่มันไม่ทำงานเลยถ้าจอกว้างเกิน 932px
   ส่วนบล็อก (orientation: landscape) and (max-height: 520px) แตะแค่พื้นหลังกับโลโก้
   ไม่เคยแตะ padding ของ .login-page

   ผลคือย่านจอกว้างแต่เตี้ย (Android DPR ต่ำ / หน้าต่างเบราว์เซอร์เตี้ย) ได้
   padding บนแบบเดสก์ท็อป 136–176px บนจอสูง 420px วัดได้ .login-page สูง 534px
   ล้นจอ 114px ⇒ ปุ่ม Guest ตกใต้ขอบจอ 15px และลิงก์นโยบาย 55px
   ยิ่งบล็อก (hover:none)(pointer:coarse) ตั้ง overflow:hidden ไว้ ของที่ล้นจะถูก
   ตัดทิ้งไปเลยบนมือถือจริง แทนที่จะเลื่อนลงไปกดได้

   วางไว้ท้ายไฟล์เพราะต้องชนะบล็อกแท็บเล็ต @media (min-width:769px) and
   (max-width:1024px) ที่อยู่หลังบล็อก 932px และรั่วเข้ามาในแนวนอนด้วย
   (ทำให้ .login-panel กว้าง 460px แทน 360px ที่ 780×304 และ 1024×455)
   ========================================================================== */
@media (orientation: landscape) and (max-height: 620px) {
  html,
  body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body { position: fixed; inset: 0; }

  .login-page {
    height: 100vh;
    height: 100dvh;
    height: 100svh;
    min-height: 0;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: max(0.35rem, env(safe-area-inset-top)) 0.75rem max(0.35rem, env(safe-area-inset-bottom));
  }

  .login-brand {
    min-height: clamp(26px, 9svh, 72px);
    margin-bottom: clamp(2px, 0.8svh, 8px);
  }

  .login-panel {
    max-width: min(360px, 88vw);
    width: 100%;
    min-height: 0;
    margin: 0 auto;
    padding: clamp(4px, 1.6svh, 12px) clamp(8px, 2.4vw, 16px) clamp(5px, 1.8svh, 14px);
  }

  .login-actions {
    flex-direction: row;
    align-items: stretch;
    gap: clamp(3px, 1svh, 8px);
  }

  /* ปุ่มโตตามแกนสั้นแต่ไม่ต่ำกว่าพื้นเป้าสัมผัส — เดิมค้างที่ 44px ทุกขนาดจอ
     (จอสูง 480px ก็ยังได้ปุ่มเท่าจอสูง 262px) */
  .btn-social,
  .btn-guest {
    height: clamp(44px, 13svh, 78px);
    min-height: 44px;
  }

  .btn-social {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
  }

  .btn-guest {
    width: 62%;
    max-width: 62%;
    margin-left: 19%;
    margin-right: 19%;
  }

  .login-or { margin: clamp(1px, 0.6svh, 5px) 0; }

  .login-legal { margin-top: clamp(2px, 0.8svh, 6px); }

  /* ลิงก์นโยบายวัดได้ 41–42px — ต่ำกว่าพื้นเป้าสัมผัสอยู่ 2–3px */
  .login-legal a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }

  .login-char-img {
    max-height: min(58svh, calc(100dvh - 120px));
    object-position: center bottom;
  }
}

/* ==========================================================================
   [2026-08-06] Task 1 — popup สไตล์เกมแทน jdAlert (SweetAlert2) สำหรับข้อความ
   "ยังไม่ได้ตั้งค่า Facebook/Google App" — ใช้เฟรม panel-bg.png (739x455) +
   ปุ่ม host-console-cf.webp (350x129, มีคำว่า "ยืนยัน" ฝังอยู่ในรูปแล้ว)
   สร้าง/ควบคุมจาก Login/login.js ฟังก์ชัน jdLoginPanelAlert()
   ========================================================================== */
.jd-login-alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 10500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.jd-login-alert-overlay.is-hidden {
  display: none !important;
}

.jd-login-alert-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 18, 0.78);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

/* aspect-ratio ตรงกับ panel-bg.png (739x455) เป๊ะ ๆ — กันภาพยืด/บี้ */
.jd-login-alert-panel {
  position: relative;
  z-index: 1;
  width: min(92vw, 460px, calc(78svh * 1.6242));
  aspect-ratio: 739 / 455;
}

.jd-login-alert-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
}

.jd-login-alert-content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.4rem, 1.4svh, 0.85rem);
  padding: clamp(10px, 4svh, 26px) clamp(16px, 8%, 40px);
  text-align: center;
  font-family: 'NotoSansThai', 'Kanit', sans-serif;
}

.jd-login-alert-title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1rem, 2.6vw, 1.35rem);
  color: #7ce9ff;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.55);
}

.jd-login-alert-message {
  margin: 0;
  font-size: clamp(0.82rem, 2vw, 1rem);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.45;
}

.jd-login-alert-ok {
  border: none;
  background: transparent;
  padding: 0;
  margin-top: clamp(0.15rem, 1svh, 0.5rem);
  cursor: pointer;
  width: clamp(140px, 42%, 210px);
  aspect-ratio: 350 / 129;
  min-height: 44px;
  display: block;
  transition: transform 0.15s, opacity 0.15s;
}

.jd-login-alert-ok:hover {
  transform: translateY(-2px);
  opacity: 0.95;
}

.jd-login-alert-ok:active {
  transform: translateY(0);
}

.jd-login-alert-ok img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.jd-login-alert-ok:focus-visible {
  outline: 2px solid #7ce9ff;
  outline-offset: 3px;
  border-radius: 10px;
}
