
:root {
    --slate-700: #334155;
    --slate-100: #f1f5f9;
    --green-start: #90dbbd;
    --green-end: #68c09d;
    --frame-bg: #ebebec;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, sans-serif;
    background: var(--frame-bg);
    color: var(--slate-700);
}

.site-page {
    min-height: 100vh;
    background-color: #dbe6f2;
    background-image: url("../img/Background.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
}

.header-spec {
    padding: 0;
}

.header-spec__frame {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 16px 20px;
}

.header-page {
    margin-bottom: 37px;
}

.header-page:last-child {
    margin-bottom: 0;
}

.header-shell {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.82) 100%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 999px;
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    backdrop-filter: blur(10px);
}

.header-shell-adaptive {
    min-height: 68px;
    padding: 8px;
}

.header-side {
    flex: 1 0 0;
    display: flex;
    align-items: center;
}

.header-side-right {
    justify-content: flex-end;
    gap: 8px;
}

.header-center {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    display: block;
    object-fit: contain;
}

.logo-desktop {
    width: 82px;
    height: 40px;
}

.logo-tablet {
    width: 74px;
    height: 36px;
}

.logo-mobile {
    width: 57px;
    height: 28px;
}

.nav-item,
.icon-chip,
.cta-button,
.back-button,
.user-button {
    border: none;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
}

.text-item {
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    color: var(--slate-700);
}

.text-item {
    padding: 16px 24px;
}

.icon-chip {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    color: var(--slate-700);
}

.menu-toggle {
    display: none;
    padding: 12px;
}

.menu-icon {
    width: 16px;
    height: 16px;
    display: block;
}

