/*
 * Kavi design system
 * Loaded last on every page. Presentation only.
 *
 * Principles (Apple Human Interface Guidelines): content first, calm neutral
 * surfaces, one accent used sparingly, hairline separators instead of heavy
 * borders, soft depth, generous spacing and a clear type hierarchy.
 *
 * Brand: #372a42 plum, #706581 slate, #d5cbec lilac, #9982d5 violet.
 * Plum and violet are accents (selection, focus, primary actions, logo glow);
 * surfaces are a neutral graphite so the screen stays easy on the eyes.
 */

:root {
    /* Brand */
    --kavi-plum: #372a42;
    --kavi-slate: #706581;
    --kavi-lilac: #d5cbec;
    --kavi-violet: #9982d5;
    --kavi-violet-hover: #a998de;
    --kavi-violet-press: #8a73c8;
    --kavi-on-violet: #1a1620;
    --kavi-tint: rgba(153, 130, 213, 0.16);

    /* Neutral graphite surfaces (very slight warm-plum cast) */
    --kavi-bg: #141216;
    --kavi-bg-1: #1b191e;
    --kavi-bg-2: #232127;
    --kavi-bg-3: #2d2a31;
    --kavi-bg-4: #38353d;

    /* Text */
    --kavi-text: #f5f4f7;
    --kavi-text-2: rgba(245, 244, 247, 0.68);
    --kavi-text-3: rgba(245, 244, 247, 0.44);

    /* Lines and fills */
    --kavi-line: rgba(255, 255, 255, 0.08);
    --kavi-line-strong: rgba(255, 255, 255, 0.16);
    --kavi-fill: rgba(255, 255, 255, 0.06);
    --kavi-fill-2: rgba(255, 255, 255, 0.1);
    --kavi-fill-3: rgba(255, 255, 255, 0.16);
    --kavi-glass: rgba(35, 33, 39, 0.72);
    --kavi-focus: rgba(153, 130, 213, 0.5);
    --kavi-danger: #ff6961;
    --kavi-success: var(--kavi-lilac);
    --kavi-warning: var(--kavi-lilac);

    /* Shape, depth, motion */
    --kavi-r-sm: 8px;
    --kavi-r-md: 12px;
    --kavi-r-lg: 18px;
    --kavi-r-xl: 24px;
    --kavi-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.35);
    --kavi-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3), 0 6px 18px rgba(0, 0, 0, 0.28);
    --kavi-ease: cubic-bezier(0.25, 0.1, 0.25, 1);
    --kavi-font:
        -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Display', 'Inter', 'Segoe UI', Roboto,
        'Helvetica Neue', Arial, sans-serif;

    /* Root.css tokens */
    --body-bg: var(--kavi-bg);
    --msger-bg: var(--kavi-bg-1);
    --wb-bg: var(--kavi-bg-1);
    --settings-bg: var(--kavi-bg-2);
    --trx-bg: var(--kavi-bg-1);
    --select-bg: var(--kavi-bg-1);
    --select-focus-color: var(--kavi-focus);
    --left-msg-bg: var(--kavi-bg-2);
    --right-msg-bg: var(--kavi-plum);
    --private-msg-bg: #4a2a3c;
    --tab-btn-active: var(--kavi-bg-3);
    --btns-bg-color: var(--kavi-glass);
    --box-shadow: var(--kavi-shadow);
    --border: 1px solid var(--kavi-line);
    --border-radius: var(--kavi-r-lg);
    --dd-color: var(--kavi-text);
    --videoBar-active: 1px solid rgba(153, 130, 213, 0.5);

    --color-accent: var(--kavi-violet);
    --color-accent-strong: var(--kavi-violet-hover);
    --color-accent-soft: var(--kavi-tint);
    --color-success: var(--kavi-lilac);
    --color-warning: var(--kavi-lilac);
    --color-danger: var(--kavi-danger);
    --color-focus: var(--kavi-focus);
    --fg-1: var(--kavi-text);
    --fg-2: var(--kavi-text-2);
    --fg-3: var(--kavi-text-3);
    --fg-muted: var(--kavi-text-3);
    --surface-1: var(--kavi-fill);
    --surface-2: var(--kavi-fill-2);
    --surface-3: var(--kavi-fill-3);
    --border-subtle: var(--kavi-line);
    --border-strong: var(--kavi-line-strong);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 24px;

    /* Room.css tokens */
    --room-stage-bg: #0f0e11;
    --room-panel-raised: var(--kavi-bg-2);
    --room-control-bg: var(--kavi-fill);
    --room-control-hover: var(--kavi-fill-2);
    --room-border: var(--kavi-line);
    --room-border-strong: var(--kavi-line-strong);
    --room-accent: var(--kavi-lilac);
    --room-accent-soft: var(--kavi-tint);
    --room-switch-accent: var(--kavi-violet);
    --room-switch-ink: var(--kavi-on-violet);
    --room-danger-soft: rgba(255, 105, 97, 0.14);
    --room-shadow: var(--kavi-shadow);
    --room-emoji-toolbar-surface: var(--kavi-bg-2);
    --poll-toolbar-surface: var(--kavi-bg-2);
    --editor-toolbar-surface: var(--kavi-bg-2);
    --chat-toolbar-surface: var(--kavi-bg-2);
    --room-emoji-control-surface: var(--kavi-fill);
    --poll-control-surface: var(--kavi-fill);
    --editor-control-surface: var(--kavi-fill);
    --chat-control-surface: var(--kavi-fill);

    /* landing.css tokens */
    --landing-bg: var(--kavi-bg);
    --landing-surface: var(--kavi-bg-1);
    --landing-surface-raised: var(--kavi-bg-2);
    --landing-border: var(--kavi-line);
    --landing-border-strong: var(--kavi-line-strong);
    --landing-text: var(--kavi-text);
    --landing-text-muted: var(--kavi-text-2);
    --landing-primary: var(--kavi-violet);
    --landing-primary-bright: var(--kavi-violet-hover);
    --landing-accent: var(--kavi-lilac);
}

