.cb-layer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1140;
    pointer-events: none;
    padding: 0 1rem 1.25rem;
}

.cb-panel {
    pointer-events: auto;
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    border-radius: 18px;
    border: 1px solid rgba(59, 130, 246, 0.18);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.97) 0%, rgba(30, 41, 59, 0.97) 100%);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
    backdrop-filter: blur(24px) saturate(1.2);
    color: #f1f5f9;
    box-shadow:
        0 0 0 1px rgba(59, 130, 246, 0.08),
        0 20px 60px -12px rgba(2, 6, 23, 0.55),
        0 0 80px -20px rgba(59, 130, 246, 0.12);
    padding: 1.4rem 1.5rem 1.25rem;
    overflow: hidden;
    animation: cbSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.cb-panel[hidden] {
    display: none !important;
}

.cb-glow {
    position: absolute;
    top: -60%;
    left: -20%;
    width: 140%;
    height: 160%;
    background: radial-gradient(ellipse at 30% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.cb-close {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    border: 0;
    background: transparent;
    color: rgba(148, 163, 184, 0.7);
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    transition: color 0.15s, background 0.15s;
    font-size: 0.85rem;
}

.cb-close:hover,
.cb-close:focus-visible {
    color: #e2e8f0;
    background: rgba(148, 163, 184, 0.12);
}

.cb-body {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.cb-icon {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18) 0%, rgba(99, 102, 241, 0.12) 100%);
    border: 1px solid rgba(59, 130, 246, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #93c5fd;
}

.cb-copy {
    flex: 1;
    min-width: 0;
}

.cb-copy h2 {
    margin: 0 0 0.3rem;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #f8fafc;
}

.cb-copy p {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.5;
    color: rgba(203, 213, 225, 0.92);
}

.cb-actions {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cb-links {
    position: relative;
    z-index: 1;
    margin-top: 0.6rem;
    display: inline-flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.cb-links a {
    color: #93c5fd;
    font-size: 0.8rem;
    text-decoration: none;
    border-bottom: 1px dashed rgba(147, 197, 253, 0.45);
}

.cb-links a:hover,
.cb-links a:focus-visible {
    color: #dbeafe;
    border-bottom-color: rgba(219, 234, 254, 0.8);
}

.cb-btn {
    border: 0;
    border-radius: 10px;
    padding: 0.52rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.1s;
    letter-spacing: 0.01em;
}

.cb-btn:active {
    transform: scale(0.97);
}

.cb-btn-ghost {
    background: rgba(148, 163, 184, 0.08);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.cb-btn-ghost:hover,
.cb-btn-ghost:focus-visible {
    background: rgba(148, 163, 184, 0.15);
    color: #f1f5f9;
    border-color: rgba(148, 163, 184, 0.3);
}

.cb-btn-accent {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 2px 12px -2px rgba(59, 130, 246, 0.35);
}

.cb-btn-accent:hover,
.cb-btn-accent:focus-visible {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 4px 20px -4px rgba(59, 130, 246, 0.45);
}

.cb-current {
    position: relative;
    z-index: 1;
    margin-top: 0.7rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    color: rgba(148, 163, 184, 0.7);
    font-size: 0.78rem;
}

.cb-current strong {
    color: #93c5fd;
}

.cb-noscript {
    margin-top: 0.5rem;
}

.cb-noscript a {
    color: #93c5fd;
    font-size: 0.82rem;
}

.cb-chip {
    pointer-events: auto;
    position: fixed;
    bottom: 1.25rem;
    left: 1.25rem;
    z-index: 1141;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.96) 0%, rgba(30, 41, 59, 0.96) 100%);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    color: #93c5fd;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow:
        0 8px 28px -6px rgba(2, 6, 23, 0.45),
        0 0 40px -14px rgba(59, 130, 246, 0.15);
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s;
    animation: cbFadeIn 0.35s ease both;
}

.cb-chip:hover,
.cb-chip:focus-visible {
    transform: scale(1.08);
    box-shadow:
        0 10px 32px -6px rgba(2, 6, 23, 0.5),
        0 0 50px -12px rgba(59, 130, 246, 0.22);
}

.cb-chip[hidden] {
    display: none !important;
}

.cb-layer.is-saving .cb-btn {
    opacity: 0.6;
    pointer-events: none;
}

@keyframes cbSlideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cbFadeIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 600px) {
    .cb-layer {
        padding: 0 0.5rem 0.75rem;
    }

    .cb-panel {
        border-radius: 14px;
        padding: 1.1rem 1rem 1rem;
    }

    .cb-body {
        flex-direction: column;
        gap: 0.5rem;
    }

    .cb-actions {
        flex-direction: column;
    }

    .cb-btn {
        width: 100%;
        text-align: center;
    }

    .cb-chip {
        bottom: 0.75rem;
        left: 0.75rem;
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
}
