/* วิธีเชื่อม Google Authenticator แบบมีภาพของ Healthy (2fa-help-guide.js · 11 พ.ย. 2569)
   คัดลอกจาก Organize apps/organize-v3/public/styles/2fa-help.css แล้วเปลี่ยนสีน้ำเงินเป็นเขียวของ Healthy และไอคอนชุด Rounded */
.tfa-guide-open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 16px;
  border: 1px solid #b9d6c5;
  border-radius: 12px;
  background: #eef6f1;
  color: #194e31;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.tfa-guide-open:hover,
.tfa-guide-open:focus-visible {
  border-color: #194e31;
  background: #e1efe7;
}
.tfa-guide-open .material-symbols-rounded {
  font-size: 1.25rem;
}
.tg-dialog {
  box-sizing: border-box;
  width: min(880px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: #ffffff;
  color: #203b35;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.28);
}
.tg-dialog[open] {
  display: flex;
  flex-direction: column;
}
.tg-dialog::backdrop {
  background: rgba(16, 24, 40, 0.5);
}
.tg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 12px 20px;
  border-bottom: 1px solid #e2ece6;
}
.tg-head h2 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.35;
}
.tg-close {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #475467;
  cursor: pointer;
}
.tg-close:hover,
.tg-close:focus-visible {
  background: #f2f4f7;
}
/* ขั้นตอนใหญ่ เลื่อนทีละขั้น (เจ้าของระบบ 10 พ.ย. 2569: เอาแถบหัวข้อออก)
   แถบขั้นด้านบน → ขั้นที่เลื่อนซ้ายขวา (ปัดนิ้วได้ · scroll-snap) → ปุ่มย้อนกลับ/ถัดไปด้านล่าง
   หน้าต่างสูงคงที่ เนื้อหายาวเลื่อนขึ้นลงในขั้นนั้นเอง */