/* ---------- Base ---------- */

* {
    font-family: var(--kavi-font);
}

html,
body {
    background: var(--kavi-bg);
}

body {
    color: var(--kavi-text-2);
    font-size: 17px;
    line-height: 1.47;
    letter-spacing: -0.011em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--kavi-text);
    font-weight: 600;
    letter-spacing: -0.022em;
}

a {
    color: var(--kavi-lilac);
    transition: color 0.2s var(--kavi-ease);
}

a:hover {
    color: #fff;
}

::selection {
    background: rgba(153, 130, 213, 0.4);
    color: #fff;
}

*:focus-visible,
:where(button, a, input, select, textarea, [role='button'], [tabindex]):focus-visible {
    outline: 3px solid var(--kavi-focus);
    outline-offset: 2px;
}

::placeholder {
    color: var(--kavi-text-3);
}

input[type='checkbox'],
input[type='radio'],
input[type='range'] {
    accent-color: var(--kavi-violet);
}

::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.2);
}

/* ---------- Landing family (landing, new room, login, waiting room, errors) ---------- */

body,
.body-wrap {
    background-color: var(--kavi-bg);
}

.body-wrap {
    background-image: radial-gradient(1000px 480px at 50% -120px, rgba(55, 42, 66, 0.9), transparent 70%);
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

.site-header {
    padding: 28px 0;
}

.site-header::before,
.hero-figure,
.hero-figure::before,
.hero-figure::after,
.hero-figure-box,
#snow-container {
    display: none !important;
}

.header-logo-image {
    width: auto;
    height: 36px;
    filter: none;
    opacity: 0.92;
}

.header-logo-image:hover {
    filter: none;
    transform: none;
    opacity: 1;
}

.hero {
    padding-top: 72px;
    padding-bottom: 80px;
}

.hero-inner {
    min-height: 0;
    justify-content: center;
}

.hero-copy {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding-right: 0;
    text-align: center;
}

.hero-title {
    max-width: 800px;
    margin: 0 auto 24px;
    color: var(--kavi-text);
    font-size: clamp(34px, 5.6vw, 60px);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.03em;
    text-shadow: none;
}

.hero-paragraph {
    max-width: 580px;
    margin-right: auto;
    margin-left: auto;
    color: var(--kavi-text-2);
    font-size: 20px;
    line-height: 1.5;
    letter-spacing: -0.012em;
}

.cta:not(#supportUs) {
    margin-top: 0;
}

.cta:not(#supportUs) .section-inner {
    padding: 40px 44px;
}

.cta:not(#supportUs) .cta-inner {
    gap: 48px;
    border: 1px solid var(--kavi-line);
    border-radius: var(--kavi-r-xl);
    background: var(--kavi-bg-1);
    box-shadow: var(--kavi-shadow-sm);
}

.cta:not(#supportUs) .cta-inner::before {
    display: none;
}

.cta:not(#supportUs) .section-title {
    max-width: 320px;
    color: var(--kavi-text);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.024em;
}

/* Inputs */

.form-input,
input[type='text'],
input[type='password'],
input[type='email'],
input[type='number'],
input[type='search'],
input[type='url'],
textarea,
select {
    color: var(--kavi-text);
}

.form-input {
    height: 50px;
    border: 1px solid var(--kavi-line);
    border-radius: var(--kavi-r-md);
    background: var(--kavi-bg);
    font-size: 17px;
    font-weight: 400;
    box-shadow: none;
}

.form-input:hover {
    border-color: var(--kavi-line-strong);
    background-color: var(--kavi-bg);
}

.form-input:focus {
    border-color: var(--kavi-violet);
    box-shadow: 0 0 0 4px rgba(153, 130, 213, 0.25);
}

/* Buttons */

.button {
    height: 50px;
    border-radius: var(--kavi-r-md);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.011em;
    text-transform: none;
    white-space: nowrap;
}

.button-primary,
.button-primary:hover {
    border-radius: var(--kavi-r-md);
}

.button-primary {
    background: var(--kavi-violet);
    color: var(--kavi-on-violet);
    box-shadow: none;
}

.button-primary:hover {
    background: var(--kavi-violet-hover);
    color: var(--kavi-on-violet);
    box-shadow: none;
}

.button-primary:active {
    background: var(--kavi-violet-press);
}

.button-secondary {
    border: none;
    background: var(--kavi-fill-2);
    color: var(--kavi-text);
}

.button-secondary:hover {
    background: var(--kavi-fill-3);
    color: var(--kavi-text);
}

.pulse {
    animation: none !important;
}

.gen-room-btn {
    border-left: 1px solid rgba(26, 22, 32, 0.2);
    border-radius: 0 var(--kavi-r-md) var(--kavi-r-md) 0;
    box-shadow: none;
}

.gen-room-btn:hover {
    background: var(--kavi-violet-hover);
    box-shadow: none;
    filter: none;
}

.last-room {
    color: var(--kavi-text-3);
}

.last-room a,
.schedule-meeting-btn {
    color: var(--kavi-lilac);
}

/* Feature cards */

.feature-inner {
    padding: 28px;
    border: 1px solid var(--kavi-line);
    border-radius: var(--kavi-r-lg);
    background: var(--kavi-bg-1);
    box-shadow: none;
}

.feature-inner:hover {
    border-color: var(--kavi-line-strong);
    background-color: var(--kavi-bg-1);
    transform: none;
}

.feature-icon {
    border-radius: var(--kavi-r-md);
    background: var(--kavi-bg-2);
}

.feature-title,
.section-title,
.section-paragraph {
    color: var(--kavi-text);
}

.section-paragraph,
.text-sm {
    color: var(--kavi-text-2);
}

.blue {
    color: var(--kavi-lilac);
}

/* Centered cards: login, waiting room */

.center-card-section .hero-inner {
    justify-content: center;
}

