/* Audio document viewer */
.doc-layer.audio-mode {
    background:
        radial-gradient(circle at 88% 8%, rgba(82, 142, 244, 0.18), transparent 34%),
        linear-gradient(180deg, #f4f8ff 0%, #edf3fc 100%);
    overflow: auto;
}

.doc-layer.audio-mode .doc-canvas {
    width: min(100%, var(--x-max-page-width, 1600px));
    max-width: var(--x-max-page-width, 1600px);
    min-height: 100%;
    height: auto;
    margin: 0 auto;
    padding: clamp(1rem, 1.65vw, 1.8rem);
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    display: flex;
    flex-direction: column;
}

.doc-layer.audio-mode .title-bar,
.doc-layer.audio-mode .doc-toolbar {
    display: none;
}

.doc-layer.audio-mode #docHost,
.doc-layer.audio-mode #docHostGeneric {
    height: auto;
    min-height: 0;
    overflow: visible;
    background: transparent;
}

.doc-layer.audio-mode .audio-native {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.audio-viewer-shell {
    flex: 1 1 auto;
    min-height: calc(100dvh - 178px);
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 1.25rem;
    color: #092554;
}

.audio-breadcrumb {
    width: fit-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    overflow: hidden;
    padding: 0.72rem 1rem;
    border-radius: 999px;
    background: rgba(16, 54, 115, 0.07);
    color: #5c7297;
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.09em;
    line-height: 1;
    text-transform: uppercase;
}

.audio-breadcrumb-items {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    overflow: hidden;
}

.audio-breadcrumb .is-current {
    color: #112a58;
    white-space: nowrap;
}

.audio-breadcrumb i {
    flex: 0 0 auto;
    color: #0e58d0;
    font-size: 0.95rem;
}

.audio-breadcrumb .audio-crumb-separator {
    color: #90a1c0;
    font-weight: 900;
}

.audio-breadcrumb .audio-crumb-action {
    flex: 0 0 auto;
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.audio-breadcrumb .audio-crumb-action:hover,
.audio-breadcrumb .audio-crumb-action:focus-visible {
    color: #0b63ff;
    outline: none;
}

.audio-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.audio-hero-main {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 1.1rem;
}

.audio-back-btn,
.audio-action-btn,
.audio-icon-btn,
.audio-play-btn,
.audio-skip-btn,
.audio-mark-btn,
.audio-control-pill,
.audio-search button {
    border: 1px solid #bfd2ef;
    background: #f8fbff;
    color: #0a2a5a;
    box-shadow: 0 10px 22px rgba(25, 58, 116, 0.09);
}

.audio-back-btn {
    width: 58px;
    height: 52px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex: 0 0 auto;
}

.audio-title-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 0.4rem;
}

.audio-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.audio-title-row h2 {
    margin: 0;
    color: #081f4a;
    font-size: clamp(1.75rem, 2.25vw, 2.45rem);
    font-weight: 850;
    line-height: 1.05;
}

.audio-record-tag,
.audio-kind {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    background: #dcecff;
    color: #0f6de7;
    font-size: 0.82rem;
    font-weight: 850;
    padding: 0.3rem 0.65rem;
}

.audio-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem 0.7rem;
    color: #7382a2;
    font-size: 0.98rem;
    font-weight: 650;
}

.audio-meta-row > span:not(:first-child)::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 4px;
    margin-right: 0.7rem;
    border-radius: 999px;
    background: #9caac4;
    vertical-align: middle;
}

.audio-title-block p {
    margin: 0;
    color: #405984;
    font-size: 1.02rem;
    font-weight: 550;
}

.audio-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.audio-action-btn {
    min-height: 54px;
    border-radius: 12px;
    padding: 0 1.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-weight: 850;
    white-space: nowrap;
}

.audio-action-primary {
    border-color: #1172ee;
    background: linear-gradient(135deg, #1578f2, #0966e5);
    color: #ffffff;
}

.audio-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 1.35rem;
    align-items: stretch;
    min-height: clamp(560px, 58dvh, 820px);
}

.audio-player-panel,
.audio-side-panel {
    border: 1px solid #c8d8f0;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 36px rgba(39, 74, 130, 0.11);
}

.audio-player-panel {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: clamp(1rem, 1.55vw, 1.55rem);
    min-width: 0;
    min-height: 0;
}

