.recorder-page .app--recorder {
    height: 100%;
    min-height: 0;
    overflow: hidden;
    overscroll-behavior-y: contain;
}

.recorder-page .app-header,
.recorder-page .error-banner,
.recorder-page .recorder-toolbar,
.recorder-page .recorder-settings-panel,
.recorder-page .transcript-scope-hint {
    flex-shrink: 0;
}

.recorder-page .recorder-header__left {
    gap: 6px;
}

.recorder-page .header__title--home {
    cursor: pointer;
}

.recorder-page .recorder-header__session-row {
    flex-wrap: wrap;
    row-gap: 4px;
}

.recorder-page .recorder-header__session-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
    min-height: 26px;
    padding: 2px 7px;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    appearance: none;
    font: inherit;
    max-width: min(100%, 34ch);
    color: color-mix(in srgb, var(--color-text) 52%, var(--color-text-dim));
    font-size: 0.82rem;
    line-height: 1.24;
    text-align: left;
    cursor: text;
}

.recorder-page .recorder-header__session-title-text {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recorder-page .recorder-header__session-title[data-empty="true"] {
    min-width: min(168px, 46vw);
    border-style: dashed;
    border-color: color-mix(in srgb, var(--color-accent) 38%, var(--color-border));
    background: color-mix(in srgb, var(--color-accent) 7%, transparent);
    color: color-mix(in srgb, var(--color-accent) 82%, var(--color-text));
    font-weight: 650;
}

.recorder-page .recorder-header__session-title[data-empty="true"]::before {
    content: attr(data-empty-label);
    opacity: 0.9;
}

.recorder-page .recorder-header__session-title:hover,
.recorder-page .recorder-header__session-title:focus-visible {
    border-color: color-mix(in srgb, var(--color-accent) 48%, var(--color-border));
    background: color-mix(in srgb, var(--color-accent) 10%, var(--color-bg-hover));
    color: var(--color-text);
}

.recorder-page .recorder-header__session-title:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--color-accent) 72%, transparent);
    outline-offset: 2px;
}

.recorder-page .header__session-input {
    width: min(220px, 58vw);
    min-width: 0;
    min-height: 32px;
    padding: 5px 9px;
    border-radius: 9px;
    font-size: 0.84rem;
    line-height: 1.2;
}

.recorder-page .recorder-header__session-edit {
    color: color-mix(in srgb, var(--color-text) 54%, var(--color-text-dim));
}

.recorder-page .recorder-header__session-edit:hover {
    color: var(--color-accent);
}

@media (max-width: 600px) {
    .recorder-page .recorder-header__session-row {
        align-items: center;
        flex-wrap: nowrap;
        width: 100%;
        min-width: 0;
    }

    .recorder-page .recorder-header__session-title {
        flex: 1 1 auto;
        min-width: 0;
        max-width: none;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .recorder-page .recorder-header__session-title[data-empty="true"] {
        min-width: 0;
    }

    .recorder-page .recorder-header__session-edit {
        flex: 0 0 auto;
    }

    .recorder-page .recorder-header__status {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 4px;
        min-width: 0;
        width: auto;
    }

    .recorder-page .recorder-header__status .connection-status {
        grid-column: auto;
        justify-self: auto;
        min-width: 0;
        min-height: 0;
        padding-inline: 0;
        flex: 0 1 auto;
        gap: 4px;
    }

    .recorder-page .recorder-header__status #statusText {
        max-width: none;
        overflow: visible;
        text-overflow: clip;
        white-space: nowrap;
        font-size: 0.68rem;
    }
}

.recorder-page .recorder-toolbar {
    margin-top: 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.recorder-page .recorder-toolbar__main {
    display: grid;
    gap: 6px;
}

.recorder-page .recorder-toolbar__shared {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    min-height: 56px;
    padding: 8px 10px;
    border-radius: 16px;
}

.recorder-page .recorder-toolbar__raw {
    display: grid;
    flex: 0 0 100%;
    order: 3;
    gap: 8px;
    width: 100%;
    min-width: 0;
    padding: 12px;
    border-radius: 12px;
    background: var(--color-surface-2);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-border) 62%, transparent);
}

.recorder-page .recorder-toolbar__raw[hidden] {
    display: none !important;
}

.recorder-page .viewer-toolbar__raw-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.recorder-page .viewer-toolbar__raw-head strong {
    font-size: 0.82rem;
}

.recorder-page .viewer-toolbar__raw-head span {
    color: var(--color-text-dim);
    font-size: 0.68rem;
    font-variant-numeric: tabular-nums;
}

