/* Modern Design System - Notion‑inspired light theme */
:root {
    /* Brand & accents - Notion colors */
    --primary: rgba(55, 53, 47, 0.9);
    --primary-dark: rgba(55, 53, 47, 1);
    --primary-light: rgba(55, 53, 47, 0.6);
    --danger: #ef4444;
    --danger-dark: #dc2626;
    --danger-color: #ef4444;
    --success: #10b981;
    --success-dark: #059669;
    --warning: #f59e0b;

    /* Surface colors – Notion white */
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --bg-tertiary: rgba(55, 53, 47, 0.03);

    /* Typography - Notion text colors (darker for readability) */
    --text-primary: rgba(55, 53, 47, 0.95);
    --text-secondary: rgba(55, 53, 47, 0.85);
    --text-tertiary: rgba(55, 53, 47, 0.7);

    /* Borders & shadows – Notion style */
    --border: rgba(55, 53, 47, 0.09);
    --shadow-sm: rgba(15, 15, 15, 0.03) 0px 0px 0px 1px;
    --shadow: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px;
    --shadow-md: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;
    --shadow-lg: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;
    --shadow-xl: rgba(15, 15, 15, 0.05) 0px 0px 0px 1px, rgba(15, 15, 15, 0.1) 0px 3px 6px, rgba(15, 15, 15, 0.2) 0px 9px 24px;

    /* Radii - Notion minimal */
    --radius: 3px;
    --radius-lg: 3px;
    --radius-xl: 3px;
}

/* Remove WordPress content wrapper padding when plugin is present */
.entry-content:has(.mran-container),
.wp-block-post-content:has(.mran-container) {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    max-width: 100% !important;
}

/* Reset */
.mran-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.mran-container {
    font-family: inherit;
    background: #ffffff;
    padding: 0;
    margin: 0;
    color: rgba(55, 53, 47, 0.9);
    line-height: 1.5;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    height: auto;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
    border: 1px solid rgba(55, 53, 47, 0.09);
    border-radius: 6px;
}

.mran-main-content {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    flex: 1;
    min-height: 500px;
    overflow: visible;
    align-items: stretch;
    position: relative;
    width: 100%;
}

.mran-main-content.mran-trash-view {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    min-height: auto;
    width: 100%;
}

.mran-main-content.mran-shared-view {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    min-height: auto;
    width: 100%;
}

/* Cards - Notion Style */
.mran-card {
    background: #ffffff;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 0;
    border: none;
    transition: none;
    box-sizing: border-box;
}

/* Recorder Card - Left Side (sticky, stays visible while list scrolls) */
.mran-recorder-card {
    flex: 0 1 380px;
    min-width: 280px;
    max-width: 100%;
    padding: 1.5rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
    border-right: 1px solid rgba(55, 53, 47, 0.09);
    position: sticky;
    top: 0;
    align-self: flex-start;
    max-height: 100vh;
    z-index: 5;
}

.mran-recorder-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: center;
    min-height: 0;
    overflow: visible;
    position: relative;
    z-index: 5;
}

.mran-recorder-circle {
    position: relative;
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    isolation: isolate;
}

.mran-recorder-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
}

.mran-record-btn {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: none;
    background: var(--danger);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 22;
}

.mran-record-btn:hover:not(:disabled) {
    background: var(--danger-dark);
}

.mran-record-btn:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.mran-record-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.mran-record-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mran-record-icon {
    width: 48px;
    height: 48px;
    transition: transform 0.3s;
    position: relative;
    z-index: 23;
}

.mran-record-btn.recording .mran-record-icon {
    animation: pulse-icon 1.5s ease-in-out infinite;
}

.mran-recording-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: var(--danger);
    opacity: 0;
    z-index: 21;
    top: 0;
    left: 0;
    pointer-events: none;
}

.mran-recording-pulse.active {
    opacity: 0.4;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.06);
        opacity: 0.2;
    }
    100% {
        transform: scale(1.1125);
        opacity: 0;
    }
}

@keyframes pulse-icon {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Controls */
.mran-recorder-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.mran-control-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(55, 53, 47, 0.16);
    background: #ffffff;
    color: rgba(55, 53, 47, 0.8);
    border-radius: 3px;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.1s ease;
}

.mran-control-btn:hover:not(:disabled) {
    background: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.2);
    color: rgba(55, 53, 47, 0.9);
}

.mran-control-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mran-control-btn svg {
    width: 18px;
    height: 18px;
}

.mran-stop-btn {
    border-color: rgba(239, 68, 68, 0.3);
    color: rgba(239, 68, 68, 0.8);
}

.mran-stop-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.4);
}

/* Status */
.mran-recording-status {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
}

.mran-status-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mran-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    transition: all 0.3s;
}

.mran-status-indicator.recording {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.mran-status-text {
    font-size: 0.875rem;
    color: rgba(55, 53, 47, 0.8);
    font-weight: 400;
}

.mran-timer {
    font-family: inherit;
    font-size: 1.25rem;
    font-weight: 500;
    color: rgba(55, 53, 47, 0.9);
    letter-spacing: 0.02em;
}

/* Audio Preview */
.mran-audio-preview {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    width: 100%;
    flex-shrink: 0;
    overflow: hidden;
}

.mran-preview-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.mran-audio-wrapper {
    margin-bottom: 1.5rem;
}

.mran-audio-wrapper audio {
    width: 100%;
    border-radius: 3px;
    outline: none;
    border: 1px solid rgba(55, 53, 47, 0.09);
}

.mran-preview-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

/* File Upload Section */
.mran-upload-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(55, 53, 47, 0.09);
    width: 100%;
    text-align: center;
}

.mran-upload-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 1.5rem;
    color: rgba(55, 53, 47, 0.7);
    font-size: 0.8125rem;
    font-weight: 400;
}

.mran-upload-divider::before,
.mran-upload-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(55, 53, 47, 0.09);
}

.mran-upload-divider span {
    padding: 0 1rem;
}

.mran-file-upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ffffff;
    border: 1px dashed rgba(55, 53, 47, 0.16);
    border-radius: 3px;
    color: rgba(55, 53, 47, 0.85);
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.1s ease;
}

.mran-file-upload-btn:hover {
    background: rgba(55, 53, 47, 0.03);
    border-color: rgba(55, 53, 47, 0.24);
    color: rgba(55, 53, 47, 0.95);
}

.mran-file-upload-btn svg {
    width: 20px;
    height: 20px;
}

.mran-file-hint {
    margin-top: 0.75rem;
    font-size: 0.75rem;
    color: rgba(55, 53, 47, 0.7);
    font-weight: 400;
}

.mran-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(55, 53, 47, 0.16);
    border-radius: 3px;
    background: #ffffff;
    color: rgba(55, 53, 47, 0.8);
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.1s ease;
    white-space: nowrap;
    min-width: 120px;
    flex: 0 1 auto;
}

.mran-action-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: block;
}

.mran-action-btn span {
    white-space: nowrap;
}

.mran-upload-btn {
    border-color: rgba(16, 185, 129, 0.3);
    color: rgba(16, 185, 129, 0.9);
    background: #ffffff;
}

.mran-upload-btn:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.4);
    color: rgba(16, 185, 129, 1);
}

.mran-upload-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.mran-discard-btn {
    border-color: rgba(239, 68, 68, 0.3);
    color: rgba(239, 68, 68, 0.8);
    background: #ffffff;
}