.login-card,
.waiting-card {
    max-width: 440px;
    padding: 48px 40px 40px;
    border: 1px solid var(--kavi-line);
    border-radius: var(--kavi-r-xl);
    background: var(--kavi-bg-1);
    box-shadow: var(--kavi-shadow-sm);
}

.login-title,
.waiting-title {
    color: var(--kavi-text);
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -0.024em;
}

.login-description,
.waiting-description {
    color: var(--kavi-text-2);
}

.login-icon,
.waiting-icon {
    background: var(--kavi-tint);
    color: var(--kavi-violet);
}

.login-btn {
    border-radius: var(--kavi-r-md);
    background: var(--kavi-violet);
    color: var(--kavi-on-violet);
    font-weight: 600;
}

.login-btn:hover {
    background: var(--kavi-violet-hover);
}

/* Footer and social links */

.site-footer {
    margin-top: 48px;
    padding-bottom: 32px;
    color: var(--kavi-text-3);
    font-size: 13px;
}

.site-footer a {
    color: var(--kavi-text-2);
}

.site-footer a:hover {
    color: #fff;
}

.footer-social-links li a svg path,
.footer-social-icon svg path {
    fill: var(--kavi-slate) !important;
    transition: fill 0.2s var(--kavi-ease);
}

.footer-social-icon:hover svg path {
    fill: var(--kavi-lilac) !important;
}

.footer-social-icon:hover {
    transform: none;
}

/* =====================================================================
   Call UI
   ===================================================================== */

/* Control bar: a single frosted capsule with round controls */

#bottomButtons {
    gap: 4px;
    padding: 8px;
    border-radius: 28px;
    background: var(--kavi-glass);
    -webkit-backdrop-filter: saturate(180%) blur(30px);
    backdrop-filter: saturate(180%) blur(30px);
    box-shadow:
        0 0 0 1px var(--kavi-line),
        0 12px 32px rgba(0, 0, 0, 0.4);
}

#bottomButtons button,
#bottomButtons .split-btn,
#bottomButtons .split-btn .device-dropdown-toggle {
    background: transparent;
    box-shadow: none;
}

#bottomButtons button {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    color: var(--kavi-text);
    font-size: 1.1rem;
}

#bottomButtons button i {
    font-size: 1.05rem;
}

#bottomButtons > button:hover,
#bottomButtons .split-btn:hover,
#bottomButtons .split-btn button:hover {
    background: var(--kavi-fill-2);
    box-shadow: none;
}

#bottomButtons .split-btn {
    border-radius: 23px;
}

#bottomButtons .split-btn > button:not(.device-dropdown-toggle) {
    border-radius: 23px 0 0 23px;
}

#bottomButtons .split-btn .device-dropdown-toggle {
    width: 22px;
    height: 46px;
    border-left: none !important;
    border-radius: 0 23px 23px 0;
}

#bottomButtons .device-dropdown-toggle i {
    font-size: 0.65rem;
    opacity: 0.6;
}

#bottomButtons .red,
#bottomButtons #exitButton,
#bottomButtons #exitDropdownButton {
    color: var(--kavi-danger) !important;
}

#bottomButtons .orange {
    color: var(--kavi-lilac) !important;
}

/* Video tiles */

.Camera {
    border-radius: var(--kavi-r-lg);
    background: var(--kavi-bg-1);
    box-shadow: none;
}

.Camera .username,
.Camera p {
    letter-spacing: -0.01em;
}

.videoMenuBar {
    border-radius: var(--kavi-r-md);
    background: var(--kavi-glass) !important;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
}

/* Menus, dialogs and panels */

.dropdown-menu,
.swal2-popup {
    border: 1px solid var(--kavi-line) !important;
    border-radius: var(--kavi-r-lg) !important;
    background: var(--kavi-bg-2) !important;
    color: var(--kavi-text) !important;
    box-shadow: var(--kavi-shadow) !important;
}

.swal2-title,
.swal2-html-container,
.swal2-content {
    color: var(--kavi-text) !important;
}

.swal2-styled.swal2-confirm {
    border-radius: var(--kavi-r-md) !important;
    background: var(--kavi-violet) !important;
    color: var(--kavi-on-violet) !important;
    font-weight: 600;
}

.swal2-styled.swal2-cancel,
.swal2-styled.swal2-deny {
    border-radius: var(--kavi-r-md) !important;
    background: var(--kavi-fill-2) !important;
    color: var(--kavi-text) !important;
}

select,
.form-select,
input[type='text'],
input[type='password'],
input[type='email'],
input[type='number'],
textarea {
    border-radius: var(--kavi-r-sm);
}

.tippy-box {
    border: 1px solid var(--kavi-line);
    border-radius: 10px;
    background: rgba(35, 33, 39, 0.96);
    color: var(--kavi-text);
    font-size: 13px;
}

/* Recording indicator: a drawn dot replaces the emoji glyph */

.rec-indicator::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-radius: 50%;
    background: var(--kavi-danger);
    vertical-align: middle;
}

/* Pre-join, settings and secondary panels */

.init-user {
    gap: 24px;
    padding: 12px;
}

.init-video-container {
    border-radius: var(--kavi-r-lg);
    background: var(--room-stage-bg);
}

.init-video-container video {
    border-radius: var(--kavi-r-md);
}

.init-user button,
.init-user select {
    border-radius: var(--kavi-r-md);
}

.init-user button {
    border-color: var(--kavi-line);
    color: var(--kavi-text);
}

.init-user button:hover {
    transform: none;
}

.settings-nav-label {
    letter-spacing: 0;
    text-transform: none;
    font-weight: 600;
    color: var(--kavi-text-3);
}

@media (max-width: 640px) {
    .site-header {
        padding: 20px 0;
    }

    .header-logo-image {
        height: 30px;
    }

    .hero {
        padding-top: 24px;
        padding-bottom: 48px;
    }

    .hero-paragraph {
        font-size: 18px;
    }

    .cta:not(#supportUs) .section-inner {
        padding: 28px 20px;
    }

    .cta:not(#supportUs) .cta-inner {
        gap: 28px;
    }

    #bottomButtons {
        max-width: calc(100vw - 16px);
        padding: 6px;
        gap: 0;
        border-radius: 24px;
    }

    #bottomButtons button {
        width: 40px;
        height: 40px;
    }
}

