.shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

@media (min-width: 1024px) {
    .shell {
        grid-template-columns: 180px minmax(0, 1fr);
        column-gap: 1.75rem;
    }
}

@media (min-width: 1280px) {
    .shell {
        column-gap: 1rem;
    }

    .shell-sidebar {
        margin-right: 0.75rem;
    }
}

.shell-wordmark {
    display: inline-flex;
    align-items: baseline;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
}

@media (max-width: 639.98px) {
    .shell-wordmark {
        font-size: 1.25rem;
    }
}

@media (max-width: 379.98px) {
    .shell-wordmark {
        font-size: 1.1rem;
    }
}

.shell-wordmark-tld {
    margin-left: 0.05em;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
}

.shell-outline-btn {
    align-items: center;
    gap: 0.5rem;
    border: 1.5px solid var(--b4-color-primary);
    border-radius: 0.5rem;
    background: var(--b4-color-surface);
    padding: 0 0.875rem;
    color: var(--b4-color-primary-dark);
    font-size: 0.8125rem;
    font-weight: 600;
    transition: background-color var(--b4-duration-fast) var(--b4-ease-standard);
}

.shell-outline-btn:hover {
    background: rgba(var(--b4-color-primary-rgb), 0.06);
}

.shell-nav-item {
    display: flex;
    min-height: 2.5rem;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0.5rem;
    padding: 0 0.75rem;
    color: var(--b4-color-text);
}

a.shell-nav-item {
    transition: background-color var(--b4-duration-fast) var(--b4-ease-standard);
}

a.shell-nav-item:hover {
    background: var(--b4-color-neutral-bg);
}

.shell-nav-item-active,
a.shell-nav-item-active:hover {
    background: rgba(var(--b4-color-primary-rgb), 0.1);
    color: var(--b4-color-primary-dark);
    font-weight: 700;
}

.shell-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgb(15 23 42 / 0.45);
    opacity: 0;
    transition: opacity var(--b4-duration-base) var(--b4-ease-standard);
}

.shell-sidebar-backdrop.is-visible {
    opacity: 1;
}

@media (max-width: 1023.98px) {
    .shell-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 40;
        width: 18rem;
        max-width: 85vw;
        overflow-y: auto;
        background: var(--b4-color-surface);
        padding: 1rem;
        box-shadow: var(--b4-shadow-raised);
        transform: translateX(-100%);
        visibility: hidden;
        transition:
            transform var(--b4-duration-base) var(--b4-ease-standard),
            visibility 0s linear var(--b4-duration-base);
    }

    .shell-sidebar.is-open {
        transform: translateX(0);
        visibility: visible;
        transition:
            transform var(--b4-duration-base) var(--b4-ease-standard),
            visibility 0s linear 0s;
    }
}

.shell-mini-btn {
    display: inline-flex;
    align-items: center;
    border-radius: 0.375rem;
    background: var(--b4-color-primary);
    padding: 0.375rem 0.625rem;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 600;
}

.shell-phones {
    position: relative;
    margin-top: 1.25rem;
    width: 3.1rem;
    height: 4.4rem;
    flex-shrink: 0;
}

.shell-phone {
    position: absolute;
    width: 1.7rem;
    height: 3.4rem;
    border-radius: 0.5rem;
    background: #0f172a;
    padding: 3px;
    box-shadow: 0 6px 14px -6px rgb(15 23 42 / 0.5);
}

.shell-phone > span {
    display: block;
    height: 100%;
    border-radius: 0.35rem;
}

.shell-phone-back {
    top: 0;
    left: 0.1rem;
    transform: rotate(-9deg);
}