.mran-discard-btn:hover:not(:disabled) {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.4);
    color: rgba(239, 68, 68, 1);
}

.mran-discard-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Progress */
.mran-upload-progress {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    width: 100%;
    flex-shrink: 0;
    overflow: hidden;
}

.mran-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.mran-progress-text {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.mran-progress-percent {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 600;
}

.mran-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.mran-progress-fill {
    height: 100%;
    background: var(--text-primary);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* List Card - Scrollable Right Side */
.mran-list-card {
    flex: 1 1 320px;
    min-width: 280px;
    max-width: 960px;
    padding: 1.5rem;
    margin: 0;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    box-sizing: border-box;
}

.mran-main-content.mran-trash-view .mran-recorder-card {
    display: none;
}

.mran-main-content.mran-shared-view .mran-recorder-card {
    display: none;
}

.mran-main-content.mran-trash-view .mran-list-card {
    flex: 1 1 auto;
    display: block;
    width: 100%;
    max-width: 960px;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    padding: 0;
    margin: 0;
}

.mran-main-content.mran-shared-view .mran-list-card {
    flex: 1 1 auto;
    display: block;
    width: 100%;
    max-width: 960px;
    min-width: 0;
    min-height: 0;
    overflow: visible;
    padding: 0;
    margin: 0;
}

.mran-main-content.mran-trash-view .mran-section-header {
    padding: 1.5rem 1.5rem 1.25rem;
    margin-bottom: 0;
}

.mran-main-content.mran-shared-view .mran-section-header {
    padding: 1.5rem 1.5rem 1.25rem;
    margin-bottom: 0;
}

.mran-main-content.mran-trash-view .mran-recordings-list {
    width: 100%;
    max-width: none;
    padding-right: 0;
}

.mran-main-content.mran-shared-view .mran-section-header,
.mran-main-content.mran-shared-view .mran-list-toolbar,
.mran-main-content.mran-shared-view .mran-recordings-list {
    max-width: 980px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.mran-main-content.mran-trash-view .mran-recording-item {
    width: 100%;
    max-width: none;
}

.mran-main-content.mran-trash-view figure.wp-block-table,
.mran-main-content.mran-trash-view .wp-block-table {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

.mran-section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.25rem;
    gap: 1rem;
    flex-shrink: 0;
    min-height: 0;
}

.mran-section-header-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}


.mran-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.mran-section-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.mran-refresh-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.1s ease;
    color: rgba(55, 53, 47, 0.5);
    flex-shrink: 0;
}

.mran-refresh-btn:hover {
    background: rgba(55, 53, 47, 0.06);
    color: rgba(55, 53, 47, 0.8);
}

.mran-refresh-btn svg {
    width: 20px;
    height: 20px;
}

.mran-list-toolbar {
    padding: 0 1.5rem 1rem;
    border-bottom: 1px solid rgba(55, 53, 47, 0.08);
}

.mran-toolbar-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mran-search-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(55, 53, 47, 0.1);
    border-radius: 8px;
    background: #ffffff;
    flex: 1;
    min-width: 0;
}

.mran-search-icon {
    width: 15px;
    height: 15px;
    color: rgba(55, 53, 47, 0.4);
    flex-shrink: 0;
}

.mran-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0;
    font-size: 0.8125rem;
    color: rgba(55, 53, 47, 0.92);
    outline: none;
    box-shadow: none;
    min-width: 0;
}

.mran-search-input::placeholder {
    color: rgba(55, 53, 47, 0.4);
}

/* Tag picker */
.mran-tag-picker {
    position: relative;
    flex-shrink: 0;
}

.mran-tag-picker-toggle {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    border: 1px solid rgba(55, 53, 47, 0.12);
    background: #ffffff;
    color: rgba(55, 53, 47, 0.65);
    border-radius: 7px;
    padding: 0.4375rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.mran-tag-picker-toggle:hover {
    border-color: rgba(55, 53, 47, 0.22);
    color: rgba(55, 53, 47, 0.85);
}

.mran-tag-picker-toggle.active {
    border-color: rgba(55, 53, 47, 0.3);
    color: rgba(55, 53, 47, 0.92);
    background: rgba(55, 53, 47, 0.04);
}

.mran-tag-picker-arrow {
    transition: transform 0.15s ease;
}

.mran-tag-picker-toggle.active .mran-tag-picker-arrow {
    transform: rotate(180deg);
}

.mran-tag-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    width: 220px;
    background: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.12);
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    z-index: 100;
    overflow: hidden;
}

.mran-tag-dropdown.open {
    display: block;
}

.mran-tag-dropdown-search {
    padding: 0.5rem;
    border-bottom: 1px solid rgba(55, 53, 47, 0.06);
}

.mran-tag-dropdown-search input {
    width: 100%;
    border: 1px solid rgba(55, 53, 47, 0.1);
    border-radius: 5px;
    padding: 0.375rem 0.5rem;
    font-size: 0.8125rem;
    color: rgba(55, 53, 47, 0.92);
    outline: none;
    background: rgba(55, 53, 47, 0.02);
    box-sizing: border-box;
    box-shadow: none;
}

.mran-tag-dropdown-search input:focus {
    border-color: rgba(55, 53, 47, 0.25);
    background: #ffffff;
}

.mran-tag-dropdown-search input::placeholder {
    color: rgba(55, 53, 47, 0.35);
}

.mran-tag-dropdown-list {
    max-height: 200px;
    overflow-y: auto;
    padding: 0.25rem 0;
}

.mran-tag-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4375rem 0.625rem;
    cursor: pointer;
    transition: background 0.1s ease;
    font-size: 0.8125rem;
    color: rgba(55, 53, 47, 0.8);
    margin: 0;
}

.mran-tag-dropdown-item:hover {
    background: rgba(55, 53, 47, 0.04);
}

.mran-tag-dropdown-item.selected {
    color: rgba(55, 53, 47, 0.95);
    font-weight: 500;
}

.mran-tag-check {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: rgba(55, 53, 47, 0.7);
}

.mran-tag-dropdown-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mran-tag-dropdown-count {
    color: rgba(55, 53, 47, 0.4);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.mran-tag-dropdown-empty {
    padding: 0.75rem 0.625rem;
    color: rgba(55, 53, 47, 0.45);
    font-size: 0.8125rem;
    text-align: center;
}

/* Selected tags chips */
.mran-selected-tags {
    display: none;
    flex-wrap: wrap;
    gap: 0.375rem;
    padding-top: 0.625rem;
}

.mran-selected-tags:not(:empty) {
    display: flex;
}

/* Shared direction filter pills */
.mran-shared-filter {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.mran-shared-filter-btn {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(55, 53, 47, 0.12);
    background: #ffffff;
    color: rgba(55, 53, 47, 0.65);
    border-radius: 7px;
    padding: 0.4375rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    line-height: 1;
}

.mran-shared-filter-btn:hover {
    border-color: rgba(55, 53, 47, 0.22);
    color: rgba(55, 53, 47, 0.85);
}

.mran-shared-filter-btn.active {
    border-color: rgba(55, 53, 47, 0.3);
    color: rgba(55, 53, 47, 0.92);
    background: rgba(55, 53, 47, 0.07);
    font-weight: 600;
}

.mran-selected-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(55, 53, 47, 0.06);
    border: 1px solid rgba(55, 53, 47, 0.1);
    border-radius: 5px;
    padding: 0.1875rem 0.25rem 0.1875rem 0.5rem;
    font-size: 0.75rem;
    color: rgba(55, 53, 47, 0.8);
    font-weight: 500;
    line-height: 1;
}

.mran-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: transparent;
    color: rgba(55, 53, 47, 0.45);
    cursor: pointer;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1;
    padding: 0;
    transition: all 0.1s ease;
}