/* =====================================================================
   Landing and new-room pages
   ===================================================================== */

.kl-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(900px 420px at 50% -80px, rgba(55, 42, 66, 0.85), transparent 70%), var(--kavi-bg);
    background-repeat: no-repeat;
}

.kl-header {
    padding: 28px clamp(20px, 5vw, 56px);
}

.kl-brand {
    display: inline-block;
}

.kl-brand img {
    display: block;
    width: auto;
    height: 34px;
    opacity: 0.95;
}

.kl-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(48px, 9vh, 96px);
    padding: 24px clamp(20px, 5vw, 56px) 72px;
}

.kl-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 920px;
    text-align: center;
    animation: kl-rise 0.7s var(--kavi-ease) both;
}

.kl-title {
    margin: 0 0 20px;
    color: var(--kavi-text);
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -0.035em;
}

.kl-title h1,
.kl-eyebrow {
    display: block;
    margin: 0 0 18px;
    color: var(--kavi-violet);
    font-size: clamp(15px, 1.6vw, 19px);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
}

.kl-lead {
    max-width: 540px;
    margin: 0 0 36px;
    color: var(--kavi-text-2);
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.5;
    letter-spacing: -0.012em;
}

.kl-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 54px;
    padding: 0 30px;
    border: none;
    border-radius: 999px;
    background: var(--kavi-violet);
    color: var(--kavi-on-violet);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.011em;
    cursor: pointer;
    transition:
        background 0.2s var(--kavi-ease),
        transform 0.2s var(--kavi-ease);
}

.kl-cta::after {
    content: '\f061';
    font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free';
    font-size: 14px;
    font-weight: 900;
    transition: transform 0.2s var(--kavi-ease);
}

.kl-cta:hover {
    background: var(--kavi-violet-hover);
}

.kl-cta:hover::after {
    transform: translateX(3px);
}

.kl-cta:active {
    background: var(--kavi-violet-press);
    transform: scale(0.98);
}

.kl-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 980px;
    margin: 0;
    padding: 0;
    list-style: none;
    animation: kl-rise 0.7s 0.12s var(--kavi-ease) both;
}

.kl-points li {
    padding: 28px;
    border: 1px solid var(--kavi-line);
    border-radius: var(--kavi-r-lg);
    background: var(--kavi-bg-1);
}

.kl-point-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 18px;
    border-radius: 12px;
    background: var(--kavi-tint);
    color: var(--kavi-violet);
    font-size: 16px;
}

.kl-points h2 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
}

.kl-points p {
    margin: 0;
    color: var(--kavi-text-2);
    font-size: 15px;
    line-height: 1.5;
}

.kl-footer,
.kv-legal-footer {
    padding: 28px clamp(20px, 5vw, 56px) 32px;
    border-top: 1px solid var(--kavi-line);
    text-align: center;
}

.kl-legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 24px;
}

.kl-legal a {
    color: var(--kavi-text-3);
    font-size: 13px;
}

.kl-legal a:hover {
    color: var(--kavi-text);
}

.kl-copy {
    margin: 14px 0 0;
    color: var(--kavi-text-3);
    font-size: 12px;
}

@keyframes kl-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 760px) {
    .kl-points {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kl-hero,
    .kl-points {
        animation: none;
    }
}

/* =====================================================================
   Logos, titles and shared fixes
   ===================================================================== */

img[src*='kavi-wordmark'] {
    object-fit: contain;
}

.cr-brand img,
.brand img,
#headerLogo,
.header-logo-image {
    width: auto !important;
    height: 32px !important;
    max-width: none;
    object-fit: contain;
}

.spinner-logo {
    object-fit: contain;
}

/* =====================================================================
   Customize room
   ===================================================================== */

.cr-summary .cr-preview {
    height: 46px;
    margin-top: 16px;
    padding: 0 14px;
    font-size: 12px;
    line-height: 46px;
}

/* =====================================================================
   In-call: no hover toolbar on video tiles
   ===================================================================== */

.videoMenuBar,
.Camera .videoMenuBar {
    display: none !important;
}

/* =====================================================================
   Settings (Apple-style sheet with inset grouped lists)
   ===================================================================== */

#mySettings {
    width: min(880px, calc(100% - 48px));
    min-height: 560px;
    max-height: min(760px, 94vh);
    padding: 0;
    border: 1px solid var(--kavi-line);
    border-radius: 24px;
    background: rgba(35, 33, 39, 0.88);
    -webkit-backdrop-filter: saturate(180%) blur(40px);
    backdrop-filter: saturate(180%) blur(40px);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.4),
        0 30px 80px rgba(0, 0, 0, 0.55);
}

#mySettingsHeader {
    position: relative;
    height: 56px;
    margin: 0;
    border-bottom: 1px solid var(--kavi-line);
}

#mySettingsHeader::before {
    content: 'Settings';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--kavi-text);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.01em;
    pointer-events: none;
}

#mySettingsCloseBtn {
    position: absolute;
    top: 12px;
    right: 14px;
    float: none;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: var(--kavi-fill-2);
    color: var(--kavi-text-2);
    font-size: 0.8rem;
}

#mySettingsCloseBtn:hover {
    border: none;
    background: var(--kavi-fill-3);
    color: var(--kavi-text);
}

.mySettingsMain {
    gap: 8px;
    padding: 12px;
}

.tab {
    gap: 2px;
    min-width: 200px;
    min-height: 0;
    padding: 4px;
    border: none;
    border-radius: 0;
    background: transparent;
}

