/* Compact voice-only styling; no changes to the surrounding chat workspace. */
body.tw-voice-open { overflow: hidden; }
#tp-app-update { position: fixed; z-index: 1090; left: 50%; bottom: max(16px,env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 24px); box-sizing: border-box; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid #454052; border-radius: 12px; background: #16151c; color: #e4e9ed; box-shadow: 0 8px 28px #0008; font: 12px/1.3 system-ui; }
#tp-app-update button { flex-shrink: 0; min-height: 40px; padding: 8px 12px; border: 1px solid #655379; border-radius: 8px; background: #31283f; color: #eee5fc; font: 600 12px system-ui; cursor: pointer; }
#tp-voice-card { position: fixed; inset: 0; z-index: 1100; }
#tp-voice-card *, #tp-voice-card *::before, #tp-voice-card *::after { box-sizing: border-box; }
#tp-voice-card .tw-vc-backdrop { position: absolute; inset: 0; background: rgba(5,8,11,.88); backdrop-filter: blur(5px); }
#tp-voice-card .tw-vc-dialog-wrap { position: absolute; inset: 0; display: grid; place-items: center; padding: max(20px,env(safe-area-inset-top)) 20px max(20px,env(safe-area-inset-bottom)); overflow-y: auto; }
#tp-voice-card .tw-voice-console { width: min(420px,100%); max-height: calc(100dvh - max(20px,env(safe-area-inset-top)) - max(20px,env(safe-area-inset-bottom))); display: block; overflow-y: auto; overscroll-behavior: contain; padding: 25px; border: 1px solid #383c47; border-radius: 22px; background: #101319; box-shadow: 0 25px 85px #0009; color: #e4e9ed; gap: 0; }
#tp-voice-card .tw-vc-header { position: sticky; top: -25px; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 7px 0 18px; margin-top: -7px; background: #101319; }
#tp-voice-card .tw-vc-eyebrow { color: #b6a6cf; font-size: 10px; font-weight: 750; letter-spacing: 1.5px; }
#tp-voice-card h2 { margin: 7px 0 0; color: #edf0f3; font-size: 27px; line-height: 1.1; letter-spacing: -.6px; }
#tp-voice-card p { margin: 0; color: #a8b2bf; font-size: 12px; line-height: 1.4; }
#tp-voice-card button { min-height: 42px; border: 1px solid #3b424f; border-radius: 10px; background: #1b212b; color: #dce3ec; padding: 10px 15px; font: 650 13px Inter,system-ui,sans-serif; cursor: pointer; box-shadow: none; }
#tp-voice-card button:hover:not(:disabled) { border-color: #8a7aa2; }
#tp-voice-card button:disabled { cursor: default; }
#tp-voice-card :is(button,[tabindex]):focus-visible { outline: 2px solid #c2addd; outline-offset: 5px; }
#tp-voice-card .tw-vc-icon-button { width: 38px; min-height: 38px; flex: 0 0 38px; padding: 0; border-radius: 11px; color: #b7bfce; }
#tp-voice-card .tw-vc-setup { display: grid; gap: 15px; padding: 14px 0 23px; text-align: center; }
#tp-voice-card h3 { margin: 0; color: #cbd2df; font-size: 14px; font-weight: 650; }
#tp-voice-card .tw-vc-reply { display: flex; justify-content: center; gap: 10px; }
#tp-voice-card .tw-vc-reply button { flex: 1; min-height: 44px; }
#tp-voice-card .tw-vc-start-area { display: grid; gap: 10px; }
#tp-voice-card .tw-vc-start { width: 100%; border-color: #b5a1d0; background: #b5a1d0; color: #1b1229; font-weight: 750; }
#tp-voice-card .tw-vc-start:hover:not(:disabled) { background: #c6b4dd; border-color: #c6b4dd; }
#tp-voice-card .tw-vc-start:disabled { opacity: .5; }
#tp-voice-card #tp-vc-support { font-size: 12px; color: #b0b9c8; line-height: 1.4; text-align: center; }
#tp-voice-card #tp-vc-support:empty { display: none; }
#tp-voice-card .tw-vc-live { width: 100%; padding-top: 3px; }
#tp-voice-card .tw-vc-session-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 9px; color: #baafcb; font-size: 11px; }
#tp-voice-card #tp-vc-mic-state { color: #8f9baa; font-size: 9px; font-weight: 750; letter-spacing: .8px; }
#tp-voice-card #tp-vc-mic-state.is-on { color: #a5d9bf; }
#tp-voice-card .tw-vc-notice { padding: 9px 11px; margin: 0 0 9px; border: 1px solid #494638; border-radius: 8px; background: #211f18; color: #c8bea3; font-size: 11px; line-height: 1.4; }
#tp-voice-card .tw-vc-notice:empty { display: none; }
#tp-voice-card .tw-vc-stage { text-align: center; padding: 8px 0 4px; }
#tp-voice-card .tw-vc-orbwrap { position: relative; width: 218px; height: 218px; margin: 0 auto 11px; display: grid; place-items: center; }
#tp-voice-card .tw-vc-talk { position: relative; z-index: 2; width: 158px; height: 158px; min-height: 0; padding: 0; border: 0; border-radius: 50%; background: transparent; -webkit-tap-highlight-color: transparent; }
#tp-voice-card .tw-vc-talk:hover:not(:disabled) { border: 0; }
#tp-voice-card .tw-voice-orb { display: block; width: 100%; height: 100%; border-radius: 46% 54% 48% 52% / 52% 45% 55% 48%; background: radial-gradient(circle at 33% 28%,#e5d9fa 0%,#ad80e2 36%,#7050ad 70%,#4c3a7a 100%); box-shadow: inset 0 0 24px #ede5ff30,0 0 35px #ad80e225,0 0 65px #8265ba17; animation: twVoiceBlob 6s ease-in-out infinite; }
#tp-voice-card .tw-voice-rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
#tp-voice-card .tw-voice-rings span { position: absolute; width: 190px; height: 190px; border: 1px solid #aa8ace25; border-radius: 50%; }
#tp-voice-card .tw-voice-rings span:nth-child(2) { width: 216px; height: 216px; border-color: #aa8ace13; }
#tp-voice-card .tw-vc-stage[data-state="listening"] .tw-voice-orb { background: radial-gradient(circle at 33% 28%,#dcf7e8,#8fd4b3 38%,#398a71 75%,#26575e); box-shadow: inset 0 0 24px #e9fff52b,0 0 42px #75c9a938; animation-duration: 2.2s; }
#tp-voice-card .tw-vc-stage[data-state="speaking"] .tw-voice-orb { animation: twVoiceBlob 3s ease-in-out infinite,twVoiceBreath 1.6s ease-in-out infinite; }
#tp-voice-card .tw-vc-stage:is([data-state="listening"],[data-state="speaking"]) .tw-voice-rings span { animation: twVoiceRipple 2.8s ease-out infinite; }
#tp-voice-card .tw-vc-stage:is([data-state="listening"],[data-state="speaking"]) .tw-voice-rings span:nth-child(2) { animation-delay: 1.4s; }
#tp-voice-card #tp-vc-status { margin: 0 0 7px; color: #e7ebf2; font-size: 16px; font-weight: 750; line-height: 1.3; }
#tp-voice-card #tp-vc-help { max-width: 310px; margin: 0 auto; color: #99a5b5; font-size: 12px; min-height: 17px; }
#tp-voice-card .tw-vc-stage[data-state="error"] #tp-vc-help { color: #d7b3ac; }
#tp-voice-card .tw-vc-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@keyframes twVoiceBlob { 0%,100% { border-radius: 46% 54% 48% 52% / 52% 45% 55% 48%; transform: scale(.98); } 50% { border-radius: 54% 46% 53% 47% / 46% 54% 46% 54%; transform: scale(1.02); } }
@keyframes twVoiceBreath { 0%,100% { opacity: .85; } 50% { opacity: 1; } }
@keyframes twVoiceRipple { from { transform: scale(.87); opacity: .55; } to { transform: scale(1.14); opacity: 0; } }
@media (max-width: 760px) {
    #tp-voice-card .tw-vc-dialog-wrap { padding: max(12px,env(safe-area-inset-top)) 14px max(12px,env(safe-area-inset-bottom)); }
    #tp-voice-card .tw-voice-console { width: min(390px,100%) !important; max-height: calc(100dvh - max(12px,env(safe-area-inset-top)) - max(12px,env(safe-area-inset-bottom))); padding: 21px 19px !important; border-radius: 20px; }
    #tp-voice-card .tw-vc-header { top: -21px; }
    #tp-voice-card .tw-vc-orbwrap { width: 200px !important; height: 200px !important; }
    #tp-voice-card .tw-vc-talk { width: 145px; height: 145px; }
    #tp-voice-card .tw-voice-rings span { width: 174px; height: 174px; }
    #tp-voice-card .tw-voice-rings span:nth-child(2) { width: 198px; height: 198px; }
}
@media (max-height: 500px) {
    #tp-voice-card .tw-vc-orbwrap { width: 155px !important; height: 155px !important; margin-bottom: 6px; }
    #tp-voice-card .tw-vc-talk { width: 112px; height: 112px; }
    #tp-voice-card .tw-voice-rings span { width: 134px; height: 134px; }
    #tp-voice-card .tw-voice-rings span:nth-child(2) { width: 154px; height: 154px; }
}
@media (prefers-reduced-motion: reduce) {
    #tp-voice-card *, #tp-voice-card *::before, #tp-voice-card *::after { animation: none !important; transition: none !important; }
}