.mran-tag-remove:hover {
    background: rgba(55, 53, 47, 0.1);
    color: rgba(55, 53, 47, 0.8);
}

.mran-search-empty {
    padding: 1.25rem 1rem;
    color: rgba(55, 53, 47, 0.6);
    font-size: 0.875rem;
    text-align: center;
}

/* Recordings List */
.mran-recordings-list {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;
    padding-right: 0.5rem;
    box-sizing: border-box;
}

.mran-recordings-list::-webkit-scrollbar {
    width: 6px;
}

.mran-recordings-list::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.mran-recordings-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.6);
    border-radius: 3px;
}

.mran-recordings-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-tertiary);
}

.mran-recording-item {
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 0;
    background: #ffffff;
    border-bottom: 1px solid rgba(55, 53, 47, 0.09);
    transition: background-color 0.1s ease;
    cursor: pointer;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

.mran-recording-item:hover {
    background: rgba(55, 53, 47, 0.03);
    border-bottom-color: rgba(55, 53, 47, 0.09);
    box-shadow: none;
}

.mran-recording-item.mran-last-visited {
    background: rgba(99, 102, 241, 0.06);
    border-left: 3px solid rgba(99, 102, 241, 0.5);
    padding-left: calc(1rem - 3px);
}

.mran-recording-item.mran-last-visited:hover {
    background: rgba(99, 102, 241, 0.09);
}

.mran-recording-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.mran-recording-item-header > div:first-child {
    flex: 1;
    min-width: 0;
}

.mran-recording-item-title {
    font-weight: 500;
    color: rgba(55, 53, 47, 0.9);
    margin-bottom: 0.25rem;
    font-size: 0.9375rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
}

.mran-recording-item-date {
    font-size: 0.8125rem;
    color: rgba(55, 53, 47, 0.7);
    font-weight: 400;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.mran-date-label {
    font-weight: 500;
    color: rgba(55, 53, 47, 0.6);
    font-size: 0.75rem;
}

.mran-recording-item-status {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    background: rgba(55, 53, 47, 0.08);
    border: none;
}

.mran-status-uploaded {
    background: rgba(187, 247, 208, 0.55);
    color: rgba(21, 128, 61, 0.92);
    border: 1px solid rgba(74, 222, 128, 0.42);
}

.mran-status-transcribing {
    background: rgba(187, 247, 208, 0.55);
    color: rgba(21, 128, 61, 0.92);
    border: 1px solid rgba(74, 222, 128, 0.42);
}

.mran-status-transcribed {
    background: rgba(55, 53, 47, 0.08);
    color: rgba(55, 53, 47, 0.7);
}

.mran-status-summarizing {
    background: rgba(187, 247, 208, 0.55);
    color: rgba(21, 128, 61, 0.92);
    border: 1px solid rgba(74, 222, 128, 0.42);
}

.mran-status-summarized {
    background: rgba(55, 53, 47, 0.08);
    color: rgba(55, 53, 47, 0.7);
}

.mran-status-error {
    background: rgba(239, 68, 68, 0.1);
    color: rgba(239, 68, 68, 0.8);
}

/* Status wrapper for multiple badges */
.mran-recording-item-status-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
}

/* Additional status badges */
.mran-status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-size: 0.6875rem;
    font-weight: 500;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
}

.mran-status-regenerated {
    background: rgba(34, 197, 94, 0.1);
    color: rgba(34, 197, 94, 0.9);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.mran-status-deleted {
    background: rgba(239, 68, 68, 0.1);
    color: rgba(239, 68, 68, 0.9);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.mran-status-api-limit {
    background: rgba(251, 191, 36, 0.1);
    color: rgba(251, 191, 36, 0.9);
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.mran-status-shared {
    background: rgba(59, 130, 246, 0.1);
    color: rgba(29, 78, 216, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.18);
}

.mran-status-processing {
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(187, 247, 208, 0.35) inset;
}

.mran-status-processing::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
    animation: mran-shimmer 1.7s ease-in-out infinite;
}

.mran-recording-item-duration {
    display: inline-flex;
    align-items: center;
}

.mran-duration-label {
    font-size: 0.75rem;
    color: rgba(55, 53, 47, 0.7);
    margin-right: 0.25rem;
}

.mran-duration-value {
    font-size: 0.75rem;
    color: rgba(55, 53, 47, 0.85);
    font-weight: 500;
}

.mran-recording-item-preview {
    margin-top: 0.75rem;
    padding-top: 0;
}

.mran-recording-item-preview h4 {
    font-size: 0.6875rem;
    color: rgba(55, 53, 47, 0.7);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.mran-recording-item-preview p {
    font-size: 0.8125rem;
    color: rgba(55, 53, 47, 0.85);
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    font-weight: 400;
}

.mran-processing-preview {
    margin-top: 0.875rem;
}

.mran-processing-block {
    display: block;
    width: 100%;
    padding: 0.875rem 1rem;
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.95) 0%, rgba(236, 253, 245, 0.88) 100%);
    border: 1px solid rgba(134, 239, 172, 0.45);
}

.mran-processing-block-compact {
    padding: 0.75rem 0.875rem;
}

.mran-processing-skeleton {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.mran-skeleton-line {
    display: block;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(187, 247, 208, 0.42) 0%, rgba(255, 255, 255, 0.9) 50%, rgba(187, 247, 208, 0.42) 100%);
    background-size: 200% 100%;
    animation: mran-shimmer-bg 1.5s linear infinite;
}

.mran-skeleton-line-short {
    width: 72%;
}

.mran-recording-item-shared-meta {
    color: rgba(55, 53, 47, 0.68);
}

/* Recording Item Actions */
.mran-recording-item {
    position: relative;
}

.mran-recording-item-actions {
    position: absolute;
    bottom: 0.75rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.mran-recording-item:hover .mran-recording-item-actions {
    opacity: 1;
}

/* Recording item action buttons - icon size only */
.mran-recording-item-actions .mran-action-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    max-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(55, 53, 47, 0.12);
    border-radius: 4px;
    background: #ffffff;
    color: rgba(55, 53, 47, 0.7);
    cursor: pointer;
    transition: all 0.15s ease;
    padding: 0;
    flex-shrink: 0;
    gap: 0;
}

.mran-recording-item-actions .mran-action-btn:hover {
    background: rgba(55, 53, 47, 0.06);
    border-color: rgba(55, 53, 47, 0.2);
    color: rgba(55, 53, 47, 0.9);
}

.mran-recording-item-actions .mran-action-btn:active {
    transform: scale(0.95);
}

.mran-recording-item-actions .mran-action-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.mran-recording-item-actions .mran-action-btn.loading {
    pointer-events: none;
}

.mran-recording-item-actions .mran-action-btn svg {
    width: 16px;
    height: 16px;
}

.mran-recording-item-actions .mran-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

.mran-recording-item-actions .mran-restore-btn:hover {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.mran-recording-item-actions .mran-permanently-delete-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

/* Loading */
.mran-loading {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@keyframes mran-shimmer {
    100% {
        transform: translateX(100%);
    }
}

@keyframes mran-shimmer-bg {
    0% {
        background-position: 100% 50%;
    }
    100% {
        background-position: -100% 50%;
    }
}

/* Loader inside detail body: fill and center */
#mran-detail-body .mran-loading {
    flex: 1;
    justify-content: center;
    width: 100%;
}

.mran-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Detail Page - Inline Sub-page */
.mran-detail-page {
    display: none;
    flex-direction: column;
    width: 100%;
    min-height: 500px;
    background: #ffffff;
    /* height is set dynamically by JS on open to exactly fill viewport */
}

.mran-detail-page.active {
    display: flex;
}

.mran-detail-page-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid rgba(55, 53, 47, 0.08);
    flex-shrink: 0;
    min-height: 56px;
}

.mran-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: rgba(55, 53, 47, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.mran-back-btn:hover {
    background: rgba(55, 53, 47, 0.06);
    color: rgba(55, 53, 47, 0.95);
}

.mran-back-btn:active {
    background: rgba(55, 53, 47, 0.1);
}

.mran-back-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.mran-detail-page-title {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(55, 53, 47, 0.95);
    letter-spacing: -0.01em;
    margin: 0;
}

.mran-detail-page-body {
    padding: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
    background: #ffffff;
    min-height: 0;
}

/* Detail Layout: Nav left (right-aligned items) + Content right */
.mran-detail-layout {
    display: flex;
    flex: 1;
    overflow: hidden;
    width: 100%;
    min-height: 0;
}

/* Sticky sidebar navigation — left side, items right-aligned toward content */
.mran-detail-nav {
    width: 190px;
    flex-shrink: 0;
    background: #ffffff;
    border-right: 1px solid rgba(55, 53, 47, 0.08);
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0;
    align-self: flex-start;
    position: sticky;
    top: 0;
    max-height: 100%;
}

.mran-detail-nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* right-align icon+text toward content */
    gap: 0.5rem;
    padding: 0.5rem 0.75rem 0.5rem 0.5rem;
    color: rgba(55, 53, 47, 0.65);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    border-right: 2px solid transparent; /* indicator on content side */
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}

.mran-detail-nav-item:hover {
    color: rgba(55, 53, 47, 0.9);
    background: rgba(55, 53, 47, 0.03);
}

.mran-detail-nav-item.active {
    color: rgba(55, 53, 47, 0.95);
    border-right-color: rgba(55, 53, 47, 0.4);
    background: rgba(55, 53, 47, 0.03);
    font-weight: 600;
}

.mran-detail-nav-item svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    opacity: 0.7;
    order: 2; /* icon after text */
}