.recorder-page #rawTranscriptToolContent {
    width: 100%;
    max-width: 100%;
    max-height: min(34vh, 280px);
    margin: 0;
    overflow: auto;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    color: var(--color-text-muted);
    font: inherit;
    font-size: 0.78rem;
    line-height: 1.65;
    text-wrap: pretty;
}

.recorder-page .recorder-toolbar__stats {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.recorder-page .recorder-toolbar__stats > .toolbar-stat,
.recorder-page .recorder-toolbar__stats > #viewerCount {
    flex: 0 0 auto;
    white-space: nowrap;
}

.recorder-page .recorder-save-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 0;
    color: var(--color-text-muted);
    font-size: var(--font-xs);
    font-weight: 600;
    white-space: nowrap;
}

.recorder-page #recorderSaveStatusText {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recorder-page .recorder-save-status__dot {
    width: 7px;
    height: 7px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--color-text-dim);
}

.recorder-page .recorder-save-status[data-state="saved"] {
    color: var(--color-text-secondary);
}

.recorder-page .recorder-save-status[data-state="saved"] .recorder-save-status__dot {
    background: var(--color-accent);
}

.recorder-page .recorder-save-status[data-state="warning"] {
    color: var(--color-warning);
}

.recorder-page .recorder-save-status[data-state="warning"] .recorder-save-status__dot {
    background: var(--color-warning);
}

.recorder-page .recorder-save-status[data-state="error"] {
    color: var(--color-danger);
}

.recorder-page .recorder-save-status[data-state="error"] .recorder-save-status__dot {
    background: var(--color-danger);
}

@media (max-width: 720px) {
    .recorder-page .recorder-save-status {
        max-width: 14ch;
    }
}

/* Keep the full status in the DOM for screen readers and tooltips, but give
   narrow phones a stable, glanceable label instead of truncating the meaning
   to an ellipsis. */
@media (max-width: 380px) {
    .recorder-page #recorderSaveStatusText[data-compact-label] {
        font-size: 0;
        text-overflow: clip;
    }

    .recorder-page #recorderSaveStatusText[data-compact-label]::after {
        content: attr(data-compact-label);
        display: inline-block;
        font-size: var(--font-xs);
        line-height: 1.2;
        white-space: nowrap;
    }
}

.recorder-page .recorder-toolbar__top-actions,
.recorder-page .recorder-toolbar__actions-left {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.recorder-page .recorder-toolbar__top-actions .btn-text,
.recorder-page .recorder-toolbar__actions-left .btn-text {
    flex: 0 0 auto;
    white-space: nowrap;
}

.recorder-page .recorder-toolbar__top-actions {
    justify-content: flex-end;
    margin-left: auto;
}

.recorder-page .recorder-toolbar__shared-actions {
    order: -1;
    width: auto;
    justify-content: flex-start;
    gap: 0;
}

.recorder-page .recorder-toolbar__actions-left {
    flex: 0 0 auto;
    justify-content: flex-start;
}

.recorder-page .recorder-toolbar__actions-left .btn-text,
.recorder-page .recorder-toolbar__top-actions .btn-text {
    min-height: 40px;
}

.recorder-page .recorder-toolbar__shared .btn-text {
    border-radius: 11px;
    border-color: transparent;
    background: transparent;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.recorder-page .recorder-toolbar__shared .btn-text:hover:not(:disabled) {
    border-color: transparent;
    background: color-mix(in srgb, var(--color-surface-2) 72%, transparent);
}

.recorder-page .btn-text--record {
    position: relative;
}

.recorder-page .btn-text--record:not(:disabled) {
    min-width: 116px;
    border-color: color-mix(in srgb, var(--color-danger) 32%, var(--color-border));
    background: color-mix(in srgb, var(--color-danger) 9%, var(--color-surface));
    color: var(--color-danger);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--color-shadow) 12%, transparent);
}

.recorder-page .btn-text--record:not(:disabled):hover {
    border-color: color-mix(in srgb, var(--color-danger) 46%, var(--color-border));
    background: color-mix(in srgb, var(--color-danger) 14%, var(--color-surface));
    color: var(--color-danger);
}

.recorder-page .btn-text--record.is-recording:not(:disabled) {
    border-color: color-mix(in srgb, var(--color-warning) 36%, var(--color-border));
    background: color-mix(in srgb, var(--color-warning) 11%, var(--color-surface));
    color: var(--color-warning);
}

.recorder-page .btn-text--record.is-recording:not(:disabled):hover {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.recorder-page .btn-text--record.is-resume:not(:disabled) {
    border-color: color-mix(in srgb, var(--color-accent) 34%, var(--color-border));
    background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface));
    color: var(--color-accent);
}

