
@media (max-width: 768px) {
    .settings-picker__button,
    .settings-input {
        min-height: var(--field-height-mobile, 48px);
    }
    .invite-form-grid {
        grid-template-columns: 1fr;
    }
    .invite-form-grid > div:nth-child(1) {
        grid-column: 1 / -1;
    }
    .invite-form-grid .mobile-pair {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 0.75fr));
        gap: 12px;
        width: 100%;
    }
    .invite-form-grid > div:last-child {
        grid-column: 1 / -1;
    }
}
.settings-accordion__label {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
/* Light, atmospheric UI for live translator */

:root {
    --bg: #f6f8fb;
    --bg-accent: #eef2fa;
    --card-bg: #ffffff;
    --card-border: #e5e9f2;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #3b82f6;
    --primary-600: #2563eb;
    --ring: rgba(59, 130, 246, 0.35);
}

/* Page */
html, body {
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    margin: 0;
    padding: 24px;
    color: var(--text);
    background:
        radial-gradient(1200px 600px at 100% -10%, #dbeafe 0%, transparent 60%),
        radial-gradient(1000px 500px at -10% 100%, #e9d5ff 0%, transparent 55%),
        var(--bg);
}

:root {
    --field-height-desktop: 64px;
    --field-height-mobile: 48px;
}

h1 {
    margin: 0 0 16px;
    font-size: 22px;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.settings-link {
    font-size: 14px;
    color: var(--primary-600);
    text-decoration: none;
    border: 1px solid rgba(59, 130, 246, 0.4);
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.08);
    transition: background .2s ease, color .2s ease;
}

.settings-link:hover {
    background: rgba(59, 130, 246, 0.16);
}

/* Layout */
.row {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 14px;
    flex: 1;
    min-width: 300px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

label {
    display: block;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

select,
button {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 10px 12px;
    transition: box-shadow .15s ease, border-color .15s ease, transform .04s ease;
}

select:focus,
button:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--ring);
}

button {
    cursor: pointer;
    background: linear-gradient(180deg, var(--primary), var(--primary-600));
    color: #fff;
    border: none;
}

button.secondary {
    background: transparent;
    color: var(--text);
    border: 1px dashed var(--card-border);
}

button:disabled {
    opacity: .6;
    cursor: default;
}

button:active {
    transform: translateY(1px);
}

textarea {
    width: 100%;
    min-height: 260px;
    resize: vertical;
    background: #fff;
    color: var(--text);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 12px;
    line-height: 1.5;
}

.token-counter {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 6px;
}

.mode-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--primary-600);
    background: rgba(59, 130, 246, 0.08);
    border-radius: 999px;
    padding: 6px 12px;
    margin-top: 10px;
    margin-bottom: 6px;
}

.controls {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}

/* Make the Start/Stop buttons stay in one row */
.controls .actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.control-hint {
    width: 100%;
    margin-bottom: 4px;
}

.hint {
    font-size: 12px;
    color: var(--muted);
}

.azure-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    background: rgba(45, 212, 191, 0.15);
    border: 1px solid rgba(45, 212, 191, 0.4);
    border-radius: 999px;
    padding: 6px 12px;
    margin: 6px 0;
}

.azure-status span:last-child {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 11px;
}

.muted {
    color: var(--muted);
    font-size: 13px;
}

.hint.tiny {
    font-size: 11px;
    line-height: 1.4;
}

