/* Yuki voice assistant */
.search-input-wrap .voice-mic-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-secondary); display: grid; place-items: center; cursor: pointer; transition: color .15s ease-out, background .15s ease-out; }
.search-input-wrap .voice-mic-btn:hover { color: var(--accent); background: var(--accent-surface); }
.search-input-wrap .voice-mic-btn.hide { display: none; }
.search-input-wrap .voice-mic-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.voice-banner { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle); background: var(--bg-glass-card); color: var(--text-primary); text-align: left; cursor: pointer; font: inherit; }
.voice-banner-ico { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; background: var(--accent); color: #04110f; }
.voice-banner-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.voice-banner-txt b { font-size: 15px; }
.voice-banner-txt small { font-size: 13px; color: var(--text-secondary); }
.voice-banner > svg { color: var(--text-muted); }

#yukiVoice { position: fixed; inset: 0; z-index: 9000; background: #0d0e11; color: var(--text-primary); display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 18px; padding: max(24px, env(safe-area-inset-top)) 20px max(24px, env(safe-area-inset-bottom)); text-align: center;
  opacity: 0; pointer-events: none; transition: opacity .2s ease-out; --lvl: 0; }
#yukiVoice.show { opacity: 1; pointer-events: auto; }
.yv-close { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.08); color: var(--text-primary); display: grid; place-items: center; cursor: pointer; }
.yv-mode { position: absolute; top: max(28px, calc(env(safe-area-inset-top) + 12px)); left: 20px; right: 72px; text-align: left; font-size: 13px; color: var(--text-muted); }

.yv-orb { position: relative; width: 168px; height: 168px; border: 0; background: none; padding: 0; cursor: pointer; display: grid; place-items: center; margin-bottom: 10px; }
.yv-orb:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: 50%; }
.yv-core { position: relative; z-index: 2; width: 112px; height: 112px; border-radius: 50%; display: grid; place-items: center; background: #1a1c22; color: var(--text-secondary);
  transition: background .2s ease-out, color .2s ease-out, transform .1s linear; transform: scale(calc(1 + var(--lvl) * .12)); }
.yv-ring { position: absolute; inset: 20px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }
#yukiVoice[data-state="listen"] .yv-core { background: var(--accent); color: #04110f; }
#yukiVoice[data-state="listen"] .yv-ring { animation: yv-pulse 1.6s ease-out infinite; }
#yukiVoice[data-state="listen"] .yv-ring.r2 { animation-delay: .8s; }
#yukiVoice[data-state="think"] .yv-core { color: var(--accent); }
#yukiVoice[data-state="think"] .yv-ring.r1 { opacity: 1; inset: 22px; border-color: var(--accent) transparent transparent transparent; animation: yv-spin .9s linear infinite; }
#yukiVoice[data-state="wait"] .yv-core { color: var(--accent); }
@keyframes yv-pulse { from { transform: scale(.8); opacity: .7; } to { transform: scale(1.35); opacity: 0; } }
@keyframes yv-spin { to { transform: rotate(360deg); } }

.yv-status { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -.01em; }
.yv-heard { min-height: 24px; max-width: 520px; font-size: 18px; color: var(--text-secondary); }
.yv-reply { min-height: 22px; max-width: 520px; font-size: 16px; color: var(--accent); }
.yv-hints { position: absolute; bottom: max(28px, env(safe-area-inset-bottom)); left: 16px; right: 16px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.yv-hints span { font-size: 13px; color: var(--text-muted); border: 1px solid var(--border-subtle); border-radius: var(--radius-full); padding: 7px 12px; }
#yukiVoice[data-state="think"] .yv-hints, #yukiVoice[data-state="listen"] .yv-hints { opacity: .3; }

@media (prefers-reduced-motion: reduce) { #yukiVoice .yv-ring { animation: none !important; } #yukiVoice .yv-core { transition: none; } }
:root[data-theme="light"] #yukiVoice { background: #f4f5f7; --text-primary: #111; }
.yv-bg { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--text-secondary); font: inherit; font-size: 14px; cursor: pointer; }
.yv-sw { width: 40px; height: 24px; border-radius: 12px; background: rgba(255,255,255,.16); position: relative; transition: background .2s ease-out; flex: none; }
.yv-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .2s ease-out; }
.yv-bg.on { color: var(--text-primary); }
.yv-bg.on .yv-sw { background: var(--accent); }
.yv-bg.on .yv-sw::after { transform: translateX(16px); }
.yv-bg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