.recorder-page .btn-text--record.is-resume:not(:disabled):hover {
    border-color: color-mix(in srgb, var(--color-accent) 48%, var(--color-border));
    background: color-mix(in srgb, var(--color-accent) 15%, var(--color-surface));
    color: var(--color-accent);
}

.recorder-page #btnReset {
    color: var(--color-text-muted);
}

.recorder-page #btnReset:not(:disabled):hover {
    color: var(--color-text);
}

.session-name-sheet {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal) + 20);
    display: grid;
    align-items: end;
    justify-items: center;
    padding: 12px;
    font-family: var(--font-sans);
}

.session-name-sheet__backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background: color-mix(in srgb, #08101f 36%, transparent);
    cursor: default;
}

.session-name-sheet__dialog {
    position: relative;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    width: min(560px, 100%);
    max-height: min(82vh, 720px);
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--color-border) 82%, transparent);
    border-radius: 22px;
    background: var(--color-surface);
    color: var(--color-text);
    box-shadow: 0 20px 60px color-mix(in srgb, #000 24%, transparent);
    opacity: 0;
    transform: translateY(12px);
    transition-property: opacity, transform;
    transition-duration: 180ms;
    transition-timing-function: cubic-bezier(0.2, 0, 0, 1);
}

.session-name-sheet--visible .session-name-sheet__dialog {
    opacity: 1;
    transform: translateY(0);
}

.session-name-sheet[data-before-recording] .session-name-sheet__dialog {
    grid-template-rows: auto minmax(0, 1fr) auto;
}
.session-name-sheet__start-footer {
    padding: 12px 18px max(16px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--color-border);
}
.session-name-sheet__start-footer p {
    margin: 0 0 10px;
    font-size: .8rem;
    line-height: 1.55;
    color: var(--color-text-secondary);
}
.session-name-sheet__skip {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-text);
    font: inherit;
    cursor: pointer;
}

.session-name-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 18px 12px;
}

.session-name-sheet__header[hidden] {
    display: none;
}

