/* Separate accessibility controls; page semantics and screen readers stay intact. */
.tr-voice-skip { position: fixed; top: .5rem; inset-inline-start: .5rem; z-index: 10001; transform: translateY(-180%); padding: .8rem 1rem; color: #fff; background: #171717; border: 3px solid #ffcc33; border-radius: .5rem; }
.tr-voice-skip:focus { transform: translateY(0); }
#trandora-voice-root:empty { display: none; }
#trandora-voice-root { font-family: Arial, sans-serif; font-size: 1rem; line-height: 1.5; color: #181818; }
.tr-voice-launcher { position: fixed; inset-inline-end: max(1rem, env(safe-area-inset-right)); bottom: calc(5.5rem + env(safe-area-inset-bottom)); z-index: 48; display: flex; align-items: center; gap: .5rem; max-width: calc(100vw - 2rem); min-height: 48px; padding: .7rem 1rem; background: #201715; color: #fff; border: 2px solid #e8cfaa; border-radius: 999px; font: inherit; font-weight: 700; box-shadow: 0 3px 12px #0003; cursor: pointer; }
.tr-voice-dialog { inset: 0; margin: auto; width: min(30rem, calc(100vw - 2rem)); max-width: calc(100vw - 2rem); max-height: calc(100dvh - 2rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow: auto; overscroll-behavior: contain; padding: 1.25rem; color: #171717; background: #fffdf7; border: 2px solid #35251a; border-radius: 1rem; box-shadow: 0 10px 50px #0005; font: inherit; line-height: 1.5; z-index: 10000; }
.tr-voice-dialog:not([open]) { display: none; }
.tr-voice-dialog::backdrop { background: #0008; }
.tr-voice-header { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .7rem; margin-bottom: .75rem; }
.tr-voice-header h2 { font-size: 1.3rem; font-weight: 700; margin: 0; }
.tr-voice-dialog p { margin: .5rem 0 1rem; }
.tr-voice-dialog fieldset { margin: 1.25rem 0; border: 1px solid #7a7067; border-radius: .5rem; padding: 1rem; min-width: 0; }
.tr-voice-dialog legend { padding: 0 .3rem; font-weight: 700; }
.tr-voice-dialog label { display: block; margin: .8rem 0 .3rem; font-weight: 700; }
.tr-voice-dialog input[type="range"] { display: block; width: 100%; min-height: 48px; accent-color: #35251a; }
.tr-voice-dialog select { display: block; width: 100%; max-width: 100%; min-height: 48px; padding: .65rem .5rem; color: #171717; background: #fff; border: 1px solid #655347; border-radius: .35rem; font: inherit; }
.tr-voice-dialog button { min-height: 48px; padding: .55rem .8rem; border: 1px solid #35251a; border-radius: .4rem; color: #fff; background: #35251a; font: inherit; font-weight: 700; cursor: pointer; }
.tr-voice-dialog button:disabled { background: #e3e1dc; color: #5c5b57; border-color: #999; cursor: default; }
.tr-voice-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .5rem; }
.tr-voice-dialog .tr-voice-check { display: flex; align-items: flex-start; gap: .65rem; min-height: 48px; font-weight: 400; padding: .4rem 0; }
.tr-voice-check input { flex: none; width: 1.4rem; height: 1.4rem; margin-top: .1rem; accent-color: #35251a; }
.tr-voice-dialog .tr-voice-help { font-size: .9rem; line-height: 1.5; color: #514a43; overflow-wrap: anywhere; }
.tr-voice-status { padding: .75rem; background: #eee7da; border-inline-start: 4px solid #624522; }
.tr-voice-dialog .tr-voice-reset { width: 100%; color: #35251a; background: #fff; }
body :focus-visible { outline: 3px solid #0b57d0 !important; outline-offset: 3px !important; }
html.tr-voice-text-125 { font-size: 125%; }
html.tr-voice-text-150 { font-size: 150%; }
html.tr-voice-text-175 { font-size: 175%; }
html.tr-voice-text-200 { font-size: 200%; }
html.tr-voice-high-contrast body, html.tr-voice-high-contrast body *:not(img):not(video):not(canvas):not(svg):not(svg *) { background-color: #000 !important; background-image: none !important; color: #fff !important; border-color: #fff !important; text-shadow: none !important; box-shadow: none !important; }
html.tr-voice-high-contrast body a { color: #ffed80 !important; text-decoration: underline !important; }
html.tr-voice-high-contrast body :focus-visible { outline-color: #ffed80 !important; }
html.tr-voice-high-contrast input, html.tr-voice-high-contrast select { accent-color: #ffed80; }
html.tr-voice-high-contrast button:disabled { opacity: .65; }
html.tr-voice-reduce-motion *, html.tr-voice-reduce-motion *::before, html.tr-voice-reduce-motion *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
@media (prefers-reduced-motion: reduce) { .tr-voice-skip { transition: none; } }
@media (min-width: 1024px) { .tr-voice-launcher { bottom: max(1.25rem, env(safe-area-inset-bottom)); } }
@media (max-width: 380px) { .tr-voice-actions { grid-template-columns: 1fr; } .tr-voice-dialog { padding: .8rem; } }

[dir="rtl"] .tr-voice-launcher { inset-inline-end: max(1rem, env(safe-area-inset-left)); }
#trandora-voice-root.tr-voice-fallback { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; background: #0008; }
.tr-voice-fallback .tr-voice-launcher { display: none; }
.tr-voice-fallback .tr-voice-dialog { position: relative; inset: auto; }
