.sidebar .demo-checkin-teaser {
    width: 100%;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

dialog.demo-entry-gate {
    position: fixed;
    inset: 0;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
    border: 0;
    background: transparent;
    overflow: hidden;
}

dialog.demo-entry-gate[open] {
    display: grid;
    place-items: center;
}

dialog.demo-entry-gate::backdrop {
    background: rgba(10, 28, 51, .64);
    -webkit-backdrop-filter: blur(1.5px);
    backdrop-filter: blur(1.5px);
}

.demo-entry-gate__action {
    min-height: 52px;
    padding-inline: clamp(22px, 5vw, 36px);
    border-radius: var(--ui-radius-md, 12px);
    box-shadow: 0 14px 32px rgba(16, 53, 143, .34);
    font-size: var(--ui-font-card-title, 16px);
}

.demo-experience-dialog h2 {
    margin: 0;
    font-size: var(--ui-font-section-title);
}

.demo-experience-dialog:focus {
    outline: none;
}

.demo-experience-dialog p {
    margin: 0;
    line-height: 1.6;
}

.demo-experience-dialog .ui-dialog__footer {
    flex-wrap: wrap;
}

.demo-experience-dialog .ui-button {
    white-space: normal;
    text-align: center;
}

.demo-experience-dialog [hidden],
.demo-tour [hidden] {
    display: none !important;
}

.demo-consultation-dialog {
    width: min(560px, calc(100% - 32px));
}

.demo-consultation-dialog .ui-dialog__header > div {
    display: grid;
    gap: var(--ui-space-1);
}

.demo-consultation-fields {
    display: grid;
    gap: var(--ui-space-3);
    margin-top: var(--ui-space-4);
}

.demo-consultation-fields label {
    display: grid;
    gap: var(--ui-space-2);
    color: var(--ui-color-text);
    font-weight: 650;
}

.demo-consultation-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.demo-consultation-status {
    min-height: 22px;
    margin-top: var(--ui-space-3) !important;
    color: var(--ui-color-text-muted);
    font-size: var(--ui-font-caption);
}

.demo-consultation-status.is-error {
    color: var(--ui-color-danger, #b4232f);
}

.demo-consultation-success {
    display: grid;
    justify-items: center;
    gap: var(--ui-space-3);
    padding-block: var(--ui-space-6);
    text-align: center;
}

.demo-consultation-success__icon {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    color: #16836d;
    background: #eafbf4;
    font-size: 28px;
    font-weight: 800;
}

.demo-consultation-dialog .ui-dialog__footer.is-success {
    justify-content: center;
}

.demo-dialog-header-actions {
    display: flex;
    align-items: center;
    gap: var(--ui-space-2);
    flex: 0 0 auto;
}

.demo-narration-toggle {
    color: #778397;
    border: 1px solid #dbe1e9;
    background: #f1f3f6;
}

.demo-narration-toggle:hover {
    color: #526176;
    border-color: #cbd3de;
    background: #e7eaf0;
}

.demo-narration-toggle svg {
    display: block;
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.demo-narration-toggle__off,
.demo-narration-toggle[data-audio-muted="true"] .demo-narration-toggle__on {
    display: none;
}

.demo-narration-toggle[data-audio-muted="true"] .demo-narration-toggle__off {
    display: block;
}

.demo-welcome-body {
    display: grid;
    grid-template-columns: minmax(120px, 180px) minmax(0, 1fr);
    align-items: center;
    gap: var(--ui-space-5);
}

.demo-mykyta-stage {
    display: grid;
    place-items: center;
    min-height: 236px;
    overflow: hidden;
    border-radius: var(--ui-radius-lg);
    background: #fff;
}

.demo-mykyta-stage img {
    display: block;
    width: min(100%, 180px);
    height: 250px;
    object-fit: contain;
}

.demo-welcome-copy {
    min-width: 0;
}

.demo-welcome-copy p {
    margin: var(--ui-space-3) 0 var(--ui-space-4);
}

.demo-welcome-mobile {
    display: none !important;
}

.demo-tour-resume[hidden] {
    display: none !important;
}

.demo-tour-resume {
    position: fixed;
    right: max(26px, env(safe-area-inset-right));
    bottom: max(96px, calc(env(safe-area-inset-bottom) + 96px));
    z-index: 1301;
    display: inline-flex;
    align-items: center;
    gap: var(--ui-space-2);
    min-height: 52px;
    padding: 4px 16px 4px 5px;
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: 18px;
    background: linear-gradient(135deg, #173b70 0%, var(--ui-color-primary, #2856cf) 100%);
    box-shadow: 0 14px 34px rgba(28, 65, 133, .28), 0 0 0 4px rgba(255, 255, 255, .84);
    color: #fff;
    font: inherit;
    font-weight: 750;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.demo-tour-resume:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(28, 65, 133, .34), 0 0 0 4px rgba(255, 255, 255, .92);
}

.demo-tour-resume:focus-visible {
    outline: 3px solid rgba(246, 216, 79, .78);
    outline-offset: 4px;
}

.demo-tour-resume__portrait {
    position: relative;
    display: block;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    overflow: hidden;
    border: 2px solid #f6d84f;
    border-radius: 14px;
    background: #fff;
}

.demo-tour-resume__portrait img {
    position: absolute;
    top: 2px;
    left: 50%;
    display: block;
    width: 76px;
    height: 114px;
    max-width: none;
    object-fit: contain;
    transform: translateX(-50%);
}

.demo-tour-resume__label {
    white-space: nowrap;
}

.demo-tour-step-label {
    display: inline-block;
    color: var(--ui-color-primary, #2856cf);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .02em;
}

.demo-tour[hidden] {
    display: none;
}

.demo-tour {
    position: fixed;
    inset: 0;
    z-index: 10050;
    pointer-events: none;
}

.demo-tour__shield {
    position: fixed;
    inset: 0;
    pointer-events: auto;
}

.demo-tour.is-finish .demo-tour__shield {
    background: rgba(12, 31, 58, .54);
}

.demo-tour__spotlight {
    position: fixed;
    z-index: 1;
    border: 2px solid #f6d84f;
    border-radius: var(--ui-radius-md, 12px);
    box-shadow: 0 0 0 9999px rgba(12, 31, 58, .54);
    pointer-events: none;
    transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease;
}

.demo-tour__spotlight[hidden] {
    display: none;
}

.demo-tour__card {
    position: fixed;
    z-index: 2;
    box-sizing: border-box;
    width: min(360px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    overflow: auto;
    padding: var(--ui-space-4);
    pointer-events: auto;
    box-shadow: var(--ui-shadow-dialog);
}

.demo-tour__audio {
    position: absolute;
    top: var(--ui-space-3);
    right: var(--ui-space-3);
    z-index: 1;
}

.demo-tour__heading {
    display: flex;
    align-items: center;
    gap: var(--ui-space-3);
    padding-right: calc(var(--ui-control-md) + var(--ui-space-3));
}

.demo-tour__heading h2 {
    margin: 4px 0 0;
    font-size: var(--ui-font-section-title);
    line-height: 1.25;
}

.demo-tour__mykyta {
    position: relative;
    display: block;
    flex: 0 0 52px;
    width: 52px;
    height: 60px;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
}

.demo-tour__mykyta img {
    position: absolute;
    top: 8px;
    left: 50%;
    display: block;
    width: 68px;
    height: 102px;
    max-width: none;
    object-fit: cover;
    transform: translateX(-50%);
}

.demo-tour__card p {
    margin: var(--ui-space-4) 0;
    line-height: 1.55;
}

.demo-tour__actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: var(--ui-space-2);
}

.demo-tour.is-finish .demo-tour__card {
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%);
    width: min(420px, calc(100vw - 32px));
    text-align: center;
}

.demo-tour.is-finish .demo-tour__heading {
    flex-direction: column;
    padding-right: 0;
}

.demo-tour.is-finish .demo-tour__mykyta {
    flex-basis: 192px;
    width: 128px;
    height: 192px;
    border-radius: 0;
    background: transparent;
}

.demo-tour.is-finish .demo-tour__mykyta img {
    position: static;
    width: 128px;
    height: 192px;
    object-fit: contain;
    transform: none;
}

.demo-tour.is-finish .demo-tour__actions {
    justify-content: center;
}

@media (max-width: 1080px) {
    .demo-welcome-desktop,
    [data-demo-welcome-progress],
    [data-demo-tour-restart],
    .demo-tour-resume {
        display: none !important;
    }

    [data-demo-welcome-dialog] .demo-narration-toggle {
        display: none !important;
    }

    .demo-welcome-mobile {
        display: block !important;
    }

    .ui-button.demo-welcome-mobile {
        display: inline-flex !important;
    }
}

@media (max-width: 600px) {
    #sidebar[data-demo-tour-sidebar] {
        padding-bottom: 45dvh;
    }

    .demo-welcome-body {
        grid-template-columns: 1fr;
        gap: var(--ui-space-3);
    }

    .demo-mykyta-stage,
    .demo-welcome-guide {
        display: none;
    }

    .demo-tour__card {
        left: 16px !important;
        right: 16px;
        top: auto !important;
        bottom: max(16px, env(safe-area-inset-bottom));
        width: auto;
        max-height: min(48dvh, 390px);
    }

    .demo-tour.is-finish .demo-tour__card {
        right: auto;
        bottom: auto;
        width: calc(100vw - 32px);
        max-height: calc(100dvh - 32px);
    }

    .demo-consultation-dialog {
        width: calc(100% - 16px);
        max-height: calc(100dvh - 16px);
    }

    .demo-consultation-dialog .ui-dialog__header,
    .demo-consultation-dialog .ui-dialog__body,
    .demo-consultation-dialog .ui-dialog__footer {
        padding-inline: var(--ui-space-4);
    }
}

.demo-entry-loader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: #fff;
    opacity: 1;
    visibility: visible;
    transition: opacity .42s ease, visibility .42s ease;
    animation: demo-entry-loader-fallback 0s linear 5s forwards;
}

.demo-entry-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.demo-entry-loader__squares {
    display: grid;
    grid-template-columns: repeat(2, 54px);
    grid-template-rows: repeat(2, 54px);
    gap: 8px;
}

.demo-entry-loader__squares span {
    border-radius: 12px;
    opacity: 0;
    transform: scale(.52);
    animation: demo-entry-square-in .21s cubic-bezier(.2,.8,.2,1) forwards;
}

.demo-entry-loader__squares span:nth-child(1) {
    grid-column: 2;
    grid-row: 1;
    background: #d8d9d9;
}

.demo-entry-loader__squares span:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    background: #c9cccd;
    animation-delay: .11s;
}

.demo-entry-loader__squares span:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    background: #7e8183;
    animation-delay: .22s;
}

.demo-entry-loader__squares span:nth-child(4) {
    grid-column: 1;
    grid-row: 1;
    background: #f6d84f;
    animation-delay: .33s;
}

@keyframes demo-entry-square-in {
    0% { opacity: 0; transform: scale(.52); }
    70% { opacity: 1; transform: scale(1.06); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes demo-entry-loader-fallback {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
    .demo-tour-resume {
        transition: none;
    }

    .demo-tour-resume:hover {
        transform: none;
    }

    .demo-tour__spotlight {
        transition: none;
    }
    .demo-entry-loader {
        transition: none;
    }

    .demo-entry-loader__squares span {
        animation: none;
        opacity: 1;
        transform: none;
    }
}