.session-name-sheet__heading {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.session-name-sheet__heading strong {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.session-name-sheet__heading span {
    color: var(--color-text-muted);
    font-size: 0.76rem;
    line-height: 1.45;
}

.session-name-sheet__close,
.session-name-sheet__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    font-size: 1.1rem;
    cursor: pointer;
    transition-property: background-color, color, transform;
    transition-duration: 120ms;
    transition-timing-function: ease-out;
}

.session-name-sheet__close {
    width: auto;
    padding-inline: 10px;
    font-size: 0.78rem;
    font-weight: 750;
}

.session-name-sheet__close:hover,
.session-name-sheet__back:hover {
    background: var(--color-surface-2);
    color: var(--color-text);
}

.session-name-sheet__close:active,
.session-name-sheet__back:active {
    transform: scale(0.96);
}

.session-name-sheet__body {
    min-height: 0;
    overflow-y: auto;
    padding: 2px 18px max(18px, env(safe-area-inset-bottom));
}

.session-name-sheet[data-stage="chips"] .session-name-sheet__body,
.session-name-sheet[data-stage="direct"] .session-name-sheet__body {
    padding-top: 12px;
}

.session-name-sheet__section {
    display: grid;
    gap: 9px;
    margin-top: 14px;
}

.session-name-sheet__section:first-child {
    margin-top: 0;
}

.session-name-sheet__section-title {
    color: var(--color-text);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: -0.015em;
}

.session-name-sheet__section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.session-name-sheet__section-hint {
    flex: 0 0 auto;
    color: var(--color-text-muted);
    font-size: 0.7rem;
    font-weight: 650;
    text-align: right;
}

.session-name-sheet__choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.session-name-choice {
    display: grid;
    align-content: center;
    gap: 4px;
    min-height: 66px;
    padding: 11px 12px;
    border: 1px solid var(--color-border);
    border-radius: 14px;
    background: var(--color-surface-2);
    color: var(--color-text);
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition-property: border-color, background-color, transform;
    transition-duration: 130ms;
    transition-timing-function: ease-out;
}

.session-name-choice:hover {
    border-color: color-mix(in srgb, var(--color-accent) 42%, var(--color-border));
    background: color-mix(in srgb, var(--color-accent) 7%, var(--color-surface-2));
}

.session-name-choice:active {
    transform: scale(0.98);
}

.session-name-choice strong {
    overflow: hidden;
    font-size: 0.86rem;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-name-choice span {
    color: var(--color-text-muted);
    font-size: 0.7rem;
}

.session-name-choice small {
    color: var(--color-text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.35;
}

.session-name-sheet__direct {
    min-height: 44px;
    justify-self: start;
    padding: 8px 4px;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    font-size: 0.78rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.session-name-editor {
    display: grid;
    gap: 15px;
}

.session-name-editor > .session-name-sheet__back,
.session-name-direct-form > .session-name-sheet__back {
    position: sticky;
    top: 0;
    z-index: 2;
    justify-self: start;
    background: var(--color-surface);
    margin-left: -6px;
}

.session-name-editor__preview {
    display: grid;
    gap: 5px;
    min-height: 78px;
    padding: 14px;
    border: 1px solid color-mix(in srgb, var(--color-accent) 22%, var(--color-border));
    border-radius: 15px;
    background: color-mix(in srgb, var(--color-accent) 6%, var(--color-surface-2));
}

.session-name-editor__preview span {
    color: var(--color-text-muted);
    font-size: 0.7rem;
    font-weight: 700;
}

.session-name-editor__preview strong {
    overflow-wrap: anywhere;
    font-size: 1.02rem;
    line-height: 1.4;
    letter-spacing: -0.02em;
}

.session-name-editor__rows {
    display: grid;
    gap: 10px;
}

.session-name-chip-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 8px;
}

.session-name-chip-row__label {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    font-weight: 700;
}

.session-name-chip-row--composition {
    padding: 8px;
    border: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
    border-radius: 14px;
    background: color-mix(in srgb, var(--color-surface-2) 72%, transparent);
}

.session-name-chip-row__order {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 5px;
}

.session-name-chip-row__order button,
.session-name-composition-add button {
    min-width: 40px;
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    background: var(--color-surface);
    color: var(--color-text-muted);
    font: inherit;
    font-size: 0.74rem;
    font-weight: 700;
    cursor: pointer;
}

.session-name-chip-row__order button:disabled {
    cursor: default;
    opacity: 0.35;
}

.session-name-composition-add {
    display: grid;
    gap: 7px;
    padding: 10px 8px 2px;
}

.session-name-composition-add > span {
    color: var(--color-text-muted);
    font-size: 0.72rem;
    font-weight: 700;
}

.session-name-composition-add > div {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.session-name-chip,
.session-name-chip__add {
    min-height: 44px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-surface-2);
    color: var(--color-text);
    font: inherit;
    cursor: pointer;
    transition-property: border-color, background-color, transform;
    transition-duration: 120ms;
    transition-timing-function: ease-out;
}

.session-name-chip {
    min-width: 0;
    overflow: hidden;
    padding: 8px 12px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.session-name-chip__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    padding: 0;
    font-size: 1.05rem;
}

.session-name-chip:hover,
.session-name-chip__add:hover {
    border-color: color-mix(in srgb, var(--color-accent) 42%, var(--color-border));
    background: color-mix(in srgb, var(--color-accent) 7%, var(--color-surface-2));
}

.session-name-chip:active,
.session-name-chip__add:active {
    transform: scale(0.97);
}

.session-name-chip-options {
    grid-column: 2 / 4;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.session-name-chip-options button {
    min-height: 40px;
    padding: 7px 11px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    font-size: 0.76rem;
    cursor: pointer;
}

.session-name-chip-options button[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--color-accent) 40%, var(--color-border));
    background: color-mix(in srgb, var(--color-accent) 10%, transparent);
    color: var(--color-accent);
}

.session-name-chip-add-form,
.session-name-direct-form {
    display: grid;
    gap: 8px;
}

.session-name-chip-add-form {
    grid-column: 2 / 4;
    grid-template-columns: minmax(0, 1fr) auto;
}

.session-name-chip-add-form input,
.session-name-direct-form input {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface-2);
    color: var(--color-text);
    font: inherit;
    outline: none;
}

.session-name-chip-add-form input:focus-visible,
.session-name-direct-form input:focus-visible {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 15%, transparent);
}

.session-name-chip-add-form button,
.session-name-editor__apply {
    min-height: 44px;
    padding: 8px 14px;
    border: 0;
    border-radius: 11px;
    background: var(--color-accent);
    color: #fff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.session-name-editor__actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 2px;
}

.session-name-sheet[data-stage="subject"] .session-name-sheet__body {
    padding-top: 4px;
}

.subject-tag-picker {
    display: grid;
    gap: 14px;
}

