:root {
    --studio-ink: #20343d;
    --studio-muted: #586b75;
    --studio-accent: #146c60;
    --studio-border: #dce4e7;
    --studio-canvas: #f5f7fa;
    --bs-primary-rgb: 20, 108, 96;
    --bs-link-color-rgb: 20, 108, 96;
    --bs-link-hover-color-rgb: 13, 81, 72;
    --bs-link-color: #146c60;
    --bs-link-hover-color: #0d5148;
}
* { box-sizing: border-box; }
body { color: var(--studio-ink); background: var(--studio-canvas); margin: 0; display: flex; flex-direction: column; min-height: 100vh; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
main { flex: 1; padding-block: 1.5rem 3rem; min-width: 0; }
.container { max-width: 1240px; }
h1,h2,h3,h4,h5,h6 { color: var(--studio-ink); line-height: 1.25; }
h1 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); font-weight: 700; letter-spacing: -.025em; }
h2 { font-size: 1.375rem; font-weight: 700; letter-spacing: -.025em; }
h3,.h5,.card-title { font-weight: 650; }
.text-muted { color: var(--studio-muted) !important; }
.eyebrow { font-size: .7rem; font-weight: 750; letter-spacing: .16em; color: var(--studio-accent); margin-bottom: .65rem; text-transform: uppercase; }
.navbar { background: #142d36; padding-block: .6rem; border-bottom: 1px solid #ffffff14; }
.navbar-brand { font-size: 1.25rem; font-weight: 750; letter-spacing: -.035em; display: flex; align-items: center; gap: .65rem; }
.brand-mark { display: inline-flex; gap: 3px; align-items: center; height: 30px; padding: 0 8px; border-radius: 9px; background: #ffffff14; }
.brand-mark i { width: 3px; background: #94dfcd; border-radius: 2px; height: 10px; }
.brand-mark i:nth-child(2),.brand-mark i:nth-child(4) { height: 18px; }
.brand-mark i:nth-child(3) { height: 25px; }
.navbar-nav { gap: .25rem; align-items: center; }
.navbar .nav-link { color: #c4d1d6; font-size: .875rem; border-radius: 7px; padding: .55rem .8rem !important; }
.navbar .nav-link:hover,.navbar .nav-link.active { background: #ffffff12; color: #fff; }
.navbar .dropdown-menu { border: 1px solid var(--studio-border); border-radius: 12px; padding: .5rem; box-shadow: 0 12px 32px #142d3620; }
.navbar .dropdown-item { border-radius: 6px; padding: .5rem .8rem; }
.studio-intro,.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.studio-intro p:last-child,.page-heading p:last-child { margin-bottom: 0; max-width: 65ch; }
.card { border: 1px solid var(--studio-border); box-shadow: none; border-radius: 8px; overflow: hidden; }
.card-body { padding: 1.25rem; }
.card-header { background: #fff; border-bottom: 1px solid var(--studio-border); padding: .85rem 1.25rem; }
.card-title { margin-bottom: 1rem; }
.btn { font-weight: 600; font-size: .875rem; padding: .6rem 1rem; border-radius: 6px; line-height: 1.4; }
.btn-sm { font-size: .8rem; padding: .4rem .7rem; }
.btn-primary,.nav-pills .nav-link.active { background-color: var(--studio-accent); border-color: var(--studio-accent); }
.btn-primary:hover,.btn-primary:focus { background: #0d5148; border-color: #0d5148; }
.btn-outline-primary { color: var(--studio-accent); border-color: #91bbb2; }
.btn-outline-primary:hover { background: var(--studio-accent); border-color: var(--studio-accent); }
.btn-outline-secondary { color: #455e69; border-color: #c3ced4; }
.btn-outline-danger { color: #ae3445; border-color: #e1b4bc; }
.btn-group { gap: .3rem; flex-wrap: wrap; }
.btn-group > .btn { border-radius: 7px !important; }
.form-label { font-size: .875rem; font-weight: 600; }
.form-control,.form-select { border-color: #cdd8de; border-radius: 8px; padding: .65rem .8rem; color: var(--studio-ink); }
.form-control::placeholder { color: #71818a; }
.form-control:focus,.form-select:focus { border-color: var(--studio-accent); box-shadow: 0 0 0 3px #146c601a; }
.form-text { color: var(--studio-muted); font-size: .8rem; line-height: 1.5; }
.form-check-input:checked { background-color: var(--studio-accent); border-color: var(--studio-accent); }
.nav-tabs { gap: .5rem; border-bottom: 1px solid var(--studio-border); }
.nav-tabs .nav-link { border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--studio-muted); padding: .8rem 1rem; font-weight: 600; }
.nav-tabs .nav-link.active { color: var(--studio-accent); border-color: var(--studio-accent); background: transparent; }
.nav-pills .nav-link { border-radius: 8px; color: var(--studio-muted); font-weight: 600; font-size: .875rem; }
.nav-pills .nav-link.active { color: #fff; }
.table { margin-bottom: 0; vertical-align: middle; --bs-table-hover-bg: #f5f9f8; }
.table > :not(caption) > * > * { padding: .75rem; }
.table thead th { background: #f8fafb; color: var(--studio-muted); font-size: .8rem; letter-spacing: 0; font-weight: 700; white-space: nowrap; border-bottom-color: var(--studio-border); }
.table td { border-color: #edf0f2; font-size: .875rem; }
.table td:first-child a { font-weight: 650; }
.table-responsive { border-radius: 6px; }
.badge { border-radius: 6px; font-size: .7rem; font-weight: 650; padding: .45em .65em; }
.badge.bg-success { background: #e2f3eb !important; color: #22664d; }
.badge.bg-secondary { background: #edf1f4 !important; color: #526570; }
.badge.bg-info { background: #e5f0f8 !important; color: #245b7f; }
.badge.bg-warning { background: #fff0d4 !important; color: #865719; }
.badge.bg-danger { background: #fbe8ec !important; color: #9e3446; }
.alert { border-radius: 10px; font-size: .875rem; padding: 1rem 1.2rem; }
.alert-info { color: #285b6a; background: #edf6fa; border-color: #cce3ec; }
.alert-warning { color: #79551b; background: #fff8e8; border-color: #f1dfb2; }
.modal-content { border-radius: 8px; border: 0; }
.modal-header,.modal-footer { border-color: var(--studio-border); padding: .85rem 1.25rem; }
.modal-body { padding: 1.5rem; }
.footer { padding-block: 1.25rem; border-top: 1px solid var(--studio-border); color: var(--studio-muted); font-size: .75rem; background: #fff; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer details summary { cursor: pointer; }
.footer details[open] { flex-basis: 100%; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; }
code { color: #345967; }
audio { max-width: 100%; }
:focus-visible { outline: 3px solid var(--studio-accent); outline-offset: 3px; }
.btn:focus-visible,.nav-link:focus-visible,.form-control:focus-visible,.form-select:focus-visible,summary:focus-visible { outline: 3px solid var(--studio-accent); outline-offset: 2px; }
.navbar :focus-visible { outline-color: #94dfcd; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 10000; background: white; padding: .75rem; }
.skip-link:focus { top: 1rem; }
.empty-state { text-align: center; padding: 3rem 1.5rem; background: #fafcfb; border: 1px dashed #cbdad5; border-radius: 12px; }
.empty-state .empty-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; background: #e5f2ed; color: var(--studio-accent); border-radius: 16px; font-size: 1.3rem; margin-bottom: 1rem; }
.stats-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin-bottom: 1.25rem; border-block: 1px solid var(--studio-border); background: #fff; }
.stat { padding: .75rem 1rem; border-right: 1px solid var(--studio-border); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: 1.4rem; font-weight: 700; letter-spacing: -.04em; line-height: 1.2; }
.stat span { color: var(--studio-muted); font-size: .8rem; }
.toolbar { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-block: 1.25rem; }
.toolbar .form-control { flex: 1 1 200px; width: auto; }
.toolbar .form-select { flex: 0 1 200px; width: auto; }
.admin-navigation { display: flex; margin-bottom: 1.25rem; }
.admin-navigation .nav-link { flex: 0 1 auto; display: flex; align-items: center; font-size: .875rem; }
.auth-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; max-width: 1000px; margin: 2rem auto; }
.auth-story h1 { max-width: 18ch; font-size: clamp(1.75rem,3vw,2.5rem); }
.auth-story p { max-width: 42ch; }
.auth-story .auth-note { border-left: 3px solid #94bfb4; padding-left: 1rem; margin-top: 2rem; font-size: .875rem; color: var(--studio-muted); }
.auth-card .card-body { padding: 2rem; }
.auth-divider { display: flex; align-items: center; gap: 1rem; color: var(--studio-muted); font-size: .75rem; margin: 1.5rem 0; }
.auth-divider::before,.auth-divider::after { content: ''; height: 1px; background: var(--studio-border); flex: 1; }
.library-tools { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.library-tools .form-control { max-width: 300px; }
@media (max-width: 991px) { .navbar-nav { align-items: stretch; padding-top: 1rem; } .navbar .dropdown-menu { box-shadow: none; } .auth-layout { gap: 2rem; } }
@media (max-width: 767px) {
    main { padding-block: 1.25rem 2.5rem; }
    .studio-intro,.page-heading { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .card-body,.card-header,.modal-body { padding: 1rem; }
    .stats-strip { gap: 0; }
    .stat { padding: .85rem; }
    .stat strong { font-size: 1.3rem; }
    .stat span { font-size: .7rem; }
    .auth-layout { grid-template-columns: 1fr; gap: 1rem; margin: .5rem auto; }
    .auth-story h1 { max-width: none; font-size: 1.5rem; }
    .auth-story .auth-note { display: none; }
    .auth-card .card-body { padding: 1.25rem; }
    .table td { white-space: nowrap; }
    .table td:first-child { white-space: normal; min-width: 150px; overflow-wrap: anywhere; }
    .page-heading h1,.page-heading h2 { overflow-wrap: anywhere; }
    .footer-inner { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

[hidden] { display: none !important; }
@media (max-width: 767px) {
    .admin-users-table td:first-child { min-width: 95px; }
    .admin-users-table > :not(caption) > * > * { padding: .7rem; }
    .admin-users-table .badge { white-space: normal; }
    .library-table, .library-table tbody { display: block; }
    .library-table thead { display: none; }
    .library-table tbody tr { display: grid; grid-template-columns: 1fr; padding: 1rem 0; border-bottom: 1px solid var(--studio-border); }
    .library-table tbody tr:last-child { border-bottom: 0; }
    .library-table td { display: block; border: 0; padding: .3rem 0; white-space: normal; }
    .library-table td:nth-child(2), .library-table td:nth-child(4) { display: none; }
    .library-table .btn-group { margin-top: .5rem; }
}

.event-row { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--studio-border); }
.event-row:last-child { border-bottom: 0; }
@media (max-width:767px) { .event-row { padding: 1rem; } }

.footer-operations { display: inline-flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: center; }

/* Long user-provided names and compact settings must fit without hidden actions. */
h1,h2,h3,h4,h5,h6 { overflow-wrap: anywhere; }
.recording-settings { table-layout: fixed; width: 100%; }
.recording-settings th,.recording-settings td { white-space: normal; overflow-wrap: anywhere; }
@media (pointer: coarse) {
    .btn,.navbar-toggler,.nav-pills .nav-link,.nav-tabs .nav-link,.navbar .nav-link { min-height: 44px; min-width: 44px; }
    .btn { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; max-width: 100%; }
    .form-control,.form-select { min-height: 44px; }
    .modal .btn-close,.alert .btn-close { width: 44px; height: 44px; padding: 0; flex: 0 0 44px; background-size: 1rem; }
    .form-check { min-height: 44px; display: flex; align-items: center; gap: .6rem; padding-left: 0; }
    .form-check .form-check-input { float: none; margin: 0; flex-shrink: 0; }
    .form-check-label { min-height: 44px; display: flex; align-items: center; }
}

.voice-list { display: flex; flex-direction: column; min-width: 0; }
.voice-list .form-check { min-width: 0; }
.voice-list .form-check-label { overflow-wrap: anywhere; min-width: 0; }
.admin-navigation .nav-link,.navbar .nav-link { overflow-wrap: anywhere; }
@media (pointer:coarse) { .navbar-brand { min-height: 44px; } }
.jobs-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
.job-card { overflow-wrap: anywhere; }
.job-title { flex: 1 1 220px; min-width: 0; }
.job-metadata { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
@media(max-width:767px) { .jobs-stats { grid-template-columns: repeat(2,minmax(0,1fr)); } }
#jobs-filter .form-select { min-width: 0; max-width: 100%; }
.password-field { position: relative; }
.password-field input.form-control { min-height: 46px; padding-right: 3.2rem; }
.password-visibility { position: absolute; right: .15rem; top: .05rem; width: 44px; height: 44px; border: 0; border-radius: .5rem; background: transparent; color: var(--bs-secondary-color, #526875); display: grid; place-items: center; }
.password-visibility:hover { background: rgba(20,115,109,.08); }
.password-visibility:focus-visible { outline: 2px solid #13756f; outline-offset: -2px; }

.worker-checklist { display: grid; gap: .65rem; }
.worker-step { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem .75rem; padding: .7rem; border: 1px solid #dde5e9; border-radius: .6rem; }
.worker-step p { flex-basis: 100%; }
.worker-step-running { border-color: #16756f; background: #eaf6f2; }
.worker-step-failed { border-color: #b83a3a; }
.worker-transcript { max-height: 360px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; padding: 1rem; border-radius: .6rem; background: #152c34; color: #e5f1ef; font-size: .8rem; }

/* Sorting works with keyboard headers and touch-friendly controls when headers are hidden. */
.table-sort-button { color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; background: transparent; border: 0; padding: .25rem 0; text-align: left; cursor: pointer; }
.table-sort-button::after { content: ' ↕'; opacity: .6; }
th[aria-sort="ascending"] .table-sort-button::after { content: ' ↑'; opacity: 1; }
th[aria-sort="descending"] .table-sort-button::after { content: ' ↓'; opacity: 1; }
.table-sort-button:focus-visible { outline: 2px solid var(--studio-accent); outline-offset: 3px; border-radius: 3px; }
.table-sort-toolbar { display: none; }
@media (max-width: 767px) {
    .table-sort-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-block: .75rem; }
    .table-sort-toolbar .form-select { flex: 1 1 180px; width: auto; min-width: 0; }
}

.connection-help { border-top: 1px solid var(--studio-border); padding-block: .85rem; min-width: 0; }
.connection-help summary { font-weight: 650; cursor: pointer; min-height: 44px; display: list-item; }
.connection-help pre { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; padding: .85rem; border-radius: .5rem; background: var(--studio-canvas); }
.connection-help dd { overflow-wrap: anywhere; }

.audio-player { min-width: 0; padding: 1rem; border: 1px solid var(--studio-border); border-radius: 6px; background: #f8fafb; }
.audio-player > audio { display: none; }
.audio-player-transport,.audio-player-options { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.audio-player-clock { font-variant-numeric: tabular-nums; margin-left: auto; font-size: .875rem; white-space: nowrap; }
.audio-player-seek { min-height: 44px; cursor: pointer; }
.audio-player-options select { width: auto; min-height: 44px; }
.audio-player .btn { min-height: 44px; }
.audio-chapter-button { width: 100%; text-align: left; white-space: normal; overflow-wrap: anywhere; margin-bottom: .5rem; }
.audio-chapter-button[aria-current=true] { border-color: var(--studio-accent); background: #e1f1ec; color: var(--studio-ink); }
@media (max-width: 420px) { .audio-player { padding: .65rem; } .audio-player-clock { margin-left: 0; flex-basis: 100%; } }

.audio-player-volume { flex: 0 1 110px; width: 110px; min-height: 44px; }

/* Listening library: recordings first, one player, and a material-style creation action. */
.library-heading { margin-bottom: 1.5rem; }
.recordings-filter { margin-top: 0; }
.recordings-table { table-layout: fixed; width: 100%; }
.recordings-table th:first-child { width: 60px; }
.recordings-table th:nth-child(3) { width: 90px; }
.recordings-table th:nth-child(4) { width: 120px; }
.recordings-table th:nth-child(5) { width: 130px; }
.recordings-table th:nth-child(6) { width: 105px; }
.recordings-table th:last-child { width: 196px; }
.recordings-table td { white-space: normal; overflow-wrap: anywhere; }
.recordings-table .recording-title { min-width: 0; }
.recordings-table td:last-child { padding-inline: .5rem; }
.recordings-table .btn { flex-shrink: 0; white-space: nowrap; }
.recordings-table .recording-play-cell { padding-right: 0; }
.recording-play,.recording-state-icon { width: 44px; height: 44px; display: inline-grid; place-items: center; padding: 0; border-radius: 50%; }
.recording-state-icon { color: var(--studio-muted); background: #f0f4f5; }
.recordings-table .recording-selected > td { background: #eaf5f1; }
.library-pagination { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1.5rem; flex-wrap: wrap; }
.library-create { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; white-space: nowrap; min-height: 44px; }
.library-create-plus { font-size: 1.5rem; line-height: 1; font-weight: 400; }
.library-now-playing { position: sticky; top: .75rem; z-index: 100; box-shadow: 0 6px 24px #142d361a; }
.library-now-playing .audio-player { margin-bottom: 0 !important; }
.library-sources summary { cursor: pointer; }
.account-details dt { color: var(--studio-muted); font-size: .8rem; }
.account-details dd { margin-bottom: 1rem; overflow-wrap: anywhere; }
.account-links { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.account-links a { padding-block: .5rem; min-height: 44px; }
.admin-overview-stats .stat { text-decoration: none; }
.admin-overview-stats .stat:hover { border-color: var(--studio-accent); }
.overview-totals { margin-block: 1rem 1.5rem; }
.overview-totals > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .5rem; border-bottom: 1px solid var(--studio-border); }
.overview-totals dt { font-weight: 500; }
.overview-totals dd { margin: 0; font-weight: 700; }
.admin-recent-activity { list-style: none; padding: 0; margin: 0; }
.admin-recent-activity li { padding-block: .75rem; border-bottom: 1px solid var(--studio-border); }
.admin-recent-activity li:last-child { border-bottom: 0; }

@media(max-width:767px) {
  .library-sources .library-table td:last-child { display: block; }
  .library-sources summary span { display: block; margin-left: 0 !important; }
  .library-now-playing { position: static; }
}
.recording-order-form { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-width: 0; }
.recording-order-form select { width: auto; max-width: 100%; }
@media(max-width:767px) { .recording-order-form { width: 100%; } .recording-order-form select { flex: 1; min-width: 0; } }
.audio-transcript-lines { max-height: 24rem; overflow-y: auto; position: relative; border: 1px solid var(--studio-border); border-radius: .75rem; }
.transcript-cue { display: block; width: 100%; text-align: left; color: var(--studio-ink); border: 0; border-bottom: 1px solid var(--studio-border); background: white; padding: .85rem 1rem; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; min-height: 44px; }
.transcript-cue:hover,.transcript-cue[aria-current] { background: #e2f3eb; }

/* Shared workspace layouts: controls stay readable before secondary metadata. */
.page-heading h1,.page-heading h2 { margin-bottom: .35rem; }
.page-heading p { font-size: .9375rem; }
.page-heading > div { min-width: 0; }
.form-label { margin-bottom: .35rem; }
.form-select { padding-right: 2.25rem; }
.table thead a { text-decoration: none; }
.table thead a:hover { text-decoration: underline; }
.table thead th a,.table-sort-button { display: inline-block; padding-block: .4rem; }
.library-heading { align-items: center; margin-bottom: .6rem; }
.library-shortcuts { display: flex; gap: 1.25rem; font-size: .875rem; margin-bottom: 1.25rem; }
.library-shortcuts a { padding-block: .4rem; }
.recordings-card .card-body { padding: 1rem; }
.recordings-card .library-tools { margin-bottom: .75rem; }
.recordings-filter { display: grid; grid-template-columns: minmax(200px,2fr) minmax(430px,3fr) auto; align-items: end; gap: .75rem; margin-bottom: 1rem; }
.recording-filter-fields { grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; }
.recordings-filter > div { min-width: 0; }
.recordings-filter .form-label { font-size: .8rem; }
.filter-actions { display: flex; gap: .25rem; align-items: center; flex-wrap: wrap; }
.recording-title > a { font-weight: 600; text-decoration: none; line-height: 1.5; }
.recording-title > a:hover { text-decoration: underline; }
.recording-actions { display: flex; align-items: start; flex-wrap: wrap; gap: .4rem; }
.recording-more { min-width: 0; }
.recording-more summary { list-style: none; cursor: pointer; }
.recording-more summary::-webkit-details-marker { display: none; }
.recording-more[open] { flex: 1 0 100%; }
.recording-more-content { display: flex; flex-wrap: wrap; gap: .4rem; padding-top: .5rem; }
.recordings-table .badge { font-size: .75rem; font-weight: 500; }
.recordings-table .recording-title .badge { background: #f0f3f4 !important; }
.library-pagination { margin-top: 1rem; }
.admin-heading { margin-bottom: 1rem; flex-direction: row; align-items: center; }
.admin-heading h1 { font-size: 1.125rem; letter-spacing: 0; }
.admin-layout { display: grid; grid-template-columns: 194px minmax(0,1fr); gap: 1.5rem; }
.admin-sidebar,.admin-content { min-width: 0; }
.admin-navigation { flex-direction: column; flex-wrap: nowrap; border: 0; border-radius: 0; padding: 0; background: transparent; gap: .15rem; }
.admin-navigation .nav-link { justify-content: flex-start; text-align: left; border-radius: 5px; min-height: 44px; padding: .6rem .75rem; }
.admin-navigation .nav-link:not(.active):hover { background: #e8eeef; color: var(--studio-ink); }
.admin-menu-toggle { display: flex; width: 100%; justify-content: space-between; align-items: center; min-height: 44px; }
.admin-content .page-heading h2 { font-size: 1.5rem; }
.user-sort-form { gap: .5rem; }
.user-sort-options { margin-bottom: 1rem; }
.user-sort-options > summary { cursor: pointer; padding-block: .5rem; font-size: .875rem; }
.user-sort-form > div { flex: 1 1 120px; min-width: 0; }
.user-sort-form select { width: 100% !important; }
.user-management-heading { flex-direction: row; align-items: center; margin-bottom: .5rem; }
.user-sort-form .form-select { flex: 1 1 110px; min-width: 0; }
.user-sort-form label { font-size: .8rem; }
.disclosure-section { background: #fff; border: 1px solid var(--studio-border); border-radius: 6px; margin-bottom: .75rem; }
.disclosure-section > summary { cursor: pointer; font-weight: 600; padding: 1rem 1.25rem; }
.disclosure-section > .card-body { padding-top: 0; }
.recording-page .page-heading { align-items: start; }
.recording-page .page-heading h1 { font-size: 1.5rem; max-width: 46ch; }
.recording-page .recording-toolbar { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.recording-page .audio-ready { border-color: var(--studio-border); }
.recording-page .recording-maintenance { display: flex; gap: .75rem; justify-content: space-between; flex-wrap: wrap; padding-top: .75rem; }
.source-tabs { margin-bottom: 1.25rem; flex-wrap: nowrap; gap: 0; }
.source-tabs .nav-item { flex: 1; }
.source-tabs .nav-link { width: 100%; padding-inline: .5rem; font-size: .875rem; min-height: 44px; }
.create-source-form { max-width: 760px; }
.create-source-form textarea { min-height: 170px; }
.create-source-note { font-size: .875rem; margin-bottom: 1rem; color: var(--studio-muted); }
.voice-engine { border-top: 1px solid var(--studio-border); padding: .75rem 0; }
.voice-engine legend { float: none; width: auto; font-size: .875rem; font-weight: 600; margin-bottom: .5rem; }
#engine-selection .voice-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .25rem .75rem; }
#engine-selection .form-check { margin-bottom: 0; }
.auth-story .eyebrow { display: none; }
.audio-player input[type=range] { accent-color: var(--studio-accent); }
.audio-player .form-range::-webkit-slider-thumb { background: var(--studio-accent); }
.audio-player .form-range::-moz-range-thumb { background: var(--studio-accent); }
.audio-player-setting { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; }
.audio-player-setting .form-select { flex-shrink: 0; }
.audio-player-setting .audio-player-volume { width: 90px; }
@media(min-width:992px) { .admin-sidebar { position: sticky; top: 1rem; align-self: start; } }
@media(max-width:1199px) {
    .recordings-table th:nth-child(4) { width: 108px; }
    .recordings-table th:nth-child(5) { width: 100px; }
    .recordings-table th:last-child { width: 158px; }
}
@media(max-width:991px) {
    .admin-layout { grid-template-columns: minmax(0,1fr); gap: 1rem; }
    .admin-navigation { margin: .5rem 0 0; }
    .admin-navigation.show { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
    .recordings-filter { grid-template-columns: minmax(0,1fr) auto; }
    .recording-search-field { grid-column: 1; }
    .recording-filter-fields { grid-row: 2; grid-column: 1 / -1; }
    .recordings-table th:nth-child(5),.recordings-table td:nth-child(5) { display: none !important; }
    .recordings-table th:last-child { width: 166px; }
    .recordings-table th:nth-child(6) { width: 94px; }
}
@media(max-width:767px) {
    .library-heading { flex-direction: row; align-items: start; gap: .75rem; }
    .library-heading p { display: none; }
    .library-heading h1 { margin-top: .35rem; }
    .library-shortcuts { margin-bottom: .75rem; }
    .recordings-card .card-body { padding: .75rem; }
    .recordings-filter { gap: .65rem; }
    .recording-filter-fields { grid-template-columns: minmax(0,1fr); }
    .recording-filter-fields.show { display: grid; }
    .recording-filter-toggle { grid-column: 1 / -1; grid-row: 2; justify-self: start; padding: .4rem 0; }
    .recording-filter-fields { grid-row: 3; }
    .recordings-filter .filter-actions { align-self: end; }
    .recordings-filter .form-control,.recordings-filter .form-select { width: 100%; }
    .recordings-table,.recordings-table tbody { display: block; }
    .recordings-table thead { display: none; }
    .recordings-table tbody tr { display: grid; grid-template-columns: 44px minmax(0,1fr); gap: .5rem .75rem; padding: .85rem 0; border-bottom: 1px solid var(--studio-border); }
    .recordings-table tbody tr:last-child { border-bottom: 0; }
    .recordings-table td { display: block; border: 0; padding: 0; min-width: 0; }
    .recordings-table td:first-child { min-width: 0; }
    .recordings-table .recording-play-cell { align-self: start; padding: 0; }
    .recordings-table td:nth-child(6) { display: none !important; }
    .recordings-table td.recording-actions-cell { grid-column: 2; padding: 0; }
    .recordings-table .recording-more[open] { flex-basis: auto; }
    .recordings-table .recording-selected { background: #eaf5f1; }
    .recordings-card .library-tools { flex-wrap: nowrap; gap: .5rem; }
    .recordings-card .library-tools > div { flex-shrink: 0; }
    .recording-order-form { gap: .4rem; width: auto; flex-wrap: nowrap; }
    .recording-order-form label { white-space: nowrap; }
    .recording-order-form select { max-width: 155px; }
    .recording-order-form label { font-size: .75rem; }
    .admin-users-table td:first-child { white-space: normal; min-width: 0; overflow-wrap: anywhere; }
    .admin-users-table td:nth-child(4) { width: 95px; }
    .admin-users-table td:last-child { width: 85px; }
    .admin-users-table > :not(caption) > * > * { padding: .6rem .5rem; }
    .auth-layout { gap: .75rem; }
    .auth-story p { margin-bottom: .25rem; font-size: .9375rem; }
    .auth-card h2 { font-size: 1.25rem; }
    .stats-strip .stat { padding: .75rem .6rem; }
    .jobs-stats { grid-template-columns: repeat(4,minmax(0,1fr)); }
    .job-title h2,.job-title .h5 { font-size: 1.125rem; }
    .audio-player-options { gap: .5rem; }
    .disclosure-section > summary { padding: .85rem 1rem; }
}