.audio-player-topbar {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.audio-control-pill {
    min-height: 44px;
    border-radius: 12px;
    padding: 0 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 800;
}

.audio-control-pill select {
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.audio-time-pill {
    margin-left: auto;
    min-height: 44px;
    border-radius: 999px;
    padding: 0 1rem;
    display: inline-flex;
    align-items: center;
    background: #f3f7ff;
    color: #65748f;
    font-weight: 850;
}

.audio-time-pill strong {
    color: #243553;
}

.audio-wave-card {
    position: relative;
    flex: 1 1 auto;
    min-height: clamp(340px, 42dvh, 560px);
    border-radius: 14px;
    background:
        repeating-linear-gradient(90deg, transparent 0 10.8%, rgba(149, 170, 204, 0.18) 10.9% 11%),
        linear-gradient(180deg, #eef5ff, #eaf2ff);
    overflow: hidden;
}

.audio-wave-canvas {
    width: 100%;
    height: calc(100% - 48px);
    display: block;
}

.audio-playhead {
    position: absolute;
    top: 26px;
    bottom: 48px;
    left: 0;
    width: 2px;
    background: rgba(13, 110, 253, 0.22);
    transform: translateX(-1px);
    pointer-events: none;
}

.audio-playhead span {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 6px;
    padding: 0.24rem 0.45rem;
    background: #1477ee;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 850;
}

.audio-wave-times {
    position: absolute;
    inset: auto 1.4rem 1.2rem;
    display: flex;
    justify-content: space-between;
    color: #7a879f;
    font-size: 0.9rem;
    font-weight: 750;
}

.audio-transport {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 1rem;
}

.audio-transport-left,
.audio-transport-center,
.audio-transport-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.audio-transport-left {
    justify-content: flex-start;
}

.audio-transport-center {
    justify-content: center;
}

.audio-transport-right {
    justify-content: flex-end;
    min-width: 0;
}

.audio-icon-btn,
.audio-skip-btn,
.audio-mark-btn {
    min-height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 800;
}

.audio-icon-btn {
    width: 42px;
}

.audio-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 999px;
    border-color: #051d4b;
    background: linear-gradient(135deg, #08285d, #001b48);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
}

.audio-skip-btn {
    width: 112px;
    padding: 0 0.9rem;
}

.audio-transport-right input[type="range"] {
    width: 88px;
    accent-color: #1677f2;
}

.audio-player-footer {
    border-top: 1px solid #e4ebf7;
    padding-top: 1rem;
}

.audio-mark-btn {
    padding: 0 1rem;
}

.audio-side-panel {
    display: flex;
    flex-direction: column;
    padding: 1.2rem;
    min-width: 0;
    min-height: 0;
}

.audio-side-tabs {
    border-bottom: 1px solid #d9e5f5;
    margin: -0.1rem -0.2rem 1.2rem;
    padding-bottom: 0.7rem;
}

.audio-side-tabs button {
    min-width: 140px;
    border: 0;
    border-bottom: 3px solid #4f93de;
    background: transparent;
    color: #0f6de7;
    font-weight: 850;
    padding: 0.6rem 0.2rem;
}

.audio-search {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr 48px;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.2rem;
}

.audio-search > i {
    position: absolute;
    margin-left: 0.9rem;
    color: #96a5bf;
}

.audio-search input {
    grid-column: 1 / 3;
    min-height: 48px;
    width: 100%;
    border: 1px solid #d8e3f3;
    border-radius: 10px;
    background: #fff;
    color: #1c3158;
    padding: 0 0.85rem 0 2.7rem;
    font-weight: 650;
}

.audio-search button {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    border-color: #08295b;
    background: #05285b;
    color: #fff;
    font-size: 1.15rem;
}

.audio-transcript-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.audio-transcript-item {
    display: grid;
    grid-template-columns: 58px 1fr;
    align-items: center;
    gap: 0.8rem;
    border: 0;
    background: transparent;
    color: #1e2f50;
    text-align: left;
    padding: 0.2rem 0;
}

.audio-transcript-item span {
    border-radius: 8px;
    background: #edf3ff;
    color: #607089;
    padding: 0.35rem 0.45rem;
    font-weight: 850;
    text-align: center;
}

.audio-transcript-item:first-child span {
    background: #dff0ff;
    color: #0f79de;
}

.audio-transcript-item strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.94rem;
}

.audio-transcript-more {
    align-self: center;
    margin: 1rem 0 1.6rem;
    border: 0;
    background: transparent;
    color: #2378c5;
    font-weight: 850;
}

.audio-info-card,
.audio-navigation-card {
    border: 1px solid #d4e2f5;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.audio-info-card {
    padding: 1rem;
}

.audio-navigation-card {
    margin-top: 0.85rem;
    padding: 1rem;
}

.audio-info-kicker {
    display: inline-flex;
    margin-bottom: 0.55rem;
    color: #176ce3;
    font-size: 0.74rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.audio-info-card h3 {
    margin: 0 0 0.9rem;
    color: #102a58;
    font-size: 1.05rem;
    font-weight: 850;
    line-height: 1.2;
}

.audio-info-card dl {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}

.audio-info-card dl > div {
    display: grid;
    grid-template-columns: minmax(88px, 0.45fr) minmax(0, 1fr);
    gap: 0.7rem;
    align-items: start;
    padding: 0.55rem 0;
    border-top: 1px solid rgba(180, 202, 232, 0.55);
}

.audio-info-card dt {
    color: #5d7198;
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.audio-info-card dd {
    min-width: 0;
    margin: 0;
    color: #142f5e;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.audio-navigation-card p {
    margin: 0 0 0.9rem;
    color: #5f7195;
    font-size: 0.92rem;
    line-height: 1.45;
}

.audio-navigation-card > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.audio-navigation-card button {
    min-height: 62px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.28rem;
    border: 1px solid #bfd2ef;
    border-radius: 12px;
    background: #f8fbff;
    color: #0a2a5a;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(25, 58, 116, 0.09);
}

.audio-navigation-card button i {
    color: #1677f2;
    font-size: 1.12rem;
}

html[data-theme="dark"] .doc-layer.audio-mode,
body[data-theme="dark"] .doc-layer.audio-mode {
    background:
        radial-gradient(circle at 88% 8%, rgba(70, 126, 224, 0.22), transparent 34%),
        linear-gradient(180deg, #071a34 0%, #0a2547 100%) !important;
}

html[data-theme="dark"] .audio-viewer-shell,
body[data-theme="dark"] .audio-viewer-shell {
    color: #eaf2ff;
}

html[data-theme="dark"] .audio-breadcrumb,
html[data-theme="dark"] .audio-meta-row,
html[data-theme="dark"] .audio-title-block p,
body[data-theme="dark"] .audio-breadcrumb,
body[data-theme="dark"] .audio-meta-row,
body[data-theme="dark"] .audio-title-block p {
    color: #9db6dc;
}

html[data-theme="dark"] .audio-breadcrumb,
body[data-theme="dark"] .audio-breadcrumb {
    background: rgba(19, 66, 126, 0.38);
    color: #b8d3f8;
}

html[data-theme="dark"] .audio-breadcrumb .bi,
body[data-theme="dark"] .audio-breadcrumb .bi {
    color: #7fb9ff;
}

html[data-theme="dark"] .audio-title-row h2,
html[data-theme="dark"] .audio-breadcrumb .is-current,
body[data-theme="dark"] .audio-title-row h2,
body[data-theme="dark"] .audio-breadcrumb .is-current {
    color: #f2f7ff;
}

html[data-theme="dark"] .audio-player-panel,
html[data-theme="dark"] .audio-side-panel,
body[data-theme="dark"] .audio-player-panel,
body[data-theme="dark"] .audio-side-panel {
    border-color: rgba(102, 141, 201, 0.5);
    background: rgba(13, 33, 62, 0.94);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.26);
}

html[data-theme="dark"] .audio-back-btn,
html[data-theme="dark"] .audio-action-light,
html[data-theme="dark"] .audio-icon-btn,
html[data-theme="dark"] .audio-skip-btn,
html[data-theme="dark"] .audio-mark-btn,
html[data-theme="dark"] .audio-control-pill,
body[data-theme="dark"] .audio-back-btn,
body[data-theme="dark"] .audio-action-light,
body[data-theme="dark"] .audio-icon-btn,
body[data-theme="dark"] .audio-skip-btn,
body[data-theme="dark"] .audio-mark-btn,
body[data-theme="dark"] .audio-control-pill {
    border-color: rgba(97, 134, 192, 0.56);
    background: rgba(18, 43, 78, 0.96);
    color: #edf5ff;
}

html[data-theme="dark"] .audio-wave-card,
body[data-theme="dark"] .audio-wave-card {
    background:
        repeating-linear-gradient(90deg, transparent 0 10.8%, rgba(125, 154, 202, 0.16) 10.9% 11%),
        linear-gradient(180deg, #102b4e, #0b2341);
}

html[data-theme="dark"] .audio-time-pill,
html[data-theme="dark"] .audio-search input,
html[data-theme="dark"] .audio-transcript-item span,
body[data-theme="dark"] .audio-time-pill,
body[data-theme="dark"] .audio-search input,
body[data-theme="dark"] .audio-transcript-item span {
    background: rgba(20, 45, 80, 0.96);
    color: #dbe8ff;
    border-color: rgba(97, 134, 192, 0.56);
}

html[data-theme="dark"] .audio-transcript-item,
body[data-theme="dark"] .audio-transcript-item {
    color: #dfeaff;
}

@media (max-width: 1180px) {
    .audio-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .audio-hero-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .audio-layout {
        grid-template-columns: 1fr;
        min-height: 0;
    }
}

@media (max-width: 760px) {
    .doc-layer.audio-mode .doc-canvas {
        padding: 0.85rem !important;
    }

    .audio-hero-main,
    .audio-player-topbar,
    .audio-transport,
    .audio-transport-left,
    .audio-transport-right {
        align-items: stretch;
        flex-direction: column;
    }

    .audio-hero-main {
        display: grid;
        grid-template-columns: auto 1fr;
    }

    .audio-transport {
        display: flex;
    }

    .audio-transport-left,
    .audio-transport-center,
    .audio-transport-right {
        justify-content: center;
    }

    .audio-time-pill {
        margin-left: 0;
    }

    .audio-action-btn,
    .audio-control-pill,
    .audio-skip-btn,
    .audio-mark-btn {
        width: 100%;
    }

    .audio-wave-card {
        min-height: 280px;
    }

}

/* Final dark-mode polish for audio viewer */
html[data-theme="dark"] .audio-hero,
body[data-theme="dark"] .audio-hero {
    border-color: rgba(75, 111, 169, 0.62) !important;
    background:
        radial-gradient(circle at top right, rgba(72, 140, 255, 0.18), transparent 28%),
        linear-gradient(145deg, rgba(20, 45, 82, 0.98), rgba(16, 37, 66, 0.96)) !important;
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(142, 186, 255, 0.09) !important;
}

html[data-theme="dark"] .audio-record-tag,
html[data-theme="dark"] .audio-kind,
body[data-theme="dark"] .audio-record-tag,
body[data-theme="dark"] .audio-kind {
    background: rgba(76, 139, 235, 0.16) !important;
    color: #a8ccff !important;
}

html[data-theme="dark"] .audio-player-topbar,
html[data-theme="dark"] .audio-transcript-panel,
html[data-theme="dark"] .audio-search,
html[data-theme="dark"] .audio-info-card,
html[data-theme="dark"] .audio-navigation-card,
body[data-theme="dark"] .audio-player-topbar,
body[data-theme="dark"] .audio-transcript-panel,
body[data-theme="dark"] .audio-search,
body[data-theme="dark"] .audio-info-card,
body[data-theme="dark"] .audio-navigation-card {
    border-color: rgba(97, 134, 192, 0.46) !important;
    background: rgba(12, 31, 58, 0.7) !important;
}

html[data-theme="dark"] .audio-info-kicker,
body[data-theme="dark"] .audio-info-kicker {
    color: #8fc0ff !important;
}

html[data-theme="dark"] .audio-info-card h3,
html[data-theme="dark"] .audio-info-card dd,
body[data-theme="dark"] .audio-info-card h3,
body[data-theme="dark"] .audio-info-card dd {
    color: #f2f7ff !important;
}

html[data-theme="dark"] .audio-info-card dt,
html[data-theme="dark"] .audio-navigation-card p,
body[data-theme="dark"] .audio-info-card dt,
body[data-theme="dark"] .audio-navigation-card p {
    color: #9db6dc !important;
}

html[data-theme="dark"] .audio-info-card dl > div,
body[data-theme="dark"] .audio-info-card dl > div {
    border-color: rgba(97, 134, 192, 0.34) !important;
}

html[data-theme="dark"] .audio-navigation-card button,
body[data-theme="dark"] .audio-navigation-card button {
    border-color: rgba(97, 134, 192, 0.56);
    background: rgba(18, 43, 78, 0.96);
    color: #edf5ff;
}

html[data-theme="dark"] .audio-control-pill select,
body[data-theme="dark"] .audio-control-pill select {
    color: #edf5ff !important;
}

html[data-theme="dark"] .audio-transcript-more,
body[data-theme="dark"] .audio-transcript-more {
    color: #8fc0ff !important;
}

/* Header polish aligned with the PDF viewer */
.doc-layer.audio-mode .audio-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(1.25rem, 1.9vw, 2rem);
    border: 1px solid rgba(150, 187, 238, 0.72);
    border-radius: 28px;
    background:
        radial-gradient(circle at 92% 8%, rgba(76, 142, 255, 0.2), transparent 34%),
        linear-gradient(145deg, rgba(248, 251, 255, 0.98), rgba(228, 239, 255, 0.96));
    box-shadow:
        0 22px 52px rgba(24, 64, 124, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.doc-layer.audio-mode .audio-hero::after {
    content: "";
    position: absolute;
    inset: auto -12% -50% 58%;
    height: 180px;
    pointer-events: none;
    background: radial-gradient(circle, rgba(45, 117, 255, 0.16), transparent 66%);
}

.doc-layer.audio-mode .audio-hero-main,
.doc-layer.audio-mode .audio-hero-actions {
    position: relative;
    z-index: 1;
}

.doc-layer.audio-mode .audio-back-btn {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
    border-radius: 18px;
    color: #0b63ff;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(226, 239, 255, 0.94));
    border-color: rgba(143, 184, 239, 0.72);
    box-shadow: 0 14px 30px rgba(33, 92, 174, 0.15);
}

.doc-layer.audio-mode .audio-title-row {
    flex-wrap: nowrap;
}

.doc-layer.audio-mode .audio-title-row h2 {
    max-width: min(760px, 48vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: clamp(1.45rem, 1.9vw, 2.15rem);
}

.doc-layer.audio-mode .audio-action-btn {
    min-height: 54px;
    border-radius: 18px;
    border-color: rgba(143, 184, 239, 0.72);
    background: rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 30px rgba(33, 92, 174, 0.12);
}

.doc-layer.audio-mode .audio-action-primary {
    border-color: rgba(31, 109, 255, 0.9);
    background: linear-gradient(135deg, #4a9cff, #1068ff);
    box-shadow: 0 16px 32px rgba(31, 109, 255, 0.24);
}

html[data-theme="dark"] .doc-layer.audio-mode .audio-hero,
body[data-theme="dark"] .doc-layer.audio-mode .audio-hero {
    border-color: rgba(91, 154, 238, 0.42) !important;
    background:
        radial-gradient(circle at 88% 10%, rgba(25, 118, 255, 0.24), transparent 36%),
        linear-gradient(145deg, rgba(9, 34, 64, 0.98), rgba(5, 25, 48, 0.98)) !important;
    box-shadow:
        0 24px 62px rgba(0, 12, 28, 0.46),
        inset 0 1px 0 rgba(132, 183, 255, 0.14) !important;
}

html[data-theme="dark"] .doc-layer.audio-mode .audio-back-btn,
body[data-theme="dark"] .doc-layer.audio-mode .audio-back-btn {
    color: #b9d8ff;
    background: linear-gradient(145deg, rgba(18, 58, 103, 0.96), rgba(9, 36, 67, 0.96));
    border-color: rgba(99, 166, 255, 0.44);
    box-shadow: 0 14px 30px rgba(0, 10, 26, 0.34);
}

html[data-theme="dark"] .doc-layer.audio-mode .audio-action-btn,
body[data-theme="dark"] .doc-layer.audio-mode .audio-action-btn {
    background: rgba(18, 58, 103, 0.72);
    border-color: rgba(99, 166, 255, 0.4);
    box-shadow: 0 14px 30px rgba(0, 10, 26, 0.28);
}

html[data-theme="dark"] .doc-layer.audio-mode .audio-action-primary,
body[data-theme="dark"] .doc-layer.audio-mode .audio-action-primary {
    background: linear-gradient(135deg, #2389ff, #0b62e8);
    border-color: rgba(66, 150, 255, 0.86);
}

@media (max-width: 1180px) {
    .doc-layer.audio-mode .audio-title-row {
        flex-wrap: wrap;
    }

    .doc-layer.audio-mode .audio-title-row h2 {
        max-width: 100%;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
}