.subject-tag-picker__label,
.subject-tag-picker__custom label {
    color: var(--color-text);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.subject-tag-picker__options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.subject-tag-picker__option {
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: var(--color-surface-2);
    color: var(--color-text-muted);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 120ms ease-out, background-color 120ms ease-out, color 120ms ease-out, transform 120ms ease-out;
}

.subject-tag-picker__option:hover {
    border-color: color-mix(in srgb, var(--color-accent) 42%, var(--color-border));
}

.subject-tag-picker__option:active {
    transform: scale(0.97);
}

.subject-tag-picker__option[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--color-accent) 58%, var(--color-border));
    background: color-mix(in srgb, var(--color-accent) 12%, var(--color-surface-2));
    color: var(--color-accent);
}

.subject-tag-picker__empty {
    margin: -3px 0 0;
    color: var(--color-text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.subject-tag-picker__custom {
    display: grid;
    gap: 7px;
    padding-top: 2px;
}

.subject-tag-picker__custom-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.subject-tag-picker__custom input {
    width: 100%;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid var(--color-border);
    border-radius: 11px;
    background: var(--color-surface-2);
    color: var(--color-text);
    font: inherit;
    outline: none;
}

.subject-tag-picker__custom input:focus-visible {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-accent) 15%, transparent);
}

.subject-tag-picker__add {
    min-height: 44px;
    padding: 8px 14px;
    border: 1px solid color-mix(in srgb, var(--color-accent) 45%, var(--color-border));
    border-radius: 11px;
    background: color-mix(in srgb, var(--color-accent) 9%, var(--color-surface));
    color: var(--color-accent);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 750;
    cursor: pointer;
}

.subject-tag-picker__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-top: 3px;
}

.subject-tag-picker__remove {
    min-height: 44px;
    padding: 8px 4px;
    border: 0;
    background: transparent;
    color: var(--color-text-muted);
    font: inherit;
    font-size: 0.76rem;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

.subject-tag-picker__actions .session-name-editor__apply:disabled {
    cursor: default;
    opacity: 0.42;
}

@media (min-width: 720px) {
    .session-name-sheet {
        align-items: center;
    }
}

@media (max-width: 600px) {
    .session-name-sheet {
        padding: 0;
    }

    .session-name-sheet__dialog {
        width: 100%;
        max-height: min(86vh, 720px);
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 22px 22px 0 0;
    }

    .session-name-sheet__choices {
        grid-template-columns: 1fr;
    }

}

@media (prefers-reduced-motion: reduce) {
    .session-name-sheet__dialog,
    .session-name-choice,
    .session-name-chip,
    .session-name-chip__add,
    .session-name-sheet__close,
    .session-name-sheet__back {
        transition-duration: 0.01ms !important;
    }
}

.recorder-page .recorder-toolbar__reference-status {
    max-width: min(28vw, 220px);
}

.recorder-page .recorder-toolbar__top-actions #btnClearRef {
    flex: 0 0 auto;
}

.recorder-page .btn--record-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.recorder-page .recorder-record-action__timer {
    flex: 0 0 auto;
    font-family: var(--font-mono);
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1;
    color: currentColor;
    opacity: 0.92;
}

.recorder-page .recorder-record-action__timer[hidden] {
    display: none !important;
}

.recorder-page .recorder-record-action__label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    max-width: 100%;
    white-space: nowrap;
    font-weight: 600;
}

.recorder-page .recorder-settings-panel {
    width: min(100%, 640px);
    margin: 0;
    border-color: color-mix(in srgb, var(--color-border) 78%, transparent);
    border-radius: 14px;
    background: var(--color-surface);
    box-shadow: 0 6px 18px color-mix(in srgb, var(--color-shadow) 10%, transparent);
}

.recorder-page .recorder-settings-panel[hidden] {
    display: none !important;
}

.recorder-page .recorder-settings-panel__body {
    display: block;
    padding: 10px 12px;
}

.recorder-page .recorder-settings-panel .settings-grid {
    grid-template-columns: minmax(292px, 1.25fr) minmax(220px, 1fr);
    gap: 8px 18px;
}

.recorder-page .recorder-settings-panel .settings-grid__item {
    min-height: 40px;
}

.recorder-page .recorder-settings-panel .lang-btn,
.recorder-page .recorder-settings-panel #btnEditPolishPrompt {
    min-width: 40px;
    min-height: 40px;
}

.recorder-page .recorder-settings-panel .lang-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 4px 5px;
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1;
}