.settings-nav-label {
    margin: 18px 12px 6px;
    color: var(--kavi-text-3);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.settings-nav-label:first-child {
    margin-top: 4px;
}

.tab button {
    gap: 10px;
    margin: 0;
    padding: 9px 12px;
    border: none;
    border-radius: 10px;
    color: var(--kavi-text-2);
    font-size: 15px;
}

.tab button:hover {
    border: none;
    background: var(--kavi-fill);
    color: var(--kavi-text);
}

.tab button.active {
    border: none;
    background: var(--kavi-plum);
    box-shadow: none;
    color: #fff;
}

.tabButtonText {
    font-family: var(--kavi-font);
    font-weight: 500;
}

.tab button.active .tabButtonText {
    font-weight: 600;
}

.tabActions {
    margin-left: 0;
    border: none;
    border-radius: 0;
    background: transparent;
    overflow-y: auto;
}

.tabcontent {
    padding: 4px 12px 28px;
}

.settings-section-intro {
    margin: 0 0 20px;
    padding: 0;
    border: none;
}

.settings-section-intro h3 {
    color: var(--kavi-text);
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.028em;
}

#mySettings .settings-section-intro p {
    margin: 6px 0 0;
    color: var(--kavi-text-2);
    font-size: 15px;
}

#mySettings hr {
    height: 0;
    margin: 16px 0;
    border: none !important;
    border-top: 1px solid var(--kavi-line) !important;
    background: none !important;
    opacity: 1 !important;
}

#mySettings hr + hr {
    display: none;
}

.settingsTable {
    border: none;
    border-radius: var(--kavi-r-md);
    background: var(--kavi-bg-3);
    color: var(--kavi-text);
}

.settingsTable td,
.settingsTable th {
    padding: 13px 16px;
}

.settingsTable tr + tr td,
.settingsTable tr + tr th {
    border-top: 1px solid var(--kavi-line);
}

.settings-option-copy strong {
    color: var(--kavi-text);
    font-size: 15px;
    font-weight: 500;
}

.settings-option-copy small {
    color: var(--kavi-text-3);
    font-size: 13px;
}

#mySettings select,
#mySettings :is(.form-control, input[type='text'], input[type='url'], input[type='password'], input[type='number']) {
    height: 40px;
    border: 1px solid var(--kavi-line);
    border-radius: 10px;
    background: var(--kavi-bg-1) !important;
    font-size: 15px;
}

#mySettings button.btn-custom,
#mySettings .tabcontent button:not(.settings-icon-btn):not(.btn-rtmp-preset) {
    border-radius: var(--kavi-r-md);
}

#mySettings .tabcontent button:hover {
    background: var(--kavi-fill-2);
}

#mySettings .settings-icon-btn {
    border: none;
    border-radius: 50%;
    background: var(--kavi-fill-2);
}

/* iOS-style switch */

.form-switch.form-switch-md {
    min-height: 31px;
}

.form-switch.form-switch-md .form-check-input,
.form-switch.form-switch-md .form-check-input:not(:checked),
.form-switch.form-switch-md .form-check-input:checked {
    width: 51px;
    height: 31px;
    border: none;
    border-radius: 999px;
    background-size: 27px 27px;
    transition:
        background-color 0.25s var(--kavi-ease),
        background-position 0.25s var(--kavi-ease);
}

