/* หน้าต่างตั้งค่าเสียง (app/js/vidudabha-sound.js) — เพลงประกอบ · เสียงเอฟเฟกต์ · เสียงพากย์ · ปิดเสียงทั้งหมด
   แถว = กรอบรอบทั้งแถว (ไม่มีแถบสีขอบซ้าย) · สวิตช์มีข้อความ เปิด/ปิด กำกับ */
html.vds-open, html.vds-open body { overflow: hidden; }
.vds { position: fixed; inset: 0; z-index: 2500; font-family: "Sarabun", system-ui, sans-serif; color: #2b1a0e; }
.vds[hidden] { display: none; }
.vds-back { position: absolute; inset: 0; background: rgba(28, 20, 16, .6); }
.vds-panel { box-sizing: border-box; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(460px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow-y: auto;
	display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 14px; border-radius: 22px; border: 4px solid #8a5a2b; background: #fff8e7;
	box-shadow: 0 8px 0 #5e3a17, 0 24px 50px rgba(0, 0, 0, .45); }
.vds-panel.is-new { animation: vdsIn .18s ease-out; }
@keyframes vdsIn { from { opacity: 0; margin-top: 14px; } to { opacity: 1; margin-top: 0; } }
.vds-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vds-h b { display: inline-flex; align-items: center; gap: 8px; font-size: 21px; color: #5e3a17; }
.vds-close { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 2px solid #ead7ab; background: #fff;
	color: #5e3a17; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.vds-close:hover { background: #fff3c4; }
.vds-row { padding: 10px 12px; border-radius: 16px; border: 2px solid #ead7ab; background: #fff; display: grid; gap: 8px; transition: opacity .15s; }
.vds-row.is-off .vds-vol { opacity: .45; }
.vds-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vds-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.vds-l > i { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #f6e7c4; color: #8a5a2b; font-size: 16px; }
.vds-l span { display: flex; flex-direction: column; min-width: 0; }
.vds-l b { font-size: 17px; }
.vds-l small { font-size: 13px; color: #5b5249; line-height: 1.35; }
.vds-sw { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 3px 12px 3px 4px; border-radius: 999px; border: 2px solid #c9b48a; background: #f1ead8;
	color: #5b5249; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; }
.vds-sw i { width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.vds-sw.is-on { background: #15803d; border-color: #126b33; color: #fff; flex-direction: row-reverse; padding: 3px 4px 3px 12px; }
.vds-sw:disabled { opacity: .5; cursor: default; }
.vds-vol { display: flex; align-items: center; gap: 10px; }
.vds-vol > i { color: #8a5a2b; }
.vds-vol input[type="range"] { flex: 1; min-width: 0; accent-color: #c98a0e; height: 28px; cursor: pointer; }
.vds-vol input[type="range"]:disabled { cursor: default; }
.vds-vol output { flex: none; min-width: 44px; text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; color: #5e3a17; }
.vds-test { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 2px solid #ead7ab; background: #fff;
	color: #5e3a17; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.vds-test:hover { background: #fff3c4; }
.vds-test:disabled { opacity: .5; cursor: default; }
.vds-all { display: flex; justify-content: center; padding-top: 4px; }
.vds-mute { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: 999px; border: 2px solid #8a5a2b; background: #fff;
	color: #5e3a17; font: inherit; font-size: 16px; font-weight: 800; cursor: pointer; }
.vds-mute:hover { background: #fff3c4; }
.vds-mute.is-on { background: #f2b631; border-color: #c98a0e; color: #3b2508; }
.vds-note { margin: 0; text-align: center; font-size: 13px; color: #5b5249; }
.vds-close:focus-visible, .vds-sw:focus-visible, .vds-test:focus-visible, .vds-mute:focus-visible, .vds-vol input:focus-visible { outline: 3px solid #3730a3; outline-offset: 2px; }
@media (max-height: 480px) { .vds-panel { padding: 10px 14px; gap: 6px; } .vds-row { padding: 6px 10px; gap: 4px; } .vds-l small { display: none; } .vds-note { display: none; } }
/* มือถือแนวนอน / จอเตี้ย: เพลง | เอฟเฟกต์ เคียงกัน · เสียงพากย์และปุ่มปิดเสียงทั้งหมดเต็มแถว — เห็นครบทุกปุ่มโดยไม่ต้องเลื่อน (เดิมปุ่มล่างสุดตกขอบจอ) */
@media (max-height: 500px) and (min-width: 600px) {
	.vds-panel { width: min(760px, calc(100% - 16px)); max-height: calc(100% - 12px); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 10px 14px 12px; }
	.vds-h, .vds-all, .vds-note, .vds-row:nth-of-type(3) { grid-column: 1 / -1; }
	.vds-h b { font-size: 18px; }
	.vds-close { min-height: 36px; }
	.vds-all { padding-top: 0; }
	.vds-mute { min-height: 40px; }
}
@media (prefers-reduced-motion: reduce) { .vds-panel.is-new { animation: none; } .vds-sw i { transition: none; } }