.recorder-page .lang-btn__flag {
    display: block;
    width: 20px;
    height: 13.333px;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 2px;
    box-shadow: 0 0 0 1px color-mix(in srgb, #111 18%, transparent);
}

.recorder-page .recorder-settings-panel .settings-grid__label {
    font-family: var(--font-sans);
    font-size: 0.76rem;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.recorder-page .recorder-settings-panel__polish {
    display: flex;
    align-items: center;
    gap: 6px;
}

.recorder-page .recorder-settings-panel__polish-language {
    width: auto;
    max-width: 112px;
    min-height: 40px;
    font-size: 0.75rem;
}

.recorder-page .settings-grid__item--polish {
    grid-column: 1 / -1;
}

.recorder-page .polish-settings__control {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.recorder-page .polish-settings__profiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    min-width: 0;
}

.recorder-page .polish-settings__profiles button {
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid color-mix(in srgb, var(--color-border) 72%, transparent);
    border-radius: 9px;
    background: color-mix(in srgb, var(--color-surface) 92%, transparent);
    color: var(--color-text-muted);
    font: 650 0.72rem/1.2 var(--font-sans);
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.recorder-page .polish-settings__profiles button[aria-pressed="true"] {
    border-color: color-mix(in srgb, var(--color-accent) 45%, var(--color-border));
    background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface));
    color: var(--color-accent);
}

.recorder-page .polish-settings__profiles button:disabled {
    opacity: 0.45;
    cursor: default;
}

.recorder-page #btnRecorderSettings.btn--active {
    border-color: color-mix(in srgb, var(--color-accent) 62%, transparent);
    color: var(--color-accent);
    background: color-mix(in srgb, var(--color-accent) 10%, var(--color-surface));
}

.recorder-page .transcript.transcript--recorder-editorial > .viewer-placeholder .empty-state,
:root[data-theme="light"] .recorder-page .transcript.transcript--recorder-editorial > .viewer-placeholder .empty-state {
    max-width: 360px;
    padding: 28px 22px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.recorder-page .transcript.transcript--recorder-editorial > .viewer-placeholder .empty-state__icon,
:root[data-theme="light"] .recorder-page .transcript.transcript--recorder-editorial > .viewer-placeholder .empty-state__icon {
    width: 46px;
    height: 46px;
    margin-bottom: 16px;
    opacity: 0.64;
}

.recorder-page .transcript.transcript--recorder-editorial > .viewer-placeholder .empty-state__title,
:root[data-theme="light"] .recorder-page .empty-state__title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.recorder-page .transcript.transcript--recorder-editorial > .viewer-placeholder .empty-state__desc,
:root[data-theme="light"] .recorder-page .empty-state__desc {
    max-width: 34ch;
    margin-bottom: 0;
    font-size: 0.88rem;
    line-height: 1.62;
    word-break: keep-all;
}

.recorder-page .btn,
:root[data-theme="light"] .recorder-page .btn {
    min-height: 40px;
    font-family: var(--font-sans);
    font-weight: 650;
}

.recorder-page .btn-text,
:root[data-theme="light"] .recorder-page .btn-text {
    font-family: var(--font-sans);
    font-weight: 650;
}

.recorder-page .btn--theme,
:root[data-theme="light"] .recorder-page .btn--theme,
.recorder-page .reader-settings__option,
:root[data-theme="light"] .recorder-page .reader-settings__option,
.recorder-page .chat-panel button,
:root[data-theme="light"] .recorder-page .chat-panel button {
    border-radius: 14px;
}

.recorder-page input,
:root[data-theme="light"] .recorder-page input,
.recorder-page textarea,
:root[data-theme="light"] .recorder-page textarea,
.recorder-page select,
:root[data-theme="light"] .recorder-page select {
    border-radius: 14px;
}

.recorder-page .chat-panel,
:root[data-theme="light"] .recorder-page .chat-panel {
    border-radius: 22px;
    overflow: hidden;
}

.recorder-page .chat-panel__header,
:root[data-theme="light"] .recorder-page .chat-panel__header {
    border-radius: 20px 20px 0 0;
}

.recorder-page .chat-panel__resize-handle,
:root[data-theme="light"] .recorder-page .chat-panel__resize-handle {
    border-radius: 14px 0 0 0;
}

.recorder-page .suggestion-chip,
:root[data-theme="light"] .recorder-page .suggestion-chip {
    border-radius: 14px;
}

.recorder-page .recorder-record-action__waveform {
    display: inline-flex;
    flex: 0 1 64px;
    width: clamp(36px, 9vw, 64px);
    height: 12px;
    min-width: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, currentColor 8%, transparent);
    overflow: hidden;
}

.recorder-page .transcript.transcript--recorder-editorial {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior-y: contain;
    padding-top: 8px;
    padding-bottom: 56px;
    scroll-padding-top: 18px;
}