.mran-detail-nav-item span {
    order: 1; /* text first (left) */
}

.mran-detail-nav-item.active svg {
    opacity: 1;
}

/* Scrollable content area — right side, main reading column */
.mran-detail-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: #ffffff;
    padding: 0 2.5rem;
}

.mran-detail-content > .mran-detail-section {
    max-width: 980px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.mran-detail-content::-webkit-scrollbar {
    width: 6px;
}

.mran-detail-content::-webkit-scrollbar-track {
    background: transparent;
}

.mran-detail-content::-webkit-scrollbar-thumb {
    background: rgba(55, 53, 47, 0.12);
    border-radius: 3px;
}

.mran-detail-content::-webkit-scrollbar-thumb:hover {
    background: rgba(55, 53, 47, 0.2);
}

/* Individual sections */
.mran-detail-section {
    border-bottom: 1px solid rgba(55, 53, 47, 0.08);
    padding: 0;
}

.mran-detail-section:last-child {
    border-bottom: none;
}

/* Section header (icon + title) */
.mran-panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid rgba(55, 53, 47, 0.06);
    position: sticky;
    top: 0;
    z-index: 2;
}

.mran-panel-icon {
    width: 16px;
    height: 16px;
    color: rgba(55, 53, 47, 0.7);
    flex-shrink: 0;
}

.mran-panel-header span {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(55, 53, 47, 0.85);
    letter-spacing: -0.01em;
}

/* Section body */
.mran-panel-content {
    padding: 1.25rem 1.5rem;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Transcript scrollable wrapper */
.mran-transcript-scrollable {
    max-height: 1500px;
    overflow-y: auto;
    overflow-x: hidden;
}

.mran-transcript-scrollable::-webkit-scrollbar {
    width: 6px;
}

.mran-transcript-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.mran-transcript-scrollable::-webkit-scrollbar-thumb {
    background: rgba(55, 53, 47, 0.12);
    border-radius: 3px;
}

.mran-transcript-scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(55, 53, 47, 0.2);
}

/* Transcript section: panel header is inside the scrollable so the scrollbar never
   hides behind the sticky header (they live in separate rendering contexts). */
.mran-detail-section[data-section="transcript"] .mran-panel-content {
    padding: 0;
}

.mran-detail-section[data-section="transcript"] .mran-transcript-list {
    padding: 0.75rem 1.5rem 1.25rem;
}

.mran-detail-section[data-section="transcript"] .mran-plain-text,
.mran-detail-section[data-section="transcript"] .mran-empty-state {
    padding: 1.25rem 1.5rem;
}

/* Recording Info Panel - Notion Style */
.mran-recording-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: rgba(55, 53, 47, 0.95);
    margin-bottom: 0.875rem;
    line-height: 1.5;
    letter-spacing: -0.01em;
    flex-shrink: 0;
}

.mran-recording-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.875rem;
    flex-shrink: 0;
}

.mran-meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex-shrink: 0;
}

.mran-meta-label {
    font-size: 0.625rem;
    font-weight: 600;
    color: rgba(55, 53, 47, 0.65);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mran-meta-value {
    font-size: 0.8125rem;
    color: rgba(55, 53, 47, 0.9);
    font-weight: 400;
    line-height: 1.4;
}

.mran-recording-tags {
    padding-top: 0.75rem;
    border-top: 1px solid rgba(55, 53, 47, 0.08);
    margin-bottom: 0.875rem;
    margin-top: 0.75rem;
    flex-shrink: 0;
}

.mran-audio-player {
    margin-top: 0.75rem;
    margin-bottom: 0.875rem;
    flex-shrink: 0;
}

.mran-audio-player audio {
    display: none;
}

.mran-player-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(55, 53, 47, 0.09);
    border-radius: 4px;
}

.mran-player-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(55, 53, 47, 0.8);
    transition: color 0.2s;
    flex-shrink: 0;
    border-radius: 4px;
}

.mran-player-btn:hover {
    color: rgba(55, 53, 47, 1);
    background: rgba(55, 53, 47, 0.05);
}

.mran-player-btn:active {
    transform: scale(0.95);
}

.mran-player-btn svg {
    width: 20px;
    height: 20px;
}

.mran-player-progress-wrapper {
    flex: 1;
    position: relative;
    height: 4px;
    background: rgba(55, 53, 47, 0.09);
    border-radius: 2px;
    cursor: pointer;
    transition: height 0.2s;
}

.mran-player-progress-wrapper:hover {
    height: 6px;
}

.mran-player-progress-wrapper.waiting {
    cursor: wait;
    opacity: 0.6;
}