.tg-dialog[open] {
  height: min(820px, calc(100dvh - 24px));
}
.tg-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.tg {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-height: 0;
}
.tg-rail {
  flex: none;
  border-bottom: 1px solid #e2ece6;
}
.tg-rail ol {
  display: grid;
  grid-auto-columns: minmax(84px, 1fr);
  grid-auto-flow: column;
  margin: 0;
  padding: 12px 12px 8px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: none;
}
.tg-rail ol::-webkit-scrollbar {
  display: none;
}
.tg-rail li {
  position: relative;
  display: flex;
  justify-content: center;
}
/* เส้นต่อระหว่างวงขั้น */
.tg-rail li + li::before {
  position: absolute;
  top: 21px;
  right: calc(50% + 24px);
  left: calc(-50% + 24px);
  height: 2px;
  border-radius: 2px;
  background: #d5e2dc;
  content: '';
}
.tg-rail li:has(.tg-dot.is-done, .tg-dot[aria-current]) + li::before {
  background: #1f6b45;
}
.tg-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 44px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: #667085;
  font: inherit;
  cursor: pointer;
}
.tg-dot-n {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px solid #d5e2dc;
  border-radius: 50%;
  background: #ffffff;
  color: #667085;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.2s;
}
.tg-dot-n .material-symbols-rounded {
  font-size: 1.3rem;
}
.tg-dot-label {
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}
.tg-dot.is-done .tg-dot-n {
  border-color: #1f6b45;
  background: #eef6f1;
  color: #1f6b45;
}
.tg-dot[aria-current] {
  color: #1f6b45;
}
.tg-dot[aria-current] .tg-dot-n {
  border-color: #1f6b45;
  background: #1f6b45;
  color: #ffffff;
  transform: scale(1.08);
}
.tg-dot[aria-current] .tg-dot-label {
  font-weight: 800;
}
.tg-dot:hover .tg-dot-n,
.tg-dot:focus-visible .tg-dot-n {
  border-color: #1f6b45;
}
.tg-dot:focus-visible {
  outline: none;
}
.tg-dot:focus-visible .tg-dot-n {
  box-shadow: 0 0 0 3px #b2d8c2;
}
.tg-bar {
  height: 3px;
  background: #eef5f1;
}
.tg-bar span {
  display: block;
  width: 0;
  height: 100%;
  background: #1f6b45;
  transition: width 0.3s;
}
/* ขั้นเรียงแนวนอน ปัดนิ้ว/กดปุ่มแล้วหยุดพอดีทีละขั้น */
.tg-track {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.tg-track::-webkit-scrollbar {
  display: none;
}
.tg-slide {
  box-sizing: border-box;
  flex: 0 0 100%;
  min-width: 0;
  padding: 18px 24px 24px;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.tg-kicker {
  margin: 0 0 2px;
  color: #1f6b45;
  font-size: 0.9rem;
  font-weight: 800;
}
.tg-kicker span {
  color: #98a2b3;
  font-weight: 600;
}
.tg-slide h3 {
  margin: 0 0 14px;
  color: #203b35;
  font-size: 1.35rem;
  line-height: 1.35;
}
.tg-foot {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  border-top: 1px solid #e2ece6;
  background: #ffffff;
}
.tg-count {
  margin: 0;
  color: #475467;
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.tg-prev,
.tg-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.tg-prev {
  border: 1px solid #d5e2dc;
  background: #ffffff;
  color: #344054;
}
.tg-prev:disabled {
  visibility: hidden;
}
.tg-next {
  border: 1px solid #1f6b45;
  background: #1f6b45;
  color: #ffffff;
}
.tg-prev:hover,
.tg-prev:focus-visible {
  border-color: #1f6b45;
  background: #eef6f1;
}
.tg-next:hover,
.tg-next:focus-visible {
  border-color: #123d26;
  background: #123d26;
}
.tg-prev .material-symbols-rounded,
.tg-next .material-symbols-rounded {
  font-size: 1.2rem;
}
/* กรณีอื่น: หัวข้อพับได้ในขั้นสุดท้าย */
.tg-mores {
  display: grid;
  gap: 10px;
}
.tg-more {
  border: 1px solid #e2ece6;
  border-radius: 14px;
  background: #fbfdfc;
}
.tg-more summary {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 6px 14px;
  color: #203b35;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}
.tg-more summary::-webkit-details-marker {
  display: none;
}
.tg-more summary > span:not(.material-symbols-rounded) {
  flex: 1;
}
.tg-more summary .material-symbols-rounded:first-child {
  color: #1f6b45;
}
.tg-more summary .material-symbols-rounded:last-child {
  color: #667085;
  transition: transform 0.2s;
}
.tg-more[open] summary .material-symbols-rounded:last-child {
  transform: rotate(180deg);
}
.tg-more-body {
  padding: 0 14px 16px;
}
@media (prefers-reduced-motion: reduce) {
  .tg-dot-n,
  .tg-bar span,
  .tg-more summary .material-symbols-rounded:last-child {
    transition: none;
  }
}
.tg-shot {
  margin: 0;
  overflow: hidden;
  border: 1px solid #d5e2dc;
  border-radius: 12px;
  background: #eef5f1;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.06);
}
/* ภาพจอคอมเต็มกว้าง ไม่เกินขนาดจริง · ภาพจอมือถือกว้างไม่เกิน 360px ไม่ยืดจนแตก */
/* ภาพกว้างไม่เกิน 80% ของพื้นที่ (เจ้าของระบบ 10 พ.ย. 2569) เยื้องตรงกับข้อความหลังเลขข้อ */
.tg-shot {
  margin-left: 38px;
}
.tg-shot:not(.is-phone) {
  max-width: min(80%, 680px);
}
.tg-shot.is-phone {
  max-width: min(80%, 320px);
}
.tg-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.tg-steps {
  display: grid;
  gap: 16px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.tg-steps:last-child {
  margin-bottom: 0;
}
.tg-steps li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  line-height: 1.55;
}
/* วงกลมแดงเลขขาว แบบเดียวกับในภาพ */
.tg-n {
  display: inline-grid;
  flex: none;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #e11d2e;
  box-shadow: 0 1px 4px rgba(225, 29, 46, 0.35);
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
}
.tg-text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 8px;
  min-width: 0;
  padding-top: 1px;
}
/* ป้ายทำบนคอม / มือถือ */
.tg-dev {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 3px;
  padding: 1px 8px 1px 6px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
}
.tg-dev .material-symbols-rounded {
  font-size: 1rem;
}
.tg-dev.is-pc {
  background: #e0efe6;
  color: #174b30;
}
.tg-dev.is-m {
  background: #dff4e6;
  color: #13603a;
}
.tg-key {
  display: inline;
  padding: 0 6px;
  border: 1px solid #b9d6c5;
  border-radius: 6px;
  background: #eef6f1;
  color: #194e31;
  font-weight: 700;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.tg-lead,
.tg-note {
  margin: 0 0 10px;
  color: #475467;
  font-size: 0.94rem;
  line-height: 1.6;
}
.tg > .tg-lead {
  margin: 0;
}
.tg-lead .tg-dev {
  vertical-align: 1px;
}
.tg-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 14px;
}
.tg-note .material-symbols-rounded {
  flex: none;
  font-size: 1.15rem;
  line-height: 1.4;
}
.tg-note.is-warn {
  padding: 8px 12px;
  border-radius: 10px;
  background: #fff6e0;
  color: #7a4b00;
}
.tg-faq {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  line-height: 1.6;
}
@media (max-width: 640px) {
  .tg-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
    border-radius: 14px;
  }
  .tg-dialog[open] {
    height: calc(100dvh - 12px);
  }
  .tg-head {
    padding: 8px 8px 8px 14px;
  }
  /* มือถือ: แถบขั้นเหลือแต่วง ชื่อขั้นอยู่หัวข้อในขั้นแทน · ภาพเต็มกว้าง */
  .tg-rail ol {
    grid-auto-columns: minmax(44px, 1fr);
    padding: 10px 8px 8px;
  }
  .tg-rail li + li::before {
    top: 17px;
    right: calc(50% + 19px);
    left: calc(-50% + 19px);
  }
  .tg-dot-n {
    width: 34px;
    height: 34px;
  }
  .tg-dot-n .material-symbols-rounded {
    font-size: 1.1rem;
  }
  .tg-dot-label {
    display: none;
  }
  .tg-slide {
    padding: 14px 14px 20px;
  }
  .tg-slide h3 {
    font-size: 1.2rem;
  }
  .tg-shot,
  .tg-shot:not(.is-phone) {
    max-width: 100%;
    margin-left: 0;
  }
  .tg-foot {
    padding-right: 12px;
    padding-left: 12px;
  }
  .tg-prev {
    padding: 0 12px;
  }
}
/* ข้อความก่อน → "ดังภาพ" → ภาพ · แต่ละช่วงคั่นเส้นประและเว้นระยะกว้าง (เจ้าของระบบ 10 พ.ย. 2569) */
.tg-group {
  padding: 18px 0 22px;
  border-top: 1px dashed #c9dbd1;
}
.tg-slide h3 + .tg-group,
.tg-lead + .tg-group,
.tg-more-body > .tg-group:first-child {
  padding-top: 6px;
  border-top: 0;
}
.tg-group:last-child {
  padding-bottom: 0;
}
.tg-group > .tg-steps:last-child {
  margin-bottom: 0;
}
.tg-see {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 8px 38px;
  color: #475467;
  font-size: 0.9rem;
  font-weight: 700;
}
.tg-see .material-symbols-rounded {
  font-size: 1.1rem;
}
.tg-group > .tg-note {
  margin: 12px 0 0;
}
@media (max-width: 640px) {
  .tg-see {
    margin-left: 0;
  }
}