.recorder-page .transcript.transcript--recorder-editorial:not(.transcript--reading-harmony) > .paragraph > .paragraph__label {
    padding-right: 96px !important;
    font-size: clamp(1.05rem, 0.99rem + 0.22vw, 1.16rem) !important;
}

.recorder-page .transcript.transcript--recorder-editorial.hide-timestamps > .paragraph .sentence::before {
    content: none;
    display: none;
}

.recorder-page .transcript.transcript--recorder-editorial > .paragraph .paragraph__actions {
    gap: 4px;
}

.recorder-page .transcript.transcript--recorder-editorial > .paragraph .paragraph__actions .btn,
.recorder-page .transcript.transcript--recorder-editorial > .paragraph .btn--pre-polish {
    min-height: 32px;
    padding: 3px 9px;
    border-radius: 999px;
    border-color: color-mix(in srgb, var(--color-border) 74%, transparent);
    background: var(--color-surface);
}

@media (min-width: 601px) {
    .recorder-page .recorder-toolbar__top-actions {
        padding-left: 8px;
        border-left: 1px solid var(--color-border);
    }
}

.recorder-page .transcript.transcript--recorder-editorial > .paragraph.ask-selected {
    --editorial-rail-line: color-mix(in srgb, var(--color-accent) 58%, transparent);
    --editorial-rail-dot: var(--color-accent);
    --editorial-dot-ring: color-mix(in srgb, var(--color-accent) 18%, transparent);
    background: color-mix(in srgb, var(--color-accent) 5%, transparent) !important;
    box-shadow: none !important;
    border-left: none !important;
}

.recorder-page .transcript.transcript--recorder-editorial > .paragraph.ask-selected > .paragraph__label::before {
    background: var(--color-accent) !important;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent) 18%, transparent) !important;
}

.recorder-page .transcript.transcript--recorder-editorial > .paragraph .sentence.ask-selected,
.recorder-page .transcript.transcript--recorder-editorial > .ungrouped .sentence.ask-selected {
    background: color-mix(in srgb, var(--color-accent) 10%, transparent) !important;
    box-shadow: inset 2px 0 0 var(--color-accent) !important;
    border-left: none !important;
    padding-left: 4px !important;
    border-radius: 8px;
}

.recorder-page .transcript.transcript--recorder-editorial > .interim.ask-selected {
    background: color-mix(in srgb, var(--color-accent) 8%, transparent) !important;
    box-shadow: inset 2px 0 0 var(--color-accent) !important;
    border-left: none !important;
    border-radius: 8px;
}

.recorder-page .transcript.transcript--recorder-editorial > .viewer-placeholder .empty-state {
    width: min(100%, 560px);
}

.recorder-page .transcript.transcript--recorder-editorial > .viewer-placeholder {
    display: grid;
    place-items: center;
}

.recorder-readiness {
    width: min(100%, 440px);
    display: grid;
    justify-items: center;
    gap: 16px;
    padding: 28px 20px;
    color: var(--color-text);
    text-align: center;
}