.shell-phone-back > span {
    background: linear-gradient(180deg, var(--b4-color-page) 0 22%, #22c55e 22% 30%, var(--b4-color-border) 30% 48%, var(--b4-color-tint-strong) 48% 100%);
}

.shell-phone-front {
    right: 0;
    bottom: 0;
    transform: rotate(8deg);
}

.shell-phone-front > span {
    background: linear-gradient(180deg, #7dd3fc 0%, #38bdf8 38%, var(--b4-color-warning-border) 62%, #22c55e 100%);
}

.shell-store-badge {
    display: inline-flex;
    width: 1.75rem;
    height: 1.75rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    background: #0f172a;
    color: #fff;
}

.agent-card {
    display: block;
    height: 100%;
    border: 1px solid var(--b4-color-border);
    border-radius: 0.5rem;
    padding: 0.5rem;
}

a.agent-card:hover {
    border-color: var(--b4-color-primary);
}

.agent-card-icon {
    display: inline-flex;
    width: 1.625rem;
    height: 1.625rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
}

.agent-card-title {
    margin-top: 0.375rem;
    color: var(--b4-color-text);
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1.2;
}

.agent-card-text {
    margin-top: 0.25rem;
    color: var(--b4-color-text-subtle);
    font-size: 0.625rem;
    line-height: 1.35;
}

.social-avatar {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
}

.social-story {
    position: relative;
    display: flex;
    width: 2.55rem;
    flex-shrink: 0;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.social-story-ring {
    display: block;
    border-radius: 9999px;
    background: linear-gradient(135deg, #f59e0b, #ec4899 55%, #8b5cf6);
    padding: 2px;
}

.social-story-ring-own {
    background: var(--b4-color-border);
}

.social-story-ring .social-avatar {
    width: 2.25rem;
    height: 2.25rem;
    border: 2px solid var(--b4-color-surface);
}

.social-story-add {
    position: absolute;
    top: 1.55rem;
    right: 0;
    display: flex;
    width: 1rem;
    height: 1rem;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--b4-color-surface);
    border-radius: 9999px;
    background: var(--b4-color-primary);
    color: #fff;
}

.social-story-name {
    max-width: 100%;
    overflow: hidden;
    color: var(--b4-color-text-muted);
    font-size: 0.625rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.social-stories-more {
    position: absolute;
    top: 0.6rem;
    right: 0;
    display: flex;
    width: 1.25rem;
    height: 1.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background: var(--b4-color-surface);
    color: var(--b4-color-text-muted);
    box-shadow: 0 1px 3px rgb(15 23 42 / 0.2);
}

.shell-search {
    position: relative;
    display: flex;
    align-items: center;
}

.shell-search-icon {
    position: absolute;
    left: 0.875rem;
    color: var(--b4-color-text-subtle);
    pointer-events: none;
}

.shell-search-input {
    width: 100%;
    min-height: 2.75rem;
    border: 1px solid var(--b4-color-border);
    border-radius: 0.625rem;
    background: var(--b4-color-surface);
    padding: 0 4.5rem 0 2.625rem;
    color: var(--b4-color-text);
    font-size: 0.875rem;
}

.shell-search-input::placeholder {
    color: var(--b4-color-text-subtle);
}

.shell-search-input::-webkit-search-cancel-button {
    display: none;
}

.shell-search-kbd {
    position: absolute;
    right: 0.625rem;
    border: 1px solid var(--b4-color-border);
    border-radius: 0.375rem;
    background: var(--b4-color-page);
    padding: 0.125rem 0.375rem;
    color: var(--b4-color-text-subtle);
    font-family: inherit;
    font-size: 0.6875rem;
    font-weight: 600;
    pointer-events: none;
}

.shell-icon-btn {
    display: flex;
    min-width: 2.75rem;
    min-height: 2.75rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    color: var(--b4-color-text-muted);
}

.shell-icon-btn:hover {
    background: var(--b4-color-surface-muted);
}

.shell-icon-btn::-webkit-details-marker {
    display: none;
}

.shell-music-btn[aria-pressed="true"] {
    background: #fef3c7;
    color: #b45309;
}

.shell-music-btn[aria-pressed="true"]:hover {
    background: #fde68a;
}

.shell-mini-btn[aria-disabled="true"] {
    cursor: default;
}

.shell-qr-wrap {
    display: inline-flex;
    flex-shrink: 0;
    border-radius: 0.25rem;
    background: #fff;
    padding: 0.125rem;
}

.shell-qr-wrap svg {
    width: 3.625rem;
    height: 3.625rem;
}

.shell-bell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    border-bottom: 1px solid var(--b4-color-border);
    padding: 0.75rem 1rem;
}

.shell-bell-count {
    border-radius: var(--b4-radius-pill);
    background: var(--b4-color-tint);
    padding: 0.125rem 0.5rem;
    color: var(--b4-color-primary-text);
    font-size: 0.6875rem;
    font-weight: 700;
}

.shell-bell-list {
    max-height: min(24rem, 60vh);
    overflow-y: auto;
}

.shell-bell-item {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
}

.shell-bell-item:hover {
    background: var(--b4-color-surface-muted);
}

.shell-bell-item-unread {
    background: var(--b4-color-tint);
}

.shell-bell-dot {
    width: 0.5rem;
    height: 0.5rem;
    margin-top: 0.375rem;
    flex-shrink: 0;
    border-radius: 9999px;
    background: var(--b4-color-primary);
}

:root[data-theme="dark"] .shell-music-btn[aria-pressed="true"] {
    background: #35270b;
    color: #fcd34d;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .shell-music-btn[aria-pressed="true"] {
        background: #35270b;
        color: #fcd34d;
    }
}

@media (max-width: 639px) {
    .shell-search-kbd {
        display: none;
    }

    .shell-search-input {
        padding-right: 0.75rem;
    }
}

.shell-cart-count { position: absolute; top: -0.2rem; right: -0.2rem; min-width: 1.05rem; height: 1.05rem; padding: 0 0.25rem; border-radius: 9999px; background: #047857; color: #fff; font-size: 0.625rem; font-weight: 700; line-height: 1.05rem; text-align: center; }

.shell-nav-heading {
    margin: 0.875rem 0 0.25rem;
    padding: 0 0.75rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
}

.shell-nav-heading:first-child {
    margin-top: 0;
}
