.voice-dialog,
.voice-player {
    color: #19283d;
    background: #fff;
    border: 1px solid #d7e1ef;
    border-radius: 16px;
    box-shadow: 0 18px 60px #12243c33;
    padding: 0;
    overflow: hidden;
}

.voice-dialog {
    width: min(42rem, calc(100% - 2rem));
    max-width: none;
}

.voice-dialog::backdrop {
    background: #0c192b88;
    backdrop-filter: blur(2px);
}

.voice-player {
    position: fixed;
    z-index: 40;
    inset-inline: 0;
    bottom: max(1rem, env(safe-area-inset-bottom));
    margin-inline: auto;
    width: min(28rem, calc(100% - 2rem));
}

.voice-player[hidden] {
    display: none;
}

.voice-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .8rem 1rem;
    border-bottom: 1px solid #e3eaf4;
    background: #19283d;
}

.voice-panel-header h2 {
    margin: 0;
    color: #fff;
    font-size: 1rem;
    line-height: 1.35;
}

.voice-panel-header span {
    display: block;
    color: #d7e1ef;
    font-size: .875rem;
    overflow-wrap: anywhere;
}

.voice-panel-header button {
    appearance: none;
    background: #edf3fa;
    color: #19283d;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    font: inherit;
    font-size: 1.35rem;
    line-height: 1;
    height: 2rem;
    min-width: 2rem;
    padding: 0 .25rem;
}

.voice-dialog iframe,
.voice-player iframe {
    display: block;
    width: 100%;
    border: 0;
}

.voice-dialog iframe {
    height: min(65vh, 36rem);
    background: #f4f7fb;
}

.voice-player iframe {
    height: 8.25rem;
}

.voice-panel-content {
    margin: 0;
    padding: .65rem .9rem;
    color: #19283d;
    font: .925rem/1.5 system-ui, sans-serif;
    overflow-wrap: anywhere;
    overscroll-behavior: contain;
}

.voice-panel-content audio {
    display: block;
    width: 100%;
    height: 44px;
}

.voice-audio-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    margin-top: .45rem;
}

.voice-audio-tools button,
.voice-audio-tools select {
    box-sizing: border-box;
    min-height: 2rem;
    border: 1px solid #cdd9e8;
    border-radius: 8px;
    padding: .15rem .4rem;
    background: #f2f6fb;
    color: inherit;
    font: inherit;
    font-size: .825rem;
}

.voice-audio-tools button:disabled {
    opacity: .6;
}

.voice-audio-tools label {
    margin-inline-start: auto;
    font-size: .825rem;
}

.voice-turn {
    width: fit-content;
    max-width: 88%;
    margin-block: .35rem .9rem;
}

.voice-turn-client {
    margin-inline-start: auto;
}

.voice-turn strong {
    display: block;
    margin: 0 .15rem .25rem;
    color: #4d607a;
    font-size: .75rem;
}

.voice-turn-client strong {
    text-align: end;
}

.voice-turn p {
    margin: 0;
    padding: .65rem .85rem;
    border: 1px solid #dae4f0;
    border-radius: 12px;
    background: #fff;
    white-space: pre-wrap;
}

.voice-turn-client p {
    border-color: #c8dbf6;
    background: #e3edfc;
}
