.lessonlink-footer-badges {
    display: inline-flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    z-index: 1;
}

/* Fixed bottom “chip dock” for Demo (not part of scroll layout; does not reserve footer space). */
.lessonlink-env-float {
    position: fixed;
    right: 0.5rem;
    bottom: calc(5.65rem + env(safe-area-inset-bottom, 0px));
    z-index: 100050;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    pointer-events: none;
    display: none;
    padding: 5px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface-card-strong, #ffffff) 88%, transparent);
    border: 1px solid color-mix(in srgb, var(--border-default, #e5e7eb) 70%, transparent);
    box-shadow:
        0 10px 28px rgba(15, 23, 42, 0.12),
        0 2px 8px rgba(15, 23, 42, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lessonlink-env-float__badges,
.lessonlink-footer-badges {
    pointer-events: auto;
}

body:has(.ask-lessonlink-route-root) .lessonlink-env-float {
    bottom: calc(7.65rem + env(safe-area-inset-bottom, 0px));
}

.lessonlink-env-float:has(#lessonlink-sandbox-footer-badge:not([hidden])),
.lessonlink-env-float:has(#lessonlink-build-update-badge:not([hidden])) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lessonlink-env-float__badges {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 4px;
}

.lessonlink-sandbox-footer-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    margin: 0;
    padding: 1px 6px;
    overflow: hidden;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1;
    color: #0f766e;
    white-space: nowrap;
    text-overflow: ellipsis;
    border: 1px solid rgba(15, 118, 110, 0.34);
    border-radius: 999px;
    background: rgba(204, 251, 241, 0.92);
    pointer-events: auto;
    cursor: context-menu;
    user-select: none;
    -webkit-user-select: none;
}

.lessonlink-sandbox-footer-badge:hover,
.lessonlink-sandbox-footer-badge:focus-visible {
    background: rgba(153, 246, 228, 0.98);
    outline: none;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.22);
}

.lessonlink-sandbox-footer-menu {
    position: fixed;
    z-index: 100060;
    display: flex;
    flex-direction: column;
    min-width: 148px;
    padding: 4px;
    pointer-events: auto;
    border: 1px solid color-mix(in srgb, var(--border-default, #e5e7eb) 82%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--surface-card-strong, #ffffff) 96%, transparent);
    box-shadow:
        0 12px 28px rgba(15, 23, 42, 0.14),
        0 2px 8px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.lessonlink-sandbox-footer-menu[hidden] {
    display: none !important;
}

.lessonlink-sandbox-footer-menu__item {
    display: block;
    width: 100%;
    margin: 0;
    padding: 8px 12px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-primary, #0f172a);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    text-align: left;
    cursor: pointer;
}

.lessonlink-sandbox-footer-menu__item:hover,
.lessonlink-sandbox-footer-menu__item:focus-visible {
    background: color-mix(in srgb, rgba(15, 118, 110, 0.12) 72%, transparent);
    outline: none;
}

.lessonlink-sandbox-footer-menu__item--danger {
    color: #b91c1c;
}

.lessonlink-sandbox-footer-menu__item--danger:hover,
.lessonlink-sandbox-footer-menu__item--danger:focus-visible {
    background: rgba(254, 226, 226, 0.92);
}

.lessonlink-sandbox-footer-badge[hidden] {
    display: none !important;
}

.lessonlink-build-update-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    margin: 0;
    padding: 2px 8px;
    overflow: hidden;
    border: 1px solid rgba(180, 83, 9, 0.42);
    border-radius: 999px;
    background: rgba(255, 247, 237, 0.96);
    color: #9a3412;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.2;
    white-space: nowrap;
    text-overflow: ellipsis;
    cursor: pointer;
    pointer-events: auto;
    user-select: none;
    -webkit-user-select: none;
}

.lessonlink-build-update-badge:hover,
.lessonlink-build-update-badge:focus-visible {
    background: #ffedd5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(251, 146, 60, 0.35);
}

.lessonlink-build-update-badge[hidden] {
    display: none !important;
}

.lessonlink-build-update-badge.is-reloading {
    opacity: 0.72;
    cursor: wait;
    pointer-events: none;
}

.dialog-content--sandbox-welcome .dialog-message--rich {
    max-width: 34rem;
}

.sandbox-welcome-dialog {
    display: grid;
    gap: 12px;
}

.sandbox-welcome-dialog__lede,
.sandbox-welcome-dialog__hint,
.sandbox-welcome-dialog__actions-title {
    margin: 0;
    color: var(--text-secondary, #475569);
    line-height: 1.55;
}

.sandbox-welcome-dialog__chip-preview {
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.sandbox-welcome-dialog__chip {
    pointer-events: none;
    cursor: default;
}

.sandbox-welcome-dialog__list {
    margin: 0;
    padding-left: 1.15rem;
    color: var(--text-primary, #0f172a);
    line-height: 1.55;
}

.sandbox-welcome-dialog__list li + li {
    margin-top: 8px;
}
