/* HEADFACE STUDY - หน้าต่าง "ตั้งค่าระบบ" (js/study-settings.js)
   เนื้อหาเหมือนหน้าต่างตั้งค่าของเว็บหลัก (แจ้งเตือน LINE / การชำระเงิน / ติดตั้งแอป / การแสดงผล) ใช้ร่วมกับ css/style.css
   ตัวอักษร >= 12px, ปุ่มสูง >= 44px; ธีมมืดสร้างจากไฟล์นี้โดย scripts/gen-dark-css.mjs */

.st-modal { position: fixed; inset: 0; z-index: 110; display: none; align-items: center; justify-content: center; padding: 16px; }
.st-modal.is-open { display: flex; }
.st-back { position: absolute; inset: 0; background: rgba(15, 23, 42, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity .3s; }
.st-card { position: relative; z-index: 1; display: flex; flex-direction: column; width: 100%; max-width: 24rem; max-height: 85vh; overflow: hidden; background: #fff; border-radius: 24px; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); transform: scale(.95); opacity: 0; transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .3s; }
.st-modal.is-shown .st-back { opacity: 1; }
.st-modal.is-shown .st-card { transform: none; opacity: 1; }

.st-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 18px; background: #F8FAFC; border-bottom: 1px solid #F1F5F9; }
.st-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-title-ic { flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #E2E8F0; color: #475569; }
.st-title h2 { margin: 0; font-size: 17px; line-height: 24px; font-weight: 700; letter-spacing: -.01em; color: #1E293B; }
.st-x { flex: none; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid #F1F5F9; border-radius: 50%; background: #fff; color: #64748B; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); cursor: pointer; }
.st-x:hover { background: #F1F5F9; color: #475569; }

.st-body { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; }
.st-sec { margin-bottom: 22px; }
.st-sec:last-child { margin-bottom: 4px; }
.st-sec[hidden] { display: none; }
.st-h3 { margin: 0 0 10px 4px; font-size: 12px; line-height: 18px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #047857; }
.st-sec.is-plain .st-h3 { color: #64748B; }

.st-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 56px; padding: 12px 14px; text-align: left; background: #F8FAFC; border: 1px solid #F1F5F9; border-radius: 14px; color: inherit; text-decoration: none; cursor: pointer; transition: border-color .2s; }
.st-link:hover, .st-link:focus-visible { border-color: #6EE7B7; }
.st-link-t { min-width: 0; }
.st-link-t b { display: block; font-size: 13px; line-height: 20px; font-weight: 700; color: #334155; }
.st-link-t span { display: block; margin-top: 2px; font-size: 12px; line-height: 18px; color: #64748B; }
.st-go { flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #fff; border: 1px solid #E2E8F0; color: #94A3B8; box-shadow: 0 1px 2px rgba(15, 23, 42, .06); }
.st-install-btn { flex: none; min-height: 36px; padding: 0 14px; border-radius: 10px; background: #047857; color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; }
.st-steps { margin: 10px 0 0; padding: 12px 14px 12px 32px; border-radius: 14px; background: #ECFDF5; border: 1px solid #A7F3D0; color: #065F46; font-size: 13px; line-height: 22px; }
.st-steps[hidden] { display: none; }
.st-steps li + li { margin-top: 2px; }

/* ตัวเลือกธีม (ตามเครื่อง / สว่าง / มืด) */
.st-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border: 1px solid #E2E8F0; border-radius: 14px; background: #F1F5F9; }
.st-seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 6px 4px; border: 0; border-radius: 10px; background: transparent; color: #64748B; font: inherit; font-size: 13px; font-weight: 700; line-height: 1.2; cursor: pointer; }
.st-seg button svg { flex: none; }
.st-seg button[aria-checked="true"] { background: #fff; color: #047857; box-shadow: 0 1px 3px rgba(15, 23, 42, .15); }
.st-note { margin: 8px 0 0 4px; font-size: 12px; line-height: 18px; color: #64748B; }

html.st-lock, html.st-lock body { overflow: hidden; }
@media (prefers-reduced-motion: reduce) { .st-back, .st-card { transition: none; } }