.mran-player-progress-wrapper.waiting:hover {
    opacity: 0.8;
}

.mran-player-progress {
    position: relative;
    width: 100%;
    height: 100%;
}

.mran-player-progress-bar {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: rgba(55, 53, 47, 0.4);
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
}

.mran-player-progress-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: rgba(55, 53, 47, 0.8);
    border-radius: 50%;
    cursor: grab;
    transition: left 0.1s linear, width 0.2s, height 0.2s;
    opacity: 0;
}

.mran-player-progress-wrapper:hover .mran-player-progress-handle {
    opacity: 1;
}

.mran-player-progress-handle:active {
    cursor: grabbing;
    width: 14px;
    height: 14px;
}

.mran-player-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: rgba(55, 53, 47, 0.7);
    flex-shrink: 0;
    min-width: 80px;
    justify-content: flex-end;
    font-variant-numeric: tabular-nums;
}

.mran-player-separator {
    color: rgba(55, 53, 47, 0.4);
}

.mran-player-current-time,
.mran-player-duration {
    font-variant-numeric: tabular-nums;
}

.mran-recording-preview-modal {
    margin-top: 0.75rem;
    padding-top: 0.875rem;
    border-top: 1px solid rgba(55, 53, 47, 0.08);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.mran-recording-preview-modal h4 {
    font-size: 0.6875rem;
    font-weight: 600;
    color: rgba(55, 53, 47, 0.65);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.mran-recording-preview-modal p {
    font-size: 0.875rem;
    color: rgba(55, 53, 47, 0.85);
    line-height: 1.8;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Grid List Styles - Notion Style */
.mran-grid-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mran-grid-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(55, 53, 47, 0.9);
    padding: 0.25rem 0;
    font-weight: 400;
    transition: color 0.15s ease;
}

.mran-grid-list li:hover {
    color: rgba(55, 53, 47, 0.95);
}

.mran-bullet {
    color: rgba(55, 53, 47, 0.65);
    font-weight: 400;
    flex-shrink: 0;
    width: 1.5rem;
    margin-top: 0.125rem;
    font-size: 0.875rem;
}

.mran-action-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mran-action-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mran-assignee,
.mran-deadline {
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
}

.mran-empty-state {
    color: rgba(55, 53, 47, 0.6);
    font-size: 0.875rem;
    font-style: normal;
    text-align: center;
    padding: 2rem 1rem;
    font-weight: 400;
}

.mran-plain-text {
    font-size: 0.875rem;
    line-height: 1.8;
    color: rgba(55, 53, 47, 0.9);
    white-space: pre-wrap;
    font-weight: 400;
}

/* Summary section */
.mran-detail-section[data-section="summary"] .mran-panel-content p {
    font-size: 0.875rem;
    line-height: 1.8;
    color: rgba(55, 53, 47, 0.9);
    font-weight: 400;
}

.mran-summary-sections {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.mran-summary-section {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.mran-summary-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(55, 53, 47, 0.95);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: -0.01em;
}

.mran-summary-percentage {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(55, 53, 47, 0.65);
    background: rgba(55, 53, 47, 0.06);
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
}

.mran-summary-content {
    font-size: 0.875rem;
    line-height: 1.8;
    color: rgba(55, 53, 47, 0.85);
    font-weight: 400;
}

/* Transcript section */
.mran-transcript-list {
    gap: 0;
    display: flex;
    flex-direction: column;
}

.mran-transcript-item {
    padding: 0.875rem 0;
    border-bottom: 1px solid rgba(55, 53, 47, 0.08);
    transition: background-color 0.15s ease;
}

.mran-transcript-item:last-child {
    border-bottom: none;
}

.mran-transcript-speaker {
    font-size: 0.8125rem;
    color: rgba(55, 53, 47, 0.95);
    font-weight: 600;
    letter-spacing: -0.01em;
}

.mran-transcript-time {
    font-size: 0.6875rem;
    color: rgba(55, 53, 47, 0.6);
    font-weight: 500;
    margin-left: 0.5rem;
}

.mran-transcript-text {
    font-size: 0.875rem;
    line-height: 1.8;
    color: rgba(55, 53, 47, 0.9);
    font-weight: 400;
    margin-top: 0.375rem;
}

/* Detail layout responsive - tablet */
@media (max-width: 900px) {
    .mran-detail-nav {
        width: 150px;
    }

    .mran-detail-content {
        padding: 0 1.25rem;
    }
}

/* Detail Page Responsive - Mobile */
@media (max-width: 768px) {
    .mran-detail-page-header {
        padding: 0.5rem 1rem;
        gap: 0.5rem;
    }

    /* On mobile the page itself scrolls — remove all overflow locks in the chain */
    .mran-detail-page {
        height: auto !important;
        max-height: none;
        min-height: auto;
        overflow: visible;
    }

    .mran-detail-page-body {
        overflow: visible;
        flex: 0 0 auto;
    }

    .mran-detail-layout {
        overflow: visible;
        flex: 0 0 auto;
        min-height: 0;
    }

    .mran-detail-nav {
        display: none;
    }

    .mran-detail-content {
        width: 100%;
        padding: 0;
        overflow-y: visible;
        overflow-x: visible;
        flex: 0 0 auto;
    }

    .mran-panel-content {
        padding: 1rem;
    }

    .mran-detail-section[data-section="transcript"] .mran-transcript-list {
        padding: 0.75rem 1rem 1rem;
    }

    /* Transcript inner scroll removed on mobile — let page scroll */
    .mran-transcript-scrollable {
        max-height: none;
        overflow-y: visible;
    }

    .mran-recording-meta {
        grid-template-columns: 1fr 1fr;
    }

    .mran-recording-meta .mran-meta-item:last-child {
        grid-column: span 2;
    }
}

.mran-detail-section {
    margin-bottom: 2.5rem;
}

.mran-detail-section:last-child {
    margin-bottom: 0;
}

.mran-detail-section h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mran-section-icon {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.mran-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.mran-detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mran-detail-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mran-detail-value {
    font-size: 0.9375rem;
    color: var(--text-primary);
    font-weight: 500;
}

.mran-detail-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.mran-detail-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.mran-detail-tags-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
    margin-top: 0.5rem;
}

.mran-detail-tags-row .mran-detail-label {
    flex-shrink: 0;
}

.mran-detail-tags-row .mran-tags-inline {
    flex: 1;
}

@media (max-width: 600px) {
    .mran-detail-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
    
    .mran-detail-grid-3 .mran-detail-item:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 400px) {
    .mran-detail-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .mran-detail-grid-3 .mran-detail-item:last-child {
        grid-column: span 1;
    }
    
    .mran-detail-tags-row {
        flex-direction: column;
        gap: 0.5rem;
    }
}

.mran-detail-content {
    color: var(--text-secondary);
    line-height: 1.8;
}

.mran-detail-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    white-space: pre-wrap;
    margin-bottom: 0;
    font-size: 0.9375rem;
}

.mran-detail-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mran-detail-list li {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    transition: all 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.mran-detail-list li:hover {
    background: var(--bg-tertiary);
    transform: translateX(4px);
}

.mran-list-icon {
    width: 18px;
    height: 18px;
    color: var(--text-primary);
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.mran-detail-list li span {
    flex: 1;
    color: var(--text-primary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.mran-detail-section audio {
    width: 100%;
    margin-top: 1rem;
    border-radius: var(--radius);
}

/* Transcript with Speaker Separation - REMOVED (using minimalist design below) */

/* When cards wrap to vertical, swap border-right to border-bottom on recorder */
@media (max-width: 900px) {
    .mran-main-content {
        flex-direction: column;
        flex-wrap: nowrap;
        min-height: auto;
    }

    .mran-recorder-card {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        border-right: none;
        border-bottom: 1px solid rgba(55, 53, 47, 0.09);
        position: relative;
        top: auto;
        align-self: auto;
        max-height: none;
    }

    /* On mobile the layout is stacked — use page scroll, not internal component scroll */
    .mran-list-card {
        min-width: 0;
        min-height: 0;
        overflow-y: visible;
        overflow-x: visible;
        height: auto;
    }

    .mran-recordings-list {
        overflow-y: visible;
        overflow-x: visible;
        min-height: 0;
        height: auto;
    }

    /* Recorder card: no longer sticky or scroll-locked on mobile */
    .mran-recorder-card {
        overflow-y: visible;
        overflow-x: visible;
    }
}

@media (max-width: 768px) {
    .mran-recorder-card {
        padding: 1.25rem;
    }

    .mran-list-card {
        padding: 1.25rem;
    }

    .mran-recording-item-title {
        font-size: 1rem;
    }

    .mran-recording-item-date {
        font-size: 0.8125rem;
    }

    .mran-upload-section {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .mran-file-upload-btn {
        width: 100%;
        justify-content: center;
    }

    .mran-recorder-circle {
        width: 120px;
        height: 120px;
    }

    .mran-record-btn {
        width: 80px;
        height: 80px;
    }

    .mran-record-icon {
        width: 32px;
        height: 32px;
    }

    .mran-recorder-controls {
        flex-direction: column;
        width: 100%;
    }

    .mran-control-btn {
        width: 100%;
        justify-content: center;
    }

    .mran-preview-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .mran-action-btn {
        width: 100%;
        min-width: 100%;
        justify-content: center;
        padding: 0.5rem 1rem;
    }

    .mran-action-btn svg {
        width: 18px;
        height: 18px;
    }

    .mran-section-header {
        flex-direction: column;
    }

    .mran-detail-page-header {
        padding: 0.5rem 0.75rem;
    }

    .mran-card {
        padding: 1.5rem;
    }

    .mran-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .mran-recorder-circle {
        width: 100px;
        height: 100px;
    }

    .mran-record-btn {
        width: 70px;
        height: 70px;
    }

    .mran-record-icon {
        width: 28px;
        height: 28px;
    }

    .mran-timer {
        font-size: 1.25rem;
    }
}

.mran-section-header-left {
    flex-direction: column;
    align-items: flex-start;
}

/* ===== Tags Styles ===== */
.mran-tag-inline {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.mran-tag-inline:hover {
    color: var(--text-primary);
    text-decoration: underline;
}

.mran-tag-inline.mran-tag-static {
    cursor: default;
}

.mran-tag-inline.mran-tag-static:hover {
    color: var(--text-secondary);
    text-decoration: none;
}

.mran-tag-separator {
    color: var(--text-tertiary);
}

.mran-tags-inline {
    display: inline;
}

.mran-meta-separator {
    color: var(--text-tertiary);
    margin: 0 0.375rem;
}

.mran-recording-item-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    gap: 0;
}

.mran-recording-item-size {
    color: var(--text-secondary);
}

.mran-detail-item-full {
    grid-column: 1 / -1;
}

/* Filter Header - Compact */
.mran-filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    gap: 0.5rem;
}

.mran-filter-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
}

.mran-clear-filter {
    padding: 0.25rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mran-clear-filter:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

@media (max-width: 480px) {
    .mran-recording-item-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.125rem;
    }

    .mran-meta-separator {
        display: none;
    }

    .mran-tags-inline {
        display: block;
    }
}

/* Login Required Screen */
.mran-login-required {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    padding: 3rem;
    text-align: center;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    margin: 2rem auto;
}

.mran-login-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.mran-login-icon svg {
    width: 40px;
    height: 40px;
    color: var(--text-secondary);
}

.mran-login-required h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.mran-login-required p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.mran-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all 0.2s;
}

.mran-login-btn:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

/* Sharing */
.mran-sharing-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(55, 53, 47, 0.08);
}

.mran-detail-section[data-section="sharing"] .mran-sharing-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.mran-sharing-shell {
    max-width: 980px;
    margin: 0 auto;
}

.mran-sharing-header h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(55, 53, 47, 0.92);
    margin-bottom: 0.25rem;
}

.mran-sharing-header p {
    font-size: 0.8125rem;
    color: rgba(55, 53, 47, 0.65);
    line-height: 1.5;
}

.mran-sharing-form {
    margin-top: 0.875rem;
    padding: 0.875rem;
    border: 1px solid rgba(55, 53, 47, 0.08);
    border-radius: 8px;
    background: rgba(55, 53, 47, 0.02);
}

.mran-sharing-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.mran-sharing-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.mran-sharing-field label {
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(55, 53, 47, 0.72);
}

.mran-sharing-field input,
.mran-sharing-field select {
    width: 100%;
    border: 1px solid rgba(55, 53, 47, 0.12);
    border-radius: 6px;
    padding: 0.55rem 0.7rem;
    font-size: 0.875rem;
    color: rgba(55, 53, 47, 0.92);
    background: #ffffff;
    outline: none;
}

.mran-sharing-field input:focus,
.mran-sharing-field select:focus {
    border-color: rgba(55, 53, 47, 0.28);
}

.mran-sharing-field-help {
    font-size: 0.75rem;
    color: rgba(55, 53, 47, 0.56);
    line-height: 1.45;
}

/* User autocomplete */
.mran-user-autocomplete {
    position: relative;
}

.mran-user-autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.16);
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(55, 53, 47, 0.12);
    list-style: none;
    margin: 0;
    padding: 0.25rem 0;
    z-index: 120;
    max-height: 220px;
    overflow-y: auto;
}

