* { box-sizing: border-box; }
body.wbb-shell {
    margin: 0;
    background: #f8fafc;
    color: #0f172a;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.wbb-shell-header {
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}
.wbb-shell-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}
.wbb-shell-brand small { display: block; color: #64748b; }
.wbb-shell-logo {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    background: var(--wbb-primary, #2563eb);
    font-weight: 700;
}
.wbb-shell-nav {
    display: flex;
    align-items: center;
    gap: 14px;
}
.wbb-shell-nav a { color: #0f172a; text-decoration: none; }
.wbb-shell-main { min-height: calc(100vh - 110px); padding: 1px 24px 48px; }
.wbb-shell-footer { text-align: center; padding: 18px; color: #64748b; }
.wbb-shell-message { max-width: 720px; margin: 48px auto; background: #fff; padding: 28px; border-radius: 16px; }

.wbb-shell-logo-image {
    background: transparent;
    color: inherit;
    overflow: hidden;
}
.wbb-shell-logo-image img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    object-fit: contain;
}

/* v0.7.0: practical shell UI brush-up */
body.wbb-shell {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28vw),
        linear-gradient(180deg, #f8fafc 0%, #eef4fb 100%);
    min-height: 100vh;
}

.wbb-shell-header {
    position: sticky;
    top: 0;
    z-index: 20;
    height: 72px;
    padding: 0 clamp(16px, 3vw, 34px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid #d9e2ec;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.wbb-shell-brand {
    min-width: 0;
}

.wbb-shell-brand strong {
    display: block;
    max-width: 42vw;
    overflow: hidden;
    color: #0f172a;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wbb-shell-brand small {
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wbb-shell-logo {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.20);
}

.wbb-shell-nav {
    gap: 8px;
    color: #475569;
    font-size: 14px;
}

.wbb-shell-nav span {
    max-width: 18vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wbb-shell-nav a {
    padding: 8px 10px;
    border: 1px solid #d9e2ec;
    border-radius: 999px;
    background: #fff;
    color: #0f172a;
    font-weight: 700;
}

.wbb-shell-nav a:hover,
.wbb-shell-nav a:focus {
    border-color: var(--wbb-primary, #2563eb);
    color: var(--wbb-primary, #2563eb);
    outline: none;
}

.wbb-shell-main {
    width: 100%;
    min-height: calc(100vh - 124px);
    padding: 1px clamp(10px, 2vw, 24px) 48px;
}

.wbb-shell-footer {
    border-top: 1px solid #d9e2ec;
    background: rgba(255, 255, 255, 0.72);
}

.wbb-shell-message {
    border: 1px solid #d9e2ec;
    box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08);
}

@media (max-width: 720px) {
    .wbb-shell-header {
        height: auto;
        min-height: 72px;
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .wbb-shell-brand strong,
    .wbb-shell-brand small,
    .wbb-shell-nav span {
        max-width: calc(100vw - 96px);
    }

    .wbb-shell-nav {
        flex-wrap: wrap;
        width: 100%;
        justify-content: flex-start;
    }
}