.cta-button {
    border-radius: 999px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
    background: radial-gradient(ellipse at left top, var(--green-start) 0%, var(--green-end) 100%);
    box-shadow: 0 8px 16px rgba(63, 181, 134, 0.2);
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.cta-button {
    padding: 16px 24px;
}

.cta-button:hover,
.cta-button:focus-visible {
    background: radial-gradient(circle at 20% 0, #9adfc2 0, #72c8a5 100%);
}

.cta-button:active {
    background: radial-gradient(circle at 20% 0, #87d4b4 0, #5cb792 100%);
    box-shadow: 0 5px 10px rgba(63, 181, 134, 0.18);
    transform: translateY(1px);
}

.back-button {
    border-radius: 999px;
    border: 1px solid #fff;
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
    background: radial-gradient(circle at top, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    color: var(--slate-700);
    display: none;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    line-height: 20px;
    padding: 16px 24px;
    text-decoration: none;
}

.back-button:hover,
.back-button:focus-visible {
    color: var(--slate-700);
    text-decoration: none;
}

.back-icon {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

.back-button__label {
    display: inline-block;
}

.back-icon-tablet,
.back-icon-mobile {
    display: none;
}

.guest-controls,
.auth-controls {
    display: flex;
    align-items: center;
}

.guest-controls {
    gap: 8px;
}

.auth-controls {
    gap: 12px;
    display: none;
}

.tariff-link,
.home-link {
    display: inline-flex;
    text-decoration: none;
}

.header-adaptive.is-auth .header-side-left {
    gap: 4px;
}

.login-link {
    display: inline-flex;
    text-decoration: none;
}

.login-link:hover,
.login-link:focus-visible,
.guest-controls .cta-button:hover,
.guest-controls .cta-button:focus-visible,
.header-collapse-inner .cta-button:hover,
.header-collapse-inner .cta-button:focus-visible {
    text-decoration: none;
}

.guest-controls a,
.header-collapse-inner a.login-link,
.header-collapse-inner a.cta-button {
    text-decoration: none;
}

.guest-controls .cta-button,
.header-collapse-inner .cta-button {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.header-collapse {
    margin-top: 10px;
}

.header-collapse-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    padding: 12px;
}

.cta-collapse {
    width: 100%;
    justify-content: center;
}

.star-counter-host {
    position: relative;
    display: inline-flex;
}

/* Кружок звёзд с кольцевым прогрессом (Figma 140:9969 / 140:11045) */
.star-counter-ring {
    position: relative;
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    cursor: default;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.star-counter-ring__svg {
    display: block;
    width: 100%;
    height: 100%;
}

.star-counter-ring__track {
    stroke: rgba(253, 181, 246, 0.35);
}

.star-counter-ring.is-low .star-counter-ring__track {
    stroke: rgba(235, 210, 190, 0.9);
}

.star-counter-ring__progress {
    transition: stroke-dashoffset 0.35s ease, stroke 0.25s ease;
}

.star-counter-ring__core {
    position: absolute;
    left: 13.46%;
    right: 13.46%;
    top: 50%;
    transform: translateY(-50%);
    aspect-ratio: 1;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(141% 141% at 0% 9%, #fdb5f6 0%, #bc9cf5 50%, #7b83f5 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.star-counter-ring.is-low .star-counter-ring__core {
    background: #ce8f5d;
    box-shadow: none;
}

.star-counter-ring__value {
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    letter-spacing: -0.02em;
    color: #fff;
    white-space: nowrap;
    text-align: center;
}

.star-counter-ring.is-normal .star-counter-ring__value {
    background: linear-gradient(180deg, #fff 0%, rgba(255, 255, 255, 0.82) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.star-counter-host:hover .star-counter-ring,
.star-counter-host:focus-within .star-counter-ring {
    transform: translateY(-1px);
    filter: drop-shadow(0 6px 14px rgba(123, 131, 245, 0.28));
}

.star-counter-host:hover .star-counter-ring.is-low,
.star-counter-host:focus-within .star-counter-ring.is-low {
    filter: drop-shadow(0 6px 14px rgba(206, 143, 93, 0.32));
}

/* Hover-only popover: "Доступно X из Y" — only visible when hovering the star chip */
.star-counter-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 9999;
    width: 260px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fe 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
    pointer-events: none;
}

.star-counter-host:hover .star-counter-tooltip,
.star-counter-host:focus-within .star-counter-tooltip,
.star-counter-tooltip:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.star-counter-tooltip::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 18px;
    width: 12px;
    height: 12px;
    background: inherit;
    border-left: 1px solid rgba(255, 255, 255, 0.8);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    transform: rotate(45deg);
    opacity: 0;
    transition: opacity 0.18s ease;
}

.star-counter-host:hover .star-counter-tooltip::before,
.star-counter-host:focus-within .star-counter-tooltip::before {
    opacity: 1;
}

.star-counter-tooltip-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 16px;
}

.star-counter-tooltip-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #334155;
    font-weight: 500;
    white-space: nowrap;
}

.star-counter-tooltip-left img {
    width: 16px;
    height: 16px;
    display: block;
}

.star-counter-tooltip-left b {
    font-weight: 600;
    color: #334155;
}

.star-counter-tooltip-right {
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

.star-counter-tooltip-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.star-counter-tooltip-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: radial-gradient(circle at 0% 50%, #fdb5f6 0%, #bc9cf5 50%, #7b83f5 100%);
}

@media (max-width: 575.98px) {
    .star-counter-tooltip {
        width: 240px;
        right: -8px;
        padding: 10px 12px;
    }

    .star-counter-tooltip::before {
        right: 16px;
    }
}

/* legacy .star-counter — см. .star-counter-ring */

.star-counter-tablet {
    width: 48px;
    height: 48px;
    font-size: 16px;
    line-height: 18px;
}

.star-counter-mobile {
    width: 36px;
    height: 36px;
    border-width: 2px;
    font-size: 12px;
    line-height: 14px;
}

.user-button {
    border-radius: 999px;
    background: var(--slate-100);
    color: var(--slate-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.user-icon {
    width: 24px;
    height: 24px;
    display: block;
}

.user-button-desktop {
    width: 52px;
    height: 52px;
}

.header-adaptive.is-back .menu-toggle,
.header-adaptive.is-back .tariff-link,
.header-adaptive.is-back .home-link,
.header-adaptive.is-back .guest-controls,
.header-adaptive.is-back .auth-controls {
    display: none;
}

.header-adaptive.is-back .back-button {
    display: inline-flex;
    padding: 16px 24px;
    gap: 8px;
    font-size: 14px;
    line-height: 20px;
    min-height: 52px;
    align-items: center;
}

.header-adaptive.is-back .back-button .back-icon {
    width: 20px;
    height: 20px;
}

.header-adaptive.is-back .header-shell {
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
}

.header-adaptive.is-auth .menu-toggle,
.header-adaptive.is-auth .guest-controls,
.header-adaptive.is-auth .back-button {
    display: none;
}

.header-adaptive.is-auth .auth-controls {
    display: inline-flex;
}

@media (max-width: 991.98px) {
    .header-shell-adaptive {
        min-height: 56px;
        padding: 6px;
    }

    .text-item,
    .cta-button,
    .back-button {
        padding: 12px 16px;
    }

    .logo-desktop {
        width: 74px;
        height: 36px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .header-adaptive.is-auth .menu-toggle {
        display: none;
    }

    .star-counter-ring {
        width: 48px;
        height: 48px;
    }

    .user-button-desktop {
        width: 48px;
        height: 48px;
    }

    .header-adaptive.is-no-auth .tariff-link {
        display: inline-flex;
    }

    .back-icon-desktop,
    .back-icon-mobile {
        display: none;
    }

    .back-icon-tablet {
        display: block;
    }

    .back-icon {
        width: 16px;
    }
}

@media (max-width: 575.98px) {
    .header-spec__frame {
        max-width: 410px;
        padding: 16px;
    }

    .header-shell-adaptive {
        min-height: 48px;
        padding: 6px;
    }

    .text-item,
    .login-link,
    .back-button {
        padding: 10px 16px;
        font-size: 12px;
        line-height: 16px;
    }

    .logo-desktop {
        width: 57px;
        height: 28px;
    }

    .menu-toggle {
        width: 36px;
        height: 36px;
        padding: 10px;
    }

    .header-adaptive.is-no-auth .tariff-link,
    .header-adaptive.is-no-auth .cta-button {
        display: none;
    }

    .header-adaptive.is-auth .tariff-link,
    .header-adaptive.is-auth .home-link {
        display: inline-flex;
    }

    .header-adaptive.is-auth .star-counter-ring {
        width: 36px;
        height: 36px;
    }

    .header-adaptive.is-auth .star-counter-ring__value {
        font-size: 10px;
        line-height: 14px;
    }

    .header-adaptive.is-auth .user-button-desktop {
        width: 36px;
        height: 36px;
    }

    .header-adaptive.is-auth .user-icon {
        width: 20px;
        height: 20px;
    }

    .header-adaptive.is-auth .guest-controls,
    .header-adaptive.is-auth .menu-toggle {
        display: none;
    }

    .header-adaptive.is-back .back-button {
        padding: 10px 16px;
        gap: 6px;
        min-height: 36px;
        font-size: 12px;
        line-height: 16px;
    }

    .back-icon {
        width: 14px;
    }

    .back-icon-desktop,
    .back-icon-tablet {
        display: none;
    }

    .back-icon-mobile {
        display: block;
    }
}

.footer-spec__frame {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 20px 20px 20px;
}

.footer-adaptive {
    width: 100%;
}

.footer-shell {
    border-radius: 32px;
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    background: linear-gradient(168deg, rgba(255, 255, 255, 0.8) 10.24%, rgba(255, 255, 255, 0.5) 100%);
}

.footer-shell-adaptive {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 84px;
}

.footer-links-adaptive {
    display: flex;
    align-items: center;
    gap: 32px;
    flex-wrap: nowrap;
}

.footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0.4;
}

.social-pill {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid #fff;
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
    background: radial-gradient(circle at 50% 0%, #fff 0%, rgba(255, 255, 255, 0.33) 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-pill-mobile {
    width: 40px;
    height: 40px;
}

.social-icon-20 {
    width: 20px;
    height: 20px;
    display: block;
}

.social-icon-16 {
    width: 16px;
    height: 16px;
    display: block;
}

.social-ig {
    position: relative;
    display: block;
}

.social-ig img {
    position: absolute;
    display: block;
}

.social-ig .ig-base {
    inset: 0;
    width: 100%;
    height: 100%;
}

.social-ig .ig-center {
    left: 24.3%;
    top: 24.3%;
    width: 51.4%;
    height: 51.4%;
}

.social-ig .ig-dot {
    left: 70.7%;
    top: 17.3%;
    width: 12%;
    height: 12%;
}

.social-ig-20 {
    width: 20px;
    height: 20px;
}

.social-ig-16 {
    width: 16px;
    height: 16px;
}

.footer-link {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    white-space: nowrap;
}

.footer-link:hover {
    color: #475569;
}

@media (max-width: 991.98px) {
    .footer-shell-adaptive {
        min-height: 136px;
        padding: 32px;
        flex-direction: column;
        justify-content: center;
        gap: 32px;
    }

    /* Figma tablet: сверху соцсети, снизу текстовые ссылки */
    .footer-social {
        order: 1;
    }

    .footer-links-adaptive {
        order: 2;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 575.98px) {
    .footer-spec__frame {
        max-width: 410px;
        padding: 16px;
    }

    .footer-shell-adaptive {
        min-height: 176px;
        padding: 32px;
        gap: 16px;
        align-items: stretch;
    }

    .footer-social {
        order: 1;
    }

    .footer-social .social-pill {
        width: 40px;
        height: 40px;
    }

    .footer-social .social-icon-20 {
        width: 16px;
        height: 16px;
    }

    .footer-social .social-ig-20 {
        width: 16px;
        height: 16px;
    }

    .footer-links-adaptive {
        order: 2;
        display: grid;
        grid-template-columns: auto auto;
        grid-template-areas:
            "contact offer"
            "policy copy";
        justify-content: space-between;
        align-items: start;
        row-gap: 12px;
        column-gap: 18px;
        width: 100%;
    }

    .footer-link {
        font-size: 12px;
        line-height: 16px;
    }

    .footer-link-contact { grid-area: contact; }
    .footer-link-offer { grid-area: offer; justify-self: start; }
    .footer-link-policy { grid-area: policy; }
    .footer-link-copy { grid-area: copy; justify-self: end; }
}

.top-components-frame {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 20px 0;
}

.top-components-panel {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.45);
    padding: 22px;
}

.top-components-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.top-comp-card {
    border: 1px dashed #c7a8ff;
    border-radius: 8px;
    padding: 14px;
    display: grid;
    gap: 10px;
    align-content: start;
}

.top-comp-card h3 {
    margin: 0 0 4px;
    color: #0f172a;
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
}

.top-comp-card-wide {
    grid-column: 1 / -1;
}

.menu-item-kit {
    border: none;
    border-radius: 16px;
    padding: 16px 24px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    background: transparent;
    width: 266px;
}

.menu-item-kit img {
    width: 20px;
    height: 20px;
}

.menu-item-kit.is-hover {
    background: radial-gradient(circle at 50% 0, #ffffff 0, rgba(255, 255, 255, 0.8) 100%);
    border: 1px solid #fff;
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
}

.menu-item-kit.is-active {
    background: radial-gradient(circle at 50% 0, #ffffff 0, rgba(255, 255, 255, 0.8) 100%);
    border: 1px solid #fff;
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
    color: #69c9a3;
}

.category-item-kit {
    width: 254px;
    border-radius: 999px;
    min-height: 64px;
    border: 1px solid #fff;
    background: radial-gradient(circle at 50% 0, #fff 0, rgba(255, 255, 255, 0.6) 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px;
    color: #334155;
    font-size: 16px;
}

.category-item-kit span {
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
}

.category-item-kit img {
    width: 40px;
    height: 40px;
}

.category-item-kit.is-hover {
    border: 5px solid #90dbbd;
    background: radial-gradient(circle at 15% 0, #90dbbd 0, #68c09d 100%);
    color: #fff;
    box-shadow: 0 12px 24px rgba(63, 181, 134, 0.2);
}

.avatar-kit {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    overflow: hidden;
    box-shadow: 0 32px 50px rgba(40, 67, 115, 0.04);
    background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.2) 0, rgba(255, 255, 255, 0.6) 100%);
}

.avatar-kit img { width: 100%; height: 100%; object-fit: cover; display: block; }

.star-counter-kit {
    display: flex;
    gap: 10px;
}

.star-chip {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.star-chip img.bg { position: absolute; inset: 0; width: 100%; height: 100%; }
.star-chip img.fill {
    position: absolute;
    right: 0;
    width: 50%;
    transform: rotate(-180deg) scaleX(-1);
    object-fit: contain;
}
.star-chip img.icon {
    width: 12px;
    height: 12px;
    position: relative;
    z-index: 1;
    margin-right: -1px;
}
.star-chip strong {
    position: relative;
    z-index: 1;
    font-size: 18px;
    line-height: 18px;
    font-weight: 600;
    margin-right: -1px;
}
.star-chip.is-three strong { color: #ce8f5d; }
.star-chip.is-fifteen strong { color: #a895f5; }
.star-chip.is-infinity img.inf { width: 24px; height: 12px; position: relative; z-index: 1; }
.star-chip img.bg { transform: rotate(-180deg) scaleX(-1); }
.star-chip.is-three img.fill { top: 0.14%; height: 73.86%; }
.star-chip.is-fifteen img.fill { top: 0.14%; height: 99.72%; }

.favorite-kit {
    display: flex;
    gap: 10px;
}

.fav-btn {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    border: none;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.fav-btn img { width: 24px; height: 24px; }

.fav-btn.is-hover {
    background: transparent;
    box-shadow: none;
}

.fav-btn.is-active {
    background: transparent;
}

.fav-btn:focus,
.fav-btn:focus-visible {
    outline: none;
    box-shadow: none;
}

.fav-btn.fav-btn-live:active {
    transform: scale(0.96);
}

.tab-kit { display: flex; gap: 10px; flex-wrap: wrap; }

.tab-chip,
.nav-chip {
    border: none;
    border-radius: 999px;
    padding: 8px 16px;
    min-height: 36px;
    font-size: 14px;
    line-height: 20px;
}

.tab-chip { background: transparent; color: #64748b; }
.tab-chip.is-active {
    color: #fff;
    background: radial-gradient(circle at 15% 0, #90dbbd 0, #68c09d 100%);
    box-shadow: 0 4px 8px rgba(63, 181, 134, 0.2);
}

.nav-chip { background: transparent; color: #334155; }
.nav-chip.is-active { background: #f4fffb; color: #69c9a3; }

.meditation-card-kit {
    width: 100%;
    max-width: 867px;
    border-radius: 9999px;
    padding: 4px;
    display: grid;
    grid-template-columns: 80px 1fr auto;
    align-items: center;
    gap: 4px;
    background: radial-gradient(circle at 50% 0, #fff 0, rgba(255,255,255,.8) 100%);
    box-shadow: 0 6px 12px rgba(51, 65, 85, 0.06);
}

.meditation-card-kit .thumb {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
}

.meditation-card-kit .thumb > img { width: 100%; height: 100%; object-fit: cover; display: block; }
.meditation-card-kit .play {
    position: absolute;
    inset: 41% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 20.39px;
    height: 21.93px;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    border-radius: 0;
}
.meditation-card-kit .play img {
    width: 20.39px;
    height: 21.93px;
}

.meditation-card-kit .text { padding: 0 16px; }
.meditation-card-kit .text b { display: block; font-size: 18px; line-height: 24px; color: #334155; font-weight: 600; margin-bottom: 8px; }
.meditation-card-kit .text p { margin: 0; font-size: 14px; line-height: 16px; color: #64748b; }
.meditation-card-kit .card-right {
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}
.meditation-card-kit .fav-btn { margin-right: 0; }

.meditation-card-kit.is-mobile {
    margin-top: 10px;
    max-width: 282px;
    grid-template-columns: 52px 1fr auto;
    min-height: 60px;
}

.meditation-card-kit.is-mobile .thumb {
    width: 52px;
    height: 52px;
}

.meditation-card-kit.is-mobile .play {
    width: 15.29px;
    height: 16.45px;
}
.meditation-card-kit.is-mobile .play img {
    width: 15.29px;
    height: 16.45px;
}

.meditation-card-kit.is-mobile .text {
    padding: 0 8px;
}

.meditation-card-kit.is-mobile .text b {
    font-size: 14px;
    line-height: 18px;
    margin: 0;
}

.meditation-card-kit.is-mobile .card-right-mobile {
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px 0 6px;
}

@media (max-width: 991.98px) {
    .top-components-grid {
        grid-template-columns: 1fr;
    }

    .menu-item-kit,
    .category-item-kit,
    .meditation-card-kit {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 575.98px) {
    .top-components-frame {
        padding: 24px 16px 0;
    }

    .top-components-panel {
        padding: 16px;
    }

    .meditation-card-kit {
        grid-template-columns: 52px 1fr auto;
        min-height: 60px;
    }

    .meditation-card-kit .thumb {
        width: 52px;
        height: 52px;
    }

    .meditation-card-kit .play {
        width: 24px;
        height: 24px;
    }

    .meditation-card-kit .text {
        padding: 0 8px;
    }

    .meditation-card-kit .text b {
        font-size: 14px;
        line-height: 18px;
        margin-bottom: 0;
    }

    .meditation-card-kit .text p {
        display: none;
    }
}

.med-figma-frame {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 28px 20px 0;
}

.med-figma-panel {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.45);
    padding: 22px;
}

.med-figma-grid {
    display: grid;
    gap: 18px;
}

.med-figma-layout {
    border: 1px dashed #c7a8ff;
    border-radius: 8px;
    padding: 14px;
    overflow: hidden;
}

.med-figma-layout h3 {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
}

.med-figma-device {
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    background: radial-gradient(circle at 50% 0, rgba(255, 255, 255, 0.28) 0%, rgba(206, 229, 255, 0.94) 70%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    margin: 0 auto;
    position: relative;
    padding: 14px;
}

.med-figma-layout--desktop .med-figma-device { width: 100%; max-width: 1130px; }
.med-figma-layout--tablet .med-figma-device { width: 768px; max-width: 100%; }
.med-figma-layout--mobile .med-figma-device { width: 378px; max-width: 100%; }

.med-figma-header {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 999px;
    background: radial-gradient(circle at 50% 0, #ffffff 0%, rgba(255, 255, 255, 0.82) 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    backdrop-filter: blur(10px);
}

.med-figma-nav {
    border: none;
    background: none;
    border-radius: 999px;
    color: #334155;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    padding: 8px 16px;
    justify-self: start;
}

.med-figma-logo {
    width: 82px;
    height: 40px;
    display: block;
}

.med-figma-header-right {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.med-figma-star,
.med-figma-user {
    border: none;
    padding: 0;
    cursor: pointer;
}

.med-figma-star {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 3px solid #c4b1f5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 12px;
    line-height: 16px;
    font-weight: 700;
    background: radial-gradient(circle at 25% 20%, #fdb5f6 0%, #bc9cf5 60%, #7b83f5 100%);
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
}

.med-figma-user {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: #f1f5f9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.med-figma-user img {
    width: 24px;
    height: 24px;
}

.med-figma-stars-popover {
    width: 250px;
    position: absolute;
    top: 62px;
    right: 58px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fe 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.12);
    padding: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 5;
}

.med-figma-star:hover ~ .med-figma-stars-popover,
.med-figma-star:focus-visible ~ .med-figma-stars-popover,
.med-figma-stars-popover:hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.med-figma-stars-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 16px;
    color: #334155;
}

.med-figma-stars-left {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.med-figma-stars-right {
    white-space: nowrap;
    color: #475569;
    font-weight: 600;
}

.med-figma-stars-track {
    height: 4px;
    border-radius: 999px;
    background: #dbe4ee;
    overflow: hidden;
}

.med-figma-stars-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ee9bff 0%, #8a8bf5 100%);
}

.med-figma-title {
    text-align: center;
    color: #334155;
    margin: 22px 0 20px;
}

.med-figma-title h4 {
    margin: 0;
    font-size: 36px;
    line-height: 44px;
    font-weight: 600;
}

.med-figma-title p {
    margin: 8px 0 0;
    font-size: 20px;
    line-height: 28px;
    color: #475569;
}

.med-figma-categories {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.med-figma-col {
    display: grid;
    gap: 10px;
}

.med-figma-category {
    min-height: 52px;
    border: 1px solid #ffffff;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 0, #fff 0, rgba(255, 255, 255, 0.6) 100%);
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
    color: #334155;
    padding: 10px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    line-height: 20px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
}

.med-figma-category span {
    display: inline-block;
}

.med-figma-category i {
    font-style: normal;
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f8fafc;
}

/* Hover = Figma active mockup: full green, white text, icon visible, double ring */
.med-figma-category:hover,
.med-figma-category:focus-visible,
.med-figma-category.is-active {
    border-color: #90dbbd;
    background: radial-gradient(circle at 20% 0, #90dbbd 0, #68c09d 100%);
    box-shadow:
        0 0 0 4px #90dbbd,
        0 0 0 5px #69c9a3,
        0 12px 24px rgba(63, 181, 134, 0.22);
    color: #ffffff;
    transform: translateY(-1px);
    outline: none;
}

.med-figma-category:hover i,
.med-figma-category:focus-visible i,
.med-figma-category.is-active i {
    background: rgba(255, 255, 255, 0.16);
}

.med-figma-brain-wrap {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.med-figma-brain {
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 32% 35%, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 45%),
        linear-gradient(90deg, #f6b391 0%, #f5b39a 49.8%, #97e3de 50.2%, #8ed8d4 100%);
    box-shadow: 0 24px 50px rgba(40, 67, 115, 0.18);
}

.med-figma-active-card {
    position: absolute;
    width: 232px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    background: radial-gradient(circle at 50% 0, #ffffff 0%, rgba(255, 255, 255, 0.9) 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    padding: 20px;
    text-align: center;
}

.med-figma-active-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 10px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: #f8fafc;
}

.med-figma-active-card h5 {
    margin: 0;
    color: #334155;
    font-size: 28px;
    line-height: 22px;
    font-weight: 600;
}

.med-figma-active-card p {
    margin: 12px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 18px;
}

.med-figma-active-card a {
    margin-top: 14px;
    min-height: 44px;
    border-radius: 999px;
    padding: 12px 16px;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    line-height: 16px;
    font-weight: 500;
    background: radial-gradient(circle at 20% 0, #90dbbd 0, #68c09d 100%);
    box-shadow: 0 8px 16px rgba(63, 181, 134, 0.2);
}

.med-figma-categories--tablet {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.med-figma-categories--tablet .med-figma-category {
    width: 100%;
    justify-content: flex-start;
}

.med-figma-categories--mobile {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.med-figma-categories--mobile .med-figma-active-card {
    position: relative;
    width: 100%;
    max-width: none;
}

.med-figma-layout--tablet .med-figma-title h4 {
    font-size: 44px;
    line-height: 42px;
}

.med-figma-layout--tablet .med-figma-title p {
    font-size: 18px;
    line-height: 22px;
}

.med-figma-layout--tablet .med-figma-header .med-figma-logo {
    width: 74px;
    height: 36px;
}

.med-figma-layout--tablet .med-figma-star,
.med-figma-layout--tablet .med-figma-user {
    width: 48px;
    height: 48px;
}

.med-figma-layout--mobile .med-figma-device {
    border-radius: 20px;
}

.med-figma-layout--mobile .med-figma-header {
    padding: 6px;
}

.med-figma-layout--mobile .med-figma-logo {
    width: 57px;
    height: 28px;
}

.med-figma-layout--mobile .med-figma-nav {
    font-size: 12px;
    line-height: 16px;
    padding: 8px 14px;
}

.med-figma-layout--mobile .med-figma-star,
.med-figma-layout--mobile .med-figma-user {
    width: 36px;
    height: 36px;
}

.med-figma-layout--mobile .med-figma-user img {
    width: 20px;
    height: 20px;
}

.med-figma-layout--mobile .med-figma-stars-popover {
    top: 46px;
    right: 0;
    width: 220px;
    padding: 10px;
}

.med-figma-layout--mobile .med-figma-title {
    margin-top: 16px;
}

.med-figma-layout--mobile .med-figma-title h4 {
    font-size: 46px;
    line-height: 44px;
}

.med-figma-layout--mobile .med-figma-title p {
    font-size: 18px;
    line-height: 22px;
}

.med-figma-layout--mobile .med-figma-brain-wrap {
    min-height: auto;
    margin-bottom: 12px;
}

.med-figma-layout--mobile .med-figma-brain {
    width: 220px;
    height: 220px;
}

.med-figma-layout--mobile .med-figma-category {
    justify-content: flex-start;
}

@media (max-width: 991.98px) {
    .med-figma-frame {
        padding: 24px 20px 0;
    }

    .med-figma-categories {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 575.98px) {
    .med-figma-frame {
        padding: 24px 16px 0;
    }

    .med-figma-panel {
        padding: 16px;
    }

    .med-figma-layout {
        padding: 10px;
    }
}

.ui-spec__frame {
    max-width: 1240px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
}

.ui-panel {
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.45);
    padding: 22px;
}

.ui-title {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 28px;
    line-height: 28px;
    font-weight: 600;
}

.ui-title-gap {
    margin-top: 30px;
}

.ui-state-head {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 12px;
}

.ui-state-head span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ui-state-head span::before,
.ui-state-head span::after {
    content: "";
    height: 1px;
    flex: 1 1 auto;
    background: #e2e8f0;
}

.ui-state-head-six {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.ui-buttons-box {
    border: 1px dashed #c7a8ff;
    border-radius: 8px;
    padding: 12px;
    display: grid;
    gap: 8px;
}

.btn-row {
    display: grid;
    grid-template-columns: repeat(4, 149px);
    justify-content: space-between;
    gap: 20px;
}

.kit-btn {
    border-radius: 999px;
    border: 1px solid transparent;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #334155;
    font-size: 12px;
    line-height: 16px;
    transition: transform 0.12s ease, box-shadow 0.15s ease;
    justify-self: center;
}

.kit-btn svg {
    width: 16px;
    height: 16px;
}

.kit-btn.size-lg { min-height: 52px; width: 149px; font-size: 14px; line-height: 20px; }
.kit-btn.size-md { min-height: 44px; width: 125px; font-size: 14px; line-height: 20px; }
.kit-btn.size-sm { min-height: 36px; width: 99px; font-size: 12px; line-height: 16px; }

.kit-btn.icon-only {
    width: 36px !important;
    min-height: 36px !important;
    padding: 0;
}

.kit-btn.icon-only.size-md { width: 40px !important; min-height: 40px !important; }
.kit-btn.icon-only.size-lg { min-height: 48px !important; }
.kit-btn.icon-only.size-lg.type-primary { width: 48px !important; }
.kit-btn.icon-only.size-lg.type-secondary,
.kit-btn.icon-only.size-lg.type-tertiary { width: 52px !important; }

.kit-btn.type-primary {
    background: radial-gradient(circle at 20% 0, #90dbbd 0, #68c09d 100%);
    color: #fff;
    box-shadow: 0 8px 16px rgba(63, 181, 134, 0.2);
}

.kit-btn.type-secondary {
    background: radial-gradient(circle at 50% 0, #ffffff 0, rgba(255,255,255,.82) 100%);
    border-color: rgba(255,255,255,.95);
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
}

.kit-btn.type-tertiary {
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
}

.kit-btn.type-primary.state-hover {
    background: radial-gradient(circle at 20% 0, #9adfc2 0, #72c8a5 100%);
}

.kit-btn.type-primary.state-active {
    background: radial-gradient(circle at 20% 0, #87d4b4 0, #5cb792 100%);
    box-shadow: 0 5px 10px rgba(63, 181, 134, 0.18);
}

.kit-btn.type-primary.state-disabled {
    background: radial-gradient(circle at 20% 0, #bbe9d7 0, #9ed8c3 100%);
    color: rgba(255, 255, 255, 0.75);
    box-shadow: none;
}

.kit-btn.type-secondary.state-hover {
    background: radial-gradient(circle at 50% 0, #ffffff 0, rgba(255,255,255,.92) 100%);
}

.kit-btn.type-secondary.state-active {
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: 0 4px 8px rgba(51, 65, 85, 0.06);
}

.kit-btn.type-secondary.state-disabled {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
    box-shadow: none;
}

.kit-btn.type-tertiary.state-hover {
    background: #ffffff;
    border-color: #e2e8f0;
}

.kit-btn.type-tertiary.state-active {
    background: #f1f5f9;
    border-color: #cbd5e1;
    box-shadow: 0 4px 8px rgba(51, 65, 85, 0.06);
}

.kit-btn.type-tertiary.state-disabled {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
    box-shadow: none;
}

.kit-btn.state-active { transform: translateY(1px); }
.kit-btn.state-disabled { pointer-events: none; }
.kit-btn.is-pressed { transform: translateY(1px) scale(0.98); }

.ui-live-buttons {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.ui-live-title {
    margin: 8px 0 2px;
    color: #64748b;
    font-size: 12px;
    line-height: 16px;
}

.ui-live-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.live-btn {
    cursor: pointer;
}

.live-btn.type-primary:hover {
    background: radial-gradient(circle at 20% 0, #9adfc2 0, #72c8a5 100%);
}

.live-btn.type-primary:active {
    background: radial-gradient(circle at 20% 0, #87d4b4 0, #5cb792 100%);
    box-shadow: 0 5px 10px rgba(63, 181, 134, 0.18);
    transform: translateY(1px);
}

.live-btn.type-secondary:hover {
    background: radial-gradient(circle at 50% 0, #ffffff 0, rgba(255,255,255,.92) 100%);
}

.live-btn.type-secondary:active {
    background: #f8fafc;
    border-color: #e2e8f0;
    box-shadow: 0 4px 8px rgba(51, 65, 85, 0.06);
    transform: translateY(1px);
}

.live-btn.type-tertiary:hover {
    background: #ffffff;
    border-color: #e2e8f0;
}

.live-btn.type-tertiary:active {
    background: #f1f5f9;
    border-color: #cbd5e1;
    box-shadow: 0 4px 8px rgba(51, 65, 85, 0.06);
    transform: translateY(1px);
}

.ui-input-box {
    border: 1px dashed #c7a8ff;
    border-radius: 8px;
    padding: 10px;
    display: grid;
    grid-template-columns: repeat(6, 200px);
    justify-content: space-between;
    gap: 20px;
}

.field-card { min-width: 0; }
.field-main {
    min-height: 56px;
    border-radius: 12px;
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    line-height: 16px;
}
.field-main strong { color: #334155; font-weight: 400; font-size: 14px; line-height: 20px; }
.field-icon { width: 20px; text-align: center; opacity: .7; }
.field-caption { padding: 4px 16px 0; color: #64748b; font-size: 12px; line-height: 16px; }
.field-caption.success { color: #54ac89; }
.field-caption.error { color: #e05a5a; }
.field-card.state-disabled { opacity: 0.4; }
.field-card.state-success .field-main { border: 1px solid #54ac89; }
.field-card.state-error .field-main { border: 1px solid #e05a5a; }

.ui-control-heads {
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, 120px);
    gap: 40px;
}

.ui-control-heads h3 {
    margin: 0;
    font-size: 18px;
    line-height: 28px;
    color: #0f172a;
}

.ui-control-box {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, 120px);
    gap: 40px;
}

.control-card {
    border: 1px dashed #c7a8ff;
    border-radius: 8px;
    padding: 20px;
    display: grid;
    gap: 20px;
    align-content: start;
    width: 120px;
    min-height: 140px;
}

.control-card label {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-size: 14px;
    line-height: 20px;
}

.control-card .is-disabled,
.switch-line.is-disabled {
    opacity: .35;
}

.choice-line {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
    position: relative;
}

.choice-line input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.choice-box {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.choice-check {
    border-radius: 6px;
    background: #e2e8f0;
}

.choice-check::after {
    content: "";
    width: 12px;
    height: 12px;
    opacity: 0;
    background-image: url("../assets/figma-ui/checkbox-check.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.choice-line input[type="checkbox"]:checked + .choice-check {
    background: radial-gradient(circle at 20% 0, #90dbbd 0, #68c09d 100%);
    border: 1px solid #90dbbd;
}

.choice-line input[type="checkbox"]:checked + .choice-check::after {
    opacity: 1;
}

.choice-radio {
    border-radius: 50%;
    background: #e2e8f0;
}

.choice-line input[type="radio"]:checked + .choice-radio {
    background: #fff;
    border: 4px solid #69c9a3;
}

.switch-line input { display: none; }
.switch-ui {
    width: 40px;
    height: 20px;
    border-radius: 40px;
    background: #e2e8f0;
    position: relative;
}
.switch-ui::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    left: 2px;
    top: 2px;
}
.switch-line input:checked + .switch-ui {
    background: radial-gradient(circle at 20% 0, #90dbbd 0, #68c09d 100%);
}
.switch-line input:checked + .switch-ui::after {
    left: 22px;
}

.switch-line.is-disabled .switch-ui {
    background: #e2e8f0;
}

.switch-line.is-disabled .switch-ui::after {
    background: #f8fafc;
}

.choice-line.is-disabled span,
.switch-line.is-disabled span:last-child {
    color: #cbd5e1;
}

@media (max-width: 991.98px) {
    .ui-state-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ui-state-head-six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .btn-row { grid-template-columns: repeat(2, 149px); justify-content: start; }
    .ui-input-box { grid-template-columns: repeat(3, 200px); justify-content: start; }
}

@media (max-width: 575.98px) {
    .ui-spec__frame { padding: 24px 16px; }
    .ui-title { font-size: 22px; line-height: 24px; }
    .ui-state-head,
    .ui-state-head-six,
    .ui-control-heads,
    .ui-control-box { grid-template-columns: 1fr; }

    .btn-row {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .ui-input-box {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .control-card {
        width: 100%;
        min-height: auto;
    }

    .ui-live-buttons {
        display: grid;
    }

    .ui-live-row {
        flex-direction: column;
        align-items: stretch;
    }

    .ui-live-row .kit-btn:not(.icon-only) {
        width: 100% !important;
    }
}

.tarifi-page {
    width: 100%;
    padding: 40px 20px 40px;
}

.tarifi-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tarifi-panel {
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 32px;
    background: linear-gradient(148deg, rgba(255, 255, 255, 0.8) 10.244%, rgba(255, 255, 255, 0.5) 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding: 32px;
}

.tarifi-panel-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    padding-bottom: 20px;
    width: 100%;
}

.tarifi-title {
    width: 100%;
    text-align: center;
    color: #334155;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.tarifi-title h1,
.tarifi-title h2 {
    margin: 0;
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
}

.tarifi-title p {
    margin: 0;
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
}

.tarifi-billing {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 0, #fff 0, rgba(255, 255, 255, 0.8) 100%);
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
}

.tarifi-billing-item {
    border: none;
    background: transparent;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    color: #64748b;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s ease, background 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

.tarifi-billing-item.is-active {
    color: #fff;
    background: radial-gradient(circle at 20% 0, #90dbbd 0, #68c09d 100%);
    box-shadow: 0 4px 8px rgba(63, 181, 134, 0.2);
}

.tarifi-cards {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 346px));
    justify-content: center;
    align-items: stretch;
    gap: 24px;
}

.tarifi-card {
    position: relative;
    border: 1px solid #fff;
    border-radius: 20px;
    padding: 24px;
    background: linear-gradient(125deg, rgba(255, 255, 255, 0.8) 10.244%, rgba(255, 255, 255, 0.5) 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tarifi-card--pro {
    border: 3px solid #69c9a3;
    padding: 22px;
}

.tarifi-card-top {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tarifi-card-head {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tarifi-card-head-main {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tarifi-card-head h2 {
    margin: 0;
    color: #334155;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.tarifi-card-head p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 20px;
}

.tarifi-plan-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    min-height: 24px;
    padding: 4px 12px;
    color: #334155;
    font-size: 12px;
    line-height: 16px;
    font-weight: 600;
}

.tarifi-stars-block {
    border: 1px solid #fff;
    border-radius: 16px;
    background: linear-gradient(131deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tarifi-stars-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tarifi-stars-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.tarifi-stars-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

.tarifi-stars-amount strong {
    color: #334155;
    font-size: 16px;
    line-height: 20px;
    font-weight: 600;
}

.tarifi-stars-amount span {
    color: #94a3b8;
    font-size: 12px;
    line-height: 14px;
    font-weight: 500;
}

.tarifi-stars-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 26px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tarifi-stars-list li {
    color: #64748b;
    font-size: 12px;
    line-height: 14px;
    font-weight: 400;
}

.tarifi-stars-list li b {
    font-weight: 600;
}

.tarifi-stars-note {
    min-height: 40px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 12px;
    line-height: 14px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tarifi-slider {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-top: 6px;
}

.tarifi-slider-track {
    position: relative;
    height: 4px;
    border-radius: 999px;
    background: #e2e8f0;
    margin: 0 7px;
}

.tarifi-slider-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 4px;
    border-radius: 999px;
    background: #69c9a3;
    max-width: 100%;
}

.tarifi-slider-thumb {
    position: absolute;
    top: 100%;
    left: 50%;
    width: 32px;
    height: 32px;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.tarifi-slider-marks {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    line-height: 14px;
    font-weight: 500;
    color: #94a3b8;
}

.tarifi-slider-marks .is-current {
    color: #334155;
}

.tarifi-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-top: auto;
}

.tarifi-price strong {
    margin: 0;
    color: #334155;
    font-size: 32px;
    line-height: 1;
    font-weight: 600;
}

.tarifi-price span {
    color: #94a3b8;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
}

.tarifi-price--pro {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.tarifi-price-old {
    color: #94a3b8;
    font-size: 20px;
    line-height: 1;
    font-weight: 400;
    text-decoration: line-through;
}

.tarifi-price-new {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}

.tarifi-divider {
    height: 1px;
    background: #e2e8f0;
    width: 100%;
}

.tarifi-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tarifi-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
    line-height: 20px;
}

.tarifi-list li img {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex: 0 0 auto;
}

.tarifi-btn {
    width: 100%;
    min-height: 52px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.tarifi-btn-secondary {
    background: transparent;
    color: #64748b;
}

.tarifi-btn-secondary:hover {
    background: rgba(248, 250, 252, 0.85);
}

.tarifi-btn-primary {
    border-color: transparent;
    background: radial-gradient(circle at 20% 0, #90dbbd 0, #68c09d 100%);
    color: #fff;
    box-shadow: 0 8px 16px rgba(63, 181, 134, 0.2);
}

.tarifi-btn-primary:hover {
    background: radial-gradient(circle at 20% 0, #9adfc2 0, #72c8a5 100%);
}

.tarifi-btn-primary:active {
    background: radial-gradient(circle at 20% 0, #87d4b4 0, #5cb792 100%);
    box-shadow: 0 5px 10px rgba(63, 181, 134, 0.18);
    transform: translateY(1px);
}

.tarifi-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: #fff;
    background: radial-gradient(circle at 20% 0, #90dbbd 0, #68c09d 100%);
    box-shadow: 0 4px 8px rgba(63, 181, 134, 0.2);
    white-space: nowrap;
}

.tarifi-note {
    margin: 0;
    color: #64748b;
    font-size: 16px;
    line-height: 20px;
    font-weight: 400;
    text-align: center;
}

.tarifi-note b {
    font-weight: 500;
}

.tarifi-panel--stars {
    gap: 20px;
}

.tarifi-panel--stars .tarifi-title {
    padding-bottom: 20px;
}

.tarifi-stars-cards {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 236px));
    justify-content: center;
    align-items: stretch;
    gap: 24px;
}

.tarifi-star-card {
    position: relative;
    border: 1px solid #fff;
    border-radius: 20px;
    padding: 24px;
    background: linear-gradient(138deg, rgba(255, 255, 255, 0.8) 10.244%, rgba(255, 255, 255, 0.5) 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tarifi-star-card--featured {
    border: 3px solid #69c9a3;
    padding: 22px;
}

.tarifi-star-top {
    display: flex;
    flex-direction: column;
    gap: 24px;
    align-items: flex-start;
}

.tarifi-star-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.tarifi-star-count img {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
}

.tarifi-star-count strong {
    color: #334155;
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
}

.tarifi-star-price {
    width: 100%;
    color: #334155;
    font-size: 32px;
    line-height: 1;
    font-weight: 600;
    border-top: 1px solid #e2e8f0;
    padding-top: 24px;
}

@media (max-width: 991.98px) {
    .tarifi-page {
        padding: 40px 16px 40px;
    }

    .tarifi-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .tarifi-stars-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
    }

    .tarifi-card,
    .tarifi-star-card {
        padding: 20px;
    }

    .tarifi-card--pro,
    .tarifi-star-card--featured {
        padding: 18px;
    }
}

@media (max-width: 575.98px) {
    .tarifi-page {
        padding: 24px 12px 40px;
    }

    .tarifi-wrap {
        gap: 24px;
    }

    .tarifi-panel {
        padding: 24px 16px;
        gap: 20px;
        border-radius: 24px;
    }

    .tarifi-panel-head {
        gap: 20px;
        padding-bottom: 0;
    }

    .tarifi-cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .tarifi-stars-cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .tarifi-panel--stars .tarifi-title {
        padding-bottom: 0;
    }

    .tarifi-star-top {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .tarifi-star-price {
        width: auto;
        border-top: none;
        padding-top: 0;
        font-size: 28px;
    }
}

.lm-page {
    width: 100%;
    padding: 40px 20px 44px;
}

.lm-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.lm-grid {
    display: grid;
    grid-template-columns: 282px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.lm-sidebar,
.lm-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lm-back-btn {
    width: 100%;
    min-height: 44px;
    border: 1px solid #fff;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 0, #fff 0, rgba(255, 255, 255, 0.8) 100%);
    box-shadow: 0 4px 8px rgba(51, 65, 85, 0.06);
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    padding: 12px 16px;
    color: #64748b;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    box-sizing: border-box;
}

.lm-back-btn:hover {
    color: #475569;
}

.lm-back-btn img {
    width: 16px;
    height: 16px;
}

.lm-info-card,
.lm-chat-card {
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 24px;
    background: radial-gradient(circle at 50% 0, #fff 0, rgba(255, 255, 255, 0.8) 100%);
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
}

.lm-info-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 32px;
    width: 282px;
    min-height: 300px;
    padding: 52px 32px 32px;
}

.lm-info-icon {
    width: 80px;
    height: 80px;
    flex: 0 0 auto;
    object-fit: cover;
    border-radius: 50%;
}

.lm-info-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    min-width: 0;
}

.lm-info-card h2 {
    margin: 0;
    color: #334155;
    font-size: 20px;
    line-height: 28px;
    font-weight: 600;
}

.lm-info-card p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}

.lm-chat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 24px 32px 16px;
    text-align: center;
}

.lm-chat-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.lm-chat-card p {
    margin: 0;
    color: #334155;
    font-size: 14px;
    line-height: 24px;
    font-weight: 500;
}

.lm-chat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    border: none;
    border-radius: 999px;
    background: radial-gradient(circle at 20% 0, #90dbbd 0, #68c09d 100%);
    box-shadow: 0 8px 16px rgba(63, 181, 134, 0.2);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

a.lm-chat-btn:hover {
    color: #fff;
    opacity: 0.95;
}

.lm-controls {
    display: flex;
    align-items: flex-start;
    gap: 56px;
}

.lm-tabs {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 0, #fff 0, rgba(255, 255, 255, 0.8) 100%);
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
}

.lm-tab {
    background: transparent;
    border: none;
    min-height: 40px;
    padding: 8px 16px;
    color: #64748b;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.22s ease, box-shadow 0.22s ease, color 0.22s ease, transform 0.14s ease;
}

.lm-tab.is-active {
    background: radial-gradient(circle at 20% 0, #90dbbd 0, #68c09d 100%);
    box-shadow: 0 4px 8px rgba(63, 181, 134, 0.2);
    color: #fff;
}

.lm-tab-label-short { display: none; }

.lm-search {
    flex: 1 1 auto;
    width: auto;
    min-height: 44px;
    border: none;
    border-radius: 999px;
    background: radial-gradient(circle at 50% 0, #fff 0, rgba(255, 255, 255, 0.8) 100%);
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    transition: box-shadow 0.22s ease, background 0.22s ease;
}

.lm-search img {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.lm-search input {
    border: 0;
    background: transparent;
    outline: none;
    width: 100%;
    color: #64748b;
    font-size: 14px;
    line-height: 20px;
}

.lm-list-loader {
    margin: 0;
    padding: 12px 0 4px;
    text-align: center;
    color: #64748b;
    font-size: 14px;
    line-height: 20px;
}

.lm-list-sentinel {
    width: 100%;
    height: 1px;
    pointer-events: none;
}

.lm-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 1;
    transition: opacity 0.24s ease;
}

.lm-list.is-switching {
    opacity: 0.08;
}

.lm-empty {
    margin: 0;
    padding: 24px 16px;
    color: #64748b;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
}

.lm-single-meditation {
    max-width: 720px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.lm-single-meditation__hero {
    margin-bottom: 24px;
    border-radius: 20px;
    overflow: hidden;
}

.lm-single-meditation__hero img {
    display: block;
    width: 100%;
    height: auto;
}

.lm-single-meditation__title {
    margin: 0 0 16px;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
    color: #0f172a;
}

.lm-single-meditation__meta {
    margin: 0 0 12px;
    font-size: 15px;
    line-height: 22px;
    color: #475569;
}

.lm-single-meditation__block {
    margin-top: 28px;
}

.lm-single-meditation__block h2 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
}

.lm-single-meditation__text,
.lm-single-meditation__content {
    font-size: 15px;
    line-height: 24px;
    color: #334155;
}

.lm-single-meditation__video {
    display: block;
    width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    background: #000;
}

.lm-single-meditation__back {
    margin-top: 40px;
}

.lm-item {
    max-width: 100%;
    max-width: 894px;
    width: 100%;
    min-height: 88px;
    box-shadow: 0 6px 12px rgba(51, 65, 85, 0.06);
    transition: box-shadow 0.22s ease;
}

@keyframes lm-item-reveal {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.lm-item.lm-item--reveal {
    animation: lm-item-reveal 0.78s cubic-bezier(0.16, 1, 0.3, 1) both;
    animation-delay: var(--lm-reveal-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
    .lm-item.lm-item--reveal {
        animation: none;
    }
}

.lm-item.is-hidden {
    display: none;
}

.lm-chat-card-mobile {
    display: none;
}

.lm-chat-input {
    width: 100%;
    min-height: 52px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: radial-gradient(circle at 50% 0, #fff 0, rgba(255, 255, 255, 0.8) 100%);
    padding: 6px 6px 6px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lm-chat-input input {
    border: 0;
    outline: none;
    background: transparent;
    width: 100%;
    color: #64748b;
    font-size: 14px;
}

.lm-chat-input button {
    border: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle at 20% 0, #90dbbd 0, #68c09d 100%);
    color: #fff;
}

.lm-chat-btn-mobile {
    display: none;
}

@media (max-width: 991.98px) {
    .lm-page {
        padding: 40px 16px 44px;
    }

    .lm-wrap {
        max-width: 100%;
    }

    .lm-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .lm-sidebar {
        order: 1;
    }

    .lm-content {
        order: 2;
        width: 100%;
        gap: 16px;
    }

    .lm-chat-card-desktop {
        display: none;
    }

    .lm-info-card {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        padding: 24px;
        gap: 20px;
        width: 100%;
        min-height: 112px;
    }

    .lm-info-icon {
        width: 64px;
        height: 64px;
        flex: 0 0 auto;
    }

    .lm-info-text {
        flex: 1 1 auto;
        gap: 8px;
        justify-content: center;
    }

    .lm-info-card h2 {
        font-size: 20px;
        line-height: 28px;
    }

    .lm-info-card p {
        font-size: 14px;
        line-height: 20px;
    }

    .lm-controls {
        flex-wrap: wrap;
        gap: 16px;
        width: 100%;
    }

    .lm-search {
        width: 100%;
        flex: 1 1 100%;
        order: 2;
        min-height: 44px;
    }

    .lm-tabs {
        order: 1;
        flex-wrap: nowrap;
        overflow: visible;
        padding: 4px;
        width: auto;
        max-width: none;
    }

    .lm-tab-label-full { display: none; }
    .lm-tab-label-short { display: inline; }

    .lm-back-btn {
        width: auto;
        min-width: 152px;
        min-height: 44px;
        align-self: flex-start;
    }

    .lm-chat-card-mobile {
        display: flex;
        margin-top: 16px;
        width: 100%;
        border-radius: 32px;
        padding: 32px;
        gap: 24px;
        min-height: 320px;
    }

    .lm-chat-card-mobile p {
        font-size: 20px;
        line-height: 28px;
        max-width: 372px;
    }

    .lm-chat-input-tablet {
        width: 600px;
        max-width: 100%;
        min-height: 64px;
        border: 1px solid rgba(255, 255, 255, 0.6);
        box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
        border-radius: 999px;
        padding: 8px;
    }

    .lm-chat-input-tablet button {
        width: 48px;
        height: 48px;
    }

    .lm-list {
        gap: 16px;
    }
}

@media (max-width: 575.98px) {
    .lm-page {
        padding: 16px 16px 32px;
    }

    .lm-wrap {
        max-width: 410px;
    }

    .lm-info-card {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        padding: 20px;
        gap: 20px;
        width: 100%;
        min-height: 132px;
    }

    .lm-info-icon {
        width: 64px;
        height: 64px;
        flex: 0 0 auto;
    }

    .lm-info-text {
        flex: 1 1 auto;
        gap: 8px;
        justify-content: center;
    }

    .lm-info-card h2 {
        font-size: 18px;
        line-height: 24px;
    }

    .lm-info-card p {
        font-size: 14px;
        line-height: 20px;
    }

    .lm-tabs {
        width: 100%;
    }

    .lm-back-btn {
        min-width: 152px;
    }

    .lm-tab {
        min-height: 36px;
        padding: 8px 12px;
        font-size: 12px;
        line-height: 20px;
        flex: 0 0 auto;
    }

    .lm-tab:first-child {
        flex: 1 1 0;
        min-width: 0;
    }

    .lm-item {
        min-height: 60px;
    }

    .lm-item.meditation-card-kit .thumb {
        width: 52px;
        height: 52px;
    }

    .lm-item.meditation-card-kit .play {
        width: 15.29px;
        height: 16.45px;
    }

    .lm-item.meditation-card-kit .play img {
        width: 15.29px;
        height: 16.45px;
    }

    .lm-item.meditation-card-kit .text b {
        font-size: 14px;
        line-height: 18px;
    }

    .lm-item.meditation-card-kit .text p {
        display: none;
    }

    .lm-chat-card-mobile {
        margin-top: 12px;
        padding: 32px 20px 20px;
        gap: 24px;
        min-height: 320px;
        border-radius: 32px;
    }

    .lm-chat-avatar {
        width: 80px;
        height: 80px;
    }

    .lm-chat-card-mobile p { font-size: 20px; line-height: 32px; }

    .lm-chat-input-tablet {
        display: none;
    }

    .lm-chat-btn-mobile {
        display: inline-flex;
        width: 100%;
        min-height: 52px;
        align-items: center;
        justify-content: center;
    }

    .lm-chat-input input {
        font-size: 12px;
    }
}

/* ============================================================
   Meditation Modal
   Figma: 140:10668 (desktop) + tablet/mobile overlays
   ============================================================ */

.lm-item .lm-item-price {
    margin: 6px 0 0;
    font-size: 13px;
    line-height: 18px;
    color: #475569;
    font-weight: 500;
}

.lm-item.meditation-card-kit {
    cursor: pointer;
}

body.med-modal-open {
    overflow: hidden;
}

.med-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.med-modal[aria-hidden="false"] {
    display: flex;
    animation: medModalFadeIn 0.22s ease;
}

.med-modal[aria-hidden="false"] .med-modal__dialog {
    animation: medModalPopIn 0.28s cubic-bezier(0.22, 0.9, 0.32, 1.2);
}

@keyframes medModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes medModalPopIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.med-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(51, 65, 85, 0.4);
    backdrop-filter: blur(2px);
}

.med-modal__dialog {
    position: relative;
    display: flex;
    width: 960px;
    max-width: 100%;
    height: 600px;
    max-height: calc(100vh - 32px);
    padding: 8px;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 32px;
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    overflow: hidden;
}

.med-modal__image {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    border-radius: 24px;
    background: #fff;
}

.med-modal__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.med-modal__content {
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 32px;
}

.med-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 36px;
    height: 36px;
    padding: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    border-radius: 999px;
    color: #64748b;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.med-modal__close:hover {
    background: rgba(51, 65, 85, 0.08);
    color: #334155;
}

.med-modal__top {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.med-modal__title-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.med-modal__title {
    margin: 0;
    color: #334155;
    font-size: 24px;
    line-height: 32px;
    font-weight: 600;
    padding-right: 36px;
}

.med-modal__desc {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    line-height: 20px;
}

.med-modal__time {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #64748b;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
}

.med-modal__time svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.med-modal__price {
    margin: 8px 0 0;
    color: #64748b;
    font-size: 14px;
    line-height: 20px;
}

.med-modal__price-label {
    font-weight: 500;
    margin-right: 6px;
}

.med-modal__blocks {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.med-modal__block {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px;
    border: 1px solid #fff;
    border-radius: 20px;
    background: linear-gradient(147deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
}

.med-modal__block-title {
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
}

.med-modal__block--orange .med-modal__block-title { color: #CE8F5D; }
.med-modal__block--green  .med-modal__block-title { color: #69C9A3; }

.med-modal__block p,
.med-modal__block .med-modal__rich {
    margin: 0;
    color: #334155;
    opacity: 0.8;
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
}

.med-modal__rich ul,
.med-modal__rich ol {
    margin: 0;
    padding-left: 1.25em;
}

.med-modal__rich li + li {
    margin-top: 0.35em;
}

.med-modal__rich p + p,
.med-modal__rich ul,
.med-modal__rich ol {
    margin-top: 0.5em;
}

.med-modal__rich > *:first-child {
    margin-top: 0;
}

.med-modal__bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.med-modal__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    padding: 16px 24px;
    border: 0;
    border-radius: 999px;
    background: radial-gradient(circle at 0% 0%, #90dbbd 0%, #68c09d 100%);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    box-shadow: 0 8px 16px rgba(63, 181, 134, 0.2);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.22s ease;
}

.med-modal__cta:hover {
    box-shadow: 0 10px 20px rgba(63, 181, 134, 0.28);
}

.med-modal__cta:active {
    transform: translateY(1px);
}

.med-modal__cta-star {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
}

.med-modal__cta-star svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
}

/* Tablet modal — Figma 140:10692 (728 x 560, horizontal, 50/50 split) */
@media (max-width: 991.98px) {
    .med-modal {
        padding: 16px;
    }

    .med-modal__dialog {
        width: 100%;
        max-width: 728px;
        height: 560px;
        max-height: calc(100vh - 32px);
        flex-direction: row;
        padding: 8px;
    }

    .med-modal__image {
        flex: 1 1 0;
        height: 100%;
        width: auto;
    }

    .med-modal__content {
        flex: 1 1 0;
        padding: 24px;
        gap: 16px;
    }

    .med-modal__top {
        gap: 16px;
    }

    .med-modal__title {
        font-size: 20px;
        line-height: 28px;
        padding-right: 40px;
    }

    .med-modal__block {
        padding: 20px;
    }
}

/* Mobile modal — Figma 140:10716 (346 x 712, vertical stack, close over image) */
@media (max-width: 575.98px) {
    .med-modal {
        padding: 16px;
    }

    .med-modal__dialog {
        width: 100%;
        max-width: 346px;
        height: auto;
        max-height: calc(100vh - 32px);
        flex-direction: column;
        padding: 8px;
        border-radius: 32px;
    }

    .med-modal__image {
        position: relative;
        flex: 0 0 auto;
        width: 100%;
        height: 220px;
        border-radius: 24px;
    }

    .med-modal__content {
        flex: 1 1 auto;
        padding: 20px;
        gap: 16px;
    }

    .med-modal__title {
        font-size: 20px;
        line-height: 28px;
        padding-right: 0;
    }

    .med-modal__block {
        padding: 16px;
        gap: 8px;
        border-radius: 20px;
    }

    .med-modal__close {
        position: absolute;
        top: 14px;
        right: 14px;
        width: 36px;
        height: 36px;
        padding: 10px;
        background: rgba(255, 255, 255, 0.9);
        color: #334155;
        box-shadow: 0 4px 12px rgba(51, 65, 85, 0.14);
        backdrop-filter: blur(6px);
        z-index: 2;
    }

    .med-modal__close:hover {
        background: #fff;
        color: #334155;
    }
}

/* ==========================================================================
   Meditation video player — Figma 140:10763 (theater), 140:10798 (fullscreen), 140:10770 (PiP)
   Native video + custom chrome (no Video.js).
   ========================================================================== */

.med-player-dim {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: none;
    background: rgba(51, 65, 85, 0.45);
    backdrop-filter: blur(4px);
}

.med-player-dim.is-on {
    display: block;
}

body.med-player-open {
    overflow: hidden;
}

.med-player {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: none;
    align-items: stretch;
    justify-content: stretch;
    font-family: "Inter", system-ui, sans-serif;
    color: #fff;
    -webkit-font-smoothing: antialiased;
}

.med-player[aria-hidden="false"] {
    display: flex;
}

/* Figma 140:10738 — окно поверх затемнённой страницы */
.med-player--web.med-player--theater {
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
}

.med-player__shell {
    position: relative;
    overflow: hidden;
    background: #fff;
}

/* Figma 140:10763 — карточка 16:9, скругление 32px */
.med-player--web.med-player--theater .med-player__shell:not(:fullscreen) {
    width: min(1200px, calc(100vw - 48px));
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: min(calc(100dvh - 48px), calc((100vw - 48px) * 9 / 16));
    flex: 0 0 auto;
    border-radius: 32px;
    border: 1px solid #fff;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.05) inset,
        0 28px 90px rgba(15, 23, 42, 0.5);
}

/* Figma 140:10798 — полный экран */
.med-player--web .med-player__shell:fullscreen {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    border-radius: 0 !important;
    border: 0;
    box-shadow: none;
    flex: 1 1 auto;
}

/* Figma 140:10771 — PiP, соотношение 726×440 */
.med-player--mini .med-player__shell {
    position: absolute;
    left: 50%;
    top: calc(50% - 175px);
    bottom: auto;
    right: auto;
    transform: translateX(-50%);
    width: min(346px, calc(100vw - 32px));
    aspect-ratio: 726 / 440;
    height: auto;
    max-height: 52vh;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.06) inset,
        0 20px 56px rgba(15, 23, 42, 0.42),
        0 8px 28px rgba(0, 0, 0, 0.22);
}

.med-player--mini.med-player--mini-collapsed .med-player__shell {
    left: max(16px, env(safe-area-inset-left));
    top: auto;
    bottom: max(18px, env(safe-area-inset-bottom));
    transform: none;
    width: 160px;
    max-height: none;
    border-radius: 12px;
}

.med-player__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    background: #08090d;
}

.med-player__glass {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid #fff;
    border-radius: 32px;
    color: #fff;
    cursor: pointer;
    background: transparent;
    box-shadow: inset -0.73px 0.73px 0.73px rgba(255, 255, 255, 0.35);
}

.med-player__glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    backdrop-filter: blur(10px);
    background: rgba(0, 0, 0, 0.25);
    z-index: 0;
    pointer-events: none;
}

.med-player__glass > svg,
.med-player__glass > span,
.med-player__glass > img {
    position: relative;
    z-index: 1;
}

.med-player__glass--close {
    position: absolute;
    top: 24px;
    right: 24px;
    z-index: 5;
    width: 40px;
    height: 40px;
}

.med-player__glass--close .med-player__close-ico {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.med-player__close-ico--mini {
    display: none;
}

.med-player--mini .med-player__close-ico--web {
    display: none;
}

.med-player--mini .med-player__close-ico--mini {
    display: block;
}

.med-player--mini .med-player__glass--close {
    top: 24px;
    right: 24px;
    width: 40px;
    height: 40px;
}

.med-player--mini.med-player--mini-collapsed .med-player__glass--close {
    top: 8.571px;
    right: 8.571px;
    width: 22.857px;
    height: 22.857px;
}

.med-player__ico {
    display: block;
    object-fit: contain;
    flex-shrink: 0;
    pointer-events: none;
}

.med-player__ico--20 {
    width: 20px;
    height: 20px;
}

.med-player__ico--24 {
    width: 24px;
    height: 24px;
}

.med-player__ico--32 {
    width: 32px;
    height: 32px;
}

.med-player__glass--sm {
    width: 40px;
    height: 40px;
    border-radius: 32px;
}

.med-player__glass--play {
    width: 60px;
    height: 60px;
    border-radius: 999px;
}

.med-player__dock {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 32px max(16px, env(safe-area-inset-bottom));
    background: linear-gradient(
        180deg,
        rgba(8, 9, 13, 0) 0%,
        rgba(8, 9, 13, 0.9) 80.37%
    );
    backdrop-filter: blur(1px);
}

.med-player--mini .med-player__dock--mini {
    gap: 12px;
    padding: 48px 24px max(24px, env(safe-area-inset-bottom));
    background: linear-gradient(
        180deg,
        rgba(13, 15, 20, 0) 0%,
        rgba(13, 15, 20, 0.9) 80.37%
    );
    backdrop-filter: blur(1px);
}

.med-player--mini .med-player__dock--mini,
.med-player--mini .med-player__center-mini,
.med-player--mini .med-player__glass--close {
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.med-player--mini.med-player--mini-controls-hidden .med-player__dock--mini,
.med-player--mini.med-player--mini-controls-hidden .med-player__center-mini,
.med-player--mini.med-player--mini-controls-hidden .med-player__glass--close {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Desktop + tablet — auto-hide UI after playback start */
.med-player--web .med-player__dock--web,
.med-player--web .med-player__glass--close {
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.med-player--web-controls-hidden .med-player__dock--web,
.med-player--web-controls-hidden .med-player__glass--close {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.med-player--mini.med-player--mini-collapsed .med-player__dock--mini {
    display: none;
}

.med-player--web .med-player__dock--mini,
.med-player--web .med-player__center-mini {
    display: none;
}

.med-player--mini .med-player__dock--web {
    display: none;
}

.med-player__info-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
}

.med-player__titles {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.med-player__title {
    margin: 0;
    font-size: 24px;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 4px 24px rgba(0, 0, 0, 0.35);
}

.med-player__subtitle {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    color: #fff;
    opacity: 0.6;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.med-player__time {
    margin: 0;
    flex: 0 0 auto;
    font-size: 16px;
    font-weight: 400;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.med-player__info-row--mini .med-player__titles {
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}

.med-player__info-row--mini .med-player__time--mini {
    flex-shrink: 0;
}

.med-player__title--mini {
    font-size: 16px;
}

.med-player__subtitle--mini {
    font-size: 12px;
    line-height: 18px;
    color: #bbb;
    opacity: 1;
}

.med-player__time--mini {
    font-size: 14px;
}

.med-player__progress-area {
    position: relative;
    width: 100%;
    padding-top: 4px;
}

.med-player__progress {
    position: relative;
    width: 100%;
    height: 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
    border-radius: 20px;
}

.med-player__progress::before {
    content: "";
    position: absolute;
    left: 0;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    height: 2px;
    border-radius: 20px;
    background: rgba(217, 217, 217, 0.4);
    pointer-events: none;
}

.med-player__progress-fill {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 2px;
    width: 0;
    max-width: 100%;
    background: #fff;
    border-radius: 20px;
    pointer-events: none;
}

.med-player__progress-fill::after {
    content: "";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translate(50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    box-shadow:
        0 0 0 2px rgba(8, 9, 13, 0.25),
        0 2px 6px rgba(0, 0, 0, 0.35);
}

.med-player__progress--mini {
    height: 18px;
}

.med-player__progress--mini::before {
    right: 0;
    height: 2px;
}

.med-player__progress--mini .med-player__progress-fill {
    height: 2px;
}

.med-player__progress--mini .med-player__progress-fill::after {
    width: 10px;
    height: 10px;
}

.med-player__scrub-hint {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    z-index: 2;
}

.med-player__scrub-hint.is-visible {
    opacity: 1;
    visibility: visible;
}

.med-player__scrub-preview {
    width: 160px;
    height: 112px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    background: #000;
}

.med-player__scrub-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.med-player__scrub-point {
    width: 12px;
    height: 12px;
    display: block;
    margin-top: 2px;
    flex-shrink: 0;
}

.med-player__controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.med-player__controls-left,
.med-player__controls-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.med-player__volume {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px 4px 4px;
    margin: -4px 0 -4px -4px;
    border-radius: 999px;
    transition: background 0.2s ease;
}

.med-player__volume:hover,
.med-player__volume:focus-within {
    background: rgba(255, 255, 255, 0.08);
}

.med-player__volume-label {
    margin: 0;
    display: flex;
    align-items: center;
    min-width: 0;
}

.med-player__volume-range {
    -webkit-appearance: none;
    appearance: none;
    width: 96px;
    max-width: 96px;
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.22);
    outline: none;
    cursor: pointer;
    transition: max-width 0.22s ease, opacity 0.2s ease, margin 0.2s ease;
}

/* Figma: только иконка громкости в ряду; ползунок при наведении / таче */
@media (hover: hover) and (pointer: fine) {
    .med-player__volume:not(:hover):not(:focus-within):not(.is-expanded) .med-player__volume-range {
        max-width: 0;
        width: 0;
        opacity: 0;
        margin: 0;
        overflow: hidden;
    }
}

.med-player__volume.is-expanded .med-player__volume-range {
    max-width: 96px;
    width: 96px;
    opacity: 1;
}

.med-player__volume-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(8, 9, 13, 0.35), 0 2px 8px rgba(0, 0, 0, 0.35);
    cursor: grab;
}

.med-player__volume-range::-webkit-slider-thumb:active {
    cursor: grabbing;
}

.med-player__volume-range::-moz-range-track {
    height: 4px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.22);
}

.med-player__volume-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 0;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(8, 9, 13, 0.35), 0 2px 8px rgba(0, 0, 0, 0.35);
    cursor: grab;
}

@media (hover: none) {
    .med-player__volume .med-player__volume-range {
        max-width: 96px !important;
        width: 96px !important;
        opacity: 1 !important;
    }
}

.med-player__btn {
    width: 48px;
    height: 48px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background 0.18s ease, opacity 0.15s ease, transform 0.12s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.med-player__btn--vol {
    filter: none;
}

.med-player__btn:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.med-player__btn:active {
    transform: scale(0.96);
}

.med-player__btn.is-active {
    color: #90dbbd;
}

.med-player__btn.is-active .med-player__fav-ico {
    filter: invert(85%) sepia(22%) saturate(650%) hue-rotate(99deg) brightness(96%) contrast(88%);
}

.med-player__center-mini {
    position: absolute;
    left: 50%;
    top: calc(50% - 7px);
    transform: translate(-50%, -50%);
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.4));
}

.med-player--mini .med-player__center-mini {
    display: flex;
}

.med-player--mini.med-player--mini-collapsed .med-player__center-mini {
    display: none;
}

.med-player__center-mini-collapsed {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    display: none;
}

.med-player--mini.med-player--mini-collapsed .med-player__center-mini-collapsed {
    display: flex;
}

.med-player__glass--expand {
    width: 48px;
    height: 48px;
    border-radius: 32px;
}

.med-player--web .med-player__center-mini {
    display: none;
}

@media (max-width: 991.98px) {
    .med-player__dock--web {
        padding: 16px 24px max(16px, env(safe-area-inset-bottom));
    }

    .med-player__title {
        font-size: 20px;
    }

    .med-player__volume-range {
        width: 80px;
    }
}

@media (max-width: 767.98px) {
    .med-player--web.med-player--theater {
        padding: 16px;
    }

    .med-player--web.med-player--theater .med-player__shell:not(:fullscreen) {
        width: calc(100vw - 32px);
        max-height: calc(100dvh - 32px);
    }

    .med-player--mini .med-player__shell {
        width: min(346px, calc(100vw - 32px));
    }

    .med-player--mini.med-player--mini-collapsed .med-player__shell {
        width: 160px;
    }
}

/* ==========================================================================
   Account History page (account-history.php) — Figma 140:10382 / 10327 / 10358
   ========================================================================== */

.ah-page {
    padding: 40px 20px 44px;
}

.ah-wrap {
    max-width: 1200px;
    margin: 0 auto;
}

.ah-grid {
    display: grid;
    grid-template-columns: 282px 1fr;
    gap: 24px;
    align-items: start;
}

/* --- Sidebar --- */

.ah-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ah-profile-card {
    border: 1px solid #ffffff;
    border-radius: 24px;
    padding: 32px;
    background:
        radial-gradient(100% 80% at 50% 0%, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 100%);
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.ah-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(137deg, rgba(255, 255, 255, 0.8) 10%, rgba(255, 255, 255, 0.5) 100%);
    box-shadow: 0 32px 50px rgba(40, 67, 115, 0.04);
    flex-shrink: 0;
}

.ah-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ah-profile-text {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.ah-profile-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 28px;
    color: #334155;
    margin: 0;
    text-align: center;
}

.ah-profile-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 20px;
    color: #64748b;
    white-space: nowrap;
}

.ah-profile-sep {
    display: none;
}

.ah-profile-phone,
.ah-profile-email {
    display: block;
}

/* --- Nav card --- */

.ah-nav {
    border: 1px solid #ffffff;
    border-radius: 24px;
    padding: 8px;
    background:
        radial-gradient(100% 80% at 50% 0%, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ah-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 16px;
    text-decoration: none;
    color: #334155;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition:
        background 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        color 0.18s ease,
        transform 0.1s ease;
}

.ah-nav-item:focus {
    outline: none;
}

.ah-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    display: block;
    transition: filter 0.18s ease;
}

.ah-nav-item .ah-nav-label--short {
    display: none;
}

/* Hover — subtle glass surface (non-active items only) */
.ah-nav-item:hover:not(.is-active),
.ah-nav-item.is-hover:not(.is-active) {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 6px 12px rgba(51, 65, 85, 0.05);
    color: #334155;
}

/* Keyboard focus ring (accessibility) */
.ah-nav-item:focus-visible {
    outline: 2px solid rgba(105, 201, 163, 0.6);
    outline-offset: 2px;
}

/* Pressed — a touch compressed */
.ah-nav-item:active:not(.is-active),
.ah-nav-item.is-pressed:not(.is-active) {
    background: rgba(255, 255, 255, 0.85);
    transform: scale(0.98);
    box-shadow: 0 2px 6px rgba(51, 65, 85, 0.06);
}

/* Active (current page) — solid white pill with green label */
.ah-nav-item.is-active {
    background:
        radial-gradient(100% 100% at 50% 0%, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 100%);
    border-color: #ffffff;
    box-shadow: 0 8px 16px rgba(51, 65, 85, 0.06);
    color: #69c9a3;
    cursor: default;
}

.ah-nav-item.is-active .ah-nav-icon {
    filter: brightness(0) saturate(100%) invert(72%) sepia(22%) saturate(639%) hue-rotate(111deg) brightness(92%) contrast(87%);
}

/* --- Main area --- */

.ah-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.ah-title-card {
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 32px;
    background: linear-gradient(174deg, rgba(255, 255, 255, 0.8) 10%, rgba(255, 255, 255, 0.5) 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
}

.ah-title {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 32px;
    color: #334155;
    margin: 0;
}

/* --- List (reuse .meditation-card-kit + local .ah-item overrides) --- */

.ah-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ah-item.meditation-card-kit {
    max-width: 100%;
}

/* Keep subtitle visible on desktop/tablet; the generic .text p from the kit
   already handles typography. Mobile date span is hidden outside mobile. */
.ah-item .ah-item-date-mobile {
    display: none;
}

/* Right column: date + heart */
.ah-item .card-right {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px;
}

.ah-item .ah-item-date {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 16px;
    color: #64748b;
    white-space: nowrap;
}

.ah-item .ah-item-fav {
    width: 36px;
    height: 36px;
    padding: 6px;
    margin: 0;
}

.ah-item .ah-item-fav img {
    width: 24px;
    height: 24px;
    display: block;
}

/* --- Tablet (<= 991.98px) ---
   Figma 140:10327 — stacked single column, 768px width frame */
@media (max-width: 991.98px) {
    .ah-page {
        padding: 40px 16px 44px;
    }

    .ah-wrap {
        max-width: 736px;
    }

    .ah-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    /* Profile horizontal */
    .ah-profile-card {
        flex-direction: row;
        padding: 24px;
        gap: 20px;
        align-items: center;
        text-align: left;
        border-color: rgba(255, 255, 255, 0.6);
    }

    .ah-profile-text {
        width: auto;
        flex: 1 1 0;
        min-width: 0;
        align-items: flex-start;
        gap: 8px;
    }

    .ah-profile-name {
        text-align: left;
    }

    .ah-profile-meta {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        align-items: center;
        font-size: 14px;
        line-height: 20px;
    }

    .ah-profile-sep {
        display: inline;
        color: #cbd5e1;
    }

    /* Nav horizontal chips */
    .ah-nav {
        flex-direction: row;
        flex-wrap: nowrap;
        padding: 8px;
        gap: 8px;
        align-items: center;
        justify-content: flex-start;
    }

    .ah-nav-item {
        padding: 12px 16px;
        border-radius: 16px;
        gap: 8px;
        flex: 0 0 auto;
    }

    .ah-nav-item .ah-nav-label--full {
        display: none;
    }

    .ah-nav-item .ah-nav-label--short {
        display: inline;
    }

    /* Title slightly smaller padding */
    .ah-title-card {
        padding: 24px 32px;
    }
}

/* --- Mobile (<= 575.98px) ---
   Figma 140:10358 — compact stacked, 378px width frame */
@media (max-width: 575.98px) {
    .ah-page {
        padding: 0 16px 32px;
    }

    .ah-wrap {
        max-width: 410px;
    }

    .ah-grid {
        gap: 20px;
    }

    /* Profile */
    .ah-profile-card {
        padding: 24px;
        gap: 20px;
    }

    .ah-profile-avatar {
        width: 64px;
        height: 64px;
    }

    .ah-profile-name {
        font-size: 16px;
        line-height: 28px;
    }

    .ah-profile-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        font-size: 12px;
        line-height: 16px;
    }

    .ah-profile-sep {
        display: none;
    }

    /* Nav — compact chip row, first + active show label, others icon-only */
    .ah-nav {
        padding: 4px;
        gap: 4px;
        border-radius: 24px;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }

    .ah-nav-item {
        padding: 12px;
        gap: 8px;
        font-size: 12px;
        flex: 0 0 auto;
    }

    /* Hide labels on mobile by default; re-show for first and active */
    .ah-nav-item .ah-nav-label--short {
        display: none;
    }

    .ah-nav-item:first-child .ah-nav-label--short,
    .ah-nav-item.is-active .ah-nav-label--short {
        display: inline;
    }

    /* Spread the non-labelled chips to the end */
    .ah-nav-item.is-active {
        margin-right: auto;
    }

    /* Title — bare heading (no card) */
    .ah-title-card {
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .ah-title {
        font-size: 20px;
        line-height: 28px;
    }

    /* Items on mobile — reuse .meditation-card-kit mobile rules
       (52px thumb, 14/18 title, subtitle `.text p` hidden).
       Swap the right-side date for the under-title date. */
    .ah-item .ah-item-date-mobile {
        display: block;
        margin: 0;
        font-family: 'Inter', sans-serif;
        font-size: 12px;
        line-height: 12px;
        color: #64748b;
    }

    .ah-item .ah-item-date {
        display: none;
    }

    .ah-item .card-right {
        padding: 0 8px 0 4px;
        gap: 0;
    }
}

/* ==========================================================================
   Account Subscription page (account-subscription.php) — Figma 140:10153 / 10044 / 10102
   ========================================================================== */

/* Desktop — the whole right column is one big glass card that wraps title + sub-cards */
.sub-page .sub-main {
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 32px;
    background: linear-gradient(152deg, rgba(255, 255, 255, 0.8) 10%, rgba(255, 255, 255, 0.5) 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    gap: 24px;
}

.sub-title {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 24px;
    line-height: 32px;
    color: #334155;
}

.sub-cards-row {
    display: flex;
    gap: 24px;
    align-items: stretch;
}

/* --- Inner glass card --- */
.sub-card {
    border: 1px solid #ffffff;
    border-radius: 20px;
    padding: 24px;
    background: linear-gradient(154deg, rgba(255, 255, 255, 0.8) 10%, rgba(255, 255, 255, 0.5) 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    overflow: clip;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.sub-card--plan {
    width: 490px;
    flex: 0 0 auto;
}

.sub-card--payment {
    flex: 1 1 0;
    min-width: 0;
}

.sub-card--cancel {
    flex-direction: row;
    align-items: center;
    gap: 24px;
    padding: 24px;
}

/* --- Plan card: top row with chip + price --- */
.sub-plan-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.sub-plan-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    background: radial-gradient(circle at 0% 100%, #FDB5F6 0%, #BC9CF5 50%, #7B83F5 100%);
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 20px;
    white-space: nowrap;
}

.sub-price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    line-height: 1;
    white-space: nowrap;
}

.sub-price b {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 40px;
    line-height: 1;
    color: #334155;
}

.sub-price span {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 12px;
    line-height: 16px;
    color: #94a3b8;
}

/* --- Progress --- */
.sub-progress {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sub-progress-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sub-star {
    width: 24px;
    height: 24px;
    display: block;
    flex-shrink: 0;
}

.sub-progress-label {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 28px;
    color: #334155;
}

.sub-progress-bar {
    position: relative;
    height: 6px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.sub-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: radial-gradient(circle at 0% 100%, #FDB5F6 0%, #BC9CF5 50%, #7B83F5 100%);
}

/* --- Button row --- */
.sub-btn-row {
    display: flex;
    gap: 10px;
}

.sub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 52px;
    padding: 16px 24px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: transparent;
    color: #334155;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
    white-space: nowrap;
}

.sub-btn:focus {
    outline: none;
}

.sub-btn:focus-visible {
    outline: 2px solid rgba(105, 201, 163, 0.6);
    outline-offset: 2px;
}

.sub-btn-row .sub-btn {
    flex: 1 1 0;
    min-width: 0;
}

.sub-btn--primary {
    border-color: transparent;
    background: radial-gradient(circle at 15% 0%, #90DBBD 0%, #68C09D 100%);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(63, 181, 134, 0.2);
}

.sub-btn--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(63, 181, 134, 0.28);
}

.sub-btn--primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(63, 181, 134, 0.2);
}

.sub-btn--ghost:hover {
    background: rgba(248, 250, 252, 0.85);
    border-color: #cbd5e1;
}

.sub-btn--ghost:active {
    background: rgba(241, 245, 249, 0.9);
}

.sub-btn--full {
    width: 100%;
}

/* --- Payment card --- */
.sub-payment-top {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sub-payment-caption {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    color: #64748b;
}

.sub-payment-date {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 16px;
    color: #334155;
}

.sub-payment-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    background: transparent;
}

.sub-payment-icon {
    width: 20px;
    height: 20px;
    display: block;
    flex-shrink: 0;
}

.sub-payment-number {
    flex: 1 1 0;
    min-width: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 16px;
    color: #334155;
}

/* --- Cancel card --- */
.sub-cancel-text {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #64748b;
}

.sub-cancel-caption {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 12px;
    line-height: 16px;
    color: #64748b;
}

.sub-cancel-desc {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #64748b;
}

.sub-card--cancel .sub-btn {
    flex: 0 0 auto;
}

/* --- Tablet (<= 991.98px) — Figma 140:10044 ---
   Outer glass card remains (same white substrate as desktop);
   inner cards stack in a single column. */
@media (max-width: 991.98px) {
    .sub-page .sub-main {
        padding: 24px;
        gap: 20px;
    }

    .sub-cards-row {
        flex-direction: column;
        gap: 20px;
    }

    .sub-card--plan,
    .sub-card--payment {
        width: 100%;
        flex: 0 0 auto;
    }

    /* Cancel row still horizontal on tablet but allow wrap */
    .sub-card--cancel {
        flex-wrap: wrap;
        padding: 24px;
    }

    .sub-card--cancel .sub-btn {
        min-width: 187px;
    }
}

/* --- Mobile (<= 575.98px) — Figma 140:10102 ---
   Wrapper disappears; title + cards sit directly on page background. */
@media (max-width: 575.98px) {
    .sub-page .sub-main {
        border: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
        gap: 16px;
    }

    .sub-title {
        font-size: 20px;
        line-height: 28px;
    }

    .sub-card {
        padding: 24px;
        gap: 20px;
    }

    .sub-price b {
        font-size: 36px;
    }

    .sub-progress-label {
        font-size: 20px;
        line-height: 28px;
    }

    .sub-btn {
        min-height: 44px;
        padding: 12px 16px;
    }

    .sub-card--cancel {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }

    .sub-card--cancel .sub-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Account Settings page (account-option.php) — Figma 140:10293 / 10211 / 10256
   Reuses .sub-page / .sub-main / .sub-card / .sub-btn as a base.
   ========================================================================== */

.opt-card {
    gap: 20px;
}

.opt-card-title {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 20px;
    color: #334155;
}

/* --- Input fields stack --- */
.opt-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.opt-field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 6px 16px;
    min-height: 48px;
    background: #eef3f7;
    border-radius: 12px;
    border: 1px solid transparent;
    cursor: text;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.opt-field:focus-within {
    border-color: #69c9a3;
    background: #e6f4ee;
}

.opt-field-label {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: #64748b;
    display: block;
}

.opt-field-input {
    appearance: none;
    -webkit-appearance: none;
    background: transparent;
    border: 0;
    outline: none;
    padding: 0;
    width: 100%;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #334155;
}

.opt-field-input::placeholder {
    color: #94a3b8;
}

/* Password field: grid with label+input stacked on the left and the eye on the right */
.opt-field--pw {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    column-gap: 8px;
    padding: 6px 6px 6px 16px;
    min-height: 48px;
    align-items: center;
}

.opt-field--pw > .opt-field-label {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
}

.opt-field--pw > .opt-field-input {
    grid-column: 1;
    grid-row: 2;
    align-self: start;
}

.opt-field--pw > .opt-field-eye {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.opt-field-eye {
    background: transparent;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    color: #64748b;
    transition: background 0.15s ease, color 0.15s ease;
}

.opt-field-eye:hover {
    background: rgba(255, 255, 255, 0.6);
}

.opt-field-eye:focus {
    outline: none;
}

.opt-field-eye:focus-visible {
    outline: 2px solid rgba(105, 201, 163, 0.6);
    outline-offset: 2px;
}

.opt-field-eye svg {
    display: block;
}

/* --- Save button uses existing sub-btn--primary + sub-btn--full --- */
.opt-save-btn {
    width: 100%;
}

/* --- Toggles group --- */
.opt-toggles {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
}

.opt-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.opt-toggle-label {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #334155;
}

/* Smooth the existing switch-ui transitions on this page */
.opt-toggle .switch-ui {
    transition: background 0.2s ease;
    flex: 0 0 auto;
}

.opt-toggle .switch-ui::after {
    transition: left 0.2s ease;
}

/* --- Right column: two stacked cards; notifications fills vertical space --- */
.opt-cards-row {
    align-items: stretch;
}

.opt-card--data {
    flex: 1 1 0;
    min-width: 0;
}

.opt-col-side {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: 403px;
    flex: 0 0 auto;
    align-self: stretch;
}

.opt-col-side .opt-card--notif {
    flex: 1 1 auto;
}

.opt-logout-btn {
    width: 100%;
}

/* --- Tablet (<= 991.98px) — Figma 140:10211 ---
   Single-column stack; outer substrate stays. */
@media (max-width: 991.98px) {
    .opt-cards-row {
        align-items: stretch;
    }

    .opt-card--data {
        width: 100%;
        flex: 0 0 auto;
    }

    .opt-col-side {
        width: 100%;
        flex: 0 0 auto;
        gap: 20px;
    }
}

/* --- Mobile (<= 575.98px) — Figma 140:10256 ---
   Same stacked layout, compact paddings handled by .sub-page mobile rules. */
@media (max-width: 575.98px) {
    .opt-card {
        gap: 20px;
    }

    .opt-fields {
        gap: 12px;
    }

    .opt-toggles {
        gap: 16px;
    }
}

/* --- Subscription: название тарифа + тест переключения --- */
.sub-plan-name {
    margin: 0 0 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 22px;
    color: #334155;
}

.sub-plan-test-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.sub-plan-test-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.5);
}

.sub-plan-test-label {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
}

/* ==========================================================================
   Registration page (registration.php) — Figma 140:10831 / 10864 / 10894
   ========================================================================== */

.reg-page {
    padding: 24px 20px 56px;
}

.reg-wrap {
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.reg-main-card,
.reg-social-card {
    width: 100%;
    max-width: 360px;
    border: 1px solid #ffffff;
    border-radius: 32px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
}

.reg-main-card {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.reg-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.reg-avatar {
    width: 80px;
    height: 80px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    overflow: hidden;
    box-shadow: 0 32px 50px rgba(40, 67, 115, 0.04);
}

.reg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reg-title {
    margin: 0;
    color: #334155;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.2;
}

.reg-subtitle {
    margin: 0;
    max-width: 296px;
    color: #334155;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.reg-subtitle .reg-footer-link,
a.reg-footer-link {
    color: #54ac89;
    text-decoration: none;
}

.reg-subtitle .reg-footer-link:hover,
a.reg-footer-link:hover {
    text-decoration: none;
    color: #3d9670;
}

.reg-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reg-field {
    min-height: 48px;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    padding: 6px 16px;
    border: 1px solid transparent;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.reg-field:focus-within {
    border-color: rgba(84, 172, 137, 0.55);
    background: #eef3f7;
}

.reg-field-input {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    color: #334155;
    font-size: 14px;
    line-height: 20px;
}

.reg-field-input::placeholder {
    color: #64748b;
}

.reg-field--password {
    padding-right: 8px;
    gap: 8px;
}

.reg-field-eye {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    padding: 0;
    background: transparent;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.reg-submit {
    width: 100%;
    margin-top: 12px;
    border: 0;
    border-radius: 999px;
    padding: 16px 24px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    background: radial-gradient(100% 80% at 0% 0%, #90dbbd 0%, #68c09d 100%);
    box-shadow: 0 8px 16px rgba(63, 181, 134, 0.2);
}

.reg-agree {
    margin-top: 12px;
    align-items: flex-start;
    gap: 12px;
    display: flex;
}

.reg-agree-text {
    flex: 1;
    color: #334155;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
}

.reg-agree-text a {
    color: #54ac89;
    text-decoration: none;
}

.reg-agree-text a:hover {
    text-decoration: underline;
}

.reg-social-card {
    padding: 20px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.reg-social-label {
    margin: 0;
    color: #64748b;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.reg-socials {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.reg-social {
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    cursor: pointer;
    transition: border-color 0.15s ease, transform 0.1s ease;
}

.reg-social:hover {
    border-color: #cbd5e1;
}

.reg-social:active {
    transform: scale(0.97);
}

.reg-social img {
    width: 20px;
    height: 20px;
    display: block;
}

@media (max-width: 991.98px) {
    .reg-page {
        padding: 20px;
    }

    .reg-wrap {
        min-height: calc(100vh - 150px);
    }
}

@media (max-width: 575.98px) {
    .reg-page {
        padding: 20px 16px 24px;
    }

    .reg-wrap {
        min-height: auto;
        justify-content: flex-start;
        gap: 16px;
    }
}

/* ============================================================
   Main page (main.php) — meditation topics hero
   ============================================================ */

.mp-page {
    width: 100%;
    padding: 40px 20px 40px;
}

.mp-wrap {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    padding: 40px 0 80px;
}

/* hero — title + tabs */
.mp-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.mp-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    color: #334155;
}

.mp-title h1 {
    margin: 0;
    font-weight: 600;
    font-size: 36px;
    line-height: 44px;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.mp-title .mp-leaf {
    display: inline-block;
}

.mp-title p {
    margin: 0;
    font-weight: 400;
    font-size: 20px;
    line-height: 32px;
    color: #334155;
}

.mp-tabs {
    display: inline-flex;
    gap: 2px;
    padding: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 100%);
    box-shadow: 0 8px 16px 0 rgba(51, 65, 85, 0.06);
}

.mp-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: 0;
    background: transparent;
    color: #64748B;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    border-radius: 999px;
    cursor: pointer;
    transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.mp-tab img {
    width: 20px;
    height: 20px;
    display: block;
}

.mp-tab.is-active {
    color: #fff;
    background: linear-gradient(135deg, #90DBBD 0%, #68C09D 100%);
    box-shadow: 0 4px 8px 0 rgba(63, 181, 134, 0.2);
}

.mp-tab.is-active img {
    filter: brightness(0) invert(1);
}

/* brain block */
.mp-brain {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-right: 40px;
    gap: 0;
}

.mp-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.mp-col--left {
    align-items: flex-end;
    margin-right: -40px;
    padding-right: 0;
}

.mp-col--right {
    align-items: flex-start;
    margin-left: -40px;
}

.mp-col--left .mp-bubble {
    margin-right: var(--offset, 0px);
}

.mp-col--right .mp-bubble {
    margin-left: var(--offset, 0px);
}

.mp-brain-img {
    position: relative;
    flex: 0 0 auto;
    width: 440px;
    height: 440px;
}

.mp-brain-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
}

.mp-brain-img::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../assets/figma-main/brain.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.7;
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}

.mp-brain-img img {
    position: relative;
    z-index: 1;
}

/* bubble */
.mp-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 12px;
    border: 1px solid #FFFFFF;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.6) 100%);
    box-shadow: 0 12px 24px 0 rgba(51, 65, 85, 0.06);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
    white-space: nowrap;
}

/* Hover state = Figma active mockup: full green, white text, icon stays, double ring */
.mp-bubble:hover,
.mp-bubble:focus-visible,
.mp-bubble.is-active {
    border-color: #90dbbd;
    background: radial-gradient(circle at 20% 0%, #90dbbd 0%, #68c09d 100%);
    box-shadow:
        0 0 0 4px #90dbbd,
        0 0 0 5px #69c9a3,
        0 12px 24px rgba(63, 181, 134, 0.22);
    transform: translateY(-1px);
    outline: none;
}

.mp-bubble:hover .mp-bubble-text,
.mp-bubble:focus-visible .mp-bubble-text,
.mp-bubble.is-active .mp-bubble-text {
    color: #ffffff;
}

.mp-bubble-text {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    font-weight: 500;
    font-size: 16px;
    line-height: 20px;
    color: #334155;
    white-space: normal;
    text-align: center;
}

.mp-bubble-img {
    position: relative;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mp-bubble-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* chat card (desktop/tablet) */
.mp-chat {
    position: relative;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 32px;
    background: linear-gradient(163deg, rgba(255, 255, 255, 0.8) 10%, rgba(255, 255, 255, 0.5) 100%);
    box-shadow: 0 12px 24px 0 rgba(51, 65, 85, 0.06);
}

.mp-chat-default {
    min-height: 400px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.mp-chat-active {
    display: none;
}

.mp-page.is-selected .mp-chat-default,
.mp-page.is-chat-open .mp-chat-default {
    display: none !important;
}

.mp-page.is-selected .mp-chat-active,
.mp-page.is-chat-open .mp-chat-active {
    display: block !important;
}

.mp-chat-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.mp-chat-avatar {
    width: 100px;
    height: 100px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 32px 50px 0 rgba(40, 67, 115, 0.04);
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.6));
}

.mp-chat-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-chat-text p {
    margin: 0;
    font-weight: 500;
    font-size: 20px;
    line-height: 28px;
    color: #334155;
}

.mp-chat-form {
    width: 100%;
    max-width: 600px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 100%);
    box-shadow: 0 12px 24px 0 rgba(51, 65, 85, 0.06);
}

.mp-chat-input {
    flex: 1 1 0;
    min-width: 0;
    padding: 0 16px;
    border: 0;
    background: transparent;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #334155;
    height: 48px;
    outline: none;
}

.mp-chat-input::placeholder {
    color: #64748B;
}

.mp-chat-send {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #90DBBD 0%, #68C09D 100%);
    box-shadow: 0 8px 16px 0 rgba(63, 181, 134, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.mp-chat-send img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.mp-chat-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px 0 rgba(63, 181, 134, 0.28);
}

/* mobile-only CTA */
.mp-chat-btn {
    display: none;
    width: 100%;
    max-width: 320px;
    padding: 14px 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #90DBBD 0%, #68C09D 100%);
    box-shadow: 0 8px 16px 0 rgba(63, 181, 134, 0.2);
    color: #fff;
    font-weight: 500;
    font-size: 16px;
    line-height: 24px;
    text-align: center;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.mp-chat-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 20px 0 rgba(63, 181, 134, 0.28);
}

/* ---------- Tablet ---------- */
@media (max-width: 991.98px) {
    .mp-page {
        padding: 24px 16px 24px;
    }

    .mp-wrap {
        gap: 24px;
        padding: 16px 0 40px;
    }

    .mp-title h1 {
        font-size: 32px;
        line-height: 40px;
    }

    .mp-title p {
        font-size: 18px;
        line-height: 28px;
    }

    .mp-brain {
        flex-direction: column;
        padding-right: 0;
        gap: 24px;
    }

    .mp-brain-img {
        order: -1;
        width: 380px;
        height: 380px;
        margin: 0 auto;
    }

    .mp-col {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 0;
    }

    .mp-col--left,
    .mp-col--right {
        align-items: stretch;
        margin: 0;
    }

    .mp-col--left .mp-bubble,
    .mp-col--right .mp-bubble {
        margin: 0;
    }

    .mp-bubble {
        width: 100%;
        justify-content: flex-start;
        gap: 8px;
    }

    /* force icon-left / text-right for both columns */
    .mp-bubble .mp-bubble-img {
        order: 1;
    }

    .mp-bubble .mp-bubble-text {
        order: 2;
        flex: 1 1 auto;
        text-align: left;
        padding: 0 8px;
    }

    /* 2-col layout on tablet: merge both columns into a two-column grid */
    .mp-brain {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 16px;
        row-gap: 12px;
        align-items: start;
    }

    .mp-brain-img {
        grid-column: 1 / span 2;
    }

    .mp-col--left {
        grid-column: 1 / span 1;
    }

    .mp-col--right {
        grid-column: 2 / span 2;
    }
}

/* ---------- Mobile ---------- */
@media (max-width: 575.98px) {
    .mp-page {
        padding: 16px 12px 24px;
    }

    .mp-wrap {
        gap: 20px;
        padding: 8px 0 24px;
    }

    .mp-title h1 {
        font-size: 28px;
        line-height: 36px;
        white-space: normal;
    }

    .mp-title p {
        font-size: 16px;
        line-height: 24px;
    }

    .mp-tab {
        padding: 8px 14px;
        font-size: 13px;
    }

    .mp-brain {
        grid-template-columns: 1fr;
        column-gap: 0;
        row-gap: 12px;
    }

    .mp-brain-img {
        grid-column: 1;
        width: 280px;
        height: 280px;
    }

    .mp-col--left,
    .mp-col--right {
        grid-column: 1;
    }

    .mp-bubble {
        padding: 8px;
    }

    .mp-bubble-img {
        width: 32px;
        height: 32px;
    }

    .mp-bubble-text {
        font-size: 14px;
        line-height: 18px;
        padding: 0 6px;
    }

    .mp-chat {
        min-height: 0;
        padding: 20px 16px;
        gap: 16px;
        border-radius: 24px;
    }

    .mp-chat-avatar {
        width: 80px;
        height: 80px;
    }

    .mp-chat-text p {
        font-size: 16px;
        line-height: 22px;
    }

    .mp-chat-default .mp-chat-form {
        display: none;
    }

    .mp-chat-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================================
   Main page — selected/active state
   ============================================================ */

/* Star-counter progress tooltip */
.mp-stars {
    display: none;
    position: absolute;
    top: 16px;
    right: 0;
    z-index: 5;
    width: 280px;
    padding: 16px;
    border: 1px solid #fff;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fe 100%);
    box-shadow: 0 12px 24px 0 rgba(51, 65, 85, 0.06);
}

.mp-page.is-selected .mp-stars {
    display: block;
}

.mp-stars-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.mp-stars-left {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #334155;
}

.mp-stars-left img {
    width: 18px;
    height: 18px;
    display: block;
}

.mp-stars-right {
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    color: #334155;
}

.mp-stars-bar {
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #E2E8F0;
    overflow: hidden;
}

.mp-stars-fill {
    height: 100%;
    border-radius: 999px;
    background: radial-gradient(circle at 0% 50%, #FDB5F6 0%, #BC9CF5 50%, #7B83F5 100%);
}

/* Popup card over brain */
.mp-popup {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 4;
    width: 282px;
    padding: 52px 32px 32px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 16px 0 rgba(51, 65, 85, 0.06);
    text-align: center;
}

.mp-page.is-selected .mp-popup {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.mp-popup-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mp-popup-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mp-popup-text {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.mp-popup-title {
    margin: 0;
    font-weight: 600;
    font-size: 20px;
    line-height: 28px;
    color: #334155;
}

.mp-popup-desc {
    margin: 0;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: #64748B;
}

.mp-popup-btn {
    width: 100%;
    padding: 16px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, #90DBBD 0%, #68C09D 100%);
    box-shadow: 0 8px 16px 0 rgba(63, 181, 134, 0.2);
    color: #fff;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    text-align: center;
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.mp-popup-btn:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 20px 0 rgba(63, 181, 134, 0.28);
}

/* Active bubble — green gradient */
/* .mp-bubble.is-active is merged with the hover rule above to match the Figma mockup. */

/* ----------- Chat active state (split layout) ----------- */

.mp-chat-split {
    display: flex;
    align-items: stretch;
    gap: 8px;
    min-height: 400px;
    max-height: min(720px, calc(100vh - 200px));
    padding: 8px;
}

.mp-chat-box {
    flex: 1 1 0;
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 24px;
    padding: 32px;
    border-radius: 22px;
    position: relative;
    overflow: hidden;
}

.mp-chat-messages {
    width: 100%;
    max-width: 520px;
    flex: 1 1 auto;
    min-height: 120px;
    max-height: 100%;
    padding-right: 4px;
    overflow-x: hidden;
    overflow-y: scroll;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 rgba(148, 163, 184, 0.25);
}

.mp-chat-messages-inner {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 16px;
    min-height: 100%;
    padding-right: 4px;
}

.mp-chat-messages::-webkit-scrollbar {
    width: 8px;
}

.mp-chat-messages::-webkit-scrollbar-track {
    margin: 6px 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
}

.mp-chat-messages::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: #94a3b8;
    background-clip: padding-box;
}

.mp-chat-messages::-webkit-scrollbar-thumb:hover {
    background: #64748b;
    background-clip: padding-box;
}

.mp-chat-messages.is-scrollable {
    box-shadow: inset 0 10px 10px -10px rgba(51, 65, 85, 0.14);
}

/* message bubbles */
.mp-msg {
    display: flex;
    width: 100%;
}

.mp-msg--user {
    padding-left: 80px;
    justify-content: flex-end;
}

.mp-msg--ai {
    padding-right: 80px;
    gap: 16px;
    align-items: flex-end;
}

.mp-msg--user .mp-msg-bubble {
    max-width: 100%;
    padding: 12px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #90DBBD 0%, #68C09D 100%);
    box-shadow: 0 12px 24px 0 rgba(51, 65, 85, 0.06);
    color: #fff;
    font-size: 14px;
    line-height: 20px;
}

.mp-msg--ai .mp-msg-avatar {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 32px 50px 0 rgba(40, 67, 115, 0.04);
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
}

.mp-msg--ai .mp-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-msg--ai .mp-msg-bubble {
    flex: 1 1 auto;
    padding: 12px 16px;
    border: 1px solid #fff;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
    box-shadow: 0 12px 24px 0 rgba(51, 65, 85, 0.06);
    color: #334155;
    font-size: 14px;
    line-height: 20px;
}

.mp-msg--ai .mp-msg-bubble p {
    margin: 0 0 12px 0;
}

.mp-msg--ai .mp-msg-bubble p:last-child {
    margin-bottom: 0;
}

/* meditation card (inside chat) */
.mp-med-card {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 88px;
    padding: 4px;
    border-radius: 9999px;
    background: linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
    box-shadow: 0 6px 12px 0 rgba(51, 65, 85, 0.06);
    overflow: hidden;
    width: 100%;
}

.mp-med-img {
    position: relative;
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    border-radius: 9999px;
    background: #fff;
    overflow: hidden;
}

.mp-med-img img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mp-med-play {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 24px 0 rgba(51, 65, 85, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mp-med-play img {
    position: static;
    width: 14px;
    height: 14px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.mp-med-info {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
}

.mp-med-info strong {
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    color: #334155;
}

.mp-med-info p {
    margin: 0;
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
    color: #64748B;
}

.mp-med-fav {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-right: 20px;
    border: 0;
    background: transparent;
    border-radius: 999px;
    cursor: pointer;
}

.mp-med-fav img {
    width: 24px;
    height: 24px;
    opacity: 0.6;
}

/* Input + cost tooltip at bottom of chat */
.mp-chat-input-wrap {
    position: relative;
    width: 100%;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-top: 12px;
}

.mp-chat-clear {
    align-self: center;
}

.mp-chat-cost {
    position: absolute;
    top: -14px;
    right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 4px 12px;
    border: 1px solid #fff;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #f7f9fe 100%);
    box-shadow: 0 8px 16px 0 rgba(51, 65, 85, 0.06);
    z-index: 2;
}

.mp-chat-cost-num {
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    background: radial-gradient(circle at 0 50%, #FDB5F6 0%, #BC9CF5 50%, #7B83F5 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.mp-chat-cost img {
    width: 14px;
    height: 14px;
    display: block;
}

.mp-chat-form--active {
    width: 100%;
    max-width: none;
}

/* Right-side hero illustration for chat */
.mp-chat-hero {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    background: linear-gradient(129deg, #ffffff 0%, #edf6ff 100%);
}

.mp-chat-hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ----------- Responsive overrides for active state ----------- */

@media (max-width: 991.98px) {
    .mp-stars {
        position: static;
        top: auto;
        right: auto;
        width: 100%;
        max-width: 420px;
        margin: 0 auto;
    }

    .mp-popup {
        width: min(360px, calc(100% - 32px));
        padding: 40px 24px 24px;
    }

    .mp-chat-split {
        flex-direction: column;
        min-height: 0;
        gap: 16px;
    }

    .mp-chat-box {
        padding: 24px;
        gap: 24px;
        min-height: 0;
        max-height: 100%;
    }

    .mp-chat-messages {
        max-width: none;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
    }

    .mp-chat-hero {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .mp-stars {
        max-width: 100%;
        padding: 12px 14px;
        border-radius: 14px;
    }

    /* Popup becomes inline block rendered near the active bubble */
    .mp-popup {
        position: static;
        transform: none;
        width: 100%;
        padding: 24px 16px;
        border-radius: 24px;
        margin-top: 8px;
    }

    .mp-popup-icon {
        width: 64px;
        height: 64px;
    }

    .mp-popup-title {
        font-size: 18px;
        line-height: 24px;
    }

    /* on mobile when a topic is selected we hide the chat block (the CTA lives inside popup) */
    .mp-page.is-selected:not(.is-chat-open) .mp-chat {
        display: none;
    }

    /* ----------------------------------------------------------
       Mobile chat-active view  (Figma 140:9842)
       ---------------------------------------------------------- */

    /* keep chat visible on mobile when user opens the chat via the CTA */
    .mp-page.is-chat-open .mp-chat {
        display: block !important;
    }

    /* blue backdrop for the whole mobile chat view */
    .mp-page.is-chat-open {
        background: #cee5ff;
        padding: 16px;
        min-height: 100vh;
    }

    /* hide the brain/bubbles area while chatting on mobile */
    .mp-page.is-chat-open .mp-hero,
    .mp-page.is-chat-open .mp-brain {
        display: none;
    }

    /* Chat container becomes full-height glassy panel */
    .mp-page.is-chat-open .mp-chat {
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: transparent;
        padding: 0;
    }

    .mp-page.is-chat-open .mp-chat-active {
        min-height: 0;
        max-height: calc(100vh - 120px);
    }

    .mp-page.is-chat-open .mp-chat-split {
        flex-direction: column;
        min-height: 0;
        max-height: calc(100vh - 120px);
        height: calc(100vh - 120px);
        gap: 16px;
        padding: 0;
    }

    .mp-page.is-chat-open .mp-chat-hero {
        display: none;
    }

    .mp-page.is-chat-open .mp-chat-box {
        padding: 16px;
        gap: 16px;
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 24px;
        background: linear-gradient(116deg, rgba(255, 255, 255, 0.8) 10%, rgba(255, 255, 255, 0.5) 100%);
        min-height: 0;
        max-height: calc(100vh - 120px);
        height: calc(100vh - 120px);
        justify-content: flex-start;
        overflow: hidden;
    }

    .mp-page.is-chat-open .mp-chat-messages {
        gap: 16px;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        justify-content: flex-end;
    }

    /* User message — green gradient pill, content-sized */
    .mp-msg--user {
        padding-left: 32px;
    }

    .mp-msg--user .mp-msg-bubble {
        max-width: fit-content;
        padding: 12px 16px;
        border-radius: 16px;
        background: radial-gradient(circle at 0% 0%, #90dbbd 0%, #68c09d 100%);
        box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
        font-size: 14px;
        line-height: 20px;
    }

    /* AI message — 44x44 avatar, 16px gap, white bubble */
    .mp-msg--ai {
        gap: 16px;
        padding-right: 0;
        align-items: flex-end;
    }

    .mp-msg--ai .mp-msg-avatar {
        width: 44px;
        height: 44px;
    }

    .mp-msg--ai .mp-msg-bubble {
        padding: 12px 16px;
        border: 1px solid #fff;
        border-radius: 16px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
    }

    /* Meditation card — compact pill 60px tall */
    .mp-med-card {
        height: 60px;
        padding: 4px;
        gap: 4px;
        border-radius: 9999px;
        background: radial-gradient(circle at 50% 0%, #ffffff 0%, rgba(255, 255, 255, 0.8) 100%);
        box-shadow: 0 6px 12px rgba(51, 65, 85, 0.06);
        flex-wrap: nowrap;
        overflow: hidden;
    }

    .mp-med-img {
        width: 52px;
        height: 52px;
    }

    .mp-med-play {
        width: 24px;
        height: 24px;
        background: rgba(255, 255, 255, 0.35);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 8px 24px rgba(51, 65, 85, 0.3);
    }

    .mp-med-play img {
        width: 10px;
        height: 10px;
    }

    .mp-med-info {
        padding: 0 8px;
        gap: 0;
    }

    .mp-med-info strong {
        font-size: 14px;
        line-height: 18px;
        font-weight: 600;
    }

    /* Description hidden on mobile card (matches mockup) */
    .mp-med-info p {
        display: none;
    }

    .mp-med-fav {
        width: 46px;
        height: 36px;
        padding: 6px 16px 6px 6px;
        margin-right: 0;
    }

    .mp-med-fav img {
        width: 24px;
        height: 24px;
        opacity: 1;
    }

    /* Input — pill 60px with 48x48 green send button */
    .mp-page.is-chat-open .mp-chat-input-wrap {
        width: 100%;
    }

    .mp-page.is-chat-open .mp-chat-form.mp-chat-form--active {
        display: flex;
        height: 60px;
        padding: 6px;
        gap: 8px;
        border: 1px solid rgba(255, 255, 255, 0.6);
        border-radius: 999px;
        background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 100%);
        box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    }

    .mp-page.is-chat-open .mp-chat-form--active .mp-chat-input {
        height: 48px;
        padding: 0 16px;
        font-size: 14px;
        line-height: 20px;
    }

    .mp-page.is-chat-open .mp-chat-form--active .mp-chat-send {
        width: 48px;
        height: 48px;
        background: radial-gradient(circle at 0% 100%, #90dbbd 0%, #68c09d 100%);
        box-shadow: 0 8px 16px rgba(63, 181, 134, 0.2);
    }

    .mp-page.is-chat-open .mp-chat-form--active .mp-chat-send img {
        width: 20px;
        height: 20px;
    }

    /* Hide the "cost" chip on mobile — not in Figma mock */
    .mp-page.is-chat-open .mp-chat-cost {
        display: none;
    }
}

/* ============================================================
   Pre-registration page  (Figma 140:8911 / 140:8992 / 140:9072)
   Uses the site-wide wavy blue Background.jpg on body.site-page
   ============================================================ */

.preg-page {
    width: 100%;
    padding: 8px 0 24px;
    background: transparent;
    min-height: calc(100vh - 240px);
}

.preg-wrap {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.preg-frame {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    border: 1px solid #ffffff;
    border-radius: 32px;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    min-height: 784px;
}

/* ---------- Left side: chat ---------- */
.preg-chat {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 32px;
    border-radius: 22px;
}

.preg-chat-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding-top: 96px;
}

.preg-avatar {
    width: 100px;
    height: 100px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.04);
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.6) 100%);
    flex-shrink: 0;
}

.preg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preg-greeting {
    margin: 0;
    font-weight: 400;
    font-size: 24px;
    line-height: 32px;
    text-align: center;
    background: linear-gradient(180deg, #394c67 0%, rgba(57, 76, 103, 0.6) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.preg-chat-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}

.preg-question {
    margin: 0 0 20px 0;
    font-size: 18px;
    line-height: 24px;
    text-align: center;
    color: #64748b;
}

.preg-prompts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-height: 200px;
    opacity: 1;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.35s ease, padding 0.35s ease;
    overflow: hidden;
}

.preg-prompt {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 8px;
    min-height: 110px;
    padding: 16px;
    border: 1px solid #ffffff;
    border-radius: 20px;
    background: linear-gradient(124deg, #ffffff 0%, #fafcff 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    cursor: pointer;
    text-align: left;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.preg-prompt-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.preg-prompt-text {
    font-size: 14px;
    line-height: 20px;
    color: #334155;
    font-weight: 500;
}

.preg-prompt:hover,
.preg-prompt:focus-visible {
    border-color: #90dbbd;
    box-shadow: 0 16px 32px rgba(63, 181, 134, 0.18);
    transform: translateY(-1px);
    outline: none;
}

.preg-prompt.is-active {
    border-color: #68c09d;
    background: radial-gradient(circle at 20% 0%, rgba(144, 219, 189, 0.18) 0%, rgba(104, 192, 157, 0.12) 100%);
    box-shadow: 0 12px 24px rgba(63, 181, 134, 0.22);
}

/* Chat input */
.preg-compose {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
}

.preg-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 999px;
    background: linear-gradient(180deg, #ffffff 0%, #fafcff 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
}

.preg-input {
    flex: 1 1 0;
    min-width: 0;
    height: 48px;
    padding: 0 16px;
    border: 0;
    background: transparent;
    font-size: 14px;
    line-height: 20px;
    color: #334155;
    outline: none;
}

.preg-input::placeholder {
    color: #64748b;
}

.preg-send {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: radial-gradient(circle at 0% 100%, #90DBBD 0%, #68C09D 100%);
    box-shadow: 0 8px 16px rgba(63, 181, 134, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.preg-send:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 20px rgba(63, 181, 134, 0.28);
}

.preg-send img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

.preg-clear-chat,
.mp-chat-clear {
    align-self: center;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    font-size: 12px;
    line-height: 16px;
    color: #64748b;
    text-decoration: underline;
    cursor: pointer;
}

.preg-clear-chat:hover,
.mp-chat-clear:hover {
    color: #334155;
}

.preg-consent {
    margin: 0;
    padding-top: 4px;
    font-size: 11px;
    line-height: 14px;
    color: #64748b;
    text-align: center;
}

.preg-consent a {
    color: inherit;
    text-decoration: underline;
}

/* ---------- Right side: hero ---------- */
/* Figma: linear-gradient(129deg, #ffffff 10%, #edf6ff 100%) with rounded 24px */
.preg-hero {
    position: relative;
    align-self: stretch;
    min-height: 0;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    overflow: hidden;
    background: #ffffff;
    min-height: 784px;
}

.preg-hero--video {
    background: #ffffff;
}

/* Шапка на пре-регистрации: без backdrop-filter — иначе «серый» блик */
.is-preg-page .header-shell {
    background: #ffffff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.preg-hero-inner {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #ffffff;
}

.preg-hero-inner img,
.preg-hero-inner video,
.preg-hero-inner .preg-hero-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    object-fit: cover;
    object-position: center center;
    display: block;
    background: #ffffff;
}

.preg-hero-media--zoom-fill {
    transform: scale(1.12);
    transform-origin: center center;
}

/* ---------- Tablet (<= 991px) ---------- */
@media (max-width: 991.98px) {
    .preg-page {
        padding: 16px 16px 32px;
    }

    /* Flatten .preg-chat so head+body become direct grid items of the frame */
    .preg-frame {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "head hero"
            "body body";
        gap: 16px;
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
        min-height: 0;
    }

    .preg-chat {
        display: contents;
    }

    .preg-chat-head {
        grid-area: head;
        padding: 72px 24px;
        gap: 20px;
        border: 1px solid rgba(255, 255, 255, 0.85);
        border-radius: 24px;
        background: linear-gradient(148deg, #ffffff 10%, #f8fbff 100%);
        box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    }

    .preg-chat-body {
        grid-area: body;
        padding: 28px 24px;
        gap: 20px;
        max-width: 100%;
        border: 1px solid rgba(255, 255, 255, 0.85);
        border-radius: 24px;
        background: linear-gradient(148deg, #ffffff 10%, #f8fbff 100%);
        box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    }

    .preg-question {
        margin-bottom: 4px;
    }

    .preg-hero {
        grid-area: hero;
        min-height: 440px;
        border-radius: 24px;
    }
}

/* ---------- Mobile (<= 575px) ---------- */
@media (max-width: 575.98px) {
    .preg-page {
        padding: 12px 12px 24px;
    }

    /* Make the wrap fill viewport height so the chat card can stretch */
    .preg-wrap {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 120px);
    }

    /* Stack: hero on top, then single merged chat card below.
       `1fr` on body row so it fills remaining viewport height (Figma 140:9072) */
    .preg-frame {
        grid-template-columns: 1fr;
        grid-template-areas:
            "hero"
            "head"
            "body";
        grid-template-rows: auto auto 1fr;
        gap: 0;
        flex: 1 1 0;
        min-height: 0;
    }

    .preg-chat-head {
        grid-area: head;
        padding: 24px 20px 0;
        gap: 12px;
        border: 1px solid rgba(255, 255, 255, 0.85);
        border-bottom: 0;
        border-radius: 32px 32px 0 0;
        background: linear-gradient(134deg, #ffffff 10%, #f8fbff 100%);
        box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    }

    .preg-avatar {
        display: none;
    }

    .preg-greeting {
        font-size: 20px;
        line-height: 28px;
    }

    .preg-chat-body {
        grid-area: body;
        padding: 16px 20px 20px;
        gap: 16px;
        max-width: 100%;
        min-height: 0;
        border: 1px solid rgba(255, 255, 255, 0.85);
        border-top: 0;
        border-radius: 0 0 24px 24px;
        background: linear-gradient(134deg, #ffffff 10%, #f8fbff 100%);
        box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    }

    .preg-question {
        margin: 0;
        font-size: 16px;
        line-height: 22px;
    }

    .preg-prompts {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .preg-prompt {
        min-height: 96px;
        padding: 12px;
        border-radius: 16px;
    }

    .preg-prompt-text {
        font-size: 13px;
        line-height: 18px;
    }

    .preg-form {
        padding: 6px;
    }

    .preg-input {
        height: 44px;
        padding: 0 14px;
    }

    .preg-send {
        width: 44px;
        height: 44px;
    }

    .preg-consent {
        font-size: 10px;
    }

    .preg-hero {
        grid-area: hero;
        min-height: 420px;
        margin-bottom: 0;
        border-radius: 24px 24px 0 0;
    }
}

/* ============================================================
   Pre-registration Step-2 — conversation + smooth transition
   Figma: 140:8941 (desktop), 140:9022 (tablet), 140:9100 (mobile)
   ============================================================ */

.preg-consent {
    max-height: 40px;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.35s ease, padding 0.35s ease;
}

.preg-messages-area {
    width: 100%;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    flex: 0 0 auto;
    transition: max-height 0.4s ease, opacity 0.28s ease, margin 0.35s ease;
}

.preg-conv-scroll {
    width: 100%;
    max-height: inherit;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 rgba(148, 163, 184, 0.25);
}

.preg-conv-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    min-height: min-content;
}

.preg-conv-scroll::-webkit-scrollbar {
    width: 8px;
}

.preg-conv-scroll::-webkit-scrollbar-track {
    margin: 6px 0;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.22);
}

.preg-conv-scroll::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: #94a3b8;
    background-clip: padding-box;
}

.preg-conv-scroll::-webkit-scrollbar-thumb:hover {
    background: #64748b;
    background-clip: padding-box;
}

.preg-conv-scroll.is-scrollable {
    box-shadow: inset 0 10px 10px -10px rgba(51, 65, 85, 0.12);
}

.preg-page.is-chat-started .preg-frame {
    align-items: stretch;
}

.preg-page.is-chat-started .preg-chat {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    justify-content: flex-start;
    height: 100%;
}

.preg-page.is-chat-started .preg-chat-body {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 520px;
    align-items: stretch;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preg-page.is-chat-started .preg-compose,
.preg-page.is-chat-started .preg-consent {
    flex-shrink: 0;
}

.preg-page.is-chat-started .preg-messages-area {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    opacity: 1;
    margin-bottom: 4px;
    display: flex;
    flex-direction: column;
}

.preg-page.is-chat-started .preg-conv-scroll {
    flex: 1 1 auto;
    min-height: 140px;
    max-height: min(440px, calc(100vh - 300px));
}

/* Hide prompts + consent smoothly once chat starts */
.preg-page.is-chat-started .preg-prompts,
.preg-page.is-chat-started .preg-consent {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Smoothly collapse head + question text across breakpoints */
.preg-chat-head {
    max-height: 600px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.45s ease, opacity 0.3s ease, padding 0.45s ease, margin 0.45s ease;
}

.preg-question {
    max-height: 80px;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.35s ease;
}

.preg-page.is-chat-started .preg-question {
    max-height: 0;
    opacity: 0;
    margin: 0;
}

/* Desktop: hide the greeting/avatar when chat starts (per 140:8941) */
@media (min-width: 992px) {
    .preg-page.is-chat-started .preg-chat-head {
        max-height: 0;
        opacity: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* Mobile: hide the merged greeting card + round top of body card (per 140:9100) */
@media (max-width: 575.98px) {
    .preg-page.is-chat-started .preg-chat-head {
        max-height: 0;
        opacity: 0;
        padding-top: 0;
        padding-bottom: 0;
        border-width: 0;
        margin-bottom: 0;
    }

    .preg-chat-body {
        transition: border-radius 0.35s ease, border-top-width 0.35s ease, padding-top 0.35s ease;
    }

    .preg-page.is-chat-started .preg-chat-body {
        border-top: 1px solid rgba(255, 255, 255, 0.6);
        border-top-left-radius: 32px;
        border-top-right-radius: 32px;
        padding-top: 20px;
    }
}

/* Message bubble - user (right, green pill) */
.preg-msg {
    animation: preg-msg-in 0.32s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.preg-msg--user {
    align-self: flex-end;
    max-width: 75%;
    padding: 12px 16px;
    border-radius: 16px;
    background: radial-gradient(circle at 0% 0%, #90dbbd 0%, #68c09d 100%);
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    color: #ffffff;
    font-size: 14px;
    line-height: 20px;
    word-break: break-word;
}

/* Message bubble - AI (left: 44px avatar + white glass pill) */
.preg-msg--ai {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    align-self: stretch;
    padding-right: 80px;
}

.preg-msg-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 32px 50px rgba(40, 67, 115, 0.04);
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.6));
}

.preg-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preg-msg-bubble {
    flex: 1 1 0;
    min-width: 0;
    padding: 12px 16px;
    border: 1px solid #ffffff;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.6));
    box-shadow: 0 12px 24px rgba(51, 65, 85, 0.06);
    font-size: 14px;
    line-height: 20px;
    color: #334155;
}

.preg-msg--error .preg-msg-bubble {
    border-color: rgba(248, 113, 113, 0.45);
}

.preg-conv-inner .mp-med-card {
    width: 100%;
    max-width: 100%;
    align-self: stretch;
}

@keyframes preg-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Animated typing dots */
.preg-typing-dots {
    display: inline-block;
    margin-left: 2px;
}

.preg-typing-dots span {
    display: inline-block;
    animation: preg-dot 1.4s ease-in-out infinite;
    opacity: 0;
}

.preg-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.preg-typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes preg-dot {
    0%, 60%, 100% { opacity: 0; }
    30% { opacity: 1; }
}

.preg-guest-reg-cta {
    margin: 12px 0 4px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(120, 90, 180, 0.18);
    max-width: 92%;
}

.preg-guest-reg-cta__text {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.45;
    color: #3d3558;
}

.preg-guest-reg-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: #7c5cbf;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.preg-guest-reg-cta__btn:hover {
    color: #fff;
    background: #6a4dad;
}

.preg-guest-reg-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.preg-guest-reg-cta__btn--secondary {
    background: transparent;
    color: #7c5cbf;
    border: 1px solid rgba(124, 92, 191, 0.45);
}

.preg-guest-reg-cta__btn--secondary:hover {
    background: rgba(124, 92, 191, 0.08);
    color: #6a4dad;
}

.preg-reg-notices {
    margin: 0 0 12px;
}

.preg-reg-notices .reg-notice {
    margin: 0;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.45;
}

.preg-reg-notices .alert-success {
    background: rgba(220, 252, 231, 0.9);
    border: 1px solid rgba(34, 197, 94, 0.35);
    color: #166534;
}

.preg-reg-notices .alert-danger {
    background: rgba(254, 226, 226, 0.92);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #991b1b;
}

.lilo-flash-login {
    margin: 12px 0 0;
}

.lilo-flash-login__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    background: #7c5cbf;
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
}

.lilo-flash-login__btn:hover {
    background: #6a4dad;
    color: #fff !important;
}

.preg-login-hint {
    margin: 10px 0 0;
    text-align: center;
    font-size: 14px;
    color: rgba(61, 53, 88, 0.85);
}

.preg-login-hint a {
    color: #7c5cbf;
    font-weight: 600;
    text-decoration: none;
}

.preg-login-hint a:hover {
    text-decoration: underline;
}

/* Mobile: tighter spacing for AI bubble */
@media (max-width: 575.98px) {
    .preg-msg--ai {
        padding-right: 40px;
        gap: 12px;
    }

    .preg-msg-avatar {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .preg-msg--user {
        max-width: 80%;
    }

    .preg-page.is-chat-started .preg-chat-body {
        min-height: 0;
    }

    .preg-page.is-chat-started .preg-messages-area {
        flex: 1 1 auto;
        min-height: 0;
    }

    .preg-page.is-chat-started .preg-conv-scroll {
        flex: 1 1 auto;
        min-height: 0;
        max-height: none;
    }
}

@media (max-width: 991.98px) {
    .preg-page.is-chat-started .preg-chat-body {
        min-height: 0;
    }

    .preg-page.is-chat-started .preg-conv-scroll {
        max-height: min(380px, calc(100vh - 260px));
    }
}

/* Main page chat */
.mp-msg--typing .mp-chat-typing {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    min-height: 20px;
}

.mp-chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #94a3b8;
    animation: mp-chat-dot 1s infinite ease-in-out;
}

.mp-chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.mp-chat-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes mp-chat-dot {
    0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}

.mp-msg--error .mp-msg-bubble {
    border-color: rgba(248, 113, 113, 0.35);
}

.mp-msg--welcome .mp-msg-bubble a,
.mp-chat-login-link {
    color: #334155;
    font-weight: 600;
}

/* Contacts page */
.contacts-page .contacts-panel {
    align-items: stretch;
    width: 100%;
    max-width: 640px;
    margin: 0 auto;
}

.contacts-list,
.contacts-legal {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contacts-legal {
    padding-top: 20px;
    margin-top: 4px;
    border-top: 1px solid rgba(255, 255, 255, 0.55);
}

.contacts-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: center;
}

.contacts-row-label {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: #64748b;
}

.contacts-row-value {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: #334155;
    word-break: break-word;
}

.contacts-row-value a {
    color: inherit;
    text-decoration: none;
}

.contacts-row-value a:hover {
    text-decoration: underline;
}

.contacts-social {
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 8px;
}

.contacts-row--legal .contacts-row-label {
    font-size: 13px;
}

.contacts-row--legal .contacts-row-value {
    font-size: 15px;
    font-weight: 400;
}

@media (max-width: 575.98px) {
    .contacts-page .contacts-panel {
        padding: 24px 20px;
    }
}

/* 404 */
.err404-page .reg-main-card {
    text-align: center;
}

.err404-page .reg-hero {
    gap: 16px;
}

.err404-num {
    margin: 0;
    color: #54ac89;
    font-size: 56px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
}

a.reg-submit {
    display: block;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
}

a.reg-submit:hover,
a.reg-submit:focus-visible {
    color: #ffffff;
}