.recorder-readiness__summary-icon {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border: 2px solid color-mix(in srgb, var(--color-success, #16a34a) 82%, transparent);
    border-radius: 50%;
    color: var(--color-success, #16a34a);
    font-size: 1.45rem;
    font-weight: 850;
    line-height: 1;
}

.recorder-readiness[data-blocked="true"] .recorder-readiness__summary-icon {
    border-color: color-mix(in srgb, var(--color-danger, #dc2626) 78%, transparent);
    color: var(--color-danger, #dc2626);
}

.recorder-readiness__title {
    margin: 0;
    color: var(--color-text);
    font-size: clamp(1.35rem, 4.5vw, 1.75rem);
    font-weight: 820;
    letter-spacing: -0.035em;
    line-height: 1.25;
    text-wrap: balance;
}

.recorder-readiness__items {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 11px 20px;
    text-align: left;
}

.recorder-readiness__item {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--color-text-dim);
    font-size: 0.88rem;
    font-weight: 680;
    line-height: 1.45;
    font-variant-numeric: tabular-nums;
}

.recorder-readiness__item--wide {
    grid-column: auto;
    justify-self: stretch;
}

.recorder-readiness__item-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: color-mix(in srgb, var(--color-text-dim) 13%, transparent);
    color: var(--color-text-dim);
    font-size: 0.9rem;
    font-weight: 900;
    line-height: 1;
}

.recorder-readiness__summary-icon svg,
.recorder-readiness__item-icon svg {
    width: 16px;
    height: 16px;
}

.recorder-readiness__summary-icon svg {
    width: 24px;
    height: 24px;
}

.recorder-readiness__item[data-tone="ready"] {
    color: var(--color-text);
}

.recorder-readiness__item[data-tone="ready"] .recorder-readiness__item-icon {
    background: var(--color-success, #16a34a);
    color: #fff;
}

.recorder-readiness__item[data-tone="warning"] .recorder-readiness__item-icon {
    background: color-mix(in srgb, var(--color-warning, #d97706) 15%, transparent);
    color: var(--color-warning, #b45309);
}

.recorder-readiness__item[data-tone="error"] {
    color: var(--color-danger, #dc2626);
    font-weight: 800;
}

.recorder-readiness__item[data-tone="error"] .recorder-readiness__item-icon {
    background: var(--color-danger, #dc2626);
    color: #fff;
}

@media (max-width: 420px) {
    .recorder-readiness {
        width: min(100%, 352px);
        gap: 14px;
        padding: 22px 14px;
    }

    .recorder-readiness__items {
        gap: 10px 12px;
    }

    .recorder-readiness__item {
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .recorder-readiness,
    .recorder-readiness * {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 900px) {
    .recorder-page .recorder-toolbar__top-actions,
    .recorder-page .recorder-toolbar__actions-left {
        flex-wrap: wrap;
    }

    .recorder-page .recorder-toolbar__reference-status {
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .recorder-page .recorder-toolbar__main {
        gap: 8px;
    }

    .recorder-page .recorder-toolbar__shared {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        align-items: stretch;
        gap: 6px;
        min-height: 0;
        padding: 8px;
    }

    .recorder-page .recorder-toolbar__raw {
        flex-basis: auto;
    }

    .recorder-page .recorder-toolbar__stats {
        order: 1;
        display: flex;
        gap: 6px;
        width: 100%;
    }

    .recorder-page .recorder-toolbar__top-actions {
        flex-wrap: nowrap;
        justify-content: flex-end;
        margin-left: auto;
        gap: 3px;
    }

    .recorder-page .recorder-toolbar__top-actions .btn-text {
        min-width: 40px;
        min-height: 40px;
        justify-content: center;
        padding: 7px;
        line-height: 1;
    }

    .recorder-page .recorder-toolbar__top-actions .btn-text span {
        display: none;
    }

    .recorder-page .recorder-toolbar__top-actions .btn-text svg {
        display: block;
        flex: 0 0 15px;
        width: 15px;
        height: 15px;
    }

    .recorder-page .recorder-toolbar__shared-actions {
        order: 2;
        width: 100%;
        justify-content: stretch;
    }

    .recorder-page .recorder-toolbar__actions-left {
        display: grid;
        grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr) minmax(0, 1fr);
        width: 100%;
        gap: 6px;
    }

    .recorder-page .recorder-toolbar__actions-left .btn-text {
        width: 100%;
        min-width: 0;
        min-height: 40px;
        justify-content: center;
        padding: 6px 8px;
    }

    .recorder-page .recorder-toolbar__actions-left .btn-text--record {
        min-width: 0;
        padding-left: 6px;
        padding-right: 6px;
    }

    .recorder-page .recorder-toolbar__actions-left .btn-text span {
        display: inline-flex;
    }

    .recorder-page .recorder-record-action__timer {
        font-size: 0.76rem;
    }

    .recorder-page .recorder-record-action__label {
        gap: 6px;
    }

    .recorder-page .recorder-settings-panel__body {
        padding: 8px 10px;
    }

    .recorder-page .recorder-settings-panel .settings-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .recorder-page .recorder-settings-panel .settings-grid__item {
        justify-content: space-between;
    }

    .recorder-page .settings-grid__item--polish {
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }

    .recorder-page .polish-settings__control {
        align-items: flex-start;
    }

    .recorder-page .polish-settings__profiles {
        flex: 1;
        width: 100%;
    }

    .recorder-page .polish-settings__profiles button {
        min-height: 40px;
        padding-inline: 7px;
        white-space: normal;
    }

    .recorder-page .transcript.transcript--recorder-editorial:not(.transcript--reading-harmony) > .paragraph > .paragraph__label {
        padding-right: 78px !important;
        font-size: 1.04rem !important;
    }

    .recorder-page .transcript.transcript--recorder-editorial > .paragraph .paragraph__actions .btn,
    .recorder-page .transcript.transcript--recorder-editorial > .paragraph .btn--pre-polish {
        min-height: 32px;
        padding: 3px 9px;
        font-size: 0.72rem;
    }
}