.mran-user-autocomplete-dropdown li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    transition: background 0.12s ease;
    font-size: 0.8125rem;
}

.mran-user-autocomplete-dropdown li:hover,
.mran-user-autocomplete-dropdown li.mran-ac-active {
    background: rgba(55, 53, 47, 0.05);
}

.mran-ac-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.mran-ac-name {
    font-weight: 500;
    color: rgba(55, 53, 47, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.mran-ac-meta {
    font-size: 0.75rem;
    color: rgba(55, 53, 47, 0.5);
    white-space: nowrap;
    flex-shrink: 0;
}

.mran-sharing-actions {
    margin-top: 0.75rem;
    display: flex;
    justify-content: flex-end;
}

.mran-share-list {
    margin-top: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.mran-share-empty {
    padding: 0.875rem;
    border: 1px dashed rgba(55, 53, 47, 0.12);
    border-radius: 8px;
    font-size: 0.8125rem;
    color: rgba(55, 53, 47, 0.6);
    text-align: center;
}

.mran-share-item {
    display: flex;
    justify-content: space-between;
    gap: 0.875rem;
    padding: 0.875rem;
    border: 1px solid rgba(55, 53, 47, 0.08);
    border-radius: 8px;
    background: #ffffff;
}

.mran-share-item-main {
    flex: 1;
    min-width: 0;
}

.mran-share-item-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.mran-share-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(55, 53, 47, 0.92);
    min-width: 0;
}

.mran-share-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: rgba(55, 53, 47, 0.62);
}

.mran-share-item-url {
    margin-top: 0.45rem;
    font-size: 0.75rem;
    color: rgba(55, 53, 47, 0.55);
    word-break: break-all;
}

.mran-share-item-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
    flex-shrink: 0;
}