.whisper-panel {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed var(--card-border);
    background: var(--bg-accent);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.whisper-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.whisper-panel__title {
    font-size: 13px;
    font-weight: 600;
}

.whisper-panel__status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.whisper-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.whisper-dot--idle { background: var(--card-border); }
.whisper-dot--loading {
    background: #fbbf24;
    animation: whisper-pulse 1.2s ease-in-out infinite;
}
.whisper-dot--ready { background: #22c55e; }
.whisper-dot--error { background: #ef4444; }

.whisper-panel__progress {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.whisper-progress-track {
    flex: 1;
    height: 4px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.whisper-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--primary);
    transition: width .2s ease;
}

@keyframes whisper-pulse {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.settings-page .row {
    margin-top: 24px;
}

.settings-grid {
    display: none;
}

.settings-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: 100%;
    margin-bottom: 32px;
}

.settings-picker {
    position: relative;
    width: 100%;
}

.settings-picker--fluid {
    width: 100%;
}

.settings-picker__select {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.settings-picker__button {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: linear-gradient(120deg, #f8fbff, #eef4ff);
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 14px 34px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--field-height-desktop, 64px);
}

.settings-picker__button:hover {
    border-color: rgba(59, 130, 246, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 18px 38px rgba(15, 23, 42, 0.12);
}

.settings-picker__button:focus-visible {
    border-color: rgba(59, 130, 246, 0.8);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), 0 18px 40px rgba(15, 23, 42, 0.2);
    outline: none;
}

.settings-picker__label {
    font-weight: 600;
    color: #0f172a;
    flex: 1;
}

.settings-picker__icon {
    width: 30px;
    height: 30px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.15);
    color: #1d4ed8;
    flex-shrink: 0;
}

.settings-picker__icon svg {
    width: 16px;
    height: 16px;
}

.settings-picker__icon--mic {
    background: rgba(214, 31, 105, 0.15);
    color: #be185d;
}

.settings-picker__icon--stream {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}

.settings-picker__icon--globe {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.settings-picker__chevron {
    font-size: 14px;
    color: #64748b;
    margin-left: auto;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.settings-input {
    width: 100%;
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: rgba(248, 250, 252, 0.85);
    padding: 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 10px 20px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: var(--field-height-desktop, 64px);
    line-height: 1;
}

.settings-input:focus-visible {
    outline: none;
    border-color: rgba(59, 130, 246, 0.7);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25), 0 16px 30px rgba(59, 130, 246, 0.15);
}

.settings-input::-webkit-inner-spin-button,
.settings-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.settings-input[type="number"] {
    -moz-appearance: textfield;
}

.settings-primary-btn {
    width: 100%;
    border: none;
    border-radius: 18px;
    padding: 16px 18px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    box-shadow: 0 18px 30px rgba(79, 70, 229, 0.35);
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.settings-primary-btn:hover {
    box-shadow: 0 20px 36px rgba(79, 70, 229, 0.45);
}

.settings-primary-btn:active {
    transform: translateY(1px);
}

.settings-primary-btn:disabled {
    opacity: 0.6;
    cursor: default;
    box-shadow: none;
}

.settings-picker__list {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: 100%;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 60;
    max-height: 280px;
    overflow-y: auto;
}

.settings-picker__list[hidden] {
    display: none;
}

.settings-picker__option {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 15px;
    color: #0f172a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s ease;
}

.settings-picker__option-label {
    pointer-events: none;
}

.settings-picker__check {
    color: #2563eb;
    font-size: 15px;
    visibility: hidden;
    margin-left: 12px;
}

.settings-picker__option:hover {
    background: #eef2ff;
}

.settings-picker__option.is-active {
    background: #e0ecff;
    font-weight: 600;
}

.settings-picker__option.is-active .settings-picker__check {
    visibility: visible;
}

.settings-picker--open .settings-picker__button {
    border-color: rgba(59, 130, 246, 0.85);
    box-shadow: 0 18px 34px rgba(59, 130, 246, 0.25);
}

.settings-picker--open .settings-picker__chevron {
    transform: rotate(180deg);
}

.settings-accordion {
    width: min(50vw, 720px);
    min-width: 320px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    overflow: visible;
    background: #fff;
}

.card--invite-list {
    display: flex;
    justify-content: center;
    background: transparent;
    box-shadow: none;
    border: none;
}

.card--invite-list .settings-accordion {
    width: min(50vw, 720px);
    border: none;
    box-shadow: none;
    padding: 0;
}

.settings-accordion__summary {
    width: 100%;
    border: none;
    background: transparent;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
}

.settings-accordion__title {
    display: block;
    text-align: left;
    font-size: 16px;
    color: var(--text);
}

.settings-accordion__summary:hover {
    background: rgba(59, 130, 246, 0.05);
}

.settings-accordion__chevron {
    font-size: 16px;
    color: var(--muted);
    transition: transform 0.2s ease;
}

.settings-accordion.is-open .settings-accordion__chevron {
    transform: rotate(180deg);
}

.settings-accordion__body {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
}

.settings-accordion.is-open .settings-accordion__body {
    padding: 0 20px 20px;
    max-height: 700px;
    overflow: visible;
}

.settings-page .card h2 {
    margin: 0 0 6px;
    font-size: 18px;
}

.settings-page .card p {
    margin-top: 0;
    margin-bottom: 14px;
}

.usage-indicator {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-600);
}

[hidden] {
    display: none !important;
}

.invite-form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.invite-form-grid > div {
    width: 100%;
    min-width: 0;
}

.invite-form-grid > div:first-child,
.invite-form-grid .mobile-pair,
.invite-form-grid > div:last-child {
    flex: 1 1 100%;
}

.invite-form-grid .desktop-inline {
    display: flex;
    gap: 16px;
    width: 100%;
}

.invite-form-grid .desktop-inline > div {
    flex: 1 1 0;
}

.invite-form-grid .settings-picker,
.invite-form-grid .settings-input {
    width: 100%;
}

.invite-form-grid .settings-picker__button,
.invite-form-grid .settings-input {
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .invite-form-grid {
        grid-template-columns: 1fr;
    }
    .invite-form-grid > div:nth-child(1) {
        grid-column: 1 / -1;
    }
    .invite-form-grid .mobile-pair {
        display: flex;
        gap: 12px;
        justify-content: space-between;
    }
    .invite-form-grid .mobile-pair > div {
        flex: 0 0 45.0%;
    }
    .invite-form-grid > div:last-child {
        grid-column: 1 / -1;
    }
}

.single-accordion {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.single-accordion__summary {
    width: 100%;
    border: none;
    background: transparent;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    flex-wrap: wrap;
    cursor: pointer;
    font-size: 15px;
    color: var(--text);
}

.single-accordion__summary:hover {
    background: rgba(59, 130, 246, 0.05);
}

.single-accordion__title {
    font-weight: 600;
    display: block;
}

.single-accordion__hint {
    font-size: 12px;
    color: var(--muted);
}

.single-accordion__chevron {
    transition: transform 0.2s ease;
    font-size: 14px;
    color: var(--muted);
}

.single-accordion.is-open .single-accordion__chevron {
    transform: rotate(180deg);
}

.single-accordion__body {
    padding: 0 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease, padding 0.25s ease;
}

.single-accordion.is-open .single-accordion__body {
    padding: 0 16px 16px;
    max-height: 650px;
}

.invite-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.invite-row {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.invite-row--highlight {
    border-color: rgba(79, 70, 229, 0.25);
    background: linear-gradient(135deg, rgba(224, 231, 255, 0.9), #fff);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.15);
}

.invite-link {
    font-size: 14px;
    word-break: break-all;
    color: var(--text);
    margin-bottom: 6px;
}

.invite-meta {
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
}

.invite-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.invite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease;
}

.invite-btn:hover {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(59, 130, 246, 0.5);
}

.invite-btn--danger {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.invite-btn--danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.55);
}

.invite-btn__icon {
    display: none;
    font-size: 16px;
    line-height: 1;
}

.invite-btn__text {
    display: inline-block;
}

#audienceInviteMaxUses::placeholder {
    font-size: 24px;
}

@media (max-width: 640px) {
    .invite-btn--danger .invite-btn__icon {
        display: inline-block;
    }
    .invite-btn--danger .invite-btn__text {
        display: none;
    }
}

.invite-create-results {
    margin-top: 18px;
    padding: 16px;
    border-radius: 16px;
    border: 1px dashed rgba(79, 70, 229, 0.4);
    background: rgba(224, 231, 255, 0.35);
}

.invite-create-results__title {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #4f46e5;
    margin-bottom: 10px;
}

.invite-list--latest .invite-row {
    margin-bottom: 0;
}

.invite-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.invite-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(59, 130, 246, 0.12);
    color: #1d4ed8;
    padding: 8px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease, border 0.2s ease;
}

.invite-btn:hover {
    background: rgba(59, 130, 246, 0.22);
    border-color: rgba(59, 130, 246, 0.5);
}

.invite-btn--danger {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.invite-btn--danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.55);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 1000;
}

.modal-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}

.modal-card h3 {
    margin: 0 0 12px;
    font-size: 20px;
}

.modal-card p {
    margin: 0 0 20px;
    color: var(--muted);
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-btn {
    flex: 1;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

.modal-btn--ghost {
    border-color: rgba(15, 23, 42, 0.2);
    background: transparent;
    color: var(--text);
}

.modal-btn--ghost:hover {
    background: rgba(15, 23, 42, 0.05);
}

.modal-btn--accent {
    background: var(--primary-600);
    color: #fff;
}

.modal-btn--accent:hover {
    background: #1d4ed8;
}

/* Small screens */
@media (max-width: 640px) {
    body { padding: 16px; }

    #audienceInviteMaxUses::placeholder {
        font-size: 24px;
    }
}


