/* ปุ่มไมค์สั่งอนุมัติด้วยเสียง (ทีม UX 23 ต.ค.) · อยู่ซ้ายของปุ่มลอยเมนูรัศมี (.rfab) ที่ตำแหน่งเดียวกัน ไม่ทับกัน */
.voice-fab { position: fixed; z-index: 6; right: calc(84px + env(safe-area-inset-right)); bottom: calc(76px + env(safe-area-inset-bottom)); width: 48px; height: 48px; display: grid; place-items: center; padding: 0; border-radius: 50%; border: 1px solid var(--border-default, #2b3a52); background: var(--bg-input, #0e1726); color: var(--accent, #8b5cf6); cursor: pointer; -webkit-tap-highlight-color: transparent; box-shadow: 0 8px 20px rgba(0,0,0,.28); transition: transform .2s ease, background .2s, color .2s; }
@media (max-width: 899px) { .voice-fab { bottom: calc(164px + env(safe-area-inset-bottom)); } }
.voice-fab[hidden] { display: none; }
.voice-fab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.voice-fab:focus-visible { outline: 2px solid var(--accent-2, #00d9c0); outline-offset: 3px; }
.voice-fab[aria-pressed="true"] { background: var(--accent, #8b5cf6); color: #fff; animation: voice-pulse 1.2s ease-in-out infinite; }
@keyframes voice-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent, #8b5cf6) 55%, transparent); } 50% { box-shadow: 0 0 0 10px transparent; } }

/* ข้อความสถานะการฟัง/ผลคำสั่ง · อยู่เหนือปุ่มไมค์ */
.voice-msg { position: fixed; z-index: 6; right: calc(16px + env(safe-area-inset-right)); bottom: calc(136px + env(safe-area-inset-bottom)); max-width: min(300px, calc(100vw - 32px)); padding: 8px 12px; border-radius: var(--radius-md, 10px); background: var(--bg-input, #0e1726); border: 1px solid var(--border-default, #2b3a52); color: var(--text-primary, #eee); font: 500 13px/1.5 'Noto Sans Thai', sans-serif; box-shadow: 0 8px 20px rgba(0,0,0,.28); }
@media (max-width: 899px) { .voice-msg { bottom: calc(224px + env(safe-area-inset-bottom)); } }
.voice-msg[hidden] { display: none; }
.voice-msg.fallback { right: auto; left: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); color: var(--text-muted, #999); font-size: 12px; }
@media (max-width: 899px) { .voice-msg.fallback { bottom: calc(164px + env(safe-area-inset-bottom)); } }

@media (prefers-reduced-motion: reduce) { .voice-fab, .voice-fab[aria-pressed="true"] { animation: none; transition: none; } }