.mran-share-copy-btn,
.mran-share-revoke-btn {
    border: 1px solid rgba(55, 53, 47, 0.12);
    border-radius: 6px;
    background: #ffffff;
    color: rgba(55, 53, 47, 0.82);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.45rem 0.7rem;
    transition: all 0.15s ease;
}

.mran-share-copy-btn:hover,
.mran-share-revoke-btn:hover {
    border-color: rgba(55, 53, 47, 0.22);
    background: rgba(55, 53, 47, 0.04);
}

.mran-share-revoke-btn {
    color: rgba(239, 68, 68, 0.88);
    border-color: rgba(239, 68, 68, 0.18);
}

.mran-share-revoke-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.28);
}

.mran-share-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.6875rem;
    font-weight: 600;
    white-space: nowrap;
}

.mran-share-status-active {
    background: rgba(16, 185, 129, 0.12);
    color: rgba(5, 150, 105, 0.96);
}

.mran-share-status-expired {
    background: rgba(245, 158, 11, 0.12);
    color: rgba(180, 83, 9, 0.96);
}

.mran-share-status-revoked {
    background: rgba(239, 68, 68, 0.12);
    color: rgba(185, 28, 28, 0.96);
}

/* Revoked share action buttons */
.mran-share-unrevoke-btn {
    border: 1px solid rgba(16, 185, 129, 0.22);
    border-radius: 6px;
    background: #ffffff;
    color: rgba(5, 150, 105, 0.92);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.45rem 0.7rem;
    transition: all 0.15s ease;
}

.mran-share-unrevoke-btn:hover {
    background: rgba(16, 185, 129, 0.08);
    border-color: rgba(16, 185, 129, 0.35);
}

.mran-share-delete-btn--danger {
    border: 1px solid rgba(239, 68, 68, 0.18);
    border-radius: 6px;
    background: #ffffff;
    color: rgba(185, 28, 28, 0.88);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.45rem 0.7rem;
    transition: all 0.15s ease;
}

.mran-share-delete-btn--danger:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.32);
}

/* Share notifications — fixed top-right overlay */
.mran-share-notifications {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    max-width: 360px;
    width: calc(100vw - 2.5rem);
    pointer-events: none;
}

.mran-share-notif {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: #ffffff;
    border: 1px solid rgba(55, 53, 47, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(55, 53, 47, 0.12);
    padding: 0.875rem 1rem;
    pointer-events: all;
    animation: mran-notif-in 0.25s ease;
}

@keyframes mran-notif-in {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.mran-share-notif-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6366f1;
    margin-top: 0.05rem;
}

.mran-share-notif-body {
    flex: 1;
    min-width: 0;
}

.mran-share-notif-title {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6366f1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.mran-share-notif-text {
    font-size: 0.8125rem;
    color: rgba(55, 53, 47, 0.85);
    line-height: 1.5;
}

.mran-share-notif-close {
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(55, 53, 47, 0.45);
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.1rem;
    transition: color 0.12s ease;
    align-self: flex-start;
}

.mran-share-notif-close:hover {
    color: rgba(55, 53, 47, 0.8);
}

/* Shared page */
.mran-share-body {
    margin: 0;
    background: #ffffff;
    color: rgba(55, 53, 47, 0.9);
    font-family: inherit;
}

.mran-share-page {
    min-height: 100vh;
    background: #ffffff;
    padding: 2rem 1rem 3rem;
}

.mran-share-shell {
    max-width: 980px;
    margin: 0 auto;
}

.mran-share-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.mran-share-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(55, 53, 47, 0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.45rem;
}

.mran-share-title {
    font-size: 1.75rem;
    line-height: 1.2;
    color: rgba(55, 53, 47, 0.96);
    margin-bottom: 0.45rem;
}

.mran-share-subtitle {
    font-size: 0.9375rem;
    color: rgba(55, 53, 47, 0.68);
}

.mran-share-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

.mran-share-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(55, 53, 47, 0.06);
    color: rgba(55, 53, 47, 0.8);
    font-size: 0.75rem;
    font-weight: 600;
}

.mran-share-card {
    border: 1px solid rgba(55, 53, 47, 0.08);
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 1rem;
}

.mran-share-card-header {
    padding: 0.95rem 1.25rem;
    border-bottom: 1px solid rgba(55, 53, 47, 0.08);
    background: rgba(55, 53, 47, 0.02);
}

.mran-share-card-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(55, 53, 47, 0.92);
}

.mran-share-card-body {
    padding: 1.25rem;
}

.mran-share-audio {
    margin-top: 1rem;
}

.mran-share-audio audio {
    width: 100%;
}

.mran-share-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.mran-share-state {
    border: 1px solid rgba(55, 53, 47, 0.08);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    max-width: 560px;
    margin: 3rem auto;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.mran-share-state h2 {
    font-size: 1.25rem;
    color: rgba(55, 53, 47, 0.94);
    margin-bottom: 0.75rem;
}

.mran-share-state p {
    font-size: 0.9375rem;
    color: rgba(55, 53, 47, 0.66);
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .mran-sharing-grid {
        grid-template-columns: 1fr;
    }

    .mran-share-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mran-share-header {
        flex-direction: column;
    }

    .mran-share-badges {
        justify-content: flex-start;
    }

    .mran-share-item {
        flex-direction: column;
    }

    .mran-share-item-actions {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

/* Minimalist Transcript Design - No boxes, clean lines */
.mran-transcript-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin: 0;
}

.mran-transcript-item {
    padding: 0.875rem 0;
    border: none;
    background: transparent;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    transition: background 0.15s ease;
}

.mran-transcript-item:last-child {
    border-bottom: none;
}

.mran-transcript-item:hover {
    background: var(--bg-secondary);
}

.mran-transcript-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.mran-transcript-speaker {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--primary);
    line-height: 1.4;
}

.mran-transcript-time {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    font-weight: 400;
    font-family: inherit;
    margin-left: 0.25rem;
}

.mran-transcript-text {
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-primary);
    padding-left: 0;
}

/* Todo/Action Items with Checkboxes - Notion Style */
.mran-todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mran-todo-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.mran-todo-item:hover {
    background: rgba(55, 53, 47, 0.03);
}

.mran-todo-item.completed {
    opacity: 0.6;
}

.mran-todo-item.completed .mran-todo-text {
    text-decoration: line-through;
    color: rgba(55, 53, 47, 0.55);
}

.mran-todo-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid rgba(55, 53, 47, 0.35);
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
    margin-top: 0.0625rem;
    flex-shrink: 0;
    background: #ffffff;
    position: relative;
    overflow: visible;
    align-self: flex-start;
}

.mran-todo-checkbox:hover {
    border-color: rgba(55, 53, 47, 0.6);
    background: rgba(55, 53, 47, 0.04);
    transform: scale(1.05);
}

