/* =====================================================================
   登入後引導彈窗（change patient-post-login-guidance-and-line-fork；tpl/patient/_guidance-modal.php）
   - 只 scope 在 .patient-layout（首頁 list.php 載入；不影響同意頁的 .pc-modal）。
   - 視覺語彙沿用同意頁 .pc-modal（白卡、18px 圓角、深色遮罩）＋首頁待辦卡的琥珀色（bind 類）。
   - 高齡友善：按鈕最小高 52px、正文 18px×--aidr-fz 管道、主鈕滿版。
   - 沒有 .open 時整個窗 display:none：沒有 JS 也不會擋住頁面。
   ===================================================================== */
.patient-layout .pgm-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.55);
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.patient-layout .pgm-backdrop.open {
  display: flex;
}
.patient-layout .pgm-card {
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  padding: 24px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}
.patient-layout .pgm-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  background: #FEF7E6;
  color: #B0740F;
  display: grid;
  place-items: center;
  font-size: calc(24px * var(--aidr-fz, 1));
  line-height: 1.4; /* grid 置中，不靠行高；≥1.3 避開字級治理的緊湊行高登記 */
}
.patient-layout .pgm-title {
  margin: 0;
  color: var(--color-patient-primary, #2E6B57);
  font-size: calc(22px * var(--aidr-fz, 1));
  line-height: 1.4;
  font-weight: 800;
}
.patient-layout .pgm-text {
  margin: 0;
  color: #16202c;
  font-size: calc(18px * var(--aidr-fz, 1));
  line-height: 1.7;
}
.patient-layout .pgm-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 1.5px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: calc(18px * var(--aidr-fz, 1));
  line-height: 1.3;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}
.patient-layout .pgm-btn[disabled] {
  opacity: 0.6;
  cursor: default;
}
/* backup 變體在不支援快速登入的瀏覽器藏主鈕（guide-line-patients-to-passkey）：上面 display:flex 會蓋掉 hidden 屬性，要明寫 */
.patient-layout .pgm-btn[hidden] {
  display: none;
}
.patient-layout .pgm-form {
  margin: 0;
}
.patient-layout .pgm-primary {
  background: var(--color-patient-primary, #2E6B57);
  color: #fff;
}
.patient-layout .pgm-primary:hover,
.patient-layout .pgm-primary:focus-visible {
  background: var(--color-patient-primary-hover, #27604E);
}
.patient-layout .pgm-later {
  background: #fff;
  color: var(--color-patient-primary, #2E6B57);
  border-color: var(--color-patient-primary, #2E6B57);
}
.patient-layout .pgm-never {
  min-height: 44px;
  background: transparent;
  color: #6B7280;
  font-size: calc(16px * var(--aidr-fz, 1));
  line-height: 1.3;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 4px;
}
/* gate 變體（intercept-gated-features-with-profile-prompt D7）：缺項清單＋只關窗的取消鈕；只加兩組規則，不另起檔 */
.patient-layout .pgm-list {
  margin: 0;
  padding: 0 0 0 calc(24px * var(--aidr-fz, 1));
  text-align: left;
  list-style: disc;
  color: #16202c;
  font-size: calc(18px * var(--aidr-fz, 1));
  line-height: 1.7;
  font-weight: 700;
}
.patient-layout .pgm-cancel {
  min-height: 52px;
  background: #fff;
  color: var(--color-patient-primary, #2E6B57);
  border-color: var(--color-patient-primary, #2E6B57);
}
.patient-layout .pgm-btn:focus-visible {
  outline: 3px solid #B0740F;
  outline-offset: 2px;
}
.patient-layout .pgm-error {
  margin: 0;
  color: #B42318;
  font-size: calc(16px * var(--aidr-fz, 1));
  line-height: 1.5;
  font-weight: 700;
}