.form-switch.form-switch-md .form-check-input:not(:checked) {
    background-color: rgba(255, 255, 255, 0.2);
    background-image: radial-gradient(circle, #fff 0 12.5px, transparent 13px);
    background-position: 2px center;
}

.form-switch.form-switch-md .form-check-input:checked {
    background-color: var(--kavi-violet);
    background-image: radial-gradient(circle, #fff 0 12.5px, transparent 13px);
    background-position: calc(100% - 2px) center;
}

.form-switch.form-switch-md::after,
.form-switch.form-switch-md:has(.form-check-input:checked)::after {
    content: none;
}

/* customize-room switches */

.cr-switch {
    border-radius: 999px;
}

/* =====================================================================
   Recording panel
   ===================================================================== */

body:has(#podcastPanel:not(.hidden)) #videoMediaContainer {
    width: calc(100% - 392px);
}

body:has(#podcastPanel:not(.hidden)) #bottomButtons[data-position='horizontal'],
body:has(#podcastPanel:not(.hidden)) #bottomButtons:not([data-position]) {
    left: calc((100% - 392px) / 2);
}

.podcast-panel.podcast-sidebar {
    position: fixed;
    top: 12px;
    right: 12px;
    bottom: 12px;
    width: 368px;
    height: auto;
    border: 1px solid var(--kavi-line);
    border-radius: 24px;
    background: rgba(35, 33, 39, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(40px);
    backdrop-filter: saturate(180%) blur(40px);
    box-shadow: var(--kavi-shadow);
    transform: translateX(calc(100% + 24px));
}

.podcast-panel-header {
    padding: 20px 22px 12px;
    border-bottom: none;
}

.podcast-panel-title {
    color: var(--kavi-text);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.024em;
}

.podcast-panel-close {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 50%;
    background: var(--kavi-fill-2);
    color: var(--kavi-text-2);
    font-size: 0.8rem;
}

.podcast-panel-close:hover {
    background: var(--kavi-fill-3);
    color: var(--kavi-text);
}

.podcast-panel-main > * {
    box-sizing: border-box;
    width: 100%;
}

.podcast-panel-main {
    gap: 12px;
    margin-top: 0;
    padding: 4px 16px 20px;
}

.podcast-subsection,
.podcast-subsection-upload-health,
.podcast-subsection-markers,
.podcast-subsection-status {
    margin: 0;
    padding: 16px;
    border: none;
    border-radius: var(--kavi-r-md);
    background: var(--kavi-bg-3);
}

.podcast-section-title {
    margin: 0 0 10px;
    color: var(--kavi-text-3);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.podcast-section-title i {
    display: none;
}

.podcast-status-row {
    gap: 12px;
}

.podcast-status-badge {
    padding: 4px 12px;
    border-radius: 999px;
    background: var(--kavi-fill-2);
    color: var(--kavi-text-2);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
}

.podcast-status-badge.status-recording,
.podcast-status-badge.status-failed {
    background: rgba(255, 105, 97, 0.16);
    color: var(--kavi-danger);
}

.podcast-status-badge.status-paused,
.podcast-status-badge.status-starting,
.podcast-status-badge.status-uploading {
    background: var(--kavi-tint);
    color: var(--kavi-lilac);
}

.podcast-duration {
    color: var(--kavi-text);
    font-size: 34px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.podcast-host-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.podcast-btn {
    justify-content: center;
    gap: 8px;
    height: 46px;
    padding: 0 18px;
    border: none;
    border-radius: var(--kavi-r-md);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.011em;
}

.podcast-btn:hover {
    opacity: 1;
    transform: none;
    filter: brightness(1.08);
}

.podcast-btn-start {
    background: #ff5f57;
    color: #fff;
}

.podcast-btn-pause {
    background: var(--kavi-fill-2);
    color: var(--kavi-text);
}

.podcast-btn-resume {
    background: var(--kavi-violet);
    color: var(--kavi-on-violet);
}

.podcast-btn-stop {
    background: var(--kavi-fill-2);
    color: var(--kavi-danger);
}

.podcast-btn-download,
.podcast-btn-marker {
    background: var(--kavi-violet);
    color: var(--kavi-on-violet);
}

.podcast-progress-bar,
.podcast-mic-bar-wrap {
    height: 6px;
    border-radius: 999px;
    background: var(--kavi-fill-2);
    overflow: hidden;
}

.podcast-progress-fill,
.podcast-mic-bar {
    border-radius: 999px;
    background: var(--kavi-violet);
}

.podcast-upload-label {
    margin-bottom: 8px;
    color: var(--kavi-text-2);
    font-size: 14px;
}

.podcast-health-table {
    width: 100%;
    font-size: 13px;
}

.podcast-health-table th {
    color: var(--kavi-text-3);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
}

.podcast-health-table td,
.podcast-health-table th {
    padding: 8px 4px;
    border-bottom: 1px solid var(--kavi-line);
}

.podcast-marker-input {
    height: 40px;
    border: 1px solid var(--kavi-line);
    border-radius: 10px;
    background: var(--kavi-bg-1);
    color: var(--kavi-text);
}

.podcast-marker-input:focus {
    border-color: var(--kavi-violet);
}

@media (max-width: 900px) {
    body:has(#podcastPanel:not(.hidden)) #videoMediaContainer {
        width: 100%;
    }

    body:has(#podcastPanel:not(.hidden)) #bottomButtons[data-position='horizontal'],
    body:has(#podcastPanel:not(.hidden)) #bottomButtons:not([data-position]) {
        left: 50%;
    }

    .podcast-panel.podcast-sidebar {
        left: 12px;
        width: auto;
    }
}

/* customize room: iOS-style switches, quieter step markers */

.cr-step {
    display: none;
}

.cr-switch {
    width: 51px;
    height: 31px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
}

.cr-switch::before,
.cr-switch-wrap input:checked + .cr-switch::before {
    content: none;
}

.cr-switch::after {
    top: 2px;
    left: 2px;
    width: 27px;
    height: 27px;
    background: #fff;
}

.cr-switch-wrap input:checked + .cr-switch {
    background: var(--kavi-violet);
}

.cr-switch-wrap input:checked + .cr-switch::after {
    left: 22px;
    background: #fff;
}

.cr-section,
.cr-summary {
    border: 1px solid var(--kavi-line);
    border-radius: var(--kavi-r-xl);
    background: var(--kavi-bg-1);
}

.cr-summary::before {
    display: none;
}

.cr-eyebrow {
    color: var(--kavi-violet);
    letter-spacing: 0;
    text-transform: none;
}

/* Scroll-reveal helpers: always visible, so pages never sit half-faded */

.has-animations [class*='reveal-'],
.has-animations [class*='reveal-'].is-revealed {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.login-card > *,
.waiting-card > * {
    border: none;
    box-shadow: none;
}

.login-card::before,
.login-card::after,
.waiting-card::before,
.waiting-card::after {
    display: none;
}

.login-form-section,
#loginForm,
.waiting-card > div {
    padding-right: 0;
    padding-left: 0;
    border: none !important;
    background: none !important;
    box-shadow: none !important;
}

/* ---------------------------------------------------------------------------
   Creator sign-in (kavi creator gate)
   --------------------------------------------------------------------------- */

.kl-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kl-signout {
    color: rgba(235, 230, 245, 0.62);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 160ms ease;
}

.kl-signout:hover {
    color: #fff;
}

.cr-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.cr-signout::before {
    content: none !important;
}

/* Sign-in sheet: the creator portal's layout (Login.jsx + App.css .login-*),
   in studio's dark palette. */
.kp-body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(900px 420px at 50% -80px, rgba(55, 42, 66, 0.85), transparent 70%), var(--kavi-bg);
    background-repeat: no-repeat;
    color: #f2f0f5;
    font-family: var(--kavi-font);
    -webkit-font-smoothing: antialiased;
}

.kp-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
    padding: 48px 16px 64px;
}

.kp-sheet {
    width: 100%;
    max-width: 560px;
    padding-top: 8px;
}

.kp-logo {
    display: block;
    height: 36px;
    width: auto;
    max-width: 140px;
    object-fit: contain;
    margin: 0 0 18px;
}

.kp-title {
    margin: 0 0 8px;
    color: #fff;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 41px;
}

.kp-lead {
    margin: 0 0 22px;
    color: rgba(235, 230, 245, 0.6);
    font-size: 15px;
    font-weight: 400;
    letter-spacing: -0.024em;
    line-height: 1.47;
}

.kp-group {
    margin: 0;
    overflow: hidden;
    border-radius: 12px;
    background: var(--kavi-bg-1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.kp-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
    padding: 11px 16px;
    box-sizing: border-box;
}

.kp-row + .kp-row::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 16px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    transform: scaleY(0.5);
    transform-origin: top;
}

.kp-row-label {
    flex-shrink: 0;
    color: #f2f0f5;
    font-size: 17px;
    font-weight: 400;
    letter-spacing: -0.022em;
}

.kp-row-input {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 0;
    outline: none;
    background: transparent;
    box-shadow: none;
    color: #fff;
    font: inherit;
    font-size: 17px;
    letter-spacing: -0.022em;
    text-align: right;
}

.kp-row-input:-webkit-autofill {
    -webkit-text-fill-color: #fff;
    -webkit-box-shadow: 0 0 0 40px var(--kavi-bg-1) inset;
}

.kp-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin: 12px 16px 0;
}

.kp-link {
    padding: 0;
    border: none;
    background: none;
    color: var(--kavi-lilac);
    font: inherit;
    font-size: 15px;
    letter-spacing: -0.024em;
    cursor: pointer;
}

.kp-link:hover:not(:disabled) {
    text-decoration: underline;
}

.kp-link:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.kp-notice {
    margin: 12px 16px 0;
    color: #f2f0f5;
    font-size: 13px;
    letter-spacing: -0.08px;
}

.kp-error {
    margin: 12px 16px 0;
    color: #ff6961;
    font-size: 13px;
    letter-spacing: -0.08px;
}

.kp-submit {
    display: block;
    width: 100%;
    min-height: 50px;
    margin-top: 20px;
    border: none;
    border-radius: 12px;
    background: var(--kavi-lilac);
    color: var(--kavi-on-violet);
    font: inherit;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.022em;
    cursor: pointer;
}

.kp-submit:hover:not(:disabled) {
    background: #c9bce6;
}

.kp-submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.kp-footnote {
    margin: 16px 16px 0;
    color: rgba(235, 230, 245, 0.5);
    font-size: 13px;
    line-height: 18px;
    letter-spacing: -0.08px;
}

.kp-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin: 16px 16px 0;
    font-size: 13px;
    line-height: 18px;
    letter-spacing: -0.08px;
}

.kp-legal a {
    color: var(--kavi-violet);
    text-decoration: none;
}

.kp-legal a:hover {
    text-decoration: underline;
}

@media (min-width: 700px) {
    .kp-page {
        align-items: center;
        padding-top: 0;
    }
}

/* ---------------------------------------------------------------------------
   Creator dashboard (dashboard.html): Home, New room, Recordings
   --------------------------------------------------------------------------- */

.kd-body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(1100px 480px at 60% -120px, rgba(55, 42, 66, 0.7), transparent 70%), var(--kavi-bg);
    background-repeat: no-repeat;
    background-size: auto;
    color: #f2f0f5;
    font-family: var(--kavi-font);
    -webkit-font-smoothing: antialiased;
}

.kd-shell {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    min-height: 100vh;
}

.kd-sidebar {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
    height: 100vh;
    box-sizing: border-box;
    padding: 22px 12px 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(15, 13, 18, 0.72);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.kd-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px;
}

.kd-brand img {
    width: auto !important;
    height: 28px !important;
}

.kd-brand span {
    color: rgba(235, 230, 245, 0.62);
    font-size: 15px;
    font-weight: 600;
}

.kd-nav {
    display: grid;
    gap: 2px;
}

.kd-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 10px;
    color: rgba(235, 230, 245, 0.72);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition:
        background 160ms ease,
        color 160ms ease;
}

.kd-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.kd-nav-item.is-active {
    background: rgba(213, 203, 236, 0.12);
    color: #fff;
}

.kd-nav-item.is-active .kd-nav-icon {
    color: var(--kavi-lilac);
}

.kd-nav-icon {
    display: inline-flex;
    color: rgba(235, 230, 245, 0.55);
}

.kd-sidebar-footer {
    display: grid;
    gap: 4px;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.kd-who {
    margin: 0 10px 4px;
    overflow: hidden;
    color: rgba(235, 230, 245, 0.5);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kd-who:empty {
    display: none;
}

.kd-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 10px;
    margin: 10px 10px 0;
    font-size: 11px;
    line-height: 16px;
}

.kd-legal a {
    color: rgba(235, 230, 245, 0.45);
    text-decoration: none;
}

.kd-legal a:hover {
    color: rgba(235, 230, 245, 0.85);
}

.kd-main {
    min-width: 0;
    padding: 56px clamp(20px, 5vw, 64px) 80px;
}

.kd-panel {
    max-width: 760px;
    margin: 0 auto;
    animation: kl-rise 0.45s var(--kavi-ease) both;
}

.kd-panel--wide {
    max-width: 1180px;
}

.kd-title {
    margin: 0 0 8px;
    color: #fff;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.4px;
    line-height: 41px;
}

.kd-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.kd-lead {
    margin: 0 0 28px;
    color: rgba(235, 230, 245, 0.6);
    font-size: 15px;
    line-height: 1.47;
    letter-spacing: -0.024em;
}

.kd-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.kd-action {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    border-radius: 16px;
    background: var(--kavi-bg-1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    color: #f2f0f5;
    text-decoration: none;
    transition:
        transform 160ms ease,
        background 160ms ease;
}

.kd-action:hover {
    background: #222026;
}

.kd-action:active {
    transform: scale(0.99);
}

.kd-action--primary {
    background: var(--kavi-lilac);
    box-shadow: none;
    color: var(--kavi-on-violet);
}

.kd-action--primary:hover {
    background: #c9bce6;
}

.kd-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--kavi-lilac);
}

.kd-action--primary .kd-action-icon {
    background: rgba(26, 22, 32, 0.12);
    color: var(--kavi-on-violet);
}

.kd-action-text {
    display: grid;
    gap: 4px;
}

.kd-action-text strong {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.022em;
}

.kd-action-text small {
    font-size: 14px;
    line-height: 1.4;
    opacity: 0.72;
}

.kd-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin: 36px 16px 8px;
}

.kd-section-head h2 {
    margin: 0;
    color: rgba(235, 230, 245, 0.55);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.kd-section-head a {
    color: var(--kavi-lilac);
    font-size: 15px;
    text-decoration: none;
}

.kd-group {
    overflow: hidden;
    border-radius: 12px;
    background: var(--kavi-bg-1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.kd-row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 44px;
    padding: 11px 16px;
    color: inherit;
    text-decoration: none;
}

.kd-row + .kd-row::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 16px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    transform: scaleY(0.5);
    transform-origin: top;
}

a.kd-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.kd-row-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.kd-row-title {
    overflow: hidden;
    color: #fff;
    font-size: 17px;
    letter-spacing: -0.022em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kd-row-sub {
    color: rgba(235, 230, 245, 0.5);
    font-size: 13px;
}

.kd-group-empty {
    margin: 0;
    padding: 16px;
    color: rgba(235, 230, 245, 0.55);
    font-size: 15px;
    line-height: 1.45;
}

.kd-steps {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    background: var(--kavi-bg-1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    list-style: none;
    counter-reset: kd-step;
}

.kd-steps li {
    position: relative;
    display: grid;
    gap: 2px;
    padding: 14px 16px 14px 56px;
    counter-increment: kd-step;
}

.kd-steps li + li::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 56px;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    transform: scaleY(0.5);
}

.kd-steps li::after {
    content: counter(kd-step);
    position: absolute;
    top: 14px;
    left: 16px;
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(213, 203, 236, 0.14);
    color: var(--kavi-lilac);
    font-size: 13px;
    font-weight: 600;
}

.kd-steps strong {
    color: #fff;
    font-size: 16px;
    font-weight: 600;
}

.kd-steps span {
    color: rgba(235, 230, 245, 0.55);
    font-size: 14px;
    line-height: 1.45;
}

.kd-badge {
    flex: none;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(235, 230, 245, 0.75);
    font-size: 12px;
    font-weight: 600;
}

.kd-badge.is-ready {
    background: rgba(213, 203, 236, 0.16);
    color: var(--kavi-lilac);
}

.kd-badge.is-live {
    background: rgba(255, 105, 97, 0.16);
    color: #ff8a80;
}

.kd-badge.is-busy {
    background: rgba(153, 130, 213, 0.18);
    color: #c4b6ea;
}

.kd-tag {
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(235, 230, 245, 0.7);
    font-size: 11px;
    font-weight: 600;
    vertical-align: 2px;
}

.kd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border: none;
    border-radius: 999px;
    background: var(--kavi-lilac);
    color: var(--kavi-on-violet);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.kd-btn:hover {
    background: #c9bce6;
}

.kd-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.kd-btn--small {
    min-height: 32px;
    padding: 0 14px;
    background: rgba(213, 203, 236, 0.14);
    color: var(--kavi-lilac);
    font-size: 14px;
}

.kd-btn--small:hover {
    background: rgba(213, 203, 236, 0.22);
}

.kd-text-btn {
    padding: 0;
    border: none;
    background: none;
    color: var(--kavi-lilac);
    font: inherit;
    font-size: 15px;
    cursor: pointer;
}

.kd-text-btn:hover {
    text-decoration: underline;
}

.kd-rec-list {
    display: grid;
    gap: 28px;
}

.kd-rec-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 0 16px 10px;
}

.kd-rec-title {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.kd-rec-sub {
    margin: 4px 0 0;
    color: rgba(235, 230, 245, 0.5);
    font-size: 13px;
}

.kd-extras {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 10px 16px 0;
    font-size: 14px;
}

.kd-extras a {
    color: var(--kavi-lilac);
    text-decoration: none;
}

.kd-extras a:hover {
    text-decoration: underline;
}

.kd-note {
    margin: 12px 0 0;
    padding: 0 16px;
}

.kd-note summary {
    color: rgba(235, 230, 245, 0.7);
    font-size: 14px;
    cursor: pointer;
}

.kd-note-input {
    box-sizing: border-box;
    width: 100%;
    margin-top: 10px;
    padding: 12px 14px;
    border: none;
    border-radius: 12px;
    outline: none;
    background: var(--kavi-bg-1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    font-size: 15px;
    line-height: 1.45;
    resize: vertical;
}

.kd-note-input:focus {
    box-shadow:
        inset 0 0 0 1px var(--kavi-violet),
        0 0 0 3px rgba(153, 130, 213, 0.22);
}

.kd-note-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 8px;
}

.kd-note-status {
    color: rgba(235, 230, 245, 0.55);
    font-size: 13px;
}

.kd-empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 48px 24px;
    border-radius: 16px;
    background: var(--kavi-bg-1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    text-align: center;
}

.kd-empty-title {
    margin: 0;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
}

.kd-empty {
    max-width: 380px;
    margin: 0 0 12px;
    color: rgba(235, 230, 245, 0.55);
    font-size: 15px;
    line-height: 1.45;
}

.kd-error {
    margin: 0 16px 16px;
    color: #ff6961;
    font-size: 14px;
}

/* The room form inside the New room tab */
.kd-panel .cr-layout {
    margin-top: 4px;
}

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

    .kd-sidebar {
        position: sticky;
        z-index: 10;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 12px;
        height: auto;
        padding: 12px 16px;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .kd-brand {
        padding: 0;
    }

    .kd-nav {
        order: 3;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        width: 100%;
        padding: 3px;
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.05);
    }

    .kd-nav-item {
        justify-content: center;
        min-height: 32px;
        font-size: 14px;
    }

    .kd-nav-item .kd-nav-icon {
        display: none;
    }

    .kd-sidebar-footer {
        margin: 0 0 0 auto;
        padding: 0;
        border: none;
    }

    .kd-sidebar-footer .kd-who,
    .kd-sidebar-footer .kd-legal {
        display: none;
    }

    .kd-sidebar-footer .kd-nav-item {
        min-height: 32px;
        font-size: 14px;
    }

    .kd-main {
        padding-top: 28px;
    }

    .kd-actions {
        grid-template-columns: 1fr;
    }
}