.mran-todo-checkbox.checked {
    background: rgba(55, 53, 47, 0.95);
    border-color: rgba(55, 53, 47, 0.95);
}

.mran-todo-checkbox.checked:hover {
    background: rgba(55, 53, 47, 1);
    border-color: rgba(55, 53, 47, 1);
}

.mran-todo-checkbox.checked svg {
    display: block;
    position: absolute;
    z-index: 2;
    width: 14px;
    height: 14px;
}

.mran-todo-checkbox svg {
    display: none;
    width: 14px;
    height: 14px;
    color: #ffffff;
    stroke-width: 2.5;
}

.mran-todo-content {
    flex: 1;
    padding-top: 0;
    margin-top: 0;
}

.mran-todo-text {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(55, 53, 47, 0.9);
    font-weight: 400;
    display: block;
    margin: 0;
    padding: 0;
}

.mran-todo-meta {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.375rem;
    flex-wrap: wrap;
}

.mran-todo-assignee,
.mran-todo-deadline {
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 3px;
    background: rgba(55, 53, 47, 0.06);
    color: rgba(55, 53, 47, 0.6);
    font-weight: 400;
}

/* Summary with Sections - Notion Style */
.mran-summary-sections {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.mran-summary-section {
    padding-bottom: 0.875rem;
    border-bottom: 1px solid rgba(55, 53, 47, 0.08);
}

.mran-summary-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mran-summary-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(55, 53, 47, 0.95);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mran-summary-title::before {
    content: '';
    width: 1.5px;
    height: 14px;
    background: rgba(55, 53, 47, 0.3);
    border-radius: 1px;
    flex-shrink: 0;
}

.mran-summary-percentage {
    font-size: 0.75rem;
    color: rgba(55, 53, 47, 0.9);
    font-weight: 600;
    margin-left: auto;
}

.mran-summary-content {
    font-size: 0.875rem;
    line-height: 1.7;
    color: rgba(55, 53, 47, 0.85);
    font-weight: 400;
}

/* =============================================================
   RESPONSIVE MOBILE OPTIMIZATIONS
   ============================================================= */

/* Touch devices: recording item actions are invisible (opacity:0) on hover-only.
   On touch screens there is no hover, so force them visible. */
@media (hover: none), (pointer: coarse) {
    .mran-recording-item-actions {
        opacity: 1;
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 0.5rem;
        justify-content: flex-end;
        padding-right: 0;
    }

    /* Remove hover-only transforms that feel wrong on touch */
    .mran-detail-list li:hover {
        transform: none;
    }

    .mran-recording-item:hover .mran-recording-item-actions {
        opacity: 1;
    }
}

/* ≤ 768px: additional fixes on top of existing breakpoint rules */
@media (max-width: 768px) {
    /* Detail page header: let title shrink, wrap action buttons below if needed */
    .mran-detail-page-header {
        flex-wrap: wrap;
        min-height: auto;
        padding: 0.625rem 1rem;
        gap: 0.375rem 0.5rem;
    }

    .mran-detail-page-title {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.9375rem;
    }

    /* Toolbar padding reduction */
    .mran-list-toolbar {
        padding: 0 1rem 0.75rem;
    }

    /* Tag dropdown: prevent it from overflowing viewport edge */
    .mran-tag-dropdown {
        max-width: calc(100vw - 2rem);
    }

    /* Audio player time: relax min-width */
    .mran-player-time {
        min-width: 60px;
        font-size: 0.6875rem;
    }

    /* Share page title scale down */
    .mran-share-title {
        font-size: 1.375rem;
    }

    /* Panel header padding */
    .mran-panel-header {
        padding: 0.875rem 1rem;
    }

    /* Detail section heading */
    .mran-detail-section h3 {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    /* Sharing form */
    .mran-sharing-form {
        padding: 0.75rem;
    }

    /* Share item URL word-break safety */
    .mran-share-item-url {
        word-break: break-all;
        overflow-wrap: anywhere;
    }

    /* Section header children full width when stacked */
    .mran-section-header {
        align-items: flex-start;
    }

    /* Recording item header: stack title above badges on mobile */
    .mran-recording-item-header {
        flex-direction: column;
        gap: 0.375rem;
        align-items: flex-start;
    }

    .mran-recording-item-header > div:first-child {
        width: 100%;
    }

    .mran-recording-item-status-wrapper {
        width: 100%;
        flex-wrap: wrap;
    }
}

/* ≤ 480px: small phones */
@media (max-width: 480px) {
    /* Tighter card padding */
    .mran-recorder-card,
    .mran-list-card {
        padding: 1rem;
    }

    /* Recording meta: single column on small phones */
    .mran-recording-meta {
        grid-template-columns: 1fr;
    }

    .mran-recording-meta .mran-meta-item:last-child {
        grid-column: span 1;
    }

    /* Panel content and header: tighter padding */
    .mran-panel-content {
        padding: 0.875rem 1rem;
    }

    .mran-panel-header {
        padding: 0.75rem 1rem;
    }

    /* Transcript list inside panel */
    .mran-detail-section[data-section="transcript"] .mran-transcript-list {
        padding: 0.625rem 1rem 1rem;
    }

    /* Share page padding reduction */
    .mran-share-page {
        padding: 1.25rem 0.875rem 2rem;
    }

    .mran-share-title {
        font-size: 1.25rem;
    }

    .mran-share-card-body {
        padding: 1rem;
    }

    .mran-share-card-header {
        padding: 0.75rem 1rem;
    }

    /* Section title */
    .mran-section-title {
        font-size: 1.125rem;
    }

    /* Recorder wrapper: tighten gap */
    .mran-recorder-wrapper {
        gap: 1rem;
    }

    /* List toolbar */
    .mran-list-toolbar {
        padding: 0 0.875rem 0.75rem;
    }

    /* Section header padding for trash/shared */
    .mran-main-content.mran-trash-view .mran-section-header,
    .mran-main-content.mran-shared-view .mran-section-header {
        padding: 1rem 1rem 0.875rem;
    }

    /* Audio player: hide total duration on very small screens to save space */
    .mran-player-separator,
    .mran-player-duration {
        display: none;
    }

    .mran-player-time {
        min-width: 40px;
    }

    /* Sharing actions button: full width */
    .mran-sharing-actions {
        justify-content: stretch;
    }

    .mran-sharing-actions .mran-action-btn {
        width: 100%;
        justify-content: center;
    }

    /* Share list item on small screens */
    .mran-share-item {
        padding: 0.75rem;
    }
}

/* ≤ 375px: very small phones (iPhone SE, older Android) */
@media (max-width: 375px) {
    .mran-recorder-circle {
        width: 90px;
        height: 90px;
    }

    .mran-record-btn {
        width: 64px;
        height: 64px;
    }

    .mran-record-icon {
        width: 24px;
        height: 24px;
    }

    .mran-share-title {
        font-size: 1.125rem;
    }

    .mran-detail-page-title {
        font-size: 0.875rem;
    }

    /* Notification: full-width on tiny screens */
    .mran-share-notifications {
        top: 0.75rem;
        right: 0.75rem;
        width: calc(100vw - 1.5rem);
        max-width: none;
    }

    /* Recording item: reduce padding */
    .mran-recording-item {
        padding: 0.75rem 0.875rem;
    }

    .mran-recorder-card,
    .mran-list-card {
        padding: 0.875rem;
    }
}
