@charset "utf-8";
/* CSS Document */
:root {
  --overlay-bg: rgba(0, 0, 0, 0.45);
  --modal-bg: #fff;
  --radius: 12px;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', 'Helvetica Neue', Arial;
}

/* พื้นหลังมืด */
.overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  visibility: hidden;
  opacity: 0;
  transition: opacity .25s ease, visibility .25s;
  z-index: 9999;
}

.overlay.show {
  background: var(--overlay-bg);
  visibility: visible;
  opacity: 1;
}

/* กล่อง popup */
.modal {
  width: min(92%, 640px);
  height: 80vh;
  background: var(--modal-bg);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
  transform: translateY(12px) scale(.995);
  opacity: 0;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.overlay.show .modal {
  transform: none;
  opacity: 1;
}

/* ปุ่มปิดมุมขวา */
.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  color: #666;
}

.close-btn:hover {
  color: #000;
}

/* แสดง Qs.html ใน iframe */
iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
}

